#include "Component.hpp" #include // std::max #include namespace cgeditor { class Scrollbar : public Component { /// @brief Set to true if it is the horizontal scrollbar bool IsHorizontal; Element bg,bar; double DragY,DragX; bool Trigger; public: Scrollbar(Status* s,bool IsHorizontal); void Refresh(); /// @brief Goto a given graphical coordinate (if possible using current scroll range) void Focus(double XorY); }; } // namespace cgeditor