#include <GLWListView.h>

Public Member Functions | |
| GLWListView (float x=0.0f, float y=0.0f, float w=0.0f, float h=0.0f, int maxLen=-1, float textSize=10.0f, float scrollSpeed=0.0f) | |
| virtual | ~GLWListView () |
| void | setHandler (GLWListViewI *handler) |
| void | setColor (Vector &color) |
| bool | addXML (XMLNode *node) |
| void | addLine (const std::string &text) |
| void | clear () |
| void | resetPosition () |
| void | endPosition () |
| virtual void | draw () |
| virtual void | simulate (float frameTime) |
| 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 | mouseWheel (float x, float y, float z, bool &skipRest) |
| virtual void | setX (float x) |
| virtual void | setY (float y) |
| virtual void | setW (float w) |
| virtual void | setH (float h) |
| REGISTER_CLASS_HEADER (GLWListView) | |
Protected Member Functions | |
| void | setScroll () |
| bool | addWordEntry (std::list< WordEntry > &words, std::string &word, XMLNode *parentNode) |
| bool | getLines (std::list< WordEntry > &words, float &lineLen) |
| bool | getWords (XMLNode *node, std::list< WordEntry > &words) |
| void | drawUrl (WordEntry &entry, int drawChars, float x, float y) |
Protected Attributes | |
| GLWListViewI * | handler_ |
| float | currentPosition_ |
| float | scrollSpeed_ |
| float | textSize_ |
| int | maxLen_ |
| Vector | color_ |
| GLWScrollW | scroll_ |
| std::vector< LineEntry > | lines_ |
| std::vector< UrlEntry > | urls_ |
Classes | |
| struct | LineEntry |
| struct | UrlEntry |
| struct | WordEntry |
Definition at line 40 of file GLWListView.h.
| GLWListView::GLWListView | ( | float | x = 0.0f, |
|
| float | y = 0.0f, |
|||
| float | w = 0.0f, |
|||
| float | h = 0.0f, |
|||
| int | maxLen = -1, |
|||
| float | textSize = 10.0f, |
|||
| float | scrollSpeed = 0.0f | |||
| ) |
Definition at line 35 of file GLWListView.cpp.
References color_, GLWScrollW::getMax(), GLWidget::h_, lines_, scroll_, GLWScrollW::setCurrent(), GLWScrollW::setMax(), GLWScrollW::setSee(), and GLWFont::widgetFontColor.
| GLWListView::~GLWListView | ( | ) | [virtual] |
Definition at line 49 of file GLWListView.cpp.
| void GLWListView::setHandler | ( | GLWListViewI * | handler | ) | [inline] |
Definition at line 50 of file GLWListView.h.
References handler_.
Referenced by TutorialDialog::TutorialDialog().
| void GLWListView::setColor | ( | Vector & | color | ) | [inline] |
Definition at line 51 of file GLWListView.h.
References color_.
Referenced by TutorialDialog::TutorialDialog().
| bool GLWListView::addXML | ( | XMLNode * | node | ) |
Definition at line 359 of file GLWListView.cpp.
References getLines(), getWords(), lines_, and setScroll().
Referenced by TutorialDialog::showPage().
| void GLWListView::addLine | ( | const std::string & | text | ) |
Definition at line 377 of file GLWListView.cpp.
References color_, int(), lines_, maxLen_, and setScroll().
Referenced by RulesDialog::addMOTD(), and LogDialog::logMessage().
| void GLWListView::clear | ( | ) |
Definition at line 218 of file GLWListView.cpp.
References lines_, resetPosition(), scroll_, and GLWScrollW::setCurrent().
Referenced by RulesDialog::addMOTD(), and TutorialDialog::showPage().
| void GLWListView::resetPosition | ( | ) |
Definition at line 230 of file GLWListView.cpp.
References currentPosition_, and GLWListView::WordEntry::wordRefCount_.
Referenced by clear(), and TutorialDialog::display().
| void GLWListView::endPosition | ( | ) |
Definition at line 225 of file GLWListView.cpp.
References GLWScrollW::getMin(), scroll_, and GLWScrollW::setCurrent().
Referenced by LogDialog::logMessage().
| void GLWListView::draw | ( | ) | [virtual] |
Reimplemented from GLWidget.
Definition at line 53 of file GLWListView.cpp.
References GLState::BLEND_ON, BorderWidth, GLWListView::WordEntry::color_, currentPosition_, GLWScrollW::draw(), GLWidget::drawShadedRoundBox(), GLFont2d::drawSubStr(), drawUrl(), GLWListViewI::event(), GLWListView::WordEntry::event_, S3D::formatStringBuffer(), GLFont2d::getChars(), GLWScrollW::getCurrent(), GLWFont::getGameFont(), GLWScrollW::getMax(), GLWScrollW::getSee(), GLFont2d::getWidth(), GL_LINE_LOOP, glBegin(), glEnd(), GLWidget::h_, handler_, GLWListView::WordEntry::href_, GLWFont::instance(), int(), lines_, scroll_, scrollSpeed_, GLWScrollW::setCurrent(), textSize_, GLState::TEXTURE_ON, urls_, GLWidget::w_, GLWListView::WordEntry::word_, GLWListView::WordEntry::wordRef_, GLWListView::WordEntry::wordRefCount_, GLWListView::LineEntry::words_, GLWidget::x_, and GLWidget::y_.
| void GLWListView::simulate | ( | float | frameTime | ) | [virtual] |
Reimplemented from GLWidget.
Definition at line 168 of file GLWListView.cpp.
References currentPosition_, scroll_, scrollSpeed_, and GLWScrollW::simulate().
| void GLWListView::mouseDown | ( | int | button, | |
| float | x, | |||
| float | y, | |||
| bool & | skipRest | |||
| ) | [virtual] |
Reimplemented from GLWidget.
Definition at line 174 of file GLWListView.cpp.
References GLWListView::UrlEntry::entry_, GLWListView::UrlEntry::h_, handler_, GLWListView::WordEntry::href_, GLWidget::inBox(), GLWScrollW::mouseDown(), scroll_, GLWListViewI::url(), urls_, GLWListView::UrlEntry::w_, GLWListView::UrlEntry::x_, and GLWListView::UrlEntry::y_.
| void GLWListView::mouseUp | ( | int | button, | |
| float | x, | |||
| float | y, | |||
| bool & | skipRest | |||
| ) | [virtual] |
Reimplemented from GLWidget.
Definition at line 197 of file GLWListView.cpp.
References GLWScrollW::mouseUp(), and scroll_.
| void GLWListView::mouseDrag | ( | int | button, | |
| float | mx, | |||
| float | my, | |||
| float | x, | |||
| float | y, | |||
| bool & | skipRest | |||
| ) | [virtual] |
Reimplemented from GLWidget.
Definition at line 202 of file GLWListView.cpp.
References GLWScrollW::mouseDrag(), and scroll_.
| void GLWListView::mouseWheel | ( | float | x, | |
| float | y, | |||
| float | z, | |||
| bool & | skipRest | |||
| ) | [virtual] |
Reimplemented from GLWidget.
Definition at line 207 of file GLWListView.cpp.
References GLWScrollW::getCurrent(), GLWidget::h_, GLWidget::inBox(), scroll_, GLWScrollW::setCurrent(), GLWidget::w_, GLWidget::x_, and GLWidget::y_.
| virtual void GLWListView::setX | ( | float | x | ) | [inline, virtual] |
Reimplemented from GLWidget.
Definition at line 66 of file GLWListView.h.
References scroll_, GLWScrollW::setX(), GLWidget::w_, and GLWidget::x_.
| virtual void GLWListView::setY | ( | float | y | ) | [inline, virtual] |
Reimplemented from GLWidget.
Definition at line 67 of file GLWListView.h.
References scroll_, GLWScrollW::setY(), and GLWidget::y_.
| virtual void GLWListView::setW | ( | float | w | ) | [inline, virtual] |
Reimplemented from GLWidget.
Definition at line 68 of file GLWListView.h.
References scroll_, GLWScrollW::setX(), GLWidget::w_, and GLWidget::x_.
Referenced by LogDialog::draw().
| virtual void GLWListView::setH | ( | float | h | ) | [inline, virtual] |
Reimplemented from GLWidget.
Definition at line 69 of file GLWListView.h.
References GLWidget::h_, scroll_, and GLWScrollW::setH().
Referenced by LogDialog::draw().
| GLWListView::REGISTER_CLASS_HEADER | ( | GLWListView | ) |
| void GLWListView::setScroll | ( | ) | [protected] |
Definition at line 395 of file GLWListView.cpp.
References GLWScrollW::getMax(), GLWScrollW::getSee(), GLWidget::h_, int(), lines_, scroll_, GLWScrollW::setCurrent(), GLWScrollW::setMax(), GLWScrollW::setSee(), and textSize_.
| bool GLWListView::addWordEntry | ( | std::list< WordEntry > & | words, | |
| std::string & | word, | |||
| XMLNode * | parentNode | |||
| ) | [protected] |
Definition at line 236 of file GLWListView.cpp.
References color_, XMLNode::getContent(), XMLNode::getName(), XMLNode::getNamedParameter(), XMLNode::getParameters(), and LangStringUtil::strcmp().
Referenced by getWords().
| bool GLWListView::getLines | ( | std::list< WordEntry > & | words, | |
| float & | lineLen | |||
| ) | [protected] |
Definition at line 269 of file GLWListView.cpp.
References BorderWidth, GLWFont::getGameFont(), GLWFont::instance(), lines_, textSize_, GLWidget::w_, and GLWListView::WordEntry::word_.
Referenced by addXML().
Definition at line 307 of file GLWListView.cpp.
References addWordEntry(), XMLNode::getChildren(), XMLNode::getContent(), XMLNode::getType(), and XMLNode::XMLNodeType.
Referenced by addXML().
| void GLWListView::drawUrl | ( | WordEntry & | entry, | |
| int | drawChars, | |||
| float | x, | |||
| float | y | |||
| ) | [protected] |
Definition at line 403 of file GLWListView.cpp.
References GLWListView::WordEntry::color_, GLWListView::UrlEntry::entry_, GLWFont::getGameFont(), GLFont2d::getWidth(), GL_LINES, glBegin(), glColor3fv(), glEnd(), glLineWidth(), glVertex2f(), GLWListView::UrlEntry::h_, GLWFont::instance(), textSize_, GLState::TEXTURE_OFF, urls_, GLWListView::UrlEntry::w_, GLWListView::WordEntry::word_, GLWidget::x_, GLWListView::UrlEntry::x_, and GLWListView::UrlEntry::y_.
Referenced by draw().
GLWListViewI* GLWListView::handler_ [protected] |
float GLWListView::currentPosition_ [protected] |
float GLWListView::scrollSpeed_ [protected] |
float GLWListView::textSize_ [protected] |
Definition at line 101 of file GLWListView.h.
Referenced by draw(), drawUrl(), getLines(), and setScroll().
int GLWListView::maxLen_ [protected] |
Vector GLWListView::color_ [protected] |
Definition at line 103 of file GLWListView.h.
Referenced by addLine(), addWordEntry(), GLWListView(), and setColor().
GLWScrollW GLWListView::scroll_ [protected] |
Definition at line 104 of file GLWListView.h.
Referenced by clear(), draw(), endPosition(), GLWListView(), mouseDown(), mouseDrag(), mouseUp(), mouseWheel(), setH(), setScroll(), setW(), setX(), setY(), and simulate().
std::vector<LineEntry> GLWListView::lines_ [protected] |
Definition at line 105 of file GLWListView.h.
Referenced by addLine(), addXML(), clear(), draw(), getLines(), GLWListView(), and setScroll().
std::vector<UrlEntry> GLWListView::urls_ [protected] |
1.5.3