application/main.c

changeset 22
bcf880b29bc3
parent 21
012418e7dc90
child 26
a137277f9173
--- a/application/main.c	Thu Apr 03 11:12:22 2014 +0200
+++ b/application/main.c	Thu Apr 03 14:16:41 2014 +0200
@@ -104,6 +104,22 @@
     printf("selected document: %d\n", event->intval);
 }
 
+void action_cut(UiEvent *event, void *data) {
+    printf("cut\n");
+}
+
+void action_copy(UiEvent *event, void *data) {
+    printf("copy\n");
+}
+
+void action_paste(UiEvent *event, void *data) {
+    printf("paste\n");
+}
+
+void action_delete(UiEvent *event, void *data) {
+    printf("delete\n");
+}
+
 
 int main(int argc, char** argv) {
     ui_init("app1", argc, argv);
@@ -132,6 +148,12 @@
     ui_menuseparator();
     ui_menuitem_st(UI_STOCK_CLOSE, action_close, NULL);
     
+    ui_menu("Edit");
+    ui_menuitem_stgr(UI_STOCK_CUT, action_cut, NULL, UI_GROUP_SELECTION, -1);
+    ui_menuitem_stgr(UI_STOCK_COPY, action_copy, NULL, UI_GROUP_SELECTION, -1);
+    ui_menuitem_st(UI_STOCK_PASTE, action_paste, NULL);
+    ui_menuitem_stgr(UI_STOCK_DELETE, action_delete, NULL, UI_GROUP_SELECTION, -1);
+    
     
     ui_toolitem_st("new", UI_STOCK_NEW, action_new, NULL);
     ui_toolitem_st("open", UI_STOCK_GO_BACK, action_open, NULL);

mercurial