?? dialogs.h
字號(hào):
/* dialogs.h : dialog to change config options and save files * Author: Maxie D. Schmidt (created 5/21/2006) */#ifndef _DIALOGS_H_#define _DIALOGS_H_#include <stdio.h>#include <gtkmm/dialog.h>#include <gtkmm/box.h>#include <gtkmm/label.h>#include <gtkmm/entry.h>#include <gtkmm/frame.h>#include <gtkmm/combo.h>#include <gtkmm/comboboxtext.h>#include <gtkmm/liststore.h>#include <gtkmm/button.h>#include <gtkmm/buttonbox.h>#include <gtkmm/separator.h>#include <gtkmm/stock.h>#include <gtkmm/filechooserdialog.h>#include <gtkmm/messagedialog.h>#include <gtkmm/scrolledwindow.h>#include <gtkmm/textview.h>#include <gtkmm/textbuffer.h>#include <string>#include <vector>using namespace std;#include "classnotes.h"#include "parselist.h"#include "runutils.h"#include "drawingarea.h"#include "profile.h"// configuration dialog:#define CFG_ENTRY_SIZE 50#define PARSING_ENTRY_SIZE 10#define TRCFG_ENTRY_SIZE 10#define INTERVAL_ENTRY_SIZE 7class cfg_dialog : public Gtk::Dialog { public: cfg_dialog(program_mode_t mode); // signal handlers: void on_cfg_profile_browse(); void on_cfg_profile_dir_browse(); void on_cfg_save_dir_browse(); void on_cfg_scan_dir_browse(); void on_cfg_log_dir_browse(); void on_cfg_log_file_browse(); void on_close_button_click(); protected: program_mode_t prog_mode; Gtk::Frame cfg_frame, parsing_frame, misc_frame, training_frame; Gtk::VBox cfg_frame_vbox, parsing_frame_vbox, misc_fram_vbox, training_frame_vbox, mainl_vbox, mainr_vbox; Gtk::HBox main_hbox; Gtk::Button close_button; Gtk::HButtonBox close_buttonbox; // config: Gtk::Button pro_browse, prodir_browse, savedir_browse, scandir_browse, logdir_browse, logfile_browse; Gtk::HBox pro_hbox, prodir_hbox, savedir_hbox, scandir_hbox, logdir_hbox, logfile_hbox; Gtk::HBox pro_label_hbox, prodir_label_hbox, savedir_label_hbox, scandir_label_hbox, logdir_label_hbox, logfile_label_hbox; Gtk::VBox pro_vbox, prodir_vbox, savedir_vbox, scandir_vbox, logdir_vbox, logfile_vbox; Gtk::Label pro_label, prodir_label, savedir_label, scandir_label, logdir_label, logfile_label; Gtk::Entry pro_text, prodir_text, savedir_text, scandir_text, logdir_text, logfile_text; // parse config: Gtk::HBox ZI_PR0_PG_hbox, ZI_PR1_PG_hbox, ZI_PR0_PGC_hbox, ZI_PR1_PGC_hbox, p_dialog_matches_hbox, PRSF_hbox, ignore_edges_top_hbox, ignore_edges_bottom_hbox, ignore_edges_left_hbox, ignore_edges_right_hbox, space_int_padding_hbox, lineh_int_padding_hbox; Gtk::VBox ZI_PR0_PG_vbox, ZI_PR1_PG_vbox, ZI_PR0_PGC_vbox, ZI_PR1_PGC_vbox, p_dialog_matches_vbox, PRSF_vbox, ignore_edges_top_vbox, ignore_edges_bottom_vbox, ignore_edges_left_vbox, ignore_edges_right_vbox, space_int_padding_vbox, lineh_int_padding_vbox; Gtk::Label ZI_PR0_PG_label, ZI_PR1_PG_label, ZI_PR0_PGC_label, ZI_PR1_PGC_label, p_dialog_matches_label, PRSF_label, ignore_edges_top_label, ignore_edges_bottom_label, ignore_edges_left_label, ignore_edges_right_label, space_int_padding_label, lineh_int_padding_label; Gtk::Entry ZI_PR0_PG_text, ZI_PR1_PG_text, ZI_PR0_PGC_text, ZI_PR1_PGC_text, p_dialog_matches_text, PRSF_text, ignore_edges_top_text, ignore_edges_bottom_text, ignore_edges_left_text, ignore_edges_right_text, space_int_padding_text, lineh_int_padding_text; // misc config: Gtk::HBox rgb_int_titlelabel_hbox, rgb_int_r_hbox, rgb_int_g_hbox, rgb_int_b_hbox; Gtk::VBox rgb_int_vbox; Gtk::Label rgb_int_titlelabel, rgb_int_R_label, rgb_int_G_label, rgb_int_B_label, rgb_int_r_tolabel, rgb_int_g_tolabel, rgb_int_b_tolabel; Gtk::Entry rgb_int_r_lower_entry, rgb_int_r_upper_entry, rgb_int_g_lower_entry, rgb_int_g_upper_entry, rgb_int_b_lower_entry, rgb_int_b_upper_entry; // training-related config: Gtk::HBox gsx_hbox, gsy_hbox, gcx_hbox, gcy_hbox, interpx_hbox, spaceint_hbox, linehint_hbox; Gtk::VBox trcfg_vbox; Gtk::Label gsx_label, gsy_label, gcx_label, gcy_label, interpx_label, spaceint_label, linehint_label, spaceint_tolabel, linehint_tolabel; Gtk::Entry gsx_entry, gsy_entry, gcx_entry, gcy_entry, interpx_entry, spaceint_lower_entry, spaceint_upper_entry, linehint_lower_entry, linehint_upper_entry;};/////// view parse stats:class parse_stats_da : public grid_char_da { public: parse_stats_da();};class parse_stats_dialog : public Gtk::Dialog { public: parse_stats_dialog(); protected: parsed_line *cur_pl; parsed_char *cur_pc; bool display_grid_fill; // child widgets: parse_stats_da grid_da; Gtk::HBox middle_hbox; Gtk::ComboBoxText prs_combo_box; Gtk::CheckButton grid_fill_check; Gtk::HSeparator sep_line; Gtk::HButtonBox arrows_buttonbox; Gtk::Button prev_button, next_button; // signal handlers: void on_check_toggle(); void on_prev_button_click(); void on_next_button_click();};/////// profile stats:class profile_stats_dialog : public Gtk::Dialog { public: profile_stats_dialog(profile *p); protected: Gtk::HBox main_hbox, num_chars_label_hbox, num_insts_label_hbox, avg_insts_label_hbox, insts_label_hbox, num_chars_num_label_hbox, num_insts_num_label_hbox, avg_insts_num_label_hbox, insts_combobox_hbox; Gtk::VBox labels_vbox, numbers_vbox; Gtk::Label num_chars_label, num_insts_label, avg_insts_label, insts_label, num_chars_num_label, num_insts_num_label, avg_insts_num_label; Gtk::ComboBoxText insts_combobox; Gtk::HSeparator separator; Gtk::HButtonBox close_buttonbox; Gtk::Button close_button; void on_close_button_click(); };class profile_name_dialog : public Gtk::Dialog { public: profile_name_dialog(); protected: Gtk::HButtonBox choose_buttons; Gtk::Button use_new_name_button, use_cfg_button; Gtk::Label profile_dir_label, profile_suffix_label; Gtk::Entry new_name_text; Gtk::HBox name_hbox; void on_new_name_button_click(); void on_use_cfg_button_click();};/////// view log file dialog:#define LOG_TEXT_SIZE_X 500#define LOG_TEXT_SIZE_Y 200class log_file_text : public Gtk::ScrolledWindow { public: log_file_text(); void append_string(string str); protected: void setup_buffer(); Gtk::TextView text_view; Glib::RefPtr<Gtk::TextBuffer> buffer_ref;};class log_file_dialog : public Gtk::Dialog { public: log_file_dialog(); protected: log_file_text log_text; Gtk::HButtonBox close_buttonbox; Gtk::Button close_button; void on_close_click();};#endif
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -