Planeshift
pawsconfigdetails.h
Go to the documentation of this file.
1 /*
2  * pawsconfigdetails.h - Author: Ondrej Hurt
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_CONFIG_DETAILS_HEADER
21 #define PAWS_CONFIG_DETAILS_HEADER
22 
23 // CS INCLUDES
24 #include <csutil/array.h>
25 
26 // PAWS INCLUDES
27 #include "paws/pawswidget.h"
28 #include "paws/pawsbutton.h"
29 #include "paws/pawstextbox.h"
30 #include "paws/pawscrollbar.h"
31 #include "paws/pawscheckbox.h"
32 #include "pawsconfigwindow.h"
33 
34 
39 {
40 public:
41  // from pawsWidget:
42  virtual bool OnScroll( int scrollDirection, pawsScrollBar* widget );
43  virtual bool OnButtonPressed( int button, int keyModifier, pawsWidget* widget );
44  virtual bool PostSetup();
45 
46  // from pawsConfigSectionWindow:
47  virtual bool Initialize();
48  virtual bool LoadConfig();
49  virtual bool SaveConfig();
50  virtual void SetDefault();
51 
52 protected:
53 
55 
57  * fixedConfig;
58 
60  * minDistScroll,
61  * minFPSscroll,
62  * maxFPSscroll,
63  * capFPSscroll;
65  * minDistvalue,
66  * minFPSvalue,
67  * maxFPSvalue,
68  * capFPSvalue;
69 
70  int GetValue(const csString & name);
71  void ConstraintScrollBars();
72  void SetScrollValue(const csString & name, int val);
73  bool OnChange(pawsWidget* widget);
74  void SetModeVisibility();
75 };
76 
77 
79 
80 
81 #endif
82 
83 
void SetModeVisibility()
pawsScrollBar * minFPSscroll
pawsEditTextBox * minFPSvalue
pawsCheckBox * adaptCheck
The main base widget that all other widgets should inherit from.
Definition: pawswidget.h:116
A combination widget that has a check box and a text label.
Definition: pawscheckbox.h:48
pawsEditTextBox * capFPSvalue
pawsScrollBar * maxFPSscroll
pawsEditTextBox * maxFPSvalue
csString name
The name of this widget.
Definition: pawswidget.h:217
virtual bool Initialize()
virtual bool LoadConfig()
sets content of dialog according to current configuration
pawsEditTextBox * minDistvalue
pawsScrollBar * distScroll
pawsScrollBar * minDistScroll
An edit box widget/.
Definition: pawstextbox.h:409
pawsWidget * adaptConfig
int GetValue(const csString &name)
CREATE_PAWS_FACTORY(pawsConfigDetails)
virtual void SetDefault()
sets content of dialog according to default configuration
virtual bool SaveConfig()
remembers settings in-game and saves them permanently to a file also
virtual bool PostSetup()
This is called after the widget and all of it&#39;s children have been created.
A simple scroll bar widget.
Definition: pawscrollbar.h:64
configuration screen for FPS cap and min/max values
virtual bool OnButtonPressed(int button, int keyModifier, pawsWidget *widget)
Called whenever a button is pressed.
pawsScrollBar * capFPSscroll
pawsWidget * fixedConfig
virtual bool OnScroll(int scrollDirection, pawsScrollBar *widget)
Called whenever a window is scrolled.
bool OnChange(pawsWidget *widget)
Called whenever a widget is selected.
pawsEditTextBox * distvalue
void ConstraintScrollBars()
void SetScrollValue(const csString &name, int val)