wlmaker
Toggle main menu visibility
Loading...
Searching...
No Matches
include
toolkit
box.h
Go to the documentation of this file.
1
/* ========================================================================= */
21
#ifndef __WLMTK_BOX_H__
22
#define __WLMTK_BOX_H__
23
24
#include <stdbool.h>
25
26
#include "libbase/libbase.h"
27
28
#include "
container.h
"
// IWYU pragma: keep
29
#include "
element.h
"
30
#include "
style.h
"
31
33
typedef
struct
_wlmtk_box_t
wlmtk_box_t
;
34
35
#ifdef __cplusplus
36
extern
"C"
{
37
#endif
// __cplusplus
38
40
typedef
enum
{
42
WLMTK_BOX_HORIZONTAL
,
44
WLMTK_BOX_VERTICAL
,
45
}
wlmtk_box_orientation_t
;
46
48
struct
_wlmtk_box_t
{
50
wlmtk_container_t
super_container
;
52
wlmtk_element_vmt_t
orig_super_element_vmt
;
54
wlmtk_box_orientation_t
orientation
;
55
57
wlmtk_container_t
element_container
;
59
wlmtk_container_t
margin_container
;
60
62
struct
wlmtk_margin_style
style
;
63
};
64
74
bool
wlmtk_box_init
(
75
wlmtk_box_t
*box_ptr,
76
wlmtk_box_orientation_t
orientation,
77
const
struct
wlmtk_margin_style
*style_ptr);
78
84
void
wlmtk_box_fini
(
wlmtk_box_t
*box_ptr);
85
92
void
wlmtk_box_add_element_front
(
wlmtk_box_t
*box_ptr,
wlmtk_element_t
*element_ptr);
93
100
void
wlmtk_box_add_element_back
(
wlmtk_box_t
*box_ptr,
wlmtk_element_t
*element_ptr);
101
110
void
wlmtk_box_remove_element
(
wlmtk_box_t
*box_ptr,
wlmtk_element_t
*element_ptr);
111
113
wlmtk_element_t
*
wlmtk_box_element
(
wlmtk_box_t
*box_ptr);
114
116
void
wlmtk_box_set_style
(
117
wlmtk_box_t
*box_ptr,
118
const
struct
wlmtk_margin_style
*style_ptr);
119
121
extern
const
bs_test_set_t
wlmtk_box_test_set
;
122
123
#ifdef __cplusplus
124
}
// extern "C"
125
#endif
// __cplusplus
126
127
#endif
/* __WLMTK_BOX_H__ */
128
/* == End of box.h ========================================================= */
wlmtk_box_add_element_front
void wlmtk_box_add_element_front(wlmtk_box_t *box_ptr, wlmtk_element_t *element_ptr)
Definition
box.c:105
wlmtk_box_orientation_t
wlmtk_box_orientation_t
Definition
box.h:40
WLMTK_BOX_VERTICAL
@ WLMTK_BOX_VERTICAL
Definition
box.h:44
WLMTK_BOX_HORIZONTAL
@ WLMTK_BOX_HORIZONTAL
Definition
box.h:42
wlmtk_box_add_element_back
void wlmtk_box_add_element_back(wlmtk_box_t *box_ptr, wlmtk_element_t *element_ptr)
Definition
box.c:114
wlmtk_box_remove_element
void wlmtk_box_remove_element(wlmtk_box_t *box_ptr, wlmtk_element_t *element_ptr)
Definition
box.c:124
wlmtk_box_test_set
const bs_test_set_t wlmtk_box_test_set
Definition
box.c:284
wlmtk_box_fini
void wlmtk_box_fini(wlmtk_box_t *box_ptr)
Definition
box.c:85
wlmtk_box_t
struct _wlmtk_box_t wlmtk_box_t
Definition
box.h:33
wlmtk_box_element
wlmtk_element_t * wlmtk_box_element(wlmtk_box_t *box_ptr)
Definition
box.c:131
wlmtk_box_set_style
void wlmtk_box_set_style(wlmtk_box_t *box_ptr, const struct wlmtk_margin_style *style_ptr)
Definition
box.c:137
wlmtk_box_init
bool wlmtk_box_init(wlmtk_box_t *box_ptr, wlmtk_box_orientation_t orientation, const struct wlmtk_margin_style *style_ptr)
Definition
box.c:49
container.h
wlmtk_container_t
struct _wlmtk_container_t wlmtk_container_t
Definition
container.h:31
element.h
wlmtk_element_vmt_t
struct _wlmtk_element_vmt_t wlmtk_element_vmt_t
Definition
element.h:39
wlmtk_element_t
struct _wlmtk_element_t wlmtk_element_t
Definition
element.h:37
_wlmtk_box_t
Definition
box.h:48
_wlmtk_box_t::orientation
wlmtk_box_orientation_t orientation
Definition
box.h:54
_wlmtk_box_t::super_container
wlmtk_container_t super_container
Definition
box.h:50
_wlmtk_box_t::margin_container
wlmtk_container_t margin_container
Definition
box.h:59
_wlmtk_box_t::element_container
wlmtk_container_t element_container
Definition
box.h:57
_wlmtk_box_t::style
struct wlmtk_margin_style style
Definition
box.h:62
_wlmtk_box_t::orig_super_element_vmt
wlmtk_element_vmt_t orig_super_element_vmt
Definition
box.h:52
wlmtk_margin_style
Definition
style.h:116
style.h
Generated by
1.17.0