WinapiExtension
 All Classes Files Functions Variables Typedefs Pages
Public Member Functions | List of all members
TabCtrl Class Reference

Wrapper for tab controls. More...

#include <control.h>

Inheritance diagram for TabCtrl:
Control IWindow

Public Member Functions

 TabCtrl (HWND hwnd=NULL)
 
int AppendItem (const tstring &text)
 
Rect CalculateDisplayArea (const RECT &windowRect)
 
Rect CalculateWindowRect (const RECT &displayArea)
 
Rect CurrentDisplayArea ()
 
void DeleteAllItems ()
 
void DeleteItem (int index)
 
void DeselectAll (BOOL excludeFocus=TRUE)
 
int GetCurFocus ()
 
int GetCurSel ()
 
void GetItem (int index, TCITEM &item)
 
int GetItemCount ()
 
Rect GetItemRect (int index)
 
int GetRowCount ()
 
int InsertItem (int index, const TCITEM &item)
 
int InsertItem (int index, const tstring &text)
 
void SetCurFocus (int index)
 
int SetCurSel (int index)
 
void SetItem (int index, TCITEM &item)
 
void SetItem (int index, const tstring &text)
 
void SetItemSize (int width, int height)
 
void SetMinTabWidth (int width)
 
void SetPadding (int width, int height)
 
- Public Member Functions inherited from Control
 Control (HWND hwnd=NULL)
 
HWND _InternalGetHandle ()
 
 operator HWND ()
 
Controloperator= (HWND hwnd)
 
- Public Member Functions inherited from IWindow
Rect ClientRect ()
 
void Destroy ()
 
void DragAcceptFiles (BOOL accept=TRUE)
 
void Enable (BOOL enable)
 
DWORD GetExStyle ()
 
HFONT GetFont ()
 
HICON GetIcon (BOOL bigIcon)
 
DWORD GetID ()
 
DWORD GetStyle ()
 
tstring GetText ()
 
BOOL Invalidate (const RECT *rect=NULL, BOOL eraseBkgnd=TRUE)
 
BOOL IsEnabled ()
 
BOOL IsVisible ()
 
void KillTimer (UINT_PTR timerID)
 
void ModifyStyle (DWORD add, DWORD remove)
 
void Move (int x, int y, BOOL redraw=TRUE)
 
void Move (const POINT &p, BOOL redraw=TRUE)
 
void Move (int x, int y, int width, int height, BOOL redraw=TRUE)
 
void Move (const POINT &p, const SIZE &s, BOOL redraw=TRUE)
 
void Move (const RECT &r, BOOL redraw=TRUE)
 
HWND ParentHandle ()
 
Rect RectOnParent ()
 
BOOL Redraw (const RECT *rect=NULL, HRGN region=NULL, UINT flags=RDW_INVALIDATE|RDW_UPDATENOW|RDW_ERASE)
 
HWND SetFocus ()
 
void SetFont (HFONT font, BOOL redraw=TRUE)
 
HICON SetIcon (HICON icon, BOOL bigIcon)
 
void SetRedraw (BOOL allowRedraw)
 
void SetText (const tstring &text)
 
UINT_PTR SetTimer (UINT_PTR timerID, UINT interval, TIMERPROC proc=NULL)
 
BOOL Show (int cmdShow)
 
Rect WindowRect ()
 

Additional Inherited Members

- Public Attributes inherited from Control
HWND handle
 

Detailed Description

Wrapper for tab controls.

Constructor & Destructor Documentation

TabCtrl::TabCtrl ( HWND  hwnd = NULL)
inline

Member Function Documentation

int TabCtrl::AppendItem ( const tstring text)
inline
Rect TabCtrl::CalculateDisplayArea ( const RECT &  windowRect)
inline
Returns
The maximum display area for the specified window rect.
Rect TabCtrl::CalculateWindowRect ( const RECT &  displayArea)
inline
Returns
The minimal window rect for the specified display area.
Rect TabCtrl::CurrentDisplayArea ( )
inline
Returns
The display area inside th tab control, in parent coordinates. This means you can directly use this result to position other controls inside the tab control.
void TabCtrl::DeleteAllItems ( )
inline
void TabCtrl::DeleteItem ( int  index)
inline
void TabCtrl::DeselectAll ( BOOL  excludeFocus = TRUE)
inline
int TabCtrl::GetCurFocus ( )
inline

In button mode (TCS_BUTTONS), the focused button may be different from the selected button.

int TabCtrl::GetCurSel ( )
inline
void TabCtrl::GetItem ( int  index,
TCITEM &  item 
)
inline
int TabCtrl::GetItemCount ( )
inline
Rect TabCtrl::GetItemRect ( int  index)
inline
Returns
Coordinates of the specified tab relative to the tab control.
int TabCtrl::GetRowCount ( )
inline

Only works with TCS_MULTILINE.

int TabCtrl::InsertItem ( int  index,
const TCITEM &  item 
)
inline
int TabCtrl::InsertItem ( int  index,
const tstring text 
)
inline
void TabCtrl::SetCurFocus ( int  index)
inline
See Also
GetCurFocus()
int TabCtrl::SetCurSel ( int  index)
inline
void TabCtrl::SetItem ( int  index,
TCITEM &  item 
)
inline
void TabCtrl::SetItem ( int  index,
const tstring text 
)
inline
void TabCtrl::SetItemSize ( int  width,
int  height 
)
inline

Set a fixed size for all tabs.

void TabCtrl::SetMinTabWidth ( int  width)
inline
void TabCtrl::SetPadding ( int  width,
int  height 
)
inline

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