diff options
Diffstat (limited to 'src/ui/widget.h')
-rw-r--r-- | src/ui/widget.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/ui/widget.h b/src/ui/widget.h index 4ab8d602..eb3004dc 100644 --- a/src/ui/widget.h +++ b/src/ui/widget.h | |||
@@ -237,6 +237,24 @@ iLocalDef int height_Widget(const iAnyObject *d) { | |||
237 | } | 237 | } |
238 | return 0; | 238 | return 0; |
239 | } | 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 | } | ||
240 | iLocalDef iObjectList *children_Widget(iAnyObject *d) { | 258 | iLocalDef iObjectList *children_Widget(iAnyObject *d) { |
241 | if (d == NULL) return NULL; | 259 | if (d == NULL) return NULL; |
242 | iAssert(isInstance_Object(d, &Class_Widget)); | 260 | iAssert(isInstance_Object(d, &Class_Widget)); |