Draws borders and background of a frame. More...
#include <gui_backdrop.hpp>
Public Types | |
enum | edge_type { EDGE_LEFT, EDGE_RIGHT, EDGE_TOP, EDGE_BOTTOM, EDGE_TOPLEFT, EDGE_TOPRIGHT, EDGE_BOTTOMLEFT, EDGE_BOTTOMRIGHT } |
Public Member Functions | |
backdrop (frame *pParent) | |
Constructor. | |
void | copy_from (const backdrop &mbackdrop) |
Copies a backdrop's parameters into this one (inheritance). | |
void | set_background (const std::string &sBackgroundFile) |
Sets the background texture. | |
const std::string & | get_background_file () const |
Returns this backdrop's background file. | |
void | set_background_color (const color &mColor) |
Sets the background color. | |
color | get_background_color () const |
Returns the background color. | |
void | set_backgrond_tilling (bool bBackgroundTilling) |
Enables tilling for the background texture. | |
bool | is_background_tilling () const |
Checks if tilling is enabled for the background texture. | |
void | set_tile_size (uint uiTileSize) |
Sets the appearent tile size. | |
uint | get_tile_size () const |
Returns this backdrop's tile size. | |
void | set_background_insets (const std::array< int, 4 > &lInsets) |
Sets insets for the background texture. | |
void | set_background_insets (int iLeft, int iRight, int iTop, int iBottom) |
Sets insets for the background texture. | |
const std::array< int, 4 > & | get_background_insets () const |
Returns this backdrop's background insets. | |
void | set_edge_insets (const std::array< int, 4 > &lInsets) |
Sets insets for the edge texture. | |
void | set_edge_insets (int iLeft, int iRight, int iTop, int iBottom) |
Sets insets for the edge texture. | |
const std::array< int, 4 > & | get_edge_insets () const |
Returns this backdrop's edge insets. | |
void | set_edge (const std::string &sEdgeFile) |
Sets the edge/corner texture. | |
const std::string & | get_edge_file () const |
Returns this backdrop's edge file. | |
void | set_edge_color (const color &mColor) |
Sets the edge color. | |
color | get_edge_color () const |
Returns the edge color. | |
void | set_edge_size (uint uiEdgeSize) |
Sets the appearent edge size. | |
uint | get_edge_size () const |
Returns this backdrop's edge size. | |
void | set_vertex_color (const color &mColor) |
Sets the color to be multiplied to all drawn vertices. | |
void | render () const |
Renders this backdrop on the current render target. |
Draws borders and background of a frame.
Definition at line 12 of file gui_backdrop.hpp.
EDGE_LEFT | |
EDGE_RIGHT | |
EDGE_TOP | |
EDGE_BOTTOM | |
EDGE_TOPLEFT | |
EDGE_TOPRIGHT | |
EDGE_BOTTOMLEFT | |
EDGE_BOTTOMRIGHT |
Definition at line 16 of file gui_backdrop.hpp.
gui::backdrop::backdrop | ( | frame * | pParent | ) | [explicit] |
Constructor.
pParent | The frame it is linked to |
Definition at line 11 of file gui_backdrop.cpp.
void gui::backdrop::copy_from | ( | const backdrop & | mbackdrop | ) |
Copies a backdrop's parameters into this one (inheritance).
mbackdrop | The backdrop to copy |
Definition at line 19 of file gui_backdrop.cpp.
color gui::backdrop::get_background_color | ( | ) | const |
Returns the background color.
Definition at line 85 of file gui_backdrop.cpp.
const std::string & gui::backdrop::get_background_file | ( | ) | const |
Returns this backdrop's background file.
Definition at line 69 of file gui_backdrop.cpp.
const std::array< int, 4 > & gui::backdrop::get_background_insets | ( | ) | const |
Returns this backdrop's background insets.
Definition at line 123 of file gui_backdrop.cpp.
color gui::backdrop::get_edge_color | ( | ) | const |
const std::string & gui::backdrop::get_edge_file | ( | ) | const |
Returns this backdrop's edge file.
Definition at line 206 of file gui_backdrop.cpp.
const std::array< int, 4 > & gui::backdrop::get_edge_insets | ( | ) | const |
Returns this backdrop's edge insets.
Definition at line 138 of file gui_backdrop.cpp.
uint gui::backdrop::get_edge_size | ( | ) | const |
Returns this backdrop's edge size.
Definition at line 244 of file gui_backdrop.cpp.
uint gui::backdrop::get_tile_size | ( | ) | const |
Returns this backdrop's tile size.
Definition at line 108 of file gui_backdrop.cpp.
bool gui::backdrop::is_background_tilling | ( | ) | const |
Checks if tilling is enabled for the background texture.
Definition at line 98 of file gui_backdrop.cpp.
void gui::backdrop::render | ( | ) | const |
Renders this backdrop on the current render target.
Definition at line 261 of file gui_backdrop.cpp.
void gui::backdrop::set_backgrond_tilling | ( | bool | bBackgroundTilling | ) |
Enables tilling for the background texture.
bBackgroundTilling | 'true' to enable tilling |
Definition at line 90 of file gui_backdrop.cpp.
void gui::backdrop::set_background | ( | const std::string & | sBackgroundFile | ) |
Sets the background texture.
sBackgroundFile | The background texture |
Definition at line 39 of file gui_backdrop.cpp.
void gui::backdrop::set_background_color | ( | const color & | mColor | ) |
void gui::backdrop::set_background_insets | ( | int | iLeft, | |
int | iRight, | |||
int | iTop, | |||
int | iBottom | |||
) |
Sets insets for the background texture.
iLeft | The left inset | |
iRight | The right inset | |
iTop | The top inset | |
iBottom | The bottom inset |
Definition at line 118 of file gui_backdrop.cpp.
void gui::backdrop::set_background_insets | ( | const std::array< int, 4 > & | lInsets | ) |
Sets insets for the background texture.
lInsets | The insets array |
Definition at line 113 of file gui_backdrop.cpp.
void gui::backdrop::set_edge | ( | const std::string & | sEdgeFile | ) |
Sets the edge/corner texture.
sEdgeFile | The edge/corner texture |
Definition at line 143 of file gui_backdrop.cpp.
void gui::backdrop::set_edge_color | ( | const color & | mColor | ) |
void gui::backdrop::set_edge_insets | ( | int | iLeft, | |
int | iRight, | |||
int | iTop, | |||
int | iBottom | |||
) |
Sets insets for the edge texture.
iLeft | The left inset | |
iRight | The right inset | |
iTop | The top inset | |
iBottom | The bottom inset |
Definition at line 133 of file gui_backdrop.cpp.
void gui::backdrop::set_edge_insets | ( | const std::array< int, 4 > & | lInsets | ) |
Sets insets for the edge texture.
lInsets | The insets array |
Definition at line 128 of file gui_backdrop.cpp.
void gui::backdrop::set_edge_size | ( | uint | uiEdgeSize | ) |
Sets the appearent edge size.
uiEdgeSize | The new edget size |
Definition at line 239 of file gui_backdrop.cpp.
void gui::backdrop::set_tile_size | ( | uint | uiTileSize | ) |
Sets the appearent tile size.
uiTileSize | The new edget size |
Definition at line 103 of file gui_backdrop.cpp.
void gui::backdrop::set_vertex_color | ( | const color & | mColor | ) |
Sets the color to be multiplied to all drawn vertices.
Definition at line 249 of file gui_backdrop.cpp.