#include <GLWWindow.h>

Public Types | |
| enum | PossibleStates { eNoTitle = 1, eSmallTitle = 2, eTransparent = 4, eResizeable = 8, eCircle = 16, eNoDraw = 32, eSavePosition = 64, eSemiTransparent = 128, eNoMove = 256, eClickTransparent = 512 } |
Public Member Functions | |
| GLWWindow (const std::string &name="None", float x=0.0f, float y=0.0f, float w=0.0f, float h=0.0f, unsigned int states=0, const std::string &description="None") | |
| GLWWindow (const std::string &name, float w, float h, unsigned int states, const std::string &description) | |
| virtual | ~GLWWindow () |
| virtual bool | initFromXML (XMLNode *node) |
| virtual void | windowInit (const unsigned state) |
| virtual void | draw () |
| virtual void | mouseDown (int button, float x, float y, bool &skipRest) |
| virtual void | mouseUp (int button, float x, float y, bool &skipRest) |
| virtual void | mouseDrag (int button, float mx, float my, float x, float y, bool &skipRest) |
| virtual void | keyDown (char *buffer, unsigned int keyState, KeyboardHistory::HistoryElement *history, int hisCount, bool &skipRest) |
| virtual void | mouseWheel (float x, float y, float z, bool &skipRest) |
| virtual void | savePosition (XMLNode *node) |
| virtual void | loadPosition (XMLNode *node) |
| const char * | getDescription () |
| ToolTip & | getToolTip () |
| void | setWindowLevel (unsigned int windowLevel) |
| unsigned int | getWindowLevel () |
| unsigned int | getWindowState () |
| void | needsCentered () |
| virtual void | drawIconBox (float x, float y) |
| REGISTER_CLASS_HEADER (GLWWindow) | |
Protected Types | |
| enum | { NoDrag, TitleDrag, SizeDrag } |
Protected Member Functions | |
| virtual void | drawWindowCircle (float x, float y, float w, float h) |
| virtual void | drawOutlinePoints (float x, float y, float w, float h) |
| virtual void | drawBackSurface (float x, float y, float w, float h) |
| virtual void | drawTitleBar (float x, float y, float w, float h) |
| virtual void | drawSurround (float x, float y, float w, float h) |
| virtual void | drawMaximizedWindow () |
| virtual void | drawInfoBox (float x, float y, float w) |
| virtual void | drawJoin (float x, float y) |
Protected Attributes | |
| enum GLWWindow:: { ... } | dragging_ |
| ToolTip | toolTip_ |
| bool | showTitle_ |
| bool | needCentered_ |
| bool | disabled_ |
| bool | initPosition_ |
| unsigned int | windowState_ |
| unsigned int | windowLevel_ |
| float | maxWindowSize_ |
| std::string | description_ |
Static Protected Attributes | |
| static GLTexture | moveTexture_ |
Definition at line 29 of file GLWWindow.h.
| eNoTitle | |
| eSmallTitle | |
| eTransparent | |
| eResizeable | |
| eCircle | |
| eNoDraw | |
| eSavePosition | |
| eSemiTransparent | |
| eNoMove | |
| eClickTransparent |
Definition at line 32 of file GLWWindow.h.
anonymous enum [protected] |
| GLWWindow::GLWWindow | ( | const std::string & | name = "None", |
|
| float | x = 0.0f, |
|||
| float | y = 0.0f, |
|||
| float | w = 0.0f, |
|||
| float | h = 0.0f, |
|||
| unsigned int | states = 0, |
|||
| const std::string & | description = "None" | |||
| ) |
Definition at line 43 of file GLWWindow.cpp.
References GLWPanel::getDrawPanel(), and GLWidget::setName().
| GLWWindow::GLWWindow | ( | const std::string & | name, | |
| float | w, | |||
| float | h, | |||
| unsigned int | states, | |||
| const std::string & | description | |||
| ) |
Definition at line 58 of file GLWWindow.cpp.
References GLWPanel::getDrawPanel(), and GLWidget::setName().
| GLWWindow::~GLWWindow | ( | ) | [virtual] |
Definition at line 72 of file GLWWindow.cpp.
| bool GLWWindow::initFromXML | ( | XMLNode * | node | ) | [virtual] |
Reimplemented from GLWPanel.
Reimplemented in GLWWindowSkin.
Definition at line 471 of file GLWWindow.cpp.
References description_, disabled_, XMLNode::getNamedChild(), GLWPanel::initFromXML(), LANG_RESOURCE, GLWidget::name_, ToolTip::setText(), toolTip_, ToolTip::ToolTipHelp, windowLevel_, and windowState_.
Referenced by GLWWindowSkin::initFromXML().
| void GLWWindow::windowInit | ( | const unsigned | state | ) | [virtual] |
Reimplemented in AutoDefenseDialog, ConnectDialog, InventoryDialog, ScoreDialog, and SkipAllDialog.
Definition at line 77 of file GLWWindow.cpp.
Referenced by GLWWindowManager::setCurrentEntry().
| void GLWWindow::draw | ( | ) | [virtual] |
Reimplemented from GLWPanel.
Reimplemented in AnimatedBackdropDialog, BackdropDialog, BuyAccessoryDialog, CameraDialog, LogDialog, MessageDialog, PlayerDialog, ProgressDialog, RulesDialog, ScoreDialog, StartDialog, TutorialDialog, GLMenu, and GLWSelector.
Definition at line 272 of file GLWWindow.cpp.
References GLState::BLEND_ON, GLState::DEPTH_OFF, drawMaximizedWindow(), GLWidget::getH(), GLViewPort::getHeight(), GLWidget::getW(), GLViewPort::getWidth(), GL_LINE_SMOOTH, glDisable(), glEnable(), GLWidget::h_, initPosition_, OptionsDisplay::instance(), needCentered_, GLWidget::setH(), GLWidget::setW(), GLWidget::setX(), GLWidget::setY(), GLState::TEXTURE_OFF, GLWidget::w_, GLWidget::x_, and GLWidget::y_.
Referenced by GLWWindowManager::draw(), TutorialDialog::draw(), ScoreDialog::draw(), RulesDialog::draw(), ProgressDialog::draw(), PlayerDialog::draw(), MessageDialog::draw(), LogDialog::draw(), CameraDialog::draw(), and BuyAccessoryDialog::draw().
| void GLWWindow::mouseDown | ( | int | button, | |
| float | x, | |||
| float | y, | |||
| bool & | skipRest | |||
| ) | [virtual] |
Reimplemented from GLWPanel.
Reimplemented in CameraDialog, MsgBoxDialog, StartDialog, GLMenu, and GLWSelector.
Definition at line 308 of file GLWWindow.cpp.
References disabled_, dragging_, eCircle, eClickTransparent, eNoDraw, eNoMove, eResizeable, eSmallTitle, GLWidget::h_, GLWidget::inBox(), GLWPanel::mouseDown(), showTitle_, SizeDrag, smallTitleHeight, TitleDrag, titleHeight, titleWidth, GLWidget::w_, windowState_, GLWidget::x_, and GLWidget::y_.
Referenced by GLWWindowManager::mouseDown(), MsgBoxDialog::mouseDown(), and CameraDialog::mouseDown().
| void GLWWindow::mouseUp | ( | int | button, | |
| float | x, | |||
| float | y, | |||
| bool & | skipRest | |||
| ) | [virtual] |
Reimplemented from GLWPanel.
Reimplemented in MsgBoxDialog, GLMenu, and GLWSelector.
Definition at line 366 of file GLWWindow.cpp.
References disabled_, dragging_, GLWPanel::mouseUp(), and NoDrag.
Referenced by GLWWindowManager::mouseUp(), and MsgBoxDialog::mouseUp().
| void GLWWindow::mouseDrag | ( | int | button, | |
| float | mx, | |||
| float | my, | |||
| float | x, | |||
| float | y, | |||
| bool & | skipRest | |||
| ) | [virtual] |
Reimplemented from GLWPanel.
Reimplemented in GLMenu, and GLWSelector.
Definition at line 374 of file GLWWindow.cpp.
References disabled_, dragging_, GLViewPort::getHeight(), GLViewPort::getWidth(), GLWidget::h_, maxWindowSize_, minWindowSize, GLWPanel::mouseDrag(), SizeDrag, TitleDrag, GLWidget::w_, GLWidget::x_, and GLWidget::y_.
Referenced by GLWWindowManager::mouseDrag().
| void GLWWindow::keyDown | ( | char * | buffer, | |
| unsigned int | keyState, | |||
| KeyboardHistory::HistoryElement * | history, | |||
| int | hisCount, | |||
| bool & | skipRest | |||
| ) | [virtual] |
Reimplemented from GLWPanel.
Reimplemented in MsgBoxDialog, PlayerDialog, GLMenu, and GLWSelector.
Definition at line 418 of file GLWWindow.cpp.
References disabled_, and GLWPanel::keyDown().
Referenced by GLWWindowManager::keyboardCheck(), PlayerDialog::keyDown(), and MsgBoxDialog::keyDown().
| void GLWWindow::mouseWheel | ( | float | x, | |
| float | y, | |||
| float | z, | |||
| bool & | skipRest | |||
| ) | [virtual] |
Reimplemented from GLWPanel.
Reimplemented in MsgBoxDialog.
Definition at line 411 of file GLWWindow.cpp.
References disabled_, and GLWPanel::mouseWheel().
Referenced by GLWWindowManager::mouseWheel(), and MsgBoxDialog::mouseWheel().
| void GLWWindow::savePosition | ( | XMLNode * | node | ) | [virtual] |
Reimplemented in CameraDialog.
Definition at line 507 of file GLWWindow.cpp.
References XMLNode::addChild(), GLWidget::getId(), GLWidget::getX(), GLWidget::getY(), GLWWindowManager::instance(), and GLWWindowManager::windowVisible().
Referenced by CameraDialog::savePosition(), and GLWWindowManager::savePositions().
| void GLWWindow::loadPosition | ( | XMLNode * | node | ) | [virtual] |
Reimplemented in CameraDialog.
Definition at line 516 of file GLWWindow.cpp.
References GLWidget::getId(), XMLNode::getNamedChild(), GLWWindowManager::hideWindow(), GLWWindowManager::instance(), GLWidget::setX(), GLWidget::setY(), and GLWWindowManager::showWindow().
Referenced by CameraDialog::loadPosition(), and GLWWindowManager::loadPositions().
| const char* GLWWindow::getDescription | ( | ) | [inline] |
| ToolTip& GLWWindow::getToolTip | ( | ) | [inline] |
Definition at line 71 of file GLWWindow.h.
References toolTip_.
Referenced by GLWWindowManager::getMenuItems().
| void GLWWindow::setWindowLevel | ( | unsigned int | windowLevel | ) | [inline] |
Definition at line 72 of file GLWWindow.h.
References windowLevel_.
Referenced by GLWChannelText::setVisible().
| unsigned int GLWWindow::getWindowLevel | ( | ) | [inline] |
Definition at line 73 of file GLWWindow.h.
References windowLevel_.
Referenced by GLWWindowManager::sortWindowLevels().
| unsigned int GLWWindow::getWindowState | ( | ) | [inline] |
Definition at line 74 of file GLWWindow.h.
References windowState_.
Referenced by GLWWindowManager::savePositions().
| void GLWWindow::needsCentered | ( | ) | [inline] |
Definition at line 75 of file GLWWindow.h.
References needCentered_.
Referenced by ProgressDialog::changeTip().
| void GLWWindow::drawIconBox | ( | float | x, | |
| float | y | |||
| ) | [virtual] |
Definition at line 457 of file GLWWindow.cpp.
References GL_QUADS, glBegin(), glEnd(), glTexCoord2f(), and glVertex2f().
Referenced by drawMaximizedWindow().
| GLWWindow::REGISTER_CLASS_HEADER | ( | GLWWindow | ) |
| void GLWWindow::drawWindowCircle | ( | float | x, | |
| float | y, | |||
| float | w, | |||
| float | h | |||
| ) | [protected, virtual] |
Definition at line 153 of file GLWWindow.cpp.
References GLWidget::drawWholeCircle(), GL_LINE_LOOP, GL_TRIANGLE_FAN, glBegin(), glColor4f(), glEnd(), glLineWidth(), glPopMatrix(), glPushMatrix(), glScalef(), glTranslatef(), and glVertex2f().
Referenced by drawMaximizedWindow().
| void GLWWindow::drawOutlinePoints | ( | float | x, | |
| float | y, | |||
| float | w, | |||
| float | h | |||
| ) | [protected, virtual] |
Definition at line 82 of file GLWWindow.cpp.
References GLWidget::drawCircle(), eNoTitle, eResizeable, eSmallTitle, roundSize, showTitle_, smallRoundSize, smallTitleHeight, titleHeight, titleWidth, and windowState_.
Referenced by drawBackSurface(), and drawSurround().
| void GLWWindow::drawBackSurface | ( | float | x, | |
| float | y, | |||
| float | w, | |||
| float | h | |||
| ) | [protected, virtual] |
Definition at line 118 of file GLWWindow.cpp.
References drawOutlinePoints(), GL_TRIANGLE_FAN, glBegin(), glEnd(), glVertex2f(), and roundSize.
Referenced by drawMaximizedWindow().
| void GLWWindow::drawTitleBar | ( | float | x, | |
| float | y, | |||
| float | w, | |||
| float | h | |||
| ) | [protected, virtual] |
Definition at line 135 of file GLWWindow.cpp.
References GL_LINES, glBegin(), glColor3f(), glEnd(), glVertex2f(), titleHeight, and titleWidth.
Referenced by drawMaximizedWindow().
| void GLWWindow::drawSurround | ( | float | x, | |
| float | y, | |||
| float | w, | |||
| float | h | |||
| ) | [protected, virtual] |
Definition at line 128 of file GLWWindow.cpp.
References drawOutlinePoints(), GL_LINE_LOOP, glBegin(), and glEnd().
Referenced by drawMaximizedWindow().
| void GLWWindow::drawMaximizedWindow | ( | ) | [protected, virtual] |
Definition at line 174 of file GLWWindow.cpp.
References GLWToolTip::addToolTip(), GLState::BLEND_ON, GLTexture::create(), disabled_, GLTexture::draw(), GLWPanel::draw(), drawBackSurface(), drawIconBox(), drawSurround(), drawTitleBar(), drawWindowCircle(), eCircle, eNoDraw, eNoMove, eNoTitle, eResizeable, eSemiTransparent, eSmallTitle, eTransparent, S3D::getDataFile(), ScorchedContext::getGameState(), GLWidget::getId(), GameState::getMouseX(), GameState::getMouseY(), glColor3f(), glColor4f(), glLineWidth(), glPopMatrix(), glPushMatrix(), glScalef(), glTranslatef(), GLWidget::h_, GLWToolTip::instance(), GLWWindowManager::instance(), ScorchedClient::instance(), LANG_RESOURCE, ImageFactory::loadAlphaImageHandle(), moveTexture_, showTitle_, GLState::TEXTURE_ON, ToolTip::ToolTipHelp, GLWidget::w_, windowState_, GLWidget::x_, and GLWidget::y_.
Referenced by draw().
| void GLWWindow::drawInfoBox | ( | float | x, | |
| float | y, | |||
| float | w | |||
| ) | [protected, virtual] |
Definition at line 427 of file GLWWindow.cpp.
References GLWidget::drawRoundBox(), GL_LINE_LOOP, GL_TRIANGLE_FAN, glBegin(), glColor4f(), glEnd(), glLineWidth(), and glVertex2f().
| void GLWWindow::drawJoin | ( | float | x, | |
| float | y | |||
| ) | [protected, virtual] |
Definition at line 445 of file GLWWindow.cpp.
References GLWidget::drawWholeCircle(), GL_TRIANGLE_FAN, glBegin(), glColor4f(), glEnd(), glPopMatrix(), glPushMatrix(), glScalef(), and glTranslatef().
enum { ... } GLWWindow::dragging_ [protected] |
Referenced by mouseDown(), mouseDrag(), and mouseUp().
ToolTip GLWWindow::toolTip_ [protected] |
Definition at line 88 of file GLWWindow.h.
Referenced by getToolTip(), GLWWindowSkin::GLWWindowSkin(), and initFromXML().
GLTexture GLWWindow::moveTexture_ [static, protected] |
bool GLWWindow::showTitle_ [protected] |
Definition at line 90 of file GLWWindow.h.
Referenced by drawMaximizedWindow(), drawOutlinePoints(), and mouseDown().
bool GLWWindow::needCentered_ [protected] |
Definition at line 91 of file GLWWindow.h.
Referenced by AdminAuthDialog::AdminAuthDialog(), AdminCheckDialog::AdminCheckDialog(), AuthDialog::AuthDialog(), AutoDefenseDialog::AutoDefenseDialog(), draw(), ScoreDialog::draw(), BuyAccessoryDialog::draw(), GiftMoneyDialog::GiftMoneyDialog(), HUDDialog::HUDDialog(), LogDialog::LogDialog(), needsCentered(), PlayerDialog::PlayerDialog(), RulesDialog::RulesDialog(), InventoryDialog::setupWindow(), SoundDialog::SoundDialog(), TipDialog::TipDialog(), and ScoreDialog::windowInit().
bool GLWWindow::disabled_ [protected] |
Definition at line 92 of file GLWWindow.h.
Referenced by drawMaximizedWindow(), initFromXML(), keyDown(), MessageDialog::MessageDialog(), mouseDown(), mouseDrag(), mouseUp(), and mouseWheel().
bool GLWWindow::initPosition_ [protected] |
unsigned int GLWWindow::windowState_ [protected] |
Definition at line 94 of file GLWWindow.h.
Referenced by drawMaximizedWindow(), drawOutlinePoints(), getWindowState(), initFromXML(), and mouseDown().
unsigned int GLWWindow::windowLevel_ [protected] |
Definition at line 95 of file GLWWindow.h.
Referenced by AnimatedBackdropDialog::AnimatedBackdropDialog(), BackdropDialog::BackdropDialog(), getWindowLevel(), GLMenu::GLMenu(), GLWSelector::GLWSelector(), initFromXML(), MessageDialog::MessageDialog(), MsgBoxDialog::MsgBoxDialog(), setWindowLevel(), and TutorialDialog::TutorialDialog().
float GLWWindow::maxWindowSize_ [protected] |
std::string GLWWindow::description_ [protected] |
1.5.3