wxShapeFramework
1.13.0 beta
|
Class encapsulating the editable text shape. It extends the basic text shape. More...
#include <EditTextShape.h>
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 EDITTYPE & | GetEditType () const |
Get current type of text shape's edit control. | |
wxSFContentCtrl * | GetTextCtrl () |
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 | |
wxSFContentCtrl * | m_pTextCtrl |
long | m_nCurrentState |
bool | m_fForceMultiline |
EDITTYPE | m_nEditType |
Friends | |
class | wxSFContentCtrl |
Class encapsulating the editable text shape. It extends the basic text shape.
wxSFEditTextShape::wxSFEditTextShape | ( | void | ) |
Default constructor.
wxSFEditTextShape::wxSFEditTextShape | ( | const wxRealPoint & | pos, |
const wxString & | txt, | ||
wxSFDiagramManager * | manager | ||
) |
User constructor.
pos | Initial position |
txt | Text content |
manager | Pointer to the parent canvas |
wxSFEditTextShape::wxSFEditTextShape | ( | const wxSFEditTextShape & | obj | ) |
Copy constructor.
obj | Reference to the source object |
virtual wxSFEditTextShape::~wxSFEditTextShape | ( | void | ) | [virtual] |
Destructor.
void wxSFEditTextShape::EditLabel | ( | ) |
Switch the shape to a label editation mode.
void wxSFEditTextShape::ForceMultiline | ( | bool | multiline | ) | [inline] |
Force the edit text control to be multiline.
multiline | If TRUE then the associated text control will be allways multiline |
const EDITTYPE& wxSFEditTextShape::GetEditType | ( | ) | const [inline] |
wxSFContentCtrl* wxSFEditTextShape::GetTextCtrl | ( | ) | [inline] |
Get pointer to assigned text control allowing user to change the shape's content directly in the canvas.
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).
key | The key code |
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.
pos | Mouse position. |
Reimplemented from wxSFShapeBase.
void wxSFEditTextShape::SetEditType | ( | EDITTYPE | type | ) | [inline] |
Set way how the text shape's content can be edited.
type | Edit control type |
friend class wxSFContentCtrl [friend] |
bool wxSFEditTextShape::m_fForceMultiline [protected] |
long wxSFEditTextShape::m_nCurrentState [protected] |
EDITTYPE wxSFEditTextShape::m_nEditType [protected] |
wxSFContentCtrl* wxSFEditTextShape::m_pTextCtrl [protected] |