The HInfoWindowObject class displays is a floating window that can display any text information that you wish to show to the user. More...

#include <HObjects.h>

Public Member Functions

void AddLine (char const *text, char const *font=0, char const *color=0, bool EraseAfterDisplay=false, int DisplayLength=-1)
 
void Flush ()
 
const char * GetName ()
 
 HInfoWindowObject (HBaseView *view, float startposx=-0.95f, float startposy=0.3, int maxlines=20, int displaylength=7)
 
void UpdateInfoBox ()
 
- Public Member Functions inherited from HObject
 HObject ()
 

Static Public Member Functions

static const char * GetStaticName ()
 
static void WindowResizeCallback (int signal, void *signal_data, void *user_data)
 

Protected Member Functions

void DoTimer ()
 
void FlushInternal ()
 

Static Protected Member Functions

static bool InfowWindowTimerClbk (float request_time, float actual_time, void *user_data)
 

Protected Attributes

bool m_bEraseAfterDisplay
 
int m_DefaultDisplayLength
 
char * m_InfoText [25]
 
char * m_InfoTextColor [25]
 
char * m_InfoTextFont [25]
 
HC_KEY m_InfoWindowKey
 
HTClientm_InfoWindowTimer
 
int m_LineMax
 
int m_LineNum
 
HBaseViewm_pView
 
float m_StartPosX
 
float m_StartPosY
 
int m_TempDisplayLength
 
float m_TimeStamp
 
float m_transmission
 

Detailed Description

The HInfoWindowObject class displays is a floating window that can display any text information that you wish to show to the user.

Constructor & Destructor Documentation

◆ HInfoWindowObject()

HInfoWindowObject::HInfoWindowObject ( HBaseView view,
float  startposx = -0.95f,
float  startposy = 0.3,
int  maxlines = 20,
int  displaylength = 7 
)

Constructs an HInfoWindowObject object.

Parameters
viewA pointer to the HBaseView object.
startposxThe initial x cordinate of the text.
startposyThe initial y coordinate of the text.
maxlinesThe maximum number of lines that the information window can display.
displaylengthThe amount of time in seconds to display the text before it is erased if EraseAfterDisplay is true.

Member Function Documentation

◆ AddLine()

void HInfoWindowObject::AddLine ( char const *  text,
char const *  font = 0,
char const *  color = 0,
bool  EraseAfterDisplay = false,
int  DisplayLength = -1 
)

This method adds a line of text to the information window.

Parameters
textA pointer to the text to be inserted into the information window.
fontA pointer to the font for the text.
colorA pointer to the color of the text.
EraseAfterDisplayPass true to erase after a limited amount of time or false to keep the text as it is.
DisplayLengthThe amount of time in seconds to display the text before it is erased if EraseAfterDisplay is true.

◆ DoTimer()

void HInfoWindowObject::DoTimer ( )
protected

This method is a helper function for InfowWindowTimerClbk. It updates the text and captures the time stamp to compare elapsed time.

◆ Flush()

void HInfoWindowObject::Flush ( )

This method clears out all the text in the information window.

◆ FlushInternal()

void HInfoWindowObject::FlushInternal ( )
protected

This is for internal use only.

◆ GetName()

const char* HInfoWindowObject::GetName ( )
virtual
Returns
The name of the object which is 'info_window'.

Implements HObject.

◆ GetStaticName()

static const char* HInfoWindowObject::GetStaticName ( )
static
Returns
The name of the object which is 'info_window'.

◆ InfowWindowTimerClbk()

static bool HInfoWindowObject::InfowWindowTimerClbk ( float  request_time,
float  actual_time,
void *  user_data 
)
staticprotected

The callback for the timer client.

Parameters
request_timeThe time the callback requested to be called.
actual_timeThe actual time the callback was called.
user_dataAdditional information for time events.

◆ UpdateInfoBox()

void HInfoWindowObject::UpdateInfoBox ( )

This method flushes the contents of the information window key. Then it inserts the text in the memory into HOOPS and requests an update in the view.

◆ WindowResizeCallback()

static void HInfoWindowObject::WindowResizeCallback ( int  signal,
void *  signal_data,
void *  user_data 
)
static

This method handles the window resize event.

Member Data Documentation

◆ m_bEraseAfterDisplay

bool HInfoWindowObject::m_bEraseAfterDisplay
protected

The value is true if the window will erase the text after an elapsed display time.

◆ m_DefaultDisplayLength

int HInfoWindowObject::m_DefaultDisplayLength
protected

The default display time in seconds for the text.

◆ m_InfoText

char* HInfoWindowObject::m_InfoText[25]
protected

The text that will be displayed in the information window.

◆ m_InfoTextColor

char* HInfoWindowObject::m_InfoTextColor[25]
protected

The color of the text in the information window.

◆ m_InfoTextFont

char* HInfoWindowObject::m_InfoTextFont[25]
protected

The font of the text in the information window.

◆ m_InfoWindowKey

HC_KEY HInfoWindowObject::m_InfoWindowKey
protected

The key to the information window.

◆ m_InfoWindowTimer

HTClient* HInfoWindowObject::m_InfoWindowTimer
protected

The timer client.

◆ m_LineMax

int HInfoWindowObject::m_LineMax
protected

The maximum number of lines of text.

◆ m_LineNum

int HInfoWindowObject::m_LineNum
protected

The number of lines of text.

◆ m_pView

HBaseView* HInfoWindowObject::m_pView
protected

A pointer to the HBaseView Object.

◆ m_StartPosX

float HInfoWindowObject::m_StartPosX
protected

The initial x position for the text.

◆ m_StartPosY

float HInfoWindowObject::m_StartPosY
protected

The initial y position for the text.

◆ m_TempDisplayLength

int HInfoWindowObject::m_TempDisplayLength
protected

The temporary display time in seconds for the text.

◆ m_TimeStamp

float HInfoWindowObject::m_TimeStamp
protected

The time in which the last timer callback was called.


The documentation for this class was generated from the following file: