Vegastrike 0.5.1 rc1
1.0
Original sources for Vegastrike Evolved
|
#include <scroller.h>
Public Member Functions | |
void | setRangeValues (int max, int visible, int min=0) |
int | scrollPosition (void) |
void | setScrollPosition (int pos) |
void | setThumbColor (const GFXColor &c, const GFXColor &outline) |
void | setButtonColor (const GFXColor &c) |
virtual void | draw (void) |
virtual void | setRect (const Rect &r) |
virtual void | setColor (const GFXColor &c) |
virtual void | setTextColor (const GFXColor &c) |
virtual bool | processCommand (const EventCommandId &command, Control *control) |
Scroller (void) | |
virtual | ~Scroller (void) |
![]() | |
virtual bool | hasGroupChildren (void) |
void | addChild (Control *child) |
bool | deleteControl (Control *c) |
Control * | removeControlFromGroup (Control *c) |
Control * | findControlById (const std::string &id) |
int | childCount (void) |
Control * | childAt (int index) |
virtual bool | processMouseDown (const InputEvent &event) |
virtual bool | processMouseUp (const InputEvent &event) |
virtual bool | processMouseMove (const InputEvent &event) |
virtual bool | processMouseDrag (const InputEvent &event) |
GroupControl (void) | |
virtual | ~GroupControl (void) |
![]() | |
virtual Rect | rect (void) |
virtual bool | hitTest (const Point &p) |
virtual bool | hidden (void) |
virtual void | setHidden (bool h=true) |
virtual const std::string & | id (void) |
virtual void | setId (const std::string &newId) |
virtual GFXColor | color (void) |
virtual GFXColor | outlineColor (void) |
virtual void | setOutlineColor (const GFXColor &c) |
virtual GFXColor | textColor (void) |
virtual Font | font (void) |
virtual void | setFont (const Font &f) |
Control (void) | |
virtual | ~Control (void) |
![]() | |
virtual bool | processKeyDown (const InputEvent &event) |
virtual bool | processKeyUp (const InputEvent &event) |
virtual void | processUnfocus (const InputEvent &event) |
virtual void | sendCommand (const EventCommandId &command, Control *control) |
virtual void | setCommandTarget (EventResponder *responder) |
virtual void | setModal (bool modal) |
EventResponder (void) | |
virtual | ~EventResponder (void) |
Protected Member Functions | |
void | calcLayout (void) |
void | createControls (void) |
Protected Attributes | |
int | m_minValue |
int | m_maxValue |
int | m_visible |
int | m_scrollPosition |
GFXColor | m_thumbColor |
GFXColor | m_thumbOutlineColor |
bool | m_needLayout |
![]() | |
std::vector< Control * > | m_controls |
![]() | |
Rect | m_rect |
std::string | m_id |
GFXColor | m_color |
GFXColor | m_outlineColor |
GFXColor | m_textColor |
Font | m_font |
bool | m_hidden |
![]() | |
bool | m_modal |
EventResponder * | m_commandTarget |
Definition at line 36 of file scroller.h.
Scroller::Scroller | ( | void | ) |
|
inlinevirtual |
Definition at line 76 of file scroller.h.
|
protected |
Definition at line 191 of file scroller.cpp.
References CHILD_CONTROL_COUNT, GroupControl::childAt(), GroupControl::childCount(), Rect::copyAndInset(), ScrollerButton::DOWN_ARROW, DOWN_BUTTON_INDEX, Size::height, ScrollerButton::LEFT_ARROW, Control::m_rect, Rect::origin, Control::rect(), Rect::right(), ScrollerButton::RIGHT_ARROW, ScrollerButton::setArrowType(), NewButton::setCommand(), Control::setRect(), Rect::size, SLIDER_INDEX, Rect::top(), ScrollerButton::UP_ARROW, UP_BUTTON_INDEX, Size::width, Point::x, and Point::y.
Referenced by draw().
|
protected |
Definition at line 241 of file scroller.cpp.
References GroupControl::addChild(), Control::color(), GUI_CLEAR(), Slider::setColor(), Control::setColor(), NewButton::setCommand(), EventResponder::setCommandTarget(), Control::setTextColor(), Slider::setThumbColorBasedOnColor(), Control::textColor(), and up.
Referenced by Scroller().
|
virtual |
Reimplemented from GroupControl.
Definition at line 268 of file scroller.cpp.
References calcLayout(), GroupControl::draw(), Control::drawBackground(), and m_needLayout.
|
virtual |
Reimplemented from EventResponder.
Definition at line 277 of file scroller.cpp.
References GroupControl::childAt(), Slider::position(), EventResponder::processCommand(), scrollPosition(), setScrollPosition(), and SLIDER_INDEX.
|
inline |
Definition at line 45 of file scroller.h.
References m_scrollPosition.
Referenced by processCommand(), StaticDisplay::processCommand(), Picker::processCommand(), StaticDisplay::processMouseDown(), and Picker::processMouseDown().
void Scroller::setButtonColor | ( | const GFXColor & | c) |
Definition at line 109 of file scroller.cpp.
References CHILD_CONTROL_COUNT, GroupControl::childAt(), GroupControl::childCount(), DOWN_BUTTON_INDEX, Control::setColor(), and UP_BUTTON_INDEX.
Referenced by NavComputer::constructControls(), BaseComputer::constructControls(), and ListQuestionDialog::CreateControlsForListWindow().
|
virtual |
Reimplemented from Control.
Definition at line 87 of file scroller.cpp.
References CHILD_CONTROL_COUNT, GroupControl::childAt(), GroupControl::childCount(), DOWN_BUTTON_INDEX, isClear(), m_thumbColor, Control::setColor(), Slider::setThumbColorBasedOnColor(), SLIDER_INDEX, and UP_BUTTON_INDEX.
Referenced by NavComputer::constructControls(), BaseComputer::constructControls(), and ListQuestionDialog::CreateControlsForListWindow().
Definition at line 60 of file scroller.cpp.
References GroupControl::childAt(), guiMax, m_maxValue, m_minValue, m_needLayout, m_visible, min(), Slider::setMaxMin(), Slider::setPageSize(), Slider::setThumbLength(), and SLIDER_INDEX.
Referenced by StaticDisplay::draw(), and Picker::recalcDisplay().
|
virtual |
Reimplemented from Control.
Definition at line 79 of file scroller.cpp.
References m_needLayout, Control::m_rect, and Control::setRect().
Referenced by NavComputer::constructControls(), BaseComputer::constructControls(), and ListQuestionDialog::CreateControlsForListWindow().
void Scroller::setScrollPosition | ( | int | pos) |
Definition at line 42 of file scroller.cpp.
References GroupControl::childAt(), m_maxValue, m_minValue, m_scrollPosition, EventResponder::sendCommand(), Slider::setPosition(), and SLIDER_INDEX.
Referenced by StaticDisplay::draw(), processCommand(), StaticDisplay::processMouseDown(), Picker::processMouseDown(), Picker::recalcDisplay(), and Picker::scrollToCell().
|
virtual |
Reimplemented from Control.
Definition at line 117 of file scroller.cpp.
References CHILD_CONTROL_COUNT, GroupControl::childAt(), GroupControl::childCount(), DOWN_BUTTON_INDEX, Control::setTextColor(), and UP_BUTTON_INDEX.
Referenced by NavComputer::constructControls(), BaseComputer::constructControls(), and ListQuestionDialog::CreateControlsForListWindow().
Definition at line 101 of file scroller.cpp.
References CHILD_CONTROL_COUNT, GroupControl::childAt(), GroupControl::childCount(), Slider::setThumbColor(), and SLIDER_INDEX.
Referenced by NavComputer::constructControls(), BaseComputer::constructControls(), and ListQuestionDialog::CreateControlsForListWindow().
|
protected |
Definition at line 90 of file scroller.h.
Referenced by setRangeValues(), and setScrollPosition().
|
protected |
Definition at line 89 of file scroller.h.
Referenced by setRangeValues(), and setScrollPosition().
|
protected |
Definition at line 96 of file scroller.h.
Referenced by draw(), setRangeValues(), and setRect().
|
protected |
Definition at line 92 of file scroller.h.
Referenced by scrollPosition(), and setScrollPosition().
|
protected |
Definition at line 93 of file scroller.h.
Referenced by setColor().
|
protected |
Definition at line 94 of file scroller.h.
|
protected |
Definition at line 91 of file scroller.h.
Referenced by setRangeValues().