[1812] | 1 | /************************************************************************
|
---|
| 2 | filename: CEGUIMenubar.h
|
---|
| 3 | created: 27/3/2005
|
---|
| 4 | author: Tomas Lindquist Olsen (based on code by Paul D Turner)
|
---|
| 5 |
|
---|
| 6 | purpose: Interface to base class for Menubar widget
|
---|
| 7 | *************************************************************************/
|
---|
| 8 | /*************************************************************************
|
---|
| 9 | Crazy Eddie's GUI System (http://www.cegui.org.uk)
|
---|
| 10 | Copyright (C)2004 - 2005 Paul D Turner (paul@cegui.org.uk)
|
---|
| 11 |
|
---|
| 12 | This library is free software; you can redistribute it and/or
|
---|
| 13 | modify it under the terms of the GNU Lesser General Public
|
---|
| 14 | License as published by the Free Software Foundation; either
|
---|
| 15 | version 2.1 of the License, or (at your option) any later version.
|
---|
| 16 |
|
---|
| 17 | This library is distributed in the hope that it will be useful,
|
---|
| 18 | but WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
| 19 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
---|
| 20 | Lesser General Public License for more details.
|
---|
| 21 |
|
---|
| 22 | You should have received a copy of the GNU Lesser General Public
|
---|
| 23 | License along with this library; if not, write to the Free Software
|
---|
| 24 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
---|
| 25 | *************************************************************************/
|
---|
| 26 | #ifndef _CEGUIMenubar_h_
|
---|
| 27 | #define _CEGUIMenubar_h_
|
---|
| 28 |
|
---|
| 29 | #include "CEGUIBase.h"
|
---|
| 30 | #include "CEGUIWindow.h"
|
---|
| 31 | #include "elements/CEGUIMenuBase.h"
|
---|
| 32 |
|
---|
| 33 |
|
---|
| 34 | #if defined(_MSC_VER)
|
---|
| 35 | # pragma warning(push)
|
---|
| 36 | # pragma warning(disable : 4251)
|
---|
| 37 | #endif
|
---|
| 38 |
|
---|
| 39 |
|
---|
| 40 | // Start of CEGUI namespace section
|
---|
| 41 | namespace CEGUI
|
---|
| 42 | {
|
---|
| 43 |
|
---|
| 44 | /*!
|
---|
| 45 | \brief
|
---|
| 46 | Base class for menu bars.
|
---|
| 47 | */
|
---|
| 48 | class CEGUIEXPORT Menubar : public MenuBase
|
---|
| 49 | {
|
---|
| 50 | public:
|
---|
| 51 | static const String EventNamespace; //!< Namespace for global events
|
---|
| 52 |
|
---|
| 53 | /*************************************************************************
|
---|
| 54 | Construction and Destruction
|
---|
| 55 | *************************************************************************/
|
---|
| 56 | /*!
|
---|
| 57 | \brief
|
---|
| 58 | Constructor for Menubar objects
|
---|
| 59 | */
|
---|
| 60 | Menubar(const String& type, const String& name);
|
---|
| 61 |
|
---|
| 62 |
|
---|
| 63 | /*!
|
---|
| 64 | \brief
|
---|
| 65 | Destructor for Menubar objects
|
---|
| 66 | */
|
---|
| 67 | virtual ~Menubar(void);
|
---|
| 68 |
|
---|
| 69 |
|
---|
| 70 | protected:
|
---|
| 71 | /*************************************************************************
|
---|
| 72 | Implementation Functions
|
---|
| 73 | *************************************************************************/
|
---|
| 74 | /*!
|
---|
| 75 | \brief
|
---|
| 76 | Setup size and position for the item widgets attached to this Menubar
|
---|
| 77 |
|
---|
| 78 | \return
|
---|
| 79 | Nothing.
|
---|
| 80 | */
|
---|
| 81 | virtual void layoutItemWidgets();
|
---|
| 82 |
|
---|
| 83 |
|
---|
| 84 | /*!
|
---|
| 85 | \brief
|
---|
| 86 | Resizes the menubar to exactly fit the content that is attached to it.
|
---|
| 87 |
|
---|
| 88 | \return
|
---|
| 89 | Nothing.
|
---|
| 90 | */
|
---|
| 91 | virtual Size getContentSize();
|
---|
| 92 |
|
---|
| 93 |
|
---|
| 94 | /*!
|
---|
| 95 | \brief
|
---|
| 96 | Return whether this window was inherited from the given class name at some point in the inheritance heirarchy.
|
---|
| 97 |
|
---|
| 98 | \param class_name
|
---|
| 99 | The class name that is to be checked.
|
---|
| 100 |
|
---|
| 101 | \return
|
---|
| 102 | true if this window was inherited from \a class_name. false if not.
|
---|
| 103 | */
|
---|
| 104 | virtual bool testClassName_impl(const String& class_name) const
|
---|
| 105 | {
|
---|
| 106 | if (class_name==(const utf8*)"Menubar") return true;
|
---|
| 107 | return MenuBase::testClassName_impl(class_name);
|
---|
| 108 | }
|
---|
| 109 |
|
---|
| 110 | };
|
---|
| 111 |
|
---|
| 112 | } // End of CEGUI namespace section
|
---|
| 113 |
|
---|
| 114 |
|
---|
| 115 | #if defined(_MSC_VER)
|
---|
| 116 | # pragma warning(pop)
|
---|
| 117 | #endif
|
---|
| 118 |
|
---|
| 119 | #endif // end of guard _CEGUIMenubar_h_
|
---|