| 1 | //************************************ bs::framework - Copyright 2018 Marko Pintera **************************************// |
| 2 | //*********** Licensed under the MIT license. See LICENSE.md for full terms. This notice is not to be removed. ***********// |
| 3 | #pragma once |
| 4 | |
| 5 | #include "BsPrerequisites.h" |
| 6 | #include "GUI/BsGUIScrollBar.h" |
| 7 | |
| 8 | namespace bs |
| 9 | { |
| 10 | /** @addtogroup GUI |
| 11 | * @{ |
| 12 | */ |
| 13 | |
| 14 | /** Specialization of a GUIScrollBar for horizontal scrolling. */ |
| 15 | class BS_EXPORT GUIScrollBarHorz : public GUIScrollBar |
| 16 | { |
| 17 | public: |
| 18 | /** Returns type name of the GUI element used for finding GUI element styles. */ |
| 19 | static const String& getGUITypeName(bool resizable); |
| 20 | |
| 21 | /** |
| 22 | * Creates a new horizontal scroll bar. |
| 23 | * |
| 24 | * @param[in] styleName Optional style to use for the element. Style will be retrieved from GUISkin of the |
| 25 | * GUIWidget the element is used on. If not specified default style is used. |
| 26 | */ |
| 27 | static GUIScrollBarHorz* create(const String& styleName = StringUtil::BLANK); |
| 28 | |
| 29 | /** |
| 30 | * Creates a new horizontal scroll bar. |
| 31 | * |
| 32 | * @param[in] resizeable If true the scrollbar will have additional handles that allow the scroll handle to |
| 33 | * be resized. This allows you to adjust the size of the visible scroll area. |
| 34 | * @param[in] styleName Optional style to use for the element. Style will be retrieved from GUISkin of the |
| 35 | * GUIWidget the element is used on. If not specified default style is used. |
| 36 | */ |
| 37 | static GUIScrollBarHorz* create(bool resizeable, const String& styleName = StringUtil::BLANK); |
| 38 | |
| 39 | /** |
| 40 | * Creates a new horizontal scroll bar. |
| 41 | * |
| 42 | * @param[in] options Options that allow you to control how is the element positioned and sized. |
| 43 | * This will override any similar options set by style. |
| 44 | * @param[in] styleName Optional style to use for the element. Style will be retrieved from GUISkin of the |
| 45 | * GUIWidget the element is used on. If not specified default style is used. |
| 46 | */ |
| 47 | static GUIScrollBarHorz* create(const GUIOptions& options, const String& styleName = StringUtil::BLANK); |
| 48 | |
| 49 | /** |
| 50 | * Creates a new horizontal scroll bar. |
| 51 | * |
| 52 | * @param[in] resizeable If true the scrollbar will have additional handles that allow the scroll handle to |
| 53 | * be resized. This allows you to adjust the size of the visible scroll area. |
| 54 | * @param[in] options Options that allow you to control how is the element positioned and sized. |
| 55 | * This will override any similar options set by style. |
| 56 | * @param[in] styleName Optional style to use for the element. Style will be retrieved from GUISkin of the |
| 57 | * GUIWidget the element is used on. If not specified default style is used. |
| 58 | */ |
| 59 | static GUIScrollBarHorz* create(bool resizeable, const GUIOptions& options, |
| 60 | const String& styleName = StringUtil::BLANK); |
| 61 | protected: |
| 62 | GUIScrollBarHorz(bool resizeable, const String& styleName, const GUIDimensions& dimensions); |
| 63 | ~GUIScrollBarHorz() = default; |
| 64 | }; |
| 65 | |
| 66 | /** @} */ |
| 67 | } |