/* Called by Geany to initialize the plugin */ void plugin_init(G_GNUC_UNUSED GeanyData * data) { main_locale_init(LOCALEDIR, GETTEXT_PACKAGE); tools_menu_init(); xproject_init(); create_sidebar(); reload_project(); }
/* Called by Geany to initialize the plugin */ void plugin_init(G_GNUC_UNUSED GeanyData *data) { main_locale_init(LOCALEDIR, GETTEXT_PACKAGE); load_settings(); tools_menu_init(); xproject_init(); if (display_sidebar) create_sidebar(); reload_project(); keybindings_set_item(plugin_key_group, KB_FIND_IN_PROJECT, kb_find_in_project, 0, 0, "find_in_project", _("Find a text in geanyprj's project"), NULL); }
int main() { setup(); sidebar *sb = create_sidebar(); setup_sidebar_items(sb); content_pane *cp = create_content_pane(); setup_content_items(cp); wrapper *wp = create_wrapper(cp, sb); print_wrapper(wp); int x, y; getmaxyx(stdscr, x, y); mvprintw(20, 21, "x: %d y: %d", x, y); parse_key(wp); tear_down(); return 0; }
static void on_configure_response(G_GNUC_UNUSED GtkDialog *dialog, G_GNUC_UNUSED gint response, GtkWidget *checkbox) { gboolean old_display_sidebar = display_sidebar; display_sidebar = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(checkbox)); if (display_sidebar ^ old_display_sidebar) { if (display_sidebar) { create_sidebar(); sidebar_refresh(); } else { destroy_sidebar(); } save_settings(); } }
static void create_main_layout(interface *intf, Evas_Object *conform, view_e view_type) { /* Add a layout to the conformant */ Evas_Object *layout = elm_layout_add(conform); elm_layout_theme_set(layout, "layout", "drawer", "panel"); evas_object_show(layout); /* Create the panel and put it in the layout */ intf->sidebar = create_sidebar(intf, layout, view_type); elm_object_part_content_set(layout, "elm.swallow.left", sidebar_get_widget(intf->sidebar)); /* Create the content box and put it in the layout */ intf->main_box = create_main_box(intf, layout); elm_object_part_content_set(layout, "elm.swallow.content", intf->main_box); /* */ evas_object_show(intf->main_box); elm_object_content_set(conform, layout); }
int main(int argc, char *argv[], char **envp) { gEnvion = envp; // Connect to AxWin3 Server AxWin3_Connect(NULL); // TODO: Register to be told when the display layout changes AxWin3_GetDisplayDims(0, NULL, NULL, &giScreenWidth, &giScreenHeight); create_sidebar(); create_mainmenu(); create_run_dialog(); AxWin3_RegisterAction(gSidebar, "Interface>Run", (tAxWin3_HotkeyCallback)mainmenu_run_dialog); AxWin3_RegisterAction(gSidebar, "Interface>Terminal", (tAxWin3_HotkeyCallback)mainmenu_app_terminal); AxWin3_RegisterAction(gSidebar, "Interface>TextEdit", (tAxWin3_HotkeyCallback)mainmenu_app_textedit); // Idle loop AxWin3_MainLoop(); return 0; }
int ch; setup_ncurses(); WINDOW *sidebar_win = create_sidebar_win(); sidebar *sb = create_sidebar(); int n_choices, i; // ********************************************* // // SIDEBAR // // ********************************************* ITEM **sidebar_menu_items; MENU *sidebar_menu; WINDOW *sidebar_menu_win; n_choices = 25; char **sidebar_items = calloc(n_choices, sizeof(ITEM *)); char **sidebar_items_ptr = get_sidebar_items(); char *current_sidebar_item; i = 0; while ((current_sidebar_item = sidebar_items_ptr[i]) != NULL) { sidebar_items[i] = current_sidebar_item; i++; }