Planeshift
pawsconfigshortcut.h
Go to the documentation of this file.
1 /*
2  * pawsconfigshortcut.h - Author: Joe Lyon
3  *
4  * Copyright (C) 2013 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_CONFIG_SHORTCUT_HEADER
21 #define PAWS_CONFIG_SHORTCUT_HEADER
22 
23 
24 // PAWS INCLUDES
25 #include "paws/pawswidget.h"
26 #include "paws/pawscombo.h"
27 #include "pawsconfigwindow.h"
28 #include "util/psxmlparser.h"
29 #include "shortcutwindow.h"
30 
31 
32 class pawsCheckBox;
34 
35 
36 /*
37  * class pawsConfigShortcut is options screen for configuration of Shortcut Bar
38  * like buttons size, text size, spacing, font, ...
39  */
41 {
42 public:
44 
45  //from pawsWidget:
46  virtual bool PostSetup();
47  virtual bool OnScroll(int, pawsScrollBar*);
48  virtual bool OnButtonPressed(int, int, pawsWidget*);
49  virtual void OnListAction(pawsListBox* selected, int status);
50 
51 
52  // from pawsConfigSectionWindow:
53  virtual bool Initialize();
54  virtual bool LoadConfig();
55  virtual bool SaveConfig();
56  virtual void SetDefault();
57 
58  void PickText( const char * fontName, int size );
59 
60 
61 protected:
62 
66 
68 
72 
75 
79 
82 
89 
90  bool loaded;
91 
92 };
93 
94 
96 
97 
98 #endif
99 
pawsScrollBar * HPDangerLevel
pawsRadioButtonGroup * leftScroll
pawsScrollBar * textSize
The main base widget that all other widgets should inherit from.
Definition: pawswidget.h:116
csString fontName
Name of currently selected font.
Definition: pawswidget.h:305
A combination widget that has a check box and a text label.
Definition: pawscheckbox.h:48
virtual bool LoadConfig()
sets content of dialog according to current configuration
pawsScrollBar * buttonWidth
virtual bool PostSetup()
This is called after the widget and all of it's children have been created.
void PickText(const char *fontName, int size)
virtual bool OnButtonPressed(int, int, pawsWidget *)
Called whenever a button is pressed.
pawsRadioButtonGroup * rightScroll
pawsCheckBox * healthAndMana
virtual void SetDefault()
sets content of dialog according to default configuration
pawsScrollBar * HPFlashLevel
pawsComboBox * textFont
A scrolling list of buttons, each with an icon and which accepts drag-n-drop.
pawsScrollBar * HPWarnLevel
pawsScrollBar * ManaWarnLevel
A simple list box widget.
Definition: pawslistbox.h:202
CREATE_PAWS_FACTORY(pawsConfigShortcut)
pawsScrollBar * ManaDangerLevel
A simple scroll bar widget.
Definition: pawscrollbar.h:64
pawsRadioButtonGroup * enableScrollBar
pawsScrollBar * textSpacing
pawsScrollBar * buttonHeight
pawsRadioButtonGroup * editLockMode
virtual bool OnScroll(int, pawsScrollBar *)
Called whenever a window is scrolled.
pawsScrollMenu * MenuBar
A basic combo box widget.
Definition: pawscombo.h:53
virtual bool Initialize()
virtual bool SaveConfig()
remembers settings in-game and saves them permanently to a file also
pawsRadioButtonGroup * buttonWidthMode
virtual void OnListAction(pawsListBox *selected, int status)
Called whenever an item in a child list box is selected.
pawsCheckBox * buttonBackground
pawsScrollBar * ManaFlashLevel
pawsWidget * ShortcutMenu
This is a set of radio buttons and is used to control them.
Definition: pawsradio.h:131