Rhino C++ API  8.13
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
CRhinoUiTabbedSheetCtrlItem Class Reference

#include <RhinoSdkUiTabbedSheetCtrl.h>

Public Types

enum  item_state { normal_state = 0x0000, pressed_state = 0x0001, highlighted_state = 0x0002 }
 

Public Member Functions

 CRhinoUiTabbedSheetCtrlItem (const CRhinoUiTabbedSheetCtrlItem &src)
 
 CRhinoUiTabbedSheetCtrlItem (const wchar_t *lpsName=NULL, CWnd *pWndItem=NULL)
 
 ~CRhinoUiTabbedSheetCtrlItem ()
 
DWORD_PTR GetData () const
 
void * GetDataPtr () const
 
bool IsHidden () const
 
bool IsVisible () const
 
DWORD ItemState () const
 
CWnd * ItemWindow () const
 
const wchar_t * Name () const
 
const CRhinoUiTabbedSheetCtrlItemoperator= (const CRhinoUiTabbedSheetCtrlItem &src)
 
void SetData (DWORD_PTR dwItemData)
 
void SetDataPtr (void *pData)
 
void SetItemWindow (CWnd *pWnd)
 
void SetName (const wchar_t *lps)
 

Protected Member Functions

bool DrawItemText (CDC &dc, int orientation)
 
void DrawLabel (CDC &dc, bool bCurrent, int orientation, CRhinoUiTabbedSheetCtrlGDI &gdi)
 
void MovePage (CRect r, CWnd *pWndZOrderAfter) const
 
void SetLabelRect (const CRect &r, int orientate)
 
bool ShowItemWindow (bool bShow=true, CWnd *pWndZOrderAfter=NULL, LPRECT lpR=NULL) const
 

Protected Attributes

bool m_bShow
 If true then tab is displayed otherwise it is not. More...
 
DWORD_PTR m_dwItemData
 Application specified data associated with this item. More...
 
DWORD m_dwItemState
 Current item state. More...
 
ON_SimpleArray< CPoint > m_label_pts
 Points used to create m_rgnLable. More...
 
void * m_pData
 Application specified data associated with this item. More...
 
CWnd * m_pWndItem
 Window to show when tab becomes active. More...
 
CRgn m_rgnLabel
 Fill and hit-test region for tab control item. More...
 
CRect m_rLabel
 Bounding rectangle for tab control label. More...
 
ON_wString m_wName
 Tab label. More...
 

Friends

class CRhinoUiTabbedSheetCtrl
 

Detailed Description

CRhinoUiTabbedSheetCtrlItem

Member Enumeration Documentation

◆ item_state

Enumerator
normal_state 

Tab is in normal state, not depressed or highlighted.

pressed_state 

Tab button is depressed.

highlighted_state 

Tab button is highlighted.

Constructor & Destructor Documentation

◆ CRhinoUiTabbedSheetCtrlItem() [1/2]

CRhinoUiTabbedSheetCtrlItem::CRhinoUiTabbedSheetCtrlItem ( const wchar_t *  lpsName = NULL,
CWnd *  pWndItem = NULL 
)

Description: Constructor

Parameters: lpsName [in] Text displayed on the tab when visible. pWndItem [in] Window associated with this tab. When the tab becomes active this window will be shown otherwise it will be hidden.

◆ ~CRhinoUiTabbedSheetCtrlItem()

CRhinoUiTabbedSheetCtrlItem::~CRhinoUiTabbedSheetCtrlItem ( )

Description: Destructor

◆ CRhinoUiTabbedSheetCtrlItem() [2/2]

CRhinoUiTabbedSheetCtrlItem::CRhinoUiTabbedSheetCtrlItem ( const CRhinoUiTabbedSheetCtrlItem src)

Description: Copy constructor

Member Function Documentation

◆ DrawItemText()

bool CRhinoUiTabbedSheetCtrlItem::DrawItemText ( CDC &  dc,
int  orientation 
)
protected

Description: Call this method to draw text label for this tab control item.

Parameters: dc [in] Device context to draw to orientation [in] Current display position for tabs

