lxgui
|
Draws borders and background of a frame. More...
#include <gui_backdrop.hpp>
Public Member Functions | |
backdrop (frame &parent) | |
Constructor. | |
backdrop (const backdrop &)=delete | |
Non-copiable. | |
backdrop (backdrop &&)=delete | |
Non-movable. | |
backdrop & | operator= (const backdrop &)=delete |
Non-copiable. | |
backdrop & | operator= (backdrop &&)=delete |
Non-movable. | |
void | copy_from (const backdrop &other) |
Copies a backdrop's parameters into this one (inheritance). | |
void | set_background (const std::string &background_file) |
Sets the background texture. | |
const std::string & | get_background_file () const |
Returns this backdrop's background file. | |
void | set_background_color (const color &c) |
Sets the background color. | |
color | get_background_color () const |
Returns the background color. | |
void | set_background_tilling (bool is_tilling) |
Enables tilling for the background texture. | |
bool | is_background_tilling () const |
Checks if tilling is enabled for the background texture. | |
void | set_tile_size (float tile_size) |
Sets the apparent tile size. | |
float | get_tile_size () const |
Returns this backdrop's tile size. | |
void | set_background_insets (const bounds2f &insets) |
Sets insets for the background texture. | |
const bounds2f & | get_background_insets () const |
Returns this backdrop's background insets. | |
void | set_edge_insets (const bounds2f &insets) |
Sets insets for the edge texture. | |
const bounds2f & | get_edge_insets () const |
Returns this backdrop's edge insets. | |
void | set_edge (const std::string &edge_file) |
Sets the edge/corner texture. | |
const std::string & | get_edge_file () const |
Returns this backdrop's edge file. | |
void | set_edge_color (const color &c) |
Sets the edge color. | |
color | get_edge_color () const |
Returns the edge color. | |
void | set_edge_size (float edge_size) |
Sets the apparent edge size. | |
float | get_edge_size () const |
Returns this backdrop's edge size. | |
void | set_vertex_color (const color &c) |
Sets the color to be multiplied to all drawn vertices. | |
void | render () const |
Renders this backdrop on the current render target. | |
void | notify_borders_updated () const |
Tells this backdrop that its parent frame has changed dimensions. | |
Draws borders and background of a frame.
Definition at line 18 of file gui_backdrop.hpp.
|
explicit |
Constructor.
parent | The frame it is linked to |
Definition at line 13 of file gui_backdrop.cpp.
|
delete |
Non-copiable.
|
delete |
Non-movable.
void lxgui::gui::backdrop::copy_from | ( | const backdrop & | other | ) |
Copies a backdrop's parameters into this one (inheritance).
other | The backdrop to copy |
Definition at line 15 of file gui_backdrop.cpp.
color lxgui::gui::backdrop::get_background_color | ( | ) | const |
Returns the background color.
Definition at line 85 of file gui_backdrop.cpp.
const std::string & lxgui::gui::backdrop::get_background_file | ( | ) | const |
Returns this backdrop's background file.
Definition at line 68 of file gui_backdrop.cpp.
const bounds2f & lxgui::gui::backdrop::get_background_insets | ( | ) | const |
Returns this backdrop's background insets.
Definition at line 121 of file gui_backdrop.cpp.
color lxgui::gui::backdrop::get_edge_color | ( | ) | const |
const std::string & lxgui::gui::backdrop::get_edge_file | ( | ) | const |
Returns this backdrop's edge file.
Definition at line 183 of file gui_backdrop.cpp.
const bounds2f & lxgui::gui::backdrop::get_edge_insets | ( | ) | const |
Returns this backdrop's edge insets.
Definition at line 133 of file gui_backdrop.cpp.
float lxgui::gui::backdrop::get_edge_size | ( | ) | const |
Returns this backdrop's edge size.
Definition at line 214 of file gui_backdrop.cpp.
float lxgui::gui::backdrop::get_tile_size | ( | ) | const |
Returns this backdrop's tile size.
Definition at line 109 of file gui_backdrop.cpp.
bool lxgui::gui::backdrop::is_background_tilling | ( | ) | const |
Checks if tilling is enabled for the background texture.
Definition at line 97 of file gui_backdrop.cpp.
void lxgui::gui::backdrop::notify_borders_updated | ( | ) | const |
Tells this backdrop that its parent frame has changed dimensions.
Definition at line 266 of file gui_backdrop.cpp.
void lxgui::gui::backdrop::render | ( | ) | const |
Renders this backdrop on the current render target.
Definition at line 226 of file gui_backdrop.cpp.
void lxgui::gui::backdrop::set_background | ( | const std::string & | background_file | ) |
Sets the background texture.
background_file | The background texture |
Definition at line 34 of file gui_backdrop.cpp.
void lxgui::gui::backdrop::set_background_color | ( | const color & | c | ) |
Sets the background color.
c | The background color |
Definition at line 72 of file gui_backdrop.cpp.
void lxgui::gui::backdrop::set_background_insets | ( | const bounds2f & | insets | ) |
Sets insets for the background texture.
insets | The insets array |
Definition at line 113 of file gui_backdrop.cpp.
void lxgui::gui::backdrop::set_background_tilling | ( | bool | is_tilling | ) |
Enables tilling for the background texture.
is_tilling | 'true' to enable tilling |
Definition at line 89 of file gui_backdrop.cpp.
void lxgui::gui::backdrop::set_edge | ( | const std::string & | edge_file | ) |
Sets the edge/corner texture.
edge_file | The edge/corner texture |
Definition at line 137 of file gui_backdrop.cpp.
void lxgui::gui::backdrop::set_edge_color | ( | const color & | c | ) |
Sets the edge color.
c | The edge color |
Definition at line 187 of file gui_backdrop.cpp.
void lxgui::gui::backdrop::set_edge_insets | ( | const bounds2f & | insets | ) |
Sets insets for the edge texture.
insets | The insets array |
Definition at line 125 of file gui_backdrop.cpp.
void lxgui::gui::backdrop::set_edge_size | ( | float | edge_size | ) |
Sets the apparent edge size.
edge_size | The new edge size |
Definition at line 206 of file gui_backdrop.cpp.
void lxgui::gui::backdrop::set_tile_size | ( | float | tile_size | ) |
Sets the apparent tile size.
tile_size | The new tile size |
Definition at line 101 of file gui_backdrop.cpp.
void lxgui::gui::backdrop::set_vertex_color | ( | const color & | c | ) |
Sets the color to be multiplied to all drawn vertices.
c | The new vertex color |
Definition at line 218 of file gui_backdrop.cpp.