Xrb::WidgetBackgroundTextured Class Reference

Implements a single-texture widget background. More...

#include <xrb_widgetbackground.hpp>

Inheritance diagram for Xrb::WidgetBackgroundTextured:

Inheritance graph
[legend]

List of all members.

Public Member Functions

 WidgetBackgroundTextured (std::string const &texture_path)
 Constructs the background using the specified texture.
 WidgetBackgroundTextured (Resource< GLTexture > const &texture)
 Constructs the background using the specified texture.
virtual ~WidgetBackgroundTextured ()
 Destructor.
virtual WidgetBackgroundCreateClone () const
 WidgetBackgroundTextured implementation of CreateClone.
virtual void Draw (RenderContext const &render_context, ScreenCoordRect const &widget_screen_rect, ScreenCoordVector2 const &frame_margins) const
 Draws this widget background.


Detailed Description

Implements a single-texture widget background.

A single texture resource is necessary for this background.

Definition at line 102 of file xrb_widgetbackground.hpp.


Constructor & Destructor Documentation

Xrb::WidgetBackgroundTextured::WidgetBackgroundTextured ( std::string const &  texture_path  ) 

Constructs the background using the specified texture.

Parameters:
texture_path Path of the desired texture.

Definition at line 44 of file xrb_widgetbackground.cpp.

References Xrb::GLTexture::Create(), Xrb::ResourceLibrary::LoadPath(), and Xrb::Singleton::ResourceLibrary().

Referenced by CreateClone().

Xrb::WidgetBackgroundTextured::WidgetBackgroundTextured ( Resource< GLTexture > const &  texture  ) 

Constructs the background using the specified texture.

Parameters:
texture Directly specifies the GLTexture object to use.

Definition at line 58 of file xrb_widgetbackground.cpp.

Xrb::WidgetBackgroundTextured::~WidgetBackgroundTextured (  )  [virtual]

Destructor.

m_texture is automatically deleted because it goes out of scope here.

Definition at line 66 of file xrb_widgetbackground.cpp.


Member Function Documentation

WidgetBackground * Xrb::WidgetBackgroundTextured::CreateClone (  )  const [virtual]

WidgetBackgroundTextured implementation of CreateClone.

See Xrb::WidgetBackground::CreateClone for more details.

Implements Xrb::WidgetBackground.

Definition at line 70 of file xrb_widgetbackground.cpp.

References WidgetBackgroundTextured().

void Xrb::WidgetBackgroundTextured::Draw ( RenderContext const &  render_context,
ScreenCoordRect const &  widget_screen_rect,
ScreenCoordVector2 const &  frame_margins 
) const [virtual]

Draws this widget background.

Simply draws the stored texture stretched to fill the given widget screen rect.

See Xrb::WidgetBackground::Draw for more info.

Implements Xrb::WidgetBackground.

Definition at line 75 of file xrb_widgetbackground.cpp.

References Xrb::Render::DrawScreenRectTexture(), and Xrb::Resource< T >::IsValid().


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

Hosted by SourceForge.net Logo -- Generated on Fri Aug 21 21:46:39 2009 for XuqRijBuh by doxygen 1.5.8