Planeshift
pawsconfigautoexec.h
Go to the documentation of this file.
1 /*
2  * pawsconfigautoexec.h - Author: Fabian Stock (Aiwendil)
3  *
4  * Copyright (C) 2001-2008 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_AUTOEXEC_HEADER
21 #define PAWS_CONFIG_AUTOEXEC_HEADER
22 
23 // PAWS INCLUDES
24 #include "paws/pawswidget.h"
25 #include "pawsconfigwindow.h"
26 
27 class Autoexec;
28 class pawsCheckBox;
29 
34 {
35 public:
37  void drawFrame();
38 
39  virtual bool PostSetup();
40 
41  virtual bool Initialize();
42  virtual bool LoadConfig();
43  virtual bool SaveConfig();
44  virtual void SetDefault();
45 
46  bool OnChange(pawsWidget* /*widget*/) { dirty = true; return true; }
47  virtual bool OnButtonPressed(int /*button*/, int /*keyModifier*/, pawsWidget* /*widget*/)
49  {
50  dirty = true;
51  return true;
52  }
53  virtual void OnListAction( pawsListBox* selected, int status );
54 
55 private:
56  Autoexec *autoexec;
57 
58  pawsCheckBox *enabled;
59  pawsMultilineEditTextBox* generalCommandBox;
60  pawsMultilineEditTextBox* charCommandBox;
61 };
62 
64 
65 #endif //PAWS_CONFIG_AUTOEXEC_HEADER
virtual bool Initialize()
The main base widget that all other widgets should inherit from.
Definition: pawswidget.h:116
virtual void OnListAction(pawsListBox *selected, int status)
CREATE_PAWS_FACTORY(pawsConfigAutoexec)
A combination widget that has a check box and a text label.
Definition: pawscheckbox.h:48
class handling autoexecution of commands at the startup.
Definition: autoexec.h:36
pawsConfigAutoexec()
Constructor.
virtual bool LoadConfig()
Configuration screen for autoexec functions, on all chars or one char only.
A simple list box widget.
Definition: pawslistbox.h:202
virtual bool SaveConfig()
virtual void SetDefault()
virtual bool PostSetup()
bool OnChange(pawsWidget *)
virtual bool OnButtonPressed(int, int, pawsWidget *)
Called whenever a button is pressed.