Inherits boost::noncopyable.
Inherited by MessageMap [virtual]
, MessageMap< EventHandlerClass, SmartWin::MessageMapPolicyDialogWidget > [virtual]
, MessageMap< EventHandlerClass, SmartWin::MessageMapPolicyModalDialogWidget > [virtual]
, MessageMap< EventHandlerClass, unUsed > [virtual]
, MessageMapControl [virtual]
, MessageMapControl< EventHandlerClass, SmartWin::NormalTextBox< EventHandlerClass, MessageMapPolicy >::SmartWin::NormalTextBox< EventHandlerClass, MessageMapPolicy >, MessageMapPolicy > [virtual]
, MessageMapControl< EventHandlerClass, SmartWin::RichTextBox< EventHandlerClass, MessageMapPolicy >::SmartWin::RichTextBox< EventHandlerClass, MessageMapPolicy >, MessageMapPolicy > [virtual]
, MessageMapControl< EventHandlerClass, SmartWin::WidgetButton< EventHandlerClass, MessageMapPolicy >, MessageMapPolicy > [virtual]
, MessageMapControl< EventHandlerClass, SmartWin::WidgetCheckBox< EventHandlerClass, MessageMapPolicy >, MessageMapPolicy > [virtual]
, MessageMapControl< EventHandlerClass, SmartWin::WidgetComboBox< EventHandlerClass, MessageMapPolicy >, MessageMapPolicy > [virtual]
, MessageMapControl< EventHandlerClass, SmartWin::WidgetCoolbar< EventHandlerClass, MessageMapPolicy >, MessageMapPolicy > [virtual]
, MessageMapControl< EventHandlerClass, SmartWin::WidgetDataGrid< EventHandlerClass, MessageMapPolicy >, MessageMapPolicy > [virtual]
, MessageMapControl< EventHandlerClass, SmartWin::WidgetDateTimePicker< EventHandlerClass, MessageMapPolicy >, MessageMapPolicy > [virtual]
, MessageMapControl< EventHandlerClass, SmartWin::WidgetGroupBox< EventHandlerClass, MessageMapPolicy >, MessageMapPolicy > [virtual]
, MessageMapControl< EventHandlerClass, SmartWin::WidgetMDIParent< EventHandlerClass, unUsed >, SmartWin::MessageMapPolicyNormalWidget > [virtual]
, MessageMapControl< EventHandlerClass, SmartWin::WidgetMenu< EventHandlerClass, MessageMapPolicy >, MessageMapPolicy > [virtual]
, MessageMapControl< EventHandlerClass, SmartWin::WidgetMenuExtended< EventHandlerClass, MessageMapPolicy >, MessageMapPolicy > [virtual]
, MessageMapControl< EventHandlerClass, SmartWin::WidgetProgressBar< EventHandlerClass, MessageMapPolicy >, MessageMapPolicy > [virtual]
, MessageMapControl< EventHandlerClass, SmartWin::WidgetRadioButton< EventHandlerClass, MessageMapPolicy >, MessageMapPolicy > [virtual]
, MessageMapControl< EventHandlerClass, SmartWin::WidgetSlider< EventHandlerClass, MessageMapPolicy >, MessageMapPolicy > [virtual]
, MessageMapControl< EventHandlerClass, SmartWin::WidgetSpinner< EventHandlerClass, MessageMapPolicy >, MessageMapPolicy > [virtual]
, MessageMapControl< EventHandlerClass, SmartWin::WidgetSplitter< WidgetClassBase, EventHandlerClass, Painter, MessageMapPolicy >, MessageMapPolicy > [virtual]
, MessageMapControl< EventHandlerClass, SmartWin::WidgetStatic< EventHandlerClass, MessageMapPolicy >, MessageMapPolicy > [virtual]
, MessageMapControl< EventHandlerClass, SmartWin::WidgetStatusBar< EventHandlerClass, MessageMapPolicy, TypeOfStatusBar >, MessageMapPolicy > [virtual]
, MessageMapControl< EventHandlerClass, SmartWin::WidgetTabSheet< EventHandlerClass, MessageMapPolicy >, MessageMapPolicy > [virtual]
, MessageMapControl< EventHandlerClass, SmartWin::WidgetToolbar< EventHandlerClass, MessageMapPolicy >, MessageMapPolicy > [virtual]
, MessageMapControl< EventHandlerClass, SmartWin::WidgetTreeView< EventHandlerClass, MessageMapPolicy >, MessageMapPolicy > [virtual]
, MessageMapControl< EventHandlerClass, TextBoxType::TextBoxType, MessageMapPolicy > [virtual]
, MessageMapControl< Parent, SmartWin::NormalTextBox< Parent, MessageMapPolicy >::SmartWin::NormalTextBox< Parent, MessageMapPolicy >, MessageMapPolicy > [virtual]
, and DestructionClass [virtual]
.
Public Member Functions | |
void | addRemoveExStyle (DWORD addStyle, bool add) |
Use this function to add or remove windows exStyles. | |
void | addRemoveStyle (DWORD addStyle, bool add) |
Use this function to add or remove windows styles. | |
Utilities::CriticalSection & | getCriticalSection () |
Returns a CriticalSection associated with the current Widget object. | |
HMENU | getCtrlId () const |
Returns the control id of the Widget. | |
Widget * | getParent () const |
Returns the parent Widget of the Widget. | |
HWND | handle () const |
Returns the HWND to the Widget. | |
void | invalidateWidget () |
Add this widget to the update area. | |
virtual LRESULT | sendWidgetMessage (HWND hWnd, UINT msg, WPARAM &wPar, LPARAM &lPar)=0 |
Send a message to the Widget. | |
virtual void | subclass (unsigned id) |
Subclasses the dialog item with the given dialog item id. | |
void | updateWidget () |
Repaints the whole window. |
Basically (almost) all Widgets derive from this class, this is the root class for (almost) every single Widget type.
This class contains the functionality that all Widgets must or should have support for.
E.g. the handle to the specific Widgets are contained here, plus all the commonalities between Widgets
The Widget class inherits from boost::noncopyable to indicate it's not to be copied
void addRemoveExStyle | ( | DWORD | addStyle, | |
bool | add | |||
) |
Use this function to add or remove windows exStyles.
The first parameter is the type of style you wish to add/remove.
The second argument is a boolean indicating if you wish to add or remove the style (if true add style, else remove)
void addRemoveStyle | ( | DWORD | addStyle, | |
bool | add | |||
) |
Use this function to add or remove windows styles.
The first parameter is the type of style you wish to add/remove.
The second argument is a boolean indicating if you wish to add or remove the style (if true add style, else remove)
Utilities::CriticalSection & getCriticalSection | ( | ) |
Returns a CriticalSection associated with the current Widget object.
If you need serialized thread safe access to the Widget call this function and either stuff the returned object into a Utilities::ThreadLock or call Utilities::CriticalSection::lock (then you manually have to ensure CriticalSection::unlock is called on it)
HMENU getCtrlId | ( | ) | const |
Returns the control id of the Widget.
This one only makes sense for control items, e.g. WidgetButton, WidgetComboBox etc.
Every control in a Widget has got its own control ID, mark that for a WidgetWindow this will always be ZERO
Widget* getParent | ( | ) | const |
HWND handle | ( | ) | const |
void invalidateWidget | ( | ) |
Add this widget to the update area.
Same as updateWidget except that this does not force an immediate redraw.
virtual LRESULT sendWidgetMessage | ( | HWND | hWnd, | |
UINT | msg, | |||
WPARAM & | wPar, | |||
LPARAM & | lPar | |||
) | [pure virtual] |
Send a message to the Widget.
If you need to be able to send a message to a Widget then use this function as it will unroll into
a SendMessage from the Windows API
Implemented in MessageMap, MessageMapControl, WidgetButton, WidgetCheckBox, WidgetComboBox, WidgetDateTimePicker, WidgetGroupBox, WidgetMDIChild, WidgetMDIParent, WidgetRadioButton, WidgetRichTextBox, WidgetSlider, WidgetSpinner, WidgetStatic, WidgetStatusBar, WidgetTabSheet, WidgetTextBox, WidgetTreeView, WidgetWindowBase, MessageMap< EventHandlerClass, SmartWin::MessageMapPolicyModalDialogWidget >, MessageMap< EventHandlerClass, SmartWin::MessageMapPolicyDialogWidget >, MessageMap< EventHandlerClass, unUsed >, MessageMapControl< Parent, SmartWin::NormalTextBox< Parent, MessageMapPolicy >::SmartWin::NormalTextBox< Parent, MessageMapPolicy >, MessageMapPolicy >, MessageMapControl< EventHandlerClass, SmartWin::WidgetStatusBar< EventHandlerClass, MessageMapPolicy, TypeOfStatusBar >, MessageMapPolicy >, MessageMapControl< EventHandlerClass, SmartWin::WidgetMDIParent< EventHandlerClass, unUsed >, SmartWin::MessageMapPolicyNormalWidget >, MessageMapControl< EventHandlerClass, TextBoxType::TextBoxType, MessageMapPolicy >, MessageMapControl< EventHandlerClass, SmartWin::WidgetGroupBox< EventHandlerClass, MessageMapPolicy >, MessageMapPolicy >, MessageMapControl< EventHandlerClass, SmartWin::WidgetTreeView< EventHandlerClass, MessageMapPolicy >, MessageMapPolicy >, MessageMapControl< EventHandlerClass, SmartWin::WidgetMenu< EventHandlerClass, MessageMapPolicy >, MessageMapPolicy >, MessageMapControl< EventHandlerClass, SmartWin::WidgetDataGrid< EventHandlerClass, MessageMapPolicy >, MessageMapPolicy >, MessageMapControl< EventHandlerClass, SmartWin::WidgetComboBox< EventHandlerClass, MessageMapPolicy >, MessageMapPolicy >, MessageMapControl< EventHandlerClass, SmartWin::WidgetTabSheet< EventHandlerClass, MessageMapPolicy >, MessageMapPolicy >, MessageMapControl< EventHandlerClass, SmartWin::NormalTextBox< EventHandlerClass, MessageMapPolicy >::SmartWin::NormalTextBox< EventHandlerClass, MessageMapPolicy >, MessageMapPolicy >, MessageMapControl< EventHandlerClass, SmartWin::WidgetDateTimePicker< EventHandlerClass, MessageMapPolicy >, MessageMapPolicy >, MessageMapControl< EventHandlerClass, SmartWin::WidgetStatic< EventHandlerClass, MessageMapPolicy >, MessageMapPolicy >, MessageMapControl< EventHandlerClass, SmartWin::WidgetToolbar< EventHandlerClass, MessageMapPolicy >, MessageMapPolicy >, MessageMapControl< EventHandlerClass, SmartWin::WidgetSplitter< WidgetClassBase, EventHandlerClass, Painter, MessageMapPolicy >, MessageMapPolicy >, MessageMapControl< EventHandlerClass, SmartWin::WidgetSlider< EventHandlerClass, MessageMapPolicy >, MessageMapPolicy >, MessageMapControl< EventHandlerClass, SmartWin::WidgetRadioButton< EventHandlerClass, MessageMapPolicy >, MessageMapPolicy >, MessageMapControl< EventHandlerClass, SmartWin::RichTextBox< EventHandlerClass, MessageMapPolicy >::SmartWin::RichTextBox< EventHandlerClass, MessageMapPolicy >, MessageMapPolicy >, MessageMapControl< EventHandlerClass, SmartWin::WidgetCheckBox< EventHandlerClass, MessageMapPolicy >, MessageMapPolicy >, MessageMapControl< EventHandlerClass, SmartWin::WidgetCoolbar< EventHandlerClass, MessageMapPolicy >, MessageMapPolicy >, MessageMapControl< EventHandlerClass, SmartWin::WidgetSpinner< EventHandlerClass, MessageMapPolicy >, MessageMapPolicy >, MessageMapControl< EventHandlerClass, SmartWin::WidgetProgressBar< EventHandlerClass, MessageMapPolicy >, MessageMapPolicy >, MessageMapControl< EventHandlerClass, SmartWin::WidgetButton< EventHandlerClass, MessageMapPolicy >, MessageMapPolicy >, MessageMapControl< EventHandlerClass, SmartWin::WidgetMenuExtended< EventHandlerClass, MessageMapPolicy >, MessageMapPolicy >, WidgetTextBox< Parent, MessageMapPolicy >, WidgetTextBox< EventHandlerClass, MessageMapPolicy, SmartWin::RichTextBox< EventHandlerClass, MessageMapPolicy > >, WidgetTextBox< EventHandlerClass, MessageMapPolicy >, WidgetWindowBase< EventHandlerClass, SmartWin::MessageMapPolicyModalDialogWidget >, WidgetWindowBase< EventHandlerClass, SmartWin::MessageMapPolicyDialogWidget >, and WidgetWindowBase< EventHandlerClass, unUsed >.
void subclass | ( | unsigned | id | ) | [virtual] |
Subclasses the dialog item with the given dialog item id.
Subclasses a dialog item, the id is the dialog item id from the resource editor.
Should normally not be called directly but rather called from e.g. one of the creational functions found in the WidgetFactory class.
void updateWidget | ( | ) |
Repaints the whole window.
Invalidate the window and repaints it.