source: OGRE/trunk/ogrenew/Dependencies/include/CEGUI/elements/CEGUIItemEntry.h @ 657

Revision 657, 3.6 KB checked in by mattausch, 19 years ago (diff)

added ogre dependencies and patched ogre sources

Line 
1/************************************************************************
2        filename:       CEGUIItemEntry.h
3        created:        31/3/2005
4        author:         Tomas Lindquist Olsen (based on code by Paul D Turner)
5       
6        purpose:        Interface to base class for ItemEntry 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 _CEGUIItemEntry_h_
27#define _CEGUIItemEntry_h_
28
29#include "CEGUIBase.h"
30#include "CEGUIWindow.h"
31
32
33#if defined(_MSC_VER)
34#       pragma warning(push)
35#       pragma warning(disable : 4251)
36#endif
37
38
39// Start of CEGUI namespace section
40namespace CEGUI
41{
42
43/*!
44\brief
45        Base class for item type widgets.
46*/
47class CEGUIEXPORT ItemEntry : public Window
48{
49public:
50        /*************************************************************************
51                Abstract Implementation Functions (must be provided by derived class)
52        *************************************************************************/
53        /*!
54        \brief
55                Return the "optimal" size for the item
56       
57        \return
58                Size describing the size in pixel that this ItemEntry's content requires
59                for non-clipped rendering
60        */
61        virtual Size getItemPixelSize(void) = 0;
62
63        /*************************************************************************
64                Construction and Destruction
65        *************************************************************************/
66        /*!
67        \brief
68                Constructor for ItemEntry objects
69        */
70        ItemEntry(const String& type, const String& name);
71
72
73        /*!
74        \brief
75                Destructor for ItemEntry objects
76        */
77        virtual ~ItemEntry(void);
78
79
80protected:
81        /*************************************************************************
82                Implementation Functions
83        *************************************************************************/
84        /*!
85        \brief
86                Add itementry specific events
87        */
88        void    addItemEntryEvents(void);
89
90
91        /*!
92    \brief
93        Perform the actual rendering for this Window.
94
95    \param z
96        float value specifying the base Z co-ordinate that should be used when rendering
97
98    \return
99        Nothing
100    */
101    virtual void    drawSelf(float z) {};
102
103
104        /*!
105        \brief
106                Return whether this window was inherited from the given class name at some point in the inheritance heirarchy.
107
108        \param class_name
109                The class name that is to be checked.
110
111        \return
112                true if this window was inherited from \a class_name. false if not.
113        */
114        virtual bool    testClassName_impl(const String& class_name) const
115        {
116                if (class_name==(const utf8*)"ItemEntry")       return true;
117                return Window::testClassName_impl(class_name);
118        }
119   
120};
121
122} // End of  CEGUI namespace section
123
124
125#if defined(_MSC_VER)
126#       pragma warning(pop)
127#endif
128
129
130#endif  // end of guard _CEGUIItemEntry_h_
Note: See TracBrowser for help on using the repository browser.