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

TTabItem encapsulates the attributes of a single tab within a tab control. More...

#include <owl/tabctrl.h>

Inheritance diagram for owl::TTabItem:

Public Member Functions

 TTabItem (uint mask)
 Constructor for a Tab Item: This constructor is useful when creating a TabItem (TC_ITEM) structure which will be filled with information about an existing tab in a tab control.
 
 TTabItem (const TC_ITEM &tbItem)
 Constructs a 'TTabItem' object from a 'TC_ITEM' structure using the assignment operator.
 
 TTabItem (const TTabControl &ctl, int index, uint mask, int buffLen=0, tchar *buffer=0)
 The item is initialized with the state of an actual tab in a created tab control.
 
 TTabItem (LPCTSTR str, int buffLen=0, TParam2 param=0)
 The tab item's label field is initialized to the specified buffer and extra parameter set to the 'param' parameter.
 
 TTabItem (int imageIndex, TParam2 param)
 The tab item is initialized with the IMAGELIST index and the extra parameter specified.
 
 TTabItem (int imageIndex, LPCTSTR str)
 The tab item is initialized with the IMAGELIST index and label specified.
 
void SetState (uint32 state, uint32 mask)
 
void SetLabel (LPCTSTR str, int len=0)
 
void SetIcon (int imageIndex)
 Sets the index of the image assiciated with the tab represented by this item structure.
 
void SetParam (TParam2 lp)
 Sets the user-defined data associated with the tab represented by this item structure.
 

Detailed Description

TTabItem encapsulates the attributes of a single tab within a tab control.

For example, it holds a weak pointer to the string containing the tab's text. TODO: Store the tab label text, and provide string-aware overloads.

Definition at line 46 of file tabctrl.h.

Constructor & Destructor Documentation

◆ TTabItem() [1/6]

owl::TTabItem::TTabItem ( uint msk)
inline

Constructor for a Tab Item: This constructor is useful when creating a TabItem (TC_ITEM) structure which will be filled with information about an existing tab in a tab control.

For example,

tabCtrl.GetItem(index, item);
TTabItem encapsulates the attributes of a single tab within a tab control.
Definition tabctrl.h:46

Definition at line 197 of file tabctrl.h.

◆ TTabItem() [2/6]

owl::TTabItem::TTabItem ( const TC_ITEM & tbItem)
inline

Constructs a 'TTabItem' object from a 'TC_ITEM' structure using the assignment operator.

Note
Default assignment operator is fine even if we get a shallow copy for 'pszText' since the effective lifetime of a 'TTabItem' is rather short and the underlying control copies/caches the item's label

Definition at line 209 of file tabctrl.h.

◆ TTabItem() [3/6]

owl::TTabItem::TTabItem ( const TTabControl & ctl,
int index,
uint mask,
int buffLen = 0,
tchar * buffer = 0 )

The item is initialized with the state of an actual tab in a created tab control.

Definition at line 45 of file tabctrl.cpp.

References PRECONDITION, and SetLabel().

◆ TTabItem() [4/6]

owl::TTabItem::TTabItem ( LPCTSTR str,
int buffLen = 0,
TParam2 param = 0 )

The tab item's label field is initialized to the specified buffer and extra parameter set to the 'param' parameter.

Definition at line 65 of file tabctrl.cpp.

References SetLabel(), and SetParam().

◆ TTabItem() [5/6]

owl::TTabItem::TTabItem ( int imageIndex,
TParam2 param )

The tab item is initialized with the IMAGELIST index and the extra parameter specified.

Definition at line 78 of file tabctrl.cpp.

References SetIcon(), and SetParam().

◆ TTabItem() [6/6]

owl::TTabItem::TTabItem ( int imageIndex,
LPCTSTR str )

The tab item is initialized with the IMAGELIST index and label specified.

Definition at line 91 of file tabctrl.cpp.

References SetIcon(), and SetLabel().

Member Function Documentation

◆ SetIcon()

void owl::TTabItem::SetIcon ( int imageIndex)
inline

Sets the index of the image assiciated with the tab represented by this item structure.

Definition at line 218 of file tabctrl.h.

◆ SetLabel()

void owl::TTabItem::SetLabel ( LPCTSTR str,
int len = 0 )

Definition at line 102 of file tabctrl.cpp.

References _tcslen, and CONST_CAST.

◆ SetParam()

void owl::TTabItem::SetParam ( TParam2 lp)
inline

Sets the user-defined data associated with the tab represented by this item structure.

Definition at line 228 of file tabctrl.h.

◆ SetState()

void owl::TTabItem::SetState ( uint32 state,
uint32 mask )

Definition at line 111 of file tabctrl.cpp.


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