source: OGRE/trunk/ogre_dependencies/Dependencies/include/CEGUI/elements/CEGUIItemEntry.h @ 692

Revision 692, 3.5 KB checked in by mattausch, 19 years ago (diff)

adding ogre 1.2 and dependencies

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    \return
96        Nothing
97    */
98    virtual void    populateRenderCahce() {};
99
100
101        /*!
102        \brief
103                Return whether this window was inherited from the given class name at some point in the inheritance heirarchy.
104
105        \param class_name
106                The class name that is to be checked.
107
108        \return
109                true if this window was inherited from \a class_name. false if not.
110        */
111        virtual bool    testClassName_impl(const String& class_name) const
112        {
113                if (class_name==(const utf8*)"ItemEntry")       return true;
114                return Window::testClassName_impl(class_name);
115        }
116   
117};
118
119} // End of  CEGUI namespace section
120
121
122#if defined(_MSC_VER)
123#       pragma warning(pop)
124#endif
125
126
127#endif  // end of guard _CEGUIItemEntry_h_
Note: See TracBrowser for help on using the repository browser.