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
8
namespace
cgv
{
9
namespace
app {
10
11
class
CGV_API
themed_canvas_overlay
:
public
canvas_overlay
,
public
cgv::gui::theme_observer
{
12
private
:
13
int
padding_ = 8;
14
15
cgv::g2d::shape2d_style container_style_;
16
17
protected
:
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
32
public
:
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
44
typedef
cgv::data::ref_ptr<canvas_overlay>
canvas_overlay_ptr;
45
46
}
47
}
48
49
#include <cgv/config/lib_end.h>
cgv::app::canvas_overlay
Definition
canvas_overlay.h:14
cgv::app::themed_canvas_overlay
Definition
themed_canvas_overlay.h:11
cgv::data::ref_ptr
reference counted pointer, which can work together with types that are derived from ref_counted,...
Definition
ref_ptr.h:160
cgv::gui::theme_info
Definition
theme_info.h:26
cgv::gui::theme_observer
Definition
theme_info.h:93
cgv::render::context
base class for all drawables, which is independent of the used rendering API.
Definition
context.h:621
cgv
the cgv namespace
Definition
print.h:11
libs
cgv_app
themed_canvas_overlay.h
Generated by
1.9.8