IrrIMGUI  0.3.1
Public Member Functions | List of all members
IrrIMGUI::IIMGUIHandle Class Referenceabstract

A interface to an IMGUI handle. Use this interface for mocking and dependency injection of the real IMGUI handle. More...

#include <IIMGUIHandle.h>

Inheritance diagram for IrrIMGUI::IIMGUIHandle:
Inheritance graph
[legend]
Collaboration diagram for IrrIMGUI::IIMGUIHandle:
Collaboration graph
[legend]

Public Member Functions

virtual ~IIMGUIHandle (void)
 Destructor. More...
 
Render and drawing methods
virtual void startGUI (void)=0
 Call this methods before you draw the IMGUI elements and before calling "drawAll()". More...
 
virtual void drawAll (void)=0
 Call this function after "startGUI()" and after you draw your GUI elements. It will render all elements to the screen (do not call it before rendering the 3D Scene!). More...
 
GUI settings
virtual SIMGUISettings const & getSettings (void) const =0
 
virtual void setSettings (SIMGUISettings const &rSettings)=0
 
Font operations

virtual ImFont * addFont (ImFontConfig const *pFontConfig)=0
 Adds a font to the IMGUI memory. More...
 
virtual ImFont * addDefaultFont (ImFontConfig const *pFontConfig=NULL)=0
 Adds the default font to the IMGUI memory. More...
 
virtual ImFont * addFontFromFileTTF (char const *pFileName, float FontSizeInPixel, ImFontConfig const *pFontConfig=NULL, ImWchar const *pGlyphRanges=NULL)=0
 Adds a font from a TTF file to the IMGUI memory. More...
 
virtual ImFont * addFontFromMemoryTTF (void *pTTFData, int TTFSize, float FontSizeInPixel, ImFontConfig const *pFontConfig=NULL, ImWchar const *pGlyphRanges=NULL)=0
 Adds a font from a TTF byte array to the IMGUI memory. More...
 
virtual ImFont * addFontFromMemoryCompressedTTF (void const *pCompressedTTFData, int CompressedTTFSize, float FontSizeInPixel, ImFontConfig const *pFontConfig=NULL, ImWchar const *pGlyphRanges=NULL)=0
 Adds a font from a compressed TTF byte array to the IMGUI memory. More...
 
virtual ImFont * addFontFromMemoryCompressedBase85TTF (char const *pCompressedTTFDataBase85, float FontSizeInPixel, ImFontConfig const *pFontConfig=NULL, const ImWchar *pGlyphRanges=NULL)=0
 Adds a font from a compressed TTF byte array that uses the base85 character encoding to the IMGUI memory. More...
 
virtual void compileFonts (void)=0
 This function copies all fonts that have been added with "addFont/addDefaultFont" into graphic memory. More...
 
virtual void resetFonts (void)=0
 Resets the font memory and restores the default font as the one and only font in the system. More...
 
Common Font Glyph-Ranges
virtual ImWchar const * getGlyphRangesDefault (void)=0
 
virtual ImWchar const * getGlyphRangesJapanese (void)=0
 
virtual ImWchar const * getGlyphRangesChinese (void)=0
 
virtual ImWchar const * getGlyphRangesCyrillic (void)=0
 
Image and Texture methods

virtual IGUITexturecreateTexture (irr::video::IImage *pImage)=0
 Creates a GUI texture object out of an Irrlicht image. More...
 
virtual IGUITexturecreateTexture (irr::video::ITexture *pTexture)=0
 Creates a GUI texture object out of an Irrlicht texture. More...
 
virtual void updateTexture (IGUITexture *pGUITexture, irr::video::IImage *pImage)=0
 Updates a GUI texture object with an Irrlicht image. More...
 
virtual void updateTexture (IGUITexture *pGUITexture, irr::video::ITexture *pTexture)=0
 Updates a GUI texture object with an Irrlicht texture. More...
 
virtual void deleteTexture (IGUITexture *pGUITexture)=0
 Deletes an texture from graphic memory. More...
 
