MityDSP Documentation Index
Public Member Functions
MityDSP::tcGuiDisplay Class Reference

#include <ggui/gui_display.h>

Inheritance diagram for MityDSP::tcGuiDisplay:
MityDSP::tcGuiObject

List of all members.

Public Member Functions

 tcGuiDisplay (const char *name, tcBench *bench, int idd)
 ~tcGuiDisplay ()
virtual bool ParseXML (TiXmlElement *ahDom)
void create ()
void set_animate (bool animate)
void set_normal_fg_color (tsRgb color)
void set_error_fg_color (tsRgb color)
void set_warn_fg_color (tsRgb color)
void set_normal_bg_color (tsRgb color, bool trans)
void set_error_bg_color (tsRgb color, bool trans)
void set_warn_bg_color (tsRgb color, bool trans)
void set_text (const char *text)
void set_max_chars (uint8 max_chars)
int get_max_chars (void) const
void set_status (DISPLAY_STATUS status)
tsRgb get_normal_fg_color ()
tsRgb get_error_fg_color ()
tsRgb get_warn_fg_color ()
tsRgb get_normal_bg_color ()
tsRgb get_error_bg_color ()
tsRgb get_warn_bg_color ()
bool does_l_mouse ()
void animate ()
void draw (tcGuiDspDisplay &pd)
- Public Member Functions inherited from MityDSP::tcGuiObject
 tcGuiObject (const char *name, tcBench *bench, int idd, uint32 type)
virtual ~tcGuiObject ()
const char * name ()
const GSTRINGgname ()
uint32 type ()
int idd ()
const char * get_text ()
bool is_visible ()
int get_x_pos ()
int get_y_pos ()
int get_height ()
int get_width ()
void get_rect (tcRect &rect)
int get_type ()
virtual tcGuiObjectget_parent_obj ()
virtual void show (bool show=true)
virtual void hide ()
virtual void set_x_pos (int x)
virtual void set_y_pos (int y)
virtual void set_height (int h)
virtual void set_width (int w)
void set_image (tcGuiImage *image)
virtual void set_text_x_pos (int x)
virtual void set_text_y_pos (int y)
void set_text_font (tcDspFont *font)
void set_text_font (const char *font_name)
void set_text_align (int align)
void set_text_color (tsRgb color)
void set_text_vertical (bool vert)
void set_text_wrap (bool wrap)
void set_fg_color (tsRgb color)
void set_bg_color (tsRgb color)
void set_user_id (int id)
void set_user_ptr (void *ptr)
int get_user_id ()
tsRgb get_fg_color ()
tsRgb get_bg_color ()
tsRgb get_text_color ()
virtual bool is_point_in (int x, int y)
virtual bool is_rect_overlapped (tcRect &rect)
virtual bool lbutton_down (int x, int y)
virtual void lbutton_up (int x, int y)
virtual void mouse_move (int x, int y, int flags)
void invalidate (tcRect *bckgrnd_redraw=NULL)

Additional Inherited Members

- Public Types inherited from MityDSP::tcGuiObject
enum  teAlignment {
  eeAlignLeft = 0x0000, eeAlignHCenter = 0x0001, eeAlignRight = 0x0002, eeAlignHMask = 0x0003,
  eeAlignTop = 0x0000, eeAlignVCenter = 0x0010, eeAlignBottom = 0x0020, eeAlignVMask = 0x0030,
  eeAlignCenter = eeAlignHCenter|eeAlignVCenter, eeAlignTopLeft = eeAlignTop|eeAlignLeft
}
- Protected Member Functions inherited from MityDSP::tcGuiObject
virtual void calculate_text_rect (int alignment)
virtual void draw_text (tcGuiDspDisplay &pd, int alignment, int dip=0, float opacity=1.0F)
- Protected Attributes inherited from MityDSP::tcGuiObject
bool m_created
 true when XML file parsing is complete and object has been initialized
bool m_visible
 true when object is potentially visible on the full screen
uint32 m_type
tcBenchm_bench
 pointer to the tcGuiBench (widget manager) object
bool m_animate
 true if this widget will perform animation
GSTRING m_name
 name of the widget
int m_idd
 unique ID number of the widget
int m_x_pos
 screen x position of the widget
int m_y_pos
 screen y position of the widget
int m_height
 widget height
int m_width
 widget widget
tcRect m_obj_rect
 bounding rectangle of widget (screen coordinates) (may not include all text)
tcRect m_text_rect
 bounding rectangle text for widget (screen coordinates)
int m_lcapture_x
int m_lcapture_y
int m_rcapture_x
int m_rcapture_y
tsRgb m_fg_color
 foregroun color to use when rendering tcGuiObject
