OpNameGalleryPropIndexDesc Class Reference

#include <ngdialog.h>

Inheritance diagram for OpNameGalleryPropIndexDesc:

OpDescriptor MessageHandler ListItem CCObject SimpleCCObject List of all members.

Public Member Functions

 OpNameGalleryPropIndexDesc ()
 Constructs an OpNameGalleryPropIndexDesc object.

Private Member Functions

virtual void OnControlCreate (OpDescControlCreateMsg *pCreateMsg)
 Called when the combo-boxes associated with this descriptor are created.
virtual void OnSelectionChange (OpDescControlMsg *pSelChangedMsg, List *pGadgetList)
 Called when the combo-boxes associated with this descriptor are changed.
void UpdateGadgets ()
 Sets the text in all the combos associated with this descriptor to the currently selected Name gallery property index.
 CC_DECLARE_DYNCREATE (OpNameGalleryPropIndexDesc)

Detailed Description

Definition at line 201 of file ngdialog.h.


Constructor & Destructor Documentation

OpNameGalleryPropIndexDesc::OpNameGalleryPropIndexDesc  ) 
 

Constructs an OpNameGalleryPropIndexDesc object.

Author:
Justin_Flude (Xara Group Ltd) <camelotdev@xara.com>
Date:
9/5/99

Definition at line 696 of file ngdialog.cpp.

00697   : OpDescriptor(0,
00698                  _R(IDS_NAME_GALLERY_PROP_INDEX),
00699                  CC_RUNTIME_CLASS(OpNameGalleryPropIndexDesc),
00700                  OPTOKEN_NAME_GALLERY_PROP_INDEX,
00701                  OpDisplayNameGallery::GetState,
00702                  0,
00703                  _R(IDBBL_NAME_GALLERY_PROP_INDEX),
00704                  0,
00705                  _R(IDC_NAMEGAL_PROP_IDX),
00706                  TRUE)
00707 {
00708     // Empty.
00709 }


Member Function Documentation

OpNameGalleryPropIndexDesc::CC_DECLARE_DYNCREATE OpNameGalleryPropIndexDesc   )  [private]
 

void OpNameGalleryPropIndexDesc::OnControlCreate OpDescControlCreateMsg pCreateMsg  )  [private, virtual]
 

Called when the combo-boxes associated with this descriptor are created.

Author:
Justin_Flude (Xara Group Ltd) <camelotdev@xara.com>
Date:
9/5/99
Parameters:
pCreateMsg --- message describing this creation event [INPUTS]

Reimplemented from OpDescriptor.

Definition at line 723 of file ngdialog.cpp.

00724 {
00725     // Fill up the gadget's list with the names of properties.  These must be in
00726     // ascending order of property indices.
00727     pCreateMsg->pDlgOp->SetStringGadgetValue(
00728                             pCreateMsg->SetGadgetID, String(_R(IDS_NAMEGAL_EXPORT_PROP)));
00729     pCreateMsg->pDlgOp->SetStringGadgetValue(
00730                             pCreateMsg->SetGadgetID, String(_R(IDS_NAMEGAL_SLICE_PROP)));
00731     pCreateMsg->pDlgOp->SetStringGadgetValue(
00732                             pCreateMsg->SetGadgetID, String(_R(IDS_NAMEGAL_STRETCH_PROP)));
00733 
00734     // Resize the list to fit and update associated gadgets.
00735     pCreateMsg->pDlgOp->SetComboListLength(pCreateMsg->SetGadgetID);
00736     UpdateGadgets();
00737 }

void OpNameGalleryPropIndexDesc::OnSelectionChange OpDescControlMsg pSelChangedMsg,
List pGadgetList
[private, virtual]
 

Called when the combo-boxes associated with this descriptor are changed.

Author:
Justin_Flude (Xara Group Ltd) <camelotdev@xara.com>
Date:
9/5/99
Parameters:
pSelChangedMsg --- message describing the change event [INPUTS] pGadgetList --- list of gadgets associated with this

Reimplemented from OpDescriptor.

Definition at line 752 of file ngdialog.cpp.

00753 {
00754     // Extract the index of the item selected from the list, if any.
00755     INT32 i = pSelChangedMsg->pDlgOp->GetSelectedValueIndex(pSelChangedMsg->SetGadgetID);
00756     if (i == -1) i = NameGallery::Instance()->GetPropertyIndex();
00757 
00758     // Update the gallery's property index.
00759     NameGallery::Instance()->SetPropertyIndex((INT32) i);
00760     UpdateGadgets();
00761 }

void OpNameGalleryPropIndexDesc::UpdateGadgets  )  [private]
 

Sets the text in all the combos associated with this descriptor to the currently selected Name gallery property index.

Author:
Justin_Flude (Xara Group Ltd) <camelotdev@xara.com>
Date:
26/4/99
See also:
OpDescriptor::BuildGadgetList

Definition at line 775 of file ngdialog.cpp.

00776 {
00777     // Create a list of all the gadget IDs
00778     List theGadgets;
00779     if (BuildGadgetList(&theGadgets))
00780     {
00781         // Iterate over each control in the list.
00782         INT32 nVal = NameGallery::Instance()->GetPropertyIndex();
00783         for (GadgetListItem* pgli = (GadgetListItem*) theGadgets.GetHead(); 
00784              pgli != 0; 
00785              pgli = (GadgetListItem*) theGadgets.GetNext(pgli))
00786         {
00787             // Set each control to display the text.
00788             pgli->pDialogOp->SetSelectedValueIndex(pgli->gidGadgetID, nVal);
00789         }
00790 
00791         // Tidy up.
00792         theGadgets.DeleteAll();
00793     }
00794 } 


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