Style (colour, line width, point radius) of a geometric object. More...
#include <vgui_style.h>
Public Member Functions | |
void | apply_color () const |
Sets the GL colour to this style's value. | |
void | apply_line_width () const |
Sets the GL line width to this style's value. | |
void | apply_point_size () const |
Sets the GL point size to this style's value. | |
void | apply_all () const |
Sets all the GL style parameters (colour, size, width). | |
void | ref () |
void | unref () |
int | get_references () const |
bool | is_referenced () const |
Static Public Member Functions | |
static vgui_style_sptr | new_style () |
Create a new style object. | |
static vgui_style_sptr | new_style (float r, float g, float b, float point_size, float line_width, float alpha=1.0f) |
Create a new style object. | |
static vgui_style_sptr | new_style (const vgui_style_sptr &style) |
Create a new style object from an existing one;. | |
Public Attributes | |
float | rgba [4] |
Style colour. | |
float | point_size |
Style point radius. | |
float | line_width |
Style line width. | |
Protected Member Functions | |
vgui_style () | |
Constructor - creates a style with default values. | |
vgui_style (float r, float g, float b, float point_size, float line_width, float alpha) | |
Constructor - creates a style and initializes the values. | |
vgui_style (vgui_style const &s) | |
~vgui_style () | |
Friends | |
class | vbl_smart_ptr< vgui_style > |
Style (colour, line width, point radius) of a geometric object.
vgui_style objects are dynamic only and should be accessed via smart pointer only. The static new_style member function is the only way to produce new styles. You should call
vgui_style::new_style(...);
instead of
new vgui_style(...);
Definition at line 38 of file vgui_style.h.
vgui_style::vgui_style | ( | ) | [protected] |
Constructor - creates a style with default values.
Definition at line 44 of file vgui_style.cxx.
vgui_style::vgui_style | ( | float | r, |
float | g, | ||
float | b, | ||
float | point_size, | ||
float | line_width, | ||
float | alpha | ||
) | [protected] |
Constructor - creates a style and initializes the values.
Definition at line 56 of file vgui_style.cxx.
vgui_style::vgui_style | ( | vgui_style const & | s | ) | [inline, protected] |
Definition at line 88 of file vgui_style.h.
vgui_style::~vgui_style | ( | ) | [protected] |
Definition at line 66 of file vgui_style.cxx.
void vgui_style::apply_all | ( | ) | const |
Sets all the GL style parameters (colour, size, width).
Definition at line 97 of file vgui_style.cxx.
void vgui_style::apply_color | ( | ) | const |
Sets the GL colour to this style's value.
Does nothing if the colour is invalid.
Definition at line 77 of file vgui_style.cxx.
void vgui_style::apply_line_width | ( | ) | const |
Sets the GL line width to this style's value.
Does nothing if the width is invalid (e.g. <= 0.0)
Definition at line 83 of file vgui_style.cxx.
void vgui_style::apply_point_size | ( | ) | const |
Sets the GL point size to this style's value.
Does nothing if the point size is invalid (e.g. <= 0.0)
Definition at line 90 of file vgui_style.cxx.
vgui_style_sptr vgui_style::new_style | ( | ) | [static] |
Create a new style object.
Definition at line 23 of file vgui_style.cxx.
vgui_style_sptr vgui_style::new_style | ( | float | r, |
float | g, | ||
float | b, | ||
float | point_size, | ||
float | line_width, | ||
float | alpha = 1.0f |
||
) | [static] |
Create a new style object.
Definition at line 30 of file vgui_style.cxx.
vgui_style_sptr vgui_style::new_style | ( | const vgui_style_sptr & | style | ) | [static] |
Create a new style object from an existing one;.
Definition at line 37 of file vgui_style.cxx.
friend class vbl_smart_ptr< vgui_style > [friend] |
Definition at line 95 of file vgui_style.h.
float vgui_style::line_width |
Style line width.
Definition at line 78 of file vgui_style.h.
float vgui_style::point_size |
Style point radius.
Definition at line 75 of file vgui_style.h.
float vgui_style::rgba[4] |
Style colour.
Definition at line 72 of file vgui_style.h.