#include <ngdialog.h>
Inheritance diagram for OpNameGalleryPropIndexDesc:
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) |
Definition at line 201 of file ngdialog.h.
|
Constructs an OpNameGalleryPropIndexDesc object.
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 }
|
|
|
|
Called when the combo-boxes associated with this descriptor are created.
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 }
|
|
Called when the combo-boxes associated with this descriptor are changed.
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 }
|
|
Sets the text in all the combos associated with this descriptor to the currently selected Name gallery property index.
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 }
|