Planeshift
peskinselector.h
Go to the documentation of this file.
1 /*
2 * peskinselector.h
3 *
4 * Copyright (C) 2005 Atomic Blue (info@planeshift.it, http://www.atomicblue.org)
5 *
6 * Credits :
7 * Michael Cummings [Borrillis] <cummings.michael@gmail.com>
8 *
9 * This program is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU General Public License
11 * as published by the Free Software Foundation (version 2
12 * of the License).
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
20 *
21 * Creation Date: 6/23/2005
22 * Description : new widget to select skin
23 *
24 */
25 
26 #ifndef PAWS_SKIN_SELECTOR_WINDOW
27 #define PAWS_SKIN_SELECTOR_WINDOW
28 
29 #include <iutil/vfs.h>
30 #include <csutil/ref.h>
31 #include "paws/pawswidget.h"
32 #include <iutil/cfgmgr.h>
33 
34 class pawsComboBox;
35 class pawsButton;
37 class pawsCheckBox;
38 
39 class peSkinSelector : public pawsWidget
40 {
41 public:
43 
44  bool OnButtonPressed( int mouseButton, int keyModifier, pawsWidget* widget );
45  void OnListAction( pawsListBox* widget, int status );
46  bool PostSetup();
47 
48  // Used to load a resource from the new skin
49  bool PreviewResource(const char* resource,const char* resname,const char* mountPath);
50 
51  void PreviewSkin(const char* name);
52 private:
53 
54  csString mountedPath;
55  csString currentSkin;
56 
57  csRef<iVFS> vfs;
58  csRef<iConfigManager> config;
59 
60  pawsComboBox* skins;
62  pawsWidget* preview; // The preview widget
63  pawsButton* previewBtn; // The preview button
64  pawsCheckBox* previewBox; // The preview checkbox
65 };
66 
68 
69 #endif
70 
71 
The main base widget that all other widgets should inherit from.
Definition: pawswidget.h:116
void PreviewSkin(const char *name)
bool PostSetup()
This is called after the widget and all of it&#39;s children have been created.
A combination widget that has a check box and a text label.
Definition: pawscheckbox.h:48
csString name
The name of this widget.
Definition: pawswidget.h:217
void OnListAction(pawsListBox *widget, int status)
Called whenever an item in a child list box is selected.
A simple list box widget.
Definition: pawslistbox.h:202
bool PreviewResource(const char *resource, const char *resname, const char *mountPath)
CREATE_PAWS_FACTORY(peSkinSelector)
A simple button widget.
Definition: pawsbutton.h:43
A basic combo box widget.
Definition: pawscombo.h:53
bool OnButtonPressed(int mouseButton, int keyModifier, pawsWidget *widget)
Called whenever a button is pressed.