X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?p=instimg;a=blobdiff_plain;f=src%2Fwidgets.h;h=caf4a4ef4f4f1c3fe65f953c4dccbeb09a94c349;hp=a81da8f33afcabfa58a1e6fdfa9f4f7e8deb8d9e;hb=9f8f8c6cde6f5d9174aa8bc88f530436aecb70d9;hpb=4f312c9361b1f4c63d7697e58503cd0fb8b05fff diff --git a/src/widgets.h b/src/widgets.h index a81da8f..caf4a4e 100644 --- a/src/widgets.h +++ b/src/widgets.h @@ -3,7 +3,8 @@ #include -#define WGT_AUTO (-0x4242) +#define WGT_AUTO (-0x4242) +#define WGT_AUTOMIN(x) (-x) struct wgt_window; struct wgt_widget; @@ -19,6 +20,9 @@ struct wgt_window *wgt_window(const char *title, int width, int height); void wgt_destroy_window(struct wgt_window *win); void wgt_destroy_widget(struct wgt_widget *w); +void wgt_enable_widget(struct wgt_widget *w); +void wgt_disable_widget(struct wgt_widget *w); +int wgt_widget_enabled(struct wgt_widget *w); struct wgt_window *wgt_widget_window(struct wgt_widget *w); struct wgt_rect *wgt_widget_rect(struct wgt_widget *w, struct wgt_rect *rect); int wgt_xpos_after(struct wgt_widget *w, int pad); @@ -33,7 +37,12 @@ struct wgt_widget *wgt_checkbox(struct wgt_window *win, const char *text, int on struct wgt_widget *wgt_combo(struct wgt_window *win, const char **items, int num_items, int sel, int x, int y, int width, int height, wgt_callback modfunc); +void wgt_checkbox_check(struct wgt_widget *w); +void wgt_checkbox_uncheck(struct wgt_widget *w); +int wgt_checkbox_checked(struct wgt_widget *w); + +int wgt_combo_setitems(struct wgt_widget *w, const char **items, int num_items); int wgt_combo_selected(struct wgt_widget *w); const char *wgt_get_combo_item(struct wgt_widget *w, int idx); -#endif /* WIDGETS_H_ */ \ No newline at end of file +#endif /* WIDGETS_H_ */