#include <StaticGraphic.h>
Inheritance diagram for GG::StaticGraphic:
Structors | |
StaticGraphic (int x, int y, int w, int h, const boost::shared_ptr< Texture > &texture, Flags< GraphicStyle > style=GRAPHIC_NONE, Flags< WndFlag > flags=Flags< WndFlag >()) | |
StaticGraphic (int x, int y, int w, int h, const SubTexture &subtexture, Flags< GraphicStyle > style=GRAPHIC_NONE, Flags< WndFlag > flags=Flags< WndFlag >()) | |
Accessors | |
Flags< GraphicStyle > | Style () const |
Rect | RenderedArea () const |
Mutators | |
virtual void | Render () |
void | SetStyle (Flags< GraphicStyle > style) |
virtual void | DefineAttributes (WndEditor *editor) |
Structors | |
StaticGraphic () |
Though the SubTexture displayed in a StaticGraphic is fixed, its size is not; the image can be scaled (proportionately or not) to fit in the StaticGraphic's window area.
Definition at line 55 of file StaticGraphic.h.
GG::StaticGraphic::StaticGraphic | ( | int | x, | |
int | y, | |||
int | w, | |||
int | h, | |||
const boost::shared_ptr< Texture > & | texture, | |||
Flags< GraphicStyle > | style = GRAPHIC_NONE , |
|||
Flags< WndFlag > | flags = Flags< WndFlag >() | |||
) |
creates a StaticGraphic from a pre-existing Texture. creates a StaticGraphic from a pre-existing Texture.
GG::StaticGraphic::StaticGraphic | ( | int | x, | |
int | y, | |||
int | w, | |||
int | h, | |||
const SubTexture & | subtexture, | |||
Flags< GraphicStyle > | style = GRAPHIC_NONE , |
|||
Flags< WndFlag > | flags = Flags< WndFlag >() | |||
) |
creates a StaticGraphic from a pre-existing SubTexture.
GG::StaticGraphic::StaticGraphic | ( | ) | [protected] |
default ctor
Flags<GraphicStyle> GG::StaticGraphic::Style | ( | ) | const |
Rect GG::StaticGraphic::RenderedArea | ( | ) | const |
returns the area in which the graphic is actually rendered, in UpperLeft()-relative coordinates.
This may not be the entire area of the StaticGraphic, based on the style being used.
virtual void GG::StaticGraphic::Render | ( | ) | [virtual] |
draws this Wnd.
Note that Wnds being dragged for a drag-and-drop operation are rendered twice -- once in-place as normal, once in the location of the drag operation, attached to the cursor. Such Wnds may wish to render themselves differently in those two cases. To determine which render is being performed, they can call GUI::GetGUI()->RenderingDragDropWnds().
Implements GG::Control.
void GG::StaticGraphic::SetStyle | ( | Flags< GraphicStyle > | style | ) |
sets the style flags, and perfroms sanity checking
virtual void GG::StaticGraphic::DefineAttributes | ( | WndEditor * | editor | ) | [virtual] |
provides the attributes of this object that are appropriate for a user to edit in a WndEditor; see WndEditor for details.
Reimplemented from GG::Control.