Planeshift

pemenu.h

Go to the documentation of this file.
00001 /*
00002 * peMenu.h
00003 *
00004 * Copyright (C) 2005 Atomic Blue ([email protected], http://www.atomicblue.org)
00005 *
00006 * Credits : 
00007 *            Michael Cummings <[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: 1/20/2005
00022 * Description : menu widget for pawseditor
00023 *
00024 */
00025 
00026 #ifndef PAWS_EDITOR_MENU_HEADER
00027 #define PAWS_EDITOR_MENU_HEADER
00028 
00029 #include "paws/pawswidget.h"
00030 #include "paws/pawsfilenavigation.h"
00031 
00032 struct iView;
00033 struct iVFS;
00034 
00035 class pawsEditTextBox;
00036 class pawsComboBox;
00037 class pawsButton;
00038 class pawsGenericView;
00039 
00040 class peMenu : public pawsWidget
00041 {
00042 public:
00043     // implemented virtual functions from pawsWidgets
00044     bool PostSetup();
00045     bool OnButtonPressed( int mouseButton, int keyModifier, pawsWidget* widget );
00046 
00047 private:
00048 
00052     class OnFileSelected : public iOnFileSelectedAction
00053     {
00054         private:
00055             peMenu *parent;
00056             int buttonID;
00057 
00058         public:
00065             OnFileSelected( peMenu *Parent, int button ) { parent = Parent; buttonID = button; }
00066 
00070             virtual ~OnFileSelected( ) { }
00071 
00077             virtual void Execute(const csString & text);
00078 
00079     };
00080 
00081 };
00082 
00083 CREATE_PAWS_FACTORY( peMenu );
00084 
00085 #endif