Rhino C++ API  9.0
Public Member Functions | Friends | List of all members
CRhinoPageViewGroupTable Class Reference

CRhinoPageViewGroupTable contains document page view group objects. More...

#include <rhinoSdkPageViewGroup.h>

Inheritance diagram for CRhinoPageViewGroupTable:
ON_SimpleArray< CRhinoPageViewGroup * >

Public Member Functions

const ON_ComponentManifestItemAddPageViewGroup ()
 Adds a new page view group to the table. More...
 
const ON_ComponentManifestItemAddPageViewGroup (const ON_PageViewGroup &group)
 Adds a new page view group to the table. More...
 
const ON_ComponentManifestItemAddPageViewGroup (const ON_PageViewGroup &group, const ON_SimpleArray< CRhinoPageView * > &group_members)
 Adds a new page view group to the table, and adds page views to the group. More...
 
const ON_ComponentManifestItemAddPageViewGroup (const ON_SimpleArray< CRhinoPageView * > &group_members)
 Adds a new page view group to the table, and adds page views to the group. More...
 
void ChangeSortOrder (const ON_SimpleArray< ON_2dex > &sort_order)
 
const ON_ComponentManifestItemCreatePageViewGroup (const ON_PageViewGroup &group, const ON_SimpleArray< CRhinoPageView * > &group_members, unsigned int worksession_ref_model_sn, unsigned int linked_idef_sn)
 Basic tool used to add a new new page view group, with specified definition, to the table. The AddPageViewGroup() functions use this when adding new age view groups. More...
 
const ON_ComponentManifestItemCreatePageViewGroup (const ON_PageViewGroup &group, unsigned int worksession_ref_model_sn, unsigned int linked_idef_sn)
 Basic tool used to add a new new page view group, with specified definition, to the table. The AddPageViewGroup() functions use this when adding new age view groups. More...
 
bool DeletePageViewGroup (const ON_ComponentManifestItem &item, bool bRemovePageViews, bool bQuiet)
 Deletes a page view group. More...
 
bool DeletePageViewGroup (int group_index, bool bQuiet)
 Deletes a page view group. More...
 
bool DeletePageViewGroup (int group_index, bool bRemovePageViews, bool bQuiet)
 Deletes a page view group. More...
 
CRhinoDocDocument () const
 
void GetSortedList (ON_SimpleArray< const CRhinoPageViewGroup * > &sorted_list, bool bIgnoreDeleted, bool bIgnoreReference) const
 Gets an array of page view group pointers that are sorted by CRhinoPageViewGroup::Name(). More...
 
void GetUnusedPageViewGroupName (const wchar_t *root_name, ON_wString &unused_group_name)
 Gets an unused page view group name. More...
 
void GetUnusedPageViewGroupName (ON_wString &unused_group_name)
 Gets an unused page view group name. More...
 
bool InPageViewGroupTable (const ON_PageViewGroup *group) const
 Verifies a page view group exists in this table. More...
 
bool IsValidPageViewGroupTableIndex (int group_index) const
 Verifies a page view group index is a valid index in this table. More...
 
void ListTable (ON_TextLog &text_log, unsigned int level_of_detail) const
 Table logging helper. More...
 
bool ModifyPageViewGroup (const ON_PageViewGroup &group, const ON_ComponentManifestItem &item, bool bQuiet)
 Modifies a page view group. More...
 
bool ModifyPageViewGroup (const ON_PageViewGroup &group, int group_index, bool bQuiet=false)
 Modifies a page view group. More...
 
const CRhinoPageViewGroupoperator[] (int group_index) const
 Gets a page view group from the table. More...
 
const CRhinoPageViewGroupPageViewGroup (const ON_ComponentManifestItem &manifest_item) const
 Gets a page view group by component manifest. More...
 
const CRhinoPageViewGroupPageViewGroup (const ON_ComponentManifestItem &manifest_item, const CRhinoPageViewGroup *not_found) const
 Gets a page view group by component manifest. More...
 
int PageViewGroupCount () const
 
const CRhinoPageViewGroupPageViewGroupFromId (ON_UUID group_id, bool bSearchDeleted) const
 Gets a page view group by id. More...
 
const CRhinoPageViewGroupPageViewGroupFromIndex (int group_index, bool bSearchDeleted) const
 Gets a page view group by index. More...
 
