summaryrefslogtreecommitdiff
path: root/src/gui/base.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/base.h')
-rw-r--r--src/gui/base.h16
1 files changed, 15 insertions, 1 deletions
diff --git a/src/gui/base.h b/src/gui/base.h
index 7b95d34..230a63e 100644
--- a/src/gui/base.h
+++ b/src/gui/base.h
@@ -46,12 +46,19 @@ extern U8 gui_is_fg_window( struct GUI_BASE* node ); // 1 if pa
// ======================================= [ components ] =========================================
+typedef void( *GUI_CALLBACK )( void* ptr );
struct GUI_LIST_ENTRY {
I32 val;
char title[256];
};
-typedef void( *GUI_CALLBACK )( void* ptr );
+struct GUI_CONTEXT_ENTRY {
+ GUI_CALLBACK cb;
+ void* data;
+
+ LIST<GUI_CONTEXT_ENTRY> subentries;
+};
+
extern struct GUI_VIEW* gui_view( I32 x, I32 y, I32 w, I32 h ); // sets current view
extern struct GUI_WINDOW* gui_window( I32 w, I32 h ); // sets current view and window
@@ -66,6 +73,9 @@ extern struct GUI_CHECKBOX* gui_checkbox( I32 x, I32 y, const char* title, U8*
extern struct GUI_LIST* gui_list( I32 x, I32 y, I32 w, I32 h, const char* title, LIST<GUI_LIST_ENTRY>* list, I32* pval );
extern struct GUI_LIST_ENTRY* gui_list_get_selected( struct GUI_LIST* list );
+extern struct GUI_CONTEXTBOX* gui_contextbox( I32 x, I32 y, I32 w, I32 h, const char* title, LIST<GUI_CONTEXT_ENTRY>* entries );
+extern struct GUI_CONTEXTBOX* gui_contextbox( I32 x, I32 y, I32 w, I32 h, LIST<GUI_CONTEXT_ENTRY>* entries );
+
extern struct GUI_FLOATINPUT* gui_floatinput(
I32 x, I32 y, I32 w,
const char* title,
@@ -195,6 +205,10 @@ struct GUI_TEXTBOX : GUI_BASE {
GUI_CALLBACK cb;
};
+struct GUI_CONTEXTBOX : GUI_BASE {
+ LIST<GUI_CONTEXT_ENTRY>* entries;
+};
+
struct GUI_FLOATINPUT : GUI_BASE {
const char* valfmt;
F32* pval;