Clarisse 5.0 SP8 SDK  5.0.5.8.0
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Public Member Functions | Static Public Member Functions | Protected Member Functions | Friends | List of all members
GuiGlWidgetDc Class Reference

Specialized DC for OpenGL which contains helper function for opengl drawing. More...

Inheritance diagram for GuiGlWidgetDc:
GuiDc CoreBaseObject CoreBaseType

Public Member Functions

virtual void draw_text_with_rect (const CoreString &text, const int &x, const int &y, const unsigned char &r, const unsigned char &g, const unsigned char &b, const unsigned char &r_r, const unsigned char &r_g, const unsigned char &r_b, unsigned int left_margin=0)
 
virtual void draw_text_with_outline (const CoreString &text, const int &x, const int &y, const unsigned char &r, const unsigned char &g, const unsigned char &b, const unsigned char &ro, const unsigned char &go, const unsigned char &bo, double alpha=1.0)
 
virtual void draw_text (const CoreString &text, const int &x, const int &y, const unsigned char &r, const unsigned char &g, const unsigned char &b) override
 Draws text.
 
virtual void draw_text (const CoreString &text, const int &x, const int &y, const int &w, const int &h, const unsigned char &r, const unsigned char &g, const unsigned char &b)
 Draws text.
 
virtual void draw_text (const CoreString &text, const double &x, const double &y)
 Draws text.
 
virtual void draw_text (const CoreString &text, const int &x, const int &y, const unsigned char &r, const unsigned char &g, const unsigned char &b, const int &w, const GuiGlWidget::TextEllipsis &ellipsis)
 Draws text.
 
virtual GMathVec3i draw_text (const CoreString &text, const int &w, const GuiGlWidget::TextEllipsis &ellipsis=GuiGlWidget::TEXT_ELLIPSIS_RIGHT, const GuiWidget::Justify &justification=GuiWidget::JUSTIFY_LEFT, const int &zone_w=0, const float &scale=1.f, bool adaptive_font=false, int max_adaptive_font_size=12)
 draw gl text at current position using current font
 
void fast_draw_text_begin ()
 
void fast_draw_text (const CoreString &text)
 
void fast_draw_text_end ()
 
GuiGlWidgetget_gl_widget ()
 
virtual void draw_rect (const int &x, const int &y, const int &w, const int &h, const unsigned char &r, const unsigned char &g, const unsigned char &b) override
 Draw a rectangle outline using the given color.
 
virtual void draw_rectf (const int &x, const int &y, const int &w, const int &h, const unsigned char &r, const unsigned char &g, const unsigned char &b) override
 Draw a solid rectangle using the given color.
 
- Public Member Functions inherited from GuiDc
void draw_text (const CoreString &text, const GMathVec2i &position, GMathVec3uc &color)
 Draw text.
 
void draw_rect (const GMathVec4i &rectangle, const GMathVec3uc &color)
 Draw a rectangle outline.
 
void draw_rectf (const GMathVec4i &rectangle, const GMathVec3uc &color)
 Draw a solid rectangle.
 
void get_color (const GuiColorScheme::Group &group, const GuiColorScheme::Role &role, unsigned char &r, unsigned char &g, unsigned char &b) const
 Get a color from the color scheme.
 
const GMathVec3uc & get_color (const GuiColorScheme::Group &group, const GuiColorScheme::Role &role) const
 Get a color from the color scheme.
 
GuiFontget_font (void) const
 Get the font.
 
void get_text_size (const CoreString &text, int &w, int &h, GuiFont::Weight weight=GuiFont::WEIGHT_NORMAL) const
 Get the size occupied by a given text at a given weight.
 
void get_text_size (const char *text, int &w, int &h, GuiFont::Weight weight=GuiFont::WEIGHT_NORMAL) const
 Get the size occupied by a given text at a given weight.
 
GuiWidgetget_widget (void)
 Get the drawing context's widget.
 
- Public Member Functions inherited from CoreBaseObject
bool is_kindof (const CoreBaseObject &object) const
 
virtual size_t get_memory_size () const
 
CoreString get_class_info_name () const
 
const unsigned long & get_class_info_id () const
 
virtual bool is_kindof (const CoreClassInfo &cinfo) const
 
virtual const CoreClassInfoget_class_info () const
 
template<class T >
T * cast ()
 
template<class T >
const T * cast () const
 
- Public Member Functions inherited from CoreBaseType
bool is_kindof (const CoreClassInfo &cinfo) const
 

Static Public Member Functions

static GlProgram * get_font_shader ()
 
static void destroy_font_shader ()
 

Protected Member Functions

 GuiGlWidgetDc (GuiWidget &widget)
 
- Protected Member Functions inherited from GuiDc
 GuiDc (GuiWidget &widget)
 

Friends

class GuiGlWidget
 

Additional Inherited Members

- Protected Attributes inherited from GuiDc
GuiWidgetm_widget
 The widget this dc draws to.
 

Detailed Description

Specialized DC for OpenGL which contains helper function for opengl drawing.

Member Function Documentation

void GuiGlWidgetDc::draw_text ( const CoreString text,
const int &  x,
const int &  y,
const unsigned char &  r,
const unsigned char &  g,
const unsigned char &  b 
)
overridevirtual

Draws text.

Parameters
[in]textto draw
[in]xposition
[in]yposition
[in]rred color component [0-255]
[in]ggreen color component [0-255]
[in]bblue color component [0-255]

Implements GuiDc.

void GuiGlWidgetDc::draw_text ( const CoreString text,
const int &  x,
const int &  y,
const int &  w,
const int &  h,
const unsigned char &  r,
const unsigned char &  g,
const unsigned char &  b 
)
virtual

Draws text.

Parameters
[in]textto draw
[in]xposition
[in]yposition
[in]wtext width
[in]htext height
[in]rred color component [0-255]
[in]ggreen color component [0-255]
[in]bblue color component [0-255]
void GuiGlWidgetDc::draw_text ( const CoreString text,
const double &  x,
const double &  y 
)
virtual

Draws text.

Parameters
[in]textto draw
[in]xposition
[in]yposition
void GuiGlWidgetDc::draw_text ( const CoreString text,
const int &  x,
const int &  y,
const unsigned char &  r,
const unsigned char &  g,
const unsigned char &  b,
const int &  w,
const GuiGlWidget::TextEllipsis &  ellipsis 
)
virtual

Draws text.

Parameters
[in]textto draw
[in]xposition
[in]yposition
[in]rred color component [0-255]
[in]ggreen color component [0-255]
[in]bblue color component [0-255]
[in]wmaximum width (text will be ellipsed depending on ellipsis parameter)
[in]ellipsistext ellipsis direction if text is larger than specified width
GMathVec3i GuiGlWidgetDc::draw_text ( const CoreString text,
const int &  max_text_w,
const GuiGlWidget::TextEllipsis &  ellipsis = GuiGlWidget::TEXT_ELLIPSIS_RIGHT,
const GuiWidget::Justify &  justification = GuiWidget::JUSTIFY_LEFT,
const int &  zone_w = 0,
const float &  scale = 1.f,
bool  adaptive_font = false,
int  max_adaptive_font_size = 12 
)
virtual

draw gl text at current position using current font

Parameters
[in]texttext to draw
[in]max_text_wmaximum width of the text (0 for no limit)
[in]ellipsisto use if text is larger than given width
[in]justificationto use
[in]zone_wwidth of the zone to justify the text into
[in]scaletext scale
[in]adaptive_fontif true, font is chosen with respect to requested scale
[in]max_adaptive_font_sizeif adaptive_font is true, limits chosen font size
Returns
actual [text width, text height, font size] used