const CRhinoPageViewGroupPageViewGroupFromName (const wchar_t *group_name) const
 Gets a page view group by name. More...
 
const ON_ComponentManifestItemPageViewGroupManifestItemFromId (ON_UUID group_id, bool bSearchDeleted) const
 Gets a component manifest item by page view group id. More...
 
const ON_ComponentManifestItemPageViewGroupManifestItemFromIndex (int group_index, bool bSearchDeleted) const
 Gets a component manifest item by page view group index. More...
 
const ON_ComponentManifestItemPageViewGroupManifestItemFromName (const wchar_t *group_name) const
 Gets a component manifest item by page view group name. More...
 
void SetRemapIndex (int group_index, int remap_index)
 Sets a page view group's remap index. More...
 
void SetUnusedPageViewGroupName (const wchar_t *root_name, ON_PageViewGroup &group_to_name)
 Sets a page view group's name to an unused name. More...
 
void SetUnusedPageViewGroupName (ON_PageViewGroup &group_to_name)
 Sets a page view group's name to an unused name. More...
 
void Sort (int(*compare)(const CRhinoPageViewGroup *, const CRhinoPageViewGroup *, void *), int(*cull)(const CRhinoPageViewGroup *, void *), void *ptr=nullptr)
 Use this to set CRhinoPageViewGroup::m_sort_index so that the values of CRhinoPageViewGroup::m_sort_index are from 0 to PageViewGroupCount() - 1, and compare(table[i], table[j]) < 0 ) implies that table[i].m_sort_index < table[j].m_sort_index. More...
 
const class CRhinoDocTableReferenceTableReference () const
 
bool UndeletePageViewGroup (int group_index)
 Undeletes a page view group that has been deleted by DeletePageViewGroup(). More...
 
bool UndoModifyPageViewGroup (int group_index, unsigned int undo_record_sn)
 If the page view group has been modified and the modification can be undone, then UndoModifyPageViewGroup() will restore the page view group to its previous state. More...
 
bool UnsortPageViewGroup (int pageview_group_index, int sort_index)
 

Friends

class CRhDocSdkExtension
 
class CRhinoDoc
 

Detailed Description

CRhinoPageViewGroupTable contains document page view group objects.

Member Function Documentation

◆ AddPageViewGroup() [1/4]

const ON_ComponentManifestItem& CRhinoPageViewGroupTable::AddPageViewGroup ( )

Adds a new page view group to the table.

Returns
If successful, a ON_ModelComponent::Type::PageViewGroup component manifest item. If not successful, ON_ComponentManifestItem::UnsetItem is returned.

◆ AddPageViewGroup() [2/4]

const ON_ComponentManifestItem& CRhinoPageViewGroupTable::AddPageViewGroup ( const ON_PageViewGroup group)

Adds a new page view group to the table.

Parameters
groupPage view group to add.
Returns
If successful, a ON_ModelComponent::Type::PageViewGroup component manifest item. If not successful, ON_ComponentManifestItem::UnsetItem is returned.

◆ AddPageViewGroup() [3/4]

const ON_ComponentManifestItem& CRhinoPageViewGroupTable::AddPageViewGroup ( const ON_PageViewGroup group,
const ON_SimpleArray< CRhinoPageView * > &  group_members 
)

Adds a new page view group to the table, and adds page views to the group.

Parameters
groupPage view group to add.
group_membersRhino page views to group.
Returns
If successful, a ON_ModelComponent::Type::PageViewGroup component manifest item. If not successful, ON_ComponentManifestItem::UnsetItem is returned.

◆ AddPageViewGroup() [4/4]

const ON_ComponentManifestItem& CRhinoPageViewGroupTable::AddPageViewGroup ( const ON_SimpleArray< CRhinoPageView * > &  group_members)

Adds a new page view group to the table, and adds page views to the group.

Parameters
group_membersRhino page views to group.
Returns
If successful, a ON_ModelComponent::Type::PageViewGroup component manifest item. If not successful, ON_ComponentManifestItem::UnsetItem is returned.

◆ ChangeSortOrder()

void CRhinoPageViewGroupTable::ChangeSortOrder ( const ON_SimpleArray< ON_2dex > &  sort_order)

◆ CreatePageViewGroup() [1/2]

const ON_ComponentManifestItem& CRhinoPageViewGroupTable::CreatePageViewGroup ( const ON_PageViewGroup group,
const ON_SimpleArray< CRhinoPageView * > &  group_members,
unsigned int  worksession_ref_model_sn,
unsigned int  linked_idef_sn 
)

