diff options
Diffstat (limited to 'src/components/Scrollbar.hpp')
| -rw-r--r-- | src/components/Scrollbar.hpp | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/components/Scrollbar.hpp b/src/components/Scrollbar.hpp index c313c69..5caba75 100644 --- a/src/components/Scrollbar.hpp +++ b/src/components/Scrollbar.hpp @@ -8,13 +8,19 @@ class Scrollbar : public Component { bool IsHorizontal; Element bg,bar; double DragY,DragX; + double FocusX,FocusY; + /// @brief Should focus be applied on the next draw + bool ShouldApplyFocus; + /// @brief Use to detect scrollbar drags bool Trigger; - /// @brief Canvas size cache used to reset on resize - double CanvasWidth, CanvasHeight; + /// @brief Goto a given graphical coordinate (if possible using current scroll range) + void ApplyFocus(); public: Scrollbar(Status* s,bool IsHorizontal); void Refresh(); - /// @brief Goto a given graphical coordinate (if possible using current scroll range) + /// @brief Focus on a coordinate on the next draw void Focus(double XorY); + /// @brief Undo all scroll operations, go back to the origin + void Reset(); }; } // namespace cgeditor
\ No newline at end of file |
