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
5
#ifndef __C_GUIEDIT_FACTORY_H_INCLUDED__
6
#define __C_GUIEDIT_FACTORY_H_INCLUDED__
8
#include "IGUIElementFactory.h"
15
class IGUIEnvironment;
17
//! Interface making it possible to dynamicly create gui elements
18
class CGUIEditFactory : public IGUIElementFactory
22
CGUIEditFactory(IGUIEnvironment* env);
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);
31
//! returns amount of GUI element types this factory is able to create
32
virtual s32 getCreatableGUIElementTypeCount() const;
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;
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;};
45
IGUIEnvironment* Environment;
49
} // end namespace scene
50
} // end namespace irr