- Public Member Functions inherited from IrrIMGUI::IReferenceCounter
 IReferenceCounter (void)
 Constructor. More...
 
virtual ~IReferenceCounter (void)
 Destructor. More...
 
virtual void grab (void)
 Call this method to grab an instance. More...
 
virtual void drop (void)
 Call this method to drop an instance. If you drop the last used instance, the object is destroyed. More...
 
virtual irr::u32 getReferenceCount (void) const
 

Protected Member Functions

Constructor and Destructor
 IIMGUIHandle (void)
 Forbidden Constructor. More...
 

Detailed Description

A interface to an IMGUI handle. Use this interface for mocking and dependency injection of the real IMGUI handle.

Definition at line 48 of file IIMGUIHandle.h.

Constructor & Destructor Documentation

virtual IrrIMGUI::IIMGUIHandle::~IIMGUIHandle ( void  )
inlinevirtual

Destructor.

Definition at line 52 of file IIMGUIHandle.h.

IrrIMGUI::IIMGUIHandle::IIMGUIHandle ( void  )
inlineprotected

Forbidden Constructor.

Definition at line 207 of file IIMGUIHandle.h.

Member Function Documentation

virtual ImFont* IrrIMGUI::IIMGUIHandle::addDefaultFont ( ImFontConfig const *  pFontConfig = NULL)
pure virtual

Adds the default font to the IMGUI memory.

Parameters
pFontConfigIs a pointer to the font configuration.
Returns
Returns a pointer to the font for later usage with PushFont(...) to activate this font.

Implemented in IrrIMGUI::Private::CIMGUIHandle, and IrrIMGUI::UnitTest::IIMGUIHandleMock.

virtual ImFont* IrrIMGUI::IIMGUIHandle::addFont ( ImFontConfig const *  pFontConfig)
pure virtual

Adds a font to the IMGUI memory.

Parameters
pFontConfigIs a pointer to the font configuration.
Returns
Returns a pointer to the font for later usage with PushFont(...) to activate this font.

Implemented in IrrIMGUI::Private::CIMGUIHandle, and IrrIMGUI::UnitTest::IIMGUIHandleMock.

virtual ImFont* IrrIMGUI::IIMGUIHandle::addFontFromFileTTF ( char const *  pFileName,
float  FontSizeInPixel,
ImFontConfig const *  pFontConfig = NULL,
ImWchar const *  pGlyphRanges = NULL 
)
pure virtual

Adds a font from a TTF file to the IMGUI memory.

Parameters
pFileNameIs the name of the file to add.
FontSizeInPixelIs the desired font size to use.
pFontConfigIs a pointer to the font configuration.
pGlyphRangesIs the Glyph-Range to select the correct character set.
Returns
Returns a pointer to the font for later usage with PushFont(...) to activate this font.

Implemented in IrrIMGUI::Private::CIMGUIHandle, and IrrIMGUI::UnitTest::IIMGUIHandleMock.

virtual ImFont* IrrIMGUI::IIMGUIHandle::addFontFromMemoryCompressedBase85TTF ( char const *  pCompressedTTFDataBase85,
float  FontSizeInPixel,
ImFontConfig const *  pFontConfig = NULL,
const ImWchar *  pGlyphRanges = NULL 
)
pure virtual

Adds a font from a compressed TTF byte array that uses the base85 character encoding to the IMGUI memory.

Parameters
pCompressedTTFDataBase85Is a pointer to the char array.
FontSizeInPixelIs the desired font size to use.
pFontConfigIs a pointer to the font configuration.
pGlyphRangesIs the Glyph-Range to select the correct character set.
Returns
Returns a pointer to the font for later usage with PushFont(...) to activate this font.
Note
This function does not transfer the ownership of the byte array. You are responsible for delete this memory after the font is in graphic memory.

Implemented in IrrIMGUI::Private::CIMGUIHandle, and IrrIMGUI::UnitTest::IIMGUIHandleMock.

virtual ImFont* IrrIMGUI::IIMGUIHandle::addFontFromMemoryCompressedTTF ( void const *  pCompressedTTFData,
int  CompressedTTFSize,
float  FontSizeInPixel,
ImFontConfig const *  pFontConfig = NULL,
ImWchar const *  pGlyphRanges = NULL 
)
pure virtual

Adds a font from a compressed TTF byte array to the IMGUI memory.

Parameters
pCompressedTTFDataIs a pointer to the byte array.
CompressedTTFSizeIs the size of the array in byte.
FontSizeInPixelIs the desired font size to use.
pFontConfigIs a pointer to the font configuration.
pGlyphRangesIs the Glyph-Range to select the correct character set.
Returns
Returns a pointer to the font for later usage with PushFont(...) to activate this font.
Note
This function does not transfer the ownership of the byte array. You are responsible for delete this memory after the font is in graphic memory.

Implemented in IrrIMGUI::Private::CIMGUIHandle, and IrrIMGUI::UnitTest::IIMGUIHandleMock.

virtual ImFont* IrrIMGUI::IIMGUIHandle::addFontFromMemoryTTF ( void *  pTTFData,
int  TTFSize,
float  FontSizeInPixel,
ImFontConfig const *  pFontConfig = NULL,
ImWchar const *  pGlyphRanges = NULL 
)
pure virtual

Adds a font from a TTF byte array to the IMGUI memory.

Parameters
pTTFDataIs a pointer to the byte array.
TTFSizeIs the size of the array in byte.
FontSizeInPixelIs the desired font size to use.
pFontConfigIs a pointer to the font configuration.
pGlyphRangesIs the Glyph-Range to select the correct character set.
Returns
Returns a pointer to the font for later usage with PushFont(...) to activate this font.
Attention
This function transfers the ownership of 'pTTFData' to the IMGUI System and will be deleted automatically. Do not delete it by yourself!

Implemented in IrrIMGUI::Private::CIMGUIHandle, and IrrIMGUI::UnitTest::IIMGUIHandleMock.

virtual void IrrIMGUI::IIMGUIHandle::compileFonts ( void  )
pure virtual

This function copies all fonts that have been added with "addFont/addDefaultFont" into graphic memory.

Attention
Call this function before using the fonts that have been added.

Implemented in IrrIMGUI::Private::CIMGUIHandle, and IrrIMGUI::UnitTest::IIMGUIHandleMock.

virtual IGUITexture* IrrIMGUI::IIMGUIHandle::createTexture ( irr::video::IImage *  pImage)
pure virtual

Creates a GUI texture object out of an Irrlicht image.

Parameters
pImageIs a pointer to an Irrlicht image object.
Returns
Returns an GUI texture object.

Implemented in IrrIMGUI::Private::CIMGUIHandle, and IrrIMGUI::UnitTest::IIMGUIHandleMock.

virtual IGUITexture* IrrIMGUI::IIMGUIHandle::createTexture ( irr::video::ITexture *  pTexture)
pure virtual

Creates a GUI texture object out of an Irrlicht texture.

Parameters
pTextureIs a pointer to an Irrlicht texture object.
Returns
Returns an GUI texture object.

Implemented in IrrIMGUI::Private::CIMGUIHandle, and IrrIMGUI::UnitTest::IIMGUIHandleMock.

virtual void IrrIMGUI::IIMGUIHandle::deleteTexture ( IGUITexture pGUITexture)
pure virtual

Deletes an texture from graphic memory.

Parameters
pGUITextureIs a pointer to the texture to delete. Do not use it afterwards!

Implemented in IrrIMGUI::UnitTest::IIMGUIHandleMock, and IrrIMGUI::Private::CIMGUIHandle.

virtual void IrrIMGUI::IIMGUIHandle::drawAll ( void  )
pure virtual

Call this function after "startGUI()" and after you draw your GUI elements. It will render all elements to the screen (do not call it before rendering the 3D Scene!).

Implemented in IrrIMGUI::Private::CIMGUIHandle, and IrrIMGUI::UnitTest::IIMGUIHandleMock.

virtual ImWchar const* IrrIMGUI::IIMGUIHandle::getGlyphRangesChinese ( void  )
pure virtual
Returns
Returns the Japanese + full set of about 21000 CJK Unified Ideographs

Implemented in IrrIMGUI::Private::CIMGUIHandle, and IrrIMGUI::UnitTest::IIMGUIHandleMock.

virtual ImWchar const* IrrIMGUI::IIMGUIHandle::getGlyphRangesCyrillic ( void  )
pure virtual
Returns
Default + about 400 Cyrillic characters

Implemented in IrrIMGUI::Private::CIMGUIHandle, and IrrIMGUI::UnitTest::IIMGUIHandleMock.

virtual ImWchar const* IrrIMGUI::IIMGUIHandle::getGlyphRangesDefault ( void  )
pure virtual
Returns
Returns the Basic Latin and Extended Latin Range.

Implemented in IrrIMGUI::Private::CIMGUIHandle, and IrrIMGUI::UnitTest::IIMGUIHandleMock.

virtual ImWchar const* IrrIMGUI::IIMGUIHandle::getGlyphRangesJapanese ( void  )
pure virtual
Returns
Returns the Default + Hiragana, Katakana, Half-Width, Selection of 1946 Ideographs

Implemented in IrrIMGUI::Private::CIMGUIHandle, and IrrIMGUI::UnitTest::IIMGUIHandleMock.

virtual SIMGUISettings const& IrrIMGUI::IIMGUIHandle::getSettings ( void  ) const
pure virtual
Returns
Returns a constant reference to the currently applied settings structure.

Implemented in IrrIMGUI::Private::CIMGUIHandle, and IrrIMGUI::UnitTest::IIMGUIHandleMock.

virtual void IrrIMGUI::IIMGUIHandle::resetFonts ( void  )
pure virtual

Resets the font memory and restores the default font as the one and only font in the system.

Implemented in IrrIMGUI::Private::CIMGUIHandle, and IrrIMGUI::UnitTest::IIMGUIHandleMock.

virtual void IrrIMGUI::IIMGUIHandle::setSettings ( SIMGUISettings const &  rSettings)
pure virtual
Parameters
rSettingsis a reference to a Setting structure that should be applied.
Note
The settings are applied to all GUI handles at the same time, since IMGUI uses internally a single instance.

Implemented in IrrIMGUI::Private::CIMGUIHandle, and IrrIMGUI::UnitTest::IIMGUIHandleMock.

virtual void IrrIMGUI::IIMGUIHandle::startGUI ( void  )
pure virtual

Call this methods before you draw the IMGUI elements and before calling "drawAll()".

Implemented in IrrIMGUI::Private::CIMGUIHandle, and IrrIMGUI::UnitTest::IIMGUIHandleMock.

virtual void IrrIMGUI::IIMGUIHandle::updateTexture ( IGUITexture pGUITexture,
irr::video::IImage *  pImage 
)
pure virtual

Updates a GUI texture object with an Irrlicht image.

Parameters
pGUITextureIs a pointer to the GUI texture object.
pImageIs a pointer to an Irrlicht image object.

Implemented in IrrIMGUI::Private::CIMGUIHandle, and IrrIMGUI::UnitTest::IIMGUIHandleMock.

virtual void IrrIMGUI::IIMGUIHandle::updateTexture ( IGUITexture pGUITexture,
irr::video::ITexture *  pTexture 
)
pure virtual

Updates a GUI texture object with an Irrlicht texture.

Parameters
pGUITextureIs a pointer to the GUI texture object.
pTextureIs a pointer to an Irrlicht image object.

Implemented in IrrIMGUI::UnitTest::IIMGUIHandleMock, and IrrIMGUI::Private::CIMGUIHandle.


The documentation for this class was generated from the following file: