]> git.xonotic.org Git - xonotic/netradiant.git/blobdiff - libs/uilib/uilib.h
Wrap GtkImage
[xonotic/netradiant.git] / libs / uilib / uilib.h
index f9b996c648409987cf10aac8bed62f541db08fe1..7e943985ac58d2cd839e0318bf9404e3924bf531 100644 (file)
@@ -10,26 +10,30 @@ using ui_box = struct _GtkBox;
 using ui_button = struct _GtkButton;
 using ui_checkbutton = struct _GtkCheckButton;
 using ui_combobox = struct _GtkComboBox;
-using ui_comboboxtext = ui_combobox;
 using ui_cellrenderer = struct _GtkCellRenderer;
 using ui_cellrenderertext = struct _GtkCellRendererText;
 using ui_entry = struct _GtkEntry;
 using ui_evkey = struct _GdkEventKey;
 using ui_frame = struct _GtkFrame;
 using ui_hbox = struct _GtkHBox;
+using ui_hpaned = struct _GtkHPaned;
+using ui_image = struct _GtkImage;
 using ui_label = struct _GtkLabel;
 using ui_menu = struct _GtkMenu;
 using ui_menuitem = struct _GtkMenuItem;
 using ui_modal = struct ModalDialog;
 using ui_object = struct _GtkObject;
+using ui_paned = struct _GtkPaned;
 using ui_scrolledwindow = struct _GtkScrolledWindow;
 using ui_spinbutton = struct _GtkSpinButton;
 using ui_table = struct _GtkTable;
 using ui_treemodel = struct _GtkTreeModel;
 using ui_treepath = struct _GtkTreePath;
 using ui_treeview = struct _GtkTreeView;
+using ui_treeviewcolumn = struct _GtkTreeViewColumn;
 using ui_typeinst = struct _GTypeInstance;
 using ui_vbox = struct _GtkVBox;
+using ui_vpaned = struct _GtkVPaned;
 using ui_widget = struct _GtkWidget;
 using ui_window = struct _GtkWindow;
 
@@ -62,6 +66,11 @@ namespace ui {
         NO,
     };
 
+    enum class window_type {
+        TOP,
+        POPUP
+    };
+
     template<class Self, class T, bool implicit = true>
     struct Convertible;
 
@@ -158,9 +167,7 @@ namespace ui {
 
     WRAP(ComboBox, Widget, ui_combobox,);
 
-    WRAP(ComboBoxText, ComboBox, ui_comboboxtext,
-         ComboBoxText();
-    );
+    ComboBox ComboBoxText();
 
     WRAP(Entry, Widget, ui_entry,
          Entry();
@@ -175,6 +182,10 @@ namespace ui {
          HBox(bool homogenous, int spacing);
     );
 
+    WRAP(Image, Widget, ui_image,
+         Image();
+    );
+
     WRAP(Label, Widget, ui_label,
          Label(const char *label);
     );
@@ -187,6 +198,16 @@ namespace ui {
          MenuItem(const char *label, bool mnemonic = false);
     );
 
+    WRAP(Paned, Widget, ui_paned,);
+
+        WRAP(HPaned, Paned, ui_hpaned,
+             HPaned();
+        );
+
+        WRAP(VPaned, Paned, ui_vpaned,
+             VPaned();
+        );
+
     WRAP(ScrolledWindow, Widget, ui_scrolledwindow,
          ScrolledWindow();
     );
@@ -207,15 +228,25 @@ namespace ui {
     );
 
     WRAP(TreeView, Widget, ui_treeview,
+         TreeView();
          TreeView(TreeModel model);
     );
 
+    struct TreeViewColumnAttribute {
+        const char *attribute;
+        int column;
+    };
+    WRAP(TreeViewColumn, Widget, ui_treeviewcolumn,
+         TreeViewColumn(const char *title, CellRenderer renderer, std::initializer_list<TreeViewColumnAttribute> attributes);
+    );
+
     WRAP(VBox, Box, ui_vbox,
          VBox(bool homogenous, int spacing);
     );
 
     WRAP(Window, Widget, ui_window,
          Window() : Window(nullptr) {};
+         Window(window_type type);
 
          Window create_dialog_window(const char *title, void func(), void *data, int default_w = -1,
                                      int default_h = -1);