diff options
Diffstat (limited to '')
-rw-r--r-- | libraries/irrlicht-1.8/include/IGUIElementFactory.h | 132 |
1 files changed, 66 insertions, 66 deletions
diff --git a/libraries/irrlicht-1.8/include/IGUIElementFactory.h b/libraries/irrlicht-1.8/include/IGUIElementFactory.h index 348038a..ca2df8b 100644 --- a/libraries/irrlicht-1.8/include/IGUIElementFactory.h +++ b/libraries/irrlicht-1.8/include/IGUIElementFactory.h | |||
@@ -1,66 +1,66 @@ | |||
1 | // Copyright (C) 2002-2012 Nikolaus Gebhardt | 1 | // Copyright (C) 2002-2012 Nikolaus Gebhardt |
2 | // This file is part of the "Irrlicht Engine". | 2 | // This file is part of the "Irrlicht Engine". |
3 | // For conditions of distribution and use, see copyright notice in irrlicht.h | 3 | // For conditions of distribution and use, see copyright notice in irrlicht.h |
4 | 4 | ||
5 | #ifndef __I_GUI_ELEMENT_FACTORY_H_INCLUDED__ | 5 | #ifndef __I_GUI_ELEMENT_FACTORY_H_INCLUDED__ |
6 | #define __I_GUI_ELEMENT_FACTORY_H_INCLUDED__ | 6 | #define __I_GUI_ELEMENT_FACTORY_H_INCLUDED__ |
7 | 7 | ||
8 | #include "IReferenceCounted.h" | 8 | #include "IReferenceCounted.h" |
9 | #include "EGUIElementTypes.h" | 9 | #include "EGUIElementTypes.h" |
10 | 10 | ||
11 | namespace irr | 11 | namespace irr |
12 | { | 12 | { |
13 | 13 | ||
14 | namespace gui | 14 | namespace gui |
15 | { | 15 | { |
16 | class IGUIElement; | 16 | class IGUIElement; |
17 | 17 | ||
18 | //! Interface making it possible to dynamically create GUI elements | 18 | //! Interface making it possible to dynamically create GUI elements |
19 | /** To be able to add custom elements to Irrlicht and to make it possible for the | 19 | /** To be able to add custom elements to Irrlicht and to make it possible for the |
20 | scene manager to save and load them, simply implement this interface and register it | 20 | scene manager to save and load them, simply implement this interface and register it |
21 | in your gui environment via IGUIEnvironment::registerGUIElementFactory. | 21 | in your gui environment via IGUIEnvironment::registerGUIElementFactory. |
22 | Note: When implementing your own element factory, don't call IGUIEnvironment::grab() to | 22 | Note: When implementing your own element factory, don't call IGUIEnvironment::grab() to |
23 | increase the reference counter of the environment. This is not necessary because the | 23 | increase the reference counter of the environment. This is not necessary because the |
24 | it will grab() the factory anyway, and otherwise cyclic references will be created. | 24 | it will grab() the factory anyway, and otherwise cyclic references will be created. |
25 | */ | 25 | */ |
26 | class IGUIElementFactory : public virtual IReferenceCounted | 26 | class IGUIElementFactory : public virtual IReferenceCounted |
27 | { | 27 | { |
28 | public: | 28 | public: |
29 | 29 | ||
30 | //! adds an element to the gui environment based on its type id | 30 | //! adds an element to the gui environment based on its type id |
31 | /** \param type: Type of the element to add. | 31 | /** \param type: Type of the element to add. |
32 | \param parent: Parent scene node of the new element, can be null to add to the root. | 32 | \param parent: Parent scene node of the new element, can be null to add to the root. |
33 | \return Pointer to the new element or null if not successful. */ | 33 | \return Pointer to the new element or null if not successful. */ |
34 | virtual IGUIElement* addGUIElement(EGUI_ELEMENT_TYPE type, IGUIElement* parent=0) = 0; | 34 | virtual IGUIElement* addGUIElement(EGUI_ELEMENT_TYPE type, IGUIElement* parent=0) = 0; |
35 | 35 | ||
36 | //! adds a GUI element to the GUI Environment based on its type name | 36 | //! adds a GUI element to the GUI Environment based on its type name |
37 | /** \param typeName: Type name of the element to add. | 37 | /** \param typeName: Type name of the element to add. |
38 | \param parent: Parent scene node of the new element, can be null to add it to the root. | 38 | \param parent: Parent scene node of the new element, can be null to add it to the root. |
39 | \return Pointer to the new element or null if not successful. */ | 39 | \return Pointer to the new element or null if not successful. */ |
40 | virtual IGUIElement* addGUIElement(const c8* typeName, IGUIElement* parent=0) = 0; | 40 | virtual IGUIElement* addGUIElement(const c8* typeName, IGUIElement* parent=0) = 0; |
41 | 41 | ||
42 | //! Get amount of GUI element types this factory is able to create | 42 | //! Get amount of GUI element types this factory is able to create |
43 | virtual s32 getCreatableGUIElementTypeCount() const = 0; | 43 | virtual s32 getCreatableGUIElementTypeCount() const = 0; |
44 | 44 | ||
45 | //! Get type of a createable element type | 45 | //! Get type of a createable element type |
46 | /** \param idx: Index of the element type in this factory. Must be a value between 0 and | 46 | /** \param idx: Index of the element type in this factory. Must be a value between 0 and |
47 | getCreatableGUIElementTypeCount() */ | 47 | getCreatableGUIElementTypeCount() */ |
48 | virtual EGUI_ELEMENT_TYPE getCreateableGUIElementType(s32 idx) const = 0; | 48 | virtual EGUI_ELEMENT_TYPE getCreateableGUIElementType(s32 idx) const = 0; |
49 | 49 | ||
50 | //! Get type name of a createable GUI element type by index | 50 | //! Get type name of a createable GUI element type by index |
51 | /** \param idx: Index of the type in this factory. Must be a value between 0 and | 51 | /** \param idx: Index of the type in this factory. Must be a value between 0 and |
52 | getCreatableGUIElementTypeCount() */ | 52 | getCreatableGUIElementTypeCount() */ |
53 | virtual const c8* getCreateableGUIElementTypeName(s32 idx) const = 0; | 53 | virtual const c8* getCreateableGUIElementTypeName(s32 idx) const = 0; |
54 | 54 | ||
55 | //! returns type name of a createable GUI element | 55 | //! returns type name of a createable GUI element |
56 | /** \param type: Type of GUI element. | 56 | /** \param type: Type of GUI element. |
57 | \return Name of the type if this factory can create the type, otherwise 0. */ | 57 | \return Name of the type if this factory can create the type, otherwise 0. */ |
58 | virtual const c8* getCreateableGUIElementTypeName(EGUI_ELEMENT_TYPE type) const = 0; | 58 | virtual const c8* getCreateableGUIElementTypeName(EGUI_ELEMENT_TYPE type) const = 0; |
59 | }; | 59 | }; |
60 | 60 | ||
61 | 61 | ||
62 | } // end namespace gui | 62 | } // end namespace gui |
63 | } // end namespace irr | 63 | } // end namespace irr |
64 | 64 | ||
65 | #endif // __I_GUI_ELEMENT_FACTORY_H_INCLUDED__ | 65 | #endif // __I_GUI_ELEMENT_FACTORY_H_INCLUDED__ |
66 | 66 | ||