static void _emphasis_init_player_small(Emphasis_Player_Gui *player) { Etk_Widget *wid; /* controls */ wid = etk_window_new(); etk_window_wmclass_set(ETK_WINDOW(wid), "emphasis controls", "Emphasis"); etk_window_title_set(ETK_WINDOW(wid), "Controls"); etk_window_resize(ETK_WINDOW(wid), 10, 180); etk_widget_hide(wid); etk_signal_connect("delete-event", ETK_OBJECT(wid), ETK_CALLBACK(cb_pack_quit), player); //etk_signal_connect_after("delete-event", ETK_OBJECT(wid), // ETK_CALLBACK(etk_main_quit), NULL); player->small.ctr.window = wid; /* controls */ wid = etk_window_new(); etk_window_wmclass_set(ETK_WINDOW(wid), "emphasis cover", "Emphasis"); etk_window_title_set(ETK_WINDOW(wid), "Cover"); etk_window_resize(ETK_WINDOW(wid), 180, 180); etk_widget_hide(wid); etk_signal_connect("delete-event", ETK_OBJECT(wid), ETK_CALLBACK(cb_pack_quit), player); //etk_signal_connect_after("delete-event", ETK_OBJECT(wid), // ETK_CALLBACK(etk_main_quit), NULL); player->small.cov.window = wid; player->small.packed = ETK_TRUE; }
main_window* mainwindow_create() {/*{{{*/ Etk_Widget *hbox,*scroll; main_window* win; win=(main_window*)malloc((unsigned int)sizeof(main_window)); win->win = etk_window_new(); etk_window_title_set(ETK_WINDOW(win->win), _("Exalt: network manager")); etk_window_wmclass_set(ETK_WINDOW(win->win),"Exalt_network_manager","Exalt_network_manager"); etk_window_resize(ETK_WINDOW(win->win), 623,268); etk_signal_connect("delete-event", ETK_OBJECT(win->win), ETK_CALLBACK( mainWindow_close), win); hbox = etk_hbox_new(ETK_FALSE, 5); etk_container_add(ETK_CONTAINER(win->win), hbox); scroll = etk_scrolled_view_new (); etk_box_append(ETK_BOX(hbox), scroll, ETK_BOX_START, ETK_BOX_FILL, 0); etk_widget_show(scroll); win->eth_list = etk_tree_new(); etk_widget_size_request_set(win->eth_list, 120, 50); win->eth_col0 = etk_tree_col_new(ETK_TREE(win->eth_list), _("Interfaces"), 80, 0.0); etk_tree_col_model_add(win->eth_col0, etk_tree_model_image_new()); etk_tree_col_model_add(win->eth_col0, etk_tree_model_text_new()); etk_tree_rows_height_set(ETK_TREE(win->eth_list),40); etk_tree_mode_set(ETK_TREE(win->eth_list), ETK_TREE_MODE_LIST); etk_tree_build(ETK_TREE(win->eth_list)); etk_container_add(ETK_CONTAINER(scroll), win->eth_list); etk_signal_connect("row-clicked", ETK_OBJECT(win->eth_list),ETK_CALLBACK(mainWindow_ethList_row_clicked_cb), win); //add the general panel in the list etk_tree_row_append(ETK_TREE(win->eth_list), NULL, win->eth_col0,PACKAGE_DATA_DIR ICONS_NETWORK_CONFIG,NULL,_("General") , NULL); //attach the add callback function to exalt exalt_eth_set_cb(mainWindow_eth_cb, win); etk_widget_show_all(win->win); win->eth_panel = ethpanel_create(win); etk_box_append(ETK_BOX(hbox),win->eth_panel->frame , ETK_BOX_START, ETK_BOX_EXPAND_FILL, 0); win->wireless_panel = wirelesspanel_create(win); etk_box_append(ETK_BOX(hbox),win->wireless_panel->frame , ETK_BOX_START, ETK_BOX_EXPAND_FILL, 0); win->general_panel = generalpanel_create(); etk_box_append(ETK_BOX(hbox),win->general_panel->frame , ETK_BOX_START, ETK_BOX_EXPAND_FILL, 0); //launch the timer to update the network state //win->eth_state_timer = ecore_timer_add(MAINWINDOW_ETH_STATE_TIME_MAX ,mainWindow_eth_state_timer,win); return win; }/*}}}*/
/* Creates the window for the mdi test */ void etk_test_mdi_window_window_create(void *data) { static Etk_Widget *win = NULL; Etk_Widget *mdi_area; Etk_Widget *mdi_window; Etk_Widget *down_image; Etk_Widget *next_image; Etk_Widget *prev_image; Etk_Widget *up_image; Etk_Widget *table; if (win) { etk_widget_show_all(ETK_WIDGET(win)); return; } win = etk_window_new(); etk_window_resize(ETK_WINDOW(win), 300, 300); etk_window_title_set(ETK_WINDOW(win), "Etk Mdi Window Test"); etk_container_border_width_set(ETK_CONTAINER(win), 5); etk_signal_connect_by_code(ETK_WINDOW_DELETE_EVENT_SIGNAL, ETK_OBJECT(win), ETK_CALLBACK(etk_window_hide_on_delete), NULL); down_image = etk_image_new_from_stock(ETK_STOCK_GO_DOWN, ETK_STOCK_BIG); next_image = etk_image_new_from_stock(ETK_STOCK_GO_NEXT, ETK_STOCK_BIG); prev_image = etk_image_new_from_stock(ETK_STOCK_GO_PREVIOUS, ETK_STOCK_BIG); up_image = etk_image_new_from_stock(ETK_STOCK_GO_UP, ETK_STOCK_BIG); table = etk_table_new(3, 3, ETK_TABLE_NOT_HOMOGENEOUS); etk_container_add(ETK_CONTAINER(win), table); etk_table_attach(ETK_TABLE(table), down_image, 0, 2, 0, 0, ETK_TABLE_NONE, 0, 0); etk_table_attach(ETK_TABLE(table), next_image, 0, 0, 1, 1, ETK_TABLE_NONE, 0, 0); etk_table_attach(ETK_TABLE(table), prev_image, 2, 2, 1, 1, ETK_TABLE_NONE, 0, 0); etk_table_attach(ETK_TABLE(table), up_image, 0, 2, 2, 2, ETK_TABLE_NONE, 0, 0); mdi_area = etk_mdi_area_new(); etk_table_attach_default(ETK_TABLE(table), mdi_area, 1, 1, 1, 1); mdi_window = etk_mdi_window_new(); etk_mdi_window_title_set(ETK_MDI_WINDOW(mdi_window), "Mdi Window 1"); etk_widget_size_request_set(ETK_WIDGET(mdi_window), 100, 100); etk_container_add(ETK_CONTAINER(mdi_area), mdi_window); mdi_window = etk_mdi_window_new(); etk_mdi_window_title_set(ETK_MDI_WINDOW(mdi_window), "Mdi Window 2"); etk_mdi_window_move(ETK_MDI_WINDOW(mdi_window), 100, 100); etk_widget_size_request_set(ETK_WIDGET(mdi_window), 100, 100); etk_container_add(ETK_CONTAINER(mdi_area), mdi_window); etk_widget_show_all(win); }
/* Called when mouse presses the resize grip and when the mouse is moved */ static Etk_Bool _etk_statusbar_mouse_move_cb(Etk_Object *object, Etk_Event_Mouse_Move *event, void *data) { Etk_Statusbar *statusbar; Etk_Toplevel *window; if (!(statusbar = ETK_STATUSBAR(object))) return ETK_TRUE; if (!(window = etk_widget_toplevel_parent_get(ETK_WIDGET(statusbar))) || !ETK_IS_WINDOW(window)) return ETK_TRUE; statusbar->window_width += event->cur.widget.x - event->prev.widget.x; statusbar->window_height += event->cur.widget.y - event->prev.widget.y; etk_window_resize(ETK_WINDOW(window), statusbar->window_width, statusbar->window_height); return ETK_TRUE; }
void show_midi_window_control(void *data){ Etk_Widget *vbox, *vbox1, *hbox; Etk_Widget *frame; Etk_Widget *button; Etk_Widget *label; Etk_Combobox_Item *item; control_port_t * control_port; control_port = (control_port_t *)data; mydata = data; midi_t * midibinding; printf("tenative midi connection to ** %s \n", control_port->control_port_name); if (midi_win_control){ etk_widget_show(ETK_WIDGET(midi_win_control)); return; } midi_win_control = etk_window_new(); etk_window_title_set(ETK_WINDOW(midi_win_control), "Set this controls Midi Properties"); etk_window_resize(ETK_WINDOW(midi_win_control), 200, 0); etk_signal_connect("delete-event", ETK_OBJECT(midi_win_control), ETK_CALLBACK(etk_window_hide_on_delete), NULL); vbox = etk_vbox_new(ETK_FALSE, 0); etk_container_add(ETK_CONTAINER(midi_win_control), vbox); frame = etk_frame_new("Set Midi Binding for Control"); etk_box_append(ETK_BOX(vbox), frame, ETK_BOX_START, ETK_BOX_EXPAND_FILL, 5); hbox = etk_hbox_new(ETK_FALSE, 0); etk_container_add(ETK_CONTAINER(frame), hbox); label = etk_label_new("select control change ch#"); etk_box_append(ETK_BOX(hbox), label, ETK_BOX_START, ETK_BOX_NONE, 3); spinnerControl = etk_spinner_new(1.0, 16.0, 1, 1.0, 5.0); etk_box_append(ETK_BOX(hbox), spinnerControl, ETK_BOX_START, ETK_BOX_NONE, 7); etk_signal_connect("value-changed", ETK_OBJECT(spinnerControl), ETK_CALLBACK(_ex_changed_value_control), 3); button = etk_button_new_with_label("Add Binding"); etk_box_append(ETK_BOX(vbox), button, ETK_BOX_START, ETK_BOX_NONE, 0); etk_signal_connect("clicked", ETK_OBJECT(button), _ex_Binding_Control, mydata); button = etk_button_new_with_label("Remove Binding"); etk_box_append(ETK_BOX(vbox), button, ETK_BOX_START, ETK_BOX_NONE, 0); etk_signal_connect("clicked", ETK_OBJECT(button), _ex_Remove_Binding_Control, mydata); etk_widget_show_all(midi_win_control); }
/* Creates the window for the iconbox test */ void etk_test_iconbox_window_create(void *data) { Etk_Widget *iconbox; if (win) { etk_widget_show_all(ETK_WIDGET(win)); return; } win = etk_window_new(); etk_window_title_set(ETK_WINDOW(win), "Etk Iconbox Test"); etk_window_resize(ETK_WINDOW(win), 600, 330); etk_signal_connect_by_code(ETK_WINDOW_DELETE_EVENT_SIGNAL, ETK_OBJECT(win), ETK_CALLBACK(etk_window_hide_on_delete), NULL); iconbox = etk_iconbox_new(); etk_iconbox_emblem_position_set(ETK_ICONBOX(iconbox), ETK_ICONBOX_EMBLEM_POSITION_TL); etk_container_add(ETK_CONTAINER(win), iconbox); etk_signal_connect_by_code(ETK_WIDGET_MOUSE_DOWN_SIGNAL, ETK_OBJECT(iconbox), ETK_CALLBACK(_etk_test_iconbox_mouse_down_cb), NULL); _etk_test_iconbox_folder_set(ETK_ICONBOX(iconbox), NULL); etk_widget_show_all(win); }
Etk_Widget* image_browser_create(void) { Etk_Widget *hbox, *vbox, *vbox2; Etk_Widget *button; Etk_Widget *frame; Etk_Widget *label; Etk_Widget *image; //ImageBrowserWin UI_ImageBrowserWin = etk_window_new(); etk_window_title_set(ETK_WINDOW(UI_ImageBrowserWin), "Image Browser"); etk_window_resize(ETK_WINDOW(UI_ImageBrowserWin), 590, 370); etk_signal_connect("delete-event", ETK_OBJECT(UI_ImageBrowserWin), ETK_CALLBACK(etk_window_hide_on_delete), NULL); etk_container_border_width_set(ETK_CONTAINER(UI_ImageBrowserWin), 5); hbox = etk_hbox_new(ETK_FALSE, 0); etk_container_add (ETK_CONTAINER(UI_ImageBrowserWin), hbox); //ImageBrowserIconbox UI_ImageBrowserIconbox = etk_iconbox_new(); etk_signal_connect("icon-selected", ETK_OBJECT(UI_ImageBrowserIconbox), ETK_CALLBACK(_image_browser_iconbox_selected_cb), NULL); etk_box_append(ETK_BOX(hbox), UI_ImageBrowserIconbox, ETK_BOX_START, ETK_BOX_EXPAND_FILL, 0); vbox = etk_vbox_new(ETK_FALSE, 0); etk_box_append (ETK_BOX(hbox), vbox, ETK_BOX_START, ETK_BOX_NONE, 5); //AddImageButton button = etk_button_new_from_stock(ETK_STOCK_DOCUMENT_OPEN); etk_object_properties_set(ETK_OBJECT(button), "label","Import image",NULL); etk_button_style_set(ETK_BUTTON(button), ETK_BUTTON_BOTH_VERT); etk_signal_connect("clicked", ETK_OBJECT(button), ETK_CALLBACK(_window_all_button_click_cb), (void*)TOOLBAR_IMAGE_FILE_ADD); etk_box_append(ETK_BOX(vbox), button, ETK_BOX_START, ETK_BOX_NONE, 0); //DeleteImageButton button = etk_button_new_from_stock(ETK_STOCK_EDIT_DELETE); etk_object_properties_set(ETK_OBJECT(button), "label","Remove image",NULL); etk_button_style_set(ETK_BUTTON(button), ETK_BUTTON_BOTH_VERT); etk_widget_disabled_set(button, 1); etk_box_append(ETK_BOX(vbox), button, ETK_BOX_START, ETK_BOX_NONE, 0); //EditImageButton button = etk_button_new_with_label("Edit Image"); image = etk_image_new_from_edje(EdjeFile, "GIMP.PNG"); etk_button_image_set(ETK_BUTTON(button), ETK_IMAGE(image)); etk_button_style_set(ETK_BUTTON(button), ETK_BUTTON_BOTH_VERT); etk_widget_disabled_set(button, 1); etk_box_append(ETK_BOX(vbox), button, ETK_BOX_START, ETK_BOX_NONE, 0); //ImageInfo frame = etk_frame_new("Image Info"); etk_box_append(ETK_BOX(vbox), frame, ETK_BOX_START, ETK_BOX_EXPAND_FILL, 10); vbox2 = etk_vbox_new(ETK_FALSE, 0); etk_container_add(ETK_CONTAINER(frame), vbox2); label = etk_label_new("<b>name:</b>"); etk_box_append(ETK_BOX(vbox2), label, ETK_BOX_START, ETK_BOX_NONE, 0); label = etk_label_new("Unknow"); etk_box_append(ETK_BOX(vbox2), label, ETK_BOX_START, ETK_BOX_NONE, 0); label = etk_label_new(" "); etk_box_append(ETK_BOX(vbox2), label, ETK_BOX_START, ETK_BOX_NONE, 0); UI_ImageBrowserSizeLabel = etk_label_new("<b>size:</b> Unknow"); etk_object_properties_set(ETK_OBJECT(UI_ImageBrowserSizeLabel), "xalign", 0, NULL); etk_box_append(ETK_BOX(vbox2), UI_ImageBrowserSizeLabel, ETK_BOX_START, ETK_BOX_NONE, 0); label = etk_label_new("<b>comp:</b> Unknow"); etk_box_append(ETK_BOX(vbox2), label, ETK_BOX_START, ETK_BOX_NONE, 0); //CloseButton button = etk_button_new_from_stock(ETK_STOCK_DIALOG_CLOSE); etk_button_style_set(ETK_BUTTON(button), ETK_BUTTON_BOTH_VERT); etk_signal_connect("clicked", ETK_OBJECT(button), ETK_CALLBACK(_window_all_button_click_cb), (void*)IMAGE_BROWSER_CLOSE); etk_box_append(ETK_BOX(vbox), button, 0, ETK_BOX_NONE, 0); return UI_ImageBrowserWin; }
entropy_gui_component_instance * entropy_plugin_layout_create (entropy_core * core) { Etk_Widget *window; entropy_layout_gui *gui; entropy_gui_component_instance *layout; void *(*local_plugin_init) (entropy_core * core, entropy_gui_component_instance *, void *data); entropy_plugin *local; entropy_plugin *meta; entropy_plugin *hover; entropy_plugin *trackback; entropy_gui_component_instance* meta_instance; entropy_gui_component_instance* hover_instance; Etk_Tree_Col* col; Etk_Widget* vbox; Etk_Widget* menubar; Etk_Widget* menu_item; Etk_Widget* menu; Eina_List* structures; Entropy_Config_Structure* structure; int local_viewer_selected = 0; /*Entropy related init */ layout = (entropy_gui_component_instance*)entropy_gui_component_instance_layout_new(); /*Create a component instance */ gui = entropy_malloc (sizeof (entropy_layout_gui)); layout->data = gui; layout->core = core; gui->progress_hash = ecore_hash_new(ecore_direct_hash, ecore_direct_compare); gui->properties_request_hash = ecore_hash_new(ecore_direct_hash, ecore_direct_compare); /*Global init for all layouts*/ if (!_etk_layout_global_init) { /*Request metadata groups from evfs*/ entropy_plugin_filesystem_metadata_groups_get(layout); _etk_layout_row_reference = ecore_hash_new(ecore_direct_hash, ecore_direct_compare); _etk_layout_structure_plugin_reference = ecore_hash_new(ecore_direct_hash, ecore_direct_compare); _etk_layout_global_init = 1; } /*Register this layout container with the core, so our children can get events */ entropy_core_layout_register (core, layout); /*Register this instance (the layout itself), to receive events that can be safely handled * by the layout (and reduce the clutter in the child plugins) * i.e. PROGRESS events, Stat for properties, Overwrite yes/no/etc events, etc*/ /*Handle progress events*/ entropy_core_component_event_register (layout, entropy_core_gui_event_get (ENTROPY_GUI_EVENT_FILE_PROGRESS)); /*We want to know if the backend needs feedback */ entropy_core_component_event_register (layout, entropy_core_gui_event_get (ENTROPY_GUI_EVENT_USER_INTERACTION_YES_NO_ABORT)); /*We want to know if a stat is an 'extended stat' - e.g. a properties dialog etc */ entropy_core_component_event_register (layout, entropy_core_gui_event_get (ENTROPY_GUI_EVENT_EXTENDED_STAT)); entropy_core_component_event_register (layout, entropy_core_gui_event_get (ENTROPY_GUI_EVENT_FILE_STAT)); entropy_core_component_event_register (layout, entropy_core_gui_event_get (ENTROPY_GUI_EVENT_FILE_STAT_AVAILABLE)); entropy_core_component_event_register (layout, entropy_core_gui_event_get (ENTROPY_GUI_EVENT_METADATA_GROUPS)); entropy_core_component_event_register (layout, entropy_core_gui_event_get (ENTROPY_GUI_EVENT_PASTE_REQUEST)); entropy_core_component_event_register (layout, entropy_core_gui_event_get (ENTROPY_GUI_EVENT_AUTH_REQUEST)); entropy_core_component_event_register (layout, entropy_core_gui_event_get (ENTROPY_GUI_EVENT_META_ALL_REQUEST)); /*Etk related init */ window = etk_window_new (); layout->gui_object = window; etk_signal_connect("key-down", ETK_OBJECT(window), ETK_CALLBACK(_entropy_etk_layout_key_down_cb), layout); gui->paned = etk_hpaned_new(); etk_signal_connect ("delete-event", ETK_OBJECT (window), ETK_CALLBACK (_etk_window_deleted_cb), layout); etk_window_title_set(ETK_WINDOW(window), "Entropy"); etk_window_wmclass_set(ETK_WINDOW(window), "entropy", "Entropy"); vbox = etk_vbox_new(ETK_FALSE,0); etk_container_add(ETK_CONTAINER(window), vbox); /*Tree init*/ gui->tree = etk_tree_new(); gui->tree_shell = etk_vbox_new(ETK_FALSE,0); etk_box_append(ETK_BOX(gui->tree_shell), gui->tree, ETK_BOX_START, ETK_BOX_EXPAND_FILL, 0); etk_paned_child1_set(ETK_PANED(gui->paned), gui->tree_shell, ETK_FALSE); etk_tree_mode_set(ETK_TREE(gui->tree), ETK_TREE_MODE_TREE); col = etk_tree_col_new(ETK_TREE(gui->tree), _("Folders"), 60,0.0); etk_tree_col_model_add(col, etk_tree_model_image_new()); etk_tree_col_model_add(col, etk_tree_model_text_new()); etk_tree_col_expand_set(col, ETK_TRUE); etk_tree_build(ETK_TREE(gui->tree)); etk_widget_size_request_set(ETK_WIDGET(gui->tree), ENTROPY_ETK_WINDOW_PANE_DEFAULT_X, 50); /*Register to receive events related to the treeview config*/ entropy_config_misc_callback_register("general.treeviewer", _entropy_layout_etk_simple_config_cb, gui); /*If we're configured not to show tree on start, don't show*/ if (!entropy_config_misc_is_set("general.treeviewer")) { entropy_etk_layout_tree_show(gui,0); } else { etk_paned_position_set(ETK_PANED(gui->paned), ENTROPY_ETK_WINDOW_PANE_DEFAULT_X); } /*LocalShell Init*/ gui->localshell = etk_vbox_new(ETK_TRUE,0); etk_paned_child2_set(ETK_PANED(gui->paned), gui->localshell, ETK_TRUE); /*Trackback container init*/ gui->trackback_shell = etk_vbox_new(ETK_TRUE,0); /*Popup init*/ gui->popup = etk_menu_new(); etk_signal_connect("row-clicked", ETK_OBJECT( gui->tree ), ETK_CALLBACK(_etk_layout_row_clicked), layout); menu_item = _entropy_etk_menu_item_new(ETK_MENU_ITEM_NORMAL, _("Delete this location"), ETK_STOCK_DOCUMENT_OPEN, ETK_MENU_SHELL(gui->popup),NULL); etk_signal_connect("activated", ETK_OBJECT(menu_item), ETK_CALLBACK(_etk_layout_location_delete_confirm_cb), layout); menu_item = _entropy_etk_menu_item_new(ETK_MENU_ITEM_NORMAL, _("Add a new location"), ETK_STOCK_DOCUMENT_OPEN, ETK_MENU_SHELL(gui->popup),NULL); for (structures = entropy_config_standard_structures_parse (layout, NULL); structures; ) { structure = structures->data; layout_etk_simple_add_header (layout,structure); structures = structures->next; } /*Initialise the list view*/ local = entropy_plugin_gui_get_by_name_toolkit(ENTROPY_TOOLKIT_ETK, "listviewer"); if (local) { local_plugin_init = dlsym (local->dl_ref, "entropy_plugin_gui_instance_new"); gui->list_viewer = (*local_plugin_init)(core, layout,NULL); gui->list_viewer->plugin = local; if (entropy_config_misc_is_set("general.listviewer")) { gui->list_viewer->active=1; local_viewer_selected = 1; etk_widget_show(gui->list_viewer->gui_object); etk_box_append(ETK_BOX(gui->localshell), gui->list_viewer->gui_object, ETK_BOX_START, ETK_BOX_EXPAND_FILL, 0); } else { gui->list_viewer->active=0; etk_widget_show(gui->list_viewer->gui_object); } } /*Initialise the icon viewer*/ /*Initialise the list view*/ local = entropy_plugin_gui_get_by_name_toolkit(ENTROPY_TOOLKIT_ETK, "iconviewer"); if (local) { local_plugin_init = dlsym (local->dl_ref, "entropy_plugin_gui_instance_new"); gui->iconbox_viewer = (*local_plugin_init)(core, layout,NULL); gui->iconbox_viewer->plugin = local; if (entropy_config_misc_is_set("general.iconviewer")) { gui->iconbox_viewer->active=1; local_viewer_selected = 1; etk_widget_show(gui->iconbox_viewer->gui_object); etk_box_append(ETK_BOX(gui->localshell), gui->iconbox_viewer->gui_object, ETK_BOX_START, ETK_BOX_EXPAND_FILL, 0); } else { gui->iconbox_viewer->active=0; etk_widget_show(gui->iconbox_viewer->gui_object); } } /*Initialise the metadata plugin*/ meta = entropy_plugins_type_get_first(ENTROPY_PLUGIN_GUI_COMPONENT, ENTROPY_PLUGIN_GUI_COMPONENT_INFO_PROVIDER); if (meta) { local_plugin_init = dlsym(meta->dl_ref, "entropy_plugin_gui_instance_new"); meta_instance = (*local_plugin_init)(core,layout,NULL); meta_instance->plugin = meta; } /*Initialise the hover viewer*/ hover = entropy_plugins_type_get_first(ENTROPY_PLUGIN_GUI_COMPONENT, ENTROPY_PLUGIN_GUI_COMPONENT_HOVER_PROVIDER); if (hover) { local_plugin_init = dlsym(hover->dl_ref, "entropy_plugin_gui_instance_new"); hover_instance = (*local_plugin_init)(core,layout,NULL); hover_instance->plugin = hover; } /*Initialise the trackback*/ trackback = entropy_plugin_gui_get_by_name_toolkit(ENTROPY_TOOLKIT_ETK, "trackback"); if (trackback) { local_plugin_init = dlsym (trackback->dl_ref, "entropy_plugin_gui_instance_new"); gui->trackback = (*local_plugin_init)(core, layout,NULL); gui->trackback->plugin = trackback; gui->trackback->active=1; if (entropy_config_misc_is_set("general.trackback")) { etk_box_append(ETK_BOX(gui->trackback_shell), gui->trackback->gui_object, ETK_BOX_START, ETK_BOX_NONE, 0); } entropy_config_misc_callback_register("general.trackback", _entropy_layout_etk_simple_config_cb, gui); } /*Menu setup*/ menubar = etk_menu_bar_new(); /*File menu*/ menu_item = _entropy_etk_menu_item_new(ETK_MENU_ITEM_NORMAL, _("File"), ETK_STOCK_NO_STOCK, ETK_MENU_SHELL(menubar), NULL); menu = etk_menu_new(); etk_menu_item_submenu_set(ETK_MENU_ITEM(menu_item), ETK_MENU(menu)); menu_item = _entropy_etk_menu_item_new(ETK_MENU_ITEM_NORMAL, _("Exit"), ETK_STOCK_SYSTEM_SHUTDOWN, ETK_MENU_SHELL(menu), NULL); etk_signal_connect("activated", ETK_OBJECT(menu_item), ETK_CALLBACK(etk_layout_simple_exit_cb), layout); /*Edit menu*/ menu_item = _entropy_etk_menu_item_new(ETK_MENU_ITEM_NORMAL, _("Edit"), ETK_STOCK_NO_STOCK, ETK_MENU_SHELL(menubar), NULL); menu = etk_menu_new(); etk_menu_item_submenu_set(ETK_MENU_ITEM(menu_item), ETK_MENU(menu)); menu_item = _entropy_etk_menu_item_new(ETK_MENU_ITEM_NORMAL, _("Cut"), ETK_STOCK_EDIT_CUT, ETK_MENU_SHELL(menu), NULL); etk_signal_connect("activated", ETK_OBJECT(menu_item), ETK_CALLBACK(_entropy_layout_etk_cut_cb), layout); menu_item = _entropy_etk_menu_item_new(ETK_MENU_ITEM_NORMAL, _("Copy"), ETK_STOCK_EDIT_COPY, ETK_MENU_SHELL(menu), NULL); etk_signal_connect("activated", ETK_OBJECT(menu_item), ETK_CALLBACK(_entropy_layout_etk_copy_cb), layout); menu_item = _entropy_etk_menu_item_new(ETK_MENU_ITEM_NORMAL, _("Paste"), ETK_STOCK_EDIT_PASTE, ETK_MENU_SHELL(menu), NULL); etk_signal_connect("activated", ETK_OBJECT(menu_item), ETK_CALLBACK(_entropy_layout_etk_paste_cb), layout); /*Tools menu*/ menu_item = _entropy_etk_menu_item_new(ETK_MENU_ITEM_NORMAL, _("Tools"), ETK_STOCK_NO_STOCK, ETK_MENU_SHELL(menubar), NULL); menu = etk_menu_new(); etk_menu_item_submenu_set(ETK_MENU_ITEM(menu_item), ETK_MENU(menu)); menu_item = _entropy_etk_menu_item_new(ETK_MENU_ITEM_NORMAL, _("Add Location"), ETK_STOCK_ADDRESS_BOOK_NEW, ETK_MENU_SHELL(menu), NULL); etk_signal_connect("activated", ETK_OBJECT(menu_item), ETK_CALLBACK(_location_add_cb), layout); menu_item = _entropy_etk_menu_item_new(ETK_MENU_ITEM_NORMAL, _("eFolder Wizard.."), ETK_STOCK_ADDRESS_BOOK_NEW, ETK_MENU_SHELL(menu), NULL); etk_signal_connect("activated", ETK_OBJECT(menu_item), ETK_CALLBACK(_entropy_etk_efolder_dialog_show_cb), layout); menu_item = _entropy_etk_menu_item_new(ETK_MENU_ITEM_NORMAL, _("Program Associations.."), ETK_STOCK_EMBLEM_SYMBOLIC_LINK, ETK_MENU_SHELL(menu), NULL); etk_signal_connect("activated", ETK_OBJECT(menu_item), ETK_CALLBACK(etk_mime_dialog_cb), layout); menu_item = _entropy_etk_menu_item_new(ETK_MENU_ITEM_NORMAL, _("Options.."), ETK_STOCK_EMBLEM_SYMBOLIC_LINK, ETK_MENU_SHELL(menu), NULL); etk_signal_connect("activated", ETK_OBJECT(menu_item), ETK_CALLBACK(entropy_etk_options_dialog_cb), layout); /*View menu*/ menu_item = _entropy_etk_menu_item_new(ETK_MENU_ITEM_NORMAL, _("View"), ETK_STOCK_NO_STOCK, ETK_MENU_SHELL(menubar), NULL); menu = etk_menu_new(); etk_menu_item_submenu_set(ETK_MENU_ITEM(menu_item), ETK_MENU(menu)); gui->tree_view_menu = _entropy_etk_menu_check_item_new(_("Tree View"), ETK_MENU_SHELL(menu)); if (entropy_config_misc_is_set("general.treeviewer")) { etk_menu_item_check_active_set(ETK_MENU_ITEM_CHECK(gui->tree_view_menu),ETK_TRUE ); } etk_signal_connect("activated", ETK_OBJECT(gui->tree_view_menu), ETK_CALLBACK(entropy_etk_layout_tree_cb), layout); menu_item = _entropy_etk_menu_check_item_new(_("Trackback view"), ETK_MENU_SHELL(menu)); if (entropy_config_misc_is_set("general.trackback")) { etk_menu_item_check_active_set(ETK_MENU_ITEM_CHECK(menu_item), ETK_TRUE); } etk_signal_connect("activated", ETK_OBJECT(menu_item), ETK_CALLBACK(entropy_etk_layout_trackback_cb), layout); _entropy_etk_menu_item_new(ETK_MENU_ITEM_SEPARATOR, NULL, ETK_STOCK_NO_STOCK, ETK_MENU_SHELL(menu), NULL); menu_item = _entropy_etk_radio_item_new(_("List View (Alt-l)"), NULL, ETK_MENU_SHELL(menu)); etk_object_data_set(ETK_OBJECT(menu_item), "VISUAL", gui->list_viewer); etk_signal_connect("activated", ETK_OBJECT(menu_item), ETK_CALLBACK(etk_local_viewer_cb), layout); if (entropy_config_misc_is_set("general.listviewer")) { etk_menu_item_check_active_set(ETK_MENU_ITEM_CHECK(menu_item), ETK_TRUE); } menu_item = _entropy_etk_radio_item_new(_("Icon View (Alt-i)"), ETK_MENU_ITEM_RADIO(menu_item), ETK_MENU_SHELL(menu)); etk_object_data_set(ETK_OBJECT(menu_item), "VISUAL", gui->iconbox_viewer); etk_signal_connect("activated", ETK_OBJECT(menu_item), ETK_CALLBACK(etk_local_viewer_cb), layout); if (entropy_config_misc_is_set("general.iconviewer")) { etk_menu_item_check_active_set(ETK_MENU_ITEM_CHECK(menu_item), ETK_TRUE); } /*Debug menu*/ /*menu_item = _entropy_etk_menu_item_new(ETK_MENU_ITEM_NORMAL, _("Debug"), ETK_STOCK_NO_STOCK, ETK_MENU_SHELL(menubar), NULL); menu = etk_menu_new(); etk_menu_item_submenu_set(ETK_MENU_ITEM(menu_item), ETK_MENU(menu)); menu_item = _entropy_etk_menu_item_new(ETK_MENU_ITEM_NORMAL, _("File Cache"), ETK_STOCK_PLACES_FOLDER_SAVED_SEARCH, ETK_MENU_SHELL(menu), NULL); etk_signal_connect("activated", ETK_OBJECT(menu_item), ETK_CALLBACK(etk_file_cache_dialog_cb), layout);*/ /*Help menu*/ menu_item = _entropy_etk_menu_item_new(ETK_MENU_ITEM_NORMAL, _("Help"), ETK_STOCK_NO_STOCK, ETK_MENU_SHELL(menubar), NULL); menu = etk_menu_new(); etk_menu_item_submenu_set(ETK_MENU_ITEM(menu_item), ETK_MENU(menu)); menu_item = _entropy_etk_menu_item_new(ETK_MENU_ITEM_NORMAL, _("About.."), ETK_STOCK_HELP_BROWSER, ETK_MENU_SHELL(menu), NULL); etk_signal_connect("activated", ETK_OBJECT(menu_item), ETK_CALLBACK(entropy_etk_about_dialog_cb), layout); etk_box_append(ETK_BOX(vbox), menubar, ETK_BOX_START, ETK_BOX_NONE, 0); etk_box_append(ETK_BOX(vbox), gui->trackback_shell, ETK_BOX_START, ETK_BOX_NONE, 0); etk_box_append(ETK_BOX(vbox), gui->paned, ETK_BOX_START, ETK_BOX_EXPAND_FILL, 0); /*---------------------------*/ gui->statusbar_box = etk_hbox_new(ETK_TRUE, 0); etk_box_append(ETK_BOX(vbox), gui->statusbar_box, ETK_BOX_START, ETK_BOX_NONE, 0); gui->statusbars[0] = etk_statusbar_new(); etk_statusbar_has_resize_grip_set(ETK_STATUSBAR(gui->statusbars[0]), ETK_FALSE); etk_box_append(ETK_BOX(gui->statusbar_box), gui->statusbars[0], ETK_BOX_START, ETK_BOX_EXPAND_FILL, 0); gui->statusbars[1] = etk_statusbar_new(); etk_statusbar_has_resize_grip_set(ETK_STATUSBAR(gui->statusbars[1]), ETK_FALSE); etk_box_append(ETK_BOX(gui->statusbar_box), gui->statusbars[1], ETK_BOX_START, ETK_BOX_EXPAND_FILL, 0); gui->statusbars[2] = etk_statusbar_new(); etk_statusbar_has_resize_grip_set(ETK_STATUSBAR(gui->statusbars[2]), ETK_TRUE); etk_box_append(ETK_BOX(gui->statusbar_box), gui->statusbars[2], ETK_BOX_START, ETK_BOX_EXPAND_FILL, 0); etk_widget_show_all (window); /*Increment the window counter*/ _etk_layout_window_count++; etk_window_resize(ETK_WINDOW(window), ENTROPY_ETK_WINDOW_WIDTH, ENTROPY_ETK_WINDOW_HEIGHT); return layout; }
void show_midi_window(void *data){ Etk_Widget *vbox, *vbox1, *hbox; Etk_Widget *frame; Etk_Widget *button; Etk_Widget *label; Etk_Combobox_Item *item; midi_t * midibinding; if (midi_win){ etk_widget_show(ETK_WIDGET(midi_win)); return; } midibinding = (midi_t *)evas_list_nth(live_plugin->midi_data, (int)etk_tree_row_data_get(etk_tree_selected_row_get(rack_tree))-1); if(midibinding->channel != 0){ spinner_data = midibinding->channel; }else{ spinner_data = 1; } spinner1_data = midibinding->program; midi_win = etk_window_new(); etk_window_title_set(ETK_WINDOW(midi_win), "Set Midi Properties"); etk_window_resize(ETK_WINDOW(midi_win), 200, 0); etk_signal_connect("delete-event", ETK_OBJECT(midi_win), ETK_CALLBACK(etk_window_hide_on_delete), NULL); vbox = etk_vbox_new(ETK_FALSE, 0); etk_container_add(ETK_CONTAINER(midi_win), vbox); frame = etk_frame_new("Set Midi Binding for Rack State"); etk_box_append(ETK_BOX(vbox), frame, ETK_BOX_START, ETK_BOX_EXPAND_FILL, 5); hbox = etk_hbox_new(ETK_FALSE, 0); etk_container_add(ETK_CONTAINER(frame), hbox); label = etk_label_new("ch#"); etk_box_append(ETK_BOX(hbox), label, ETK_BOX_START, ETK_BOX_NONE, 3); spinner = etk_spinner_new(1.0, 16.0, midibinding->channel, 1.0, 5.0); etk_box_append(ETK_BOX(hbox), spinner, ETK_BOX_START, ETK_BOX_NONE, 7); etk_signal_connect("value-changed", ETK_OBJECT(spinner), ETK_CALLBACK(_ex_changed_value), 1); combobox = etk_combobox_new_default(); etk_box_append(ETK_BOX(hbox), combobox, ETK_BOX_START, ETK_BOX_NONE, 2); item = etk_combobox_item_append(ETK_COMBOBOX(combobox), "Program Change"); etk_combobox_item_data_set(item, 1); if(midibinding->type==1){ etk_combobox_active_item_set(combobox, item); } item = etk_combobox_item_append(ETK_COMBOBOX(combobox), "Control Change"); etk_combobox_item_data_set(item, 2); if(midibinding->type==2){ etk_combobox_active_item_set(combobox, item); } spinner1 = etk_spinner_new(0.0, 127.0, midibinding->program, 1.0, 5.0); etk_box_append(ETK_BOX(hbox), spinner1, ETK_BOX_START, ETK_BOX_NONE, 7); etk_signal_connect("value-changed", ETK_OBJECT(spinner1), ETK_CALLBACK(_ex_changed_value), 2); /* button = etk_button_new_with_label("Learn"); etk_box_append(ETK_BOX(hbox), button, ETK_BOX_START, ETK_BOX_NONE, 0); */ button = etk_button_new_with_label("Add Binding"); etk_box_append(ETK_BOX(vbox), button, ETK_BOX_START, ETK_BOX_NONE, 0); etk_signal_connect("clicked", ETK_OBJECT(button), _ex_Binding, data); etk_widget_show_all(midi_win); }
/* Creates the window for the tree test */ void etk_test_tree_window_create(void *data) { static Etk_Widget *win = NULL; Etk_Widget *vbox; Etk_Widget *hbox; Etk_Widget *tree; Etk_Widget *button; Etk_Tree_Col *col1, *col2, *col3, *col4, *col5, *col6; Etk_Tree_Row *row; Etk_Widget *statusbar; Etk_Color c_warn; char row_name[128]; const char *stock_key; int i, j; if (win) { etk_widget_show(ETK_WIDGET(win)); return; } /* Create the window and the vbox where the widgets will be packed into */ win = etk_window_new(); etk_window_title_set(ETK_WINDOW(win), "Etk Tree Test"); etk_window_resize(ETK_WINDOW(win), 640, 500); etk_signal_connect_by_code(ETK_WINDOW_DELETE_EVENT_SIGNAL, ETK_OBJECT(win), ETK_CALLBACK(etk_window_hide_on_delete), NULL); vbox = etk_vbox_new(ETK_FALSE, 0); etk_container_add(ETK_CONTAINER(win), vbox); /* Create the tree widget */ tree = etk_tree_new(); etk_tree_mode_set(ETK_TREE(tree), ETK_TREE_MODE_TREE); etk_scrolled_view_extra_vmargin_set(etk_tree_scrolled_view_get(ETK_TREE(tree)), 250); etk_scrolled_view_drag_bouncy_set(etk_tree_scrolled_view_get(ETK_TREE(tree)), ETK_BOUNCY_STOPTOOBJECT); etk_scrolled_view_dragable_set(etk_tree_scrolled_view_get(ETK_TREE(tree)), ETK_TRUE); etk_tree_multiple_select_set(ETK_TREE(tree), ETK_TRUE); etk_widget_padding_set(tree, 5, 5, 5, 5); etk_box_append(ETK_BOX(vbox), tree, ETK_BOX_START, ETK_BOX_EXPAND_FILL, 0); /* We first create the columns of the tree, and then we "build" the tree with etk_tree_build() */ col1 = etk_tree_col_new(ETK_TREE(tree), "Column 1", 130, 0.0); etk_tree_col_model_add(col1, etk_tree_model_image_new()); etk_tree_col_model_add(col1, etk_tree_model_text_new()); col2 = etk_tree_col_new(ETK_TREE(tree), "Column 2", 60, 1.0); etk_tree_col_model_add(col2, etk_tree_model_double_new()); col3 = etk_tree_col_new(ETK_TREE(tree), "Column 3", 80, 0.75); etk_tree_col_model_add(col3, etk_tree_model_int_new()); col4 = etk_tree_col_new(ETK_TREE(tree), "Column 4", 60, 0.0); etk_tree_col_model_add(col4, etk_tree_model_image_new()); col5 = etk_tree_col_new(ETK_TREE(tree), "Column 5", 60, 0.5); etk_tree_col_model_add(col5, etk_tree_model_checkbox_new()); col6 = etk_tree_col_new(ETK_TREE(tree), "Column 6", 60, 0.0); etk_tree_col_model_add(col6, etk_tree_model_progress_bar_new()); etk_tree_build(ETK_TREE(tree)); /* Then we add the rows to the tree. etk_tree_freeze/thaw() is used to improve * the speed when you insert a lot of rows. It is not really important if you * insert only some thousands of rows (here, we insert 3000 rows) */ etk_tree_freeze(ETK_TREE(tree)); etk_theme_color_get(NULL, ETK_COLOR_WARNING_FG, &c_warn.r, &c_warn.g, &c_warn.b, &c_warn.a); for (i = 0; i < 1000; i++) { sprintf(row_name, "Row %d", (i * 3) + 1); stock_key = etk_stock_key_get(ETK_STOCK_PLACES_USER_HOME, ETK_STOCK_SMALL); row = etk_tree_row_append(ETK_TREE(tree), NULL, col1, etk_theme_icon_path_get(), stock_key, row_name, col2, 0.57, col3, rand(), col4, PACKAGE_DATA_DIR "/images/1star.png", NULL, col5, ETK_FALSE, col6, 0.57, "57 %", NULL); for (j = 0; j < 3; j++) { Etk_Tree_Row *current; sprintf(row_name, "Row %d", (i * 3) + 2); stock_key = etk_stock_key_get(ETK_STOCK_PLACES_FOLDER, ETK_STOCK_SMALL); current = etk_tree_row_append(ETK_TREE(tree), row, col1, etk_theme_icon_path_get(), stock_key, row_name, col2, 20.0, col3, rand(), col4, PACKAGE_DATA_DIR "/images/2stars.png", NULL, col5, ETK_TRUE, col6, 0.20, "20 %", NULL); if (j == 2) row = current; } sprintf(row_name, "<font color=#%.2X%.2X%.2X%.2X>Row %d</font>", c_warn.r, c_warn.g, c_warn.b, c_warn.a, (i * 3) + 3); stock_key = etk_stock_key_get(ETK_STOCK_TEXT_X_GENERIC, ETK_STOCK_SMALL); etk_tree_row_append(ETK_TREE(tree), row, col1, etk_theme_icon_path_get(), stock_key, row_name, col2, 300.0, col3, 257, col4, PACKAGE_DATA_DIR "/images/3stars.png", NULL, col5, ETK_TRUE, NULL); } etk_tree_thaw(ETK_TREE(tree)); etk_tree_col_sort_set(col3, _etk_test_tree_compare_cb, NULL); hbox = etk_hbox_new(ETK_TRUE, 0); etk_box_append(ETK_BOX(vbox), hbox, ETK_BOX_START, ETK_BOX_FILL, 0); button = etk_button_new_with_label("Sort the tree"); etk_box_append(ETK_BOX(hbox), button, ETK_BOX_START, ETK_BOX_EXPAND, 0); etk_signal_connect_by_code(ETK_BUTTON_CLICKED_SIGNAL, ETK_OBJECT(button), ETK_CALLBACK(_etk_test_tree_sort_button_cb), col3); button = etk_button_new_with_label("Insert a sorted row"); etk_box_append(ETK_BOX(hbox), button, ETK_BOX_START, ETK_BOX_EXPAND, 0); etk_signal_connect_by_code(ETK_BUTTON_CLICKED_SIGNAL, ETK_OBJECT(button), ETK_CALLBACK(_etk_test_tree_insert_sorted_button_cb), ETK_TREE(tree)); button = etk_button_new_with_label("Select all"); etk_box_append(ETK_BOX(hbox), button, ETK_BOX_START, ETK_BOX_EXPAND, 0); etk_signal_connect_by_code(ETK_BUTTON_CLICKED_SIGNAL, ETK_OBJECT(button), ETK_CALLBACK(_etk_test_tree_select_all_cb), ETK_TREE(tree)); button = etk_button_new_with_label("Unselect all"); etk_box_append(ETK_BOX(hbox), button, ETK_BOX_START, ETK_BOX_EXPAND, 0); etk_signal_connect_by_code(ETK_BUTTON_CLICKED_SIGNAL, ETK_OBJECT(button), ETK_CALLBACK(_etk_test_tree_unselect_all_cb), ETK_TREE(tree)); /* Finally we create the statusbar used to display the events on the tree */ statusbar = etk_statusbar_new(); etk_box_append(ETK_BOX(vbox), statusbar, ETK_BOX_START, ETK_BOX_FILL, 0); etk_signal_connect_by_code(ETK_WIDGET_KEY_DOWN_SIGNAL, ETK_OBJECT(tree), ETK_CALLBACK(_etk_test_tree_key_down_cb), NULL); etk_signal_connect_by_code(ETK_TREE_ROW_CLICKED_SIGNAL, ETK_OBJECT(tree), ETK_CALLBACK(_etk_test_tree_row_clicked_cb), statusbar); etk_signal_connect_by_code(ETK_TREE_COL_CELL_VALUE_CHANGED_SIGNAL, ETK_OBJECT(col5), ETK_CALLBACK(_etk_test_tree_checkbox_toggled_cb), statusbar); etk_widget_show_all(win); }
/*** Implementation ***/ Etk_Widget* data_window_create(void) { Etk_Widget *hbox, *vbox, *hbox2, *vbox2, *vbox3; Etk_Tree_Col *col; Etk_Widget *button; Etk_Widget *frame; Etk_Widget *label; //DataWin UI_DataWin = etk_window_new(); etk_window_title_set(ETK_WINDOW(UI_DataWin), "Data Browser"); etk_window_resize(ETK_WINDOW(UI_DataWin), 400, 370); etk_signal_connect("delete-event", ETK_OBJECT(UI_DataWin), ETK_CALLBACK(etk_window_hide_on_delete), NULL); etk_container_border_width_set(ETK_CONTAINER(UI_DataWin), 5); vbox = etk_vbox_new(ETK_FALSE, 5); etk_container_add(ETK_CONTAINER(UI_DataWin), vbox); //Description label label = etk_label_new("Data stored inside the edje file that can be accessed by the application."); etk_object_properties_set(ETK_OBJECT(label), "xalign", 0.5, NULL); etk_box_append(ETK_BOX(vbox), label, ETK_BOX_START, ETK_BOX_NONE, 7); hbox = etk_hbox_new(ETK_TRUE, 5); etk_box_append(ETK_BOX(vbox), hbox, ETK_BOX_START, ETK_BOX_EXPAND_FILL, 0); vbox2 = etk_vbox_new(ETK_FALSE, 0); etk_box_append(ETK_BOX(hbox), vbox2, ETK_BOX_START, ETK_BOX_EXPAND_FILL, 0); //UI_DataList UI_DataList = etk_tree_new(); etk_tree_mode_set(ETK_TREE(UI_DataList), ETK_TREE_MODE_LIST); etk_widget_size_request_set(UI_DataList, 225, 200); etk_tree_headers_visible_set(ETK_TREE(UI_DataList), ETK_TRUE); etk_tree_column_separators_visible_set(ETK_TREE(UI_DataList), ETK_TRUE); etk_tree_alternating_row_colors_set(ETK_TREE(UI_DataList), ETK_TRUE); col = etk_tree_col_new(ETK_TREE(UI_DataList), "Name", 100, 0.0); etk_tree_col_model_add(col, etk_tree_model_text_new()); col = etk_tree_col_new(ETK_TREE(UI_DataList), "Value", 120, 0.0); etk_tree_col_model_add(col, etk_tree_model_text_new()); etk_tree_build(ETK_TREE(UI_DataList)); etk_box_append(ETK_BOX(vbox2), UI_DataList, ETK_BOX_START, ETK_BOX_EXPAND_FILL, 0); etk_signal_connect("row-selected", ETK_OBJECT(UI_DataList), ETK_CALLBACK(_data_list_row_selected_cb), NULL); hbox2 = etk_hbox_new(ETK_TRUE, 0); etk_box_append(ETK_BOX(vbox2), hbox2, ETK_BOX_START, ETK_BOX_NONE, 0); //AddDataButton button = etk_button_new_from_stock(ETK_STOCK_LIST_ADD); etk_button_style_set(ETK_BUTTON(button), ETK_BUTTON_ICON); etk_signal_connect("clicked", ETK_OBJECT(button), ETK_CALLBACK(_data_add_button_click_cb), NULL); etk_box_append(ETK_BOX(hbox2), button, ETK_BOX_START, ETK_BOX_EXPAND_FILL, 0); //DelDataButton button = etk_button_new_from_stock(ETK_STOCK_LIST_REMOVE); etk_button_style_set(ETK_BUTTON(button), ETK_BUTTON_ICON); etk_signal_connect("clicked", ETK_OBJECT(button), ETK_CALLBACK(_data_del_button_click_cb), NULL); etk_box_append(ETK_BOX(hbox2), button, ETK_BOX_START, ETK_BOX_EXPAND_FILL, 0); vbox2 = etk_vbox_new(ETK_FALSE, 0); etk_box_append(ETK_BOX(hbox), vbox2, ETK_BOX_START, ETK_BOX_EXPAND_FILL, 0); //Data Editor frame = etk_frame_new("Data Editor"); etk_box_append(ETK_BOX(vbox2), frame, ETK_BOX_START, ETK_BOX_FILL, 0); vbox3 = etk_vbox_new(ETK_FALSE, 0); etk_container_add(ETK_CONTAINER(frame), vbox3); //Name Entry label = etk_label_new("<b>Name</b>"); etk_box_append(ETK_BOX(vbox3), label, ETK_BOX_START, ETK_BOX_NONE, 0); UI_DataNameEntry = etk_entry_new(); //etk_widget_disabled_set(UI_DataNameEntry, ETK_TRUE); etk_box_append(ETK_BOX(vbox3), UI_DataNameEntry, ETK_BOX_START, ETK_BOX_EXPAND_FILL, 0); //Value Entry label = etk_label_new("<b>Value</b>"); etk_box_append(ETK_BOX(vbox3), label, ETK_BOX_START, ETK_BOX_NONE, 0); UI_DataValueEntry = etk_entry_new(); etk_box_append(ETK_BOX(vbox3), UI_DataValueEntry, ETK_BOX_START, ETK_BOX_EXPAND_FILL, 0); //Apply button UI_DataApplyButton =etk_button_new_from_stock(ETK_STOCK_DIALOG_APPLY); etk_signal_connect("clicked", ETK_OBJECT(UI_DataApplyButton), ETK_CALLBACK(_data_apply_button_click_cb), NULL); etk_box_append(ETK_BOX(vbox3), UI_DataApplyButton, ETK_BOX_START, ETK_BOX_EXPAND_FILL, 0); return UI_DataWin; }