#include <gnome.h>
#include <libxml/parser.h>
#include <libxml/catalog.h>
#include "mlview-file-selection.h"
Go to the source code of this file.
Data Structures | |
struct | _MlViewAppContext |
MlViewAppContext objects structure. More... | |
struct | _MlViewAppContextClass |
MlViewAppContext class structure. More... | |
Defines | |
#define | MLVIEW_TYPE_APP_CONTEXT (mlview_app_context_get_type()) |
#define | MLVIEW_APP_CONTEXT(object) (GTK_CHECK_CAST((object), MLVIEW_TYPE_APP_CONTEXT,MlViewAppContext)) |
#define | MLVIEW_APP_CONTEXT_CLASS(klass) (GTK_CHECK_CLASS_CAST((klass), MLVIEW_TYPE_APP_CONTEXT,MlViewContextClass)) |
#define | MLVIEW_IS_APP_CONTEXT(object) (GTK_CHECK_TYPE((object), MLVIEW_TYPE_APP_CONTEXT)) |
#define | MLVIEW_IS_APP_CONTEXT_CLASS(klass) (GTK_CHECK_CLASS_TYPE((klass), MLVIEW_TYPE_APP_CONTEXT)) |
Typedefs | |
typedef _MlViewAppContext | MlViewAppContext |
typedef _MlViewAppContextClass | MlViewAppContextClass |
typedef _MlVAppContextPrivate | MlVAppContextPrivate |
Functions | |
guint | mlview_app_context_get_type (void) |
The standard type builder. | |
gint * | mlview_app_context_get_last_id_ptr (MlViewAppContext *a_app_context) |
a getter of the last attribute id automatically generated. | |
gint | mlview_app_context_get_last_id (MlViewAppContext *a_app_context) |
The getter of the last generated attribute id. | |
void | mlview_app_context_set_last_id (MlViewAppContext *a_app_context, gint a_new_id) |
A setter of the last generated attribut id. | |
void | mlview_app_context_set_element (MlViewAppContext *a_context, gchar *a_element_name, gpointer a_context_element) |
Stores a key/value pair in the context. | |
gpointer | mlview_app_context_get_element (MlViewAppContext *a_context, gchar *a_element_name) |
Gets an object stored in the context using the mlview_app_context_set_element() method. | |
MlViewAppContext * | mlview_app_context_get_instance (void) |
The instance getter of the MlViewAppContext class. | |
void | mlview_app_context_sbar_push_message (MlViewAppContext *a_context, gchar *a_msg_format,...) |
Pushes a message on the app bar. | |
void | mlview_app_context_sbar_pop_message (MlViewAppContext *a_context) |
Pops the last message pushed on the message stack. | |
void | mlview_app_context_sbar_set_default_message (MlViewAppContext *a_context, gchar *a_msg_format,...) |
Sets the message that is displayed when no message is pushed on the status bar message stack. | |
void | mlview_app_context_message (MlViewAppContext *a_context, gchar *a_msg_format,...) |
Displays a message to the user. | |
void | mlview_app_context_error (MlViewAppContext *a_context, gchar *a_msg_format,...) |
Displays a (fatal) error to the user. | |
void | mlview_app_context_warning (MlViewAppContext *a_context, gchar *a_msg_format,...) |
Displays a warning message. | |
void | mlview_app_context_bufferize_error (MlViewAppContext *a_context, gchar *a_msg_format,...) |
Bufferizes the error message given by a_msg_format and the other parameters. | |
void | mlview_app_context_display_buffered_error (MlViewAppContext *a_context) |
Displays the error message that has been buffered by calling the function mlview_app_context_bufferize_error() with a_context in parameter. | |
gboolean | mlview_app_context_error_buffer_is_empty (MlViewAppContext *a_context) |
Tells wether if there are error messages to be displayed or not. | |
void | mlview_app_context_set_error_dialog_title (MlViewAppContext *a_context, gchar *a_title) |
Sets the title of the next error message that will be displayed by a call to the function mlview_app_context_error() or mlview_app_context_display_buffered_error(). | |
gchar * | mlview_app_context_get_error_dialog_title (MlViewAppContext *a_context) |
Getter of error message dialog title. | |
void | mlview_app_context_set_settings_hash_table (MlViewAppContext *a_context, GHashTable *a_settings) |
Sets a new application wide settings hash table. | |
GHashTable * | mlview_app_context_get_settings_hash_table (MlViewAppContext *a_context) |
Getter of the application wide settings hash table. | |
gboolean | mlview_app_context_settings_exist (MlViewAppContext *a_app_context) |
Tests wether if the application wide settings hash table is present (non null) or not. | |
gchar * | mlview_app_context_get_settings_value (MlViewAppContext *a_app_context, const gchar *a_key) |
Lookups the application wide settings hash table to search a given setting value. | |
void | mlview_app_context_set_settings_value (MlViewAppContext *a_app_context, const gchar *a_key, const gchar *a_value) |
Inserts the pair (a_key, a_value) into the settings hash table. | |
MlViewFileSelection * | mlview_app_context_get_file_selector (MlViewAppContext *a_app_context, const gchar *a_title) |
Gets the file selection dialog box associated to the mlview application. | |
void | mlview_app_context_set_window_icon (MlViewAppContext *a_app_context, GtkWidget *a_widget) |
Sets the icon of the window of the widget. | |
void | mlview_app_context_set_window_transient_for_app (MlViewAppContext *a_app_context, GtkWindow *a_window) |
Makes a_window always stay on top of the mlview application root window. | |
gint | mlview_app_context_get_xpm (MlViewAppContext *a_app_context, gchar *a_xpm_name, GdkPixmap **a_pixmap, GdkBitmap **a_bitmap) |
Load a pixmap by it name. | |
void | mlview_app_context_set_xml_catalog (MlViewAppContext *a_app_context, xmlCatalog *a_xml_catalog) |
Associates an xml catalog to the current instance of MlViewAppContext. | |
xmlCatalog * | mlview_app_context_get_xml_catalog (MlViewAppContext *a_app_context) |
Getter of the xml catalog associated to the current instance of MlViewAppContext. |
Definition in file mlview-app-context.h.
|
Definition at line 39 of file mlview-app-context.h. Referenced by mlview_app_context_get_instance(), and mlview_app_new(). |
|
Definition at line 40 of file mlview-app-context.h. |
|
|
Definition at line 42 of file mlview-app-context.h. |
|
Definition at line 38 of file mlview-app-context.h. |
|
Definition at line 46 of file mlview-app-context.h. |
|
Definition at line 44 of file mlview-app-context.h. |
|
Definition at line 45 of file mlview-app-context.h. |
|
Bufferizes the error message given by a_msg_format and the other parameters. The buffered error message can be displayed to the user by calling the function @mlview_app_context_display_buffered_error() with the same a_context in parameter. Note that if this function is called with a NULL a_context param, the formated error message is sent to stderr and is not buffered. Subsquent call to mlview_app_context_display_buffered_error() will not display anything.
Definition at line 566 of file mlview-app-context.c. References PRIVATE. |
|
Displays the error message that has been buffered by calling the function mlview_app_context_bufferize_error() with a_context in parameter. If a_context is set to NULL, this function does nothing.
Definition at line 607 of file mlview-app-context.c. References mlview_app_context_error(), and PRIVATE. Referenced by mlview_parsing_utils_load_a_dtd(), and mlview_parsing_utils_validate_dtd(). |
|
Displays a (fatal) error to the user. It actually shows a modal dialog box to the user. The user just has to click OK.
Definition at line 468 of file mlview-app-context.c. References PRIVATE. Referenced by mlview_app_context_display_buffered_error(), mlview_parsing_utils_load_xml_file(), and mlview_settings_builder_build_settings(). |
|
Tells wether if there are error messages to be displayed or not. Note the messages that may have been stored in the message buffer have been stored using the function mlview_app_context_bufferize_error() .
Definition at line 627 of file mlview-app-context.c. References MLVIEW_IS_APP_CONTEXT, and PRIVATE. Referenced by mlview_parsing_utils_load_a_dtd(), and mlview_parsing_utils_validate_dtd(). |
|
Gets an object stored in the context using the mlview_app_context_set_element() method.
Definition at line 319 of file mlview-app-context.c. References MLVIEW_IS_APP_CONTEXT, and PRIVATE. Referenced by mlview_app_context_get_xpm(), mlview_app_context_set_window_transient_for_app(), mlview_app_get_editor(), and mlview_editor_new(). |
|
Getter of error message dialog title.
Definition at line 542 of file mlview-app-context.c. References PRIVATE. |
|
Gets the file selection dialog box associated to the mlview application. The first call to this method creates the file selection. Subsequent calls to this method returns a pointer to the same object, making these calls very fast.
Definition at line 799 of file mlview-app-context.c. References mlview_app_context_set_window_icon(), MLVIEW_FILE_SELECTION, and PRIVATE. Referenced by mlview_editor_open_local_xml_document_interactive(), mlview_editor_save_and_close_xml_document(), mlview_editor_save_xml_document_as_interactive(), and mlview_parsing_utils_let_user_choose_a_dtd(). |
|
The instance getter of the MlViewAppContext class. Actually, if you want to use a 'singleton pattern', use this method. All the invocations to this method will allways return the same object ;
Definition at line 210 of file mlview-app-context.c. References MLVIEW_APP_CONTEXT. Referenced by mlview_app_new(). |
|
The getter of the last generated attribute id. This method is used in the automatic generation of attributes ids.
Definition at line 251 of file mlview-app-context.c. References MLVIEW_IS_APP_CONTEXT, and PRIVATE. |
|
a getter of the last attribute id automatically generated. This method is used in the automatic generation of attributes ids.
Definition at line 233 of file mlview-app-context.c. References MLVIEW_IS_APP_CONTEXT, and PRIVATE. Referenced by mlview_parsing_utils_build_required_attributes_list(). |
|
Getter of the application wide settings hash table. This hash table can be accessed by all the components that have received the current instance of MlViewAppContext in parameter. Note that this hash table is set by default during the construction of the instance of MlViewAppContext. It can be also set by a call to the function link mlview_app_context_set_settings_hash_table() ;
Definition at line 684 of file mlview-app-context.c. References MLVIEW_IS_APP_CONTEXT, and PRIVATE. Referenced by mlview_tree_editor_edit_xml_doc(). |
|
|
The standard type builder.
Definition at line 128 of file mlview-app-context.c. |
|
Getter of the xml catalog associated to the current instance of MlViewAppContext.
Definition at line 1007 of file mlview-app-context.c. References MLVIEW_IS_APP_CONTEXT, and PRIVATE. |
|
Load a pixmap by it name.
Definition at line 873 of file mlview-app-context.c. References mlview_app_context_get_element(), mlview_app_context_get_settings_value(), mlview_file_descriptor_destroy(), mlview_file_descriptor_is_readable(), mlview_file_descriptor_new(), MLVIEW_IS_APP_CONTEXT, OK, and PRIVATE. Referenced by mlview_tree_editor_update_sibling_node_inserted(). |
|
Displays a message to the user. It opens a Modal dialog with the message on it. The user just has to click OK.
Definition at line 433 of file mlview-app-context.c. References PRIVATE. Referenced by mlview_xml_document_validate(). |
|
Pops the last message pushed on the message stack. The effect is that the message pushed before the last message has been pushed, will be displayed.
Definition at line 379 of file mlview-app-context.c. References PRIVATE. Referenced by mlview_editor_load_xml_file(), mlview_editor_open_local_xml_document_interactive(), and mlview_editor_save_xml_document_as(). |
|
Pushes a message on the app bar.
Definition at line 337 of file mlview-app-context.c. References PRIVATE. Referenced by mlview_editor_load_xml_file(), mlview_editor_open_local_xml_document_interactive(), and mlview_editor_save_xml_document_as(). |
|
Sets the message that is displayed when no message is pushed on the status bar message stack.
Definition at line 400 of file mlview-app-context.c. References PRIVATE. Referenced by mlview_app_new(). |
|
Stores a key/value pair in the context. This method is used tho stores objects in the context. If you want to store strings, (for settings for ex) use mlview_app_context_set_settings_value() method instead.
Definition at line 295 of file mlview-app-context.c. References MLVIEW_IS_APP_CONTEXT, and PRIVATE. Referenced by mlview_app_new(). |
|
Sets the title of the next error message that will be displayed by a call to the function mlview_app_context_error() or mlview_app_context_display_buffered_error(). After a call to one of these two functions, all subsequent calls will display an error dialog with no title.
Definition at line 516 of file mlview-app-context.c. References PRIVATE. Referenced by mlview_parsing_utils_load_a_dtd(), and mlview_parsing_utils_validate_dtd(). |
|
A setter of the last generated attribut id. This method is used in the automatic attribute id generation process.
Definition at line 269 of file mlview-app-context.c. References MLVIEW_IS_APP_CONTEXT, and PRIVATE. |
|
Sets a new application wide settings hash table. The data set must be a string. If you want to set something else than a string, use the method mlview_app_context_set_element() instead. Note that Subsequent calls to mlview_app_context_settings_exist() , , mlview_app_context_set_settings_value() and mlview_app_context_get_settings_value() will use the new hash table provided.
Definition at line 708 of file mlview-app-context.c. References MLVIEW_IS_APP_CONTEXT, and PRIVATE. |
|
Inserts the pair (a_key, a_value) into the settings hash table. (if the hash table exists of course.) If the hash table does not exists, does nothing. If the a_key already exists in the settings hash table, overrides it.
Definition at line 773 of file mlview-app-context.c. References MLVIEW_IS_APP_CONTEXT, and PRIVATE. Referenced by mlview_app_build_set_global_settings(). |
|
Sets the icon of the window of the widget. All the windows of MlView have the same icon. This function fetches that right icon and set it to the window.
Definition at line 833 of file mlview-app-context.c. References mlview_app_context_get_settings_value(), and MLVIEW_IS_APP_CONTEXT. Referenced by mlview_app_context_get_file_selector(), mlview_app_set_icon(), mlview_attribute_picker_new(), mlview_editor_close_xml_document_interactive(), mlview_editor_create_new_xml_document(), mlview_editor_open_local_xml_document_interactive(), mlview_editor_save_and_close_xml_document(), mlview_editor_save_xml_document_as_interactive(), mlview_node_type_picker_new_with_title(), mlview_parsing_utils_let_user_choose_a_dtd(), mlview_settings_manager_edit_settings_interactive(), mlview_tree_editor_add_child_node_interactive(), mlview_tree_editor_find_xml_node_that_contains_str_interactive(), mlview_tree_editor_insert_next_sibling_node_interactive(), and mlview_tree_editor_insert_prev_sibling_node_interactive(). |
|
Makes a_window always stay on top of the mlview application root window.
Definition at line 961 of file mlview-app-context.c. References mlview_app_context_get_element(), and MLVIEW_IS_APP_CONTEXT. |
|
Associates an xml catalog to the current instance of MlViewAppContext. When a_app_context is destroyed, the instance of xml catalog is _NOT_ destroyed.
Definition at line 987 of file mlview-app-context.c. References MLVIEW_IS_APP_CONTEXT, and PRIVATE. |
|
Tests wether if the application wide settings hash table is present (non null) or not.
Definition at line 726 of file mlview-app-context.c. References MLVIEW_IS_APP_CONTEXT, and PRIVATE. Referenced by mlview_parsing_utils_build_attribute_name_completion_list(), mlview_parsing_utils_build_element_name_completion_list(), mlview_parsing_utils_build_required_attributes_list(), mlview_parsing_utils_build_required_children_tree(), mlview_xml_document_add_child_node(), mlview_xml_document_insert_next_sibling_node(), mlview_xml_document_insert_prev_sibling_node(), and mvliew_node_type_picker_build_element_name_choice_list(). |
|
Displays a warning message. It actually displays a modal dialog showing the message. The user just has to click OK. If a_context is set to NULL, the message is sent to stderr.
Definition at line 646 of file mlview-app-context.c. References PRIVATE. Referenced by mlview_xml_document_validate(). |