21 #ifndef MOUSEMODEPARAMS_H
22 #define MOUSEMODEPARAMS_H
27 #include <vapor/common.h>
61 virtual void Validate(
int type);
63 virtual void restart();
79 static const char*
const *
GetIcon(
int modeIndex){
80 return _modeXMPIcon[modeIndex];
96 static int RegisterMouseMode(std::string tag,
int modeType,
const char* modeName,
const char*
const xpmIcon[]);
103 static int AddMouseMode(
const std::string paramsTag,
int manipType,
const char* name);
110 return _manipFromMode[modeIndex];
117 return _paramsFromTag[modeIndex];
129 static const string getModeName(
int index) {
return _modeName[index];}
134 static void RegisterMouseModes();
139 return ((
MouseModeParams*)Params::GetParamsInstance(_mouseModeParamsTag))->getCurrentMouseMode();
144 ((
MouseModeParams*)Params::GetParamsInstance(_mouseModeParamsTag))->setCurrentMouseMode(t);
148 return _modeName.size();
152 #ifndef DOXYGEN_SKIP_THIS
154 static const string _mouseModeParamsTag;
158 int setCurrentMouseMode(
int mode){
159 return SetValueLong(_mouseModeTag,
"Set mouse mode",(
long)mode);
161 mouseModeType getCurrentMouseMode(){
162 return (mouseModeType)GetValueLong(_mouseModeTag);
164 static const string _shortName;
165 static const string _mouseModeTag;
168 static vector<string> _paramsFromTag;
169 static map<string, int> _modeFromParams;
170 static vector<int> _manipFromMode;
171 static vector<string> _modeName;
172 static map<int,const char* const *> _modeXMPIcon;
175 #endif //DOXYGEN_SKIP_THIS
179 #endif //MOUSEMODEPARAMS_H
static std::string getModeTag(int modeIndex)
static const char *const * GetIcon(int modeIndex)
Static method identifies pixmap icon for each mode.
Nodes with state in Xml tree representation.
static int getModeManipType(int modeIndex)
static ParamsBase * CreateDefaultInstance()
const std::string getShortName()
static void SetCurrentMouseMode(mouseModeType t)
static int getNumMouseModes()
Static method indicates how many mouse modes are available.
static mouseModeType GetCurrentMouseMode()
static const string getModeName(int index)
A Params subclass for Params classes with one unique instance.
static int getModeFromParams(string tag)
A class for describing mouse modes in use in VAPOR.