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

#include <RhinoSdkUiPageDockBarManager.h>

Inheritance diagram for CRhinoUiPageDockBarManager:
ON_SimpleArray< CRhinoUiPageDockBar * >

Public Member Functions

 CRhinoUiPageDockBarManager ()
 
 ~CRhinoUiPageDockBarManager ()
 
CRhinoUiPageDockBarDockBar (int index) const
 
int DockBarCount () const
 
CRhinoUiPageDockBarFindDockBar (const wchar_t *control_bar_name, int language_id=1033)
 
CRhinoUiPageDockBarFindDockBar (UUID uuid) const
 
void GetSortedList (ON_SimpleArray< CRhinoUiPageDockBar * > &sorted_list, bool ignore_not_created=false) const
 
int IndexFromPointer (CRhinoUiPageDockBar *pCB) const
 
CRhinoUiPageDockBaroperator[] (int index) const
 
void Sort (int(*compar)(CRhinoUiPageDockBar *const *, CRhinoUiPageDockBar *const *, void *), int(*cull)(const CRhinoUiPageDockBar *, void *), void *p=0)
 

Protected Member Functions

 CRhinoUiPageDockBarManager (const CRhinoUiPageDockBarManager &)
 Not implemented. More...
 
friend CRhinoUiPageDockBar::~CRhinoUiPageDockBar ()
 
friend CRhinoUiPageDockBar::CRhinoUiPageDockBar ()
 
CRhinoUiPageDockBarManageroperator= (const CRhinoUiPageDockBarManager &)
 
void PageConstructor (CRhinoUiPageDockBar *)
 
void PageDestructor (CRhinoUiPageDockBar *)
 

Protected Attributes

ON_SimpleArray< CRhinoUiPageDockBar * > m_page_list
 

Detailed Description

class CRhinoUiPageDockBarManager


Constructor & Destructor Documentation

◆ CRhinoUiPageDockBarManager() [1/2]

CRhinoUiPageDockBarManager::CRhinoUiPageDockBarManager ( )

◆ ~CRhinoUiPageDockBarManager()

CRhinoUiPageDockBarManager::~CRhinoUiPageDockBarManager ( )

◆ CRhinoUiPageDockBar::~CRhinoUiPageDockBar()

CRhinoUiPageDockBarManager::CRhinoUiPageDockBar::~CRhinoUiPageDockBar ( )
protected

◆ CRhinoUiPageDockBarManager() [2/2]

CRhinoUiPageDockBarManager::CRhinoUiPageDockBarManager ( const CRhinoUiPageDockBarManager )
protected

Not implemented.

Member Function Documentation

◆ CRhinoUiPageDockBar::CRhinoUiPageDockBar()

CRhinoUiPageDockBarManager::CRhinoUiPageDockBar::CRhinoUiPageDockBar ( )
protected

◆ DockBar()

CRhinoUiPageDockBar* CRhinoUiPageDockBarManager::DockBar ( int  index) const

Description: The page dock bar manager is a collection of CRhinoUiPageDockBars. This function may be used to iterate the page dock bar collection.

Parameters: index [in] Zero based index for page dock bar to return.

Returns: Pointer to dock bar if index is valid otherwise NULL.

See Also: int CRhinoUiPageDockBarManager::DockBarCount() const CRhinoUiPageDockBar* CRhinoUiPageDockBarManager::operator[]( int index)

◆ DockBarCount()

int CRhinoUiPageDockBarManager::DockBarCount ( ) const

Description: Get number of page dock bars associated with Rhino.

Returns: Number of page dock bars associated with Rhino.

See Also: CRhinoUiPageDockBar* CRhinoUiPageDockBarManager::DockBar( int index) CRhinoUiPageDockBar* CRhinoUiPageDockBarManager::operator[]( int index)

◆ FindDockBar() [1/2]

CRhinoUiPageDockBar* CRhinoUiPageDockBarManager::FindDockBar ( const wchar_t *  control_bar_name,
int  language_id = 1033 
)

Description: The dock bar manager is a collection of CRhinoUiPageDockBars. Each dock bar must have a name. There is no requirement for names to be unique. This function may be used to find a dock bar with the specified name. To get a specific dock bar you should use FindDockBar( UUID uuid).

Parameters: control_bar_name [in] Name of dock bar to search for language_id [in] Localized language version control_bar_name is using

Returns: Pointer to first dock bar with control_bar name or NULL if name is not found.

◆ FindDockBar() [2/2]

CRhinoUiPageDockBar* CRhinoUiPageDockBarManager::FindDockBar ( UUID  uuid) const

Description: The dock bar manager is a collection of CRhinoUiPageDockBars. Each dock bar has a unique UUID. This function may be used to see if a dock bar with the specified UUID is currently in the collection.

Parameters: uuid [in] UUID of dock bar to search for

Returns: Pointer to dock bar if UUID is found otherwise NULL.

◆ GetSortedList()

void CRhinoUiPageDockBarManager::GetSortedList ( ON_SimpleArray< CRhinoUiPageDockBar * > &  sorted_list,
bool  ignore_not_created = false 
) const

Description: Gets an array of pointers to dock bars that is sorted by the values of CRhinoUiPageDockBar::SortIndex().

Parameters: sorted_list - [out] this array is returned sorted by the values of CRhinoUiPageDockBar::SortIndex(). This list may be a different length than the dock bar list if ignore_not_created is true and/or a cull function was used by Sort(). ignore_not_created - [in] TRUE means don't include dock bars that have not been created.

Remarks: Use CRhinoUiPageDockBar::Sort() to set the values of m_sort_index.

See Also: CRhinoUiPageDockBarManager::Sort(); CRhinoUiPageDockBar::SortIndex();

◆ IndexFromPointer()

int CRhinoUiPageDockBarManager::IndexFromPointer ( CRhinoUiPageDockBar pCB) const

Description: Get index for specified CRhinoUiPageDockBar object

Parameters: pCB [in] Dock bar to search for

Returns: -1 If dock bar not in list otherwise zero based index for dock bar.

◆ operator=()

CRhinoUiPageDockBarManager& CRhinoUiPageDockBarManager::operator= ( const CRhinoUiPageDockBarManager )
protected

◆ operator[]()

CRhinoUiPageDockBar* CRhinoUiPageDockBarManager::operator[] ( int  index) const

Description: The page dock bar manager is a collection of CRhinoUiPageDockBars. This function may be used to iterate the dock bar collection.

Parameters: index [in] Zero based index for page dock bar to return.

Returns: Pointer to dock bar if index is valid otherwise NULL.

See Also: int CRhinoUiPageDockBarManager::DockBarCount() const CRhinoUiPageDockBar* CRhinoUiPageDockBarManager::DockBar( int index)

◆ PageConstructor()

void CRhinoUiPageDockBarManager::PageConstructor ( CRhinoUiPageDockBar )
protected

◆ PageDestructor()

void CRhinoUiPageDockBarManager::PageDestructor ( CRhinoUiPageDockBar )
protected

◆ Sort()

void CRhinoUiPageDockBarManager::Sort ( int(*)(CRhinoUiPageDockBar *const *, CRhinoUiPageDockBar *const *, void *)  compar,
int(*)(const CRhinoUiPageDockBar *, void *)  cull,
void *  p = 0 
)

Description: Use this to set CRhinoUiPageDockBar::m_sort_index so that the values of m_sort_index run from 0 to DockBarCount()-1 and compare(control_bar_list[i], control_bar_list[j]) < 0) implies control_bar_list[i].m_sort_index < control_bar_list[j].m_sort_index.

Parameters: compar - [in] compare function with prototype int compare(const CRhinoUiPageDockBar* arg1, const CRhinoUiPageDockBar* arg2,void* p). that returns <0 if arg1<arg2, 0 if arg1=arg2, and >0 if arg1>arg2. cull - [in] optional filter function with prototype BOOL32 cull(const CRhinoUiPageDockBar* arg,void* p). that returns TRUE if the dock bar should be ignored when sorting. Dock bars that are ignored are not included in the list returned by GetSortedList(). Pass 0 if you do not need to cull the dock bar list. p - [in] pointer passed as last argument to compare() and cull().

Remarks: After calling Sort(), you can repeatedly call GetSortedList() to get a sorted list of CRhinoUiPageDockBar pointers. Sort() and GetSortedList() do not modify the order or persistent information in the dock bar manager. They are intended to be used to get sorted lists of dock bars for dialogs, etc.

See Also: CRhinoUiPageDockBarManager::GetSortedList

Member Data Documentation

◆ m_page_list

ON_SimpleArray<CRhinoUiPageDockBar*> CRhinoUiPageDockBarManager::m_page_list
protected