Planeshift

pawsgmgui.h

Go to the documentation of this file.
00001 /*
00002 * pawsgmgui.h - Author: Andrew Robberts
00003 *
00004 * Copyright (C) 2003 Atomic Blue ([email protected], http://www.atomicblue.org)
00005 *
00006 *
00007 * This program is free software; you can redistribute it and/or
00008 * modify it under the terms of the GNU General Public License
00009 * as published by the Free Software Foundation (version 2 of the License)
00010 * This program is distributed in the hope that it will be useful,
00011 * but WITHOUT ANY WARRANTY; without even the implied warranty of
00012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013 * GNU General Public License for more details.
00014 * You should have received a copy of the GNU General Public License
00015 * along with this program; if not, write to the Free Software
00016 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
00017 *
00018 */
00019 
00020 #ifndef PAWS_GMGUI_WINDOW
00021 #define PAWS_GMGUI_WINDOW
00022 // PS INCLUDES
00023 #include "paws/pawswidget.h"
00024 #include "paws/pawsbutton.h"
00025 #include "paws/pawstextbox.h"
00026 #include "paws/pawscheckbox.h"
00027 #include "paws/pawslistbox.h"
00028 #include "paws/pawsstringpromptwindow.h"
00029 #include "net/cmdbase.h"
00030 #include "chatwindow.h"
00031 #include "psclientchar.h"
00032 
00033 class pawsGmGUIWindow : public pawsWidget, public psCmdBase, public iOnStringEnteredAction
00034 {
00035     bool isVisible;
00036     bool isInvincible;
00037     bool isViewAllObjects;
00038     bool isNeverTired;
00039     bool isQuestTester;
00040     bool isInfiniteMana;
00041     bool isFiniteInv;
00042     bool isSafeFall;
00043     bool isInstantCast;
00044     bool isGiveKillExp;
00045     bool isAttackable;
00046     bool isBuddyHide;
00047 
00048 public:
00049     pawsGmGUIWindow();
00050 
00051     virtual ~pawsGmGUIWindow();
00052 
00054     void HandleMessage( MsgEntry* message );
00055 
00057     const char* HandleCommand(const char* cmd);
00058 
00059     virtual bool PostSetup();
00060     virtual void Show();
00061     virtual void OnListAction( pawsListBox* widget, int status );
00062 
00063     void HideWidget(const char* name);
00064     void ShowWidget(const char* name);
00065 
00067     bool OnButtonReleased(int mouseButton, int keyModifier, pawsWidget* reporter);
00068 
00069     const char* GetSelectedName();
00070     const char* GetSelectedSector();
00071     int GetSelectedGender();
00072 
00073     void QueryServer();
00074 
00075     void OnStringEntered(const char *name,int param,const char *value);
00076 
00081     int GetCurrentTab();
00082 
00083 protected:
00084     pawsChatWindow* chatWindow;
00085     CmdHandler *cmdsource;
00086 
00087     csRef<iVFS> vfs;
00088 
00089     void SetSecurity();
00090 
00091     void QueryActionLocations();
00092 
00093     void FillPlayerList(psGMGuiMessage& msg);
00094     void FillActionList(psMapActionMessage& msg);
00095 
00096     pawsListBox* playerList;
00097     pawsListBox* actionList;
00098 
00099     pawsTextBox* playerCount;
00100 
00101     // Widgets in the Attributes tab
00102     pawsCheckBox* cbInvincible;
00103     pawsCheckBox* cbInvisible;
00104     pawsCheckBox* cbViewAll;
00105     pawsCheckBox* cbNeverTired;
00106     pawsCheckBox* cbNoFallDamage;
00107     pawsCheckBox* cbInfiniteInventory;
00108     pawsCheckBox* cbQuestTester;
00109     pawsCheckBox* cbInfiniteMana;
00110     pawsCheckBox* cbInstantCast;
00111     pawsCheckBox* cbGiveKillExp;
00112     pawsCheckBox* cbAttackable;
00113     pawsCheckBox* cbBuddyHide;
00114 
00115     csString cmdToExectute;
00116     csString actionXML;
00117 };
00118 CREATE_PAWS_FACTORY( pawsGmGUIWindow );
00119 #endif