#include <pgscrollbar.h>
Inheritance diagram for PG_ScrollBar:

Public Types | |
| enum | ScrollDirection { VERTICAL, HORIZONTAL } |
| ScrollbarType. More... | |
| enum | { IDSCROLLBAR_UP = PG_WIDGETID_INTERNAL + 1, IDSCROLLBAR_DOWN = PG_WIDGETID_INTERNAL + 2, IDSCROLLBAR_LEFT = PG_WIDGETID_INTERNAL + 3, IDSCROLLBAR_RIGHT = PG_WIDGETID_INTERNAL + 4, IDSCROLLBAR_DRAG = PG_WIDGETID_INTERNAL + 5 } |
| Widget ID's. More... | |
Public Member Functions | |
| PG_ScrollBar (PG_Widget *parent, const PG_Rect &r=PG_Rect::null, ScrollDirection direction=VERTICAL, int id=-1, const std::string &style="Scrollbar") | |
| virtual | ~PG_ScrollBar () |
| void | LoadThemeStyle (const std::string &widgettype) |
| Load a specific themestyle. | |
| void | SetPosition (int pos) |
| int | GetPosition () |
| void | SetRange (Uint32 min, Uint32 max) |
| The range in which the scrollbar operates. | |
| int | GetMinRange () |
| int | GetMaxRange () |
| void | SetLineSize (int ls) |
| Linesize is the scroll distance that is scrolled if one of the arrow buttons is pressed. | |
| int | GetLineSize () |
| void | SetPageSize (int ps) |
Public Attributes | |
| SignalScrollPos< long > | sigScrollPos |
| SignalScrollTrack< long > | sigScrollTrack |
Protected Member Functions | |
| void | eventSizeWidget (Uint16 w, Uint16 h) |
| Callback for the SizeWidget event. | |
| bool | eventMouseMotion (const SDL_MouseMotionEvent *motion) |
| Overridable Eventhandler for a SDL_MouseMotionEvent message. | |
| bool | eventMouseButtonDown (const SDL_MouseButtonEvent *button) |
| Overridable Eventhandler for a SDL_MouseButtonEvent message. | |
| virtual bool | handleButtonClick (PG_Button *button) |
| bool | eventMouseButtonUp (const SDL_MouseButtonEvent *button) |
| Overridable Eventhandler for a SDL_MouseButtonEvent message. | |
| virtual void | RecalcPositions () |
Protected Attributes | |
| int | scroll_min |
| int | scroll_max |
| int | scroll_current |
| int | my_linesize |
| int | my_pagesize |
| PG_Button * | scrollbutton [2] |
| ScrollButton * | dragbutton |
| PG_Rect | position [4] |
| the positions of the elements the scrollbar exists of: | |
| ScrollDirection | sb_direction |
Friends | |
| class | ScrollButton |
Classes | |
| class | ScrollButton |
| class | SignalScrollPos |
| Signal type declaration. More... | |
| class | SignalScrollTrack |
Definition at line 48 of file pgscrollbar.h.
|
|
Widget ID's.
Definition at line 95 of file pgscrollbar.h. |
|
|
ScrollbarType.
Definition at line 89 of file pgscrollbar.h. |
|
||||||||||||||||||||||||
|
Definition at line 37 of file pgscrollbar.cpp. References dragbutton, handleButtonClick(), IDSCROLLBAR_DOWN, IDSCROLLBAR_DRAG, IDSCROLLBAR_LEFT, IDSCROLLBAR_RIGHT, IDSCROLLBAR_UP, LoadThemeStyle(), my_linesize, my_pagesize, sb_direction, scroll_current, scroll_max, scroll_min, PG_PropStr::Scrollbar, ScrollButton, scrollbutton, PG_Widget::SetID(), SetPosition(), PG_Button::sigClick, and VERTICAL. |
|
|
Definition at line 68 of file pgscrollbar.cpp. |
|
|
Overridable Eventhandler for a SDL_MouseButtonEvent message. This handler is called when a mouse button is pressed. The default implementation returns 'false' which indicates that this message is not processed by this object.
Reimplemented from PG_MessageObject. Definition at line 401 of file pgscrollbar.cpp. |
|
|
Overridable Eventhandler for a SDL_MouseButtonEvent message. This handler is called when a mouse button is released. The default implementation returns 'false' which indicates that this message is not processed by this object.
Reimplemented from PG_MessageObject. Reimplemented in PG_Slider. Definition at line 220 of file pgscrollbar.cpp. References dragbutton, PG_MessageObject::eventMouseButtonUp(), PG_Application::GetEventSupplier(), PG_Rect::my_height, my_linesize, my_pagesize, PG_Rect::my_width, PG_Rect::my_xpos, PG_Rect::my_ypos, sb_direction, scroll_current, scroll_min, SetPosition(), sigScrollPos, and VERTICAL. |
|
|
Overridable Eventhandler for a SDL_MouseMotionEvent message. This handler is called when mouse movement is detected. The default implementation returns 'false' which indicates that this message is not processed by this object.
Reimplemented from PG_MessageObject. Definition at line 215 of file pgscrollbar.cpp. References PG_MessageObject::eventMouseMotion(). |
|
||||||||||||
|
Callback for the SizeWidget event.
Reimplemented from PG_ThemeWidget. Definition at line 202 of file pgscrollbar.cpp. References PG_ThemeWidget::eventSizeWidget(), PG_Rect::my_height, PG_Rect::my_width, RecalcPositions(), scroll_current, and SetPosition(). |
|
|
Definition at line 493 of file pgscrollbar.cpp. References my_linesize. Referenced by PG_ScrollWidget::eventMouseButtonDown(). |
|
|
Definition at line 439 of file pgscrollbar.cpp. References scroll_max. Referenced by PG_MultiLineEdit::SetVPosition(). |
|
|
Definition at line 434 of file pgscrollbar.cpp. References scroll_min. |
|
|
Definition at line 371 of file pgscrollbar.cpp. References scroll_current. Referenced by PG_MultiLineEdit::handleScroll(), PG_ColorSelector::SetBaseColor(), and PG_MultiLineEdit::SetVPosition(). |
|
|
Definition at line 376 of file pgscrollbar.cpp. References my_linesize, scroll_current, scroll_max, scroll_min, scrollbutton, SetPosition(), and sigScrollPos. Referenced by PG_ScrollBar(). |
|
|
Load a specific themestyle.
Reimplemented from PG_ThemeWidget. Reimplemented in PG_Slider. Definition at line 70 of file pgscrollbar.cpp. References dragbutton, PG_Button::LoadThemeStyle(), PG_ThemeWidget::LoadThemeStyle(), RecalcPositions(), sb_direction, PG_PropStr::Scrollbar, PG_PropStr::ScrollbarDown, PG_PropStr::ScrollbarDrag, PG_PropStr::ScrollbarDragH, PG_PropStr::ScrollbarDragV, PG_PropStr::ScrollbarH, PG_PropStr::ScrollbarLeft, PG_PropStr::ScrollbarRight, PG_PropStr::ScrollbarUp, PG_PropStr::ScrollbarV, scrollbutton, and VERTICAL. Referenced by PG_ScrollWidget::LoadThemeStyle(), and PG_ScrollBar(). |
|
|
Reimplemented in PG_Slider. Definition at line 94 of file pgscrollbar.cpp. References dragbutton, PG_Widget::MoveWidget(), PG_Widget::my_bordersize, my_pagesize, position, sb_direction, scroll_current, scroll_max, scroll_min, scrollbutton, and VERTICAL. Referenced by eventSizeWidget(), LoadThemeStyle(), SetPageSize(), and SetPosition(). |
|
|
Linesize is the scroll distance that is scrolled if one of the arrow buttons is pressed.
Definition at line 489 of file pgscrollbar.cpp. References my_linesize. Referenced by PG_ScrollWidget::CheckScrollBars(), PG_RichEdit::PG_RichEdit(), and SetScrollBarAtts(). |
|
|
Definition at line 499 of file pgscrollbar.cpp. References my_pagesize, and RecalcPositions(). Referenced by PG_ScrollWidget::CheckScrollBars(), ASC_MainScreenWidget::eventKeyDown(), and SetScrollBarAtts(). |
|
|
||||||||||||
|
The range in which the scrollbar operates. The whole scrolling area is (max - min) + pagesize Definition at line 426 of file pgscrollbar.cpp. References scroll_current, scroll_max, scroll_min, and SetPosition(). Referenced by PG_ScrollWidget::CheckScrollBars(), ASC_MainScreenWidget::eventKeyDown(), InternalAmmoTransferWidget::InternalAmmoTransferWidget(), MapInfoPanel::MapInfoPanel(), PG_ColorSelector::PG_ColorSelector(), PG_ScrollWidget::PG_ScrollWidget(), ResourcePlacementDialog::ResourcePlacementDialog(), SetScrollBarAtts(), SoundSettings::SoundSettings(), and MatterAndMiningBaseWindow::update(). |
|
|
Definition at line 190 of file pgscrollbar.h. Referenced by PG_ScrollBar(). |
|
|
Definition at line 176 of file pgscrollbar.h. Referenced by eventMouseButtonUp(), PG_Slider::LoadThemeStyle(), LoadThemeStyle(), PG_ScrollBar(), PG_Slider::RecalcPositions(), RecalcPositions(), and SetPosition(). |
|
|
Definition at line 170 of file pgscrollbar.h. Referenced by PG_Slider::eventMouseButtonUp(), eventMouseButtonUp(), GetLineSize(), handleButtonClick(), PG_ScrollBar(), and SetLineSize(). |
|
|
Definition at line 172 of file pgscrollbar.h. Referenced by eventMouseButtonUp(), PG_ScrollBar(), RecalcPositions(), and SetPageSize(). |
|
|
the positions of the elements the scrollbar exists of:
Definition at line 184 of file pgscrollbar.h. Referenced by PG_ScrollBar::ScrollButton::eventMouseMotion(), PG_ScrollBar::ScrollButton::GetPosFromPoint(), PG_Slider::RecalcPositions(), and RecalcPositions(). |
|
|
Definition at line 186 of file pgscrollbar.h. Referenced by eventMouseButtonUp(), PG_Slider::LoadThemeStyle(), LoadThemeStyle(), PG_ScrollBar(), PG_Slider::RecalcPositions(), and RecalcPositions(). |
|
|
Definition at line 168 of file pgscrollbar.h. Referenced by PG_Slider::eventMouseButtonUp(), eventMouseButtonUp(), eventSizeWidget(), GetPosition(), handleButtonClick(), PG_ScrollBar(), PG_Slider::RecalcPositions(), RecalcPositions(), SetPosition(), and SetRange(). |
|
|
Definition at line 166 of file pgscrollbar.h. Referenced by GetMaxRange(), handleButtonClick(), PG_ScrollBar(), PG_Slider::RecalcPositions(), RecalcPositions(), SetPosition(), and SetRange(). |
|
|
Definition at line 164 of file pgscrollbar.h. Referenced by PG_Slider::eventMouseButtonUp(), eventMouseButtonUp(), GetMinRange(), handleButtonClick(), PG_ScrollBar(), PG_Slider::PG_Slider(), PG_Slider::RecalcPositions(), RecalcPositions(), SetPosition(), and SetRange(). |
|
|
Definition at line 174 of file pgscrollbar.h. Referenced by handleButtonClick(), LoadThemeStyle(), PG_ScrollBar(), PG_Slider::PG_Slider(), PG_Slider::RecalcPositions(), and RecalcPositions(). |
|
|
Definition at line 144 of file pgscrollbar.h. Referenced by eventMouseButtonUp(), handleButtonClick(), PG_MultiLineEdit::PG_MultiLineEdit(), PG_RichEdit::PG_RichEdit(), PG_ScrollWidget::PG_ScrollWidget(), PG_Slider::PG_Slider(), and MatterAndMiningBaseWindow::update(). |
|
|
Definition at line 145 of file pgscrollbar.h. Referenced by CargoWidget::CargoWidget(), PG_MultiLineEdit::PG_MultiLineEdit(), PG_RichEdit::PG_RichEdit(), PG_ScrollWidget::PG_ScrollWidget(), PG_Slider::PG_Slider(), SoundSettings::SoundSettings(), and MatterAndMiningBaseWindow::update(). |
1.4.2