17#if !defined(OWL_CHECKLST_H)
21#if defined(BI_HAS_PRAGMA_ONCE)
56 bool IsEnabled()
const;
57 uint GetState()
const;
58 bool GetThreeStates()
const;
63 void SetIndeterminate();
64 void SetThreeStates(
bool);
130 void ClearList()
override;
141 void SetupWindow()
override;
175 void Clear(
bool del =
true);
177 void Select(
int index);
178 void SelectString(
const tstring& str);
179 int GetSelCount()
const;
180 void ResetSelections();
185 bool IsEnabled(
int index)
const;
186 uint GetState(
int index)
const;
187 bool GetThreeStates(
int index)
const;
189 void Toggle(
int index);
190 void Check(
int index);
191 void Uncheck(
int index);
192 void SetIndeterminate(
int index);
193 void SetThreeStates(
int index,
bool enable =
true);
194 void Enable(
int index);
195 void Disable(
int index);
224 int GetAverageCharWidths();
307 HasThreeStates(
false),
318 HasThreeStates(item.HasThreeStates),
319 Enabled(item.Enabled),
320 UserData(item.UserData)
341 return !(*
this ==
d);
347 return Text <
d.Text;
362 return Text >
d.Text;
407 return HasThreeStates;
458 PRECONDITION(index <
static_cast<int>(Items.size()));
return Items[index];
469 return Items[index]->IsChecked();
475 return Items[index]->IsUnchecked();
481 return Items[index]->IsIndeterminate();
487 return Items[index]->IsEnabled();
493 return Items[index]->GetState();
499 return Items[index]->GetThreeStates();
505 Items[index]->Toggle();
511 Items[index]->Check();
517 Items[index]->Uncheck();
523 Items[index]->SetIndeterminate();
529 Items[index]->SetThreeStates(
enable);
535 Items[index]->Enable();
541 Items[index]->Disable();
546 return Items.Add(item);
Definition of class TCheckBox.
#define PRECONDITION(condition)
TCheckListArray(int upper, int lower=0, int delta=0)
uint GetState(int index) const
bool IsChecked(int index) const
bool IsEnabled(int index) const
int AddItem(TCheckListItem *item)
void SetThreeStates(int index, bool enable=true)
void SetIndeterminate(int index)
bool IsIndeterminate(int index) const
TCheckListItem * GetItem(int index)
TIntArray & GetSelIndices()
bool IsUnchecked(int index) const
bool GetThreeStates(int index) const
TCheckList is an owner-drawn list box to select multiple items.
virtual uint Transfer(TCheckListData &data, TTransferDirection direction)
Safe overload.
virtual void PaintText(TDC &, const TRect &, const tstring &)
Each item displayed and manipulated by TCheckList.
bool IsEnabled() const
Returns true if the item is enabled.
void Disable()
Disables the item.
bool IsChecked() const
Returns true if the item has been checked.
bool operator<(const TCheckListItem &d) const
void Enable()
Enables the item.
bool operator!=(const TCheckListItem &d) const
TCheckListItem()
Initializes the state of TCheckListItem.
bool IsUnchecked() const
Returns true if the item has been unchecked.
bool operator>(const TCheckListItem &d) const
void SetData(UINT_PTR data)
Sets the user-defined data for this item.
uint GetState() const
Returns the button state (BF_CHECKED, BF_UNCHECKED or BF_GRAYED).
UINT_PTR GetData()
Returns the user-defined data for this item.
bool GetThreeStates() const
Returns true if the item has tree states.
void SetText(const tstring &text)
Copies the text string.
bool IsIndeterminate() const
Returns true if the item is in the indeterminate state.
TDC is the root class for GDI DC wrappers.
int DrawText(const tstring &str, int count, const TRect &, uint16 format=0)
Overload for const TRect& For obvious reasons, this overload does not support the DT_CALCRECT format ...
An interface object that represents a corresponding list box element.
ObjectWindows dynamic-link libraries (DLLs) construct an instance of TModule, which acts as an object...
TPoint is a support class, derived from tagPOINT.
array of pointers of simple types
Iterator for Pointer Container.
TRect is a mathematical class derived from tagRect.
Represents an owner-drawn list box that can select multiple items with tabs.
TTabCheckList(TWindow *parent, int id, int x, int y, int w, int h, TCheckListItem *items=0, int numItems=0, TModule *module=0)
Creates a tabbed checklist.
TWindow, derived from TEventHandler and TStreamableBase, provides window-specific behavior and encaps...
bool ModifyStyle(uint32 offBits, uint32 onBits, uint swpFlags=0)
Modifies the style bits of the window.
#define DECLARE_RESPONSE_TABLE(cls)
TCheckListArray::Iterator TCheckListArrayIter
TTransferDirection
The TTransferDirection enum describes the constants that the transfer function uses to determine how ...
Definition of class TListBox and TlistBoxData.
Object Windows Library (OWLNext Core)
int SortCheckList(const void *a, const void *b)
@ BF_UNCHECKED
Item is unchecked.
@ BF_GRAYED
Item is grayed.
@ BF_CHECKED
Item is checked.
bool IsChecked(HWND ctrl)
Returns true if the given control has BST_CHECKED state.
const int CheckList_BoxWidth
bool IsIndeterminate(HWND ctrl)
Returns true if the given control has BST_INDETERMINATE state.
bool IsUnchecked(HWND ctrl)
Returns true if the given control has BST_UNCHECKED state.
Definition of container classes used and made available by OWL.