Go to the source code of this file.
Defines | |
#define | H_DEBUG 1 |
Functions | |
void | on_quit_activate (GtkWidget *widget, gpointer data) |
void | on_new_activate (GtkWidget *widget, gpointer data) |
void | on_open_activate (GtkWidget *widget, gpointer data) |
void | on_save_activate (GtkWidget *widget, gpointer data) |
void | on_save_as_activate (GtkWidget *widget, gpointer data) |
void | on_preferences_activate (GtkWidget *widget, gpointer data) |
void | on_delete_activate (GtkWidget *widget, gpointer data) |
void | a_propos_activate (GtkWidget *widget, gpointer data) |
void | on_cut_activate (GtkWidget *widget, gpointer data) |
void | on_copy_activate (GtkWidget *widget, gpointer data) |
void | on_paste_activate (GtkWidget *widget, gpointer data) |
void | on_DIMenu_activate (GtkWidget *widget, gpointer data) |
gboolean | delete_main_window_event (GtkWidget *widget, GdkEvent *event, gpointer data) |
gboolean | delete_dt_window_event (GtkWidget *widget, GdkEvent *event, gpointer data) |
void | destroy_dt_window (GtkWidget *widget, GdkEvent *event, gpointer data) |
gboolean | select_file_to_load (heraia_window_t *main_window) |
gchar * | select_a_file_to_save (heraia_window_t *main_window) |
void | init_heraia_interface (heraia_window_t *main_window) |
int | load_heraia_ui (heraia_window_t *main_window) |
void | refresh_event_handler (GtkWidget *widget, gpointer data) |
void | connect_cursor_moved_signal (heraia_window_t *main_window) |
void | init_window_states (heraia_window_t *main_window) |
void | record_dialog_box_position (GtkWidget *dialog_box, window_prop_t *dialog_prop) |
void | record_all_dialog_box_positions (heraia_window_t *main_window) |
void | move_and_show_dialog_box (GtkWidget *dialog_box, window_prop_t *dialog_pos) |
void | record_and_hide_dialog_box (GtkWidget *dialog_box, window_prop_t *dialog_pos) |
GtkWidget * | heraia_get_widget (GladeXML *xml, gchar *widget_name) |
void | add_text_to_textview (GtkTextView *textview, const char *format,...) |
void | kill_text_from_textview (GtkTextView *textview) |
GtkWidget * | gtk_radio_button_get_active (GSList *group) |
GtkWidget * | gtk_radio_button_get_active_from_widget (GtkRadioButton *radio_group_member) |
gboolean | is_cmi_checked (GtkWidget *check_menu_item) |
void | destroy_a_single_widget (GtkWidget *widget) |
void | update_main_window_name (heraia_window_t *main_window) |
void | set_notebook_tab_name (heraia_window_t *main_window) |
#define H_DEBUG 1 |
Definition at line 27 of file heraia_ui.h.
void a_propos_activate | ( | GtkWidget * | widget, | |
gpointer | data | |||
) |
Shows apropos's dialog box
Definition at line 75 of file heraia_ui.c.
References all_window_prop_t::about_box, heraia_get_widget(), xml_t::main, move_and_show_dialog_box(), PACKAGE_NAME, PACKAGE_VERSION, heraia_window_t::win_prop, and heraia_window_t::xmls.
Referenced by heraia_ui_connect_signals().
void add_text_to_textview | ( | GtkTextView * | textview, | |
const char * | format, | |||
... | ||||
) |
adds a text to a textview
Definition at line 982 of file heraia_ui.c.
Referenced by print_plugin_basics(), print_plugin_extra_structure(), print_plugin_filter_structure(), print_plugin_functions(), print_plugin_info_structure(), print_plugin_interface(), print_plugin_state(), and realize_some_numerical_stat().
void connect_cursor_moved_signal | ( | heraia_window_t * | main_window | ) |
Connects the signal that the cursor has moved to the refreshing function
Definition at line 782 of file heraia_ui.c.
References heraia_window_t::current_DW, data_window_t::current_hexwidget, and refresh_event_handler().
Referenced by heraia_hex_document_new().
gboolean delete_dt_window_event | ( | GtkWidget * | widget, | |
GdkEvent * | event, | |||
gpointer | data | |||
) |
call back functions for the data interpretor window destruction
Definition at line 477 of file heraia_ui.c.
References heraia_get_widget(), xml_t::main, and heraia_window_t::xmls.
Referenced by connect_data_interpretor_signals().
gboolean delete_main_window_event | ( | GtkWidget * | widget, | |
GdkEvent * | event, | |||
gpointer | data | |||
) |
When the user destroys or delete the main window
Definition at line 464 of file heraia_ui.c.
References close_heraia().
Referenced by heraia_ui_connect_signals().
void destroy_a_single_widget | ( | GtkWidget * | widget | ) |
Destroys a single widget if it exists
Definition at line 1093 of file heraia_ui.c.
Referenced by destroy_container_widget(), dt_cancel_button_clicked(), dt_ok_button_clicked(), and ldt_remove_button_clicked().
void destroy_dt_window | ( | GtkWidget * | widget, | |
GdkEvent * | event, | |||
gpointer | data | |||
) |
Definition at line 486 of file heraia_ui.c.
References heraia_get_widget(), xml_t::main, and heraia_window_t::xmls.
Referenced by connect_data_interpretor_signals().
GtkWidget* gtk_radio_button_get_active | ( | GSList * | group | ) |
Try to find the active radio button widget in a group This does not take into account inconsistant states returns the first active radio button otherwise NULL
Definition at line 1022 of file heraia_ui.c.
Referenced by gtk_radio_button_get_active_from_widget().
GtkWidget* gtk_radio_button_get_active_from_widget | ( | GtkRadioButton * | radio_group_member | ) |
gtk_radio_button_get_active_from_widget: : widget to get radio group from
Definition at line 1046 of file heraia_ui.c.
References gtk_radio_button_get_active().
Referenced by which_endianness().
GtkWidget* heraia_get_widget | ( | GladeXML * | xml, | |
gchar * | widget_name | |||
) |
This is a wrapper to the glade xml get widget. It is intended to simplify the developpers lives if they have to choose or propose other means to do the same thing than libglade (say, for example, GtkBuilder :)
For debug purposes only (verbose) fprintf(stdout, "Getting Widget named %s\n", widget_name);
Definition at line 1074 of file heraia_ui.c.
Referenced by a_propos_activate(), add_data_type_name_to_treeview(), add_entry_to_plugins_menu(), close_data_interpretor_window(), close_data_type_window(), connect_data_interpretor_signals(), connect_data_type_signals(), connect_list_data_types_signals(), create_treatment_container_widget(), create_ud_data_interpretor_widgets(), data_interpretor_init_interface(), delete_dt_window_event(), delete_ldt_window_event(), destroy_dt_window(), destroy_ldt_window(), dt_name_entry_leave_notify_event(), dt_size_spinbutton_value_changed(), fill_data_type_widgets(), heraia_ui_connect_signals(), init_heraia_interface(), init_plugin_name_tv(), init_window_states(), interpret_as_date(), interpret_as_number(), ldt_edit_button_clicked(), ldt_remove_button_clicked(), load_file_to_analyse(), load_mp_file_preferences_options(), log_window_connect_signals(), logw_close_clicked(), main_pref_window_connect_signals(), mw_cmi_plw_toggle(), my_log(), on_DIMenu_activate(), on_ldt_menu_activate(), on_mp_tb_fp_bt_clicked(), on_preferences_activate(), plugin_list_window_connect_signals(), plw_close_clicked(), plw_refresh_clicked(), pn_treeview_selection_changed_cb(), pref_window_delete(), record_all_dialog_box_positions(), record_and_hide_about_box(), refresh_file_labels(), refresh_hex_datas_entry(), save_mp_file_preferences_options(), select_a_file_to_save(), select_file_to_load(), set_notebook_tab_name(), set_spinbutton_max_range(), show_data_type_window(), show_hide_log_window(), update_main_window_name(), and which_endianness().
void init_heraia_interface | ( | heraia_window_t * | main_window | ) |
Here we might init some call backs and menu options and display the interface (main && sub-windows) This function should be called only once at main program's init time
Definition at line 718 of file heraia_ui.c.
References heraia_window_t::current_doc, heraia_get_widget(), init_window_states(), xml_t::main, refresh_file_labels(), and heraia_window_t::xmls.
Referenced by main().
void init_window_states | ( | heraia_window_t * | main_window | ) |
Inits the window states
Definition at line 1136 of file heraia_ui.c.
References all_window_prop_t::data_interpretor, window_prop_t::displayed, heraia_get_widget(), init_one_cmi_window_state(), all_window_prop_t::ldt, all_window_prop_t::log_box, xml_t::main, all_window_prop_t::main_dialog, all_window_prop_t::main_pref_window, all_window_prop_t::plugin_list, heraia_window_t::win_prop, window_prop_t::x, heraia_window_t::xmls, and window_prop_t::y.
Referenced by init_heraia_interface().
gboolean is_cmi_checked | ( | GtkWidget * | check_menu_item | ) |
Tells whether a GtkCheckMenuItem is Checked or not
Definition at line 1062 of file heraia_ui.c.
Referenced by on_ldt_menu_activate().
void kill_text_from_textview | ( | GtkTextView * | textview | ) |
Kills the text from a textview
Definition at line 1004 of file heraia_ui.c.
Referenced by plw_refresh_clicked(), pn_treeview_selection_changed_cb(), and realize_some_numerical_stat().
int load_heraia_ui | ( | heraia_window_t * | main_window | ) |
Loads, if possible, the glade xml file and then connects the signals and inits the following windows :
Definition at line 870 of file heraia_ui.c.
References data_interpretor_init_interface(), data_type_init_interface(), heraia_window_t::debug, heraia_ui_connect_signals(), list_data_types_init_interface(), load_heraia_glade_xml(), load_preference_file(), log_window_init_interface(), main_pref_window_init_interface(), and setup_preferences().
Referenced by main().
void move_and_show_dialog_box | ( | GtkWidget * | dialog_box, | |
window_prop_t * | dialog_prop | |||
) |
Move the dialog box to the wanted position, shows it and says it in the displayed prop
Definition at line 100 of file heraia_ui.c.
References window_prop_t::displayed, window_prop_t::x, and window_prop_t::y.
Referenced by a_propos_activate(), mw_cmi_plw_toggle(), on_DIMenu_activate(), on_ldt_menu_activate(), on_preferences_activate(), show_hide_log_window(), and show_hide_widget().
void on_copy_activate | ( | GtkWidget * | widget, | |
gpointer | data | |||
) |
Copy, edit menu
Definition at line 254 of file heraia_ui.c.
References log_message().
Referenced by heraia_ui_connect_signals().
void on_cut_activate | ( | GtkWidget * | widget, | |
gpointer | data | |||
) |
Cut, edit menu
Definition at line 244 of file heraia_ui.c.
References log_message().
Referenced by heraia_ui_connect_signals().
void on_delete_activate | ( | GtkWidget * | widget, | |
gpointer | data | |||
) |
Delete, edit menu
Definition at line 234 of file heraia_ui.c.
References log_message().
Referenced by heraia_ui_connect_signals().
void on_DIMenu_activate | ( | GtkWidget * | widget, | |
gpointer | data | |||
) |
This handles the menuitem "Data Interpretor" that shows or hides the data interpretor window
Definition at line 417 of file heraia_ui.c.
References heraia_window_t::current_DW, all_window_prop_t::data_interpretor, window_prop_t::displayed, data_window_t::diw, heraia_get_widget(), xml_t::main, move_and_show_dialog_box(), record_and_hide_dialog_box(), refresh_data_interpretor_window(), data_window_t::tab_displayed, heraia_window_t::win_prop, and heraia_window_t::xmls.
Referenced by heraia_ui_connect_signals().
void on_new_activate | ( | GtkWidget * | widget, | |
gpointer | data | |||
) |
New, file menu
Definition at line 47 of file heraia_ui.c.
References log_message().
Referenced by heraia_ui_connect_signals().
void on_open_activate | ( | GtkWidget * | widget, | |
gpointer | data | |||
) |
This handles the menuitem "Ouvrir" to open a file
Definition at line 334 of file heraia_ui.c.
References heraia_window_t::current_DW, data_window_t::current_hexwidget, heraia_window_t::event, heraia_window_t::filename, HERAIA_REFRESH_NEW_FILE, load_file_to_analyse(), refresh_event_handler(), and select_file_to_load().
Referenced by heraia_ui_connect_signals().
void on_paste_activate | ( | GtkWidget * | widget, | |
gpointer | data | |||
) |
Paste, edit menu
Definition at line 265 of file heraia_ui.c.
References log_message().
Referenced by heraia_ui_connect_signals().
void on_preferences_activate | ( | GtkWidget * | widget, | |
gpointer | data | |||
) |
Preferences, file menu : Displays the preference window (as a modal window)
Definition at line 58 of file heraia_ui.c.
References heraia_get_widget(), xml_t::main, all_window_prop_t::main_pref_window, move_and_show_dialog_box(), heraia_window_t::win_prop, and heraia_window_t::xmls.
Referenced by heraia_ui_connect_signals().
void on_quit_activate | ( | GtkWidget * | widget, | |
gpointer | data | |||
) |
Quit, file menu
Definition at line 36 of file heraia_ui.c.
References close_heraia().
Referenced by heraia_ui_connect_signals().
void on_save_activate | ( | GtkWidget * | widget, | |
gpointer | data | |||
) |
Here we attemp to save the edited file TODO : be more accurate on error (error type, message and filename)
Definition at line 352 of file heraia_ui.c.
References heraia_window_t::current_doc, heraia_hex_document_get_filename(), heraia_hex_document_save(), HERAIA_NOERR, and log_message().
Referenced by heraia_ui_connect_signals().
void on_save_as_activate | ( | GtkWidget * | widget, | |
gpointer | data | |||
) |
This handle the save_as menu entry (here the filename changes)
Definition at line 373 of file heraia_ui.c.
References heraia_window_t::current_doc, HERAIA_CANCELLED, heraia_hex_document_save_as(), HERAIA_NOERR, log_message(), select_a_file_to_save(), set_notebook_tab_name(), and update_main_window_name().
Referenced by heraia_ui_connect_signals().
void record_all_dialog_box_positions | ( | heraia_window_t * | main_window | ) |
Records all the positions of the displayed windows
Definition at line 134 of file heraia_ui.c.
References all_window_prop_t::about_box, heraia_window_t::current_DW, all_window_prop_t::data_interpretor, data_window_t::diw, heraia_get_widget(), all_window_prop_t::ldt, all_window_prop_t::log_box, xml_t::main, all_window_prop_t::main_dialog, all_window_prop_t::main_pref_window, all_window_prop_t::plugin_list, record_dialog_box_position(), heraia_window_t::win_prop, and heraia_window_t::xmls.
Referenced by close_heraia().
void record_and_hide_dialog_box | ( | GtkWidget * | dialog_box, | |
window_prop_t * | dialog_prop | |||
) |
Record position and hide a dialog box
Definition at line 178 of file heraia_ui.c.
References window_prop_t::displayed, and record_dialog_box_position().
Referenced by mw_cmi_plw_toggle(), on_DIMenu_activate(), on_ldt_menu_activate(), plw_close_clicked(), pref_window_delete(), record_and_hide_about_box(), show_hide_log_window(), and show_hide_widget().
void record_dialog_box_position | ( | GtkWidget * | dialog_box, | |
window_prop_t * | dialog_prop | |||
) |
Records one dialog position
Definition at line 114 of file heraia_ui.c.
References window_prop_t::displayed, window_prop_t::x, and window_prop_t::y.
Referenced by record_all_dialog_box_positions(), and record_and_hide_dialog_box().
void refresh_event_handler | ( | GtkWidget * | widget, | |
gpointer | data | |||
) |
This function is here to ensure that everything will be refreshed upon a signal event.
Definition at line 310 of file heraia_ui.c.
References heraia_window_t::event, HERAIA_REFRESH_CURSOR_MOVE, HERAIA_REFRESH_NOTHING, refresh_all_plugins(), refresh_data_interpretor_window(), and refresh_file_labels().
Referenced by connect_cursor_moved_signal(), and on_open_activate().
gchar* select_a_file_to_save | ( | heraia_window_t * | main_window | ) |
This function opens a dialog box that allow one to choose a file name to the file which is about to be saved
Definition at line 621 of file heraia_ui.c.
References heraia_window_t::filename, heraia_get_widget(), xml_t::main, set_the_working_directory(), and heraia_window_t::xmls.
Referenced by on_save_as_activate().
gboolean select_file_to_load | ( | heraia_window_t * | main_window | ) |
This function does open a file selector dialog box and returns the selected filename. We do fill the main_window->filename parameter here !
for the moment we do not want to retrieve multiples selections but this could be a valuable thing in the future
We want the file selection path to be the one of the previous openned file if any !
Definition at line 558 of file heraia_ui.c.
References heraia_window_t::filename, heraia_get_widget(), log_message(), xml_t::main, set_the_working_directory(), and heraia_window_t::xmls.
Referenced by on_open_activate().
void set_notebook_tab_name | ( | heraia_window_t * | main_window | ) |
Sets notebook's tab's name. This function should only be called when a new filename was set (open and save as functions)
Definition at line 686 of file heraia_ui.c.
References heraia_window_t::current_doc, heraia_get_widget(), xml_t::main, and heraia_window_t::xmls.
Referenced by load_file_to_analyse(), and on_save_as_activate().
void update_main_window_name | ( | heraia_window_t * | main_window | ) |
Update main window heraia's name to reflect the current edited file
Definition at line 668 of file heraia_ui.c.
References heraia_window_t::current_doc, heraia_get_widget(), xml_t::main, and heraia_window_t::xmls.
Referenced by load_file_to_analyse(), and on_save_as_activate().