____ _ __
/ __ )____ _____ | | / /___ ___________
/ __ / __ \/ ___/ | | /| / / __ `/ ___/ ___/
/ /_/ / /_/ (__ ) | |/ |/ / /_/ / / (__ )
/_____/\____/____/ |__/|__/\__,_/_/ /____/
A futuristic real-time strategy game.
This file is part of Bos Wars.
(C) Copyright 2001-2007 by the Bos Wars and Stratagus Project.
Distributed under the "GNU General Public License"#include <scrollarea.h>

Public Types | |
| enum | { SHOW_ALWAYS, SHOW_NEVER, SHOW_AUTO } |
Public Member Functions | |
| ScrollArea () | |
| ScrollArea (Widget *content) | |
| ScrollArea (Widget *content, unsigned int hPolicy, unsigned int vPolicy) | |
| virtual | ~ScrollArea () |
| virtual void | setContent (Widget *widget) |
| virtual Widget * | getContent () |
| virtual void | setHorizontalScrollPolicy (unsigned int hPolicy) |
| virtual unsigned int | getHorizontalScrollPolicy () |
| virtual void | setVerticalScrollPolicy (unsigned int vPolicy) |
| virtual unsigned int | getVerticalScrollPolicy () |
| virtual void | setScrollPolicy (unsigned int hPolicy, unsigned int vPolicy) |
| virtual void | setVerticalScrollAmount (int vScroll) |
| virtual int | getVerticalScrollAmount () |
| virtual void | setHorizontalScrollAmount (int hScroll) |
| virtual int | getHorizontalScrollAmount () |
| virtual void | setScrollAmount (int hScroll, int vScroll) |
| virtual int | getHorizontalMaxScroll () |
| virtual int | getVerticalMaxScroll () |
| virtual void | setScrollbarWidth (int width) |
| virtual int | getScrollbarWidth () |
| virtual void | scrollToRectangle (const Rectangle &rectangle) |
| virtual void | draw (Graphics *graphics) |
| virtual void | drawBorder (Graphics *graphics) |
| virtual void | logic () |
| virtual void | _mouseInputMessage (const MouseInput &mouseInput) |
| virtual void | _mouseOutMessage () |
| virtual void | _setFocusHandler (FocusHandler *focusHandler) |
| virtual void | _announceDeath (Widget *widget) |
| virtual void | getDrawSize (int &width, int &height, Widget *widget) |
| virtual void | moveToBottom (Widget *widget) |
| virtual void | moveToTop (Widget *widget) |
| virtual void | mousePress (int x, int y, int button) |
| virtual void | mouseRelease (int x, int y, int button) |
| virtual void | mouseMotion (int x, int y) |
| virtual void | mouseWheelUp (int x, int y) |
| virtual void | mouseWheelDown (int x, int y) |
Protected Member Functions | |
| virtual void | drawUpButton (Graphics *graphics) |
| virtual void | drawDownButton (Graphics *graphics) |
| virtual void | drawLeftButton (Graphics *graphics) |
| virtual void | drawRightButton (Graphics *graphics) |
| virtual void | drawContent (Graphics *graphics) |
| virtual void | drawVBar (Graphics *graphics) |
| virtual void | drawHBar (Graphics *graphics) |
| virtual void | drawVMarker (Graphics *graphics) |
| virtual void | drawHMarker (Graphics *graphics) |
| virtual void | checkPolicies () |
| virtual Rectangle | getUpButtonDimension () |
| virtual Rectangle | getDownButtonDimension () |
| virtual Rectangle | getLeftButtonDimension () |
| virtual Rectangle | getRightButtonDimension () |
| virtual Rectangle | getContentDimension () |
| virtual Rectangle | getVerticalBarDimension () |
| virtual Rectangle | getHorizontalBarDimension () |
| virtual Rectangle | getVerticalMarkerDimension () |
| virtual Rectangle | getHorizontalMarkerDimension () |
Protected Attributes | |
| Widget * | mContent |
| int | mVScroll |
| int | mHScroll |
| int | mScrollbarWidth |
| unsigned int | mHPolicy |
| unsigned int | mVPolicy |
| bool | mVBarVisible |
| bool | mHBarVisible |
| bool | mUpButtonPressed |
| bool | mDownButtonPressed |
| bool | mLeftButtonPressed |
| bool | mRightButtonPressed |
| bool | mVerticalMarkerPressed |
| int | mVerticalMarkerMousePosition |
| bool | mHorizontalMarkerPressed |
| int | mHorizontalMarkerMousePosition |
NOTE: A TextBox or a ListBox looks really ugly unless they exist in a ScrollArea.
Definition at line 75 of file scrollarea.h.
| anonymous enum |
Scrollpolicies for the horizontal and vertical scrollbar. The policies are:
SHOW_ALWAYS - Always show the scrollbars no matter what. SHOW_NEVER - Never show the scrollbars no matter waht. SHOW_AUTO - Show the scrollbars only when needed. That is if the content grows larger then the ScrollArea.
Definition at line 286 of file scrollarea.h.
| gcn::ScrollArea::ScrollArea | ( | ) |
Constructor.
Definition at line 64 of file scrollarea.cpp.
References gcn::Widget::addMouseListener(), mContent, mDownButtonPressed, mHorizontalMarkerMousePosition, mHorizontalMarkerPressed, mHPolicy, mHScroll, mLeftButtonPressed, mRightButtonPressed, mScrollbarWidth, mUpButtonPressed, mVerticalMarkerMousePosition, mVerticalMarkerPressed, mVPolicy, mVScroll, and SHOW_AUTO.
| gcn::ScrollArea::ScrollArea | ( | Widget * | content | ) |
Constructor.
| content | the content of the ScrollArea. |
Definition at line 84 of file scrollarea.cpp.
References gcn::Widget::addMouseListener(), mContent, mDownButtonPressed, mHorizontalMarkerMousePosition, mHorizontalMarkerPressed, mHPolicy, mHScroll, mLeftButtonPressed, mRightButtonPressed, mScrollbarWidth, mUpButtonPressed, mVerticalMarkerMousePosition, mVerticalMarkerPressed, mVPolicy, mVScroll, setContent(), and SHOW_AUTO.
| gcn::ScrollArea::ScrollArea | ( | Widget * | content, | |
| unsigned int | hPolicy, | |||
| unsigned int | vPolicy | |||
| ) |
Constructor.
| content | the content of the ScrollArea. | |
| hPolicy | the policy for the horizontal scrollbar. See enum with policies. | |
| vPolicy | the policy for the vertical scrollbar. See enum with policies. |
Definition at line 105 of file scrollarea.cpp.
References gcn::Widget::addMouseListener(), mContent, mDownButtonPressed, mHorizontalMarkerMousePosition, mHorizontalMarkerPressed, mHPolicy, mHScroll, mLeftButtonPressed, mRightButtonPressed, mScrollbarWidth, mUpButtonPressed, mVerticalMarkerMousePosition, mVerticalMarkerPressed, mVPolicy, mVScroll, and setContent().
| gcn::ScrollArea::~ScrollArea | ( | ) | [virtual] |
| void gcn::ScrollArea::setContent | ( | Widget * | widget | ) | [virtual] |
Sets the content.
| widget | the content of the ScrollArea. |
Definition at line 131 of file scrollarea.cpp.
References gcn::Widget::_getFocusHandler(), gcn::Widget::_setFocusHandler(), gcn::Widget::_setParent(), checkPolicies(), and mContent.
Referenced by gcn::DropDown::DropDown(), ListBoxWidget::ListBoxWidget(), ScrollArea(), ScrollingWidget::ScrollingWidget(), gcn::DropDown::setListBox(), gcn::DropDown::setScrollArea(), Windows::Windows(), and ~ScrollArea().
| Widget * gcn::ScrollArea::getContent | ( | ) | [virtual] |
Gets the content.
Definition at line 150 of file scrollarea.cpp.
References mContent.
Referenced by gcn::DropDown::_keyInputMessage(), gcn::DropDown::_mouseInputMessage(), gcn::DropDown::adjustHeight(), gcn::DropDown::draw(), gcn::DropDown::dropDown(), gcn::DropDown::getListModel(), gcn::DropDown::getSelected(), gcn::DropDown::keyPress(), gcn::DropDown::logic(), gcn::DropDown::setListBox(), gcn::DropDown::setListModel(), and gcn::DropDown::setSelected().
| void gcn::ScrollArea::setHorizontalScrollPolicy | ( | unsigned int | hPolicy | ) | [virtual] |
Sets the horizontal scrollbar policy. See enum with policies.
| hPolicy | the policy for the horizontal scrollbar. See enum with policies. |
Definition at line 155 of file scrollarea.cpp.
References checkPolicies(), and mHPolicy.
Referenced by gcn::DropDown::DropDown().
| unsigned int gcn::ScrollArea::getHorizontalScrollPolicy | ( | ) | [virtual] |
Gets the horizontal scrollbar policy. See enum with policies.
Definition at line 161 of file scrollarea.cpp.
References mHPolicy.
| void gcn::ScrollArea::setVerticalScrollPolicy | ( | unsigned int | vPolicy | ) | [virtual] |
Sets the vertical scrollbar policy. See enum with policies.
| vPolicy | the policy for the vertical scrollbar. See enum with policies. |
Definition at line 166 of file scrollarea.cpp.
References checkPolicies(), and mVPolicy.
| unsigned int gcn::ScrollArea::getVerticalScrollPolicy | ( | ) | [virtual] |
Gets the vertical scrollbar policy. See enum with policies.
Definition at line 172 of file scrollarea.cpp.
References mVPolicy.
| void gcn::ScrollArea::setScrollPolicy | ( | unsigned int | hPolicy, | |
| unsigned int | vPolicy | |||
| ) | [virtual] |
Sets the horizontal and vertical scrollbar policy. See enum with policies.
| hPolicy | the policy for the horizontal scrollbar. See enum with policies. | |
| vPolicy | the policy for the vertical scrollbar. See enum with policies. |
Definition at line 177 of file scrollarea.cpp.
References checkPolicies(), mHPolicy, and mVPolicy.
| void gcn::ScrollArea::setVerticalScrollAmount | ( | int | vScroll | ) | [virtual] |
Sets the amount to scroll verticaly.
| vScroll | the amount to scroll. |
Definition at line 184 of file scrollarea.cpp.
References getVerticalMaxScroll(), and mVScroll.
Referenced by logic(), mouseMotion(), mousePress(), mouseWheelDown(), mouseWheelUp(), scrollToRectangle(), and setScrollAmount().
| int gcn::ScrollArea::getVerticalScrollAmount | ( | ) | [virtual] |
Gets the amount that is scrolled verticaly.
Definition at line 201 of file scrollarea.cpp.
References mVScroll.
Referenced by getVerticalMarkerDimension(), logic(), mousePress(), mouseWheelDown(), mouseWheelUp(), and scrollToRectangle().
| void gcn::ScrollArea::setHorizontalScrollAmount | ( | int | hScroll | ) | [virtual] |
Sets the amount to scroll horizontaly.
| hScroll | the amount to scroll. |
Definition at line 206 of file scrollarea.cpp.
References getHorizontalMaxScroll(), and mHScroll.
Referenced by logic(), mouseMotion(), mousePress(), scrollToRectangle(), and setScrollAmount().
| int gcn::ScrollArea::getHorizontalScrollAmount | ( | ) | [virtual] |
Gets the amount that is scrolled horizontaly.
Definition at line 222 of file scrollarea.cpp.
References mHScroll.
Referenced by getHorizontalMarkerDimension(), logic(), mousePress(), and scrollToRectangle().
| void gcn::ScrollArea::setScrollAmount | ( | int | hScroll, | |
| int | vScroll | |||
| ) | [virtual] |
Sets the amount to scroll horizontaly and verticaly.
| hScroll | the amount to scroll on horizontal scroll. | |
| vScroll | the amount to scroll on vertical scroll. |
Definition at line 227 of file scrollarea.cpp.
References setHorizontalScrollAmount(), and setVerticalScrollAmount().
| int gcn::ScrollArea::getHorizontalMaxScroll | ( | ) | [virtual] |
Gets the maximum amount of horizontal scroll.
Definition at line 233 of file scrollarea.cpp.
References checkPolicies(), gcn::Widget::getBorderSize(), getContentDimension(), gcn::Widget::getWidth(), mContent, and gcn::Rectangle::width.
Referenced by getHorizontalMarkerDimension(), mouseMotion(), and setHorizontalScrollAmount().
| int gcn::ScrollArea::getVerticalMaxScroll | ( | ) | [virtual] |
Gets the maximum amount of vertical scroll.
Definition at line 252 of file scrollarea.cpp.
References checkPolicies(), gcn::Widget::getBorderSize(), getContentDimension(), gcn::Widget::getHeight(), gcn::Rectangle::height, and mContent.
Referenced by getVerticalMarkerDimension(), mouseMotion(), and setVerticalScrollAmount().
| void gcn::ScrollArea::setScrollbarWidth | ( | int | width | ) | [virtual] |
Sets the width.
| width | the width of the ScrollBar. |
Definition at line 273 of file scrollarea.cpp.
References GCN_EXCEPTION, and mScrollbarWidth.
| int gcn::ScrollArea::getScrollbarWidth | ( | ) | [virtual] |
Gets the width.
Definition at line 285 of file scrollarea.cpp.
References mScrollbarWidth.
| void gcn::ScrollArea::scrollToRectangle | ( | const Rectangle & | rectangle | ) | [virtual] |
Tries to scroll to a specific rectangle. If the rectangle is to large to be visible as much as possibly, begining in the rectangles upper corner, will be visible.
| rectangle | the Rectangle to scroll to. |
Definition at line 1247 of file scrollarea.cpp.
References getContentDimension(), getHorizontalScrollAmount(), getVerticalScrollAmount(), gcn::Rectangle::height, setHorizontalScrollAmount(), setVerticalScrollAmount(), gcn::Rectangle::width, gcn::Rectangle::x, and gcn::Rectangle::y.
Referenced by gcn::TextBox::scrollToCaret(), and gcn::ListBox::setSelected().
| void gcn::ScrollArea::draw | ( | Graphics * | graphics | ) | [virtual] |
Draws the Widget. It is called by the parent widget when it is time for the Widget to draw itself. The graphics object is set up so that all drawing is relative to the Widget, i.e coordinate (0,0) is the top-left corner of the Widget. It is not possible to draw outside of a Widgets dimension.
| graphics | a Graphics object to draw with. |
Implements gcn::Widget.
Definition at line 421 of file scrollarea.cpp.
References gcn::Color::a, gcn::Widget::draw(), gcn::Widget::drawBorder(), drawDownButton(), drawHBar(), drawHMarker(), drawLeftButton(), drawRightButton(), drawUpButton(), drawVBar(), drawVMarker(), gcn::Graphics::fillRectangle(), gcn::Widget::getBackgroundColor(), gcn::Widget::getBaseColor(), gcn::Widget::getBorderSize(), getContentDimension(), gcn::Widget::getDimension(), gcn::Widget::getHeight(), gcn::Widget::getWidth(), gcn::Rectangle::height, mContent, mHBarVisible, mScrollbarWidth, mVBarVisible, gcn::Graphics::popClipArea(), gcn::Graphics::pushClipArea(), gcn::Graphics::setColor(), gcn::Rectangle::width, gcn::Rectangle::x, and gcn::Rectangle::y.
Referenced by gcn::DropDown::draw().
| void gcn::ScrollArea::drawBorder | ( | Graphics * | graphics | ) | [virtual] |
Draws a the Widget border. A border is drawn around a Widget. The width and height of the border is therefore the Widgets height+2*bordersize. Think of a painting that has a certain size, the border surrounds the painting.
| graphics | a Graphics object to draw with. |
Reimplemented from gcn::Widget.
Definition at line 481 of file scrollarea.cpp.
References gcn::Color::a, gcn::Graphics::drawLine(), gcn::Widget::getBaseColor(), gcn::Widget::getBorderSize(), gcn::Widget::getHeight(), gcn::Widget::getWidth(), and gcn::Graphics::setColor().
| void gcn::ScrollArea::logic | ( | ) | [virtual] |
Called for all Widgets in the gui each time Gui::logic is called. You can do logic stuff here like playing an animation.
Reimplemented from gcn::Widget.
Definition at line 845 of file scrollarea.cpp.
References checkPolicies(), gcn::Widget::getBorderSize(), getContentDimension(), getHorizontalScrollAmount(), getVerticalScrollAmount(), gcn::Widget::logic(), mContent, mHScroll, mVScroll, setHorizontalScrollAmount(), gcn::Widget::setPosition(), setVerticalScrollAmount(), and gcn::Rectangle::y.
Referenced by gcn::DropDown::logic().
| void gcn::ScrollArea::_mouseInputMessage | ( | const MouseInput & | mouseInput | ) | [virtual] |
Called when a Widget recieves a MouseInput.
WARNING: This function is used internally to handle all mouse messages. Don't call or overload it unless you know what you are doing.
| mouseInput | the MouseInput message. |
Reimplemented from gcn::Widget.
Definition at line 300 of file scrollarea.cpp.
References gcn::Widget::_mouseInMessage(), gcn::Widget::_mouseInputMessage(), gcn::Widget::_mouseOutMessage(), getContentDimension(), gcn::Widget::getX(), gcn::Widget::getY(), gcn::Widget::hasMouse(), mContent, gcn::MouseInput::x, and gcn::MouseInput::y.
Referenced by gcn::DropDown::_mouseInputMessage().
| void gcn::ScrollArea::_mouseOutMessage | ( | ) | [virtual] |
Called when the mouse leaves the Widget area.
WARNING: This function is used internally be to handle mouse out messages. Don't call or overload this function unless you know what you are doing.
Reimplemented from gcn::Widget.
Definition at line 327 of file scrollarea.cpp.
References gcn::Widget::_mouseOutMessage(), gcn::Widget::hasMouse(), and mContent.
| void gcn::ScrollArea::_setFocusHandler | ( | FocusHandler * | focusHandler | ) | [virtual] |
Sets the FocusHandler to be used.
WARNING: This function is used internally and should not be called or overloaded unless you know what you are doing.
| focusHandler | the FocusHandler to use. |
Reimplemented from gcn::Widget.
Definition at line 290 of file scrollarea.cpp.
References gcn::Widget::_setFocusHandler(), and mContent.
Referenced by gcn::DropDown::DropDown(), gcn::DropDown::setScrollArea(), and gcn::DropDown::~DropDown().
| void gcn::ScrollArea::_announceDeath | ( | Widget * | widget | ) | [virtual] |
Called when a child of the BasicContainer gets destroyed.
| widget | the destroyed Widget. |
Implements gcn::BasicContainer.
Definition at line 891 of file scrollarea.cpp.
References checkPolicies(), GCN_EXCEPTION, and mContent.
| void gcn::ScrollArea::getDrawSize | ( | int & | width, | |
| int & | height, | |||
| Widget * | widget | |||
| ) | [virtual] |
Gets the drawing space size a Widget has in the BasicContainer. It may not be the same size as the Widgets width and height.
NOTE: Size is not checked recursively all the way back to the top Widget. If the BasicContainer itself is clipped, the size may be inaccurate.
| width | the width the Widget's draw space has. | |
| height | the height the Widget's draw space has. | |
| widget | the Widget calling the function. |
Implements gcn::BasicContainer.
Definition at line 904 of file scrollarea.cpp.
References GCN_EXCEPTION, getContentDimension(), gcn::Rectangle::height, mContent, and gcn::Rectangle::width.
| void gcn::ScrollArea::moveToBottom | ( | Widget * | widget | ) | [virtual] |
Moves a widget to the bottom of the BasicContainer. The Widget will be drawn below all other Widgets in the BasicContainer.
| widget | the Widget to move. |
Implements gcn::BasicContainer.
Definition at line 876 of file scrollarea.cpp.
References GCN_EXCEPTION, gcn::Widget::getParent(), mContent, and gcn::BasicContainer::moveToBottom().
| void gcn::ScrollArea::moveToTop | ( | Widget * | widget | ) | [virtual] |
Moves a Widget to the top of the BasicContainer. The widget will be drawn above all other Widgets in the BasicContainer.
| widget | the Widget to move. |
Implements gcn::BasicContainer.
Definition at line 861 of file scrollarea.cpp.
References GCN_EXCEPTION, gcn::Widget::getParent(), mContent, and gcn::BasicContainer::moveToTop().
| void gcn::ScrollArea::mousePress | ( | int | x, | |
| int | y, | |||
| int | button | |||
| ) | [virtual] |
Called when a mouse button is pressed when the mouse is in the Widget area or if the Widget has focus.
NOTE: A mouse press is NOT equal to a mouse click. Use mouseClickMessage to check for mouse clicks.
| x | the x coordinate of the mouse relative to the Widget itself. | |
| y | the y coordinate of the mouse relative to the Widget itself. | |
| button | the button pressed. |
Reimplemented from gcn::MouseListener.
Definition at line 337 of file scrollarea.cpp.
References getDownButtonDimension(), getHorizontalMarkerDimension(), getHorizontalScrollAmount(), getLeftButtonDimension(), getRightButtonDimension(), getUpButtonDimension(), getVerticalMarkerDimension(), getVerticalScrollAmount(), mDownButtonPressed, mHorizontalMarkerMousePosition, mHorizontalMarkerPressed, mLeftButtonPressed, mRightButtonPressed, mUpButtonPressed, mVerticalMarkerMousePosition, mVerticalMarkerPressed, setHorizontalScrollAmount(), setVerticalScrollAmount(), gcn::Rectangle::x, and gcn::Rectangle::y.
| void gcn::ScrollArea::mouseRelease | ( | int | x, | |
| int | y, | |||
| int | button | |||
| ) | [virtual] |
Called when a mouse button is released when the mouse is in the Widget area or if the Widget has focus.
| x | the x coordinate of the mouse relative to the Widget itself. | |
| y | the y coordinate of the mouse relative to the Widget itself. | |
| button | the button released. |
Reimplemented from gcn::MouseListener.
Definition at line 371 of file scrollarea.cpp.
References mDownButtonPressed, mHorizontalMarkerPressed, mLeftButtonPressed, mRightButtonPressed, mUpButtonPressed, and mVerticalMarkerPressed.
| void gcn::ScrollArea::mouseMotion | ( | int | x, | |
| int | y | |||
| ) | [virtual] |
Called when the mouse moves and the mouse is in the Widget area or if the Widget has focus.
| x | the x coordinate of the mouse relative to the Widget itself. | |
| y | the y coordinate of the mouse relative to the Widget itself. |
Reimplemented from gcn::MouseListener.
Definition at line 381 of file scrollarea.cpp.
References getHorizontalBarDimension(), getHorizontalMarkerDimension(), getHorizontalMaxScroll(), getVerticalBarDimension(), getVerticalMarkerDimension(), getVerticalMaxScroll(), gcn::Rectangle::height, mHorizontalMarkerMousePosition, mHorizontalMarkerPressed, mVerticalMarkerMousePosition, mVerticalMarkerPressed, gcn::Widget::setDirty(), setHorizontalScrollAmount(), setVerticalScrollAmount(), gcn::Rectangle::width, gcn::Rectangle::x, and gcn::Rectangle::y.
| void gcn::ScrollArea::mouseWheelUp | ( | int | x, | |
| int | y | |||
| ) | [virtual] |
Called on a mouse wheel up when the mouse is in the Widget area or if the Widget has focus.
| x | the x coordinate of the mouse relative to the Widget itself. | |
| y | the y coordinate of the mouse relative to the Widget itself. |
Reimplemented from gcn::MouseListener.
Definition at line 1274 of file scrollarea.cpp.
References getContentDimension(), getVerticalScrollAmount(), gcn::Widget::hasMouse(), and setVerticalScrollAmount().
| void gcn::ScrollArea::mouseWheelDown | ( | int | x, | |
| int | y | |||
| ) | [virtual] |
Called on a mouse wheel down when the mouse is in the Widget area or if the Widget has focus.
| x | the x coordinate of the mouse relative to the Widget itself. | |
| y | the y coordinate of the mouse relative to the Widget itself. |
Reimplemented from gcn::MouseListener.
Definition at line 1282 of file scrollarea.cpp.
References getContentDimension(), getVerticalScrollAmount(), gcn::Widget::hasMouse(), and setVerticalScrollAmount().
| void gcn::ScrollArea::drawUpButton | ( | Graphics * | graphics | ) | [protected, virtual] |
Draws the up button.
| graphics | a Graphics object to draw with. |
Definition at line 547 of file scrollarea.cpp.
References gcn::Color::a, gcn::Graphics::drawLine(), gcn::Graphics::fillRectangle(), gcn::Widget::getBaseColor(), gcn::Widget::getForegroundColor(), getUpButtonDimension(), gcn::Rectangle::height, mUpButtonPressed, gcn::Graphics::popClipArea(), gcn::Graphics::pushClipArea(), gcn::Graphics::setColor(), and gcn::Rectangle::width.
Referenced by draw().
| void gcn::ScrollArea::drawDownButton | ( | Graphics * | graphics | ) | [protected, virtual] |
Draws the down button.
| graphics | a Graphics object to draw with. |
Definition at line 608 of file scrollarea.cpp.
References gcn::Color::a, gcn::Graphics::drawLine(), gcn::Graphics::fillRectangle(), gcn::Widget::getBaseColor(), getDownButtonDimension(), gcn::Widget::getForegroundColor(), gcn::Rectangle::height, mDownButtonPressed, gcn::Graphics::popClipArea(), gcn::Graphics::pushClipArea(), gcn::Graphics::setColor(), and gcn::Rectangle::width.
Referenced by draw().
| void gcn::ScrollArea::drawLeftButton | ( | Graphics * | graphics | ) | [protected, virtual] |
Draws the left button.
| graphics | a Graphics object to draw with. |
Definition at line 669 of file scrollarea.cpp.
References gcn::Color::a, gcn::Graphics::drawLine(), gcn::Graphics::fillRectangle(), gcn::Widget::getBaseColor(), gcn::Widget::getForegroundColor(), getLeftButtonDimension(), gcn::Rectangle::height, mLeftButtonPressed, gcn::Graphics::popClipArea(), gcn::Graphics::pushClipArea(), gcn::Graphics::setColor(), and gcn::Rectangle::width.
Referenced by draw().
| void gcn::ScrollArea::drawRightButton | ( | Graphics * | graphics | ) | [protected, virtual] |
Draws the right button.
| graphics | a Graphics object to draw with. |
Definition at line 730 of file scrollarea.cpp.
References gcn::Color::a, gcn::Graphics::drawLine(), gcn::Graphics::fillRectangle(), gcn::Widget::getBaseColor(), gcn::Widget::getForegroundColor(), getRightButtonDimension(), gcn::Rectangle::height, mRightButtonPressed, gcn::Graphics::popClipArea(), gcn::Graphics::pushClipArea(), gcn::Graphics::setColor(), and gcn::Rectangle::width.
Referenced by draw().
| void gcn::ScrollArea::drawContent | ( | Graphics * | graphics | ) | [protected, virtual] |
Draws the content in the ScrollArea.
| graphics | a Graphics object to draw with. |
Definition at line 917 of file scrollarea.cpp.
References gcn::Widget::draw(), and mContent.
| void gcn::ScrollArea::drawVBar | ( | Graphics * | graphics | ) | [protected, virtual] |
Draws the vertical scrollbar.
| graphics | a Graphics object to draw with. |
Definition at line 526 of file scrollarea.cpp.
References gcn::Color::a, gcn::Graphics::drawLine(), gcn::Graphics::fillRectangle(), gcn::Widget::getBaseColor(), getVerticalBarDimension(), gcn::Rectangle::height, gcn::Graphics::popClipArea(), gcn::Graphics::pushClipArea(), gcn::Graphics::setColor(), and gcn::Rectangle::width.
Referenced by draw().
| void gcn::ScrollArea::drawHBar | ( | Graphics * | graphics | ) | [protected, virtual] |
Draws the horizontal scrollbar.
| graphics | a Graphics object to draw with. |
Definition at line 505 of file scrollarea.cpp.
References gcn::Color::a, gcn::Graphics::drawLine(), gcn::Graphics::fillRectangle(), gcn::Widget::getBaseColor(), getHorizontalBarDimension(), gcn::Rectangle::height, gcn::Graphics::popClipArea(), gcn::Graphics::pushClipArea(), gcn::Graphics::setColor(), and gcn::Rectangle::width.
Referenced by draw().
| void gcn::ScrollArea::drawVMarker | ( | Graphics * | graphics | ) | [protected, virtual] |
Draws the vertical marker.
| graphics | a Graphics object to draw with. |
Definition at line 791 of file scrollarea.cpp.
References gcn::Color::a, gcn::Graphics::drawLine(), gcn::Graphics::fillRectangle(), gcn::Widget::getBaseColor(), getVerticalMarkerDimension(), gcn::Rectangle::height, gcn::Graphics::popClipArea(), gcn::Graphics::pushClipArea(), gcn::Graphics::setColor(), and gcn::Rectangle::width.
Referenced by draw().
| void gcn::ScrollArea::drawHMarker | ( | Graphics * | graphics | ) | [protected, virtual] |
Draws the horizontal marker.
| graphics | a Graphics object to draw with. |
Definition at line 818 of file scrollarea.cpp.
References gcn::Color::a, gcn::Graphics::drawLine(), gcn::Graphics::fillRectangle(), gcn::Widget::getBaseColor(), getHorizontalMarkerDimension(), gcn::Rectangle::height, gcn::Graphics::popClipArea(), gcn::Graphics::pushClipArea(), gcn::Graphics::setColor(), and gcn::Rectangle::width.
Referenced by draw().
| void gcn::ScrollArea::checkPolicies | ( | ) | [protected, virtual] |
Checks the policies for the scrollbars.
Definition at line 925 of file scrollarea.cpp.
References GCN_EXCEPTION, gcn::Widget::getHeight(), gcn::Widget::getWidth(), mContent, mHBarVisible, mHPolicy, mScrollbarWidth, mVBarVisible, mVPolicy, SHOW_ALWAYS, SHOW_AUTO, and SHOW_NEVER.
Referenced by _announceDeath(), getHorizontalMaxScroll(), getVerticalMaxScroll(), logic(), setContent(), setHorizontalScrollPolicy(), setScrollPolicy(), and setVerticalScrollPolicy().
| Rectangle gcn::ScrollArea::getUpButtonDimension | ( | ) | [protected, virtual] |
Gets the up button dimension.
Definition at line 1020 of file scrollarea.cpp.
References gcn::Widget::getWidth(), mScrollbarWidth, and mVBarVisible.
Referenced by drawUpButton(), getVerticalBarDimension(), and mousePress().
| Rectangle gcn::ScrollArea::getDownButtonDimension | ( | ) | [protected, virtual] |
Gets the down button dimension.
Definition at line 1033 of file scrollarea.cpp.
References gcn::Widget::getHeight(), gcn::Widget::getWidth(), mHBarVisible, mScrollbarWidth, and mVBarVisible.
Referenced by drawDownButton(), getVerticalBarDimension(), and mousePress().
| Rectangle gcn::ScrollArea::getLeftButtonDimension | ( | ) | [protected, virtual] |
Gets the left button dimension.
Definition at line 1054 of file scrollarea.cpp.
References gcn::Widget::getHeight(), mHBarVisible, and mScrollbarWidth.
Referenced by drawLeftButton(), getHorizontalBarDimension(), and mousePress().
| Rectangle gcn::ScrollArea::getRightButtonDimension | ( | ) | [protected, virtual] |
Gets the right button dimension.
Definition at line 1067 of file scrollarea.cpp.
References gcn::Widget::getHeight(), gcn::Widget::getWidth(), mHBarVisible, mScrollbarWidth, and mVBarVisible.
Referenced by drawRightButton(), getHorizontalBarDimension(), and mousePress().
| Rectangle gcn::ScrollArea::getContentDimension | ( | ) | [protected, virtual] |
Gets the content dimension.
Definition at line 1088 of file scrollarea.cpp.
References gcn::Widget::getHeight(), gcn::Widget::getWidth(), mHBarVisible, mScrollbarWidth, and mVBarVisible.
Referenced by _mouseInputMessage(), draw(), getDrawSize(), getHorizontalMarkerDimension(), getHorizontalMaxScroll(), getVerticalMarkerDimension(), getVerticalMaxScroll(), logic(), mouseWheelDown(), mouseWheelUp(), and scrollToRectangle().
| Rectangle gcn::ScrollArea::getVerticalBarDimension | ( | ) | [protected, virtual] |
Gets the vertical scrollbar dimension.
Definition at line 1109 of file scrollarea.cpp.
References getDownButtonDimension(), gcn::Widget::getHeight(), getUpButtonDimension(), gcn::Widget::getWidth(), mHBarVisible, mScrollbarWidth, and mVBarVisible.
Referenced by drawVBar(), getVerticalMarkerDimension(), and mouseMotion().
| Rectangle gcn::ScrollArea::getHorizontalBarDimension | ( | ) | [protected, virtual] |
Gets the horizontal scrollbar dimension.
Definition at line 1135 of file scrollarea.cpp.
References gcn::Widget::getHeight(), getLeftButtonDimension(), getRightButtonDimension(), gcn::Widget::getWidth(), mHBarVisible, mScrollbarWidth, and mVBarVisible.
Referenced by drawHBar(), getHorizontalMarkerDimension(), and mouseMotion().
| Rectangle gcn::ScrollArea::getVerticalMarkerDimension | ( | ) | [protected, virtual] |
Gets the vertical marker dimension.
Definition at line 1161 of file scrollarea.cpp.
References getContentDimension(), gcn::Widget::getHeight(), getVerticalBarDimension(), getVerticalMaxScroll(), getVerticalScrollAmount(), gcn::Rectangle::height, mContent, mScrollbarWidth, mVBarVisible, gcn::Rectangle::x, and gcn::Rectangle::y.
Referenced by drawVMarker(), mouseMotion(), and mousePress().
| Rectangle gcn::ScrollArea::getHorizontalMarkerDimension | ( | ) | [protected, virtual] |
Gets the horizontal marker dimension.
Definition at line 1204 of file scrollarea.cpp.
References getContentDimension(), getHorizontalBarDimension(), getHorizontalMaxScroll(), getHorizontalScrollAmount(), gcn::Widget::getWidth(), mContent, mHBarVisible, mScrollbarWidth, gcn::Rectangle::width, gcn::Rectangle::x, and gcn::Rectangle::y.
Referenced by drawHMarker(), mouseMotion(), and mousePress().
Widget* gcn::ScrollArea::mContent [protected] |
Definition at line 425 of file scrollarea.h.
Referenced by _announceDeath(), _mouseInputMessage(), _mouseOutMessage(), _setFocusHandler(), checkPolicies(), draw(), drawContent(), getContent(), getDrawSize(), getHorizontalMarkerDimension(), getHorizontalMaxScroll(), getVerticalMarkerDimension(), getVerticalMaxScroll(), logic(), moveToBottom(), moveToTop(), ScrollArea(), and setContent().
int gcn::ScrollArea::mVScroll [protected] |
Definition at line 426 of file scrollarea.h.
Referenced by getVerticalScrollAmount(), logic(), ScrollArea(), and setVerticalScrollAmount().
int gcn::ScrollArea::mHScroll [protected] |
Definition at line 427 of file scrollarea.h.
Referenced by getHorizontalScrollAmount(), logic(), ScrollArea(), and setHorizontalScrollAmount().
int gcn::ScrollArea::mScrollbarWidth [protected] |
Definition at line 428 of file scrollarea.h.
Referenced by checkPolicies(), draw(), getContentDimension(), getDownButtonDimension(), getHorizontalBarDimension(), getHorizontalMarkerDimension(), getLeftButtonDimension(), getRightButtonDimension(), getScrollbarWidth(), getUpButtonDimension(), getVerticalBarDimension(), getVerticalMarkerDimension(), ScrollArea(), and setScrollbarWidth().
unsigned int gcn::ScrollArea::mHPolicy [protected] |
Definition at line 429 of file scrollarea.h.
Referenced by checkPolicies(), getHorizontalScrollPolicy(), ScrollArea(), setHorizontalScrollPolicy(), and setScrollPolicy().
unsigned int gcn::ScrollArea::mVPolicy [protected] |
Definition at line 430 of file scrollarea.h.
Referenced by checkPolicies(), getVerticalScrollPolicy(), ScrollArea(), setScrollPolicy(), and setVerticalScrollPolicy().
bool gcn::ScrollArea::mVBarVisible [protected] |
Definition at line 431 of file scrollarea.h.
Referenced by checkPolicies(), draw(), getContentDimension(), getDownButtonDimension(), getHorizontalBarDimension(), getRightButtonDimension(), getUpButtonDimension(), getVerticalBarDimension(), and getVerticalMarkerDimension().
bool gcn::ScrollArea::mHBarVisible [protected] |
Definition at line 432 of file scrollarea.h.
Referenced by checkPolicies(), draw(), getContentDimension(), getDownButtonDimension(), getHorizontalBarDimension(), getHorizontalMarkerDimension(), getLeftButtonDimension(), getRightButtonDimension(), and getVerticalBarDimension().
bool gcn::ScrollArea::mUpButtonPressed [protected] |
Definition at line 433 of file scrollarea.h.
Referenced by drawUpButton(), mousePress(), mouseRelease(), and ScrollArea().
bool gcn::ScrollArea::mDownButtonPressed [protected] |
Definition at line 434 of file scrollarea.h.
Referenced by drawDownButton(), mousePress(), mouseRelease(), and ScrollArea().
bool gcn::ScrollArea::mLeftButtonPressed [protected] |
Definition at line 435 of file scrollarea.h.
Referenced by drawLeftButton(), mousePress(), mouseRelease(), and ScrollArea().
bool gcn::ScrollArea::mRightButtonPressed [protected] |
Definition at line 436 of file scrollarea.h.
Referenced by drawRightButton(), mousePress(), mouseRelease(), and ScrollArea().
bool gcn::ScrollArea::mVerticalMarkerPressed [protected] |
Definition at line 437 of file scrollarea.h.
Referenced by mouseMotion(), mousePress(), mouseRelease(), and ScrollArea().
int gcn::ScrollArea::mVerticalMarkerMousePosition [protected] |
Definition at line 438 of file scrollarea.h.
Referenced by mouseMotion(), mousePress(), and ScrollArea().
bool gcn::ScrollArea::mHorizontalMarkerPressed [protected] |
Definition at line 439 of file scrollarea.h.
Referenced by mouseMotion(), mousePress(), mouseRelease(), and ScrollArea().
int gcn::ScrollArea::mHorizontalMarkerMousePosition [protected] |
Definition at line 440 of file scrollarea.h.
Referenced by mouseMotion(), mousePress(), and ScrollArea().
1.5.6