Public Member Functions
GUI::Renderer Class Reference

Abstract class defining the interface for Renderer objects. More...

Inherits GUI::EventSet.

List of all members.

Public Member Functions

Texture createTexture ()
 Creates a 'null' Texture object.
Texture createTexture (string filename, string resourceGroup)
 Create a Texture object using the given image file.
Texture createTexture (float size)
 Create a Texture object with the given pixel dimensions as specified by size. NB: Textures are always square.
void destroyTexture (Texture texture)
 Destroy the given Texture object.
void destroyAllTextures ()
 Destroy all Texture objects.
bool isQueueingEnabled ()
 Return whether queueing is enabled.
float getWidth ()
 Return the current width of the display in pixels.
float getHeight ()
 Return the current height of the display in pixels.
Size getSize ()
 Return the size of the display in pixels.
Rect getRect ()
 Return a Rect describing the screen.
int getMaxTextureSize ()
 Return the maximum texture size available.
int getHorzScreenDPI ()
 Return the horizontal display resolution dpi.
int getVertScreenDPI ()
 Return the vertical display resolution dpi.
float getCurrentZ ()
 return the current Z value to use (equates to layer 0 for this UI element).
float getZLayer (int layer)
 return the z co-ordinate to use for the requested layer on the current GUI element.
- Public Member Functions inherited from GUI::EventSet
void addEvent (string name)
 Add a new Event to the EventSet with the given name.
void removeEvent (string name)
 Removes the Event with the given name. All connections to the event are disconnected.
void removeAllEvents ()
 Remove all Event objects from the EventSet.
bool isEventPresent (string name)
 Checks to see if an Event with the given name is present in the EventSet.
EventConnection subscribeEvent (string name, string subscriber_name)
 Subscribes the named Event to a scripted funtion.
void fireEvent (string name, EventArgs args, string eventNamespace="")
 Fires the named event passing the given EventArgs object.
bool isMuted ()
 Return whether the EventSet is muted or not.
void setMutedState (bool setting)
 Set the mute state for this EventSet.

Additional Inherited Members

- Public Attributes inherited from GUI::EventSet
Event Event
 Can be used to iterate over the events currently added to the EventSet.

Detailed Description

Abstract class defining the interface for Renderer objects.

Objects derived from Renderer are the means by which the GUI system interfaces with specific rendering technologies. To use a rendering system or API to draw CEGUI imagery requires that an appropriate Renderer object be available.


Member Function Documentation

Texture GUI::Renderer::createTexture ( )

Creates a 'null' Texture object.

Returns:
a newly created Texture object. The returned Texture object has no size or imagery associated with it, and is generally of little or no use.
Texture GUI::Renderer::createTexture ( string  filename,
string  resourceGroup 
)

Create a Texture object using the given image file.

Parameters:
filenameString object that specifies the path and filename of the image file to use when creating the texture.
resourceGroupResource group identifier to be passed to the resource provider when loading the texture file.
Returns:
a newly created Texture object. The initial contents of the texture memory is the requested image file.
Note:
Textures are always created with a size that is a power of 2. If the file you specify is of a size that is not a power of two, the final size will be rounded up. Additionally, textures are always square, so the ultimate size is governed by the larger of the width and height of the specified file. You can check the ultimate sizes by querying the texture after creation.
Texture GUI::Renderer::createTexture ( float  size)

Create a Texture object with the given pixel dimensions as specified by size. NB: Textures are always square.

Parameters:
sizefloat value that specifies the size to use for the width and height when creating the new texture.
Returns:
a newly created Texture object. The initial contents of the texture memory is undefined / random.
Note:
Textures are always created with a size that is a power of 2. If you specify a size that is not a power of two, the final size will be rounded up. So if you specify a size of 1024, the texture will be (1024 x 1024), however, if you specify a size of 1025, the texture will be (2048 x 2048). You can check the ultimate size by querying the texture after creation.
void GUI::Renderer::destroyTexture ( Texture  texture)

Destroy the given Texture object.

Parameters:
texturepointer to the Texture object to be destroyed
Returns:
Nothing
void GUI::Renderer::destroyAllTextures ( )

Destroy all Texture objects.

Returns:
Nothing
bool GUI::Renderer::isQueueingEnabled ( )

Return whether queueing is enabled.

Returns:
true if queueing is enabled, false if queueing is disabled.
float GUI::Renderer::getWidth ( )

Return the current width of the display in pixels.

Returns:
float value equal to the current width of the display in pixels.
float GUI::Renderer::getHeight ( )

Return the current height of the display in pixels.

Returns:
float value equal to the current height of the display in pixels.
Size GUI::Renderer::getSize ( )

Return the size of the display in pixels.

Returns:
Size object describing the dimensions of the current display.
Rect GUI::Renderer::getRect ( )

Return a Rect describing the screen.

Returns:
A Rect object that describes the screen area. Typically, the top-left values are always 0, and the size of the area described is equal to the screen resolution.
int GUI::Renderer::getMaxTextureSize ( )

Return the maximum texture size available.

Returns:
Size of the maximum supported texture in pixels (textures are always assumed to be square)
int GUI::Renderer::getHorzScreenDPI ( )

Return the horizontal display resolution dpi.

Returns:
horizontal resolution of the display in dpi.
int GUI::Renderer::getVertScreenDPI ( )

Return the vertical display resolution dpi.

Returns:
vertical resolution of the display in dpi.
float GUI::Renderer::getCurrentZ ( )

return the current Z value to use (equates to layer 0 for this UI element).

Returns:
float value that specifies the z co-ordinate to be used for layer 0 on the current GUI element.
float GUI::Renderer::getZLayer ( int  layer)

return the z co-ordinate to use for the requested layer on the current GUI element.

Parameters:
layerSpecifies the layer to return the Z co-ordinate for. Each GUI element can use up to 10 layers, so valid inputs are 0 to 9 inclusive. If you specify an invalid value for layer, results are undefined.
Returns:
float value that specifies the Z co-ordinate for layer layer on the current GUI element.