Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members

W32DLib::Control Class Reference

The base Control class. More...

#include <w32dlib/control.h>

Inheritance diagram for W32DLib::Control:

W32DLib::Window W32DLib::AutoCheck W32DLib::Button W32DLib::ComboBox W32DLib::RadioButton W32DLib::StaticText W32DLib::Text List of all members.

Public Member Functions

 Control (Dialog *parent, int resource_id, DataX *datax)
 Constructor.
virtual ~Control ()
 Destructor.
int ResourceID ()
 Returns the Resource ID for the control.
BOOL ProcessMessage (UINT msg, WPARAM wp, LPARAM lp)
 Processes a windows event.
virtual void DoDataExchange (bool set)
 Provides a base DoDataExchange.

Protected Member Functions

void AddCallback (UINT msg, UINT notification, Window *owner, W32DLibCallback callback)
 Add a callback for the control.

Protected Attributes

Dialogm_parent
 Filled in by the constructor with the parent dialog.
int m_resid
 Filled in by the constructor with the resource ID.
DataXm_data
 Filled in by the constructor with the DataX object.

Detailed Description

The base Control class.


Constructor & Destructor Documentation

W32DLib::Control::Control Dialog parent,
int  resource_id,
DataX datax
 

Constructor.

When a control is constructed it calls Dialog::AddControl to add itself to the dialog.

Parameters:
parent The Dialog the control belongs to.
resource_id The ID of the control in the resource file.
datax The DataX to use. NULL means don't use data exchange.

virtual W32DLib::Control::~Control  )  [virtual]
 

Destructor.


Member Function Documentation

void W32DLib::Control::AddCallback UINT  msg,
UINT  notification,
Window owner,
W32DLibCallback  callback
[protected]
 

Add a callback for the control.

Note that multiple callbacks can be lodged for the same msg and notification. If this is the case then the result returned through ProcessMessage is the logical OR of all the returns.

When multiple callbacks match they are called in the order they were registered.

Parameters:
msg The Windows event message to respond to.
notification The top word of the WPARAM will be checked against this. If zero, then ignored.
owner The class (generally a Dialog derived one) in which the callback resides. The class must be derived from Window.
callback The callback.

virtual void W32DLib::Control::DoDataExchange bool  set  )  [virtual]
 

Provides a base DoDataExchange.

This interface is called by the Dialog to say that data exchange should take place.

This base version simply honours DataX eString objects and calls Window::SetText or Window::GetText accordingly.

Parameters:
set If true the set the Control from the DataX object. If false then set the DataX object from the Control.

Reimplemented in W32DLib::AutoCheck, W32DLib::ComboBox, and W32DLib::RadioButton.

BOOL W32DLib::Control::ProcessMessage UINT  msg,
WPARAM  wp,
LPARAM  lp
 

Processes a windows event.

This is called by the Dialog when a message is recieved that refers to this control's resource ID.

Parameters:
msg The Windows event
wp The Windows event parameters
lp The Windows event parameters
Returns:
TRUE if the message was processed.

int W32DLib::Control::ResourceID  ) 
 

Returns the Resource ID for the control.


Member Data Documentation

DataX* W32DLib::Control::m_data [protected]
 

Filled in by the constructor with the DataX object.

Dialog* W32DLib::Control::m_parent [protected]
 

Filled in by the constructor with the parent dialog.

int W32DLib::Control::m_resid [protected]
 

Filled in by the constructor with the resource ID.


The documentation for this class was generated from the following file:
Generated on Fri May 6 01:22:33 2005 for W32DLib by  doxygen 1.4.1