Planeshift
pawsactivemagicwindow.h
Go to the documentation of this file.
1 /*
2  * pawsactivemagicwindow.h
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 PAWS_ACTIVEMAGIC_WINDOW_HEADER
21 #define PAWS_ACTIVEMAGIC_WINDOW_HEADER
22 
23 #include "paws/pawswidget.h"
24 class pawsTextBox;
25 class pawsListBox;
26 class pawsMessageTextBox;
27 class pawsProgressBar;
28 class pawsCheckBox;
29 class pawsConfigPopup;
30 
31 #include "net/cmdbase.h"
32 #include "net/subscriber.h"
33 #include "gui/pawscontrolwindow.h"
34 #include "gui/pawsscrollmenu.h"
35 
36 #define CONFIG_ACTIVEMAGIC_FILE_NAME "/planeshift/userdata/options/activemagic.xml"
37 #define CONFIG_ACTIVEMAGIC_FILE_NAME_DEF "/planeshift/data/options/activemagic_def.xml"
38 
43 {
44 public:
45 
48 
49  bool PostSetup();
50  bool Setup(iDocumentNode* node);
51 
52  void HandleMessage(MsgEntry* me);
53  void OnResize();
54 
55  virtual void Close();
56  virtual void Hide();
57  virtual void Show();
58 
62  bool LoadSetting();
63 
64  void SaveSetting();
65 
66  void AutoResize();
67 
73 
74  void SetUseImages( bool setting );
75  bool GetUseImages();
76 
77  void SetAutoResize( bool setting );
78  bool GetAutoResize();
79 
80  void SetShowEffects( bool setting );
81  bool GetShowEffects();
82 
83  void SetShowWindow( bool setting );
84  bool GetShowWindow();
85 
89  char const * GetFontName()
90  {
91  return fontName.GetData();
92  }
93 
94  int GetWarnMode();
95  void SetWarnMode(int i);
96  float GetWarnLevel();
97  void SetWarnLevel(float val, bool low);
98 
99  int GetDangerMode();
100  void SetDangerMode(int i);
101  float GetDangerLevel();
102  void SetDangerLevel(float val, bool low);
103 
104  int GetFlashMode();
105  void SetFlashMode(int i);
106  float GetFlashLevel();
107  void SetFlashLevel(float val, bool low);
108 
109 
110 private:
111 
112  csRef<iVFS> vfs;
113 
114  bool useImages,
115  useTimers,
116  autoResize,
117  showEffects,
118  show;
119 
120 
121  bool warnLow,
122  dangerLow,
123  flashLow;
124 
125  float warnLevel,
126  dangerLevel,
127  flashLevel;
128 
129  int warnMode,
130  dangerMode,
131  flashMode;
132 
133  pawsScrollMenu* buffList;
134  uint32_t lastIndex;
135 
136  pawsConfigPopup* configPopup;
137 
138  int Orientation;
139 
140 
141 };
142 
144 
145 #endif
This is a window that is controlled by a button on the control bar.
void SetFlashMode(int i)
csString fontName
Name of currently selected font.
Definition: pawswidget.h:305
pawsCheckBox * showWindow
Check-box which gives the user a opportunity to show or not to show the Active Magic Window...
A combination widget that has a check box and a text label.
Definition: pawscheckbox.h:48
bool LoadSetting()
Loads the configuration file.
void SetUseImages(bool setting)
void SetShowEffects(bool setting)
The structure of 1 queue entry (pointer to a message)
Definition: message.h:143
void SetWarnLevel(float val, bool low)
virtual void Close()
Simply calls Hide() unless overidden.
void HandleMessage(MsgEntry *me)
char const * GetFontName()
return the name of the font
CREATE_PAWS_FACTORY(pawsActiveMagicWindow)
A scrolling list of buttons, each with an icon and which accepts drag-n-drop.
A simple list box widget.
Definition: pawslistbox.h:202
virtual void Show()
When the window is opened let the controller window know about it.
void SetShowWindow(bool setting)
void SetDangerLevel(float val, bool low)
void OnResize()
Sets the new position of the close button.
This is a special type of text box that is used for messages.
Definition: pawstextbox.h:285
void SetFlashLevel(float val, bool low)
bool Setup(iDocumentNode *node)
Setup this widget.
void SetWarnMode(int i)
Window with current buffs and spells active on the character, and timer for buff to go away...
bool PostSetup()
This is called after the widget and all of it&#39;s children have been created.
void SetDangerMode(int i)
void SetAutoResize(bool setting)
virtual void Hide()
When the window is closed let the controller window know about it.
A basic text box widget.
Definition: pawstextbox.h:42