Returns: Returns true if there was text to be drawn otherwise false

◆ DrawLabel()

void CRhinoUiTabbedSheetCtrlItem::DrawLabel ( CDC &  dc,
bool  bCurrent,
int  orientation,
CRhinoUiTabbedSheetCtrlGDI gdi 
)
protected

Description: Call this method to draw this tab control item using the specified device context.

Parameters: dc [in] Device context to draw to bCurrent [in] Should be true if this is the active tab control item orientation [in] Current tab display location gdi [in] Draw helper, see CRhinoUiTabbedSheetCtrlGDI for details

See Also: class CRhinoUiTabbedSheetCtrlGDI

◆ GetData()

DWORD_PTR CRhinoUiTabbedSheetCtrlItem::GetData ( ) const

Description: This method retrieves the application-specific value associated with this tab control item. This value is the m_dwItemData member of this class.

Returns: A application-specific value associated with this tab control item.

See Also: CRhinoUiTabbedSheetCtrlItem::SetData() CRhinoUiTabbedSheetCtrlItem::GetDataPtr() CRhinoUiTabbedSheetCtrlItem::SetDataPtr()

◆ GetDataPtr()

void* CRhinoUiTabbedSheetCtrlItem::GetDataPtr ( ) const

Description: This method retrieves the application-specific value associated with this tab control item. This value is the m_pData member of this class.

Returns: A application-specific pointer associated with this tab control item or NULL if none.

See Also: CRhinoUiTabbedSheetCtrlItem::SetData() CRhinoUiTabbedSheetCtrlItem::GetData() CRhinoUiTabbedSheetCtrlItem::SetDataPtr()

◆ IsHidden()

bool CRhinoUiTabbedSheetCtrlItem::IsHidden ( ) const

Description: Call this method to find out if the tab will be hidden.

Returns: Returns true if the tab will be hidden or false if it will be visible.

See Also: CRhinoUiTabbedSheetCtrlItem::IsVisible() CRhinoUiTabbedSheetCtrl::HideItem()

◆ IsVisible()

bool CRhinoUiTabbedSheetCtrlItem::IsVisible ( ) const

Description: Call this method to find out if the tab will be displayed.

Returns: Returns true if the tab will be displayed or false if it will not.

See Also: CRhinoUiTabbedSheetCtrlItem::IsHidden() CRhinoUiTabbedSheetCtrl::HideItem()

◆ ItemState()

DWORD CRhinoUiTabbedSheetCtrlItem::ItemState ( ) const

Description: Retrieves the state of this tab control item.

Returns: Returns item_state enum describing the current state of this tab control item. Can be one of the following: normal_state Tab is in normal state, not depressed or highlighted. pressed_state The tab control item is selected. highlighted_state The tab control item is highlighted.

◆ ItemWindow()

CWnd* CRhinoUiTabbedSheetCtrlItem::ItemWindow ( ) const

Description: Call this method to get the window which will be displayed when this tab is current.

Returns: Window associated with this tab.

See Also: CRhinoUiTabbedSheetCtrlItem::SetIemWindow()

◆ MovePage()

void CRhinoUiTabbedSheetCtrlItem::MovePage ( CRect  r,
CWnd *  pWndZOrderAfter 
) const
protected

Description: Call this method to psition the ItemWindow() associated with this tab control item.

Parameters: r [in] New position for window pWndZOrderAfter [in] Window in ZOrder to position after, ignored if NULL

◆ Name()

const wchar_t* CRhinoUiTabbedSheetCtrlItem::Name ( ) const

Description: Call this method to get the tab text.

Returns: Returns the text associated with this named tab or NULL if there is no name.

See Also: CRhinoUiTabbedSheetCtrlItem::SetName()

◆ operator=()

const CRhinoUiTabbedSheetCtrlItem& CRhinoUiTabbedSheetCtrlItem::operator= ( const CRhinoUiTabbedSheetCtrlItem src)

Description: Operator equal

◆ SetData()

void CRhinoUiTabbedSheetCtrlItem::SetData ( DWORD_PTR  dwItemData)

