W32DLib
W32DLib::AutoCheck Class Reference

The AutoCheck class. More...

#include <w32dlib/autocheck.h>

Inheritance diagram for W32DLib::AutoCheck:
W32DLib::Control W32DLib::Window

Public Types

enum  EState { eError =0, eChecked =BST_CHECKED, eUnchecked =BST_UNCHECKED, eIndeterminate =BST_INDETERMINATE }
 Describes the checkstate. More...
 

Public Member Functions

 AutoCheck (Dialog *parent, int resource_id, DataX *datax)
 Constructor.
 
virtual ~AutoCheck ()
 Destructor.
 
void OnPress (Window *owner, W32DLibCallback callback)
 Sets a callback for a button press.
 
void SetFullState (EState state)
 Sets the tickstate.
 
EState GetFullState ()
 Gets the tickstate.
 
void SetState (bool state)
 Sets the tickstate.
 
bool GetState ()
 Gets the tickstate.
 
virtual void DoDataExchange (bool set)
 Performs data exchange.
 
- Public Member Functions inherited from W32DLib::Control
 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.
 
- Public Member Functions inherited from W32DLib::Window
 Window ()
 Constructor.
 
virtual ~Window ()
 Destructor.
 
bool HasMutex ()
 Whether the Window() constructor could create a mutex.
 
HWND GetHWND ()
 Returns the HWND for the window.
 
HMENU GetHMENU ()
 Returns the HMENU associated with this window.
 
bool SetHMENU (HMENU menu)
 Sets the HMENU associated with this window.
 
bool Move (int x, int y, int width, int height, bool repaint=true)
 Sets a Window's position and size.
 
bool MoveBase (Window *w, int x, int y, int width, int height, bool repaint=true)
 Sets a Window's position and size using Dialog base units.
 
LRESULT SendMsg (UINT msg, WPARAM wp, LPARAM lp)
 Send a message to the window.
 
void SetText (const TCHAR *text)
 Sets the window text.
 
void SetText (const W32String &text)
 Sets the window text.
 
W32String GetText ()
 Gets the window text.
 
void Enable (bool enable)
 Enables or disables the window.
 

Additional Inherited Members

- Protected Member Functions inherited from W32DLib::Control
void AddCallback (UINT msg, UINT notification, Window *owner, W32DLibCallback callback)
 Add a callback for the control.
 
- Static Protected Member Functions inherited from W32DLib::Window
static BOOL CALLBACK WindowProc (HWND wnd, UINT msg, WPARAM wp, LPARAM lp)
 The base WindProc.
 
- Protected Attributes inherited from W32DLib::Control
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 AutoCheck class.

Member Enumeration Documentation

Describes the checkstate.

Enumerator
eError 

Error getting state.

eChecked 

Checked.

eUnchecked 

Unchecked.

eIndeterminate 

Indeterminate.

Constructor & Destructor Documentation

W32DLib::AutoCheck::AutoCheck ( Dialog parent,
int  resource_id,
DataX datax 
)

Constructor.

Parameters
parentThe dialog the control belongs to.
resource_idThe ID of the control in the resource file.
dataxThe DataX to use. NULL means don't use data exchange.
virtual W32DLib::AutoCheck::~AutoCheck ( )
virtual

Destructor.

Member Function Documentation

virtual void W32DLib::AutoCheck::DoDataExchange ( bool  set)
virtual

Performs data exchange.

Support types:

eString – see Control::DoDataExchange()

eInt – same as GetFullState() / SetFullState()

eBool – same as GetState() / SetState()

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

Reimplemented from W32DLib::Control.

EState W32DLib::AutoCheck::GetFullState ( )

Gets the tickstate.

This member allows the indeterminate state to be tested.

Returns
The tick state
See Also
SetState()
bool W32DLib::AutoCheck::GetState ( )

Gets the tickstate.

Returns
The tick state
See Also
SetState()
void W32DLib::AutoCheck::OnPress ( Window owner,
W32DLibCallback  callback 
)

Sets a callback for a button press.

Parameters
ownerThe class the callback resides in.
callbackThe callback.
void W32DLib::AutoCheck::SetFullState ( EState  state)

Sets the tickstate.

This member allows the indeterminate checks to be set.

Parameters
stateThe tick state
See Also
GetState()
void W32DLib::AutoCheck::SetState ( bool  state)

Sets the tickstate.

Parameters
stateThe tick state
See Also
GetState()

The documentation for this class was generated from the following file: