Clarisse 4.0 SP9 SDK  4.0.0.0.9
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
GuiDc Class Referenceabstract
Inheritance diagram for GuiDc:
CoreBaseObject CoreBaseType GuiGlWidgetDc GuiWidgetDc GuiSpreadsheetDrawContext

Public Member Functions

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)=0
 Draw the given text at a pixel position, using the given color.
 
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)=0
 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)=0
 Draw a solid rectangle using the given color.
 
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
 
CoreString get_class_interface () const
 
const unsigned long & get_class_info_id () const
 
bool is_kindof (const CoreClassInfo &cinfo) const
 
virtual const CoreClassInfoget_class_info () const
 
bool operator== (const CoreBaseObject &obj) 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
 
bool operator== (const CoreBaseType &obj) const
 

Protected Member Functions

 GuiDc (GuiWidget &widget)
 
virtual ~GuiDc (void)
 

Protected Attributes

GuiWidgetm_widget
 The widget this dc draws to.
 

Friends

class GuiWidget
 

Additional Inherited Members

- Static Public Member Functions inherited from CoreBaseObject
static const CoreClassInfoclass_info ()
 
static bool ___class_destructor__ (void *instance, const bool &is_array)
 
template<class T >
static T * cast (CoreBaseObject *object)
 
template<class T >
static const T * cast (const CoreBaseObject *object)
 

Detailed Description

Contains basic drawing functions to be use in widgets draw()

Constructor & Destructor Documentation

GuiDc::GuiDc ( GuiWidget widget)
protected

Constructor

GuiDc::~GuiDc ( void  )
protectedvirtual

Destructor

Member Function Documentation

void GuiDc::draw_rect ( const GMathVec4i &  rectangle,
const GMathVec3uc &  color 
)
inline

Draw a rectangle outline.

Parameters
rectangleThe rectangle.
colorThe color of the rectangle outline.
void GuiDc::draw_rectf ( const GMathVec4i &  rectangle,
const GMathVec3uc &  color 
)
inline

Draw a solid rectangle.

Parameters
rectangleThe rectangle
colorThe color of the rectangle.
void GuiDc::draw_text ( const CoreString text,
const GMathVec2i &  position,
GMathVec3uc &  color 
)
inline

Draw text.

Parameters
textText to draw
positionThe position to draw the text at.
colorThe color of the text.
void GuiDc::get_color ( const GuiColorScheme::Group &  group,
const GuiColorScheme::Role &  role,
unsigned char &  r,
unsigned char &  g,
unsigned char &  b 
) const
inline

Get a color from the color scheme.

Parameters
groupColor scheme group.
roleColor scheme role.
rOutput red component.
gOutput green component.
bOutput blue component.
const GMathVec3uc & GuiDc::get_color ( const GuiColorScheme::Group &  group,
const GuiColorScheme::Role &  role 
) const
inline

Get a color from the color scheme.

Parameters
groupColor scheme group.
roleColor scheme role.
Returns
The color as a GMathVec3uc.
void GuiDc::get_text_size ( const CoreString text,
int &  w,
int &  h,
GuiFont::Weight  weight = GuiFont::WEIGHT_NORMAL 
) const
inline

Get the size occupied by a given text at a given weight.

Parameters
textThe text.
wOutput width of the text
hOutput height of the text
weightFont weight to use.
void GuiDc::get_text_size ( const char *  text,
int &  w,
int &  h,
GuiFont::Weight  weight = GuiFont::WEIGHT_NORMAL 
) const
inline

Get the size occupied by a given text at a given weight.

Parameters
textThe text.
wOutput width of the text
hOutput height of the text
weightFont weight to use.