#include <ctrl.h>
Inheritance diagram for MGUI::CTRL:

Public Member Functions | |
| virtual | ~CTRL ()=0 |
| void | GetClientRect (LPRECT lpRect) const |
| CWnd * | GetCWnd () |
| Widget | GetWidget () |
| void | Invalidate (bool erase=true) |
| void | InvalidateRect (const LRECT2D &lrect, bool erase=true) |
| virtual bool | IsCreated () const |
| virtual bool | IsEnabled () const |
| virtual bool | PreTranslateMessageHook (MSG *pMsg) |
| virtual void | SetEnabled (bool enabled=true) |
| virtual void | SetFocus () const |
| void | SetRedraw (bool redraw=true) |
| virtual void | SetVisible (bool visible=true) |
| void | UpdateWindow () |
Static Public Member Functions | |
| const COLOR & | GetBackgroundColor () |
Protected Member Functions | |
| CTRL (CWnd &wnd) | |
| CTRL (CWnd *pWnd) | |
| CTRL () | |
| void | AddDestroyCallback () |
| virtual void | OnDestroy () |
Protected Attributes | |
| CWnd * | m_pWnd |
| Widget | m_widget |
There are two basic types of 'controls' which can be used in user interface implementation, controls which the user can interact with and 'static' controls which the user cannot change directly.
All controls which the user can manipulate also encapsulate information about the current 'state' of the control (except for MGUI::CTRL_PUSHBUTTON as explained below). There are three ways to use each of these controls in a program (in order of convenience):
Definition at line 227 of file ctrl.h.
|
|
Destructor.
|
|
|
Constructor (MFC version).
|
|
|
|
|
|
Constructor (X version).
|
|
|
Add 'Destroy' callback for widget.
|
|
|
Get interface 'background' color.
|
|
|
Get "client rectangle" for the primary control window (MFC only).
|
|
|
Get the CWnd of the primary control (MFC only).
|
|
|
Get the Widget for the control or container if multiple controls (X only). The widget should only be used for attachment, do not assume the widget is of a particular type. |
|
|
Invalidate the entire client area (MFC only). This will force it to redraw the next WM_PAINT message occurs. Reimplemented in MGUI::CANVAS. |
|
||||||||||||
|
Invalidate a rectangle in the client area (MFC only). This will force it to redraw the next WM_PAINT message occurs. |
|
|
Determine if control has been created.
Implements MGUI::FORM. |
|
|
Determine if control is enabled for keyboard or mouse input.
|
|
|
Called if widgets are destroyed before CTRL class instance. Will not be called if CTRL class instance is destroyed before widgets. Usually just sets widgets to NULL so won't be referenced in destructor. Derived class must call corresponding base class method AFTER performing its own processing. |
|
|
Called to process messages before translation (MFC only). Allows a control to trap messages before they get passed. Should return 'true' if the message was translated and should not be dispatched or 'false' if the message was not handled and should be dispatched. The control must also be added to the root layout's pretranslation list via MGUI::LAYOUT_PANE_BASE::PreTransListAddCtrl(). This should be done in the control's Create() method. Reimplemented in MGUI::CTRL_EDIT_TEXT, and MGUI::CTRL_EDIT_TEXT_WYSIWYG. |
|
|
Set whether mouse or keyboard input to control is allowed.
Implements MGUI::FORM. Reimplemented in MGUI::CTRL_COMBOBOX. |
|
|
Set focus to control.
Reimplemented from MGUI::FORM. |
|
|
Allow the window to be redrawn (MFC only).
|
|
|
Set whether control is visible or not.
Implements MGUI::FORM. |
|
|
Generate a WM_PAINT message if the window needs to be updated.
|
|
|
Pointer to actual control in derived class.
|
|
|
|
1.3.4-20031026