diff options
Diffstat (limited to 'src/libui_sdl/libui/ui_unix.h')
-rw-r--r-- | src/libui_sdl/libui/ui_unix.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/libui_sdl/libui/ui_unix.h b/src/libui_sdl/libui/ui_unix.h index 23bd538..fac44bc 100644 --- a/src/libui_sdl/libui/ui_unix.h +++ b/src/libui_sdl/libui/ui_unix.h @@ -85,6 +85,11 @@ _UI_EXTERN void uiUnixControlSetContainer(uiUnixControl *, GtkContainer *, gbool { \ gtk_widget_grab_focus(type(c)->widget); \ } +#define uiUnixControlDefaultSetMinSize(type) \ + static void type ## SetMinSize(uiControl *c, int w, int h) \ + { \ + gtk_widget_set_size_request(type(c)->widget, w, h); \ + } // TODO this whole addedBefore stuff is a MASSIVE HACK. #define uiUnixControlDefaultSetContainer(type) \ static void type ## SetContainer(uiUnixControl *c, GtkContainer *container, gboolean remove) \ @@ -112,6 +117,7 @@ _UI_EXTERN void uiUnixControlSetContainer(uiUnixControl *, GtkContainer *, gbool uiUnixControlDefaultEnable(type) \ uiUnixControlDefaultDisable(type) \ uiUnixControlDefaultSetFocus(type) \ + uiUnixControlDefaultSetMinSize(type) \ uiUnixControlDefaultSetContainer(type) #define uiUnixControlAllDefaults(type) \ @@ -133,6 +139,7 @@ _UI_EXTERN void uiUnixControlSetContainer(uiUnixControl *, GtkContainer *, gbool uiControl(var)->Enable = type ## Enable; \ uiControl(var)->Disable = type ## Disable; \ uiControl(var)->SetFocus = type ## SetFocus; \ + uiControl(var)->SetMinSize = type ## SetMinSize; \ uiUnixControl(var)->SetContainer = type ## SetContainer; // TODO document _UI_EXTERN uiUnixControl *uiUnixAllocControl(size_t n, uint32_t typesig, const char *typenamestr); |