application/main.c

changeset 125
3335268a8073
parent 124
80609f9675f1
child 126
f190d03dce0f
--- a/application/main.c	Mon May 23 12:28:32 2016 +0200
+++ b/application/main.c	Wed Jul 13 15:14:09 2016 +0200
@@ -39,13 +39,13 @@
 
 void action_menu(UiEvent *event, void *data) {
     printf("action_menu test: {%s}\n", data);
-    printf("text: {%s}\n", ui_gettext(event->obj, "text"));
-    fflush(stdout);
-    
-    char *file = ui_openfiledialog(event->obj);
-    printf("file: %s\n", file);
-    fflush(stdout);
-    free(file);
+    //printf("text: {%s}\n", ui_gettext(event->obj, "text"));
+    //fflush(stdout);
+    //
+    //char *file = ui_openfiledialog(event->obj);
+    ////printf("file: %s\n", file);
+    //fflush(stdout);
+    //free(file);
 }
 
 void action_button(UiEvent *event, void *data) {
@@ -59,10 +59,11 @@
 UiTextLayout *text;
 
 void action_scroll(UiEvent *event, void *data) {
-    ui_drawingarea_redraw(drawingarea);
+    //ui_drawingarea_redraw(drawingarea);
     printf("scroll\n");
 }
 
+/*
 void draw(UiEvent *event, UiGraphics *g, void *data) {
     double adjust = range.get(&range);
     
@@ -95,6 +96,7 @@
     
     //ui_text_free(text);
     //*/
+    /*
 }
 
 void* model_getval(void *obj, int col) {
@@ -120,6 +122,7 @@
 void window_close(UiEvent *event, void *data) {
     printf("window close\n");
 }
+*/
 
 int main(int argc, char** argv) { 
     ui_init("app1", argc, argv);
@@ -139,21 +142,16 @@
     ui_submenu_end();
     ui_menuitem("item4", NULL, NULL);
     
-    ui_toolitem("button1", "Test", action_button, NULL);
-    ui_toolitem("button2", "OK", action_button, NULL);
-    ui_toolbar_combobox_str("combo", list, NULL, NULL);
-    ui_toolbar_add_default("button1");
-    ui_toolbar_add_default("button2");
-    ui_toolbar_add_default("combo");
+    //ui_toolitem("button1", "Test", action_button, NULL);
+    //ui_toolitem("button2", "OK", action_button, NULL);
+    //ui_toolbar_combobox_str("combo", list, NULL, NULL);
+    //ui_toolbar_add_default("button1");
+    //ui_toolbar_add_default("button2");
+    //ui_toolbar_add_default("combo");
     
     UiObject *obj = ui_window("Test", NULL);
-    ui_context_closefunc(obj->ctx, window_close, NULL);
-    
-///*
-    UiModelInfo *modeldesc = ui_model_info(obj->ctx, UI_ICON_TEXT, "Name", UI_STRING, "Mail", -1);
-    modeldesc->getvalue = model_getval;
-    ui_table(obj, list, modeldesc);
-//*/
+    //ui_context_closefunc(obj->ctx, window_close, NULL);
+
     
     ui_show(obj);
     ui_main();

mercurial