static void CreateDialog(int index, int hascancel, Picture *icon, const char *buttonlabel, GtkSignalFunc func) { GtkWidget *dialog, *pixmap, *label, *hbox; dialog = gtk_dialog_new(); gtk_window_set_modal(GTK_WINDOW(dialog), TRUE); hbox = gtk_hbox_new(FALSE, 0); if (icon != NULL) { pixmap = gtk_pixmap_new(icon->pix, icon->mask); gtk_container_add(GTK_CONTAINER(hbox), pixmap); } label = gtk_label_new(UI_dialog_string(index)); gtk_container_add(GTK_CONTAINER(hbox), label); gtk_container_add(GTK_CONTAINER(GTK_DIALOG(dialog)->vbox), hbox); gtk_widget_show_all(hbox); if (buttonlabel == NULL) buttonlabel = "OK"; new_button(dialog, buttonlabel, func, NULL); if (hascancel) new_button(dialog, "Cancel", NULL, NULL); gtk_widget_realize(dialog); dialogs[index] = dialog; }
int main(void) { uint8_t p1Score = 0; uint8_t p2Score = 0; Button p1Button = new_button(P1BUTTON); Button p2Button = new_button(P2BUTTON); DDRB |= (1 << BUTTONLED); DDRB |= (1 << WINLED); // temp PORTB |= (1 << P1BUTTON) | (1 << P2BUTTON); PORTB &= ~(1 << WINLED); // temp CLKPR=_BV(CLKPCE); CLKPR=0; TCCR1 |= (1 << CS10) | (1 << CS11);// | (1 << CS12 ) || (0 << CS13); TCNT1 = 0; while (1) { // Poll buttons for scoring switch (button_tick(p1Button)) { case SinglePress: p1Score++; break; default: break; } switch (button_tick(p2Button)) { case SinglePress: p2Score++; break; default: break; } // Update score display display_score(p1Score, p2Score); // Check for a game win scenario if ((p1Score >= 11 || p2Score >= 11) && abs(p1Score - p2Score) >= 2) { // Game is over PORTB |= (1 << WINLED); // temp } // _delay_ms(10); } return (0); }
void add_button(char *label, t_lst *to, t_bunny_response (*func)(void *, int)) { while (to->next) to = to->next; to->next = new_button(label, to->pos.x, to->pos.y + 100, func); }
static void CreatePixmapBox(int index, Picture *logo, Picture *pix) { GtkWidget *dialog, *pixmap, *label; const char *text = UI_dialog_string(index); dialog = gtk_dialog_new(); gtk_window_set_modal(GTK_WINDOW(dialog), TRUE); pixmap = gtk_pixmap_new(logo->pix, logo->mask); gtk_container_add(GTK_CONTAINER(GTK_DIALOG(dialog)->vbox), pixmap); gtk_widget_show(pixmap); if (pix != NULL) { pixmap = gtk_pixmap_new(pix->pix, pix->mask); gtk_container_add(GTK_CONTAINER(GTK_DIALOG(dialog)->vbox), pixmap); gtk_widget_show(pixmap); } if (text != NULL) { label = gtk_label_new(text); gtk_container_add(GTK_CONTAINER(GTK_DIALOG(dialog)->vbox), label); gtk_widget_show(label); } new_button(dialog, "OK", NULL, NULL); gtk_widget_realize(dialog); dialogs[index] = dialog; }
static void CreateEnterText(int index, GtkSignalFunc func) { GtkWidget *dialog, *label, *entry; dialog = gtk_dialog_new(); gtk_window_set_modal(GTK_WINDOW(dialog), TRUE); label = gtk_label_new(UI_dialog_string(index)); gtk_container_add(GTK_CONTAINER(GTK_DIALOG(dialog)->vbox), label); gtk_widget_show(label); entry = gtk_entry_new_with_max_length(20); gtk_signal_connect_object(GTK_OBJECT(entry), "activate", func, GTK_OBJECT(entry)); gtk_signal_connect_object(GTK_OBJECT(entry), "activate", GTK_SIGNAL_FUNC(gtk_widget_hide), GTK_OBJECT(dialog)); gtk_container_add(GTK_CONTAINER(GTK_DIALOG(dialog)->vbox), entry); gtk_widget_show(entry); new_button(dialog, "OK", func, GTK_OBJECT(entry)); gtk_widget_realize(dialog); dialogs[index] = dialog; }
static GtkWidget *init_effect(t_wid *wid) { GtkWidget *frame[4]; frame[0] = gtk_frame_new("Effect"); frame[1] = gtk_frame_new("Shiny"); frame[2] = gtk_frame_new("Other"); frame[3] = gtk_frame_new("Color"); wid->surface->effect_but = new_button("None", NULL, G_CALLBACK(objeffect), wid); gtk_container_add(GTK_CONTAINER(frame[0]), wid->surface->effect_but); wid->surface->brillance = new_hscale(1, 300, G_CALLBACK(change_brillance), wid); gtk_container_add(GTK_CONTAINER(frame[1]), wid->surface->brillance); wid->surface->def = new_check_button("Normal's distortion", 0, G_CALLBACK(change_def), wid); gtk_container_add(GTK_CONTAINER(frame[2]), wid->surface->def); wid->surface->color[0] = new_spin(0, 255, G_CALLBACK(change_red), wid); wid->surface->color[1] = new_spin(0, 255, G_CALLBACK(change_green), wid); wid->surface->color[2] = new_spin(0, 255, G_CALLBACK(change_blue), wid); gtk_container_add(GTK_CONTAINER(frame[3]), unit_hbox(wid->surface->color, 3, TRUE, 0)); return (unit_vbox(frame, 4, FALSE, 0)); }
void win_game() { GtkWidget* table; GtkWidget* window; GtkWidget* vbox; char** map; int player; t_pos** pos; player = 1; window = gtk_window_new(GTK_WINDOW_TOPLEVEL); gtk_window_set_title(GTK_WINDOW(window), "Reversi"); gtk_window_set_position(GTK_WINDOW(window), GTK_WIN_POS_CENTER); gtk_window_set_default_size(GTK_WINDOW(window), 500, 500); g_signal_connect(G_OBJECT(window), "destroy", G_CALLBACK(quit), 0); vbox = gtk_vbox_new(FALSE, 0); gtk_container_add(GTK_CONTAINER(window), vbox); create_menu_bar(vbox, window); table = gtk_table_new(8, 8, TRUE); gtk_container_add(GTK_CONTAINER(vbox), table); map = init_table(); pos = create_pos(); new_button(table, pos, map, &player); gtk_widget_show_all(window); gtk_main(); free_pos(pos); free_table(map); }
static GtkWidget *init_button(t_wid *wid) { int nb_box; int i; GtkWidget *box[3]; i = 0; nb_box = 0; box[0] = gtk_hbox_new(FALSE, 0); box[1] = gtk_hbox_new(FALSE, 0); while (i < 6) { wid->surface->objselect[i].type = i + 1; wid->surface->objselect[i].button = new_button(NULL, get_image(i + 1), G_CALLBACK(type_obj), &wid->surface->objselect[i]); wid->surface->objselect[i].wid = wid; if (wid->surface->objselect[i].wid != NULL) gtk_box_pack_start(GTK_BOX(box[nb_box]), wid->surface->objselect[i++].button, TRUE, TRUE, 0); if ((i % 3) == 0) nb_box++; } gtk_widget_show(box[0]); gtk_widget_show(box[1]); return (unit_vbox(box, nb_box, FALSE, 0)); }
void init_buttons(t_lst **buttons) { *buttons = new_button("Connect to server", (1920 - 500) / 2, 200, &connect_srv); add_button(my_strdup("Fullscreen: off"), *buttons, &set_fullscreen); add_button("Exit", *buttons, &close_game); }
void init_connect(t_lst **buttons) { *buttons = new_button("IP address", (1920 - 500) / 2, 200, &input_address); add_button("Server port", *buttons, &input_port); add_button("Player name", *buttons, &input_pseudo); add_button("Connect!", *buttons, &connecting); add_button("Go away, I'm alone", *buttons, &menu); }
ReceiverWindow::ReceiverWindow() { window = gtk_window_new(GTK_WINDOW_TOPLEVEL); gtk_window_set_title(GTK_WINDOW(window), "Выбор адресов получателей"); gtk_window_set_default_size(GTK_WINDOW(window), 200, 200); gtk_window_set_position(GTK_WINDOW(window), GTK_WIN_POS_CENTER); ///////////////////////////////// box[0] = gtk_hbox_new(0,5); box[1] = gtk_hbox_new(0,15); ///////////////////////////////// model = create_and_fill_model(); store = GTK_WIDGET(create_and_fill_store()); ///////////////////////////////// addButton = new_button("Добавить",receiver_add_signal,model); delButton = new_button("Удалить",del_signal,store); ///////////////////////////////// okButton = new_button("_Готово",receiver_ok_signal,model,1); cancelButton = new_button("_Отмена",receiver_cancel_signal,model,1); ///////////////////////////////// GTK_WIDGET_SET_FLAGS (okButton, GTK_CAN_DEFAULT); gtk_widget_grab_focus(okButton); ///////////////////////////////// gtk_signal_connect(GTK_OBJECT(window), "destroy", GTK_SIGNAL_FUNC(receiver_destroy_signal), NULL); ///////////////////////////////////// gtk_box_pack_start(GTK_BOX(box[0]),store,1,1,5); gtk_box_pack_start(GTK_BOX(box[1]),okButton,1,1,5); gtk_box_pack_start(GTK_BOX(box[1]),addButton,1,1,5); gtk_box_pack_start(GTK_BOX(box[1]),delButton,1,1,5); gtk_box_pack_start(GTK_BOX(box[1]),cancelButton,1,1,5); ///////////////////////////////////// GtkWidget *vbox = gtk_vbox_new(0,5); for (int i=0; i<count; i++) { gtk_box_pack_start(GTK_BOX(vbox),box[i],1,0,5); } gtk_container_add(GTK_CONTAINER(window), vbox); gtk_widget_show_all(window); }
AddReceiverWindow::AddReceiverWindow() { window = gtk_window_new( GTK_WINDOW_TOPLEVEL); gtk_window_set_title( GTK_WINDOW(window), "Добавить получателя"); gtk_window_set_position( GTK_WINDOW(window), GTK_WIN_POS_CENTER); gtk_window_set_default_size(GTK_WINDOW(window), 200, 200); ///////////////////////////////// box[0] = gtk_hbox_new(0,5); box[1] = gtk_hbox_new(0,5); box[2] = gtk_hbox_new(0,15); ///////////////////////////////// nameEdit = new_edit ("Имя"); senderEdit = new_edit ("Почта"); nameLabel = new_label("Имя получателя"); senderLabel = new_label("Почтовый адрес получателя"); ///////////////////////////////// okButton = new_button("Готово"); cancelButton = new_button("Отмена"); g_signal_connect(GTK_OBJECT(okButton), "clicked", GTK_SIGNAL_FUNC(add_receiver_ok_signal), NULL); g_signal_connect(GTK_OBJECT(cancelButton), "clicked", GTK_SIGNAL_FUNC(add_receiver_cancel_signal), NULL); ///////////////////////////////////// gtk_box_pack_start(GTK_BOX(box[0]), nameLabel, 0,0,5); gtk_box_pack_start(GTK_BOX(box[0]), nameEdit, 0,0,5); gtk_box_pack_start(GTK_BOX(box[1]), senderLabel, 0,0,5); gtk_box_pack_start(GTK_BOX(box[1]), senderEdit, 0,0,5); gtk_box_pack_start(GTK_BOX(box[2]), okButton, 1,1,5); gtk_box_pack_start(GTK_BOX(box[2]), cancelButton,1,1,5); ///////////////////////////////////// GtkWidget *vbox = gtk_vbox_new(0,5); for (int i=0; i<count; i++) { gtk_box_pack_start(GTK_BOX(vbox), box[i], 1,0,5); } gtk_container_add(GTK_CONTAINER(window), vbox); gtk_widget_show_all(window); }
static GtkWidget *init_prev_next(t_wid *wid) { GtkWidget *box; GtkWidget *button; box = gtk_hbox_new(TRUE, 0); wid->surface->image = gtk_image_new(); gtk_box_pack_start(GTK_BOX(box), new_button(NULL, "./resource/gauche.png", G_CALLBACK(select_obj_prev), wid), TRUE, TRUE, 0); button = gtk_button_new(); wid->surface->image = gtk_image_new_from_file("./resource/forme/none.png"); gtk_button_set_image(GTK_BUTTON(button), GTK_WIDGET(wid->surface->image)); g_signal_connect(G_OBJECT(button), "clicked", G_CALLBACK(objtype), wid); gtk_box_pack_start(GTK_BOX(box), button, TRUE, FALSE, 0); gtk_box_pack_start(GTK_BOX(box), new_button(NULL, "./resource/droite.png", G_CALLBACK(select_obj_next), wid), TRUE, TRUE, 0); return (box); }
static void change_button(PROC_T *p, const gchar *STOCKID, void (*func)){ if(p->btn){ g_signal_handler_disconnect(p->btn, p->btnhandler); }else{ p->btn=new_button(); } if(p->btnimage){//update image gtk_image_clear(GTK_IMAGE(p->btnimage)); gtk_image_set_from_stock(GTK_IMAGE(p->btnimage),STOCKID,GTK_ICON_SIZE_MENU); }else{//create image and add to display p->btnimage=gtk_image_new_from_stock(STOCKID,GTK_ICON_SIZE_MENU); gtk_container_add(GTK_CONTAINER(p->btn), p->btnimage); } p->btnhandler=g_signal_connect(p->btn,"button_press_event",G_CALLBACK(func),(gpointer)p); gtk_widget_show_all(p->btn); }
t_wid *pos_box(t_wid *wid) { GtkWidget *box; box = gtk_hbox_new(FALSE, 0); gtk_box_pack_start(GTK_BOX(wid->win->box), GTK_WIDGET(wid->win->menu_bar), FALSE, FALSE, 0); gtk_box_pack_start(GTK_BOX(box), GTK_WIDGET(wid->surface->box), FALSE, FALSE, 0); gtk_box_pack_start(GTK_BOX(box), GTK_WIDGET(wid->s_surface->box), TRUE, TRUE, 0); gtk_box_pack_start(GTK_BOX(wid->win->box), GTK_WIDGET(box), FALSE, FALSE, 0); gtk_box_pack_start(GTK_BOX(wid->win->box), GTK_WIDGET(new_button("Generaytracer", NULL, G_CALLBACK(gen), wid)), FALSE, FALSE, 0); gtk_widget_show_all(wid->win->win); return (wid); }
MainWindow::MainWindow() { window = gtk_window_new(GTK_WINDOW_TOPLEVEL); //SpamTeacher -- рабочее название gtk_window_set_title(GTK_WINDOW(window), "SpamTeacher"); gtk_window_set_position(GTK_WINDOW(window), GTK_WIN_POS_CENTER); gtk_signal_connect(GTK_OBJECT(window), "destroy", GTK_SIGNAL_FUNC(closeApp), NULL); ///////////////////////////////////// //установка текста в поля ввода из data std::string text; text = data->get_message_about_sender(); senderEdit = new_edit(text.c_str(),NULL); text = data->get_message_about_receiver(); receiverEdit = new_edit(text.c_str(),NULL); text = data->get_message_about_atachment(); atachEdit = new_edit(text.c_str(),NULL); ///////////////////////////////////// gtk_editable_set_editable(GTK_EDITABLE(senderEdit),0); gtk_editable_set_editable(GTK_EDITABLE(receiverEdit),0); gtk_editable_set_editable(GTK_EDITABLE(atachEdit),0); ///////////////////////////////////// //установка текста в поле для ввода сообщения GtkWidget *view; GtkTextBuffer *buffer; view = gtk_text_view_new (); buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (view)); text = data->message; gtk_text_buffer_set_text (buffer, text.c_str(), -1); GtkWidget* frame = view; frame = gtk_frame_new (NULL); gtk_frame_set_label (GTK_FRAME (frame), "Сообщение"); ///////////////////////////////////////// GtkWidget* sw = gtk_scrolled_window_new (NULL, NULL); gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (sw), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); gtk_container_add (GTK_CONTAINER(sw), view); gtk_container_add(GTK_CONTAINER(frame), sw); //////////////////////////////////////// messageEdit = frame; //////////////////////////////////////// //создание кнопок и подцепление к ним сигналов senderButton = new_button("Опции отправителя",sender_signal); receiverButton = new_button("Опции получателей",receiver_signal); atachButton = new_button("Опции вложений(файлов)",atach_signal); messageButton = new_button("Отправить сообщение",message_signal); //////////////////////////////////////// //создание кнопок для настроек GtkWidget* settingsButton[setNum]; settingsButton[0] = new_button("Имя",settings_signal[0]); settingsButton[1] = new_button("Пол",settings_signal[1]); GtkWidget* messageSettings = gtk_hbox_new(0,1); for (int i=0; i<setNum; i++) { gtk_box_pack_start(GTK_BOX(messageSettings),settingsButton[i],0,0,5); } GtkWidget* label; label = new_label("Тема сообщения:",NULL); themeEdit = new_edit(data->theme.c_str(),NULL); gtk_box_pack_end(GTK_BOX(messageSettings),themeEdit,0,0,5); gtk_box_pack_end(GTK_BOX(messageSettings),label,0,0,5); ///////////////////////////////////// //упаковка всего box[0] = gtk_hbox_new(1,5); box[1] = gtk_hbox_new(1,5); box[2] = gtk_hbox_new(1,5); box[3] = gtk_vbox_new(0,3); ///////////////////////////////////// gtk_box_pack_start(GTK_BOX(box[0]),senderEdit,1,0,5); gtk_box_pack_start(GTK_BOX(box[0]),senderButton,1,0,5); gtk_box_pack_start(GTK_BOX(box[1]),receiverEdit,1,0,5); gtk_box_pack_start(GTK_BOX(box[1]),receiverButton,1,0,5); gtk_box_pack_start(GTK_BOX(box[2]),atachEdit,1,0,5); gtk_box_pack_start(GTK_BOX(box[2]),atachButton,1,0,5); gtk_box_pack_start(GTK_BOX(box[3]),messageSettings,0,0,1); gtk_box_pack_start(GTK_BOX(box[3]),messageEdit,1,1,1); gtk_box_pack_start(GTK_BOX(box[3]),messageButton,0,0,1); //для удобства обращения к виджету messageEdit = view; ///////////////////////////////////// vbox = gtk_vbox_new(0,5); ///////////////////////////////////// GtkWidget* menubar; menubar = get_menubar_menu(window); gtk_box_pack_start(GTK_BOX(vbox), menubar, 0, 1, 0); for (int i=0; i<3; i++) { gtk_box_pack_start(GTK_BOX(vbox),box[i],0,0,5); } gtk_box_pack_start(GTK_BOX(vbox),box[3],1,1,5); gtk_container_add(GTK_CONTAINER(window), vbox); gtk_widget_show_all(window); }
void BlueDotTheme::initialize() { BC_Resources *resources = BC_WindowBase::get_resources(); // about_bg = new_image("about_bg.png"); // COPIED FROM DEFAULT THEME 1>> resources->text_default = 0x000000; resources->text_background = 0xffffff; //listbox borders resources->text_border1 = 0x4a484a; // (top outer) resources->text_border2 = 0x000000; // (top inner) resources->text_border3 = 0xacaeac; // (bottom inner) resources->text_border4 = 0xffffff; // (bottom outer) resources->text_inactive_highlight = 0xacacac; resources->text_highlight = BGREY; // COPIED FROM DEFAULT THEME <<1 resources->bg_color = FGGREY; //bg of windows (where no pics... // COPIED FROM DEFAULT THEME 2>> resources->default_text_color = 0x000000; resources->menu_title_text = 0x000000; resources->popup_title_text = 0x000000; // COPIED FROM DEFAULT THEME <<2 resources->menu_item_text = BLACK; // COPIED FROM DEFAULT THEME 3>> resources->generic_button_margin = 15; //Length of buttons and color tabs resources->pot_needle_color = resources->text_default; resources->pot_offset = 0; resources->progress_text = resources->text_default; // COPIED FROM DEFAULT THEME <<3 resources->meter_font = SMALLFONT; //Specific to BD resources->meter_font_color = BLACK; resources->meter_title_w = 20; //Specific to BD resources->meter_3d = 0; //Specific to BD resources->menu_light = FTGREY; //menu resources->menu_highlighted = BGREY; //NMBLUE resources->menu_down = BGREY; resources->menu_up = FGGREY; resources->menu_shadow = FTGREY; // MIHA: COPIED FROM DEFAULT THEME M1>> resources->popupmenu_margin = 10; // ugly resources->popupmenu_triangle_margin = 15; // ugly // MIHA: COPIED FROM DEFAULT THEME M1<< // COPIED FROM DEFAULT THEME 4>> resources->listbox_title_color = 0x000000; resources->listbox_title_margin = 0; resources->listbox_title_hotspot = 5; // No. of pixels around the borders to allow dragging resources->listbox_border1 = 0x4a484a; // (top outer) resources->listbox_border2 = 0x000000; // (top inner) resources->listbox_border3 = 0xffe200; // (bottom inner) resources->listbox_border4 = 0xffffff; // (bottom outer) resources->listbox_highlighted = 0xeee6ee; resources->listbox_inactive = 0xffffffff; // (background) resources->listbox_bg = new_image("list_bg.png"); //NOT COPIED! resources->listbox_text = 0x000000; resources->listbox_selected = BGREY; resources->dirbox_margin = 50; resources->filebox_margin = 101; resources->file_color = 0x000000; resources->directory_color = DKBLUE; // COPIED FROM DEFAULT THEME <<4 resources->menu_highlighted_fontcolor = DDBLUE; //Specific to BD //There are differences here, but we won't change until the end. //Specific to BD resources->filebox_icons_images = new_image_set(3, "file_icons_up.png", "file_icons_uphi.png", "file_icons_dn.png"); resources->filebox_text_images = new_image_set(3, "file_text_up.png", "file_text_uphi.png", "file_text_dn.png"); resources->filebox_newfolder_images = new_image_set(3, "file_newfolder_up.png", "file_newfolder_uphi.png", "file_newfolder_dn.png"); resources->filebox_updir_images = new_image_set(3, "file_updir_up.png", "file_updir_uphi.png", "file_updir_dn.png"); resources->filebox_delete_images = new_image_set(3, "file_delete_up.png", "file_delete_uphi.png", "file_delete_dn.png"); resources->filebox_reload_images = new_image_set(3, "file_reload_up.png", "file_reload_uphi.png", "file_reload_dn.png"); resources->filebox_descend_images = new_image_set(3, "file_openfolder_up.png", "file_openfolder_uphi.png", "file_openfolder_dn.png"); //Specific to BD resources->usethis_button_images = resources->ok_images = new_button("ok.png", "generic_up.png", "generic_hi.png", "generic_dn.png"); new_button("ok.png", "generic_up.png", "generic_hi.png", "generic_dn.png", "new_ok_images"); resources->cancel_images = new_button("cancel.png", "generic_up.png", "generic_hi.png", "generic_dn.png"); new_button("cancel.png", "generic_up.png", "generic_hi.png", "generic_dn.png", "new_cancel_images"); resources->bar_data = new_image("bar", "bar.png"); resources->min_menu_w = 0; resources->menu_popup_bg = 0; // if (0) use menu_light, menu_up, menu_shadow resources->menu_item_bg = 0; // if (0) use menu_light, menu_highlighted, menu_down, menu_shadow resources->menu_bar_bg = 0; // if (0) use menu_light, menu_shadow, and height of MEDIUMFONT + 8 resources->menu_title_bg = 0; // if (0) use menu_light, menu_highlighted, menu_down, menu_shadow resources->popupmenu_images = 0; // if (0) get_resources()->use generic_button_images resources->toggle_highlight_bg = 0; // if (0) "Draw a plain box" as per bctoggle.C resources->generic_button_images = new_image_set(3, "generic_up.png", "generic_hi.png", "generic_dn.png"); resources->horizontal_slider_data = new_image_set(6, "hslider_fg_up.png", "hslider_fg_hi.png", "hslider_fg_dn.png", "hslider_bg_up.png", "hslider_bg_hi.png", "hslider_bg_dn.png"); resources->vertical_slider_data = new_image_set(6, "vertical_slider_fg_up.png", "vertical_slider_fg_hi.png", "vertical_slider_fg_dn.png", "vertical_slider_bg_up.png", "vertical_slider_bg_hi.png", "vertical_slider_bg_dn.png"); resources->progress_images = new_image_set(2, "progress_bg.png", "progress_hi.png"); resources->tumble_data = new_image_set(4, "tumble_up.png", "tumble_hi.png", "tumble_bottom.png", "tumble_top.png"); resources->listbox_button = new_image_set(4, "listbox_button_up.png", "listbox_button_hi.png", "listbox_button_dn.png", "listbox_button_disabled.png"); // probably need to make this for the suv theme resources->listbox_column = new_image_set(3, "column_up.png", "column_hi.png", "column_dn.png"); resources->listbox_expand = new_image_set(5, "listbox_expandup.png", "listbox_expanduphi.png", "listbox_expandchecked.png", "listbox_expanddn.png", "listbox_expandcheckedhi.png"); resources->listbox_up = new_image("listbox_up.png"); resources->listbox_dn = new_image("listbox_dn.png"); resources->pan_data = new_image_set(7, "pan_up.png", "pan_hi.png", "pan_popup.png", "pan_channel.png", "pan_stick.png", "pan_channel_small.png", "pan_stick_small.png"); resources->pan_text_color = WHITE; resources->pot_images = new_image_set(3, "pot_up.png", "pot_hi.png", "pot_dn.png"); //Graphic Copied from default. Improve!! resources->checkbox_images = new_image_set(5, "checkbox_up.png", "checkbox_uphi.png", "checkbox_checked.png", "checkbox_down.png", "checkbox_checkedhi.png"); resources->radial_images = new_image_set(5, "radial_up.png", "radial_uphi.png", "radial_checked.png", "radial_down.png", "radial_checkedhi.png"); resources->xmeter_images = new_image_set(6, "xmeter_normal.png", "xmeter_green.png", "xmeter_red.png", "xmeter_yellow.png", "xmeter_normal.png", "xmeter_over.png"); resources->ymeter_images = new_image_set(6, "ymeter_normal.png", "ymeter_green.png", "ymeter_red.png", "ymeter_yellow.png", "ymeter_normal.png", "ymeter_over.png"); resources->hscroll_data = new_image_set(10, "hscroll_center_up.png", "hscroll_center_hi.png", "hscroll_center_dn.png", "hscroll_bg.png", "hscroll_back_up.png", "hscroll_back_hi.png", "hscroll_back_dn.png", "hscroll_fwd_up.png", "hscroll_fwd_hi.png", "hscroll_fwd_dn.png"); resources->vscroll_data = new_image_set(10, "vscroll_center_up.png", "vscroll_center_hi.png", "vscroll_center_dn.png", "vscroll_bg.png", "vscroll_back_up.png", "vscroll_back_hi.png", "vscroll_back_dn.png", "vscroll_fwd_up.png", "vscroll_fwd_hi.png", "vscroll_fwd_dn.png"); //Graphic Copied from default. Improve!! //To make this work better, it may be neccessary to replace new_button with new_image_set new_button("prevtip.png", "tipbutton_up.png", "tipbutton_hi.png", "tipbutton_dn.png", "prev_tip"); new_button("nexttip.png", "tipbutton_up.png", "tipbutton_hi.png", "tipbutton_dn.png", "next_tip"); new_button("closetip.png", "tipbutton_up.png", "tipbutton_hi.png", "tipbutton_dn.png", "close_tip"); new_button("swap_extents.png", "editpanel_up.png", "editpanel_hi.png", "editpanel_dn.png", "swap_extents"); //swap_extents.png not copied // Record windows rgui_batch = new_image("recordgui_batch.png"); rgui_controls = new_image("recordgui_controls.png"); rgui_list = new_image("recordgui_list.png"); rmonitor_panel = new_image("recordmonitor_panel.png"); rmonitor_meters = new_image("recordmonitor_meters.png"); //COPY START >> preferences_category_overlap = 0; preferencescategory_x = 5; preferencescategory_y = 5; preferencestitle_x = 5; preferencestitle_y = 10; preferencesoptions_x = 5; preferencesoptions_y = 0; //COPY END<< // MWindow //COPY START >> message_normal = resources->text_default; audio_color = BLACK; mtransport_margin = 11; toggle_margin = 11; //COPY END >> new_image("mbutton_left","mbutton_left.png"); new_image("mbutton_right","mbutton_right.png"); new_image("timebar_bg", "timebar_bg.png"); new_image("timebar_brender", "timebar_brender.png"); new_image("clock_bg", "mclock.png"); new_image("patchbay_bg", "patchbay_bg.png"); new_image("tracks_bg","tracks_bg.png"); new_image("zoombar_left","zoombar_left.png"); new_image("zoombar_right","zoombar_right.png"); new_image("statusbar_left","statusbar_left.png"); new_image("statusbar_right","statusbar_right.png"); //Here an improvement may be needed new_image_set("zoombar_menu", 3, "generic_up.png", "generic_hi.png", "generic_dn.png"); new_image_set("zoombar_tumbler", 4, "tumble_up.png", "tumble_hi.png", "tumble_bottom.png", "tumble_top.png"); //Graphic Copied from default. Improve!! new_image_set("mode_popup", 3, "generic_up.png", "generic_hi.png", "generic_dn.png"); new_image("mode_add", "mode_add.png"); new_image("mode_divide", "mode_divide.png"); new_image("mode_multiply", "mode_multiply.png"); new_image("mode_normal", "mode_normal.png"); new_image("mode_replace", "mode_replace.png"); new_image("mode_subtract", "mode_subtract.png"); new_image("mode_max", "mode_max.png"); //Graphic Copied from default. Improve!! new_toggle("plugin_on.png", "pluginbutton_hi.png", "pluginbutton_hi.png", "pluginbutton_select.png", "pluginbutton_dn.png", "pluginbutton_selecthi.png", "plugin_on"); //Graphic Copied from default. Improve!! new_toggle("plugin_show.png", "plugin_show.png", "pluginbutton_hi.png", "pluginbutton_select.png", "pluginbutton_dn.png", "pluginbutton_selecthi.png", "plugin_show"); // CWindow new_image("cpanel_bg", "cpanel_bg.png"); new_image("cbuttons_left", "cbuttons_left.png"); new_image("cbuttons_right", "cbuttons_right.png"); new_image("cmeter_bg", "cmeter_bg.png"); // VWindow new_image("vbuttons_left", "vbuttons_left.png"); new_image("vbuttons_right","vbuttons_right.png"); new_image("vmeter_bg","vmeter_bg.png"); new_image("preferences_bg", "preferences_bg.png"); new_image("new_bg", "new_bg.png"); new_image("setformat_bg", "setformat_bg2.png"); timebar_view_data = new_image("timebar_view.png"); // x, y of Format dialog box setformat_w = 640; setformat_h = 560; setformat_x1 = 15; setformat_x2 = 120; setformat_x3 = 315; setformat_x4 = 435; setformat_y1 = 20; setformat_y2 = 85; setformat_y3 = 125; setformat_margin = 30; setformat_channels_x = 25; setformat_channels_y = 242; setformat_channels_w = 250; setformat_channels_h = 250; loadfile_pad = 70; browse_pad = 20; //This buttons miss a bit. May need to be improved new_image_set("playpatch_data", 5, "playpatch_up.png", "playpatch_hi.png", "playpatch_checked.png", "playpatch_dn.png", "playpatch_checkedhi.png"); new_image_set("recordpatch_data", 5, "recordpatch_up.png", "recordpatch_hi.png", "recordpatch_checked.png", "recordpatch_dn.png", "recordpatch_checkedhi.png"); new_image_set("gangpatch_data", 5, "gangpatch_up.png", "gangpatch_hi.png", "gangpatch_checked.png", "gangpatch_dn.png", "gangpatch_checkedhi.png"); new_image_set("drawpatch_data", 5, "drawpatch_up.png", "drawpatch_hi.png", "drawpatch_checked.png", "drawpatch_dn.png", "drawpatch_checkedhi.png"); new_image_set("mutepatch_data", 5, "mutepatch_up.png", "mutepatch_hi.png", "mutepatch_checked.png", "mutepatch_dn.png", "mutepatch_checkedhi.png"); new_image_set("expandpatch_data", 5, "expandpatch_up.png", "expandpatch_hi.png", "expandpatch_checked.png", "expandpatch_dn.png", "expandpatch_checkedhi.png"); build_icons(); build_bg_data(); build_overlays(); //Graphic Copied from default. Improve!! -> See outpoint.png/inpoint.png out_point = new_image_set(5, "out_up.png", "out_hi.png", "out_checked.png", "out_dn.png", "out_checkedhi.png"); in_point = new_image_set(5, "in_up.png", "in_hi.png", "in_checked.png", "in_dn.png", "in_checkedhi.png"); //Graphic Copied from default. Improve!! -> see label.png label_toggle = new_image_set(5, "labeltoggle_up.png", "labeltoggle_uphi.png", "label_checked.png", "labeltoggle_dn.png", "label_checkedhi.png"); statusbar_cancel_data = new_image_set(3, "statusbar_cancel_up.png", "statusbar_cancel_hi.png", "statusbar_cancel_dn.png"); //Graphic Copied from default. Improve!! -> make transparent edges VFrame *editpanel_up = new_image("editpanel_up.png"); VFrame *editpanel_hi = new_image("editpanel_hi.png"); VFrame *editpanel_dn = new_image("editpanel_dn.png"); VFrame *editpanel_checked = new_image("editpanel_checked.png"); VFrame *editpanel_checkedhi = new_image("editpanel_checkedhi.png"); //Graphic Copied from default. Improve!! new_image("panel_divider", "panel_divider.png"); new_button("bottom_justify.png", editpanel_up, editpanel_hi, editpanel_dn, "bottom_justify"); new_button("center_justify.png", editpanel_up, editpanel_hi, editpanel_dn, "center_justify"); new_button("channel.png", editpanel_up, editpanel_hi, editpanel_dn, "channel"); new_button("copy.png", editpanel_up, editpanel_hi, editpanel_dn, "copy"); new_button("cut.png", editpanel_up, editpanel_hi, editpanel_dn, "cut"); new_button("fit.png", editpanel_up, editpanel_hi, editpanel_dn, "fit"); new_button("fitautos.png", editpanel_up, editpanel_hi, editpanel_dn, "fitautos"); new_button("inpoint.png", editpanel_up, editpanel_hi, editpanel_dn, "inbutton"); // indelete_data = new_button("clearinpoint.png", editpanel_up, editpanel_hi, editpanel_dn); //Specific to BD new_button("label.png", editpanel_up, editpanel_hi, editpanel_dn, "labelbutton"); new_button("left_justify.png", editpanel_up, editpanel_hi, editpanel_dn, "left_justify"); new_button("magnifyS.png", "editpanelW_up.png", "editpanelW_hi.png", "editpanelW_dn.png", "magnify_button"); new_button("middle_justify.png", editpanel_up, editpanel_hi, editpanel_dn, "middle_justify"); new_button("nextlabel.png", editpanel_up, editpanel_hi, editpanel_dn, "nextlabel"); new_button("outpoint.png", editpanel_up, editpanel_hi, editpanel_dn, "outbutton"); // outdelete_data = new_button("clearoutpoint.png", editpanel_up, editpanel_hi, editpanel_dn); //Specific to BD over_button = new_button("over.png", editpanel_up, editpanel_hi, editpanel_dn); overwrite_data = new_button("overwrite.png", editpanel_up, editpanel_hi, editpanel_dn); new_button("paste.png", editpanel_up, editpanel_hi, editpanel_dn, "paste"); new_button("prevlabel.png", editpanel_up, editpanel_hi, editpanel_dn, "prevlabel"); new_button("redo.png", editpanel_up, editpanel_hi, editpanel_dn, "redo"); new_button("right_justify.png", editpanel_up, editpanel_hi, editpanel_dn, "right_justify"); splice_data = new_button("splice.png", editpanel_up, editpanel_hi, editpanel_dn); new_button("toclip.png", editpanel_up, editpanel_hi, editpanel_dn, "toclip"); new_button("goto.png", editpanel_up, editpanel_hi, editpanel_dn, "goto"); new_button("top_justify.png", editpanel_up, editpanel_hi, editpanel_dn, "top_justify"); new_button("undo.png", editpanel_up, editpanel_hi, editpanel_dn, "undo"); new_button("wrench.png", "editpanelW_up.png", "editpanelW_hi.png", "editpanelW_dn.png", "wrench"); //Make transparent borders #define TRANSPORT_LEFT_IMAGES "transport_left_up.png", "transport_left_hi.png", "transport_left_dn.png" #define TRANSPORT_CENTER_IMAGES "transport_center_up.png", "transport_center_hi.png", "transport_center_dn.png" #define TRANSPORT_RIGHT_IMAGES "transport_right_up.png", "transport_right_hi.png", "transport_right_dn.png" // build_transport(duplex_data, get_image_data("duplex.png"), transport_bg, 1); //Specific to BD new_button("end.png", TRANSPORT_RIGHT_IMAGES, "end"); new_button("fastfwd.png",TRANSPORT_CENTER_IMAGES, "fastfwd"); new_button("fastrev.png",TRANSPORT_CENTER_IMAGES, "fastrev"); new_button("play.png",TRANSPORT_CENTER_IMAGES, "play"); new_button("framefwd.png", TRANSPORT_CENTER_IMAGES, "framefwd"); new_button("framerev.png", TRANSPORT_CENTER_IMAGES, "framerev"); //Graphic Copied from default. Improve!! new_button("pause.png", TRANSPORT_CENTER_IMAGES, "pause"); new_button("record.png", TRANSPORT_CENTER_IMAGES, "record"); //Graphic Copied from default. Improve!! new_button("singleframe.png", TRANSPORT_CENTER_IMAGES, "recframe"); new_button("reverse.png", TRANSPORT_CENTER_IMAGES, "reverse"); new_button("rewind.png", TRANSPORT_LEFT_IMAGES, "rewind"); new_button("stop.png", TRANSPORT_CENTER_IMAGES, "stop"); new_button("stoprec.png", TRANSPORT_RIGHT_IMAGES, "stoprec"); // CWindow icons //Graphic Copied from default. Improve!! new_image("cwindow_inactive", "cwindow_inactive.png"); new_image("cwindow_active", "cwindow_active.png"); new_image_set("batch_render_start", 3, "batchstart_up.png", "batchstart_hi.png", "batchstart_dn.png"); new_image_set("batch_render_stop", 3, "batchstop_up.png", "batchstop_hi.png", "batchstop_dn.png"); new_image_set("batch_render_cancel", 3, "batchcancel_up.png", "batchcancel_hi.png", "batchcancel_dn.png"); // MIHA: COPIED FROM DEFAULT THEME M2>> //Graphic Copied from default. Improve!! new_image_set("category_button", 3, "preferencesbutton_dn.png", "preferencesbutton_dnhi.png", "preferencesbutton_dnlo.png"); new_image_set("category_button_checked", 3, "preferencesbutton_up.png", "preferencesbutton_uphi.png", "preferencesbutton_dnlo.png"); // MIHA: COPIED FROM DEFAULT THEME M2<< new_toggle("arrow.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "arrow"); new_toggle("autokeyframe.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "autokeyframe"); new_toggle("ibeam.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "ibeam"); new_toggle("show_meters.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "meters"); new_toggle("blank30x30.png", new_image("locklabels_locked.png"), new_image("locklabels_lockedhi.png"), new_image("locklabels_unlocked.png"), new_image("locklabels_dn.png"), // can't have seperate down for each!!?? new_image("locklabels_unlockedhi.png"), "locklabels"); // MIHA: COPIED FROM DEFAULT THEME M3>> //Is that necessary?? VFrame *cpanel_up = new_image("editpanel_up.png"); VFrame *cpanel_hi = new_image("editpanel_hi.png"); VFrame *cpanel_dn = new_image("editpanel_dn.png"); VFrame *cpanel_checked = new_image("editpanel_checked.png"); VFrame *cpanel_checkedhi = new_image("editpanel_checkedhi.png"); new_toggle("camera.png", cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi, "camera"); new_toggle("crop.png", cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi, "crop"); new_toggle("eyedrop.png", cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi, "eyedrop"); new_toggle("magnify.png", cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi, "magnify"); new_toggle("mask.png", cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi, "mask"); new_toggle("ruler.png", cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi, "ruler"); new_toggle("projector.png", cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi, "projector"); new_toggle("protect.png", cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi, "protect"); new_toggle("titlesafe.png", cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi, "titlesafe"); new_toggle("toolwindow.png", cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi, "tool"); // MIHA: COPIED FROM DEFAULT THEME M3<< // Maybe we can live without the commented part // MIHA: Commented out in favor of default version M4>> // new_toggle("camera.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi,"camera"); // new_toggle("crop.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi,"crop"); // new_toggle("eyedrop.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi,"eyedrop"); // new_toggle("magnify.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi,"magnify"); // new_toggle("mask.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi,"mask"); // new_toggle("projector.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi,"projector"); // new_toggle("protect.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi,"protect"); // new_toggle("titlesafe.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi,"titlesafe"); // new_toggle("toolwindow.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi,"tool"); // MIHA: Commented out in favor of default version M4<< // toggle for tangent mode (compositor/tool window) new_toggle("tan_smooth.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "tan_smooth"); new_toggle("tan_linear.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "tan_linear"); flush_images(); title_font = MEDIUMFONT; title_color = BLACK; recordgui_fixed_color = BLACK; recordgui_variable_color = RED; resources->medium_font = N_("-*-helvetica-medium-r-normal-*-14-*"); channel_position_color = MEYELLOW; resources->meter_title_w = 25; // (asset) edit info text color edit_font_color = BLACK; //Specific to BD //clock resources->draw_clock_background = 0; //Specific to BD //buttons resources->button_highlighted = LTGREY; resources->button_uphighlighted = DKGREY; resources->button_light = WHITE; resources->button_up = LTGREY; resources->button_shadow = DKGREY; resources->button_down = MDGREY; //Specific to BD //listbox //labels resources->label_images = new_image_set(5, "radial_up.png", "radial_uphi.png", "radial_checked.png", "radial_down.png", "radial_checkedhi.png"); /* resources->type_to_icon = new_image_set(5, "file_folder.png", "file_unknown.png", "file_film.png", "file_sound.png", "file_column.png"); */ //Specific to BD resources->audiovideo_color = DKGREY; //Specific to BD - Copied from Blonde, replace letters //clock font resources->medium_7segment = new_image_set(20, "black_0.png", "black_1.png", "black_2.png", "black_3.png", "black_4.png", "black_5.png", "black_6.png", "black_7.png", "black_8.png", "black_9.png", "black_colon.png", "black_period.png", "black_a.png", "black_b.png", "black_c.png", "black_d.png", "black_e.png", "black_f.png", "black_space.png", "black_dash.png"); //Specific to BD //tooltip resources->tooltip_bg_color = 0xfff7e3; }
MainWindow::MainWindow(bool r) : BaseWindow(), ru(r) { ///////////////////////////////////// data = new Data(); //SpamTeacher -- рабочее название this->setWindowTitle(tr("MassDelivery")); ///////////////////////////////////// //установка текста в поля ввода из data std::string text; text = data->get_message_about_sender(); senderEdit = new_edit(text.c_str()); text = data->get_message_about_receiver(); receiverEdit = new_edit(text.c_str()); text = data->get_message_about_atachment(); atachEdit = new_edit(text.c_str()); ///////////////////////////////////// ((QLineEdit*)senderEdit)->setReadOnly(1); ((QLineEdit*)receiverEdit)->setReadOnly(1); ((QLineEdit*)atachEdit)->setReadOnly(1); ///////////////////////////////////// //установка текста в поле для ввода сообщения QWidget *view; view = new QTextEdit(); text = data->message; ((QTextEdit*)view)->setPlainText(text.c_str()); ///////////////////////////////////////// messageEdit = view; //////////////////////////////////////// //создание кнопок и подцепление к ним сигналов senderButton = new_button(tr("Sender options").toStdString().c_str()); receiverButton = new_button(tr("Receivers options").toStdString().c_str()); atachButton = new_button(tr("Atachments options(files)").toStdString().c_str()); messageButton = new_button(tr("Send message").toStdString().c_str()); //////////////////////////////////////// connect(senderButton,SIGNAL(clicked()),this,SLOT(sender_slot())); connect(receiverButton,SIGNAL(clicked()),this,SLOT(receiver_slot())); connect(atachButton,SIGNAL(clicked()),this,SLOT(atach_slot())); connect(messageButton,SIGNAL(clicked()),this,SLOT(message_slot())); //////////////////////////////////////// //создание кнопок для настроек QWidget* settingsButton[setNum]; settingsButton[0] = new_button(tr("Name").toStdString().c_str()); settingsButton[1] = new_button(tr("Gender").toStdString().c_str()); //settingsButton[2] = new_button(tr("Quote").toStdString().c_str()); //////////////////////////////////////// connect(settingsButton[0],SIGNAL(clicked()),this,SLOT(name_slot())); connect(settingsButton[1],SIGNAL(clicked()),this,SLOT(gender_slot())); //connect(settingsButton[2],SIGNAL(clicked()),this,SLOT(quote_slot())); //////////////////////////////////////// QLayout* messageSettings = new QGridLayout(); for (int i=0; i<setNum; i++) { ((QLayout*)messageSettings)->addWidget(settingsButton[i]); } QWidget* label; label = new_label(tr("Title:")); themeEdit = new_edit(data->theme.c_str()); ((QLayout*)messageSettings)->addWidget(label); ((QLayout*)messageSettings)->addWidget(themeEdit); ///////////////////////////////////// //упаковка всего box[0] = new QHBoxLayout(); box[1] = new QHBoxLayout(); box[2] = new QHBoxLayout(); box[3] = new QVBoxLayout(); ///////////////////////////////////// ((QLayout*)box[0])->addWidget(senderEdit); ((QLayout*)box[0])->addWidget(senderButton); ((QLayout*)box[1])->addWidget(receiverEdit); ((QLayout*)box[1])->addWidget(receiverButton); ((QLayout*)box[2])->addWidget(atachEdit); ((QLayout*)box[2])->addWidget(atachButton); ((QBoxLayout*)box[3])->addLayout(messageSettings); ((QLayout*)box[3])->addWidget(messageEdit); ((QLayout*)box[3])->addWidget(messageButton); ///////////////////////////////////// vbox = new QVBoxLayout(); ///////////////////////////////////// create_actions(); QWidget* menu = new Menu(this); vbox->setMenuBar(menu); for (int i=0; i<4; i++) { ((QBoxLayout*)vbox)->addLayout(box[i]); } this->setLayout(vbox); this->show(); }
int window_init(window_t* window) { LOG int error; int i; if (window->draw) { /* initialize video */ if (!vg_init(window->video_mode)) { printf("window_init: vg_init failed.\n"); return -1; } } window->redraw = 0; window->done = 0; /* init font system */ error = vg_init_FreeType(); if (error) { printf("window_init: vg_init_FreeType failed with error code %d.\n", error); return error; } error = window_set_title(window, "cnix %s", "0.2"); if (error) { printf("window_init: window_set_title failed with error code %d.\n", error); return error; } error = window_set_log_message(window, ""); if (error) { printf("window_init: window_set_log_message failed with error code %d.\n", error); return error; } error = window_set_size(window, window->draw ? vg_get_h_res() : 1024, window->draw ? vg_get_v_res() : 768); if (error) { printf("window_init: window_set_size failed with error code %d.\n", error); return error; } /* set up tabs */ window->current_tab = -1; for (i = 0; i < TAB_COUNT; ++i) window->tabs[i] = NULL; //window->tabs[0] = tab_create("#1"); //window->tabs[1] = tab_create("#2"); //window->tabs[2] = tab_create("#3"); //window->tabs[3] = tab_create("#4"); //window->tabs[4] = tab_create("#5"); //window->tabs[5] = tab_create("#6"); //window->tabs[6] = tab_create("#7"); //window->tabs[7] = tab_create("#8"); //window->tabs[8] = tab_create("#9"); //window->tabs[9] = tab_create("#10"); //window->tabs[10] = tab_create("#11"); window->tabs[11] = tab_create("#console"); window->current_tab = TAB_CONSOLE; window->prev_current_tab = window->current_tab; window->date = NULL; /* initialize interrupt handlers */ int_init(); /* install mouse */ error = window_install_mouse(window); if (error) { printf("window_init: window_install_mouse failed with error code %d.\n", error); return error; } printf("window_install: mouse installed with success.\n"); /* install keyboard */ error = keyboard_install(); if (error) { printf("window_init: keyboard_install failed with error code %d.\n", error); return error; } printf("window_init: keyboard installed with success.\n"); /* set up buttons */ new_btn = new_button(869, 5, 20, 20, new_btn_draw, new_btn_click, 1, window); open_btn = new_button(894, 5, 20, 20, open_btn_draw, open_btn_click, 1, window); save_btn = new_button(919, 5, 20, 20, save_btn_draw, save_btn_click, 1, window); make_btn = new_button(944, 5, 20, 20, make_btn_draw, make_btn_click, 1, window); run_btn = new_button(969, 5, 20, 20, run_btn_draw, run_btn_click, 1, window); close_btn = new_button(994, 5, 20, 20, close_btn_draw, close_btn_click, 1, window); window->state = WIN_STATE_NORMAL; return 0; }
void create_display() { //gtk_init(&argc,&argv); display_string[0]='\0'; GtkWidget *window,*button,*box,*panel,*line; window=gtk_window_new(GTK_WINDOW_TOPLEVEL); gtk_window_set_title(GTK_WINDOW(window),"Amrutansu's Calculator"); gtk_window_set_default_size(GTK_WINDOW(window),450,450); g_signal_connect(G_OBJECT(window),"destroy",G_CALLBACK(gtk_main_quit),NULL); box=gtk_box_new(GTK_ORIENTATION_VERTICAL,20); //display=gtk_label_new(); //add label panel=gtk_box_new(GTK_ORIENTATION_VERTICAL,10); //FIRST LINE IN BUTTON PANEL line=gtk_box_new(GTK_ORIENTATION_HORIZONTAL,10); for(int i=9;i>6;i--) { button=new_button(i); //char temp[4]; //sprintf(temp,"%d",i); gtk_box_pack_start((GtkBox *)line,button,TRUE,TRUE,5); gtk_widget_show(button); } button=gtk_button_new_with_label("+"); g_signal_connect(G_OBJECT(button),"clicked",G_CALLBACK(change_display),(gpointer)"+"); gtk_box_pack_start((GtkBox *)line,button,TRUE,TRUE,5); gtk_widget_show(button); gtk_box_pack_start((GtkBox *)panel,line,TRUE,TRUE,5); gtk_widget_show(line); //SECOND LINE IN BUTTON PANEL line=gtk_box_new(GTK_ORIENTATION_HORIZONTAL,10); for(int i=6;i>3;i--) { button=new_button(i); gtk_box_pack_start((GtkBox *)line,button,TRUE,TRUE,5); gtk_widget_show(button); } button=gtk_button_new_with_label("-"); g_signal_connect(G_OBJECT(button),"clicked",G_CALLBACK(change_display),(gpointer)"-"); gtk_box_pack_start((GtkBox *)line,button,TRUE,TRUE,5); gtk_widget_show(button); gtk_box_pack_start((GtkBox *)panel,line,TRUE,TRUE,5); gtk_widget_show(line); //THIRD LINE IN BUTTON PANEL line=gtk_box_new(GTK_ORIENTATION_HORIZONTAL,10); for(int i=3;i>0;i--) { button=new_button(i); gtk_box_pack_start((GtkBox *)line,button,TRUE,TRUE,5); gtk_widget_show(button); } button=gtk_button_new_with_label("*"); g_signal_connect(G_OBJECT(button),"clicked",G_CALLBACK(change_display),(gpointer)"*"); gtk_box_pack_start((GtkBox *)line,button,TRUE,TRUE,5); gtk_widget_show(button); gtk_box_pack_start((GtkBox *)panel,line,TRUE,TRUE,5); gtk_widget_show(line); //FOURTH LINE IN BUTTON PANEL line=gtk_box_new(GTK_ORIENTATION_HORIZONTAL,10); button=new_button(0); gtk_box_pack_start((GtkBox *)line,button,TRUE,TRUE,5); gtk_widget_show(button); button=gtk_button_new_with_label("."); g_signal_connect(G_OBJECT(button),"clicked",G_CALLBACK(change_display),(gpointer)"."); gtk_box_pack_start((GtkBox *)line,button,TRUE,TRUE,5); gtk_widget_show(button); button=gtk_button_new_with_label("<-"); g_signal_connect(G_OBJECT(button),"clicked",G_CALLBACK(remove_last_display),NULL); //Change gtk_box_pack_start((GtkBox *)line,button,TRUE,TRUE,5); gtk_widget_show(button); button=gtk_button_new_with_label("/"); g_signal_connect(G_OBJECT(button),"clicked",G_CALLBACK(change_display),(gpointer)"/"); gtk_box_pack_start((GtkBox *)line,button,TRUE,TRUE,5); gtk_widget_show(button); gtk_box_pack_start((GtkBox *)panel,line,TRUE,TRUE,5); gtk_widget_show(line); //FIFTH LINE IN BUTTON PANEL line=gtk_box_new(GTK_ORIENTATION_HORIZONTAL,10); button=gtk_button_new_with_label("("); g_signal_connect(G_OBJECT(button),"clicked",G_CALLBACK(change_display),(gpointer)"("); gtk_box_pack_start((GtkBox *)line,button,TRUE,TRUE,5); gtk_widget_show(button); button=gtk_button_new_with_label(")"); g_signal_connect(G_OBJECT(button),"clicked",G_CALLBACK(change_display),(gpointer)")"); gtk_box_pack_start((GtkBox *)line,button,TRUE,TRUE,5); gtk_widget_show(button); button=gtk_button_new_with_label("clr"); g_signal_connect(G_OBJECT(button),"clicked",G_CALLBACK(remove_display),NULL); gtk_box_pack_start((GtkBox *)line,button,TRUE,TRUE,3); gtk_widget_show(button); button=gtk_button_new_with_label("="); g_signal_connect(G_OBJECT(button),"clicked",G_CALLBACK(solve),NULL); gtk_box_pack_start((GtkBox *)line,button,TRUE,TRUE,5); gtk_widget_show(button); gtk_box_pack_start((GtkBox *)panel,line,TRUE,TRUE,5); gtk_widget_show(line); disp=gtk_entry_new(); gtk_entry_set_text((GtkEntry *)disp,display_string); gtk_box_pack_start((GtkBox *)box,disp,TRUE,TRUE,5); gtk_widget_show(disp); gtk_box_pack_start((GtkBox *)box,panel,TRUE,TRUE,5); gtk_widget_show(panel); gtk_container_add(GTK_CONTAINER(window),box); gtk_widget_show(box); gtk_widget_show(window); gtk_main(); }
/* * Do all the bar display and register the events */ static void bar_start (GooCanvas *theCanvas) { GcomprisProperties *properties = gc_prop_get(); RsvgHandle *svg_handle; GooCanvasBounds bounds; _default_y = BOARDHEIGHT - BARHEIGHT; _default_zoom = 1.0; bar_reset_sound_id(); rootitem = goo_canvas_group_new (goo_canvas_get_root_item(theCanvas), NULL); svg_handle = gc_skin_rsvg_get(); bar_item = goo_canvas_svg_new (rootitem, svg_handle, "svg-id", "#BAR_BG", "pointer-events", GOO_CANVAS_EVENTS_NONE, NULL); SET_ITEM_LOCATION(bar_item, 0, 0); /* * The Order in which buttons are created represents * also the order in which they will be displayed */ // EXIT if(properties->disable_quit == 0) buttons = g_slist_append(buttons, new_button(rootitem, svg_handle, GC_BAR_EXIT, "#EXIT")); // ABOUT buttons = g_slist_append(buttons, new_button(rootitem, svg_handle, GC_BAR_ABOUT, "#ABOUT")); // CONFIG if(properties->disable_config == 0) buttons = g_slist_append(buttons, new_button(rootitem, svg_handle, GC_BAR_CONFIG, "#CONFIG")); // HELP buttons = g_slist_append(buttons, new_button(rootitem, svg_handle, GC_BAR_HELP, "#HELP")); // LEVEL (Multiple buttons for this one) GooCanvasItem *rootitem_level = goo_canvas_group_new (rootitem, NULL); g_object_set (rootitem_level, "visibility", GOO_CANVAS_ITEM_VISIBLE, NULL); g_object_set_data (G_OBJECT(rootitem_level), "flag", GUINT_TO_POINTER(GC_BAR_LEVEL)); buttons = g_slist_append(buttons, rootitem_level); GooCanvasItem *item = new_button(rootitem_level, svg_handle, GC_BAR_LEVEL_DOWN, "#LEVEL_DOWN"); g_object_set (item, "visibility", (properties->disable_level ? GOO_CANVAS_ITEM_INVISIBLE : GOO_CANVAS_ITEM_VISIBLE), NULL); item = new_button(rootitem_level, svg_handle, GC_BAR_LEVEL, "#LEVEL_UP"); goo_canvas_item_translate(item, 50, 0); g_object_set (item, "visibility", (properties->disable_level ? GOO_CANVAS_ITEM_INVISIBLE : GOO_CANVAS_ITEM_VISIBLE), NULL); goo_canvas_item_get_bounds(item, &bounds); level_item = goo_canvas_text_new (rootitem_level, "", bounds.x1 - 10, (bounds.y2 - bounds.y1) / 2 + 8, -1, GTK_ANCHOR_CENTER, "font", gc_skin_font_board_title_bold, "fill-color-rgba", gc_skin_color_text_button, NULL); current_level = 1; // REPEAT (Default) buttons = g_slist_append(buttons, new_button(rootitem, svg_handle, GC_BAR_REPEAT, "#REPEAT")); // REPEAT ICON buttons = g_slist_append(buttons, new_button(rootitem, svg_handle, GC_BAR_REPEAT_ICON, "#REPEAT")); // HOME buttons = g_slist_append(buttons, new_button(rootitem, svg_handle, GC_BAR_HOME, "#HOME")); update_exit_button(); bar_set(0); _hidden = FALSE; }
static WIDGET *create_win_elements(s32 elements, int x, int y, int width, int height) { s32 dx,dy,dw,dh; WIDGET *first=NULL; dx = bsize; dy = bsize + tsize; dw = width - 2*bsize; dh = height - 2*bsize - tsize; if ((elements & WIN_CLOSER) | (elements & WIN_FULLER) | (elements & WIN_TITLE)) { dy -= tsize; dh += tsize; } if (elements & WIN_BORDERS) { dy -= bsize; dx -= bsize; dw += 2*bsize; dh += 2*bsize; } dx += x; dy += y; if (elements & WIN_BORDERS) { first=new_button(first,dx,dy+bsize,bsize,dh-bsize-bsize,NULL,resize_callback,WE_L); first=new_button(first,dx,dy,bsize,bsize,NULL,resize_callback,WE_L+WE_O); first=new_button(first,dx+bsize,dy,dw-bsize-bsize,bsize,NULL,resize_callback,WE_O); first=new_button(first,dx+dw-bsize,dy,bsize,bsize,NULL,resize_callback,WE_O+WE_R); first=new_button(first,dx+dw-bsize,dy+bsize,bsize,dh-bsize-bsize,NULL,resize_callback,WE_R); first=new_button(first,dx+dw-bsize,dy+dh-bsize,bsize,bsize,NULL,resize_callback,WE_R+WE_U); first=new_button(first,dx+bsize,dy+dh-bsize,dw-2*bsize,bsize,NULL,resize_callback,WE_U); first=new_button(first,dx,dy+dh-bsize,bsize,bsize,NULL,resize_callback,WE_L+WE_U); dx+=bsize;dy+=bsize;dw-=bsize*2;dh-=bsize*2; } if (elements & WIN_CLOSER) { first=new_button(first,dx,dy,tsize,tsize,"",close_callback,WE_CLOSER); dx+=tsize;dw-=tsize; } if (elements & WIN_FULLER) { first=new_button(first,dx+dw-tsize,dy,tsize,tsize,"",NULL,WE_FULLER); dw-=tsize; } if ((elements & WIN_TITLE) | (elements & WIN_CLOSER) | (elements & WIN_FULLER)) { first=new_button(first,dx,dy,dw,tsize,"MTK WINDOW",move_callback,WE_TITLE); dy+=tsize;dh-=tsize; } return first; }
//####################################################################################### void scrollbar(tScrollBar *settings, tControlCommandData* control_comand) { if(settings == NULL) return; if(control_comand->Comand != Control_Nop) { /* Parse commands */ #ifdef NO_ENUM_ON_SWITCH switch((unsigned char)control_comand->Comand) #else switch((int)control_comand->Comand) #endif { case Control_Entire_Repaint: settings->Internals.NeedEntireRepaint = true; return; case Control_Entire_Refresh: settings->Internals.NeedEntireRefresh = true; return; case Control_Refresh: settings->Internals.NeedEntireRefresh = true; break; case Control_Set_Position_X: settings->Position.X = (signed int)control_comand->Data; return; case Control_Set_Position_Y: settings->Position.Y = (signed int)control_comand->Data; return; case Control_Set_Size_X: settings->Size.X = (signed int)control_comand->Data; return; case Control_Set_Size_Y: settings->Size.X = (signed int)control_comand->Data; return; case Control_Set_Enabled: settings->Enabled = (bool)control_comand->Data; return; case Control_Set_Visible: settings->Visible = (bool)control_comand->Data; return; } } tWindow *ParentWindow = (tWindow*)settings->Internals.ParentWindow; if(settings->Internals.Control.Initiated == false) { if(ParentWindow) { settings->Internals.Position.X = settings->Position.X + ParentWindow->Internals.Position.X + settings->Internals.PositionOffset.X; settings->Internals.Position.Y = settings->Position.Y + ParentWindow->Internals.Position.Y + settings->Internals.PositionOffset.Y; } else { settings->Internals.Position.X = settings->Position.X; settings->Internals.Position.Y = settings->Position.Y; } settings->Internals.Size.X = settings->Size.X; settings->Internals.Size.Y = settings->Size.Y; settings->Internals.OldMinimum = settings->Minimum; settings->Internals.OldMaximum = settings->Maximum; settings->Internals.OldValue = settings->Value; settings->Internals.BtnSettings = new_button(settings->Internals.ParentWindow); tButton* ButtonSettings = settings->Internals.BtnSettings; ButtonSettings->Internals.NoPaintBackGround = false; ButtonSettings->Internals.ContinuouslyPushTimerDisabled = true; ButtonSettings->Enabled = settings->Enabled; ButtonSettings->Color.Scren = settings->Color.Scren; settings->Internals.BtnUpSettings = new_button(settings->Internals.ParentWindow); tButton* BtnUpSettings = settings->Internals.BtnUpSettings; BtnUpSettings->Internals.NoPaintBackGround = true; BtnUpSettings->Enabled = settings->Enabled; BtnUpSettings->Color.Scren = settings->Color.Scren; settings->Internals.BtnDnSettings = new_button(settings->Internals.ParentWindow); tButton* BtnDnSettings = settings->Internals.BtnDnSettings; BtnDnSettings->Internals.NoPaintBackGround = true; BtnDnSettings->Enabled = settings->Enabled; BtnDnSettings->Color.Scren = settings->Color.Scren; if(settings->Size.X < settings->Size.Y) { settings->Internals.BtnSettings->Position.X = 2; settings->Internals.BtnSettings->Position.Y = settings->Size.X; settings->Internals.BtnSettings->Internals.PositionOffset.Y = settings->Internals.Position.Y - ParentWindow->Internals.Position.Y; settings->Internals.BtnSettings->Internals.PositionOffset.X = settings->Internals.Position.X - ParentWindow->Internals.Position.X; BtnUpSettings->Position.X = 2; BtnUpSettings->Position.Y = 2; BtnUpSettings->Internals.PositionOffset.X = settings->Internals.Position.X; BtnUpSettings->Internals.PositionOffset.Y = settings->Internals.Position.Y; BtnUpSettings->Size.X = settings->Internals.Size.X - 4; BtnUpSettings->Size.Y = settings->Internals.Size.X - 4; BtnDnSettings->Position.X = 2; BtnDnSettings->Position.Y = settings->Internals.Size.Y - (settings->Internals.Size.X - 2); BtnDnSettings->Internals.PositionOffset.X = settings->Internals.Position.X; BtnDnSettings->Internals.PositionOffset.Y = settings->Internals.Position.Y; BtnDnSettings->Size.X = settings->Internals.Size.X - 4; BtnDnSettings->Size.Y = settings->Internals.Size.X - 4; } else { settings->Internals.BtnSettings->Position.X = settings->Size.Y; settings->Internals.BtnSettings->Position.Y = 2; settings->Internals.BtnSettings->Internals.PositionOffset.X = settings->Internals.Position.X - ParentWindow->Internals.Position.X; settings->Internals.BtnSettings->Internals.PositionOffset.Y = settings->Internals.Position.Y - ParentWindow->Internals.Position.Y; /* Left */ BtnUpSettings->Position.X = 2; BtnUpSettings->Position.Y = 2; BtnUpSettings->Internals.PositionOffset.X = settings->Internals.Position.X; BtnUpSettings->Internals.PositionOffset.Y = settings->Internals.Position.Y; BtnUpSettings->Size.X = settings->Internals.Size.Y - 4; BtnUpSettings->Size.Y = settings->Internals.Size.Y - 4; /* Right */ BtnDnSettings->Position.X = settings->Internals.Size.X - (settings->Internals.Size.Y - 2); BtnDnSettings->Position.Y = 2; BtnDnSettings->Internals.PositionOffset.X = settings->Internals.Position.X; BtnDnSettings->Internals.PositionOffset.Y = settings->Internals.Position.Y; BtnDnSettings->Size.X = settings->Internals.Size.Y - 4; BtnDnSettings->Size.Y = settings->Internals.Size.Y - 4; } //settings->Internals.BtnSettings->Color.Scren = settings->Color.Enabled.Buton.Pull; } if(settings->Value > settings->Maximum) settings->Value = settings->Maximum; if(settings->Value < settings->Minimum) settings->Value = settings->Minimum; /* Verify if position on size has been modified */ if(ParentWindow) { if(((settings->Position.X + ParentWindow->Internals.Position.X + settings->Internals.PositionOffset.X) != settings->Internals.Position.X || (settings->Position.Y + ParentWindow->Internals.Position.Y + settings->Internals.PositionOffset.Y) != settings->Internals.Position.Y || settings->Size.X != settings->Internals.Size.X || settings->Size.Y != settings->Internals.Size.Y || settings->Size.MinBtnSize != settings->Internals.Size.MinBtnSize || settings->Minimum != settings->Internals.OldMinimum|| settings->Maximum != settings->Internals.OldMaximum || settings->Value != settings->Internals.OldValue || settings->Internals.OldStateEnabled != settings->Enabled || ParentWindow->Internals.OldStateEnabled != settings->Internals.ParentWindowStateEnabled) && settings->Visible == true) settings->Internals.NeedEntireRefresh = true; } else { if((settings->Position.X != settings->Internals.Position.X || settings->Position.Y != settings->Internals.Position.Y || settings->Size.X != settings->Internals.Size.X || settings->Size.Y != settings->Internals.Size.Y || settings->Size.MinBtnSize != settings->Internals.Size.MinBtnSize || settings->Minimum != settings->Internals.OldMinimum|| settings->Maximum != settings->Internals.OldMaximum || settings->Internals.OldStateEnabled != settings->Enabled || settings->Value != settings->Internals.OldValue) && settings->Visible == true) settings->Internals.NeedEntireRefresh = true; } signed int X_StartBox = settings->Internals.Position.X; signed int Y_StartBox = settings->Internals.Position.Y; signed int X_LenBox = settings->Internals.Size.X; signed int Y_LenBox = settings->Internals.Size.Y; tDisplay *pDisplay = settings->Internals.pDisplay; /*Clear background of box with actual painted dimensions and positions if they been changed*/ if(settings->Internals.NeedEntireRefresh == true || settings->Internals.OldStateVisible != settings->Visible) { if(!settings->Internals.NoPaintBackGround || !settings->Visible) { settings->Internals.OldStateVisible = settings->Visible; tRectangle back_up_clip = pDisplay->sClipRegion; pDisplay->sClipRegion.sXMin = X_StartBox; pDisplay->sClipRegion.sYMin = Y_StartBox; pDisplay->sClipRegion.sXMax = X_StartBox + X_LenBox; pDisplay->sClipRegion.sYMax = Y_StartBox + Y_LenBox; clip_limit(&pDisplay->sClipRegion, &back_up_clip); put_rectangle(pDisplay, X_StartBox, Y_StartBox, X_LenBox, Y_LenBox, true, settings->Color.Scren); box_cache_clean(pDisplay, X_StartBox, Y_StartBox, X_LenBox, Y_LenBox); pDisplay->sClipRegion = back_up_clip; if(!settings->Visible) return; } settings->Internals.NeedEntireRefresh = true; } /* Verify if is Entire refresh, entire repaint, or state changed */ if((settings->Internals.NeedEntireRefresh == true || settings->Internals.NeedEntireRepaint == true || settings->Internals.Control.Initiated == false) && settings->Visible == true) { /* Copy new locations and dimensions to actual locations and dimensions */ if(ParentWindow) { settings->Internals.Position.X = settings->Position.X + ParentWindow->Internals.Position.X + settings->Internals.PositionOffset.X; settings->Internals.Position.Y = settings->Position.Y + ParentWindow->Internals.Position.Y + settings->Internals.PositionOffset.Y; } else { settings->Internals.Position.X = settings->Position.X; settings->Internals.Position.Y = settings->Position.Y; } settings->Internals.Size.X = settings->Size.X; settings->Internals.Size.Y = settings->Size.Y; settings->Internals.Size.MinBtnSize = settings->Size.MinBtnSize; settings->Internals.OldMinimum = settings->Minimum; settings->Internals.OldMaximum = settings->Maximum; if((settings->Size.X == 0 || settings->Size.Y == 0) && settings->Internals.Control.Initiated == true ) return; if(settings->Value > settings->Maximum) settings->Value = settings->Internals.OldMaximum; if(settings->Value < settings->Minimum) settings->Value = settings->Internals.OldMinimum; X_StartBox = settings->Internals.Position.X; Y_StartBox = settings->Internals.Position.Y; X_LenBox = settings->Internals.Size.X; Y_LenBox = settings->Internals.Size.Y; //CursorState _cursor = control_comand->Cursor; //control_comand->Cursor = Cursor_Up; tRectangle back_up_clip = pDisplay->sClipRegion; pDisplay->sClipRegion.sXMin = X_StartBox; pDisplay->sClipRegion.sYMin = Y_StartBox; pDisplay->sClipRegion.sXMax = X_StartBox + X_LenBox; pDisplay->sClipRegion.sYMax = Y_StartBox + Y_LenBox; clip_limit(&pDisplay->sClipRegion, &back_up_clip); if(settings->Size.X < settings->Size.Y) { settings->Internals.BtnSettings->Position.X = 2; settings->Internals.BtnSettings->Position.Y = settings->Size.X; settings->Internals.BtnSettings->Internals.PositionOffset.Y = settings->Internals.Position.Y - ParentWindow->Internals.Position.Y; settings->Internals.BtnSettings->Internals.PositionOffset.X = settings->Internals.Position.X - ParentWindow->Internals.Position.X; } else { settings->Internals.BtnSettings->Position.X = settings->Size.Y; settings->Internals.BtnSettings->Position.Y = 2; settings->Internals.BtnSettings->Internals.PositionOffset.X = settings->Internals.Position.X - ParentWindow->Internals.Position.X; settings->Internals.BtnSettings->Internals.PositionOffset.Y = settings->Internals.Position.Y - ParentWindow->Internals.Position.Y; } paint_scrollbar(settings, pDisplay, X_StartBox, Y_StartBox, X_LenBox, Y_LenBox, control_comand); pDisplay->sClipRegion = back_up_clip; //control_comand->Cursor = _cursor; settings->Internals.ParentWindowStateEnabled = ParentWindow->Internals.OldStateEnabled; settings->Internals.OldStateVisible = settings->Visible; settings->Internals.OldStateEnabled = settings->Enabled; settings->Internals.Control.Initiated = true; settings->Internals.NeedEntireRefresh = false; settings->Internals.NeedEntireRepaint = false; control_comand->WindowRefresh |= true; } if(settings->Internals.OldStateCursor != control_comand->Cursor && settings->Enabled == true && settings->Visible == true) { settings->Internals.OldStateCursor = control_comand->Cursor; } tRectangle back_up_clip = pDisplay->sClipRegion; pDisplay->sClipRegion.sXMin = X_StartBox; pDisplay->sClipRegion.sYMin = Y_StartBox; pDisplay->sClipRegion.sXMax = X_StartBox + X_LenBox; pDisplay->sClipRegion.sYMax = Y_StartBox + Y_LenBox; clip_limit(&pDisplay->sClipRegion, &back_up_clip); if(control_comand->Cursor)paint_scrollbar(settings, pDisplay, X_StartBox, Y_StartBox, X_LenBox, Y_LenBox, control_comand); pDisplay->sClipRegion = back_up_clip; bool inside_window = check_if_inside_box(X_StartBox, Y_StartBox, X_LenBox, Y_LenBox, control_comand->X, control_comand->Y); bool _inside_window = check_if_inside_box(pDisplay->sClipRegion.sXMin, pDisplay->sClipRegion.sYMin, pDisplay->sClipRegion.sXMax - pDisplay->sClipRegion.sXMin, pDisplay->sClipRegion.sYMax - pDisplay->sClipRegion.sYMin, control_comand->X, control_comand->Y); if(!_inside_window) inside_window = false; if(inside_window == true && control_comand->Cursor == Cursor_Down) settings->Internals.CursorDownInsideBox = true; if(settings->Internals.CursorDownInsideBox == true && (control_comand->Cursor == Cursor_Up || control_comand->Cursor == Cursor_NoAction)) settings->Internals.CursorDownInsideBox = false; //control_comand->WindowRefresh |= true; //control_comand->CursorCoordonateUsed |= settings->Internals.CursorDownInsideBox; }
void* toggle_button_new0(void *parent, char *bg[], int x, int y, void *f, void *arg) { return new_button(parent, bg, x, y, f, arg, 1); }
void MicroTheme::initialize() { //printf("MicroTheme::initialize 1\n"); mwindow_icon = new VFrame(get_image("mwindow_icon.png")); vwindow_icon = new VFrame(get_image("mwindow_icon.png")); cwindow_icon = new VFrame(get_image("mwindow_icon.png")); awindow_icon = new VFrame(get_image("mwindow_icon.png")); record_icon = new VFrame(get_image("mwindow_icon.png")); clip_icon = new VFrame(get_image("clip_icon.png")); static VFrame *default_patchbay_bg = new VFrame(get_image("patchbay_bg.png")); BC_WindowBase::get_resources()->bg_color = WHITE; BC_WindowBase::get_resources()->menu_light = WHITE; BC_WindowBase::get_resources()->menu_highlighted = WHITE; BC_WindowBase::get_resources()->menu_down = LTGREY; BC_WindowBase::get_resources()->menu_up = WHITE; BC_WindowBase::get_resources()->menu_shadow = MEGREY; BC_WindowBase::get_resources()->medium_font = "-*-helvetica-medium-r-normal-*-10-*"; static VFrame* default_listbox_bg = new VFrame(get_image("patchbay_bg.png")); BC_WindowBase::get_resources()->listbox_bg = default_listbox_bg; BC_WindowBase::get_resources()->button_light = WHITE; BC_WindowBase::get_resources()->button_up = WHITE; static VFrame *default_cancel_images[] = { new VFrame(get_image("cancel_up.png")), new VFrame(get_image("cancel_hi.png")), new VFrame(get_image("cancel_dn.png")) }; BC_WindowBase::get_resources()->cancel_images = default_cancel_images; static VFrame *default_ok_images[] = { new VFrame(get_image("ok_up.png")), new VFrame(get_image("ok_hi.png")), new VFrame(get_image("ok_dn.png")) }; BC_WindowBase::get_resources()->ok_images = default_ok_images; static VFrame *default_button_images[] = { new VFrame(get_image("generic_up.png")), new VFrame(get_image("generic_hi.png")), new VFrame(get_image("generic_dn.png")) }; BC_WindowBase::get_resources()->generic_button_images = default_button_images; static VFrame *default_tumble_images[] = { new VFrame(get_image("tumble_up.png")), new VFrame(get_image("tumble_hi.png")), new VFrame(get_image("tumble_bottomdn.png")), new VFrame(get_image("tumble_topdn.png")) }; BC_WindowBase::get_resources()->tumble_data = default_tumble_images; static VFrame *default_checkbox_images[] = { new VFrame(get_image("checkbox_up.png")), new VFrame(get_image("checkbox_hi.png")), new VFrame(get_image("checkbox_checked.png")), new VFrame(get_image("checkbox_dn.png")), new VFrame(get_image("checkbox_checkedhi.png")) }; BC_WindowBase::get_resources()->checkbox_images = default_checkbox_images; static VFrame *default_radial_images[] = { new VFrame(get_image("radial_up.png")), new VFrame(get_image("radial_hi.png")), new VFrame(get_image("radial_checked.png")), new VFrame(get_image("radial_dn.png")), new VFrame(get_image("radial_checkedhi.png")) }; BC_WindowBase::get_resources()->radial_images = default_radial_images; static VFrame* default_xmeter_data[] = { new VFrame(get_image("xmeter_normal.png")), new VFrame(get_image("xmeter_green.png")), new VFrame(get_image("xmeter_red.png")), new VFrame(get_image("xmeter_yellow.png")), new VFrame(get_image("over_horiz.png")) }; static VFrame* default_ymeter_data[] = { new VFrame(get_image("ymeter_normal.png")), new VFrame(get_image("ymeter_green.png")), new VFrame(get_image("ymeter_red.png")), new VFrame(get_image("ymeter_yellow.png")), new VFrame(get_image("over_vert.png")) }; BC_WindowBase::get_resources()->xmeter_images = default_xmeter_data; BC_WindowBase::get_resources()->ymeter_images = default_ymeter_data; BC_WindowBase::get_resources()->meter_font = SMALLFONT; BC_WindowBase::get_resources()->meter_font_color = BLACK; BC_WindowBase::get_resources()->meter_title_w = 25; BC_WindowBase::get_resources()->meter_3d = 0; static VFrame* default_pan_data[] = { new VFrame(get_image("pan_up.png")), new VFrame(get_image("pan_hi.png")), new VFrame(get_image("pan_popup.png")), new VFrame(get_image("pan_channel.png")), new VFrame(get_image("pan_stick.png")), new VFrame(get_image("pan_channel_small.png")), new VFrame(get_image("pan_stick_small.png")) }; BC_WindowBase::get_resources()->pan_data = default_pan_data; BC_WindowBase::get_resources()->pan_text_color = BLACK; static VFrame *default_hscroll_data[] = { new VFrame(get_image("hscroll_handle_up.png")), new VFrame(get_image("hscroll_handle_hi.png")), new VFrame(get_image("hscroll_handle_dn.png")), new VFrame(get_image("hscroll_handle_bg.png")), new VFrame(get_image("hscroll_left_up.png")), new VFrame(get_image("hscroll_left_hi.png")), new VFrame(get_image("hscroll_left_dn.png")), new VFrame(get_image("hscroll_right_up.png")), new VFrame(get_image("hscroll_right_hi.png")), new VFrame(get_image("hscroll_right_dn.png")) }; static VFrame *default_vscroll_data[] = { new VFrame(get_image("vscroll_handle_up.png")), new VFrame(get_image("vscroll_handle_hi.png")), new VFrame(get_image("vscroll_handle_dn.png")), new VFrame(get_image("vscroll_handle_bg.png")), new VFrame(get_image("vscroll_left_up.png")), new VFrame(get_image("vscroll_left_hi.png")), new VFrame(get_image("vscroll_left_dn.png")), new VFrame(get_image("vscroll_right_up.png")), new VFrame(get_image("vscroll_right_hi.png")), new VFrame(get_image("vscroll_right_dn.png")) }; BC_WindowBase::get_resources()->hscroll_data = default_hscroll_data; BC_WindowBase::get_resources()->vscroll_data = default_vscroll_data; channel_bg_data = new VFrame(get_image("channel_bg.png")); channel_position_data = new VFrame(get_image("channel_position.png")); channel_position_color = BLACK; recordgui_fixed_color = BLACK; recordgui_variable_color = RED; patchbay_bg = default_patchbay_bg; resource1024_bg_data = new VFrame(get_image("resource1024.png")); resource512_bg_data = new VFrame(get_image("resource512.png")); resource256_bg_data = new VFrame(get_image("resource256.png")); resource128_bg_data = new VFrame(get_image("resource128.png")); resource64_bg_data = new VFrame(get_image("resource64.png")); resource32_bg_data = new VFrame(get_image("resource32.png")); plugin_bg_data = new VFrame(get_image("plugin_bg.png")); title_bg_data = new VFrame(get_image("title_bg.png")); timebar_bg_data = new VFrame(get_image("timebar_bg.png")); vtimebar_bg_data = new VFrame(get_image("vwindow_timebar.png")); new_button("pane.png", "pane_up.png", "pane_hi.png", "pane_dn.png", "pane"); keyframe_data = new VFrame(get_image("keyframe3.png")); camerakeyframe_data = new VFrame(get_image("camerakeyframe.png")); maskkeyframe_data = new VFrame(get_image("maskkeyframe.png")); modekeyframe_data = new VFrame(get_image("modekeyframe.png")); pankeyframe_data = new VFrame(get_image("pankeyframe.png")); projectorkeyframe_data = new VFrame(get_image("projectorkeyframe.png")); VFrame editpanel_up(get_image("editpanel_up.png")); VFrame editpanel_hi(get_image("editpanel_hi.png")); VFrame editpanel_dn(get_image("editpanel_dn.png")); VFrame editpanel_checked(get_image("editpanel_checked.png")); VFrame editpanel_checkedhi(get_image("editpanel_checkedhi.png")); static VFrame *default_inpoint[] = { new VFrame(get_image("out_up.png")), new VFrame(get_image("out_hi.png")), new VFrame(get_image("out_checked.png")), new VFrame(get_image("out_dn.png")), new VFrame(get_image("out_checkedhi.png")) }; static VFrame *default_labeltoggle[] = { new VFrame(get_image("labeltoggle_up.png")), new VFrame(get_image("labeltoggle_uphi.png")), new VFrame(get_image("label_checked.png")), new VFrame(get_image("labeltoggle_dn.png")), new VFrame(get_image("label_checkedhi.png")) }; static VFrame *default_outpoint[] = { new VFrame(get_image("in_up.png")), new VFrame(get_image("in_hi.png")), new VFrame(get_image("in_checked.png")), new VFrame(get_image("in_dn.png")), new VFrame(get_image("in_checkedhi.png")) }; static VFrame *transport_bg[] = { new VFrame(get_image("transportup.png")), new VFrame(get_image("transporthi.png")), new VFrame(get_image("transportdn.png")) }; static VFrame *patches_bg[] = { new VFrame(get_image("patches_up.png")), new VFrame(get_image("patches_hi.png")), new VFrame(get_image("patches_checked.png")), new VFrame(get_image("patches_dn.png")), new VFrame(get_image("patches_checkedhi.png")) }; build_button(BC_WindowBase::get_resources()->filebox_updir_images, get_image("filebox_updir.png"), &editpanel_up, &editpanel_hi, &editpanel_dn); build_button(BC_WindowBase::get_resources()->filebox_newfolder_images, get_image("filebox_newfolder.png"), &editpanel_up, &editpanel_hi, &editpanel_dn); build_button(BC_WindowBase::get_resources()->filebox_icons_images, get_image("filebox_icons.png"), &editpanel_up, &editpanel_hi, &editpanel_dn); build_button(BC_WindowBase::get_resources()->filebox_text_images, get_image("filebox_text.png"), &editpanel_up, &editpanel_hi, &editpanel_dn); build_button(BC_WindowBase::get_resources()->listbox_button, get_image("listbox_button.png"), &editpanel_up, &editpanel_hi, &editpanel_dn); build_button(bottom_justify, get_image("bottom_justify.png"), &editpanel_up, &editpanel_hi, &editpanel_dn); build_button(center_justify, get_image("center_justify.png"), &editpanel_up, &editpanel_hi, &editpanel_dn); build_button(copy_data, get_image("copy.png"), &editpanel_up, &editpanel_hi, &editpanel_dn); build_button(cut_data, get_image("cut.png"), &editpanel_up, &editpanel_hi, &editpanel_dn); build_button(fit_data, get_image("fit.png"), &editpanel_up, &editpanel_hi, &editpanel_dn); build_button(in_data, get_image("outpoint.png"), &editpanel_up, &editpanel_hi, &editpanel_dn); build_button(indelete_data, get_image("clearinpoint.png"), &editpanel_up, &editpanel_hi, &editpanel_dn); build_button(labelbutton_data, get_image("label.png"), &editpanel_up, &editpanel_hi, &editpanel_dn); build_button(left_justify, get_image("left_justify.png"), &editpanel_up, &editpanel_hi, &editpanel_dn); build_button(magnify_button_data, get_image("magnify.png"), &editpanel_up, &editpanel_hi, &editpanel_dn); build_button(middle_justify, get_image("middle_justify.png"), &editpanel_up, &editpanel_hi, &editpanel_dn); build_button(nextlabel_data, get_image("nextlabel.png"), &editpanel_up, &editpanel_hi, &editpanel_dn); build_button(out_data, get_image("inpoint.png"), &editpanel_up, &editpanel_hi, &editpanel_dn); build_button(outdelete_data, get_image("clearoutpoint.png"), &editpanel_up, &editpanel_hi, &editpanel_dn); build_button(over_button, get_image("over.png"), &editpanel_up, &editpanel_hi, &editpanel_dn); build_button(overwrite_data, get_image("overwrite.png"), &editpanel_up, &editpanel_hi, &editpanel_dn); build_button(paste_data, get_image("paste.png"), &editpanel_up, &editpanel_hi, &editpanel_dn); build_button(prevlabel_data, get_image("prevlabel.png"), &editpanel_up, &editpanel_hi, &editpanel_dn); build_button(redo_data, get_image("redo.png"), &editpanel_up, &editpanel_hi, &editpanel_dn); build_button(right_justify, get_image("right_justify.png"), &editpanel_up, &editpanel_hi, &editpanel_dn); build_button(splice_data, get_image("splice.png"), &editpanel_up, &editpanel_hi, &editpanel_dn); build_button(statusbar_cancel_data, get_image("cancel_small.png"), &editpanel_up, &editpanel_hi, &editpanel_dn); build_button(toclip_data, get_image("toclip.png"), &editpanel_up, &editpanel_hi, &editpanel_dn); build_button(top_justify, get_image("top_justify.png"), &editpanel_up, &editpanel_hi, &editpanel_dn); build_button(undo_data, get_image("undo.png"), &editpanel_up, &editpanel_hi, &editpanel_dn); build_toggle(arrow_data, get_image("arrow.png"), &editpanel_up, &editpanel_hi, &editpanel_checked, &editpanel_dn, &editpanel_checkedhi); build_toggle(autokeyframe_data, get_image("autokeyframe.png"), &editpanel_up, &editpanel_hi, &editpanel_checked, &editpanel_dn, &editpanel_checkedhi); build_toggle(camera_data, get_image("camera.png"), &editpanel_up, &editpanel_hi, &editpanel_checked, &editpanel_dn, &editpanel_checkedhi); build_toggle(crop_data, get_image("crop.png"), &editpanel_up, &editpanel_hi, &editpanel_checked, &editpanel_dn, &editpanel_checkedhi); build_toggle(ibeam_data, get_image("ibeam.png"), &editpanel_up, &editpanel_hi, &editpanel_checked, &editpanel_dn, &editpanel_checkedhi); build_toggle(magnify_data, get_image("magnify.png"), &editpanel_up, &editpanel_hi, &editpanel_checked, &editpanel_dn, &editpanel_checkedhi); build_toggle(mask_data, get_image("mask.png"), &editpanel_up, &editpanel_hi, &editpanel_checked, &editpanel_dn, &editpanel_checkedhi); build_toggle(proj_data, get_image("projector.png"), &editpanel_up, &editpanel_hi, &editpanel_checked, &editpanel_dn, &editpanel_checkedhi); build_toggle(protect_data, get_image("protect.png"), &editpanel_up, &editpanel_hi, &editpanel_checked, &editpanel_dn, &editpanel_checkedhi); build_toggle(show_meters, get_image("show_meters.png"), &editpanel_up, &editpanel_hi, &editpanel_checked, &editpanel_dn, &editpanel_checkedhi); build_toggle(titlesafe_data, get_image("titlesafe.png"), &editpanel_up, &editpanel_hi, &editpanel_checked, &editpanel_dn, &editpanel_checkedhi); build_toggle(tool_data, get_image("toolwindow.png"), &editpanel_up, &editpanel_hi, &editpanel_checked, &editpanel_dn, &editpanel_checkedhi); build_transport(duplex_data, get_image("duplex.png"), transport_bg, 1); build_transport(end_data, get_image("end.png"), transport_bg, 2); build_transport(fastfwd_data, get_image("fastfwd.png"), transport_bg, 1); build_transport(fastrev_data, get_image("fastrev.png"), transport_bg, 1); build_transport(forward_data, get_image("play.png"), transport_bg, 1); build_transport(framefwd_data, get_image("framefwd.png"), transport_bg, 1); build_transport(framefwd_data, get_image("framefwd.png"), transport_bg, 1); build_transport(framerev_data, get_image("framerev.png"), transport_bg, 1); build_transport(rec_data, get_image("record.png"), transport_bg, 1); build_transport(recframe_data, get_image("singleframe.png"), transport_bg, 1); build_transport(reverse_data, get_image("reverse.png"), transport_bg, 1); build_transport(rewind_data, get_image("rewind.png"), transport_bg, 0); build_transport(stop_data, get_image("stop.png"), transport_bg, 1); build_transport(stoprec_data, get_image("stoprec.png"), transport_bg, 2); build_patches(playpatch_data, get_image("playpatch.png"), patches_bg, 0); build_patches(recordpatch_data, get_image("recordpatch.png"), patches_bg, 1); build_patches(gangpatch_data, get_image("gangpatch.png"), patches_bg, 1); build_patches(drawpatch_data, get_image("drawpatch.png"), patches_bg, 1); build_patches(mutepatch_data, get_image("mutepatch.png"), patches_bg, 2); static VFrame *default_expandpatch_data[] = { new VFrame(get_image("expandpatch_up.png")), new VFrame(get_image("expandpatch_hi.png")), new VFrame(get_image("expandpatch_checked.png")), new VFrame(get_image("expandpatch_dn.png")), new VFrame(get_image("expandpatch_checkedhi.png")) }; expandpatch_data = default_expandpatch_data; build_button(channel_data, get_image("channel.png"), &editpanel_up, &editpanel_hi, &editpanel_dn); build_button(wrench_data, get_image("wrench.png"), &editpanel_up, &editpanel_hi, &editpanel_dn); in_point = default_inpoint; label_toggle = default_labeltoggle; out_point = default_outpoint; fade_h = BC_WindowBase::get_resources()->horizontal_slider_data[0]->get_h(); mode_h = BC_WindowBase::get_resources()->generic_button_images[0]->get_h(); meter_h = BC_WindowBase::get_resources()->xmeter_images[0]->get_h(); pan_h = BC_WindowBase::get_resources()->pan_data[PAN_UP]->get_h(); play_h = playpatch_data[0]->get_h(); title_h = 18; pan_x = 25; title_font = MEDIUMFONT; title_color = BLACK; loadmode_w = 250; flush_images(); //printf("MicroTheme::initialize 2\n"); }
LevelSelectScreen::LevelSelectScreen() :goBackButton("Images/go_back.png") { goBackButton.callBack = &my_callBack_goBackMenu; goBackButton.setPosition(700, 500); buttonManager_level.addButton("go_back", std::make_shared<UserButton>(goBackButton)); if(!backTexture.loadFromFile("Background/background.png")) { std::cout << "Error: could not load grid image!" << std::endl; } if(!zero_star.loadFromFile("LevelScreen/zero_star.png")) { std::cout << "Error: could not load zero_star image!" << std::endl; } if(!one_star.loadFromFile("LevelScreen/one_star.png")) { std::cout << "Error: could not load one_star image!" << std::endl; } if(!two_star.loadFromFile("LevelScreen/two_star.png")) { std::cout << "Error: could not load two star image!" << std::endl; } if(!three_star.loadFromFile("LevelScreen/three_star.png")) { std::cout << "Error: could not load three star image!" << std::endl; } if(!lock.loadFromFile("LevelScreen/lock.png")) { std::cout << "Error: could not load lock image!" << std::endl; } if(!font.loadFromFile("Font/comic.ttf")) { std::cout << "Error: could not load font file!" << std::endl; } LevelManager *level = LevelManager::getInstance(); std::map<std::string, LevelInfo> curr_info = level->levelMap; std::map<std::string, LevelInfo>::iterator it = curr_info.begin(); int num = 0; for(; it!=curr_info.end(); it++) { int y = num / 7; int x = num - 7*y; x = 60 + 100 * x; y = 60 + 100 * y; if((*it).second.getStarNum() != -1) { std::string level_name; if(load_mode == 0) { level_name = "LevelScreen/" + (*it).first; level_name += "_button.png"; } if(load_mode == 1) { level_name = "LevelScreen/user_level_button.png"; } UserButton new_button(level_name); sf::Sprite new_star; if((*it).second.getStarNum() == 0) { new_star.setTexture(zero_star); } else if((*it).second.getStarNum() == 1) { new_star.setTexture(one_star); } else if((*it).second.getStarNum() == 2) { new_star.setTexture(two_star); } else if((*it).second.getStarNum() == 3) { new_star.setTexture(three_star); } new_star.setPosition((float)x, (float)y); level_stars.push_back(new_star); new_button.setPosition((float)x, (float)y); new_button.callBack = &my_callBack_playlevel; buttonManager_level.addButton((*it).first, std::make_shared<UserButton>(new_button)); int u = 0; if(load_mode == 1) { sf::Text sfLevelName; sfLevelName.setFont(font); sfLevelName.setString((*it).first.substr(9)); sfLevelName.setStyle(sf::Text::Bold); //sfLevelName.setCharacterSize(22); int strLen = (*it).first.substr(9).size(); int size = (22-(strLen-5)*2); sfLevelName.setCharacterSize(size); /* while(bound.width > 70) { size--; sfLevelName.setCharacterSize(size); bound = sfLevelName.getLocalBounds(); } */ sf::FloatRect bound = sfLevelName.getLocalBounds(); sfLevelName.setColor(sf::Color::Magenta); double leftMargin = 40 - bound.width/2; double upMargin = 40 - bound.height/2; sfLevelName.setPosition((float)(x+leftMargin), (float)(y + upMargin + 5)); textMap.insert(std::pair<std::string, sf::Text>((*it).first, sfLevelName)); } } else { sf::Sprite lock_level; lock_level.setTexture(lock); lock_level.setPosition((float)x, (float)y); level_lock.push_back(lock_level); } num ++; } }
void SUV::initialize() { BC_Resources *resources = BC_WindowBase::get_resources(); resources->text_default = 0xbfbfbf; resources->text_background = 0x373737; resources->text_border1 = 0x202020; resources->text_border2 = 0x373737; resources->text_border3 = 0x373737; resources->text_border4 = 0x969696; resources->text_inactive_highlight = 0x707070; resources->bg_color = 0x484848; resources->default_text_color = 0xbfbfbf; resources->menu_title_text = 0xbfbfbf; resources->popup_title_text = 0xbfbfbf; resources->menu_item_text = 0xbfbfbf; resources->menu_highlighted_fontcolor = WHITE; resources->generic_button_margin = 30; resources->pot_needle_color = resources->text_default; resources->pot_offset = 1; resources->progress_text = resources->text_default; resources->meter_font_color = resources->default_text_color; resources->menu_light = 0xababab; resources->menu_highlighted = 0x6f6f6f; resources->menu_down = 0x4b4b4b; resources->menu_up = 0x4b4b4b; resources->menu_shadow = 0x202020; resources->popupmenu_margin = 10; resources->popupmenu_triangle_margin = 15; resources->listbox_title_color = 0xbfbfbf; resources->listbox_title_margin = 20; resources->listbox_title_hotspot = 20; resources->listbox_border1 = 0x1a1a1a; resources->listbox_border2 = 0x373737; resources->listbox_border3 = 0x373737; resources->listbox_border4 = 0x646464; resources->listbox_highlighted = 0x505050; resources->listbox_inactive = 0x373737; resources->listbox_bg = 0; resources->listbox_text = 0xbfbfbf; resources->filebox_margin = 130; resources->file_color = 0xbfbfbf; resources->directory_color = 0xa0a0ff; resources->filebox_icons_images = new_button("icons.png", "fileboxbutton_up.png", "fileboxbutton_hi.png", "fileboxbutton_dn.png"); resources->filebox_text_images = new_button("text.png", "fileboxbutton_up.png", "fileboxbutton_hi.png", "fileboxbutton_dn.png"); resources->filebox_newfolder_images = new_button("folder.png", "fileboxbutton_up.png", "fileboxbutton_hi.png", "fileboxbutton_dn.png"); resources->filebox_updir_images = new_button("updir.png", "fileboxbutton_up.png", "fileboxbutton_hi.png", "fileboxbutton_dn.png"); resources->filebox_delete_images = new_button("delete.png", "fileboxbutton_up.png", "fileboxbutton_hi.png", "fileboxbutton_dn.png"); resources->filebox_reload_images = new_button("reload.png", "fileboxbutton_up.png", "fileboxbutton_hi.png", "fileboxbutton_dn.png"); resources->filebox_descend_images = new_button("openfolder.png", "filebox_bigbutton_up.png", "filebox_bigbutton_hi.png", "filebox_bigbutton_dn.png"); resources->usethis_button_images = resources->ok_images = new_button("ok.png", "filebox_bigbutton_up.png", "filebox_bigbutton_hi.png", "filebox_bigbutton_dn.png"); new_button("ok.png", "new_bigbutton_up.png", "new_bigbutton_hi.png", "new_bigbutton_dn.png", "new_ok_images"); resources->cancel_images = new_button("cancel.png", "filebox_bigbutton_up.png", "filebox_bigbutton_hi.png", "filebox_bigbutton_dn.png"); new_button("cancel.png", "new_bigbutton_up.png", "new_bigbutton_hi.png", "new_bigbutton_dn.png", "new_cancel_images"); resources->bar_data = new_image("bar", "bar.png"); resources->min_menu_w = 96; resources->menu_popup_bg = new_image("menu_popup_bg.png"); resources->menu_item_bg = new_image_set(3, "menuitem_up.png", "menuitem_hi.png", "menuitem_dn.png"); resources->menu_bar_bg = new_image("menubar_bg.png"); resources->menu_title_bg = new_image_set(3, "menubar_up.png", "menubar_hi.png", "menubar_dn.png"); resources->popupmenu_images = 0; // new_image_set(3, // "menupopup_up.png", // "menupopup_hi.png", // "menupopup_dn.png"); resources->toggle_highlight_bg = new_image("toggle_highlight_bg", "text_highlight.png"); resources->generic_button_images = new_image_set(3, "generic_up.png", "generic_hi.png", "generic_dn.png"); resources->horizontal_slider_data = new_image_set(6, "hslider_fg_up.png", "hslider_fg_hi.png", "hslider_fg_dn.png", "hslider_bg_up.png", "hslider_bg_hi.png", "hslider_bg_dn.png"); resources->progress_images = new_image_set(2, "progress_bg.png", "progress_hi.png"); resources->tumble_data = new_image_set(4, "tumble_up.png", "tumble_hi.png", "tumble_bottom.png", "tumble_top.png"); resources->listbox_button = new_button4("listbox_button.png", "editpanel_up.png", "editpanel_hi.png", "editpanel_dn.png", "editpanel_hi.png"); resources->listbox_column = new_image_set(3, "column_up.png", "column_hi.png", "column_dn.png"); resources->listbox_up = new_image("listbox_up.png"); resources->listbox_dn = new_image("listbox_dn.png"); resources->pan_data = new_image_set(7, "pan_up.png", "pan_hi.png", "pan_popup.png", "pan_channel.png", "pan_stick.png", "pan_channel_small.png", "pan_stick_small.png"); resources->pan_text_color = WHITE; resources->pot_images = new_image_set(3, "pot_up.png", "pot_hi.png", "pot_dn.png"); resources->checkbox_images = new_image_set(5, "checkbox_up.png", "checkbox_hi.png", "checkbox_checked.png", "checkbox_dn.png", "checkbox_checkedhi.png"); resources->radial_images = new_image_set(5, "radial_up.png", "radial_hi.png", "radial_checked.png", "radial_dn.png", "radial_checkedhi.png"); resources->xmeter_images = new_image_set(6, "xmeter_normal.png", "xmeter_green.png", "xmeter_red.png", "xmeter_yellow.png", "xmeter_white.png", "xmeter_over.png"); resources->ymeter_images = new_image_set(6, "ymeter_normal.png", "ymeter_green.png", "ymeter_red.png", "ymeter_yellow.png", "ymeter_white.png", "ymeter_over.png"); resources->hscroll_data = new_image_set(10, "hscroll_handle_up.png", "hscroll_handle_hi.png", "hscroll_handle_dn.png", "hscroll_handle_bg.png", "hscroll_left_up.png", "hscroll_left_hi.png", "hscroll_left_dn.png", "hscroll_right_up.png", "hscroll_right_hi.png", "hscroll_right_dn.png"); resources->vscroll_data = new_image_set(10, "vscroll_handle_up.png", "vscroll_handle_hi.png", "vscroll_handle_dn.png", "vscroll_handle_bg.png", "vscroll_left_up.png", "vscroll_left_hi.png", "vscroll_left_dn.png", "vscroll_right_up.png", "vscroll_right_hi.png", "vscroll_right_dn.png"); new_button("prevtip.png", "tipbutton_up.png", "tipbutton_hi.png", "tipbutton_dn.png", "prev_tip"); new_button("nexttip.png", "tipbutton_up.png", "tipbutton_hi.png", "tipbutton_dn.png", "next_tip"); new_button("closetip.png", "tipbutton_up.png", "tipbutton_hi.png", "tipbutton_dn.png", "close_tip"); new_button("swap_extents.png", "editpanel_up.png", "editpanel_hi.png", "editpanel_dn.png", "swap_extents"); // Record windows rgui_batch = new_image("recordgui_batch.png"); rgui_controls = new_image("recordgui_controls.png"); rgui_list = new_image("recordgui_list.png"); rmonitor_panel = new_image("recordmonitor_panel.png"); rmonitor_meters = new_image("recordmonitor_meters.png"); preferences_category_overlap = 0; preferencescategory_x = 0; preferencescategory_y = 5; preferencestitle_x = 5; preferencestitle_y = 10; preferencesoptions_x = 5; preferencesoptions_y = 0; // MWindow message_normal = resources->text_default; audio_color = GREEN; mtransport_margin = 10; toggle_margin = 10; new_image("mbutton_bg", "mbutton_bg.png"); new_image("timebar_bg", "timebar_bg_flat.png"); new_image("timebar_brender", "timebar_brender.png"); new_image("clock_bg", "mclock_flat.png"); new_image("patchbay_bg", "patchbay_bg.png"); new_image("statusbar", "statusbar.png"); new_image("mscroll_filler", "mscroll_filler.png"); new_image_set("zoombar_menu", 3, "zoompopup_up.png", "zoompopup_hi.png", "zoompopup_dn.png"); new_image_set("zoombar_tumbler", 4, "zoomtumble_up.png", "zoomtumble_hi.png", "zoomtumble_bottom.png", "zoomtumble_top.png"); new_image_set("mode_popup", 3, "mode_up.png", "mode_hi.png", "mode_dn.png"); new_image("mode_add", "mode_add.png"); new_image("mode_divide", "mode_divide.png"); new_image("mode_multiply", "mode_multiply.png"); new_image("mode_normal", "mode_normal.png"); new_image("mode_replace", "mode_replace.png"); new_image("mode_subtract", "mode_subtract.png"); new_image("mode_max", "mode_max.png"); new_image_set("plugin_on", 5, "plugin_on.png", "plugin_onhi.png", "plugin_onselect.png", "plugin_ondn.png", "plugin_onselecthi.png"); new_image_set("plugin_show", 5, "plugin_show.png", "plugin_showhi.png", "plugin_showselect.png", "plugin_showdn.png", "plugin_showselecthi.png"); // CWindow new_image("cpanel_bg", "cpanel_bg.png"); new_image("cbuttons_left", "cbuttons_left.png"); new_image("cbuttons_right", "cbuttons_right.png"); new_image("cmeter_bg", "cmeter_bg.png"); // VWindow new_image("vbuttons_left", "vbuttons_left.png"); new_image("vclock", "vclock.png"); new_image("preferences_bg", "preferences_bg.png"); new_image("new_bg", "new_bg.png"); new_image("setformat_bg", "setformat_bg.png"); timebar_view_data = new_image("timebar_view.png"); setformat_w = get_image("setformat_bg")->get_w(); setformat_h = get_image("setformat_bg")->get_h(); setformat_x1 = 15; setformat_x2 = 120; setformat_x3 = 315; setformat_x4 = 435; setformat_y1 = 20; setformat_y2 = 85; setformat_y3 = 125; setformat_margin = 30; setformat_channels_x = 25; setformat_channels_y = 242; setformat_channels_w = 250; setformat_channels_h = 250; loadfile_pad = 50; browse_pad = 20; new_toggle("playpatch.png", "patch_up.png", "patch_hi.png", "patch_checked.png", "patch_dn.png", "patch_checkedhi.png", "playpatch_data"); new_toggle("recordpatch.png", "patch_up.png", "patch_hi.png", "patch_checked.png", "patch_dn.png", "patch_checkedhi.png", "recordpatch_data"); new_toggle("gangpatch.png", "patch_up.png", "patch_hi.png", "patch_checked.png", "patch_dn.png", "patch_checkedhi.png", "gangpatch_data"); new_toggle("drawpatch.png", "patch_up.png", "patch_hi.png", "patch_checked.png", "patch_dn.png", "patch_checkedhi.png", "drawpatch_data"); new_image_set("mutepatch_data", 5, "mutepatch_up.png", "mutepatch_hi.png", "mutepatch_checked.png", "mutepatch_dn.png", "mutepatch_checkedhi.png"); new_image_set("expandpatch_data", 5, "expandpatch_up.png", "expandpatch_hi.png", "expandpatch_checked.png", "expandpatch_dn.png", "expandpatch_checkedhi.png"); build_icons(); build_bg_data(); build_overlays(); out_point = new_image_set(5, "out_up.png", "out_hi.png", "out_checked.png", "out_dn.png", "out_checkedhi.png"); in_point = new_image_set(5, "in_up.png", "in_hi.png", "in_checked.png", "in_dn.png", "in_checkedhi.png"); label_toggle = new_image_set(5, "labeltoggle_up.png", "labeltoggle_uphi.png", "label_checked.png", "labeltoggle_dn.png", "label_checkedhi.png"); statusbar_cancel_data = new_image_set(3, "statusbar_cancel_up.png", "statusbar_cancel_hi.png", "statusbar_cancel_dn.png"); VFrame *editpanel_up = new_image("editpanel_up.png"); VFrame *editpanel_hi = new_image("editpanel_hi.png"); VFrame *editpanel_dn = new_image("editpanel_dn.png"); VFrame *editpanel_checked = new_image("editpanel_checked.png"); VFrame *editpanel_checkedhi = new_image("editpanel_checkedhi.png"); new_image("panel_divider", "panel_divider.png"); new_button("bottom_justify.png", editpanel_up, editpanel_hi, editpanel_dn, "bottom_justify"); new_button("center_justify.png", editpanel_up, editpanel_hi, editpanel_dn, "center_justify"); new_button("channel.png", editpanel_up, editpanel_hi, editpanel_dn, "channel"); new_button("copy.png", editpanel_up, editpanel_hi, editpanel_dn, "copy"); new_button("cut.png", editpanel_up, editpanel_hi, editpanel_dn, "cut"); new_button("fit.png", editpanel_up, editpanel_hi, editpanel_dn, "fit"); new_button("fitautos.png", editpanel_up, editpanel_hi, editpanel_dn, "fitautos"); new_button("inpoint.png", editpanel_up, editpanel_hi, editpanel_dn, "inbutton"); new_button("label.png", editpanel_up, editpanel_hi, editpanel_dn, "labelbutton"); new_button("left_justify.png", editpanel_up, editpanel_hi, editpanel_dn, "left_justify"); new_button("magnify.png", editpanel_up, editpanel_hi, editpanel_dn, "magnify_button"); new_button("middle_justify.png", editpanel_up, editpanel_hi, editpanel_dn, "middle_justify"); new_button("nextlabel.png", editpanel_up, editpanel_hi, editpanel_dn, "nextlabel"); new_button("outpoint.png", editpanel_up, editpanel_hi, editpanel_dn, "outbutton"); over_button = new_button("over.png", editpanel_up, editpanel_hi, editpanel_dn); overwrite_data = new_button("overwrite.png", editpanel_up, editpanel_hi, editpanel_dn); new_button("paste.png", editpanel_up, editpanel_hi, editpanel_dn, "paste"); new_button("prevlabel.png", editpanel_up, editpanel_hi, editpanel_dn, "prevlabel"); new_button("redo.png", editpanel_up, editpanel_hi, editpanel_dn, "redo"); new_button("right_justify.png", editpanel_up, editpanel_hi, editpanel_dn, "right_justify"); splice_data = new_button("splice.png", editpanel_up, editpanel_hi, editpanel_dn); new_button("toclip.png", editpanel_up, editpanel_hi, editpanel_dn, "toclip"); new_button("goto.png", editpanel_up, editpanel_hi, editpanel_dn, "goto"); new_button("top_justify.png", editpanel_up, editpanel_hi, editpanel_dn, "top_justify"); new_button("undo.png", editpanel_up, editpanel_hi, editpanel_dn, "undo"); new_button("wrench.png", editpanel_up, editpanel_hi, editpanel_dn, "wrench"); VFrame *transport_up = new_image("transportup.png"); VFrame *transport_hi = new_image("transporthi.png"); VFrame *transport_dn = new_image("transportdn.png"); new_button("end.png", transport_up, transport_hi, transport_dn, "end"); new_button("fastfwd.png", transport_up, transport_hi, transport_dn, "fastfwd"); new_button("fastrev.png", transport_up, transport_hi, transport_dn, "fastrev"); new_button("play.png", transport_up, transport_hi, transport_dn, "play"); new_button("framefwd.png", transport_up, transport_hi, transport_dn, "framefwd"); new_button("framerev.png", transport_up, transport_hi, transport_dn, "framerev"); new_button("pause.png", transport_up, transport_hi, transport_dn, "pause"); new_button("record.png", transport_up, transport_hi, transport_dn, "record"); new_button("singleframe.png", transport_up, transport_hi, transport_dn, "recframe"); new_button("reverse.png", transport_up, transport_hi, transport_dn, "reverse"); new_button("rewind.png", transport_up, transport_hi, transport_dn, "rewind"); new_button("stop.png", transport_up, transport_hi, transport_dn, "stop"); new_button("stop.png", transport_up, transport_hi, transport_dn, "stoprec"); // CWindow icons new_image("cwindow_inactive", "cwindow_inactive.png"); new_image("cwindow_active", "cwindow_active.png"); new_image_set("batch_render_start", 3, "batchstart_up.png", "batchstart_hi.png", "batchstart_dn.png"); new_image_set("batch_render_stop", 3, "batchstop_up.png", "batchstop_hi.png", "batchstop_dn.png"); new_image_set("batch_render_cancel", 3, "batchcancel_up.png", "batchcancel_hi.png", "batchcancel_dn.png"); new_image_set("category_button", 3, "preferencesbutton_dn.png", "preferencesbutton_dnhi.png", "preferencesbutton_dnlo.png"); new_image_set("category_button_checked", 3, "preferencesbutton_up.png", "preferencesbutton_uphi.png", "preferencesbutton_dnlo.png"); new_image_set("color3way_point", 3, "color3way_up.png", "color3way_hi.png", "color3way_dn.png"); new_toggle("arrow.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "arrow"); new_toggle("autokeyframe.png", transport_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "autokeyframe"); new_toggle("ibeam.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "ibeam"); new_toggle("show_meters.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "meters"); new_toggle("blank30x30.png", new_image("locklabels_locked.png"), new_image("locklabels_lockedhi.png"), new_image("locklabels_unlocked.png"), new_image("locklabels_dn.png"), // can't have seperate down for each!!?? new_image("locklabels_unlockedhi.png"), "locklabels"); VFrame *cpanel_up = new_image("cpanel_up.png"); VFrame *cpanel_hi = new_image("cpanel_hi.png"); VFrame *cpanel_dn = new_image("cpanel_dn.png"); VFrame *cpanel_checked = new_image("cpanel_checked.png"); VFrame *cpanel_checkedhi = new_image("cpanel_checkedhi.png"); new_toggle("camera.png", cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi, "camera"); new_toggle("crop.png", cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi, "crop"); new_toggle("eyedrop.png", cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi, "eyedrop"); new_toggle("magnify.png", cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi, "magnify"); new_toggle("mask.png", cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi, "mask"); new_toggle("ruler.png", cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi, "ruler"); new_toggle("projector.png", cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi, "projector"); new_toggle("protect.png", cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi, "protect"); new_toggle("titlesafe.png", cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi, "titlesafe"); new_toggle("toolwindow.png", cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi, "tool"); // toggle for tangent mode (compositor/tool window) new_toggle("tan_smooth.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "tan_smooth"); new_toggle("tan_linear.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "tan_linear"); flush_images(); title_font = MEDIUMFONT_3D; title_color = 0xbfbfbf; recordgui_fixed_color = YELLOW; recordgui_variable_color = RED; channel_position_color = MEYELLOW; resources->meter_title_w = 25; // (asset) edit info text color edit_font_color = YELLOW; }
void BlondTheme::initialize() { BC_Resources *resources = BC_WindowBase::get_resources(); resources->text_default = 0x000000; resources->text_background = 0xffffff; resources->text_border1 = 0x4a484a; // (top outer) resources->text_border2 = 0x000000; // (top inner) resources->text_border3 = 0xacaeac; // (bottom inner) resources->text_border4 = 0xffffff; // (bottom outer) resources->text_inactive_highlight = 0xacacac; resources->bg_color = BLOND; resources->default_text_color = 0x000000; resources->menu_title_text = 0x000000; resources->popup_title_text = 0x000000; resources->menu_item_text = 0x000000; resources->generic_button_margin = 15; resources->pot_needle_color = resources->text_default; resources->pot_offset = 1; resources->progress_text = resources->text_default; resources->meter_font_color = RED; resources->menu_light = 0x00cacd; resources->menu_highlighted = 0x9c95ff; resources->menu_down = 0x007d7b; resources->menu_up = 0x009594; resources->menu_shadow = 0x004a4a; resources->popupmenu_margin = 10; // ugly resources->popupmenu_triangle_margin = 15; // ugly resources->listbox_title_color = 0x000000; resources->listbox_title_margin = 0; resources->listbox_title_hotspot = 5; // No. of pixels around the borders to allow dragging resources->listbox_border1 = 0x4a484a; // (top outer) resources->listbox_border2 = 0x000000; // (top inner) resources->listbox_border3 = 0xffe200; // (bottom inner) resources->listbox_border4 = 0xffffff; // (bottom outer) resources->listbox_highlighted = 0xeee6ee; resources->listbox_inactive = 0xffffffff; // (background) resources->listbox_bg = new_image("list_bg.png"); resources->listbox_text = 0x000000; resources->dirbox_margin = 50; resources->filebox_margin = 101; resources->file_color = 0x000000; resources->directory_color = 0x0000ff; resources->filebox_icons_images = new_button("icons.png", "fileboxbutton_up.png", "fileboxbutton_hi.png", "fileboxbutton_dn.png"); resources->filebox_text_images = new_button("text.png", "fileboxbutton_up.png", "fileboxbutton_hi.png", "fileboxbutton_dn.png"); resources->filebox_newfolder_images = new_button("folder.png", "fileboxbutton_up.png", "fileboxbutton_hi.png", "fileboxbutton_dn.png"); resources->filebox_updir_images = new_button("updir.png", "fileboxbutton_up.png", "fileboxbutton_hi.png", "fileboxbutton_dn.png"); resources->filebox_delete_images = new_button("delete.png", "fileboxbutton_up.png", "fileboxbutton_hi.png", "fileboxbutton_dn.png"); resources->filebox_reload_images = new_button("reload.png", "fileboxbutton_up.png", "fileboxbutton_hi.png", "fileboxbutton_dn.png"); resources->filebox_descend_images = new_button("openfolder.png", "generic_up.png", "generic_hi.png", "generic_dn.png"); resources->usethis_button_images = resources->ok_images = new_button("ok.png", "generic_up.png", "generic_hi.png", "generic_dn.png"); new_button("ok.png", "generic_up.png", "generic_hi.png", "generic_dn.png", "new_ok_images"); resources->cancel_images = new_button("cancel.png", "generic_up.png", "generic_hi.png", "generic_dn.png"); new_button("cancel.png", "generic_up.png", "generic_hi.png", "generic_dn.png", "new_cancel_images"); resources->bar_data = new_image("bar", "bar.png"); resources->min_menu_w = 0; resources->menu_popup_bg = 0; // if (0) use menu_light, menu_up, menu_shadow resources->menu_item_bg = 0; // if (0) use menu_light, menu_highlighted, menu_down, menu_shadow resources->menu_bar_bg = 0; // if (0) use menu_light, menu_shadow, and height of MEDIUMFONT + 8 resources->menu_title_bg = 0; // if (0) use menu_light, menu_highlighted, menu_down, menu_shadow resources->popupmenu_images = 0; // if (0) get_resources()->use generic_button_images resources->toggle_highlight_bg = 0; // if (0) "Draw a plain box" as per bctoggle.C resources->generic_button_images = new_image_set(3, "generic_up.png", "generic_hi.png", "generic_dn.png"); resources->horizontal_slider_data = new_image_set(6, "hslider_fg_up.png", "hslider_fg_hi.png", "hslider_fg_dn.png", "hslider_bg_up.png", "hslider_bg_hi.png", "hslider_bg_dn.png"); resources->vertical_slider_data = new_image_set(6, "vertical_slider_fg_up.png", "vertical_slider_fg_hi.png", "vertical_slider_fg_dn.png", "vertical_slider_bg_up.png", "vertical_slider_bg_hi.png", "vertical_slider_bg_dn.png"); resources->progress_images = new_image_set(2, "progress_bg.png", "progress_hi.png"); resources->tumble_data = new_image_set(4, "tumble_up.png", "tumble_hi.png", "tumble_bottom.png", "tumble_top.png"); resources->listbox_button = new_image_set(4, "listbox_button_up.png", "listbox_button_hi.png", "listbox_button_dn.png", "listbox_button_disabled.png"); // probably need to make this for the suv theme resources->listbox_column = new_image_set(3, "column_up.png", "column_hi.png", "column_dn.png"); resources->listbox_expand = new_image_set(5, "listbox_expandup.png", "listbox_expanduphi.png", "listbox_expandchecked.png", "listbox_expanddn.png", "listbox_expandcheckedhi.png"); resources->listbox_up = new_image("listbox_up.png"); resources->listbox_dn = new_image("listbox_dn.png"); resources->pan_data = new_image_set(7, "pan_up.png", "pan_hi.png", "pan_popup.png", "pan_channel.png", "pan_stick.png", "pan_channel_small.png", "pan_stick_small.png"); resources->pan_text_color = WHITE; resources->pot_images = new_image_set(3, "pot_up.png", "pot_hi.png", "pot_dn.png"); resources->checkbox_images = new_image_set(5, "checkbox_up.png", "checkbox_hi.png", "checkbox_checked.png", "checkbox_dn.png", "checkbox_checkedhi.png"); resources->radial_images = new_image_set(5, "radial_up.png", "radial_hi.png", "radial_checked.png", "radial_dn.png", "radial_checkedhi.png"); resources->xmeter_images = new_image_set(6, "xmeter_normal.png", "xmeter_green.png", "xmeter_red.png", "xmeter_yellow.png", "xmeter_white.png", "xmeter_over.png"); resources->ymeter_images = new_image_set(6, "ymeter_normal.png", "ymeter_green.png", "ymeter_red.png", "ymeter_yellow.png", "ymeter_white.png", "ymeter_over.png"); resources->hscroll_data = new_image_set(10, "hscroll_handle_up.png", "hscroll_handle_hi.png", "hscroll_handle_dn.png", "hscroll_handle_bg.png", "hscroll_left_up.png", "hscroll_left_hi.png", "hscroll_left_dn.png", "hscroll_right_up.png", "hscroll_right_hi.png", "hscroll_right_dn.png"); resources->vscroll_data = new_image_set(10, "vscroll_handle_up.png", "vscroll_handle_hi.png", "vscroll_handle_dn.png", "vscroll_handle_bg.png", "vscroll_left_up.png", "vscroll_left_hi.png", "vscroll_left_dn.png", "vscroll_right_up.png", "vscroll_right_hi.png", "vscroll_right_dn.png"); new_button("prevtip.png", "tipbutton_up.png", "tipbutton_hi.png", "tipbutton_dn.png", "prev_tip"); new_button("nexttip.png", "tipbutton_up.png", "tipbutton_hi.png", "tipbutton_dn.png", "next_tip"); new_button("closetip.png", "tipbutton_up.png", "tipbutton_hi.png", "tipbutton_dn.png", "close_tip"); new_button("swap_extents.png", "editpanel_up.png", "editpanel_hi.png", "editpanel_dn.png", "swap_extents"); // Record windows rgui_batch = new_image("recordgui_batch.png"); rgui_controls = new_image("recordgui_controls.png"); rgui_list = new_image("recordgui_list.png"); rmonitor_panel = new_image("recordmonitor_panel.png"); rmonitor_meters = new_image("recordmonitor_meters.png"); preferences_category_overlap = 0; preferencescategory_x = 5; preferencescategory_y = 5; preferencestitle_x = 5; preferencestitle_y = 10; preferencesoptions_x = 5; preferencesoptions_y = 0; // MWindow message_normal = resources->text_default; audio_color = BLACK; mtransport_margin = 11; toggle_margin = 11; new_image("mbutton_bg", "mbutton_bg.png"); new_image("mbutton_blue", "mbutton_blue.png"); new_image("timebar_bg", "timebar_bg.png"); new_image("timebar_brender", "timebar_brender.png"); new_image("clock_bg", "mclock.png"); new_image("patchbay_bg", "patchbay_bg.png"); new_image("tracks_bg","tracks_bg.png"); new_image("zoombar_left","zoombar_left.png"); new_image("zoombar_right","zoombar_right.png"); new_image("statusbar_left","statusbar_left.png"); new_image("statusbar_right","statusbar_right.png"); new_image_set("zoombar_menu", 3, "generic_up.png", "generic_hi.png", "generic_dn.png"); new_image_set("zoombar_tumbler", 4, "tumble_up.png", "tumble_hi.png", "tumble_bottom.png", "tumble_top.png"); new_image_set("mode_popup", 3, "generic_up.png", "generic_hi.png", "generic_dn.png"); new_image("mode_add", "mode_add.png"); new_image("mode_divide", "mode_divide.png"); new_image("mode_multiply", "mode_multiply.png"); new_image("mode_normal", "mode_normal.png"); new_image("mode_replace", "mode_replace.png"); new_image("mode_subtract", "mode_subtract.png"); new_image("mode_max", "mode_max.png"); new_toggle("plugin_on.png", "pluginbutton_hi.png", "pluginbutton_hi.png", "pluginbutton_select.png", "pluginbutton_dn.png", "pluginbutton_selecthi.png", "plugin_on"); new_toggle("plugin_show.png", "plugin_show.png", "pluginbutton_hi.png", "pluginbutton_select.png", "pluginbutton_dn.png", "pluginbutton_selecthi.png", "plugin_show"); // CWindow new_image("cpanel_bg", "cpanel_bg.png"); new_image("cbuttons_left", "cbuttons_left.png"); new_image("cbuttons_right", "cbuttons_right.png"); new_image("cmeter_bg", "cmeter_bg.png"); // VWindow new_image("vbuttons_left", "vbuttons_left.png"); new_image("preferences_bg", "preferences_bg.png"); new_image("new_bg", "new_bg.png"); new_image("setformat_bg", "setformat_bg2.png"); timebar_view_data = new_image("timebar_view.png"); setformat_w = get_image("setformat_bg")->get_w(); setformat_h = get_image("setformat_bg")->get_h(); setformat_x1 = 15; setformat_x2 = 100; setformat_x3 = 315; setformat_x4 = 425; setformat_y1 = 20; setformat_y2 = 85; setformat_y3 = 125; setformat_margin = 30; setformat_channels_x = 25; setformat_channels_y = 242; setformat_channels_w = 250; setformat_channels_h = 250; loadfile_pad = 52; browse_pad = 20; new_image_set("playpatch_data", 5, "playpatch_up.png", "playpatch_hi.png", "playpatch_checked.png", "playpatch_dn.png", "playpatch_checkedhi.png"); new_image_set("recordpatch_data", 5, "recordpatch_up.png", "recordpatch_hi.png", "recordpatch_checked.png", "recordpatch_dn.png", "recordpatch_checkedhi.png"); new_image_set("gangpatch_data", 5, "gangpatch_up.png", "gangpatch_hi.png", "gangpatch_checked.png", "gangpatch_dn.png", "gangpatch_checkedhi.png"); new_image_set("drawpatch_data", 5, "drawpatch_up.png", "drawpatch_hi.png", "drawpatch_checked.png", "drawpatch_dn.png", "drawpatch_checkedhi.png"); new_image_set("mutepatch_data", 5, "mutepatch_up.png", "mutepatch_hi.png", "mutepatch_checked.png", "mutepatch_dn.png", "mutepatch_checkedhi.png"); new_image_set("expandpatch_data", 5, "expandpatch_up.png", "expandpatch_hi.png", "expandpatch_checked.png", "expandpatch_dn.png", "expandpatch_checkedhi.png"); build_icons(); build_bg_data(); build_overlays(); out_point = new_image_set(5, "out_up.png", "out_hi.png", "out_checked.png", "out_dn.png", "out_checkedhi.png"); in_point = new_image_set(5, "in_up.png", "in_hi.png", "in_checked.png", "in_dn.png", "in_checkedhi.png"); label_toggle = new_image_set(5, "labeltoggle_up.png", "labeltoggle_uphi.png", "label_checked.png", "labeltoggle_dn.png", "label_checkedhi.png"); statusbar_cancel_data = new_image_set(3, "statusbar_cancel_up.png", "statusbar_cancel_hi.png", "statusbar_cancel_dn.png"); VFrame *editpanel_up = new_image("editpanel_up.png"); VFrame *editpanel_hi = new_image("editpanel_hi.png"); VFrame *editpanel_dn = new_image("editpanel_dn.png"); VFrame *editpanel_checked = new_image("editpanel_checked.png"); VFrame *editpanel_checkedhi = new_image("editpanel_checkedhi.png"); new_image("panel_divider", "panel_divider.png"); new_button("bottom_justify.png", editpanel_up, editpanel_hi, editpanel_dn, "bottom_justify"); new_button("center_justify.png", editpanel_up, editpanel_hi, editpanel_dn, "center_justify"); new_button("channel.png", editpanel_up, editpanel_hi, editpanel_dn, "channel"); new_button("copy.png", editpanel_up, editpanel_hi, editpanel_dn, "copy"); new_button("cut.png", editpanel_up, editpanel_hi, editpanel_dn, "cut"); new_button("fit.png", editpanel_up, editpanel_hi, editpanel_dn, "fit"); new_button("fitautos.png", editpanel_up, editpanel_hi, editpanel_dn, "fitautos"); new_button("inpoint.png", editpanel_up, editpanel_hi, editpanel_dn, "inbutton"); new_button("label.png", editpanel_up, editpanel_hi, editpanel_dn, "labelbutton"); new_button("left_justify.png", editpanel_up, editpanel_hi, editpanel_dn, "left_justify"); new_button("magnify.png", editpanel_up, editpanel_hi, editpanel_dn, "magnify_button"); new_button("middle_justify.png", editpanel_up, editpanel_hi, editpanel_dn, "middle_justify"); new_button("nextlabel.png", editpanel_up, editpanel_hi, editpanel_dn, "nextlabel"); new_button("outpoint.png", editpanel_up, editpanel_hi, editpanel_dn, "outbutton"); over_button = new_button("over.png", editpanel_up, editpanel_hi, editpanel_dn); overwrite_data = new_button("overwrite.png", editpanel_up, editpanel_hi, editpanel_dn); new_button("paste.png", editpanel_up, editpanel_hi, editpanel_dn, "paste"); new_button("prevlabel.png", editpanel_up, editpanel_hi, editpanel_dn, "prevlabel"); new_button("redo.png", editpanel_up, editpanel_hi, editpanel_dn, "redo"); new_button("right_justify.png", editpanel_up, editpanel_hi, editpanel_dn, "right_justify"); splice_data = new_button("splice.png", editpanel_up, editpanel_hi, editpanel_dn); new_button("toclip.png", editpanel_up, editpanel_hi, editpanel_dn, "toclip"); new_button("goto.png", editpanel_up, editpanel_hi, editpanel_dn, "goto"); new_button("top_justify.png", editpanel_up, editpanel_hi, editpanel_dn, "top_justify"); new_button("undo.png", editpanel_up, editpanel_hi, editpanel_dn, "undo"); new_button("wrench.png", editpanel_up, editpanel_hi, editpanel_dn, "wrench"); #define TRANSPORT_LEFT_IMAGES "transport_left_up.png", "transport_left_hi.png", "transport_left_dn.png" #define TRANSPORT_CENTER_IMAGES "transport_center_up.png", "transport_center_hi.png", "transport_center_dn.png" #define TRANSPORT_RIGHT_IMAGES "transport_right_up.png", "transport_right_hi.png", "transport_right_dn.png" new_button("end.png", TRANSPORT_RIGHT_IMAGES, "end"); new_button("fastfwd.png",TRANSPORT_CENTER_IMAGES, "fastfwd"); new_button("fastrev.png",TRANSPORT_CENTER_IMAGES, "fastrev"); new_button("play.png",TRANSPORT_CENTER_IMAGES, "play"); new_button("framefwd.png", TRANSPORT_CENTER_IMAGES, "framefwd"); new_button("framerev.png", TRANSPORT_CENTER_IMAGES, "framerev"); new_button("pause.png", TRANSPORT_CENTER_IMAGES, "pause"); new_button("record.png", TRANSPORT_CENTER_IMAGES, "record"); new_button("singleframe.png", TRANSPORT_CENTER_IMAGES, "recframe"); new_button("reverse.png", TRANSPORT_CENTER_IMAGES, "reverse"); new_button("rewind.png", TRANSPORT_LEFT_IMAGES, "rewind"); new_button("stop.png", TRANSPORT_CENTER_IMAGES, "stop"); new_button("stop.png", TRANSPORT_RIGHT_IMAGES, "stoprec"); // CWindow icons new_image("cwindow_inactive", "cwindow_inactive.png"); new_image("cwindow_active", "cwindow_active.png"); new_image_set("batch_render_start", 3, "batchstart_up.png", "batchstart_hi.png", "batchstart_dn.png"); new_image_set("batch_render_stop", 3, "batchstop_up.png", "batchstop_hi.png", "batchstop_dn.png"); new_image_set("batch_render_cancel", 3, "batchcancel_up.png", "batchcancel_hi.png", "batchcancel_dn.png"); new_image_set("category_button", 3, "preferencesbutton_dn.png", "preferencesbutton_dnhi.png", "preferencesbutton_dnlo.png"); new_image_set("category_button_checked", 3, "preferencesbutton_up.png", "preferencesbutton_uphi.png", "preferencesbutton_dnlo.png"); new_toggle("arrow.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "arrow"); new_toggle("autokeyframe.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "autokeyframe"); new_toggle("ibeam.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "ibeam"); new_toggle("show_meters.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "meters"); VFrame *cpanel_up = new_image("editpanel_up.png"); VFrame *cpanel_hi = new_image("editpanel_hi.png"); VFrame *cpanel_dn = new_image("editpanel_dn.png"); VFrame *cpanel_checked = new_image("editpanel_checked.png"); VFrame *cpanel_checkedhi = new_image("editpanel_checkedhi.png"); new_toggle("blank30x30.png", new_image("locklabels_locked.png"), new_image("locklabels_lockedhi.png"), new_image("locklabels_unlocked.png"), new_image("locklabels_dn.png"), // can't have seperate down for each!!?? new_image("locklabels_unlockedhi.png"), "locklabels"); new_toggle("camera.png", cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi, "camera"); new_toggle("crop.png", cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi, "crop"); new_toggle("eyedrop.png", cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi, "eyedrop"); new_toggle("magnify.png", cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi, "magnify"); new_toggle("mask.png", cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi, "mask"); new_toggle("projector.png", cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi, "projector"); new_toggle("protect.png", cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi, "protect"); new_toggle("titlesafe.png", cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi, "titlesafe"); new_toggle("toolwindow.png", cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi, "tool"); // toggle for tangent mode (compositor/tool window) new_toggle("tan_smooth.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "tan_smooth"); new_toggle("tan_linear.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "tan_linear"); flush_images(); title_font = MEDIUMFONT_3D; title_color = WHITE; recordgui_fixed_color = YELLOW; recordgui_variable_color = RED; resources->medium_font = N_("-*-helvetica-bold-r-normal-*-14-*"); channel_position_color = MEYELLOW; resources->meter_title_w = 25; // (asset) edit info text color edit_font_color = YELLOW; //labels resources->label_images = new_image_set(5, "radial_up.png", "radial_hi.png", "radial_checked.png", "radial_dn.png", "radial_checkedhi.png"); /* resources->type_to_icon = new_image_set(5, "file_folder.png", "file_unknown.png", "file_film.png", "file_sound.png", "file_column.png"); */ }
LUI_NEWBUTTON *LUI_CheckButtonCreate( Window parent, int x, int y, int width, int height, char *label ) { return new_button( parent, x, y, width, height, label, 2 ); }
void DefaultTheme::initialize() { BC_Resources *resources = BC_WindowBase::get_resources(); resources->generic_button_images = new_image_set(3, "generic_up.png", "generic_hi.png", "generic_dn.png"); resources->horizontal_slider_data = new_image_set(6, "hslider_fg_up.png", "hslider_fg_hi.png", "hslider_fg_dn.png", "hslider_bg_up.png", "hslider_bg_hi.png", "hslider_bg_dn.png"); resources->progress_images = new_image_set(2, "progress_bg.png", "progress_hi.png"); resources->tumble_data = new_image_set(4, "tumble_up.png", "tumble_hi.png", "tumble_botdn.png", "tumble_topdn.png"); resources->listbox_button = new_image_set(3, "listbox_button_up.png", "listbox_button_hi.png", "listbox_button_dn.png"); resources->listbox_column = new_image_set(3, "listbox_column_up.png", "listbox_column_hi.png", "listbox_column_dn.png"); resources->pan_data = new_image_set(7, "pan_up.png", "pan_hi.png", "pan_popup.png", "pan_channel.png", "pan_stick.png", "pan_channel_small.png", "pan_stick_small.png"); resources->pan_text_color = WHITE; resources->pot_images = new_image_set(3, "pot_up.png", "pot_hi.png", "pot_dn.png"); resources->checkbox_images = new_image_set(5, "checkbox_up.png", "checkbox_uphi.png", "checkbox_checked.png", "checkbox_down.png", "checkbox_checkedhi.png"); resources->radial_images = new_image_set(5, "radial_up.png", "radial_uphi.png", "radial_checked.png", "radial_down.png", "radial_checkedhi.png"); resources->xmeter_images = new_image_set(6, "xmeter_normal.png", "xmeter_green.png", "xmeter_red.png", "xmeter_yellow.png", "xmeter_white.png", "xmeter_over.png"); resources->ymeter_images = new_image_set(6, "ymeter_normal.png", "ymeter_green.png", "ymeter_red.png", "ymeter_yellow.png", "ymeter_white.png", "ymeter_over.png"); resources->hscroll_data = new_image_set(10, "hscroll_center_up.png", "hscroll_center_hi.png", "hscroll_center_dn.png", "hscroll_bg.png", "hscroll_back_up.png", "hscroll_back_hi.png", "hscroll_back_dn.png", "hscroll_fwd_up.png", "hscroll_fwd_hi.png", "hscroll_fwd_dn.png"); resources->vscroll_data = new_image_set(10, "vscroll_center_up.png", "vscroll_center_hi.png", "vscroll_center_dn.png", "vscroll_bg.png", "vscroll_back_up.png", "vscroll_back_hi.png", "vscroll_back_dn.png", "vscroll_fwd_up.png", "vscroll_fwd_hi.png", "vscroll_fwd_dn.png"); resources->ok_images = new_button("ok.png", "generic_up.png", "generic_hi.png", "generic_dn.png"); resources->cancel_images = new_button("cancel.png", "generic_up.png", "generic_hi.png", "generic_dn.png"); // Record windows rgui_batch = new_image("recordgui_batch.png"); rgui_controls = new_image("recordgui_controls.png"); rgui_list = new_image("recordgui_list.png"); rmonitor_panel = new_image("recordmonitor_panel.png"); rmonitor_meters = new_image("recordmonitor_meters.png"); // MWindow mbutton_left = new_image("mbutton_left.png"); mbutton_right = new_image("mbutton_right.png"); new_image("timebar_bg", "timebar_bg.png"); new_image("timebar_brender", "timebar_brender.png"); new_image("clock_bg", "mclock.png"); new_image("patchbay_bg", "patchbay_bg.png"); tracks_bg = new_image("tracks_bg.png"); zoombar_left = new_image("zoombar_left.png"); zoombar_right = new_image("zoombar_right.png"); statusbar_left = new_image("statusbar_left.png"); statusbar_right = new_image("statusbar_right.png"); // CWindow cpanel_bg = new_image("cpanel_bg.png"); cbuttons_left = new_image("cbuttons_left.png"); cbuttons_right = new_image("cbuttons_right.png"); cmeter_bg = new_image("cmeter_bg.png"); // VWindow vbuttons_left = new_image("vbuttons_left.png"); vbuttons_right = new_image("vbuttons_right.png"); vmeter_bg = new_image("vmeter_bg.png"); preferences_bg = new_image("preferences_bg.png"); new_bg = new_image("new_bg.png"); setformat_bg = new_image("setformat_bg2.png"); timebar_view_data = new_image("timebar_view.png"); setformat_w = 600; setformat_h = 560; setformat_x1 = 15; setformat_x2 = 100; setformat_x3 = 315; setformat_x4 = 415; setformat_y1 = 20; setformat_y2 = 85; setformat_y3 = 125; setformat_margin = 30; setformat_channels_x = 25; setformat_channels_y = 242; setformat_channels_w = 250; setformat_channels_h = 250; loadfile_pad = 70; browse_pad = 20; build_icons(); build_bg_data(); new_image_set("drawpatch_data", 5, "drawpatch_up.png", "drawpatch_hi.png", "drawpatch_checked.png", "drawpatch_dn.png", "drawpatch_checkedhi.png"); new_image_set("expandpatch_data", 5, "expandpatch_up.png", "expandpatch_hi.png", "expandpatch_checked.png", "expandpatch_dn.png", "expandpatch_checkedhi.png"); new_image_set("gangpatch_data", 5, "gangpatch_up.png", "gangpatch_hi.png", "gangpatch_checked.png", "gangpatch_dn.png", "gangpatch_checkedhi.png"); new_image_set("mutepatch_data", 5, "mutepatch_up.png", "mutepatch_hi.png", "mutepatch_checked.png", "mutepatch_dn.png", "mutepatch_checkedhi.png"); new_image_set("playpatch_data", 5, "playpatch_up.png", "playpatch_hi.png", "playpatch_checked.png", "playpatch_dn.png", "playpatch_checkedhi.png"); new_image_set("recordpatch_data", 5, "recordpatch_up.png", "recordpatch_hi.png", "recordpatch_checked.png", "recordpatch_dn.png", "recordpatch_checkedhi.png"); build_overlays(); out_point = new_image_set(5, "out_up.png", "out_hi.png", "out_checked.png", "out_dn.png", "out_checkedhi.png"); in_point = new_image_set(5, "in_up.png", "in_hi.png", "in_checked.png", "in_dn.png", "in_checkedhi.png"); label_toggle = new_image_set(5, "labeltoggle_up.png", "labeltoggle_uphi.png", "label_checked.png", "labeltoggle_dn.png", "label_checkedhi.png"); statusbar_cancel_data = new_image_set(3, "statusbar_cancel_up.png", "statusbar_cancel_hi.png", "statusbar_cancel_dn.png"); VFrame *editpanel_up = new_image("editpanel_up.png"); VFrame *editpanel_hi = new_image("editpanel_hi.png"); VFrame *editpanel_dn = new_image("editpanel_dn.png"); VFrame *editpanel_checked = new_image("editpanel_checked.png"); VFrame *editpanel_checkedhi = new_image("editpanel_checkedhi.png"); bottom_justify = new_button("bottom_justify.png", editpanel_up, editpanel_hi, editpanel_dn); center_justify = new_button("center_justify.png", editpanel_up, editpanel_hi, editpanel_dn); channel_data = new_button("channel.png", editpanel_up, editpanel_hi, editpanel_dn); new_button("copy.png", editpanel_up, editpanel_hi, editpanel_dn, "copy"); new_button("cut.png", editpanel_up, editpanel_hi, editpanel_dn, "cut"); new_button("fit.png", editpanel_up, editpanel_hi, editpanel_dn, "fit"); new_button("fitautos.png", editpanel_up, editpanel_hi, editpanel_dn, "fitautos"); new_button("inpoint.png", editpanel_up, editpanel_hi, editpanel_dn, "inbutton"); new_button("label.png", editpanel_up, editpanel_hi, editpanel_dn, "labelbutton"); left_justify = new_button("left_justify.png", editpanel_up, editpanel_hi, editpanel_dn); magnify_button_data = new_button("magnify.png", editpanel_up, editpanel_hi, editpanel_dn); middle_justify = new_button("middle_justify.png", editpanel_up, editpanel_hi, editpanel_dn); new_button("nextlabel.png", editpanel_up, editpanel_hi, editpanel_dn, "nextlabel"); new_button("outpoint.png", editpanel_up, editpanel_hi, editpanel_dn, "outbutton"); over_button = new_button("over.png", editpanel_up, editpanel_hi, editpanel_dn); overwrite_data = new_button("overwrite.png", editpanel_up, editpanel_hi, editpanel_dn); new_button("paste.png", editpanel_up, editpanel_hi, editpanel_dn, "paste"); new_button("prevlabel.png", editpanel_up, editpanel_hi, editpanel_dn, "prevlabel"); new_button("redo.png", editpanel_up, editpanel_hi, editpanel_dn, "redo"); right_justify = new_button("right_justify.png", editpanel_up, editpanel_hi, editpanel_dn); splice_data = new_button("splice.png", editpanel_up, editpanel_hi, editpanel_dn); new_button("toclip.png", editpanel_up, editpanel_hi, editpanel_dn, "toclip"); top_justify = new_button("top_justify.png", editpanel_up, editpanel_hi, editpanel_dn); new_button("undo.png", editpanel_up, editpanel_hi, editpanel_dn, "undo"); wrench_data = new_button("wrench.png", editpanel_up, editpanel_hi, editpanel_dn); // CWindow icons new_image("cwindow_inactive", "cwindow_inactive.png"); new_image("cwindow_active", "cwindow_active.png"); new_image_set("batch_render_start", 3, "batchstart_up.png", "batchstart_hi.png", "batchstart_dn.png"); new_image_set("batch_render_stop", 3, "batchstop_up.png", "batchstop_hi.png", "batchstop_dn.png"); new_image_set("batch_render_cancel", 3, "batchcancel_up.png", "batchcancel_hi.png", "batchcancel_dn.png"); new_toggle("arrow.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "arrow"); new_toggle("autokeyframe.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "autokeyframe"); camera_data = new_toggle("camera.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi); crop_data = new_toggle("crop.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi); new_toggle("ibeam.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "ibeam"); magnify_data = new_toggle("magnify.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi); mask_data = new_toggle("mask.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi); proj_data = new_toggle("projector.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi); protect_data = new_toggle("protect.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi); show_meters = new_toggle("show_meters.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi); titlesafe_data = new_toggle("titlesafe.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi); tool_data = new_toggle("toolwindow.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi); new_toggle("eyedrop.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "cwindow_eyedrop"); static VFrame **transport_bg = new_image_set(3, "transportup.png", "transporthi.png", "transportdn.png"); build_transport("end", get_image_data("end.png"), transport_bg, 2); build_transport("fastfwd", get_image_data("fastfwd.png"), transport_bg, 1); build_transport("fastrev", get_image_data("fastrev.png"), transport_bg, 1); build_transport("play", get_image_data("play.png"), transport_bg, 1); build_transport("framefwd", get_image_data("framefwd.png"), transport_bg, 1); build_transport("framerev", get_image_data("framerev.png"), transport_bg, 1); build_transport("pause", get_image_data("pause.png"), transport_bg, 1); build_transport("record", get_image_data("record.png"), transport_bg, 1); build_transport("singleframe", get_image_data("singleframe.png"), transport_bg, 1); build_transport("reverse", get_image_data("reverse.png"), transport_bg, 1); build_transport("rewind", get_image_data("rewind.png"), transport_bg, 0); build_transport("stop", get_image_data("stop.png"), transport_bg, 1); build_transport("stoprec", get_image_data("stoprec.png"), transport_bg, 2); flush_images(); title_font = MEDIUMFONT_3D; title_color = WHITE; recordgui_fixed_color = YELLOW; recordgui_variable_color = RED; channel_position_color = MEYELLOW; resources->meter_title_w = 25; }