summaryrefslogtreecommitdiff
path: root/client/widgets/combobox.h
diff options
context:
space:
mode:
Diffstat (limited to 'client/widgets/combobox.h')
-rw-r--r--client/widgets/combobox.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/client/widgets/combobox.h b/client/widgets/combobox.h
index ec8c9ba..657d458 100644
--- a/client/widgets/combobox.h
+++ b/client/widgets/combobox.h
@@ -77,4 +77,27 @@ private:
bool ignoreChangeEvents;
};
+int cmb_clear(lua_State *L);
+int cmb_add_item(lua_State *L);
+int cmb_le_value(lua_State *L);
+int cmb_le_set_value(lua_State *L);
+
+#define CMBBOX_METHS \
+ {"clear", cmb_clear},\
+ {"addItem", cmb_add_item},\
+ {"lineEditValue", cmb_le_value},\
+ {"setLineEditValue", cmb_le_set_value}
+
+const struct luaL_Reg cmbbox_meths[] =
+ { WDG_METHS, CMBBOX_METHS, {NULL, NULL} };
+
+inline void register_combobox(lua_State *L)
+{
+ luaL_newmetatable(L, "ComboBox");
+ lua_pushliteral(L, "__index");
+ lua_pushvalue(L, -2);
+ lua_rawset(L, -3);
+ luaL_register(L, NULL, cmbbox_meths);
+}
+
#endif/*__PRACRO_COMBOBOX_H__*/