|
ShishGL
1.0
A simple modular cross-platform graphics library
|
|
Go to the documentation of this file.
2 #ifndef SHISHGL_UI_FRAME_HPP
3 #define SHISHGL_UI_FRAME_HPP
32 child->translate(
rel_pos - new_rel_pos);
40 static constexpr
double SB_WIDTH = 30;
46 min_pos.
x = std::min(min_pos.
x, child->getPos().x);
47 min_pos.
y = std::min(min_pos.
y, child->getPos().y);
48 max_pos.
x = std::max(max_pos.
x, child->getPos().x + child->getSize().x -
getSize().x);
49 max_pos.
y = std::max(max_pos.
y, child->getPos().y + child->getSize().y -
getSize().y);
52 if (min_pos.
x < max_pos.
x) {
56 h_scrollbar = attach<UIHorizontalScrollbar<FrameScroller>>(
76 if (min_pos.
y < max_pos.
y) {
80 v_scrollbar = attach<UIVerticalScrollbar<FrameScroller>>(
120 , target_frame(target_fr)
149 #endif //SHISHGL_UI_FRAME_HPP
const Vector2< double > & getPos() const
Definition: Window.cpp:31
@ NORMAL
Definition: UIWindow.hpp:20
Window * detach(Window *child)
Definition: Window.cpp:74
const std::list< Window * > & getChildren()
Definition: Window.hpp:60
Definition: DefaultBehavior.hpp:14
static constexpr Listener * SystemEvents
Definition: EventSystem.hpp:12
T x
Definition: Vector2.hpp:10
bool onMouseScroll(MouseScrollEvent &event) override
Definition: UIFrame.hpp:141
T y
Definition: Vector2.hpp:10
Vector2< double > rel_pos
Definition: UIFrame.hpp:108
SomeWindow * target() const
Definition: Behavior.hpp:17
Definition: UIWindow.hpp:16
static bool sendEvent(Listener *sender, Args &&... args)
Definition: EventSystem.ipp:8
UIFrame(const Frame &frame)
Definition: UIFrame.cpp:9
const Vector2< double > & getSize() const
Definition: Window.cpp:27
Definition: CoreApplication.hpp:10
FrameBehavior(UIWindow *target)
Definition: UIFrame.hpp:135
static void destroy(Window *window)
Definition: WindowManager.cpp:29
UIHorizontalScrollbar< FrameScroller > * h_scrollbar
Definition: UIFrame.hpp:106
Definition: UIFrame.hpp:132
UIVerticalScrollbar< FrameScroller > * v_scrollbar
Definition: UIFrame.hpp:105
Definition: ColorFill.hpp:11
void setView(const Vector2< double > &pos)
Definition: UIFrame.hpp:20
static void subscribe(Listener *receiver, Listener *sender, EventMask mask)
Definition: SubscriptionManager.cpp:18
Definition: UIFrame.hpp:15
void fit()
Definition: UIFrame.hpp:38
static const Color BLANCHED_ALMOND
Definition: Color.hpp:78
Frame frame
Definition: Slidable.hpp:98
Vector2< double > max_rel_pos
Definition: UIFrame.hpp:109