Description: This method sets the application-specific value associated with this tab control item. This value is the m_dwItemData member of this class.

Parameters: dwItemData [in] Specifies a application-specific value to be associated with this item.

See Also: CRhinoUiTabbedSheetCtrlItem::GetData() CRhinoUiTabbedSheetCtrlItem::GetDataPtr() CRhinoUiTabbedSheetCtrlItem::SetDataPtr()

◆ SetDataPtr()

void CRhinoUiTabbedSheetCtrlItem::SetDataPtr ( void *  pData)

Description: This method sets the application-specific value associated with this tab control item. This value is the m_pData member of this class.

Parameters: pData [in] Specifies a application-specific value to be associated with this item.

See Also: CRhinoUiTabbedSheetCtrlItem::GetData() CRhinoUiTabbedSheetCtrlItem::SetData() CRhinoUiTabbedSheetCtrlItem::GetDataPtr()

◆ SetItemWindow()

void CRhinoUiTabbedSheetCtrlItem::SetItemWindow ( CWnd *  pWnd)

Description: Call this method to set the window which will be displayed when this tab is current.

Parameters: pWnd [in] Window to display.

See Also: CRhinoUiTabbedSheetCtrlItem::IemWindow()

◆ SetLabelRect()

void CRhinoUiTabbedSheetCtrlItem::SetLabelRect ( const CRect &  r,
int  orientate 
)
protected

Description: Call this method to initialize the m_rLabel, m_rgnLabel and m_label_pts members for this tab control item.

Parameters: r [in] m_rLabel Will be set to this. Bounding rectangle for the tab label. orientate [in] Current tab display location. This is used when calculating m_rgnLabel and m_label_pts

◆ SetName()

void CRhinoUiTabbedSheetCtrlItem::SetName ( const wchar_t *  lps)

Description: Call this method to set the text which will be displayed on the tab.

Parameters: lps [in] Text to display on tab

See Also: CRhinoUiTabbedSheetCtrlItem::Name()

◆ ShowItemWindow()

bool CRhinoUiTabbedSheetCtrlItem::ShowItemWindow ( bool  bShow = true,
CWnd *  pWndZOrderAfter = NULL,
LPRECT  lpR = NULL 
) const
protected

Description: Call this method to show or hide the ItemWindow() associated with this tab control item.

Parameters: bShow [in] If true then the window will be shown otherwise; it will be hidden. pWndZOrderAfter [in] Window in ZOrder to position after, ignored if NULL lpR [in] If this points to a RECT structure then the window is moved here.

Returns: Returns true if successful otherwise false.

Friends And Related Function Documentation

◆ CRhinoUiTabbedSheetCtrl

friend class CRhinoUiTabbedSheetCtrl
friend

Member Data Documentation

◆ m_bShow

bool CRhinoUiTabbedSheetCtrlItem::m_bShow
protected

If true then tab is displayed otherwise it is not.

◆ m_dwItemData

DWORD_PTR CRhinoUiTabbedSheetCtrlItem::m_dwItemData
protected

Application specified data associated with this item.

◆ m_dwItemState

DWORD CRhinoUiTabbedSheetCtrlItem::m_dwItemState
protected

Current item state.

◆ m_label_pts

ON_SimpleArray<CPoint> CRhinoUiTabbedSheetCtrlItem::m_label_pts
protected

Points used to create m_rgnLable.

◆ m_pData

void* CRhinoUiTabbedSheetCtrlItem::m_pData
protected

Application specified data associated with this item.

◆ m_pWndItem

CWnd* CRhinoUiTabbedSheetCtrlItem::m_pWndItem
protected

Window to show when tab becomes active.

◆ m_rgnLabel

CRgn CRhinoUiTabbedSheetCtrlItem::m_rgnLabel
protected

Fill and hit-test region for tab control item.

◆ m_rLabel

CRect CRhinoUiTabbedSheetCtrlItem::m_rLabel
protected

Bounding rectangle for tab control label.

◆ m_wName

ON_wString CRhinoUiTabbedSheetCtrlItem::m_wName
protected

Tab label.