-
Notifications
You must be signed in to change notification settings - Fork 0
/
themedim_element_minoverridefwd.H
66 lines (48 loc) · 1.73 KB
/
themedim_element_minoverridefwd.H
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
/*
** Copyright 2017-2021 Double Precision, Inc.
** See COPYING for distribution information.
*/
#ifndef themedim_element_minoverridefwd_H
#define themedim_element_minoverridefwd_H
#include "x/w/impl/themedim_elementfwd.H"
#include "x/w/dim_arg.H"
LIBCXXW_NAMESPACE_START
struct themedim_element_override_width_tag;
struct themedim_element_override_height_tag;
/*!
Template for a mixin that installs a minimum width and height overrides
into an element.
The template parameter is a subclass of elementObj. The resulting template
inherits from this subclass.
The first two parameters to the constructor are dim_args. The remaining
parameters get forwarded to the superclass's constructor.
The resulting template class uses set_minimum_override() to set the minimum
width or height of this display element.
*/
template<typename element_impl>
class LIBCXX_HIDDEN themedim_element_minoverrideObj
: public themedim_elementObj<element_impl,
themedim_element_override_width_tag,
themedim_element_override_height_tag> {
//! Alias
typedef themedim_elementObj<element_impl,
themedim_element_override_width_tag,
themedim_element_override_height_tag
> superclass_t;
public:
template<typename ...Args>
themedim_element_minoverrideObj(const dim_arg &width_override,
const dim_arg &height_override,
Args && ...args);
~themedim_element_minoverrideObj();
void initialize(ONLY IN_THREAD) override;
void theme_updated(ONLY IN_THREAD,
const const_defaulttheme &new_theme) override;
void update_minimum_override(ONLY IN_THREAD,
const dim_arg &width_override,
const dim_arg &height_override);
private:
void compute_minimum_override(ONLY IN_THREAD);
};
LIBCXXW_NAMESPACE_END
#endif