diff options
author | Jaakko Keränen <jaakko.keranen@iki.fi> | 2022-01-05 13:52:53 +0200 |
---|---|---|
committer | Jaakko Keränen <jaakko.keranen@iki.fi> | 2022-01-05 13:52:53 +0200 |
commit | db50d121c7503ae38ebae5de21ef6705518b4122 (patch) | |
tree | 83ed50257c45708c300ba90252778031b532ce54 /src/ui/widget.h | |
parent | 680db07eabd116cfde9d2894c69ff14e6d5e01ad (diff) | |
parent | 2bd476483a37662797b70d6577ddb0da64cdbaa6 (diff) |
Merge branch 'work/v1.10' into dev
# Conflicts:
# CMakeLists.txt
# Depends-Android.cmake
# res/about/version.gmi
# res/lang/cs.bin
# res/lang/eo.bin
# res/lang/es.bin
# res/lang/fi.bin
# res/lang/gl.bin
# res/lang/ia.bin
# res/lang/ie.bin
# res/lang/ru.bin
# res/lang/sr.bin
# res/lang/tok.bin
# res/lang/tr.bin
# res/lang/uk.bin
# res/lang/zh_Hant.bin
# src/app.c
# src/main.c
# src/ui/documentwidget.c
# src/ui/labelwidget.c
# src/ui/sidebarwidget.c
# src/ui/util.c
Diffstat (limited to 'src/ui/widget.h')
-rw-r--r-- | src/ui/widget.h | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/src/ui/widget.h b/src/ui/widget.h index 57088c07..fb7eb5e2 100644 --- a/src/ui/widget.h +++ b/src/ui/widget.h | |||
@@ -123,6 +123,11 @@ enum iWidgetFlag { | |||
123 | #define refChildrenOffset_WidgetFlag iBit64(63) /* visual offset determined by the offset of referenced children */ | 123 | #define refChildrenOffset_WidgetFlag iBit64(63) /* visual offset determined by the offset of referenced children */ |
124 | #define nativeMenu_WidgetFlag iBit64(64) | 124 | #define nativeMenu_WidgetFlag iBit64(64) |
125 | 125 | ||
126 | enum iWidgetFlag2 { | ||
127 | slidingSheetDraggable_WidgetFlag2 = iBit(1), | ||
128 | fadeBackground_WidgetFlag2 = iBit(2), | ||
129 | }; | ||
130 | |||
126 | enum iWidgetAddPos { | 131 | enum iWidgetAddPos { |
127 | back_WidgetAddPos, | 132 | back_WidgetAddPos, |
128 | front_WidgetAddPos, | 133 | front_WidgetAddPos, |
@@ -139,7 +144,9 @@ struct Impl_Widget { | |||
139 | iObject object; | 144 | iObject object; |
140 | iString id; | 145 | iString id; |
141 | int64_t flags; | 146 | int64_t flags; |
147 | int flags2; | ||
142 | iRect rect; | 148 | iRect rect; |
149 | iInt2 oldSize; /* in previous arrangement; for notification */ | ||
143 | iInt2 minSize; | 150 | iInt2 minSize; |
144 | iWidget * sizeRef; | 151 | iWidget * sizeRef; |
145 | iWidget * offsetRef; | 152 | iWidget * offsetRef; |
@@ -230,6 +237,24 @@ iLocalDef int height_Widget(const iAnyObject *d) { | |||
230 | } | 237 | } |
231 | return 0; | 238 | return 0; |
232 | } | 239 | } |
240 | iLocalDef int leftPad_Widget(const iWidget *d) { | ||
241 | return d->padding[0]; | ||
242 | } | ||
243 | iLocalDef int topPad_Widget(const iWidget *d) { | ||
244 | return d->padding[1]; | ||
245 | } | ||
246 | iLocalDef int rightPad_Widget(const iWidget *d) { | ||
247 | return d->padding[2]; | ||
248 | } | ||
249 | iLocalDef int bottomPad_Widget(const iWidget *d) { | ||
250 | return d->padding[3]; | ||
251 | } | ||
252 | iLocalDef iInt2 tlPad_Widget(const iWidget *d) { | ||
253 | return init_I2(leftPad_Widget(d), topPad_Widget(d)); | ||
254 | } | ||
255 | iLocalDef iInt2 brPad_Widget(const iWidget *d) { | ||
256 | return init_I2(rightPad_Widget(d), bottomPad_Widget(d)); | ||
257 | } | ||
233 | iLocalDef iObjectList *children_Widget(iAnyObject *d) { | 258 | iLocalDef iObjectList *children_Widget(iAnyObject *d) { |
234 | if (d == NULL) return NULL; | 259 | if (d == NULL) return NULL; |
235 | iAssert(isInstance_Object(d, &Class_Widget)); | 260 | iAssert(isInstance_Object(d, &Class_Widget)); |