cgv
Loading...
Searching...
No Matches
themed_canvas_overlay.h
1#pragma once
2
3#include <cgv_app/canvas_overlay.h>
4#include <cgv/gui/theme_info.h>
5
6#include "lib_begin.h"
7
8namespace cgv {
9namespace app {
10
12private:
13 int padding_ = 8;
14
15 cgv::g2d::shape2d_style container_style_;
16
17protected:
19 bool background_visible_ = true;
20
21 void begin_content(cgv::render::context& ctx, bool clear_frame_buffer = true);
22
23 virtual void init_styles() override {}
24
25 void init_container_style(const cgv::gui::theme_info& theme);
26
28 cgv::g2d::irect get_content_rectangle() const;
29
30 int padding() const { return padding_; }
31
32public:
34 themed_canvas_overlay();
35
36 bool init(cgv::render::context& ctx) override;
37
38 virtual void handle_theme_change(const cgv::gui::theme_info& theme) override;
39
40 bool get_background_visible() const { return background_visible_; }
41 void set_background_visible(bool flag);
42};
43
44typedef cgv::data::ref_ptr<canvas_overlay> canvas_overlay_ptr;
45
46}
47}
48
49#include <cgv/config/lib_end.h>
reference counted pointer, which can work together with types that are derived from ref_counted,...
Definition ref_ptr.h:160
base class for all drawables, which is independent of the used rendering API.
Definition context.h:621
the cgv namespace
Definition print.h:11