GLWToolTip Class Reference

#include <GLWToolTip.h>

Inheritance diagram for GLWToolTip:

GameStateI

List of all members.

Public Member Functions

bool addToolTip (ToolTip::ToolTipType type, const LangString &title, const LangString &text, float x, float y, float w, float h)
bool addToolTip (ToolTip *tip, float x, float y, float w, float h)
void clearToolTip (float x, float y, float w, float h)
virtual void simulate (const unsigned state, float frameTime)
virtual void draw (const unsigned state)

Static Public Member Functions

static GLWToolTipinstance ()

Protected Member Functions

void setupTip (ToolTip *tip)
void calculateTip (ToolTip *tip)

Protected Attributes

ToolTipcurrentTip_
ToolTiplastTip_
float timeDrawn_
float timeSeen_
float refreshTime_
float currentX_
float currentY_
float currentW_
float currentH_
float tipX_
float tipY_
float tipW_
float tipH_
float tipOffX_
float tipOffY_
float tipTextWidth_
float tipTextHeight_
LangString tipTitle_
LangString tipText_
std::list< LangStringtipTexts_

Static Protected Attributes

static GLWToolTipinstance_ = 0

Private Member Functions

 GLWToolTip ()
virtual ~GLWToolTip ()


Detailed Description

Definition at line 28 of file GLWToolTip.h.


Constructor & Destructor Documentation

GLWToolTip::GLWToolTip (  )  [private]

Definition at line 45 of file GLWToolTip.cpp.

GLWToolTip::~GLWToolTip (  )  [private, virtual]

Definition at line 56 of file GLWToolTip.cpp.


Member Function Documentation

GLWToolTip * GLWToolTip::instance (  )  [static]

Definition at line 36 of file GLWToolTip.cpp.

References instance_.

Referenced by ScoreDialog::addLine(), ClientState::addStandardComponents(), GLWTankViewer::draw(), GLWTankModel::draw(), GLWSelectorPart::draw(), GLWidget::draw(), GLMenu::draw(), SettingsSubSelectDialogListItem::draw(), ScoreDialog::draw(), GLWIconListSaveItem::draw(), GLWIconListSubModItem::draw(), GLWIconListModItem::draw(), ConsoleImpl::drawBackdrop(), GLWChannelViewTextRenderer::drawCharacter(), NetworkSelectDialog::drawColumnGames(), NetworkSelectDialog::drawIcon(), GLWWindow::drawMaximizedWindow(), GLWPlanView::drawTanks(), TargetRendererImplTarget::render2D(), TargetRendererImplTank::render2D(), and ClientState::setupGameState().

bool GLWToolTip::addToolTip ( ToolTip::ToolTipType  type,
const LangString title,
const LangString text,
float  x,
float  y,
float  w,
float  h 
)

Definition at line 60 of file GLWToolTip.cpp.

References currentH_, currentTip_, currentW_, currentX_, currentY_, ScorchedContext::getGameState(), GameState::getMouseX(), GameState::getMouseY(), ScorchedClient::instance(), OptionsDisplay::instance(), ToolTip::setText(), ToolTip::ToolTipHelp, and ToolTip::ToolTipInfo.

Referenced by ScoreDialog::addLine(), GLWTankModel::draw(), GLWSelectorPart::draw(), GLWidget::draw(), GLMenu::draw(), SettingsSubSelectDialogListItem::draw(), ScoreDialog::draw(), GLWIconListSaveItem::draw(), GLWIconListSubModItem::draw(), GLWIconListModItem::draw(), GLWChannelViewTextRenderer::drawCharacter(), NetworkSelectDialog::drawColumnGames(), GLWWindow::drawMaximizedWindow(), GLWPlanView::drawTanks(), TargetRendererImplTarget::render2D(), and TargetRendererImplTank::render2D().

bool GLWToolTip::addToolTip ( ToolTip tip,
float  x,
float  y,
float  w,
float  h 
)

Definition at line 90 of file GLWToolTip.cpp.

References currentH_, currentTip_, currentW_, currentX_, currentY_, ScorchedContext::getGameState(), GameState::getMouseX(), GameState::getMouseY(), OptionsDisplay::getShowContextHelp(), ToolTip::getType(), ScorchedClient::instance(), OptionsDisplay::instance(), ToolTip::ToolTipHelp, and ToolTip::ToolTipInfo.

void GLWToolTip::clearToolTip ( float  x,
float  y,
float  w,
float  h 
)

Definition at line 157 of file GLWToolTip.cpp.

References currentTip_, ScorchedContext::getGameState(), GameState::getMouseX(), GameState::getMouseY(), and ScorchedClient::instance().

Referenced by GLWSelectorPart::draw(), GLWidget::draw(), and ConsoleImpl::drawBackdrop().

void GLWToolTip::simulate ( const unsigned  state,
float  frameTime 
) [virtual]

Reimplemented from GameStateI.

Definition at line 169 of file GLWToolTip.cpp.

References timeDrawn_.

void GLWToolTip::draw ( const unsigned  state  )  [virtual]

