GG
|
A simple, non-interactive window that displays a GG::SubTexture. More...
#include <StaticGraphic.h>
Structors | |
StaticGraphic (X x, Y y, X w, Y h, const boost::shared_ptr< Texture > &texture, Flags< GraphicStyle > style=GRAPHIC_NONE, Flags< WndFlag > flags=Flags< WndFlag >()) | |
StaticGraphic (X x, Y y, X w, Y h, const SubTexture &subtexture, Flags< GraphicStyle > style=GRAPHIC_NONE, Flags< WndFlag > flags=Flags< WndFlag >()) | |
StaticGraphic () | |
Accessors | |
Flags< GraphicStyle > | Style () const |
Rect | RenderedArea () const |
Mutators | |
virtual void | Render () |
void | SetStyle (Flags< GraphicStyle > style) |
virtual void | DefineAttributes (WndEditor *editor) |
A simple, non-interactive window that displays a GG::SubTexture.
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 57 of file StaticGraphic.h.
Flags<GraphicStyle> GG::StaticGraphic::Style | ( | ) | const |
Returns the style of the StaticGraphic
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.