27 #ifndef _LIBHERAIA_HERAIA_UI_H_
28 #define _LIBHERAIA_HERAIA_UI_H_
void destroy_a_single_widget(GtkWidget *widget)
Destroys a single widget if it exists.
This is the main structure.
void connect_data_changed_signal(heraia_struct_t *main_struct, GtkWidget *hex_widget)
void on_save_as_activate(GtkWidget *widget, gpointer data)
This handle the save_as menu entry (here the filename changes)
void record_and_hide_dialog_box(GtkWidget *dialog_box, window_prop_t *dialog_pos)
Record position and hide a 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.
void kill_text_from_textview(GtkTextView *textview)
Kills the text from a textview.
gint find_tab_number_from_widget(heraia_struct_t *main_struct, gchar *notebook_name, GtkWidget *to_find)
Searches in a notebook's tabs for a particular widget and returns the number of the corresponding tab...
gboolean is_cmi_checked(GtkWidget *check_menu_item)
Tells whether a GtkCheckMenuItem is Checked or not.
void record_dialog_box_position(GtkWidget *dialog_box, window_prop_t *dialog_prop)
Records one dialog position.
void on_fr_activate(GtkWidget *widget, gpointer data)
Find and replace, Search menu.
int main(int argc, char **argv)
main program options :
void on_new_activate(GtkWidget *widget, gpointer data)
New, file menu.
void destroy_dt_window(GtkWidget *widget, GdkEvent *event, gpointer data)
call back function for the data interpretor window destruction
void set_the_working_directory(GtkFileChooser *file_chooser, gchar *filename)
Sets the working directory for the file chooser to the directory of the filename (even if filename is...
GtkWidget * find_label_from_hbox(GtkWidget *hbox)
Tries to find the label contained in the hbox.
void on_cut_activate(GtkWidget *widget, gpointer data)
Cut, edit menu.
void on_undo_activate(GtkWidget *widget, gpointer data)
Undo, edit menu.
void record_all_dialog_box_positions(heraia_struct_t *main_struct)
Records all the positions of the displayed windows.
void set_notebook_tab_name(heraia_struct_t *main_struct)
Sets notebook's tab's name.
void add_new_tab_in_main_window(heraia_struct_t *main_struct, doc_t *doc)
Adds a new tab to the main window in file's notebook.
Proposal for a structure that will group all informations about a single document.
void on_paste_activate(GtkWidget *widget, gpointer data)
Paste, edit menu.
int load_heraia_ui(heraia_struct_t *main_struct)
Loads, if possible, the gtkbuilder xml file and then connects the signals and inits the following win...
void on_delete_activate(GtkWidget *widget, gpointer data)
Delete, edit menu.
void connect_cursor_moved_signal(heraia_struct_t *main_struct, GtkWidget *hex_widget)
Connects the signal that the cursor has moved to the refreshing function.
GtkWidget * heraia_get_widget(GtkBuilder *xml, gchar *widget_name)
This is a wrapper to the GtkBuilder xml get widget.
void update_main_window_name(heraia_struct_t *main_struct)
Update main window heraia's name to reflect the current edited file.
gboolean is_toggle_button_activated(GtkBuilder *main_xml, gchar *check_button)
returns the state of a named check button contained in the GtkBuilder XML description ...
void a_propos_activate(GtkWidget *widget, gpointer data)
Shows apropos's dialog box.
void show_hide_widget(GtkWidget *widget, gboolean show, window_prop_t *win_prop)
To help plugins to deal with widgets, shows or hide a specific widget.
void on_DIMenu_activate(GtkWidget *widget, gpointer data)
This handles the menuitem "Data Interpretor" that shows or hides the data interpretor window...
void grey_main_widgets(GtkBuilder *main, gboolean greyed)
Hides or grey all widgets that needs an open file when boolean greyed is TRUE.
GtkWidget * gtk_radio_button_get_active_from_widget(GtkRadioButton *radio_group_member)
gets the active radio button from a radio group
void gtk_radio_button_set_active(GtkRadioButton *radio_button)
Sets the radio button active.
gchar * select_a_file_to_save(heraia_struct_t *main_struct)
This function opens a dialog box that allow one to choose a file name to the file which is about to b...
void on_tests_menu_activate(GtkWidget *widget, gpointer data)
Called when tests submenu is activated.
void init_heraia_interface(heraia_struct_t *main_struct)
Here we might init some call backs and menu options and display the interface (main && sub-windows) This ...
void on_find_activate(GtkWidget *widget, gpointer data)
Find, Search menu.
void init_window_states(heraia_struct_t *main_struct)
Inits all windows states (positions, displayed, and so on...)
void on_save_activate(GtkWidget *widget, gpointer data)
Here we attemp to save the edited file.
gboolean delete_dt_window_event(GtkWidget *widget, GdkEvent *event, gpointer data)
call back function for the data interpretor window destruction
void add_text_to_textview(GtkTextView *textview, const char *format,...)
adds a text to a textview
GtkWidget * create_tab_close_button(heraia_struct_t *main_struct, GtkWidget *tab_label, void *signal_handler)
Creates an hbox containning a cross button (in order to close the tab) and a label (from tab_label)...
void on_preferences_activate(GtkWidget *widget, gpointer data)
Preferences, file menu : Displays the preference window (as a modal window)
void set_notebook_tab_label_color(heraia_struct_t *main_struct, gboolean color)
Set the style for the label.
GSList * select_file_to_load(heraia_struct_t *main_struct, gboolean multiple, gchar *message)
This function does open a file selector dialog box and returns the selected filename.
void on_redo_activate(GtkWidget *widget, gpointer data)
Redo, edit menu.
gboolean delete_main_window_event(GtkWidget *widget, GdkEvent *event, gpointer data)
void on_open_activate(GtkWidget *widget, gpointer data)
This handles the menuitem "Ouvrir" to open a file.
void data_has_changed(GtkWidget *widget, gpointer data)
gboolean file_notebook_tab_changed(GtkNotebook *notebook, GtkWidget *page, gint tab_num, gpointer data)
What to do when a change occurs in tabs (user selected a particular tab)
void on_fdft_activate(GtkWidget *widget, gpointer data)
Find data from type, Search menu.
void refresh_file_labels(heraia_struct_t *main_struct)
This function is refreshing the labels on the main window in order to reflect cursor position...
void on_copy_activate(GtkWidget *widget, gpointer data)
Copy, edit menu.
void move_and_show_dialog_box(GtkWidget *dialog_box, window_prop_t *dialog_pos)
Move the dialog box to the wanted position, shows it and says it in the displayed prop...
void on_close_activate(GtkWidget *widget, gpointer data)
Closes an opened file.
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 st...
void on_quit_activate(GtkWidget *widget, gpointer data)
Quit, file menu.