#include <drawctl.h>
Public Member Functions | |
BOOL | Create (wxWindow *parent, wxWindowID id, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=0, const wxValidator &validator=wxDefaultValidator, wxCamDrawControlStyle cacstyle=wxCDCS_DEFAULT, wxString opdesc=wxString(_T(""))) |
Initialize the control. | |
void | Init () |
wxCamDrawControl () | |
wxCamDrawControl (wxWindow *parent, wxWindowID id, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=0, const wxValidator &validator=wxDefaultValidator, wxCamDrawControlStyle cacstyle=wxCDCS_DEFAULT, wxString opdesc=wxString(_T(""))) | |
~wxCamDrawControl () | |
void | OnPaint (wxPaintEvent &event) |
Paints the control. | |
void | OnSize (wxSizeEvent &event) |
Handles resizing of a control. | |
void | OnMouseEvent (wxMouseEvent &event) |
Handles mouse events. | |
void | OnInvoke (wxCamDrawControlEvent &event) |
Handles deferred invoke events. | |
virtual void | Freeze () |
virtual void | Thaw () |
virtual void | SetStyle (wxCamDrawControlStyle style) |
virtual wxCamDrawControlStyle | GetStyle () |
wxString | GetOpDesc () |
Protected Member Functions | |
void | Invoke () |
Does the work of the button being pressed. | |
Protected Attributes | |
wxCamDrawControlStyle | m_CamDrawControlStyle |
wxString | m_OpDesc |
INT32 | m_Frozen |
Definition at line 160 of file drawctl.h.
|
Definition at line 179 of file drawctl.h. 00179 { Init(); }
|
|
Definition at line 180 of file drawctl.h. 00181 : Correct*/ long style = 0, const wxValidator& validator = wxDefaultValidator, 00182 wxCamDrawControlStyle cacstyle = wxCDCS_DEFAULT, 00183 wxString opdesc = wxString(_T(""))) 00184 { 00185 Init(); 00186 ControlList::Get()->NewControl(this); 00187 Create(parent, id, pos, size, style, validator, cacstyle, opdesc); 00188 }
|
|
Definition at line 189 of file drawctl.h.
|
|
Initialize the control.
Definition at line 151 of file drawctl.cpp. 00152 : Correct*/ long style, const wxValidator& validator, 00153 wxCamDrawControlStyle cacstyle, 00154 wxString opdesc) 00155 { 00156 if (!wxControl::Create(parent, id, pos, size, style, validator)) 00157 return FALSE; 00158 00159 m_CamDrawControlStyle = cacstyle; 00160 m_OpDesc = opdesc; 00161 return TRUE; 00162 }
|
|
Definition at line 197 of file drawctl.h. 00197 {m_Frozen++;}
|
|
Definition at line 203 of file drawctl.h. 00203 {return m_OpDesc;}
|
|
Definition at line 201 of file drawctl.h. 00201 { return m_CamDrawControlStyle;}
|
|
Definition at line 172 of file drawctl.h. 00172 { 00173 m_CamDrawControlStyle=wxCDCS_DEFAULT; 00174 m_OpDesc=wxString(_T("")); 00175 m_Frozen=0; 00176 }
|
|
Does the work of the button being pressed.
Definition at line 301 of file drawctl.cpp. 00302 { 00303 if (!IsEnabled()) 00304 { 00305 return; // Don't even send messages if the control is greyed 00306 } 00307 00308 wxCommandEvent ButtonEvent(wxEVT_COMMAND_BUTTON_CLICKED, GetId()); 00309 ProcessEvent(ButtonEvent); 00310 // If it's attached to an OpDescriptor, we invoke it. 00311 // ControlList::Get()->Invoke(this); 00312 }
|
|
Handles deferred invoke events.
Definition at line 277 of file drawctl.cpp. 00278 { 00279 Invoke(); 00280 }
|
|
Handles mouse events.
Definition at line 236 of file drawctl.cpp. 00237 { 00238 // Irritatingly wxMouseEvent does not propagate to the parent, but we expect it to. 00239 // so we have to fake it (sigh) 00240 // event.Skip(); // pretend we did not handle it, so it falls through to the dialog 00241 00242 if ( !(GetExtraStyle() & wxWS_EX_BLOCK_EVENTS) ) 00243 { 00244 wxWindow * pParent = GetParent(); 00245 if (pParent && !pParent->IsBeingDeleted()) 00246 { 00247 wxEvtHandler *pHandler = pParent->GetEventHandler(); 00248 if (pHandler && pHandler->IsKindOf(CLASSINFO(DialogEventHandler))) // Only propagate to our own dialogs 00249 { 00250 pHandler->ProcessEvent(event); 00251 } 00252 } 00253 } 00254 }
|
|
Paints the control.
Definition at line 181 of file drawctl.cpp. 00182 { 00183 if (!m_Frozen) 00184 { 00185 wxCamDialogEvent RedrawEvent(wxEVT_CAMDIALOG_REDRAW, GetId()); 00186 wxWindow * pParent=GetParent(); 00187 if (pParent) 00188 pParent->GetEventHandler()->ProcessEvent(RedrawEvent); 00189 } 00190 }
|
|
Handles resizing of a control.
Definition at line 210 of file drawctl.cpp. 00211 { 00212 wxWindow * pParent=GetParent(); 00213 if (pParent) 00214 pParent->GetEventHandler()->ProcessEvent(event); 00215 00216 event.Skip(); // Pretend we didn't handle it 00217 }
|
|
Definition at line 200 of file drawctl.h. 00200 { m_CamDrawControlStyle=style; }
|
|
Definition at line 198 of file drawctl.h.
|
|
|
|
|
|
|