wxShapeFramework  1.13.0 beta
wxSFEditTextShape Class Reference

Class encapsulating the editable text shape. It extends the basic text shape. More...

#include <EditTextShape.h>

Inheritance diagram for wxSFEditTextShape:
Collaboration diagram for wxSFEditTextShape:

List of all members.

Public Types

enum  EDITTYPE { editINPLACE = 0, editDIALOG, editDISABLED }

Public Member Functions

 XS_DECLARE_CLONABLE_CLASS (wxSFEditTextShape)
 wxSFEditTextShape (void)
 Default constructor.
 wxSFEditTextShape (const wxRealPoint &pos, const wxString &txt, wxSFDiagramManager *manager)
 User constructor.
 wxSFEditTextShape (const wxSFEditTextShape &obj)
 Copy constructor.
virtual ~wxSFEditTextShape (void)
 Destructor.
void SetEditType (EDITTYPE type)
 Set way how the text shape's content can be edited.
const EDITTYPEGetEditType () const
 Get current type of text shape's edit control.
wxSFContentCtrlGetTextCtrl ()
 Get pointer to assigned text control allowing user to change the shape's content directly in the canvas.
void EditLabel ()
 Switch the shape to a label editation mode.
void ForceMultiline (bool multiline)
 Force the edit text control to be multiline.
virtual void OnLeftDoubleClick (const wxPoint &pos)
 Event handler called when the shape was double-clicked. The function can be overrided if neccessary.
virtual bool OnKey (int key)
 Event handler called when any key is pressed (in the shape canvas). The function can be overrided if necessary.

Protected Attributes

wxSFContentCtrlm_pTextCtrl
long m_nCurrentState
bool m_fForceMultiline
EDITTYPE m_nEditType

Friends

class wxSFContentCtrl

Detailed Description

Class encapsulating the editable text shape. It extends the basic text shape.

See also:
wxSFTextShape

Member Enumeration Documentation

Enumerator:
editINPLACE 
editDIALOG 
editDISABLED 

Constructor & Destructor Documentation

Default constructor.

wxSFEditTextShape::wxSFEditTextShape ( const wxRealPoint &  pos,
const wxString &  txt,
wxSFDiagramManager manager 
)

User constructor.

Parameters:
posInitial position
txtText content
managerPointer to the parent canvas

Copy constructor.

Parameters:
objReference to the source object
virtual wxSFEditTextShape::~wxSFEditTextShape ( void  ) [virtual]

Destructor.


Member Function Documentation

Switch the shape to a label editation mode.

void wxSFEditTextShape::ForceMultiline ( bool  multiline) [inline]

Force the edit text control to be multiline.

Parameters:
multilineIf TRUE then the associated text control will be allways multiline
const EDITTYPE& wxSFEditTextShape::GetEditType ( ) const [inline]

Get current type of text shape's edit control.

Returns:
Type of edit control
See also:
EDITTYPE

Get pointer to assigned text control allowing user to change the shape's content directly in the canvas.

Returns:
Pointer to instance of wxSFContentCtrl class
virtual bool wxSFEditTextShape::OnKey ( int  key) [virtual]

Event handler called when any key is pressed (in the shape canvas). The function can be overrided if necessary.

The function is called by the framework (by the shape canvas).

Parameters:
keyThe key code
Returns:
The function must return TRUE if the default event routine should be called as well, otherwise FALSE
See also:
wxSFShapeBase::OnKey

Reimplemented from wxSFShapeBase.

virtual void wxSFEditTextShape::OnLeftDoubleClick ( const wxPoint &  pos) [virtual]

Event handler called when the shape was double-clicked. The function can be overrided if neccessary.

Parameters:
posMouse position.

Reimplemented from wxSFShapeBase.

void wxSFEditTextShape::SetEditType ( EDITTYPE  type) [inline]

Set way how the text shape's content can be edited.

Parameters:
typeEdit control type
See also:
EDITTYPE

Friends And Related Function Documentation

friend class wxSFContentCtrl [friend]

Member Data Documentation


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines