gui::manager_impl Class Reference

Abstract type for implementation specific management. More...

#include <gui_manager.hpp>

Inheritance diagram for gui::manager_impl:
gui::gl::manager

List of all members.

Public Member Functions

 manager_impl ()
 Constructor.
virtual ~manager_impl ()
 Destructor.
void set_parent (manager *pParent)
 Gives a pointer to the base class.
virtual void begin (utils::refptr< render_target > pTarget=nullptr) const =0
 Begins rendering on a particular render target.
virtual void end () const =0
 Ends rendering.
virtual void render_quad (const quad &mQuad) const =0
 Renders a quad.
virtual void render_quads (const quad &mQuad, const std::vector< std::array< vertex, 4 >> &lQuadList) const =0
 Renders a set of quads.
virtual utils::refptr< spritecreate_sprite (utils::refptr< material > pMat) const
 Creates a new sprite.
virtual utils::refptr< spritecreate_sprite (utils::refptr< material > pMat, float fWidth, float fHeight) const
 Creates a new sprite.
virtual utils::refptr< spritecreate_sprite (utils::refptr< material > pMat, float fU, float fV, float fWidth, float fHeight) const
 Creates a new sprite.
virtual utils::refptr< materialcreate_material (const std::string &sFileName) const =0
 Creates a new material from a texture file.
virtual utils::refptr< materialcreate_material (const color &mColor) const =0
 Creates a new material from a plain color.
virtual utils::refptr< materialcreate_material (utils::refptr< render_target > pRenderTarget) const =0
 Creates a new material from a render target.
virtual utils::refptr
< render_target
create_render_target (uint uiWidth, uint uiHeight) const =0
 Creates a new render target.
virtual utils::refptr< fontcreate_font (const std::string &sFontFile, uint uiSize) const =0
 Creates a new font.

Protected Attributes

managerpParent_

Detailed Description

Abstract type for implementation specific management.

Definition at line 786 of file gui_manager.hpp.


Constructor & Destructor Documentation

gui::manager_impl::manager_impl (  ) 

Constructor.

Definition at line 1726 of file gui_manager.cpp.

gui::manager_impl::~manager_impl (  )  [virtual]

Destructor.

Definition at line 1730 of file gui_manager.cpp.


Member Function Documentation

virtual void gui::manager_impl::begin ( utils::refptr< render_target pTarget = nullptr  )  const [pure virtual]

Begins rendering on a particular render target.

Parameters:
pTarget The render target (main screen if nullptr)
virtual utils::refptr<font> gui::manager_impl::create_font ( const std::string &  sFontFile,
uint  uiSize 
) const [pure virtual]

Creates a new font.

Parameters:
sFontFile The file from which to read the font
uiSize The requested size of the characters (in points)
Note:
Even though the gui has been designed to use vector fonts files (such as .ttf or .otf font formats), nothing prevents the implementation from using any other font type, including bitmap fonts.

Implemented in gui::gl::manager.

virtual utils::refptr<material> gui::manager_impl::create_material ( utils::refptr< render_target pRenderTarget  )  const [pure virtual]

Creates a new material from a render target.

Parameters:
pRenderTarget The render target from which to read the pixels
Returns:
The new material
virtual utils::refptr<material> gui::manager_impl::create_material ( const color mColor  )  const [pure virtual]

Creates a new material from a plain color.

Parameters:
mColor The color to use
Returns:
The new material

Implemented in gui::gl::manager.

virtual utils::refptr<material> gui::manager_impl::create_material ( const std::string &  sFileName  )  const [pure virtual]

Creates a new material from a texture file.

Parameters:
sFileName The name of the file
Returns:
The new material
Note:
Supported texture formats are defined by implementation. The gui library is completely unaware of this.

Implemented in gui::gl::manager.

virtual utils::refptr<render_target> gui::manager_impl::create_render_target ( uint  uiWidth,
uint  uiHeight 
) const [pure virtual]

Creates a new render target.

Parameters:
uiWidth The width of the render target
uiHeight The height of the render target

Implemented in gui::gl::manager.

utils::refptr< sprite > gui::manager_impl::create_sprite ( utils::refptr< material pMat,
float  fU,
float  fV,
float  fWidth,
float  fHeight 
) const [virtual]

Creates a new sprite.

Parameters:
pMat The material with which to create the sprite
fU The top left corner of the sprite in the material
fV The top left corner of the sprite in the material
fWidth The width of the sprite
fHeight The height of the sprite
Returns:
The new sprite
Note:
If the width and height you provide are smaller than the texture's ones, the texture will be cut on the right and bottom edges.
However, if they are larger than the texture's one, the texture will be tiled.
If you don't override this function, the gui::manager will create gui::sprites. You can redefine the function if you have created your own sprite class and want the gui to use it instead of the default one.

Definition at line 1744 of file gui_manager.cpp.

utils::refptr< sprite > gui::manager_impl::create_sprite ( utils::refptr< material pMat,
float  fWidth,
float  fHeight 
) const [virtual]

Creates a new sprite.

Parameters:
pMat The material with which to create the sprite
fWidth The width of the sprite
fHeight The height of the sprite
Returns:
The new sprite
Note:
If the width and height you provide are smaller than the texture's ones, the texture will be cut on the right and bottom edges.
However, if they are larger than the texture's one, the texture will be tiled.
If you don't override this function, the gui::manager will create gui::sprites. You can redefine the function if you have created your own sprite class and want the gui to use it instead of the default one.

Definition at line 1739 of file gui_manager.cpp.

utils::refptr< sprite > gui::manager_impl::create_sprite ( utils::refptr< material pMat  )  const [virtual]

Creates a new sprite.

Parameters:
pMat The material with which to create the sprite
Returns:
The new sprite
Note:
If you don't override this function, the gui::manager will create gui::sprites. You can redefine the function if you have created your own sprite class and want the gui to use it instead of the default one.

Definition at line 1734 of file gui_manager.cpp.

virtual void gui::manager_impl::end (  )  const [pure virtual]

Ends rendering.

Implemented in gui::gl::manager.

virtual void gui::manager_impl::render_quad ( const quad mQuad  )  const [pure virtual]

Renders a quad.

Parameters:
mQuad The quad to render on the current render target
Note:
This function is meant to be called between begin() and end() only.

Implemented in gui::gl::manager.

virtual void gui::manager_impl::render_quads ( const quad mQuad,
const std::vector< std::array< vertex, 4 >> &  lQuadList 
) const [pure virtual]

Renders a set of quads.

Parameters:
mQuad The base quad to use for rendering (material, blending, ...)
lQuadList The list of the quads you want to render
Note:
This function is meant to be called between begin() and end() only. It is always more efficient to call this method than calling render_quad repeatedly, as it allows to batch count reduction.

Implemented in gui::gl::manager.

void gui::manager_impl::set_parent ( manager pParent  ) 

Gives a pointer to the base class.

Note:
This function is automatically called by gui::manager on creation.

Definition at line 1750 of file gui_manager.cpp.


Member Data Documentation

Definition at line 911 of file gui_manager.hpp.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines

Generated on Tue Jan 1 21:58:12 2013 for gui by  doxygen 1.6.1