CGUIEnvironment Class Reference

#include <CGUIEnvironment.h>

Inheritance diagram for CGUIEnvironment:

IGUIEnvironment IGUIElement IrrUnknown IrrUnknown IEventReceiver

Public Member Functions

Protected Member Functions

Protected Attributes


Constructor & Destructor Documentation

CGUIEnvironment ( io::IFileSystem fs,
video::IVideoDriver driver,
IOSOperator op 
)

~CGUIEnvironment (  )  [virtual]


Member Function Documentation

IGUIAnimatedImage * addAnimatedImage ( core::array< video::STextureAnimation > &  textureAnimations,
const s32 timePerFrame,
const video::E_TEXTURE_ANIMATION_TYPE animationMode,
const f32 rotationPerSecond,
const core::rect< s32 > &  rectangle,
IGUIElement parent = 0,
s32  id = -1 
) [virtual]

Implements IGUIEnvironment.

IGUIButton * addButton ( const core::rect< s32 > &  rectangle,
IGUIElement parent = 0,
s32  id = -1,
const wchar_t *  text = 0,
const wchar_t *  tooltiptext = 0 
) [virtual]

Implements IGUIEnvironment.

IGUICheckBox * addCheckBox ( bool  checked,
const core::rect< s32 > &  rectangle,
IGUIElement parent = 0,
s32  id = -1,
const wchar_t *  text = 0 
) [virtual]

Implements IGUIEnvironment.

virtual void addChild ( IGUIElement child  )  [inline, virtual, inherited]

IGUIColorSelectDialog * addColorSelectDialog ( const wchar_t *  title = 0,
bool  modal = true,
IGUIElement parent = 0,
s32  id = -1 
) [virtual]

Implements IGUIEnvironment.

IGUIComboBox * addComboBox ( const core::rect< s32 > &  rectangle,
IGUIElement parent = 0,
s32  id = -1 
) [virtual]

Implements IGUIEnvironment.

IGUIContextMenu * addContextMenu ( const core::rect< s32 > &  rectangle,
IGUIElement parent = 0,
s32  id = -1 
) [virtual]

Implements IGUIEnvironment.

IGUIEditBox * addEditBox ( const wchar_t *  text,
const core::rect< s32 > &  rectangle,
bool  border = false,
IGUIElement parent = 0,
s32  id = -1 
) [virtual]

Implements IGUIEnvironment.

IGUIFileOpenDialog * addFileOpenDialog ( const wchar_t *  title = 0,
bool  modal = true,
IGUIElement parent = 0,
s32  id = -1 
) [virtual]

Implements IGUIEnvironment.

IGUIImage * addImage ( const core::rect< s32 > &  rectangle,
IGUIElement parent = 0,
s32  id = -1,
const wchar_t *  text = 0 
) [virtual]

Implements IGUIEnvironment.

IGUIImage * addImage ( video::ITexture image,
core::position2d< s32 pos,
bool  useAlphaChannel = true,
IGUIElement parent = 0,
s32  id = -1,
const wchar_t *  text = 0 
) [virtual]

Implements IGUIEnvironment.

IGUIInOutFader * addInOutFader ( const core::rect< s32 > *  rectangle = 0,
IGUIElement parent = 0,
s32  id = -1 
) [virtual]

Implements IGUIEnvironment.

IGUIListBox * addListBox ( const core::rect< s32 > &  rectangle,
IGUIElement parent = 0,
s32  id = -1,
bool  drawBackground = false 
) [virtual]

Implements IGUIEnvironment.

IGUIContextMenu * addMenu ( IGUIElement parent = 0,
s32  id = -1 
) [virtual]

Implements IGUIEnvironment.

IGUIMeshViewer * addMeshViewer ( const core::rect< s32 > &  rectangle,
IGUIElement parent = 0,
s32  id = -1,
const wchar_t *  text = 0 
) [virtual]

Implements IGUIEnvironment.

IGUIWindow * addMessageBox ( const wchar_t *  caption,
const wchar_t *  text = 0,
bool  modal = true,
s32  flag = EMBF_OK,
IGUIElement parent = 0,
s32  id = -1,
s32  okID = -1,
s32  cancelID = -1,
s32  yesID = -1,
s32  noID = -1 
) [virtual]

Implements IGUIEnvironment.

IGUIScrollBar * addScrollBar ( bool  horizontal,
const core::rect< s32 > &  rectangle,
IGUIElement parent = 0,
s32  id = -1 
) [virtual]

Implements IGUIEnvironment.

IGUISlider * addSlider ( bool  horizontal,
const core::rect< s32 > &  rectangle,
IGUIElement parent = 0,
s32  id = -1 
) [virtual]

Implements IGUIEnvironment.

IGUIStaticText * addStaticText ( const wchar_t *  text,
const core::rect< s32 > &  rectangle,
bool  border = false,
bool  wordWrap = true,
IGUIElement parent = 0,
s32  id = -1,
bool  drawBackground = false 
) [virtual]

Implements IGUIEnvironment.

IGUITab * addTab ( const core::rect< s32 > &  rectangle,
IGUIElement parent = 0,
s32  id = -1 
) [virtual]

Implements IGUIEnvironment.

IGUITabControl * addTabControl ( const core::rect< s32 > &  rectangle,
IGUIElement parent = 0,
bool  fillbackground = false,
bool  border = true,
s32  id = -1 
) [virtual]

Implements IGUIEnvironment.

IGUIToolBar * addToolBar ( IGUIElement parent = 0,
s32  id = -1 
) [virtual]

Adds a toolbar to the environment. It is like a menu is always placed on top in its parent, and contains buttons.

Implements IGUIEnvironment.

IGUIWindow * addWindow ( const core::rect< s32 > &  rectangle,
bool  modal = false,
const wchar_t *  text = 0,
IGUIElement parent = 0,
s32  id = -1 
) [virtual]

Implements IGUIEnvironment.

virtual void animateMoveToPoint ( const core::position2d< s32 > &  destination,
const u32 timeToMove 
) [inline, virtual, inherited]

Reimplemented in CGUIImage, CGUIStaticText, and IGUIImage.

virtual bool bringToFront ( IGUIElement element  )  [inline, virtual, inherited]

Returns:
Returns true if successful, false if not.

void clear (  )  [virtual]

Implements IGUIEnvironment.

IGUISkin * createSkin ( EGUI_SKIN_TYPE  type  )  [virtual]

Returns:
Returns a pointer to the created skin. If you no longer need the image, you should call IGUISkin::drop(). See IrrUnknown::drop() for more information.

Implements IGUIEnvironment.

virtual void draw (  )  [inline, virtual, inherited]

Reimplemented in CGUIAnimatedImage, CGUIButton, CGUICheckBox, CGUIColorSelectDialog, CGUIComboBox, CGUIContextMenu, CGUIEditBox, CGUIFileOpenDialog, CGUIImage, CGUIInOutFader, CGUIListBox, CGUIMenu, CGUIMeshViewer, CGUIModalScreen, CGUIScrollBar, CGUISlider, CGUIStaticText, CGUITab, CGUITabControl, CGUIToolBar, and CGUIWindow.

void drawAll (  )  [virtual]

Implements IGUIEnvironment.

bool drop (  )  [inline, inherited]

Drops the object. Decrements the reference counter by one. Returns true, if the object was deleted. The IrrUnknown class provides a basic reference counting mechanism with its methods grab() and drop(). Most objects of the Irrlicht Engine are derived from IrrUnknown, and so they are reference counted.

When you create an object in the Irrlicht engine, calling a method which starts with 'create', an object is created, and you get a pointer to the new object. If you no longer need the object, you have to call drop(). This will destroy the object, if grab() was not called in another part of you program, because this part still needs the object. Note, that you only need to call drop() to the object, if you created it, and the method had a 'create' in it.

A simple example:

If you want to create a texture, you may want to call an imaginable method IDriver::createTexture. You call ITexture* texture = driver->createTexture(dimension2d<s32>(128, 128)); If you no longer need the texture, call texture->drop(). If you want to load a texture, you may want to call imaginable method IDriver::loadTexture. You do this like ITexture* texture = driver->loadTexture("example.jpg"); You will not have to drop the pointer to the loaded texture, because the name of the method does not start with 'create'. The texture is stored somewhere by the driver.

bool drop (  )  [inline, inherited]

Drops the object. Decrements the reference counter by one. Returns true, if the object was deleted. The IrrUnknown class provides a basic reference counting mechanism with its methods grab() and drop(). Most objects of the Irrlicht Engine are derived from IrrUnknown, and so they are reference counted.

When you create an object in the Irrlicht engine, calling a method which starts with 'create', an object is created, and you get a pointer to the new object. If you no longer need the object, you have to call drop(). This will destroy the object, if grab() was not called in another part of you program, because this part still needs the object. Note, that you only need to call drop() to the object, if you created it, and the method had a 'create' in it.

A simple example:

If you want to create a texture, you may want to call an imaginable method IDriver::createTexture. You call ITexture* texture = driver->createTexture(dimension2d<s32>(128, 128)); If you no longer need the texture, call texture->drop(). If you want to load a texture, you may want to call imaginable method IDriver::loadTexture. You do this like ITexture* texture = driver->loadTexture("example.jpg"); You will not have to drop the pointer to the loaded texture, because the name of the method does not start with 'create'. The texture is stored somewhere by the driver.

core::rect<s32> getAbsolutePosition (  )  [inline, inherited]

IGUIFont * getBuiltInFont (  )  [virtual]

Implements IGUIEnvironment.

virtual const core::list<IGUIElement*>& getChildren (  )  const [inline, virtual, inherited]

const c8* getDebugName (  )  const [inline, inherited]

Returns the debug name of the object. The Debugname may only be set and changed by the object itself. This method should only be used in Debug mode.

Returns:
Returns a string, previously set by setDebugName();

const c8* getDebugName (  )  const [inline, inherited]

Returns the debug name of the object. The Debugname may only be set and changed by the object itself. This method should only be used in Debug mode.

Returns:
Returns a string, previously set by setDebugName();

* virtual IGUIElement* getElementFromId ( s32  id,
bool  searchchildren = false 
) const [inline, virtual, inherited]

Finds the first element with the given id.

Parameters:
id,: Id to search for.
searchchildren,: Set this to true, if you want to search this elements children.
Returns:
Returns the first element with the given id. If no element with this id was found, 0 is returned.

IGUIElement* getElementFromPoint ( const core::position2d< s32 > &  point  )  [inline, inherited]

IGUIFont * getFont ( const c8 filename  )  [virtual]

Implements IGUIEnvironment.

virtual s32 getID (  )  [inline, virtual, inherited]

IGUIElement* getParent (  )  [inline, inherited]

core::rect<s32> getRelativePosition (  )  [inline, inherited]

IGUIElement * getRootGUIElement (  )  [virtual]

Implements IGUIEnvironment.

IGUISkin * getSkin (  )  [virtual]

Implements IGUIEnvironment.

virtual const wchar_t* getText (  )  [inline, virtual, inherited]

virtual core::stringw& getToolTipText (  )  [inline, virtual, inherited]

EGUI_ELEMENT_TYPE getType (  )  [inline, inherited]

This is needed for the .NET wrapper but will be used later for serializing and deserializing. If you wrote your own GUIElements, you need to set the type for your element as first parameter in the constructor of IGUIElement. For own (=unknown) elements, simply use EGUIET_ELEMENT as type

video::IVideoDriver * getVideoDriver (  )  [virtual]

Implements IGUIEnvironment.

void grab (  )  [inline, inherited]

Grabs the object. Increments the reference counter by one. Someone who calls grab() to an object, should later also call drop() to it. If an object never gets as much drop() as grab() calls, it will never be destroyed. The IrrUnknown class provides a basic reference counting mechanism with its methods grab() and drop(). Most objects of the Irrlicht Engine are derived from IrrUnknown, and so they are reference counted.

When you create an object in the Irrlicht engine, calling a method which starts with 'create', an object is created, and you get a pointer to the new object. If you no longer need the object, you have to call drop(). This will destroy the object, if grab() was not called in another part of you program, because this part still needs the object. Note, that you only need to call drop() to the object, if you created it, and the method had a 'create' in it.

A simple example:

If you want to create a texture, you may want to call an imaginable method IDriver::createTexture. You call ITexture* texture = driver->createTexture(dimension2d<s32>(128, 128)); If you no longer need the texture, call texture->drop(). If you want to load a texture, you may want to call imaginable method IDriver::loadTexture. You do this like ITexture* texture = driver->loadTexture("example.jpg"); You will not have to drop the pointer to the loaded texture, because the name of the method does not start with 'create'. The texture is stored somewhere by the driver.

void grab (  )  [inline, inherited]

Grabs the object. Increments the reference counter by one. Someone who calls grab() to an object, should later also call drop() to it. If an object never gets as much drop() as grab() calls, it will never be destroyed. The IrrUnknown class provides a basic reference counting mechanism with its methods grab() and drop(). Most objects of the Irrlicht Engine are derived from IrrUnknown, and so they are reference counted.

When you create an object in the Irrlicht engine, calling a method which starts with 'create', an object is created, and you get a pointer to the new object. If you no longer need the object, you have to call drop(). This will destroy the object, if grab() was not called in another part of you program, because this part still needs the object. Note, that you only need to call drop() to the object, if you created it, and the method had a 'create' in it.

A simple example:

If you want to create a texture, you may want to call an imaginable method IDriver::createTexture. You call ITexture* texture = driver->createTexture(dimension2d<s32>(128, 128)); If you no longer need the texture, call texture->drop(). If you want to load a texture, you may want to call imaginable method IDriver::loadTexture. You do this like ITexture* texture = driver->loadTexture("example.jpg"); You will not have to drop the pointer to the loaded texture, because the name of the method does not start with 'create'. The texture is stored somewhere by the driver.

bool hasFocus ( IGUIElement element  )  [virtual]

Implements IGUIEnvironment.

virtual bool isEnabled (  )  [inline, virtual, inherited]

virtual bool isVisible (  )  [inline, virtual, inherited]

virtual void move ( core::position2d< s32 absoluteMovement  )  [inline, virtual, inherited]

bool OnEvent ( const SEvent event  )  [virtual]

Reimplemented from IGUIElement.

void OnPostRender ( u32  time  )  [virtual]

Reimplemented from IGUIElement.

virtual void overrideDefaultClipping ( const core::rect< s32 > &  clipRect  )  [inline, virtual, inherited]

bool postEventFromUser ( const SEvent event  )  [virtual]

Implements IGUIEnvironment.

virtual void remove (  )  [inline, virtual, inherited]

virtual void removeChild ( IGUIElement child  )  [inline, virtual, inherited]

Reimplemented in CGUIModalScreen, and CGUITabControl.

void removeFocus ( IGUIElement element  )  [virtual]

Implements IGUIEnvironment.

void setDebugName ( const c8 newName  )  [inline, protected, inherited]

Sets the debug name of the object. The Debugname may only be set and changed by the object itself. This method should only be used in Debug mode.

Parameters:
newName,: New debug name to set.

void setDebugName ( const c8 newName  )  [inline, protected, inherited]

Sets the debug name of the object. The Debugname may only be set and changed by the object itself. This method should only be used in Debug mode.

Parameters:
newName,: New debug name to set.

virtual void setEnabled ( bool  enabled  )  [inline, virtual, inherited]

void setFocus ( IGUIElement element  )  [virtual]

Implements IGUIEnvironment.

virtual void setID ( s32  id  )  [inline, virtual, inherited]

void setRelativePosition ( const core::rect< s32 > &  r  )  [inline, inherited]

void setSkin ( IGUISkin skin  )  [virtual]

Implements IGUIEnvironment.

virtual void setText ( const wchar_t *  text  )  [inline, virtual, inherited]

Reimplemented in CGUIEditBox, and CGUIStaticText.

virtual void setToolTipText ( const wchar_t *  text  )  [inline, virtual, inherited]

void setUserEventReceiver ( IEventReceiver evr  )  [virtual]

This sets a new event receiver for gui events. Usually you do not have to use this method, it is used by the internal engine.

Implements IGUIEnvironment.

virtual void setVisible ( bool  visible  )  [inline, virtual, inherited]

Reimplemented in CGUIContextMenu.

virtual void updateAbsolutePosition (  )  [inline, virtual, inherited]

Reimplemented in CGUIMenu, CGUIModalScreen, and CGUIToolBar.


Field Documentation

core::rect<s32> AbsoluteClippingRect [protected, inherited]

core::rect<s32> AbsoluteRect [protected, inherited]

core::list<IGUIElement*> Children [protected, inherited]

IGUIEnvironment* Environment [protected, inherited]

s32 ID [protected, inherited]

bool IsEnabled [protected, inherited]

bool IsVisible [protected, inherited]

bool OverrideDefaultClippingRectBehavior [protected, inherited]

IGUIElement* Parent [protected, inherited]

core::rect<s32> RelativeRect [protected, inherited]

core::stringw Text [protected, inherited]

core::stringw ToolTipText [protected, inherited]

EGUI_ELEMENT_TYPE Type [protected, inherited]


Generated on Fri Apr 27 14:47:04 2007 for IrrSpintz by  doxygen 1.5.1-p1