~baltix/+junk/irrlicht-test

« back to all changes in this revision

Viewing changes to tools/GUIEditor/CGUIEditFactory.h

  • Committer: Mantas Kriaučiūnas
  • Date: 2011-07-18 13:06:25 UTC
  • Revision ID: mantas@akl.lt-20110718130625-c5pvifp61e7kj1ol
Included whole irrlicht SVN libraries to work around launchpad recipe issue with quilt, see https://answers.launchpad.net/launchpad/+question/165193

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
// Copyright (C) 2002-2011 Nikolaus Gebhardt
 
2
// This file is part of the "Irrlicht Engine".
 
3
// For conditions of distribution and use, see copyright notice in irrlicht.h
 
4
 
 
5
#ifndef __C_GUIEDIT_FACTORY_H_INCLUDED__
 
6
#define __C_GUIEDIT_FACTORY_H_INCLUDED__
 
7
 
 
8
#include "IGUIElementFactory.h"
 
9
 
 
10
namespace irr
 
11
{
 
12
namespace gui
 
13
{
 
14
        class IGUIElement;
 
15
        class IGUIEnvironment;
 
16
 
 
17
        //!     Interface making it possible to dynamicly create gui elements
 
18
        class CGUIEditFactory : public IGUIElementFactory
 
19
        {
 
20
        public:
 
21
 
 
22
                CGUIEditFactory(IGUIEnvironment* env);
 
23
                ~CGUIEditFactory();
 
24
 
 
25
                //! adds a GUI element to the GUI Environment based on its type name
 
26
                /** \param typeName: Type name of the element to add.
 
27
                \param parent: Parent scene node of the new element, can be null to add it to the root.
 
28
                \return Returns pointer to the new element or null if not successful. */
 
29
                virtual IGUIElement* addGUIElement(const c8* typeName, IGUIElement* parent=0);
 
30
 
 
31
                //! returns amount of GUI element types this factory is able to create
 
32
                virtual s32 getCreatableGUIElementTypeCount() const;
 
33
 
 
34
                //! returns type name of a createable GUI element type by index
 
35
                /** \param idx: Index of the type in this factory. Must be a value between 0 and
 
36
                getCreatableGUIElementTypeCount() */
 
37
                virtual const c8* getCreateableGUIElementTypeName(s32 idx) const;
 
38
 
 
39
                // not used:
 
40
                virtual const c8* getCreateableGUIElementTypeName(EGUI_ELEMENT_TYPE type) const {return 0;} ;
 
41
                virtual EGUI_ELEMENT_TYPE getCreateableGUIElementType(s32 idx) const { return EGUIET_ELEMENT;};
 
42
                virtual IGUIElement* addGUIElement(EGUI_ELEMENT_TYPE type, IGUIElement* parent=0) {return 0;};
 
43
        private:
 
44
 
 
45
                IGUIEnvironment* Environment;
 
46
        };
 
47
 
 
48
 
 
49
} // end namespace scene
 
50
} // end namespace irr
 
51
 
 
52
#endif
 
53