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

Each item displayed and manipulated by TCheckList. More...

#include <owl/checklst.h>

Public Member Functions

 TCheckListItem ()
 Initializes the state of TCheckListItem.
 
 TCheckListItem (const tstring &, uint state=BF_UNCHECKED, bool enabled=true)
 Constructs the object with a text string and a starting state.
 
 TCheckListItem (const TCheckListItem &item)
 
TCheckListItemoperator= (const TCheckListItem &d)
 
bool IsChecked () const
 Returns true if the item has been checked.
 
bool IsUnchecked () const
 Returns true if the item has been unchecked.
 
bool IsIndeterminate () const
 Returns true if the item is in the indeterminate state.
 
bool IsEnabled () const
 Returns true if the item is enabled.
 
uint GetState () const
 Returns the button state (BF_CHECKED, BF_UNCHECKED or BF_GRAYED).
 
bool GetThreeStates () const
 Returns true if the item has tree states.
 
void Toggle ()
 Toggles the state of the item.
 
void Check ()
 Checks the item.
 
void Uncheck ()
 Unchecks the item.
 
void SetIndeterminate ()
 Makes the item indeterminate.
 
void SetThreeStates (bool)
 Sets the three-state property.
 
void Enable ()
 Enables the item.
 
void Disable ()
 Disables the item.
 
void SetText (const tstring &text)
 Copies the text string.
 
const tstringGetText ()
 Returns the text of the item.
 
void SetData (UINT_PTR data)
 Sets the user-defined data for this item.
 
UINT_PTR GetData ()
 Returns the user-defined data for this item.
 
bool operator== (const TCheckListItem &d) const
 
bool operator!= (const TCheckListItem &d) const
 
bool operator< (const TCheckListItem &d) const
 
bool operator> (const TCheckListItem &d) const
 

Friends

class TCheckList
 
int SortCheckList (const void *a, const void *b)
 

Detailed Description

Each item displayed and manipulated by TCheckList.

Definition at line 42 of file checklst.h.

Constructor & Destructor Documentation

◆ TCheckListItem() [1/3]

owl::TCheckListItem::TCheckListItem ( )
inline

Initializes the state of TCheckListItem.

Definition at line 304 of file checklst.h.

◆ TCheckListItem() [2/3]

owl::TCheckListItem::TCheckListItem ( const tstring & text,
uint state = BF_UNCHECKED,
bool enabled = true )
inline

Constructs the object with a text string and a starting state.

Definition at line 328 of file checklst.h.

◆ TCheckListItem() [3/3]

owl::TCheckListItem::TCheckListItem ( const TCheckListItem & item)
inline

Definition at line 314 of file checklst.h.

Member Function Documentation

◆ Check()

void owl::TCheckListItem::Check ( )

Checks the item.

Definition at line 679 of file checklst.cpp.

References owl::BF_CHECKED, and IsEnabled().

◆ Disable()

void owl::TCheckListItem::Disable ( )
inline

Disables the item.

Definition at line 423 of file checklst.h.

◆ Enable()

void owl::TCheckListItem::Enable ( )
inline

Enables the item.

Definition at line 432 of file checklst.h.

◆ GetData()

UINT_PTR owl::TCheckListItem::GetData ( )
inline

Returns the user-defined data for this item.

Definition at line 448 of file checklst.h.

◆ GetState()

uint owl::TCheckListItem::GetState ( ) const
inline

Returns the button state (BF_CHECKED, BF_UNCHECKED or BF_GRAYED).

Definition at line 396 of file checklst.h.

◆ GetText()

const tstring & owl::TCheckListItem::GetText ( )

Returns the text of the item.

Definition at line 724 of file checklst.cpp.

◆ GetThreeStates()

bool owl::TCheckListItem::GetThreeStates ( ) const
inline

Returns true if the item has tree states.

Definition at line 405 of file checklst.h.

◆ IsChecked()

bool owl::TCheckListItem::IsChecked ( ) const
inline

Returns true if the item has been checked.

Definition at line 369 of file checklst.h.

References owl::BF_CHECKED, and owl::ToBool().

◆ IsEnabled()

bool owl::TCheckListItem::IsEnabled ( ) const
inline

Returns true if the item is enabled.

Definition at line 414 of file checklst.h.

◆ IsIndeterminate()

bool owl::TCheckListItem::IsIndeterminate ( ) const
inline

Returns true if the item is in the indeterminate state.

Definition at line 387 of file checklst.h.

References owl::BF_GRAYED, and owl::ToBool().

◆ IsUnchecked()

bool owl::TCheckListItem::IsUnchecked ( ) const
inline

Returns true if the item has been unchecked.

Definition at line 378 of file checklst.h.

References owl::BF_UNCHECKED, and owl::ToBool().

◆ operator!=()

bool owl::TCheckListItem::operator!= ( const TCheckListItem & d) const
inline

Definition at line 339 of file checklst.h.

◆ operator<()

bool owl::TCheckListItem::operator< ( const TCheckListItem & d) const
inline

Definition at line 344 of file checklst.h.

◆ operator=()

TCheckListItem & owl::TCheckListItem::operator= ( const TCheckListItem & d)

Definition at line 730 of file checklst.cpp.

◆ operator==()

bool owl::TCheckListItem::operator== ( const TCheckListItem & d) const

Definition at line 740 of file checklst.cpp.

◆ operator>()

bool owl::TCheckListItem::operator> ( const TCheckListItem & d) const
inline

Definition at line 360 of file checklst.h.

◆ SetData()

void owl::TCheckListItem::SetData ( UINT_PTR data)
inline

Sets the user-defined data for this item.

Definition at line 440 of file checklst.h.

◆ SetIndeterminate()

void owl::TCheckListItem::SetIndeterminate ( )

Makes the item indeterminate.

Definition at line 699 of file checklst.cpp.

References owl::BF_GRAYED, and IsEnabled().

◆ SetText()

void owl::TCheckListItem::SetText ( const tstring & text)
inline

Copies the text string.

Definition at line 354 of file checklst.h.

◆ SetThreeStates()

void owl::TCheckListItem::SetThreeStates ( bool hasThreeStates)

Sets the three-state property.

Definition at line 711 of file checklst.cpp.

References Check(), IsEnabled(), and IsIndeterminate().

◆ Toggle()

void owl::TCheckListItem::Toggle ( )

Toggles the state of the item.

If the item has three states, the cycle goes from unchecked -> checked -> indeterminate -> back to unchecked. Otherwise the state toggles between unchecked and checked.

Definition at line 655 of file checklst.cpp.

References Check(), IsChecked(), IsEnabled(), IsIndeterminate(), SetIndeterminate(), and Uncheck().

◆ Uncheck()

void owl::TCheckListItem::Uncheck ( )

Unchecks the item.

Definition at line 689 of file checklst.cpp.

References owl::BF_UNCHECKED, and IsEnabled().

Friends And Related Symbol Documentation

◆ SortCheckList

int SortCheckList ( const void * a,
const void * b )
friend

Definition at line 311 of file checklst.cpp.

◆ TCheckList

Definition at line 92 of file checklst.h.


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