Planeshift
eeditinputboxmanager.h
Go to the documentation of this file.
1 /*
2  * Author: Andrew Robberts
3  *
4  * Copyright (C) 2003 Atomic Blue (info@planeshift.it, http://www.atomicblue.org)
5  *
6  *
7  * This program is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU General Public License
9  * as published by the Free Software Foundation (version 2 of the License)
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU General Public License for more details.
14  * You should have received a copy of the GNU General Public License
15  * along with this program; if not, write to the Free Software
16  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
17  *
18  */
19 
20 #ifndef EEDIT_INPUTBOX_MANAGER_HEADER
21 #define EEDIT_INPUTBOX_MANAGER_HEADER
22 
23 #include <csutil/csstring.h>
24 #include <csgeom/vector3.h>
25 
26 
27 class PawsManager;
28 
29 class EEditSelectFloat;
30 class EEditSelectString;
31 class EEditSelectVec3;
32 class EEditSelectYesNo;
33 class EEditSelectList;
37 
44 {
45 public:
48 
55  bool LoadWidgets(PawsManager * paws);
56 
62  bool RegisterFactories() const;
63 
64  // Select Float
66  {
67  public:
68  virtual void Select(float value) = 0;
69  virtual ~iSelectFloat() {};
70  };
71  void SelectFloat(float startValue, iSelectFloat * callback);
72 
73  // Select String
75  {
76  public:
77  virtual void Select(const csString & value) = 0;
78  virtual ~iSelectString() {};
79  };
80  void SelectString(const csString & startValue, iSelectString * callback);
81 
82  // Select 3D Vector
84  {
85  public:
86  virtual void Select(const csVector3 & value) = 0;
87  virtual ~iSelectVec3() {};
88  };
89  void SelectVec3(const csVector3 & startValue, iSelectVec3 * callback);
90 
91  // Select YesNo
93  {
94  public:
95  virtual void Select(bool value) = 0;
96  virtual ~iSelectYesNo() {};
97  };
98  void SelectYesNo(bool startValue, iSelectYesNo * callback);
99 
100  // Select List
102  {
103  public:
104  virtual void Select(const csString & value, size_t index) = 0;
105  virtual ~iSelectList() {};
106  };
107  void SelectList(csString * list, size_t listCount, const csString & defaultValue, iSelectList * callback);
108 
109  // Select NewAnchor
111  {
112  public:
113  virtual void Select(const csString & newName, const csString & newAnchorType) = 0;
114  virtual ~iSelectNewAnchor() {};
115  };
116  void SelectNewAnchor(iSelectNewAnchor * callback);
117 
118  // Select EditAnchor
120  {
121  public:
122  virtual void ChangeName(const csString & newName) = 0;
123  virtual void DeleteAnchor() = 0;
124  virtual ~iSelectEditAnchor() {};
125  };
126  void SelectEditAnchor(const csString & currName, iSelectEditAnchor * callback);
127 
128  // Select NewAnchorKeyFrame
130  {
131  public:
132  virtual void Select(float newTime) = 0;
134  };
136 
138  {
139  public:
140  virtual void Select(float newTime) = 0;
142  };
143 
144 private:
145 
146  EEditSelectFloat * selectFloat;
147  EEditSelectString * selectString;
148  EEditSelectVec3 * selectVec3;
149  EEditSelectYesNo * selectYesNo;
150  EEditSelectList * selectList;
151  EEditSelectNewAnchor * selectNewAnchor;
152  EEditSelectEditAnchor * selectEditAnchor;
153  EEditSelectNewAnchorKeyFrame * selectNewAnchorKeyFrame;
154 };
155 
158 #endif
virtual void Select(float value)=0
void SelectList(csString *list, size_t listCount, const csString &defaultValue, iSelectList *callback)
bool LoadWidgets(PawsManager *paws)
Loads all the toolbox widgets.
Main PlaneShift Window manager.
Definition: pawsmanager.h:82
void SelectNewAnchorKeyFrame(iSelectNewAnchorKeyFrame *callback)
bool RegisterFactories() const
Registers all the factories needed by the toolboxes.
A dialog window to select a new effect anchor keyframe.
A dialog window to select a yes or no value.
A dialog window to select a 3D vector value.
void SelectEditAnchor(const csString &currName, iSelectEditAnchor *callback)
A dialog window to edit effect anchor.
A class that manages the inputbox windows.
void SelectString(const csString &startValue, iSelectString *callback)
A dialog window to select a floating point value.
A dialog window to select from a list of values.
void SelectVec3(const csVector3 &startValue, iSelectVec3 *callback)
A dialog window to select a new effect anchor.
void SelectYesNo(bool startValue, iSelectYesNo *callback)
void SelectNewAnchor(iSelectNewAnchor *callback)
A dialog window to select a string value.
void SelectFloat(float startValue, iSelectFloat *callback)