12 #ifndef __BM_ParmState_H__
13 #define __BM_ParmState_H__
26 class PSI2_DialogPRMExported;
27 class BM_ParmStateUndo;
35 friend class BM_ParmStateUndo;
40 const char *vname = 0,
41 const char *english = 0,
42 const char *
const *vnames = 0,
54 virtual void prepareDialogForDisplay()
const;
55 virtual int hasDialog ()
const;
56 virtual UI_Feel *dialogFeel()
const;
63 UI_Feel *extraDialogFeel()
const;
71 virtual bool getStateParmNames(
UT_StringArray &ret,
const char* prefix=
nullptr );
74 virtual bool pressStateButton(
const char *
name);
81 virtual const char *getPresetTypeName()
const = 0;
87 const char **)
override;
107 void setXYParm (
const char *
name,
110 void setXYZParm(
const char *
name,
125 bool parmExists(
const char *
name )
const;
126 bool parmExists(
int index )
const;
130 void getParm(
const char *
name,
int &
value,
143 void getXYParm (
const char *
name,
int &
x,
int &
y,
145 void getXYZParm(
const char *
n,
153 getParm(index, v,
t);
160 void getXYZParm(
int index,
165 void overwriteParmDefault (
const char *
name,
fpreal t=0);
166 void overwriteXYParmDefault (
const char *
name,
fpreal t=0);
167 void overwriteXYZParmDefault(
const char *
name,
fpreal t=0);
171 void overwriteParmDefaults();
174 virtual int disableParms();
175 int enableParm(
const char *
name,
int onoff,
int refresh=1);
176 int enableParm(
int index,
int onoff,
int refresh=1);
179 bool setVisibleState(
int pi,
bool state,
bool refresh=
true);
180 bool setVisibleState(
const char *pn,
bool state,
184 void refreshParm (
int index);
194 bool saveParmForUndo(
int index,
bool force =
false );
201 virtual int handleSaveParmForUndo(
int index );
205 virtual int handleParameterUndo(
int parm_index );
210 {
return mySaveParmForUndoFlag; };
212 { mySaveParmForUndoFlag = (onoff != 0); };
214 PSI2_DialogPRM* getParmDialog();
222 static void saveParmForUndoCallback(
void * state,
239 PSI2_DialogPRMExported *myParmToolbox;
243 PSI2_DialogPRM *myParmDialog;
244 PSI2_DialogPRM *myExtraParmDialog;
247 unsigned myOwnParmsFlag:1,
248 mySaveParmForUndoFlag:1;
int getSaveParmForUndoFlag()
void setSaveParmForUndoFlag(int onoff)
virtual int handleParameterEvent(UI_Event *event)
GLdouble GLdouble GLdouble z
void getParm(int index, bool &value, fpreal t=0) const
const UT_String & name() const
void getParm(const char *name, bool &value, fpreal t=0) const
const char * className() const override
UI_Value * parmValue() const
GLuint const GLchar * name
virtual UI_Feel * getToolbox(int index) const
SIM_API const UT_StringHolder force
__hostdev__ constexpr T pi()
Pi constant taken from Boost to match old behaviour.
const UT_String & english() const
void initApplication(UI_Manager *, int, const char **) override
void(UI_Object::* UI_EventMethod)(UI_Event *)
virtual int getToolboxCount() const
PRM_ParmList * parameters() const