VisibleListWithEditableEntries Class Reference

This rendition of a VisibleList has VisibleListItems that are editable The functionality should be in the base class but that TemplateDialog parameter ruins things a bit. More...

Inheritance diagram for VisibleListWithEditableEntries:

VisibleList UserInterface Notifier AvailablePropertiesList UsedPropertiesList List of all members.

Public Member Functions

 VisibleListWithEditableEntries ()
virtual BOOL DeleteSelectedEntries ()
 Overrides the base class so that the last selected entry is set to none when.
virtual BOOL DeleteAllEntries ()
 Overrides the base class so that the last selected entry is set to none when.
virtual void RemoveSelection ()
 Overrides the base class so that when we remove the selection, the entry shown is hidden.
virtual void OnSelectionChange (TemplateDialog &Dialog)
 When the selected item(s) in this list, call this function. Should do a Notify but hides the last selected "EditableEntry" and Interacts with the newly selected one.

Protected Member Functions

BOOL IsLastSelectedEntry () const
VisibleListItemGetLastSelectedEntry () const
void SetNoLastSelectedEntry ()
void SetLastSelectedEntry (VisibleListItem &Entry)
virtual void HideLastSelectedEntry ()
 Support function to hide the last selected entry.

Private Member Functions

 CC_DECLARE_MEMDUMP (VisibleListWithEditableEntries)

Private Attributes

VisibleListItemm_pLastSelectedEntry

Detailed Description

This rendition of a VisibleList has VisibleListItems that are editable The functionality should be in the base class but that TemplateDialog parameter ruins things a bit.

Author:
Colin_Barfoot (Xara Group Ltd) <camelotdev@xara.com>
Date:
15/10/96

Definition at line 152 of file tmpltdlg.cpp.


Constructor & Destructor Documentation

VisibleListWithEditableEntries::VisibleListWithEditableEntries  )  [inline]
 

Definition at line 157 of file tmpltdlg.cpp.

00157                                      : 
00158         m_pLastSelectedEntry(NULL) {}


Member Function Documentation

VisibleListWithEditableEntries::CC_DECLARE_MEMDUMP VisibleListWithEditableEntries   )  [private]
 

BOOL VisibleListWithEditableEntries::DeleteAllEntries  )  [virtual]
 

Overrides the base class so that the last selected entry is set to none when.

Author:
Colin_Barfoot (Xara Group Ltd) <camelotdev@xara.com>
Date:
09/06/97
See Also: VisibleList::DeleteAllEntries()

Reimplemented from VisibleList.

Reimplemented in UsedPropertiesList.

Definition at line 656 of file tmpltdlg.cpp.

00657 {
00658     HideLastSelectedEntry();
00659 
00660     SetNoLastSelectedEntry();
00661 
00662     return VisibleList::DeleteAllEntries();
00663 }

BOOL VisibleListWithEditableEntries::DeleteSelectedEntries  )  [virtual]
 

Overrides the base class so that the last selected entry is set to none when.

Author:
Colin_Barfoot (Xara Group Ltd) <camelotdev@xara.com>
Date:
09/06/97
See Also: VisibleList::DeleteSelectedEntries()

Reimplemented from VisibleList.

Definition at line 632 of file tmpltdlg.cpp.

00633 {
00634     HideLastSelectedEntry();
00635 
00636     SetNoLastSelectedEntry();
00637 
00638     return VisibleList::DeleteSelectedEntries();
00639 }

VisibleListItem* VisibleListWithEditableEntries::GetLastSelectedEntry  )  const [inline, protected]
 

Definition at line 167 of file tmpltdlg.cpp.

00167 {   return m_pLastSelectedEntry;    }

void VisibleListWithEditableEntries::HideLastSelectedEntry  )  [protected, virtual]
 

Support function to hide the last selected entry.

Author:
Colin_Barfoot (Xara Group Ltd) <camelotdev@xara.com>
Date:
09/06/97

Definition at line 697 of file tmpltdlg.cpp.

00698 {
00699     if (IsLastSelectedEntry())
00700     {
00701         VisibleListItem* const pPreviousSelection = GetLastSelectedEntry();
00702         if (pPreviousSelection != NULL)
00703         {
00704             pPreviousSelection->Hide();
00705         }
00706     }
00707 }

BOOL VisibleListWithEditableEntries::IsLastSelectedEntry  )  const [inline, protected]
 

Definition at line 166 of file tmpltdlg.cpp.

00166 {   return m_pLastSelectedEntry != NULL;    }

void VisibleListWithEditableEntries::OnSelectionChange TemplateDialog Dialog  )  [virtual]
 

When the selected item(s) in this list, call this function. Should do a Notify but hides the last selected "EditableEntry" and Interacts with the newly selected one.

Author:
Colin_Barfoot (Xara Group Ltd) <camelotdev@xara.com>
Date:
09/06/97

Definition at line 722 of file tmpltdlg.cpp.

00723 {
00724     // if there was an entry already showing its innards get rid of it
00725     HideLastSelectedEntry();
00726 
00727     // Display the right question, changing the "last" selected entry to the one we're gonna show
00728     if (GetNumberOfSelectedEntries() == 1)
00729     {
00730         // Show the entry's question / param pair
00731         VisibleListItem* const pSelectedEntry = GetFirstSelectedEntry();
00732         if (pSelectedEntry != NULL)
00733         {
00734             SetLastSelectedEntry(*pSelectedEntry);
00735             pSelectedEntry->Display(Dialog);
00736             pSelectedEntry->Interact(Dialog);
00737         }
00738         else
00739         {
00740             TRACE( _T("VisibleListWithEditableEntries::OnSelectionChange() - Selection count / entries incongruency\n"));
00741         }
00742     }
00743     else
00744     {
00745         // if there's more than one or none selected don't confuse the user by showing the 
00746         // question / param
00747         SetNoLastSelectedEntry();
00748     }
00749 }

void VisibleListWithEditableEntries::RemoveSelection  )  [virtual]
 

Overrides the base class so that when we remove the selection, the entry shown is hidden.

Author:
Colin_Barfoot (Xara Group Ltd) <camelotdev@xara.com>
Date:
09/06/97
See Also: VisibleList::DeleteAllEntries()

Reimplemented from VisibleList.

Definition at line 679 of file tmpltdlg.cpp.

00680 {
00681     HideLastSelectedEntry();
00682 
00683     VisibleList::RemoveSelection();
00684 }

void VisibleListWithEditableEntries::SetLastSelectedEntry VisibleListItem Entry  )  [inline, protected]
 

Definition at line 170 of file tmpltdlg.cpp.

00170 {   m_pLastSelectedEntry = &Entry;  }

void VisibleListWithEditableEntries::SetNoLastSelectedEntry  )  [inline, protected]
 

Definition at line 169 of file tmpltdlg.cpp.


Member Data Documentation

VisibleListItem* VisibleListWithEditableEntries::m_pLastSelectedEntry [private]
 

Definition at line 175 of file tmpltdlg.cpp.


The documentation for this class was generated from the following file:
Generated on Sat Nov 10 04:03:03 2007 for Camelot by  doxygen 1.4.4