<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"> <title>Irrlicht Engine: irr::gui::IGUIElementFactory Class Reference</title> <link href="doxygen.css" rel="stylesheet" type="text/css"> </head><body> <table class="irrlicht" > <tr valign="middle"> <td><font size="2"><a class="qindex" href="index.html"><font color="#FFFFFF">Home</font></a> | <a class="qindex" href="namespaces.html"><font color="#FFFFFF">Namespaces</font></a> | <a class="qindex" href="hierarchy.html"><font color="#FFFFFF">Hierarchy</font></a> | <a class="qindex" href="classes.html"><font color="#FFFFFF">Alphabetical List</font></a> | <a class="qindex" href="annotated.html"><font color="#FFFFFF"> Class list</font></a> | <a class="qindex" href="files.html"><font color="#FFFFFF">Files</font></a> | <a class="qindex" href="namespacemembers.html"><font color="#FFFFFF"> Namespace Members</font></a> | <a class="qindex" href="functions.html"><font color="#FFFFFF">Class members</font></a> | <a class="qindex" href="globals.html"><font color="#FFFFFF">File members</font></a> | <a class="qindex" href="pages.html"><font color="#FFFFFF">Tutorials</font></a></font> </td> </tr> </table> <!-- Generated by Doxygen 1.5.6 --> <div class="navpath"><a class="el" href="namespaceirr.html">irr</a>::<a class="el" href="namespaceirr_1_1gui.html">gui</a>::<a class="el" href="classirr_1_1gui_1_1_i_g_u_i_element_factory.html">IGUIElementFactory</a> </div> <div class="contents"> <h1>irr::gui::IGUIElementFactory Class Reference</h1><!-- doxytag: class="irr::gui::IGUIElementFactory" --><!-- doxytag: inherits="irr::IReferenceCounted" -->Interface making it possible to dynamicly create GUI elements. <a href="#_details">More...</a> <p> <code>#include <<a class="el" href="_i_g_u_i_element_factory_8h-source.html">IGUIElementFactory.h</a>></code> <p> <div class="dynheader"> Inheritance diagram for irr::gui::IGUIElementFactory:</div> <div class="dynsection"> <p><center><img src="classirr_1_1gui_1_1_i_g_u_i_element_factory.png" usemap="#irr::gui::IGUIElementFactory_map" border="0" alt=""></center> <map name="irr::gui::IGUIElementFactory_map"> <area href="classirr_1_1_i_reference_counted.html" alt="irr::IReferenceCounted" shape="rect" coords="0,0,165,24"> </map> </div> <p> <a href="classirr_1_1gui_1_1_i_g_u_i_element_factory-members.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0"> <tr><td></td></tr> <tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">virtual <a class="el" href="classirr_1_1gui_1_1_i_g_u_i_element.html">IGUIElement</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classirr_1_1gui_1_1_i_g_u_i_element_factory.html#ec55be9ef891ba1b19c5d9c5a85130a4">addGUIElement</a> (const <a class="el" href="namespaceirr.html#9395eaea339bcb546b319e9c96bf7410">c8</a> *typeName, <a class="el" href="classirr_1_1gui_1_1_i_g_u_i_element.html">IGUIElement</a> *parent=0)=0</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">adds a GUI element to the GUI Environment based on its type name <a href="#ec55be9ef891ba1b19c5d9c5a85130a4"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">virtual <a class="el" href="classirr_1_1gui_1_1_i_g_u_i_element.html">IGUIElement</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classirr_1_1gui_1_1_i_g_u_i_element_factory.html#aaa0dda5493286ff745310b441347019">addGUIElement</a> (<a class="el" href="namespaceirr_1_1gui.html#e4d66df0ecf4117cdbcf9f22404bd254">EGUI_ELEMENT_TYPE</a> type, <a class="el" href="classirr_1_1gui_1_1_i_g_u_i_element.html">IGUIElement</a> *parent=0)=0</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">adds an element to the <a class="el" href="namespaceirr_1_1gui.html" title="The gui namespace contains useful classes for easy creation of a graphical user interface...">gui</a> environment based on its type id <a href="#aaa0dda5493286ff745310b441347019"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">virtual <a class="el" href="namespaceirr.html#c66849b7a6ed16e30ebede579f9b47c6">s32</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classirr_1_1gui_1_1_i_g_u_i_element_factory.html#ae56378de5264978e70d11a36fff02e9">getCreatableGUIElementTypeCount</a> () const =0</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Get amount of GUI element types this factory is able to create. <a href="#ae56378de5264978e70d11a36fff02e9"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">virtual <a class="el" href="namespaceirr_1_1gui.html#e4d66df0ecf4117cdbcf9f22404bd254">EGUI_ELEMENT_TYPE</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classirr_1_1gui_1_1_i_g_u_i_element_factory.html#9318ddb2d0d971551db4c050c3f99a2f">getCreateableGUIElementType</a> (<a class="el" href="namespaceirr.html#c66849b7a6ed16e30ebede579f9b47c6">s32</a> idx) const =0</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Get type of a createable element type. <a href="#9318ddb2d0d971551db4c050c3f99a2f"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">virtual const <a class="el" href="namespaceirr.html#9395eaea339bcb546b319e9c96bf7410">c8</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classirr_1_1gui_1_1_i_g_u_i_element_factory.html#1e692e1f746ee69815bf25981ee0facf">getCreateableGUIElementTypeName</a> (<a class="el" href="namespaceirr_1_1gui.html#e4d66df0ecf4117cdbcf9f22404bd254">EGUI_ELEMENT_TYPE</a> type) const =0</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">returns type name of a createable GUI element <a href="#1e692e1f746ee69815bf25981ee0facf"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">virtual const <a class="el" href="namespaceirr.html#9395eaea339bcb546b319e9c96bf7410">c8</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classirr_1_1gui_1_1_i_g_u_i_element_factory.html#a8007c17ea40b74666c1d04c9d4de85f">getCreateableGUIElementTypeName</a> (<a class="el" href="namespaceirr.html#c66849b7a6ed16e30ebede579f9b47c6">s32</a> idx) const =0</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Get type name of a createable GUI element type by index. <a href="#a8007c17ea40b74666c1d04c9d4de85f"></a><br></td></tr> </table> <hr><a name="_details"></a><h2>Detailed Description</h2> Interface making it possible to dynamicly create GUI elements. <p> To be able to add custom elements to Irrlicht and to make it possible for the <a class="el" href="namespaceirr_1_1scene.html" title="All scene management can be found in this namespace: Mesh loading, special scene...">scene</a> manager to save and load them, simply implement this interface and register it in your <a class="el" href="namespaceirr_1_1gui.html" title="The gui namespace contains useful classes for easy creation of a graphical user interface...">gui</a> environment via <a class="el" href="classirr_1_1gui_1_1_i_g_u_i_environment.html#653ac2cc8640899c23f4d55d9a5f0fdd" title="Adds an element factory to the gui environment.">IGUIEnvironment::registerGUIElementFactory</a>. Note: When implementing your own element factory, don't call <a class="el" href="classirr_1_1_i_reference_counted.html#2b7a035532e5f409ca9482dab79185f4" title="Grabs the object. Increments the reference counter by one.">IGUIEnvironment::grab()</a> to increase the reference counter of the environment. This is not necessary because the it will <a class="el" href="classirr_1_1_i_reference_counted.html#2b7a035532e5f409ca9482dab79185f4" title="Grabs the object. Increments the reference counter by one.">grab()</a> the factory anyway, and otherwise cyclic references will be created. <p>Definition at line <a class="el" href="_i_g_u_i_element_factory_8h-source.html#l00026">26</a> of file <a class="el" href="_i_g_u_i_element_factory_8h-source.html">IGUIElementFactory.h</a>.</p> <hr><h2>Member Function Documentation</h2> <a class="anchor" name="ec55be9ef891ba1b19c5d9c5a85130a4"></a><!-- doxytag: member="irr::gui::IGUIElementFactory::addGUIElement" ref="ec55be9ef891ba1b19c5d9c5a85130a4" args="(const c8 *typeName, IGUIElement *parent=0)=0" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">virtual <a class="el" href="classirr_1_1gui_1_1_i_g_u_i_element.html">IGUIElement</a>* irr::gui::IGUIElementFactory::addGUIElement </td> <td>(</td> <td class="paramtype">const <a class="el" href="namespaceirr.html#9395eaea339bcb546b319e9c96bf7410">c8</a> * </td> <td class="paramname"> <em>typeName</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="classirr_1_1gui_1_1_i_g_u_i_element.html">IGUIElement</a> * </td> <td class="paramname"> <em>parent</em> = <code>0</code></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td><code> [pure virtual]</code></td> </tr> </table> </div> <div class="memdoc"> <p> adds a GUI element to the GUI Environment based on its type name <p> <dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>typeName,:</em> </td><td>Type name of the element to add. </td></tr> <tr><td valign="top"></td><td valign="top"><em>parent,:</em> </td><td>Parent <a class="el" href="namespaceirr_1_1scene.html" title="All scene management can be found in this namespace: Mesh loading, special scene...">scene</a> node of the new element, can be null to add it to the root. </td></tr> </table> </dl> <dl class="return" compact><dt><b>Returns:</b></dt><dd>Pointer to the new element or null if not successful. </dd></dl> </div> </div><p> <a class="anchor" name="aaa0dda5493286ff745310b441347019"></a><!-- doxytag: member="irr::gui::IGUIElementFactory::addGUIElement" ref="aaa0dda5493286ff745310b441347019" args="(EGUI_ELEMENT_TYPE type, IGUIElement *parent=0)=0" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">virtual <a class="el" href="classirr_1_1gui_1_1_i_g_u_i_element.html">IGUIElement</a>* irr::gui::IGUIElementFactory::addGUIElement </td> <td>(</td> <td class="paramtype"><a class="el" href="namespaceirr_1_1gui.html#e4d66df0ecf4117cdbcf9f22404bd254">EGUI_ELEMENT_TYPE</a> </td> <td class="paramname"> <em>type</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="classirr_1_1gui_1_1_i_g_u_i_element.html">IGUIElement</a> * </td> <td class="paramname"> <em>parent</em> = <code>0</code></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td><code> [pure virtual]</code></td> </tr> </table> </div> <div class="memdoc"> <p> adds an element to the <a class="el" href="namespaceirr_1_1gui.html" title="The gui namespace contains useful classes for easy creation of a graphical user interface...">gui</a> environment based on its type id <p> <dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>type,:</em> </td><td>Type of the element to add. </td></tr> <tr><td valign="top"></td><td valign="top"><em>parent,:</em> </td><td>Parent <a class="el" href="namespaceirr_1_1scene.html" title="All scene management can be found in this namespace: Mesh loading, special scene...">scene</a> node of the new element, can be null to add to the root. </td></tr> </table> </dl> <dl class="return" compact><dt><b>Returns:</b></dt><dd>Pointer to the new element or null if not successful. </dd></dl> </div> </div><p> <a class="anchor" name="ae56378de5264978e70d11a36fff02e9"></a><!-- doxytag: member="irr::gui::IGUIElementFactory::getCreatableGUIElementTypeCount" ref="ae56378de5264978e70d11a36fff02e9" args="() const =0" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">virtual <a class="el" href="namespaceirr.html#c66849b7a6ed16e30ebede579f9b47c6">s32</a> irr::gui::IGUIElementFactory::getCreatableGUIElementTypeCount </td> <td>(</td> <td class="paramname"> </td> <td> ) </td> <td> const<code> [pure virtual]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Get amount of GUI element types this factory is able to create. <p> </div> </div><p> <a class="anchor" name="9318ddb2d0d971551db4c050c3f99a2f"></a><!-- doxytag: member="irr::gui::IGUIElementFactory::getCreateableGUIElementType" ref="9318ddb2d0d971551db4c050c3f99a2f" args="(s32 idx) const =0" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">virtual <a class="el" href="namespaceirr_1_1gui.html#e4d66df0ecf4117cdbcf9f22404bd254">EGUI_ELEMENT_TYPE</a> irr::gui::IGUIElementFactory::getCreateableGUIElementType </td> <td>(</td> <td class="paramtype"><a class="el" href="namespaceirr.html#c66849b7a6ed16e30ebede579f9b47c6">s32</a> </td> <td class="paramname"> <em>idx</em> </td> <td> ) </td> <td> const<code> [pure virtual]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Get type of a createable element type. <p> <dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>idx,:</em> </td><td>Index of the element type in this factory. Must be a value between 0 and <a class="el" href="classirr_1_1gui_1_1_i_g_u_i_element_factory.html#ae56378de5264978e70d11a36fff02e9" title="Get amount of GUI element types this factory is able to create.">getCreatableGUIElementTypeCount()</a> </td></tr> </table> </dl> </div> </div><p> <a class="anchor" name="1e692e1f746ee69815bf25981ee0facf"></a><!-- doxytag: member="irr::gui::IGUIElementFactory::getCreateableGUIElementTypeName" ref="1e692e1f746ee69815bf25981ee0facf" args="(EGUI_ELEMENT_TYPE type) const =0" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">virtual const <a class="el" href="namespaceirr.html#9395eaea339bcb546b319e9c96bf7410">c8</a>* irr::gui::IGUIElementFactory::getCreateableGUIElementTypeName </td> <td>(</td> <td class="paramtype"><a class="el" href="namespaceirr_1_1gui.html#e4d66df0ecf4117cdbcf9f22404bd254">EGUI_ELEMENT_TYPE</a> </td> <td class="paramname"> <em>type</em> </td> <td> ) </td> <td> const<code> [pure virtual]</code></td> </tr> </table> </div> <div class="memdoc"> <p> returns type name of a createable GUI element <p> <dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>type,:</em> </td><td>Type of GUI element. </td></tr> </table> </dl> <dl class="return" compact><dt><b>Returns:</b></dt><dd>Name of the type if this factory can create the type, otherwise 0. </dd></dl> </div> </div><p> <a class="anchor" name="a8007c17ea40b74666c1d04c9d4de85f"></a><!-- doxytag: member="irr::gui::IGUIElementFactory::getCreateableGUIElementTypeName" ref="a8007c17ea40b74666c1d04c9d4de85f" args="(s32 idx) const =0" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">virtual const <a class="el" href="namespaceirr.html#9395eaea339bcb546b319e9c96bf7410">c8</a>* irr::gui::IGUIElementFactory::getCreateableGUIElementTypeName </td> <td>(</td> <td class="paramtype"><a class="el" href="namespaceirr.html#c66849b7a6ed16e30ebede579f9b47c6">s32</a> </td> <td class="paramname"> <em>idx</em> </td> <td> ) </td> <td> const<code> [pure virtual]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Get type name of a createable GUI element type by index. <p> <dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>idx,:</em> </td><td>Index of the type in this factory. Must be a value between 0 and <a class="el" href="classirr_1_1gui_1_1_i_g_u_i_element_factory.html#ae56378de5264978e70d11a36fff02e9" title="Get amount of GUI element types this factory is able to create.">getCreatableGUIElementTypeCount()</a> </td></tr> </table> </dl> </div> </div><p> <hr>The documentation for this class was generated from the following file:<ul> <li><a class="el" href="_i_g_u_i_element_factory_8h-source.html">IGUIElementFactory.h</a></ul> </div> <hr size="1"> <address style="align: right;"> <small> </small> </address> <table width="100%" border="0" cellspacing="0" cellpadding="2"> <tr> <td width="0"> <div align="left"><small><a href="http://irrlicht.sourceforge.net" target="_blank"><img src="irrlicht.png" alt="The Irrlicht Engine" align="middle" border=0 width=88 height=31></a></small></div></td> <td> <div align="left"><small><em><font size="2">The <a href="http://irrlicht.sourceforge.net" target="_blank">Irrlicht Engine</a> Documentation © 2003-2009 by Nikolaus Gebhardt. Generated on Sun Jan 10 09:24:10 2010 by <a href="http://www.doxygen.org" target="_blank">Doxygen</a> (1.5.6)</font></em></small></div></td> </tr> </table> <address style="align: right;"> </address> </body> </html>