tsRgb m_bg_color
 background color to use when rendering tcGuiObject
tsRgb m_text_color
 color to use when rendering tcGuiObject text
tcDspFont * m_font
 font to use when rendering tcGuiObject text
GSTRING m_text
 base tcGuiObject class text data
int m_text_x_pos
 reference screen x position of object text
int m_text_y_pos
 reference screen y position of object text
int m_text_align
 alignment flags used for text rendering
bool m_text_vertical
bool m_text_wrap
 true if this text string should be wrapped to available space when drawn
int m_user_id
void * m_user_ptr
tcGuiImagem_image
 pointer to optional background image

Detailed Description

The tcGuiDisplay class is derived tcGuiObject class implementing a text label widget that includes some animation features and a programmable background highlighting color for error states including NORMAL, WARNING, and ERROR.

See also:
tcGuiDisplay Page

Constructor & Destructor Documentation

tcGuiDisplay::tcGuiDisplay ( const char *  name,
tcBench bench,
int  idd 
)

Constructor

Parameters:
nameObject ID name from the XML file.
benchThe Controlling tcBench object for this widget.
nameThe windows control ID that we assigned to this control.
tcGuiDisplay::~tcGuiDisplay ( )

Destructor


Member Function Documentation

bool tcGuiDisplay::ParseXML ( TiXmlElement *  apElement)
virtual

Parse common XML elements from the DOM.

Reimplemented from MityDSP::tcGuiObject.

void tcGuiDisplay::create ( )
virtual

This function creates the text display control.

Note:
This function is called after all of the XML file settings are read.

Reimplemented from MityDSP::tcGuiObject.

void MityDSP::tcGuiDisplay::set_animate ( bool  animate)
inlinevirtual

Reimplemented from MityDSP::tcGuiObject.

void MityDSP::tcGuiDisplay::set_normal_fg_color ( tsRgb  color)
inline
void MityDSP::tcGuiDisplay::set_error_fg_color ( tsRgb  color)
inline
void MityDSP::tcGuiDisplay::set_warn_fg_color ( tsRgb  color)
inline
void MityDSP::tcGuiDisplay::set_normal_bg_color ( tsRgb  color,
bool  trans 
)
inline
void MityDSP::tcGuiDisplay::set_error_bg_color ( tsRgb  color,
bool  trans 
)
inline
void MityDSP::tcGuiDisplay::set_warn_bg_color ( tsRgb  color,
bool  trans 
)
inline
void tcGuiDisplay::set_text ( const char *  text)
virtual

This function modifies the display text

Note:
This function differs from the xml_set_text() function in that it will modify the actual windows control. This is called after display creation, usually from within the script virtual machine.
Parameters:
textThe new text for the display

Reimplemented from MityDSP::tcGuiObject.

void tcGuiDisplay::set_max_chars ( uint8  max_chars)

Set the maximum number of characters to display prior to wrapping/scrolling.

Parameters:
max_charsThe new maximum number of characters
int MityDSP::tcGuiDisplay::get_max_chars ( void  ) const
inline
void tcGuiDisplay::set_status ( DISPLAY_STATUS  status)

Sets the current error status of the widget, which will update the displayed text colors and background.

Parameters:
statusnew status to use for widget.
Note:
this routine will invalidate the widget if a status change is asserted.
tsRgb MityDSP::tcGuiDisplay::get_normal_fg_color ( )
inline
tsRgb MityDSP::tcGuiDisplay::get_error_fg_color ( )
inline
tsRgb MityDSP::tcGuiDisplay::get_warn_fg_color ( )
inline
tsRgb MityDSP::tcGuiDisplay::get_normal_bg_color ( )
inline
tsRgb MityDSP::tcGuiDisplay::get_error_bg_color ( )
inline
tsRgb MityDSP::tcGuiDisplay::get_warn_bg_color ( )
inline
bool MityDSP::tcGuiDisplay::does_l_mouse ( )
inlinevirtual

Reimplemented from MityDSP::tcGuiObject.

void tcGuiDisplay::animate ( )
virtual

Handle display widget animation (scrolling, etc.). This method should be called periodically from the top level framework when the widget is visible.

Reimplemented from MityDSP::tcGuiObject.

void tcGuiDisplay::draw ( tcGuiDspDisplay pd)
virtual

This function draws the display

Parameters:
pdreference to painting device context to render into.

Reimplemented from MityDSP::tcGuiObject.


  
Generated on Mon Apr 22 2013 11:33:50 for MityDSP Skinnable Graphics User Interface (GGUI) by  Doxygen Version 1.8.1.1
Copyright © 2009, Critical Link LLC, All rights reserved.