Planeshift

peskinselector.h

Go to the documentation of this file.
00001 /*
00002 * peskinselector.h
00003 *
00004 * Copyright (C) 2005 Atomic Blue ([email protected], http://www.atomicblue.org)
00005 *
00006 * Credits : 
00007 *            Michael Cummings [Borrillis] <[email protected]>
00008 *
00009 * This program is free software; you can redistribute it and/or
00010 * modify it under the terms of the GNU General Public License
00011 * as published by the Free Software Foundation (version 2
00012 * of the License).
00013 * This program is distributed in the hope that it will be useful,
00014 * but WITHOUT ANY WARRANTY; without even the implied warranty of
00015 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
00016 * GNU General Public License for more details.
00017 * You should have received a copy of the GNU General Public License
00018 * along with this program; if not, write to the Free Software
00019 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
00020 *
00021 * Creation Date: 6/23/2005
00022 * Description : new widget to select skin
00023 *
00024 */
00025 
00026 #ifndef PAWS_SKIN_SELECTOR_WINDOW
00027 #define PAWS_SKIN_SELECTOR_WINDOW
00028 
00029 #include <iutil/vfs.h>
00030 #include <csutil/ref.h>
00031 #include "paws/pawswidget.h"
00032 #include <iutil/cfgmgr.h>
00033 
00034 class pawsComboBox;
00035 class pawsButton;
00036 class pawsMultiLineTextBox;
00037 class pawsCheckBox;
00038 
00039 class peSkinSelector : public pawsWidget
00040 {
00041 public:
00042     ~peSkinSelector();
00043     
00044     bool OnButtonPressed( int mouseButton, int keyModifier, pawsWidget* widget );
00045     void OnListAction( pawsListBox* widget, int status );
00046     bool PostSetup();
00047 
00048     // Used to load a resource from the new skin
00049     bool PreviewResource(const char* resource,const char* resname,const char* mountPath);
00050 
00051     void PreviewSkin(const char* name);
00052 private:
00053 
00054     csString mountedPath;
00055     csString currentSkin;
00056 
00057     csRef<iVFS> vfs;
00058     csRef<iConfigManager> config;
00059 
00060     pawsComboBox* skins;
00061     pawsMultiLineTextBox* desc;
00062     pawsWidget* preview; // The preview widget
00063     pawsButton* previewBtn; // The preview button
00064     pawsCheckBox* previewBox; // The preview checkbox
00065 };
00066 
00067 CREATE_PAWS_FACTORY( peSkinSelector );
00068 
00069 #endif
00070 
00071