Basic tool used to add a new new page view group, with specified definition, to the table. The AddPageViewGroup() functions use this when adding new age view groups.

Parameters
groupPage view group to add.
group_membersRhino page views to group.
worksession_ref_model_snThe worksession reference model serial number: 0 : Not from a reference model. 1 : Not saved in files but not part of a worksession reference file. 2 - 1000 : Reserved for future use.

1000 : Norksession reference file serial number.

linked_idef_snLinked instance definition serial number: 0 : Not from a linked instance definition. 1 - 1000 : Reserved for future use.

1000 : Linked nstance definition serial number.

Returns
If successful, a ON_ModelComponent::Type::PageViewGroup component manifest item. If not successful, ON_ComponentManifestItem::UnsetItem is returned.

◆ CreatePageViewGroup() [2/2]

const ON_ComponentManifestItem& CRhinoPageViewGroupTable::CreatePageViewGroup ( const ON_PageViewGroup group,
unsigned int  worksession_ref_model_sn,
unsigned int  linked_idef_sn 
)

Basic tool used to add a new new page view group, with specified definition, to the table. The AddPageViewGroup() functions use this when adding new age view groups.

Parameters
groupPage view group to add.
worksession_ref_model_snThe worksession reference model serial number: 0 : Not from a reference model. 1 : Not saved in files but not part of a worksession reference file. 2 - 1000 : Reserved for future use.

1000 : Norksession reference file serial number.

linked_idef_snLinked instance definition serial number: 0 : Not from a linked instance definition. 1 - 1000 : Reserved for future use.

1000 : Linked nstance definition serial number.

Returns
If successful, a ON_ModelComponent::Type::PageViewGroup component manifest item. If not successful, ON_ComponentManifestItem::UnsetItem is returned.

◆ DeletePageViewGroup() [1/3]

bool CRhinoPageViewGroupTable::DeletePageViewGroup ( const ON_ComponentManifestItem item,
bool  bRemovePageViews,
bool  bQuiet 
)

Deletes a page view group.

Parameters
itemComponent index item of page view group to delete.
bRemovePageViewsIterates the document and removes page views from the group.
bQuiettrue to disable any warning or error messages.
Returns
true if successful, false otherwise.

◆ DeletePageViewGroup() [2/3]

bool CRhinoPageViewGroupTable::DeletePageViewGroup ( int  group_index,
bool  bQuiet 
)

Deletes a page view group.

Parameters
group_indexZero-based index of page view group to delete.
bQuiettrue to disable any warning or error messages.
Returns
true if successful, false otherwise.

◆ DeletePageViewGroup() [3/3]

bool CRhinoPageViewGroupTable::DeletePageViewGroup ( int  group_index,
bool  bRemovePageViews,
bool  bQuiet 
)

Deletes a page view group.

Parameters
group_indexZero-based index of page view group to delete.
bRemovePageViewsIterates the document and removes page views from the group.
bQuiettrue to disable any warning or error messages.
Returns
true if successful, false otherwise.

◆ Document()

CRhinoDoc& CRhinoPageViewGroupTable::Document ( ) const
Returns
CRhinoDocument that owns this table.

◆ GetSortedList()

void CRhinoPageViewGroupTable::GetSortedList ( ON_SimpleArray< const CRhinoPageViewGroup * > &  sorted_list,
bool  bIgnoreDeleted,
bool  bIgnoreReference 
) const

Gets an array of page view group pointers that are sorted by CRhinoPageViewGroup::Name().

Parameters
sorted_listArray of sorted page view group pointers.
bIgnoreDeletedtrue to ignore deleted page view groups.
bIgnoreReferencetrue to ignore reference page view groups.

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

◆ GetUnusedPageViewGroupName() [1/2]

void CRhinoPageViewGroupTable::GetUnusedPageViewGroupName ( const wchar_t *  root_name,
ON_wString unused_group_name 
)

Gets an unused page view group name.

Parameters
root_nameThe name's root or prefix.
unused_group_nameThe unused page view name.

◆ GetUnusedPageViewGroupName() [2/2]

void CRhinoPageViewGroupTable::GetUnusedPageViewGroupName ( ON_wString unused_group_name)

Gets an unused page view group name.

Parameters
unused_group_nameThe unused page view name.

◆ InPageViewGroupTable()