Reimplemented from GameStateI.

Definition at line 174 of file GLWToolTip.cpp.

References GLState::BLEND_ON, calculateTip(), currentH_, currentTip_, currentW_, currentX_, currentY_, GLState::DEPTH_OFF, GLFont2d::drawA(), GLWidget::drawRoundBox(), GLWFont::getGameFont(), GLViewPort::getHeight(), ToolTip::getType(), GLViewPort::getWidth(), GL_LINE_LOOP, GL_LINE_SMOOTH, GL_TRIANGLE_FAN, glBegin(), glColor4f(), glDisable(), glEnable(), glEnd(), glLineWidth(), glVertex2f(), GLWFont::instance(), OptionsDisplay::instance(), lastTip_, ToolTip::populate(), refreshTime_, selectedColor, setupTip(), GLState::TEXTURE_OFF, timeDrawn_, timeSeen_, tipH_, tipOffX_, tipOffY_, tipTextHeight_, tipTexts_, tipTextWidth_, tipTitle_, tipW_, tipX_, tipY_, ToolTip::ToolTipAlignBottom, and ToolTip::ToolTipAlignLeft.

void GLWToolTip::setupTip ( ToolTip tip  )  [protected]

Definition at line 115 of file GLWToolTip.cpp.

References currentTip_, ToolTip::getText(), ToolTip::getTitle(), tipText_, tipTextHeight_, tipTexts_, tipTextWidth_, and tipTitle_.

Referenced by draw().

void GLWToolTip::calculateTip ( ToolTip tip  )  [protected]

Definition at line 125 of file GLWToolTip.cpp.

References GLWFont::instance(), LANG_STRING, tipText_, tipTextHeight_, tipTexts_, tipTextWidth_, and tipTitle_.

Referenced by draw().


Member Data Documentation

GLWToolTip * GLWToolTip::instance_ = 0 [static, protected]

Definition at line 45 of file GLWToolTip.h.

Referenced by instance().

ToolTip* GLWToolTip::currentTip_ [protected]

Definition at line 46 of file GLWToolTip.h.

Referenced by addToolTip(), clearToolTip(), draw(), and setupTip().

ToolTip* GLWToolTip::lastTip_ [protected]

Definition at line 47 of file GLWToolTip.h.

Referenced by draw().

float GLWToolTip::timeDrawn_ [protected]

Definition at line 48 of file GLWToolTip.h.

Referenced by draw(), and simulate().

float GLWToolTip::timeSeen_ [protected]

Definition at line 48 of file GLWToolTip.h.

Referenced by draw().

float GLWToolTip::refreshTime_ [protected]

Definition at line 49 of file GLWToolTip.h.

Referenced by draw().

float GLWToolTip::currentX_ [protected]

Definition at line 52 of file GLWToolTip.h.

Referenced by addToolTip(), and draw().

float GLWToolTip::currentY_ [protected]

Definition at line 52 of file GLWToolTip.h.

Referenced by addToolTip(), and draw().

float GLWToolTip::currentW_ [protected]

Definition at line 53 of file GLWToolTip.h.

Referenced by addToolTip(), and draw().

float GLWToolTip::currentH_ [protected]

Definition at line 53 of file GLWToolTip.h.

Referenced by addToolTip(), and draw().

float GLWToolTip::tipX_ [protected]

Definition at line 54 of file GLWToolTip.h.

Referenced by draw().

float GLWToolTip::tipY_ [protected]

Definition at line 54 of file GLWToolTip.h.

Referenced by draw().

float GLWToolTip::tipW_ [protected]

Definition at line 55 of file GLWToolTip.h.

Referenced by draw().

float GLWToolTip::tipH_ [protected]

Definition at line 55 of file GLWToolTip.h.

Referenced by draw().

float GLWToolTip::tipOffX_ [protected]

Definition at line 56 of file GLWToolTip.h.

Referenced by draw().

float GLWToolTip::tipOffY_ [protected]

Definition at line 56 of file GLWToolTip.h.

Referenced by draw().

float GLWToolTip::tipTextWidth_ [protected]

Definition at line 57 of file GLWToolTip.h.

Referenced by calculateTip(), draw(), and setupTip().

float GLWToolTip::tipTextHeight_ [protected]

Definition at line 58 of file GLWToolTip.h.

Referenced by calculateTip(), draw(), and setupTip().

LangString GLWToolTip::tipTitle_ [protected]

Definition at line 59 of file GLWToolTip.h.

Referenced by calculateTip(), draw(), and setupTip().

LangString GLWToolTip::tipText_ [protected]

Definition at line 59 of file GLWToolTip.h.

Referenced by calculateTip(), and setupTip().

std::list<LangString> GLWToolTip::tipTexts_ [protected]

Definition at line 60 of file GLWToolTip.h.

Referenced by calculateTip(), draw(), and setupTip().


The documentation for this class was generated from the following files:
Generated on Mon Feb 16 15:15:03 2009 for Scorched3D by  doxygen 1.5.3