Mana
|
A scroll area. More...
#include <scrollarea.h>
Public Member Functions | |
ScrollArea () | |
Constructor that takes no content. | |
ScrollArea (gcn::Widget *content) | |
Constructor. | |
~ScrollArea () override | |
Destructor. | |
void | setShowButtons (bool showButtons) |
Sets whether the scroll bar buttons are shown. | |
void | logic () override |
Logic function optionally adapts width or height of contents. | |
void | draw (gcn::Graphics *graphics) override |
Overridden to draw the frame if its size is 0. | |
void | drawFrame (gcn::Graphics *graphics) override |
Draws the background and border of the scroll area. | |
void | drawChildren (gcn::Graphics *graphics) override |
Applies clipping to the contents. | |
void | setOpaque (bool opaque) |
Sets whether the widget should draw its background or not. | |
bool | isOpaque () const |
Returns whether the widget draws its background or not. | |
void | mouseMoved (gcn::MouseEvent &event) override |
Called when the mouse moves in the widget area. | |
void | mouseEntered (gcn::MouseEvent &event) override |
Called when the mouse enteres the widget area. | |
void | mouseExited (gcn::MouseEvent &event) override |
Called when the mouse leaves the widget area. | |
void | mousePressed (gcn::MouseEvent &mouseEvent) override |
Code copied from gcn::ScrollArea::mousePressed to make it call our custom getVerticalMarkerDimension and getHorizontalMarkerDimension functions. | |
void | mouseDragged (gcn::MouseEvent &mouseEvent) override |
Code copied from gcn::ScrollArea::mouseDragged to make it call our custom getVerticalMarkerDimension and getHorizontalMarkerDimension functions. | |
Protected Member Functions | |
void | init () |
Initializes the scroll area. | |
void | drawBackground (gcn::Graphics *graphics) override |
void | drawUpButton (gcn::Graphics *graphics) override |
void | drawDownButton (gcn::Graphics *graphics) override |
void | drawLeftButton (gcn::Graphics *graphics) override |
void | drawRightButton (gcn::Graphics *graphics) override |
void | drawVBar (gcn::Graphics *graphics) override |
void | drawHBar (gcn::Graphics *graphics) override |
void | drawVMarker (gcn::Graphics *graphics) override |
void | drawHMarker (gcn::Graphics *graphics) override |
void | checkPolicies () override |
Code copied from gcn::ScrollArea::checkPolicies to make sure it takes the frame size of the content into account. | |
gcn::Rectangle | getUpButtonDimension () |
Shadowing these functions from gcn::ScrollArea with versions that support hiding the buttons. | |
gcn::Rectangle | getDownButtonDimension () |
gcn::Rectangle | getLeftButtonDimension () |
gcn::Rectangle | getRightButtonDimension () |
gcn::Rectangle | getVerticalBarDimension () |
gcn::Rectangle | getHorizontalBarDimension () |
gcn::Rectangle | getVerticalMarkerDimension () |
Shadowing these functions from gcn::ScrollArea with versions that supports fixed-size scroll bar markers. | |
gcn::Rectangle | getHorizontalMarkerDimension () |
Protected Attributes | |
int | mX = 0 |
int | mY = 0 |
bool | mHasMouse = false |
bool | mShowButtons = true |
A scroll area.
Contrary to Guichan's scroll area, this scroll area takes ownership over its content. However, it won't delete a previously set content widget when setContent is called!
Also overrides several functions to support fixed-size scroll bar markers.
Definition at line 37 of file scrollarea.h.
ScrollArea::ScrollArea | ( | ) |
Constructor that takes no content.
Needed for use with the DropDown class.
Definition at line 30 of file scrollarea.cpp.
ScrollArea::ScrollArea | ( | gcn::Widget * | content | ) |
Constructor.
content | the initial content to show in the scroll area |
Definition at line 35 of file scrollarea.cpp.
|
override |
|
overrideprotected |
Code copied from gcn::ScrollArea::checkPolicies to make sure it takes the frame size of the content into account.
Definition at line 260 of file scrollarea.cpp.
|
override |
Overridden to draw the frame if its size is 0.
Definition at line 125 of file scrollarea.cpp.
|
overrideprotected |
Definition at line 165 of file scrollarea.cpp.
|
override |
Applies clipping to the contents.
Definition at line 147 of file scrollarea.cpp.
|
overrideprotected |
Definition at line 190 of file scrollarea.cpp.
|
override |
Draws the background and border of the scroll area.
Definition at line 133 of file scrollarea.cpp.
|
overrideprotected |
Definition at line 223 of file scrollarea.cpp.
|
overrideprotected |
Definition at line 244 of file scrollarea.cpp.
|
overrideprotected |
Definition at line 198 of file scrollarea.cpp.
|
overrideprotected |
Definition at line 206 of file scrollarea.cpp.
|
overrideprotected |
Definition at line 182 of file scrollarea.cpp.
|
overrideprotected |
Definition at line 214 of file scrollarea.cpp.
|
overrideprotected |
Definition at line 232 of file scrollarea.cpp.
|
protected |
Definition at line 502 of file scrollarea.cpp.
|
protected |
Definition at line 563 of file scrollarea.cpp.
|
protected |
Definition at line 643 of file scrollarea.cpp.
|
protected |
Definition at line 518 of file scrollarea.cpp.
|
protected |
Definition at line 526 of file scrollarea.cpp.
|
protected |
Shadowing these functions from gcn::ScrollArea with versions that support hiding the buttons.
We need to make sure we always use these versions.
Definition at line 494 of file scrollarea.cpp.
|
protected |
Definition at line 542 of file scrollarea.cpp.
|
protected |
Shadowing these functions from gcn::ScrollArea with versions that supports fixed-size scroll bar markers.
We need to make sure we always use these versions.
Definition at line 615 of file scrollarea.cpp.
|
protected |
Initializes the scroll area.
Definition at line 51 of file scrollarea.cpp.
|
inline |
Returns whether the widget draws its background or not.
Definition at line 92 of file scrollarea.h.
|
override |
Logic function optionally adapts width or height of contents.
This depends on the scrollbar settings.
Definition at line 79 of file scrollarea.cpp.
|
override |
Code copied from gcn::ScrollArea::mouseDragged to make it call our custom getVerticalMarkerDimension and getHorizontalMarkerDimension functions.
Definition at line 453 of file scrollarea.cpp.
|
override |
Called when the mouse enteres the widget area.
Definition at line 364 of file scrollarea.cpp.
|
override |
Called when the mouse leaves the widget area.
Definition at line 369 of file scrollarea.cpp.
|
override |
Called when the mouse moves in the widget area.
Definition at line 358 of file scrollarea.cpp.
|
override |
Code copied from gcn::ScrollArea::mousePressed to make it call our custom getVerticalMarkerDimension and getHorizontalMarkerDimension functions.
Definition at line 378 of file scrollarea.cpp.
void ScrollArea::setOpaque | ( | bool | opaque | ) |
Sets whether the widget should draw its background or not.
Definition at line 157 of file scrollarea.cpp.
void ScrollArea::setShowButtons | ( | bool | showButtons | ) |
Sets whether the scroll bar buttons are shown.
Definition at line 46 of file scrollarea.cpp.
|
protected |
Definition at line 152 of file scrollarea.h.
|
protected |
Definition at line 153 of file scrollarea.h.
|
protected |
Definition at line 150 of file scrollarea.h.
|
protected |
Definition at line 151 of file scrollarea.h.