Rhino C++ API
8.13
|
#include <RhinoSdkUiPageDockBarManager.h>
Public Member Functions | |
CRhinoUiPageDockBarManager () | |
~CRhinoUiPageDockBarManager () | |
CRhinoUiPageDockBar * | DockBar (int index) const |
int | DockBarCount () const |
CRhinoUiPageDockBar * | FindDockBar (const wchar_t *control_bar_name, int language_id=1033) |
CRhinoUiPageDockBar * | FindDockBar (UUID uuid) const |
void | GetSortedList (ON_SimpleArray< CRhinoUiPageDockBar * > &sorted_list, bool ignore_not_created=false) const |
int | IndexFromPointer (CRhinoUiPageDockBar *pCB) const |
CRhinoUiPageDockBar * | operator[] (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 () |
CRhinoUiPageDockBarManager & | operator= (const CRhinoUiPageDockBarManager &) |
void | PageConstructor (CRhinoUiPageDockBar *) |
void | PageDestructor (CRhinoUiPageDockBar *) |
Protected Attributes | |
ON_SimpleArray< CRhinoUiPageDockBar * > | m_page_list |
CRhinoUiPageDockBarManager::CRhinoUiPageDockBarManager | ( | ) |
CRhinoUiPageDockBarManager::~CRhinoUiPageDockBarManager | ( | ) |
|
protected |
|
protected |
Not implemented.
|
protected |
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)
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)
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.
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.
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();
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.
|
protected |
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)
|
protected |
|
protected |
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.
|
protected |