Planeshift
pawsconfigspellchecker.h
Go to the documentation of this file.
1 /*
2  * pawsconfigspellchecker.h - Author: Fabian Stock (AiwendilH@googlemail.com)
3  *
4  * Copyright (C) 2001-2011 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_SPELLCHECKER_HEADER
21 #define PAWS_CONFIG_SPELLCHECKER_HEADER
22 
23 // PAWS INCLUDES
24 #include "paws/pawswidget.h"
25 #include "paws/pawscheckbox.h"
26 #include "pawsconfigwindow.h"
27 
28 
29 class pawsChatWindow;
30 
35 {
36 public:
38 
39  //from pawsWidget:
40  virtual bool PostSetup();
41 
42  // from pawsConfigSectionWindow:
43  virtual bool Initialize();
44  virtual bool LoadConfig();
45  virtual bool SaveConfig();
46  virtual void SetDefault();
47 
48  // from pawsWidget
49  bool OnChange(pawsWidget* /*widget*/) { dirty = true; return true; }
50  virtual bool OnButtonPressed(int /*button*/, int /*keyModifier*/, pawsWidget* /*widget*/)
51  {
52  dirty = true;
53  return true;
54  }
55  virtual void OnListAction(pawsListBox* /*selected*/, int /*status*/) {dirty = true;};
56 
57 private:
65  bool WordExists(csRef<iSpellChecker> spellChecker, csString word);
66  pawsChatWindow* chatWindow;
67  // needed gui elemets
68  pawsMultilineEditTextBox* personalDictBox;
69  pawsCheckBox* enabled;
70  pawsEditTextBox* colorR;
71  pawsEditTextBox* colorG;
72  pawsEditTextBox* colorB;
73 };
74 
76 
77 #endif //PAWS_CONFIG_SPELLCHECKER_HEADER
CREATE_PAWS_FACTORY(pawsConfigSpellChecker)
The main base widget that all other widgets should inherit from.
Definition: pawswidget.h:116
virtual bool LoadConfig()
sets content of dialog according to current configuration
A combination widget that has a check box and a text label.
Definition: pawscheckbox.h:48
Main Chat window for PlaneShift.
Definition: chatwindow.h:133
bool OnChange(pawsWidget *)
Called whenever a widget is selected.
An edit box widget/.
Definition: pawstextbox.h:409
virtual bool PostSetup()
This is called after the widget and all of it&#39;s children have been created.
A simple list box widget.
Definition: pawslistbox.h:202
virtual bool OnButtonPressed(int, int, pawsWidget *)
Called whenever a button is pressed.
configuration screen for spellchecker, on/off and colors
virtual bool Initialize()
virtual bool SaveConfig()
remembers settings in-game and saves them permanently to a file also
virtual void SetDefault()
sets content of dialog according to default configuration
virtual void OnListAction(pawsListBox *, int)
Called whenever an item in a child list box is selected.