#include <pgscrollwidget.h>
Inheritance diagram for PG_ScrollWidget:

Public Types | |
| enum | { IDWIDGETLIST_VSCROLL = PG_WIDGETID_INTERNAL + 10, IDWIDGETLIST_HSCROLL } |
Public Member Functions | |
| PG_ScrollWidget (PG_Widget *parent, const PG_Rect &r=PG_Rect::null, const std::string &style="ScrollWidget") | |
| Constructor of the PG_Widget class. | |
| ~PG_ScrollWidget () | |
| Destructor of the PG_Widget class. | |
| void | LoadThemeStyle (const std::string &widgettype) |
| Load a specific themestyle. | |
| void | EnableScrollBar (bool enable, PG_ScrollBar::ScrollDirection direction=PG_ScrollBar::VERTICAL) |
| Enable / disable the Scrollbar (override automatic display). | |
| void | ScrollTo (int x, int y) |
| scroll to a give X/Y-Coordinate within the client area. | |
| void | ScrollToWidget (PG_Widget *widget, bool bVertical=true) |
| Scroll to a widget. | |
| Uint16 | GetListHeight () |
| Uint16 | GetListWidth () |
| Uint16 | GetWidgetCount () |
| PG_Widget * | GetFirstInList () |
| virtual void | DeleteAll () |
| virtual void | RemoveAll () |
| void | AddChild (PG_Widget *child) |
| Add a clientwidget (which will be embedded into this widget). | |
| void | SetLineSize (int linesize) |
| Linesize is the scroll distance that is scrolled if one of the arrow buttons is pressed. | |
| int | GetLineSize () |
| void | SetShiftOnRemove (bool shiftx, bool shifty) |
| Shift widgets on removal. | |
| Uint16 | GetScrollPosX () |
| Get x offset of current scroll position. | |
| Uint16 | GetScrollPosY () |
| Get y offset of current scroll position. | |
| void | SetAutoResize (bool bRemove, bool bAdd) |
| Automatically adjusts the widget's size to the actual scroll area size;. | |
Public Attributes | |
| PG_ScrollArea::SignalAreaChangedHeight | sigAreaChangedHeight |
| PG_ScrollArea::SignalAreaChangedWidth | sigAreaChangedWidth |
Protected Member Functions | |
| void | eventSizeWidget (Uint16 w, Uint16 h) |
| Callback for the SizeWidget event. | |
| bool | eventMouseButtonDown (const SDL_MouseButtonEvent *button) |
| Overridable Eventhandler for a SDL_MouseButtonEvent message. | |
| bool | handleScrollPos (PG_ScrollBar *widget, long data) |
| bool | handleScrollTrack (PG_ScrollBar *widget, long data) |
| bool | handleAreaChangedHeight (PG_ScrollArea *area, Uint16 h) |
| bool | handleAreaChangedWidth (PG_ScrollArea *area, Uint16 w) |
| void | CheckScrollBars () |
Protected Attributes | |
| PG_ScrollBar * | my_objVerticalScrollbar |
| PG_ScrollBar * | my_objHorizontalScrollbar |
| PG_ScrollArea * | my_scrollarea |
| int | my_widthScrollbar |
| int | my_heightHorizontalScrollbar |
| bool | my_enableVerticalScrollbar |
| bool | my_enableHorizontalScrollbar |
| int | my_scrollLineSize |
Definition at line 50 of file pgscrollwidget.h.
|
|
Definition at line 53 of file pgscrollwidget.h. |
|
||||||||||||||||
|
|
Destructor of the PG_Widget class.
Definition at line 77 of file pgscrollwidget.cpp. References PG_ScrollArea::DeleteAll(), and my_scrollarea. |
|
|
Add a clientwidget (which will be embedded into this widget).
Reimplemented from PG_Widget. Reimplemented in PG_ListBox, PG_RichEdit, and PG_WidgetList. Definition at line 272 of file pgscrollwidget.cpp. References PG_ScrollArea::AddChild(), PG_Widget::AddChild(), my_objHorizontalScrollbar, my_objVerticalScrollbar, and my_scrollarea. Referenced by PG_RichEdit::AddChild(). |
|
|
|
Reimplemented in PG_ListBox. Definition at line 396 of file pgscrollwidget.cpp. References PG_ScrollArea::DeleteAll(), and my_scrollarea. |
|
||||||||||||
|
Enable / disable the Scrollbar (override automatic display).
Definition at line 326 of file pgscrollwidget.cpp. References CheckScrollBars(), PG_ScrollBar::HORIZONTAL, PG_Rect::IsNull(), my_enableHorizontalScrollbar, my_enableVerticalScrollbar, my_objHorizontalScrollbar, my_objVerticalScrollbar, and PG_ScrollBar::VERTICAL. Referenced by ASCGUI_Window::parsePanelASCTXT(), PG_ListBox::PG_ListBox(), PG_RichEdit::PG_RichEdit(), SaveGameBaseDialog::SaveGameBaseDialog(), and SetWidgetListAtts(). |
|
|
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. Reimplemented in PG_ListBox. Definition at line 221 of file pgscrollwidget.cpp. References PG_ScrollBar::GetLineSize(), GetLineSize(), GetScrollPosX(), GetScrollPosY(), PG_Widget::IsVisible(), my_objVerticalScrollbar, and ScrollTo(). |
|
||||||||||||
|
Callback for the SizeWidget event.
Reimplemented from PG_ThemeWidget. Reimplemented in PG_RichEdit. Definition at line 210 of file pgscrollwidget.cpp. References CheckScrollBars(), PG_ThemeWidget::eventSizeWidget(), PG_Rect::my_height, my_scrollarea, PG_Rect::my_width, and PG_Widget::SizeWidget(). Referenced by PG_RichEdit::eventSizeWidget(). |
|
|
Definition at line 386 of file pgscrollwidget.cpp. References PG_ScrollArea::GetFirstInList(), and my_scrollarea. Referenced by PG_DropDown::GetFirstInList(). |
|
|
Definition at line 290 of file pgscrollwidget.cpp. References my_scrollLineSize. Referenced by eventMouseButtonDown(). |
|
|
Definition at line 342 of file pgscrollwidget.cpp. References PG_ScrollArea::GetAreaHeight(), and my_scrollarea. Referenced by CheckScrollBars(). |
|
|
Definition at line 346 of file pgscrollwidget.cpp. References PG_ScrollArea::GetAreaWidth(), and my_scrollarea. Referenced by TextRenderer::AreaWidth(), and CheckScrollBars(). |
|
|
Get x offset of current scroll position.
Definition at line 408 of file pgscrollwidget.cpp. References PG_ScrollArea::GetScrollPosX(), and my_scrollarea. Referenced by TextRenderer::eventKeyDown(), eventMouseButtonDown(), and ItemSelectorWidget::reLoad(). |
|
|
Get y offset of current scroll position.
Definition at line 412 of file pgscrollwidget.cpp. References PG_ScrollArea::GetScrollPosY(), and my_scrollarea. Referenced by TextRenderer::eventKeyDown(), eventMouseButtonDown(), and ItemSelectorWidget::reLoad(). |
|
|
Definition at line 350 of file pgscrollwidget.cpp. References PG_ScrollArea::GetWidgetCount(), and my_scrollarea. Referenced by CheckScrollBars(), and PG_WidgetList::FindWidget(). |
|
||||||||||||
|
Definition at line 354 of file pgscrollwidget.cpp. References CheckScrollBars(), PG_ScrollArea::GetAreaHeight(), PG_ScrollArea::GetScrollPosX(), PG_ScrollArea::GetScrollPosY(), PG_Rect::my_height, my_scrollarea, and PG_ScrollArea::ScrollTo(). Referenced by PG_ScrollWidget(). |
|
||||||||||||
|
Definition at line 370 of file pgscrollwidget.cpp. References CheckScrollBars(), PG_ScrollArea::GetAreaWidth(), PG_ScrollArea::GetScrollPosX(), PG_ScrollArea::GetScrollPosY(), my_scrollarea, PG_Rect::my_width, and PG_ScrollArea::ScrollTo(). Referenced by PG_ScrollWidget(). |
|
||||||||||||
|
Definition at line 244 of file pgscrollwidget.cpp. References PG_ScrollArea::GetScrollPosX(), PG_ScrollArea::GetScrollPosY(), my_objHorizontalScrollbar, my_objVerticalScrollbar, my_scrollarea, and PG_ScrollArea::ScrollTo(). Referenced by PG_ScrollWidget(). |
|
||||||||||||
|
Reimplemented in CargoWidget. Definition at line 258 of file pgscrollwidget.cpp. References PG_ScrollArea::GetScrollPosX(), PG_ScrollArea::GetScrollPosY(), my_objHorizontalScrollbar, my_objVerticalScrollbar, my_scrollarea, and PG_ScrollArea::ScrollTo(). Referenced by PG_ScrollWidget(). |
|
|
Load a specific themestyle.
Reimplemented from PG_ThemeWidget. Definition at line 194 of file pgscrollwidget.cpp. References PG_Rect::Height(), PG_Widget::IsVisible(), PG_ScrollBar::LoadThemeStyle(), PG_ThemeWidget::LoadThemeStyle(), my_heightHorizontalScrollbar, my_objHorizontalScrollbar, my_objVerticalScrollbar, my_widthScrollbar, and PG_Rect::Width(). Referenced by PG_DropDown::LoadThemeStyle(), and PG_WidgetList::PG_WidgetList(). |
|
|
Reimplemented in PG_ListBox. Definition at line 400 of file pgscrollwidget.cpp. References my_scrollarea, and PG_ScrollArea::RemoveAll(). |
|
||||||||||||
|
scroll to a give X/Y-Coordinate within the client area.
Definition at line 390 of file pgscrollwidget.cpp. References CheckScrollBars(), PG_Rect::IsNull(), my_objHorizontalScrollbar, my_objVerticalScrollbar, my_scrollarea, and PG_ScrollArea::ScrollTo(). Referenced by TextRenderer::eventKeyDown(), eventMouseButtonDown(), and ItemSelectorWidget::reLoad(). |
|
||||||||||||
|
Scroll to a widget.
Definition at line 336 of file pgscrollwidget.cpp. References CheckScrollBars(), PG_Rect::IsNull(), my_objHorizontalScrollbar, my_objVerticalScrollbar, my_scrollarea, and PG_ScrollArea::ScrollToWidget(). Referenced by ItemSelectorWidget::locateObject(), and ItemSelectorWidget::moveSelection(). |
|
||||||||||||
|
Automatically adjusts the widget's size to the actual scroll area size;.
Reimplemented in PG_RichEdit. Definition at line 416 of file pgscrollwidget.cpp. References my_scrollarea, and PG_ScrollArea::SetResizeParent(). Referenced by PG_DropDown::PG_DropDown(). |
|
|
Linesize is the scroll distance that is scrolled if one of the arrow buttons is pressed.
Definition at line 285 of file pgscrollwidget.cpp. References my_scrollLineSize. Referenced by TextRenderer::TextRenderer(). |
|
||||||||||||
|
Shift widgets on removal.
Definition at line 404 of file pgscrollwidget.cpp. References my_scrollarea, and PG_ScrollArea::SetShiftOnRemove(). Referenced by PG_DropDown::PG_DropDown(). |
|
|
Definition at line 164 of file pgscrollwidget.h. Referenced by EnableScrollBar(), and PG_ScrollWidget(). |
|
|
Definition at line 163 of file pgscrollwidget.h. Referenced by EnableScrollBar(), and PG_ScrollWidget(). |
|
|
Definition at line 161 of file pgscrollwidget.h. Referenced by LoadThemeStyle(), and PG_ScrollWidget(). |
|
|
Definition at line 157 of file pgscrollwidget.h. Referenced by PG_WidgetList::AddChild(), AddChild(), CargoWidget::CargoWidget(), CheckScrollBars(), EnableScrollBar(), PG_RichEdit::eventBlit(), handleScrollPos(), handleScrollTrack(), LoadThemeStyle(), PG_RichEdit::PG_RichEdit(), PG_ScrollWidget(), ScrollTo(), and ScrollToWidget(). |
|
|
Definition at line 156 of file pgscrollwidget.h. Referenced by PG_WidgetList::AddChild(), AddChild(), CargoWidget::CargoWidget(), CheckScrollBars(), EnableScrollBar(), PG_RichEdit::eventBlit(), eventMouseButtonDown(), handleScrollPos(), handleScrollTrack(), LoadThemeStyle(), PG_RichEdit::PG_RichEdit(), PG_ScrollWidget(), ScrollTo(), and ScrollToWidget(). |
|
|
|
Definition at line 165 of file pgscrollwidget.h. Referenced by CheckScrollBars(), GetLineSize(), and SetLineSize(). |
|
|
Definition at line 160 of file pgscrollwidget.h. Referenced by LoadThemeStyle(), PG_ScrollWidget(), and PG_PropertyEditor::RegisterProperty(). |
|
|
Definition at line 135 of file pgscrollwidget.h. Referenced by PG_ScrollWidget(). |
|
|
Definition at line 137 of file pgscrollwidget.h. Referenced by PG_ScrollWidget(). |
1.4.2