OWLNext    7.0
Borland's Object Windows Library for the modern age
Loading...
Searching...
No Matches
owl::TControlEnabler Class Reference

A TCommandEnabler for child controls in a dialog. More...

#include <owl/dialog.h>

Inheritance diagram for owl::TControlEnabler:
owl::TCommandEnabler

Public Member Functions

 TControlEnabler (uint id, HWND hWndReceiver=0)
 Constructor. Initializes the base class.
 
void Enable (bool enable=true)
 Enables/disables the control.
 
void SetText (LPCTSTR text)
 Set the text of the control.
 
void SetCheck (int check)
 Use with only buttons!
 
virtual void SetText (LPCTSTR text)=0
 Changes the text associated with a command sender; for example, text associated with a menu item or text on a button.
 
void SetText (const tstring &s)
 
- Public Member Functions inherited from owl::TCommandEnabler
 TCommandEnabler (uint id, HWND hWndReceiver=0)
 Constructs the TCommandEnabler object with the specified command ID.
 
uint GetId () const
 Retrieves the id of the command.
 
void SetText (const tstring &s)
 
void SetCheck (bool isChecked)
 Overload; allows you to pass a bool safely.
 
bool SendsCommand () const
 Returns true if this command enabler sends a command message.
 
bool GetHandled ()
 Return true if the command enabler has been handled.
 
bool IsReceiver (HWND hReceiver)
 Returns true if receiver is the same as the message responder originally set up in the constructor.
 
HWND GetReceiver () const
 Returns the handle of the window that this enabler was destined for.
 
void SetReceiver (HWND hReceiver)
 Sets the receiver for the enabler.
 

Additional Inherited Members

- Public Types inherited from owl::TCommandEnabler
enum  TCommandState { Unchecked , Checked , Indeterminate }
 Enumeration describing the 3-states or availability of a command. More...
 
- Protected Types inherited from owl::TCommandEnabler
enum  TCommandStatus { WasHandled = 1 , NonSender = 2 }
 Enumeration describing whether the associated command has been enabled or disabled, and whether the command generates WM_COMMAND messages. More...
 
- Protected Member Functions inherited from owl::TCommandEnabler
void SetHandled ()
 Marks that the enabler has been handled.
 
- Protected Attributes inherited from owl::TCommandEnabler
uint Flags
 TCommandStatus flags Is TCommandStatus::WasHandled if the command enabler has been handled.
 
 DECLARE_CASTABLE
 

Detailed Description

A TCommandEnabler for child controls in a dialog.

Definition at line 60 of file dialog.h.

Constructor & Destructor Documentation

◆ TControlEnabler()

owl::TControlEnabler::TControlEnabler ( uint id,
HWND hWndReceiver = 0 )

Constructor. Initializes the base class.

Definition at line 950 of file dialog.cpp.

Member Function Documentation

◆ Enable()

void owl::TControlEnabler::Enable ( bool enable = true)
virtual

Enables/disables the control.

Reimplemented from owl::TCommandEnabler.

Definition at line 960 of file dialog.cpp.

References owl::TCommandEnabler::Enable(), owl::TCommandEnabler::GetReceiver(), and owl::ToBool().

◆ SetCheck()

void owl::TControlEnabler::SetCheck ( int check)
virtual

Use with only buttons!

Implements owl::TCommandEnabler.

Definition at line 983 of file dialog.cpp.

References owl::TCommandEnabler::GetReceiver().

◆ SetText() [1/3]

void owl::TCommandEnabler::SetText ( const tstring & s)
inline

Definition at line 220 of file window.h.

◆ SetText() [2/3]

void owl::TControlEnabler::SetText ( LPCTSTR text)
virtual

Set the text of the control.

Implements owl::TCommandEnabler.

Definition at line 971 of file dialog.cpp.

References _tcscmp, owl::TCommandEnabler::GetReceiver(), and MAX_PATH.

◆ SetText() [3/3]

virtual void owl::TCommandEnabler::SetText ( LPCTSTR text)
virtual

Changes the text associated with a command sender; for example, text associated with a menu item or text on a button.

Implements owl::TCommandEnabler.


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