bool CRhinoPageViewGroupTable::InPageViewGroupTable ( const ON_PageViewGroup group) const

Verifies a page view group exists in this table.

Parameters
groupA valid page view group.
Returns
true if the page view group exists, false otherwise.

◆ IsValidPageViewGroupTableIndex()

bool CRhinoPageViewGroupTable::IsValidPageViewGroupTableIndex ( int  group_index) const

Verifies a page view group index is a valid index in this table.

Parameters
group_indexZero-based page view group index.
Returns
True if the page view group index is valid, false otherwise.

◆ ListTable()

void CRhinoPageViewGroupTable::ListTable ( ON_TextLog text_log,
unsigned int  level_of_detail 
) const

Table logging helper.

◆ ModifyPageViewGroup() [1/2]

bool CRhinoPageViewGroupTable::ModifyPageViewGroup ( const ON_PageViewGroup group,
const ON_ComponentManifestItem item,
bool  bQuiet 
)

Modifies a page view group.

Parameters
groupThe modified page view group.
itemComponent index item of page view group to modify.
bQuiettrue to disable any warning or error messages.
Returns
true if successful, false otherwise.

◆ ModifyPageViewGroup() [2/2]

bool CRhinoPageViewGroupTable::ModifyPageViewGroup ( const ON_PageViewGroup group,
int  group_index,
bool  bQuiet = false 
)

Modifies a page view group.

Parameters
groupThe modified page view group.
group_indexZero-based index of page view group to modify.
bQuiettrue to disable any warning or error messages.
Returns
true if successful, false otherwise.

◆ operator[]()

const CRhinoPageViewGroup* CRhinoPageViewGroupTable::operator[] ( int  group_index) const

Gets a page view group from the table.

Parameters
group_indexZero-based page view group index.
Returns
Pointer to the page view. If group_index is out of range, nullptr is returned. Note, this pointer may become invalid after CRhinoPageViewGroupTable::AddPageViewGroup is called.

◆ PageViewGroup() [1/2]

const CRhinoPageViewGroup* CRhinoPageViewGroupTable::PageViewGroup ( const ON_ComponentManifestItem manifest_item) const

Gets a page view group by component manifest.

Parameters
manifest_itemThe component manifest item.
Returns
If successful, a pointer to the page view group is returned. If not successful, nullptr is returned.

◆ PageViewGroup() [2/2]

const CRhinoPageViewGroup* CRhinoPageViewGroupTable::PageViewGroup ( const ON_ComponentManifestItem manifest_item,
const CRhinoPageViewGroup not_found 
) const

Gets a page view group by component manifest.

Parameters
manifest_itemThe component manifest item.
not_foundThe value to return if not found.
Returns
If successful, a pointer to the page view group is returned. If not successful, nullptr is returned.

◆ PageViewGroupCount()

int CRhinoPageViewGroupTable::PageViewGroupCount ( ) const
Returns
Number of page view groups in the table.

◆ PageViewGroupFromId()

const CRhinoPageViewGroup* CRhinoPageViewGroupTable::PageViewGroupFromId ( ON_UUID  group_id,
bool  bSearchDeleted 
) const

Gets a page view group by id.

Parameters
group_idThe page view group id.
bSearchDeletedSet true to search for deleted page view groups.
Returns
If successful, a pointer to the page view group is returned. If not successful, nullptr is returned.

◆ PageViewGroupFromIndex()

const CRhinoPageViewGroup* CRhinoPageViewGroupTable::PageViewGroupFromIndex ( int  group_index,
bool  bSearchDeleted 
) const

Gets a page view group by index.

Parameters
group_indexThe page view group index.
bSearchDeletedSet true to search for deleted page view groups.
Returns
If successful, a pointer to the page view group is returned. If not successful, nullptr is returned.

◆ PageViewGroupFromName()

const CRhinoPageViewGroup* CRhinoPageViewGroupTable::PageViewGroupFromName ( const wchar_t *  group_name) const

Gets a page view group by name.

Parameters
group_nameThe page view group name.
Returns
If successful, a pointer to the page view group is returned. If not successful, nullptr is returned.

◆ PageViewGroupManifestItemFromId()

const ON_ComponentManifestItem& CRhinoPageViewGroupTable::PageViewGroupManifestItemFromId ( ON_UUID  group_id,
bool  bSearchDeleted 
) const

Gets a component manifest item by page view group id.

Parameters
group_idThe page view group id.
bSearchDeletedSet true to search for deleted page view groups.
Returns
If successful, a ON_ModelComponent::Type::PageViewGroup component manifest item. If not successful, ON_ComponentManifestItem::UnsetItem is returned.

◆ PageViewGroupManifestItemFromIndex()

const ON_ComponentManifestItem& CRhinoPageViewGroupTable::PageViewGroupManifestItemFromIndex ( int  group_index,
bool  bSearchDeleted 
) const

Gets a component manifest item by page view group index.

Parameters
group_indexThe page view group index.
bSearchDeletedSet true to search for deleted page view groups.
Returns
If successful, a ON_ModelComponent::Type::PageViewGroup component manifest item. If not successful, ON_ComponentManifestItem::UnsetItem is returned.

◆ PageViewGroupManifestItemFromName()

const ON_ComponentManifestItem& CRhinoPageViewGroupTable::PageViewGroupManifestItemFromName ( const wchar_t *  group_name) const

Gets a component manifest item by page view group name.

Parameters
group_nameThe page view group name.
Returns
If successful, a ON_ModelComponent::Type::PageViewGroup component manifest item. If not successful, ON_ComponentManifestItem::UnsetItem is returned.

◆ SetRemapIndex()

void CRhinoPageViewGroupTable::SetRemapIndex ( int  group_index,
int  remap_index 
)

Sets a page view group's remap index.

Parameters
group_indexIndex of a existing page view group in this table.
remap_indexRemap index.

◆ SetUnusedPageViewGroupName() [1/2]

void CRhinoPageViewGroupTable::SetUnusedPageViewGroupName ( const wchar_t *  root_name,
ON_PageViewGroup group_to_name 
)

Sets a page view group's name to an unused name.

Parameters
root_nameThe name's root or prefix. If nullptr, "PageViewGroup" is used.
group_to_nameThe page view group to assign a unused name.

◆ SetUnusedPageViewGroupName() [2/2]

void CRhinoPageViewGroupTable::SetUnusedPageViewGroupName ( ON_PageViewGroup group_to_name)

Sets a page view group's name to an unused name.

Parameters
group_to_nameThe page view group to assign a unused name.

◆ Sort()

void CRhinoPageViewGroupTable::Sort ( int(*)(const CRhinoPageViewGroup *, const CRhinoPageViewGroup *, void *)  compare,
int(*)(const CRhinoPageViewGroup *, void *)  cull,
void *  ptr = nullptr 
)

Use this to set CRhinoPageViewGroup::m_sort_index so that the values of CRhinoPageViewGroup::m_sort_index are from 0 to PageViewGroupCount() - 1, and compare(table[i], table[j]) < 0 ) implies that table[i].m_sort_index < table[j].m_sort_index.

Parameters
compareCompare function that returns: <0 : arg1 < arg2 0 : arg1 = arg2 >0 : arg1 > arg2
cullOptional culling function that returns true if the page view group should be ignored when sorting. Page view group that are ignored are not included in the list returned by GetSortedList(). Pass nullptr if you do not need to cull the list.
ptrPointer passed as last argument to compare() and cull().

◆ TableReference()

const class CRhinoDocTableReference& CRhinoPageViewGroupTable::TableReference ( ) const
Returns
The document table reference.

◆ UndeletePageViewGroup()

bool CRhinoPageViewGroupTable::UndeletePageViewGroup ( int  group_index)

Undeletes a page view group that has been deleted by DeletePageViewGroup().

Parameters
group_indexZero-based index of page view group to undelete.
Returns
true if successful, false otherwise.

◆ UndoModifyPageViewGroup()

bool CRhinoPageViewGroupTable::UndoModifyPageViewGroup ( int  group_index,
unsigned int  undo_record_sn 
)

If the page view group has been modified and the modification can be undone, then UndoModifyPageViewGroup() will restore the page view group to its previous state.

Parameters
group_indexZero-based index of page view group.
undo_record_snUndo record serial number.
Returns
true if successful, false otherwise.

◆ UnsortPageViewGroup()

bool CRhinoPageViewGroupTable::UnsortPageViewGroup ( int  pageview_group_index,
int  sort_index 
)

Friends And Related Function Documentation

◆ CRhDocSdkExtension

friend class CRhDocSdkExtension
friend

◆ CRhinoDoc

friend class CRhinoDoc
friend