#include <ngitem.h>
Inheritance diagram for SGNameGroup:
Public Member Functions | |
SGNameGroup (UINT32 idType, UINT32 idTitle, Document *pDoc=0) | |
Creates an abstract Name Gallery group. Notes: Uses the lowest bit of SGDisplayFlags.Reserved to track whether a group has been automatically folded because it has no items (and hence should automatically unfold if it later has new items to show). | |
UINT32 | GetTypeID () const |
virtual BOOL | IsMember (Node *pNode, const StringBase &strName) const =0 |
virtual BOOL | CreateItems (Node *pNode)=0 |
SGNameItem * | FindItem (const StringBase &strName) const |
SGNameItem * | RegisterMember (Node *pNode, const StringBase &strName) |
Creates and inserts a SGNameItem with the given name if one doesn't exist already. Includes the given node in the set's bounds etc. | |
SGNameGroup (NameGallery *pParentGal, Document *pParentDoc=0) | |
void | SetRefresh (BOOL fR=TRUE) |
BOOL | NeedsRefresh () |
Protected Member Functions | |
virtual SGNameItem * | MakeItem (const StringBase &strName) const |
Seize control of the group's title from the base class. | |
virtual void | ReadGroupTitle () |
Seize control of the group's title from the base class. | |
Private Member Functions | |
CC_DECLARE_DYNAMIC (SGNameGroup) | |
Private Attributes | |
const UINT32 | m_idType |
const UINT32 | m_idTitle |
BOOL | m_fRefresh |
Definition at line 126 of file ngitem.h.
|
Creates an abstract Name Gallery group. Notes: Uses the lowest bit of SGDisplayFlags.Reserved to track whether a group has been automatically folded because it has no items (and hence should automatically unfold if it later has new items to show).
Definition at line 986 of file ngitem.cpp. 00987 : SGDisplayGroup(NameGallery::Instance(), pDoc), 00988 m_idType(idType), 00989 m_idTitle(idTitle) 00990 { 00991 Flags.CanSelect = TRUE; 00992 Flags.Reserved &= ~1; 00993 }
|
|
Definition at line 194 of file sgname.h. 00195 : SGDisplayGroup(pParentGal, pParentDoc), 00196 m_fRefresh(FALSE) 00197 { Flags.CanSelect = TRUE; }
|
|
|
|
Implemented in SGUsedNames, SGUsedFonts, SGUsedBitmaps, and SGUsedColours. |
|
Definition at line 1020 of file ngitem.cpp. 01021 { 01022 // Iterate over all the items looking a matching name. 01023 for (SGNameItem* pItem = (SGNameItem*) GetChild(); 01024 pItem != 0; 01025 pItem = (SGNameItem*) pItem->GetNext()) 01026 { 01027 if (pItem->GetNameTextPtr()->CompareTo(strName) == 0) 01028 return pItem; 01029 } 01030 01031 // Can't find an item with that name. 01032 return 0; 01033 }
|
|
Definition at line 1005 of file ngitem.cpp. 01006 { 01007 return m_idType; 01008 }
|
|
Implemented in SGUsedNames, SGUsedFonts, SGUsedBitmaps, and SGUsedColours. |
|
Seize control of the group's title from the base class.
Reimplemented in SGUsedColours. Definition at line 1098 of file ngitem.cpp. 01099 { 01100 return new SGNameItem(strName); 01101 }
|
|
Definition at line 204 of file sgname.h. 00205 { BOOL fR = m_fRefresh; m_fRefresh = FALSE; return fR; }
|
|
Seize control of the group's title from the base class.
Reimplemented from SGDisplayGroup. Definition at line 1113 of file ngitem.cpp.
|
|
Creates and inserts a SGNameItem with the given name if one doesn't exist already. Includes the given node in the set's bounds etc.
Definition at line 1050 of file ngitem.cpp. 01051 { 01052 // Only make a new item if there isn't one already. 01053 SGNameItem* pItem; 01054 for ( pItem = (SGNameItem*) GetChild(); 01055 pItem != 0 && !pItem->IsEqual(strName); 01056 pItem = (SGNameItem*) pItem->GetNext()) 01057 /* empty */ ; 01058 01059 if (pItem == 0) 01060 { 01061 // If we previously had no children and folded because of that then 01062 // automatically unfold. 01063 if (GetChild() == 0 && (Flags.Reserved & 1)) 01064 { 01065 Flags.Reserved &= ~1; 01066 Flags.Folded = FALSE; 01067 } 01068 01069 // We must create a new set item for this 'attribute value'. 01070 pItem = MakeItem(strName); 01071 ERRORIF(pItem == 0, _R(IDE_NOMORE_MEMORY), 0); 01072 01073 // Insert in alphabetical order. 01074 SGSortKey sk[2] = { { SGSORTKEY_BYNAME } }; 01075 AddItem(pItem, sk); 01076 } 01077 /* 01078 TRACEUSER( "JustinF", _T("Registering %s at 0x%p as a member of %s\n"), 01079 (LPCTSTR) pNode->GetRuntimeClass()->m_lpszClassName, 01080 (LPVOID) pNode, (LPCTSTR) strName); 01081 */ 01082 // 'Register' the node with the set item which will note its selection 01083 // status, bounds etc. 01084 pItem->Include(pNode); 01085 return pItem; 01086 }
|
|
Definition at line 200 of file sgname.h. 00201 { m_fRefresh = fR; }
|
|
|
|
|
|
|