| GSModeler Engine Version: 9.0 | |||||||||||
MaterialPanelInterfaceImp class
Public methods
Constructors Detailed descriptionThis class is the ancestor of the add-on created material dialog panels.
The add-on can customize the material settings dialog creating one or more new panel into the dialog using this interface.
class MaterialPanelInterface : MaterialPanelInterfaceImp {
private:
MaterialPanel* panel; // The new panel.
MaterialPanelObserver* observer; // The observer of the new panel.
public:
MaterialPanelInterface ();
explicit MaterialPanelInterface (GSModeler::MaterialDialogInterfaceImp* dialogInterface);
virtual void GetName (char* name);
virtual DG::Icon GetIcon (void);
virtual bool CreateTabPage (const DG::TabControl& tabControl);
virtual void DestroyTabPage (void);
virtual void MaterialChanged (GSModeler::Material* material);
virtual bool SetParametersToShow (MPI::NameList* parList, bool viewOnly);
};
The MaterialPanel class:
class MaterialPanel: public DG::TabPage // The class of the new material tabpage.
{
friend class MaterialPanelObserver;
private:
enum { // Identifyers of controls.
EditControlId = 1
};
DG::PosIntEdit editControl; // Controls.
GSModeler::Material* material; // The material.
public:
MaterialPanel (const DG::TabControl& tabControl, short resourceId);
void MaterialChanged ( GSModeler::Material* material);
};
The MaterialPanelObserver class:
class MaterialPanelObserver: private DG::PanelObserver, // The observer of the new panel.
public DG::PosIntEditObserver,
private DG::CompoundItemObserver
{
private:
MaterialPanel* panel; // Pointer to the panel.
public:
MaterialPanelObserver (MaterialPanel* panel);
~MaterialPanelObserver ();
virtual void PosIntEditChanged (const DG::PosIntEditChangeEvent& ev);
bool EnableControls (MPI::NameList* parList, bool viewOnly); // example function to be called
// from SetParametersToShow
};
See Also |
|||||||||||
| |