application/main.c

changeset 33
458831c574f4
parent 30
34513f76d5a8
child 37
56016468753d
--- a/application/main.c	Sat Apr 12 13:44:53 2014 +0200
+++ b/application/main.c	Sat May 10 15:43:22 2014 +0200
@@ -47,6 +47,8 @@
 
 UiList *list;
 
+/*
+
 void action_new(UiEvent *event, void *data) {
     UiObject *window = ui_window("Mod1", NULL);
     //ui_window_addint(window, "check1");
@@ -152,14 +154,15 @@
     printf("delete\n");
 }
 
+//*/
 
 int main(int argc, char** argv) { 
     ui_init("app1", argc, argv);
     ui_locales_dir("/opt/app1/locales");
     ui_load_lang_def(NULL, "en_EN");
-    ui_openfilefunc(action_new, NULL);
+    //ui_openfilefunc(action_new, NULL);
     
-    
+    /*
     list = ui_list_new();
     ui_list_append(list, "file1.txt");
     ui_list_append(list, "hello.txt");
@@ -204,10 +207,16 @@
     ui_toolbar_add_default("close");
     ui_toolbar_add_default("undo");
     ui_toolbar_add_default("redo");
+    //*/
     
+    ui_menu("File");
+    ui_menuitem("New", NULL, NULL);
+    ui_menuitem("Close", NULL, NULL);
+    ui_menu("Edit");
+    ui_menuitem("Preferences", NULL, NULL);
     
     printf("create window\n");
-    UiObject *window = ui_window("Mod0", NULL);
+    UiObject *window = ui_window("Mod0", NULL);  
     TestWindowData *wdata = calloc(1, sizeof(TestWindowData));
     window->window = wdata;
     
@@ -221,7 +230,7 @@
     ui_set_document(window, doc1);
     
     //ui_button(window, "OK", action_open, NULL);
-    ui_textarea(window, &wdata->text);
+    //ui_textarea(window, &wdata->text);
     
     //ui_window_addint(window, "check1");
     ui_show(window);

mercurial