libgitk dialog class
[libgitk core]


Files

file  gitkcallback.c
 libgitk callback routines

file  gitkcallback.h
 libgitk callback routines

file  gitkdialog.c
 libgitk dialog class (xml-doc-tree)

file  gitktrans-domain.c
 applies domain specific transformation to doc-tree

file  gitktrans-domain.h
 applies domain specific transformation to doc-tree

file  gitktrans-expand.c
 expands giml dialog description with defaults

file  gitktrans-expand.h
 expands giml dialog description with defaults

file  gitktrans-i18n.c
 applies i18n to doc-tree

file  gitktrans-i18n.h
 applies i18n to doc-tree

file  gitktrans-style.c
 applies domain specific user style transformation to doc-tree

file  gitktrans-style.h
 applies stylesheets to doc-tree

file  gitktrans.c
 transformation pipeline

file  gitktrans.h
 transformation pipeline


Modules

group libgitk transformation stylesheets

Data Structures

struct  GitkCallbackNode
 general gitk event callback node More...

struct  GitkDialog
 gitk dialog, active dialog with a GitkLayout More...


Typedefs

typedef GitkCallbackNode GitkCallbackNode
 gitk event callback node

typedef GitkCallbackNodeGitkCallbackNodePtr
 pointer to GitkCallbackNode

typedef gboolean(* GitkCallbackPtr )(GitkDialogPtr dialog, gchar *widget_id, GitkEventPtr event, gpointer user_data)
 gitk event callback

typedef GitkDialog GitkDialog
 gitk dialog, active dialog with a GitkLayout

typedef GitkDialogGitkDialogPtr
 a pointer to GitkDialog


Functions

void gitk__dialog_attach_callback (GitkDialogPtr const dialog, gchar *const widget_id, const GitkEventType type, gpointer const user_data, GitkCallbackPtr const callback, gchar *const callback_name)
 connect a callback-method to one event-slot of a widget in a dialog. Widget related callbacks need a dialog and a widget_id. For global callbacks both parameters need to be NULL.

xmlDocPtr gitk__dialog_get_doc (GitkDialogPtr const dialog, GitkDialogAccessType access_type)
 get the source/destination giml/xml document

xmlNodePtr gitk__dialog_get_widget (GitkDialogPtr const dialog, GitkDialogAccessType const access_type, gchar *const widget_id)
 retrieve the widget from the doc-tree

void gitk__dialog_set_title (GitkDialogPtr const dialog, GitkDialogAccessType const access_type, gchar *const new_title)
 sets the dialog title

void gitk_dialog_detach_callback (GitkDialogPtr const dialog, gchar *const widget_id, const GitkEventType type)
 removes the callback from one event-slot of a widget

void gitk_dialog_free (GitkDialogPtr const dialog)
 free a GitkDialog. This unconnects all callbacks and releases memory.

xmlDocPtr gitk_dialog_get_dst (GitkDialogPtr const dialog)
 get the target xml document, this takes care that the target document gets generated at least when someone accesses it

xmlDocPtr gitk_dialog_get_src (GitkDialogPtr const dialog)
 get the source giml/xml document

void gitk_dialog_hide (GitkDialogPtr const dialog)
 hide a dialog. Callbacks remain connected, so that calling gitk_dialog_show() reactivates the callbacks.

void gitk_dialog_invalidate (GitkDialogPtr const dialog)
 invalidate the prepared dst doc, this ensures that on the next access the transformations are repeated

GitkDialogPtr gitk_dialog_new (xmlDocPtr const doc)
 create GitkDialog from xml-doc

GitkDialogPtr gitk_dialog_new_from_file (gchar *const filename)
 create a GitkDialog from a giml-file

GitkDialogPtr gitk_dialog_new_from_memory (gchar *const buffer, const guint size)
 create a GitkDialog from a memory block containing giml dialog description

GitkDialogPtr gitk_dialog_new_from_parser_context (xmlParserCtxtPtr const ctxt)
 create a GitkDialog from a parser context

GitkDialogPtr gitk_dialog_new_from_string (gchar *const str)
 create a GitkDialog from a string containing giml dialog description

gboolean gitk_dialog_process_event (GitkDialogPtr const dialog, gchar *const widget_id, GitkEventPtr const event)
 searches event-callback lists for a callback to this event for this widget and ivokes it. It first checks the list of callbacks that belongs to the dialog. If no handler is found, the global callbacklist (those of handlers connected with dialog=NULL) is searched.

void gitk_dialog_set_content (GitkDialogPtr const dialog, GitkDialogAccessType const access_type, xmlXPathCompExprPtr cxpath_expr, gchar *const xpath_expr, const gchar *const new_value)
 sets content in gitk doc tree to a new value

gboolean gitk_dialog_show (GitkDialogPtr const dialog, gboolean const modal)
 show a dialog. When a dialog is show with model=TRUE, then it blocks all previous dialogs, unitl it is finished. The stack of dialog is maintained by the gitk context manager.

gboolean gitk_dialog_trans (GitkDialogPtr const dialog)
 applies all transformations to GitkDialogPtr->src and puts result into GitkDialogPtr->dst. This transformation chain needs to be applied when structural changes have happend.

void gitk_dialog_trans_callback (GitkDialogPtr dialog)
 registers all global callbacks in giml dialog

xmlDocPtr gitk_dialog_trans_domain (xmlDocPtr const src)
 applies domain specific transformation

xmlDocPtr gitk_dialog_trans_expand (xmlDocPtr const src)
 add default nodes to giml dialog

xmlDocPtr gitk_dialog_trans_i18n (xmlDocPtr const src)
 translates i18n nodes in giml dialog

gboolean gitk_dialog_trans_initial (GitkDialogPtr const dialog)
 applies all transformations initially to GitkDialogPtr->src. This transformation chain must be completed by executing the gitk_dialog_trans() chain. This initial transformation is only executed to save some time at retransformation steps (e.g. not retranslating static texts).

xmlDocPtr gitk_dialog_trans_style (xmlDocPtr const src)
 applies domain specific iuser style transformation


Detailed Description

An instance of this class represensts one dialog. Dialogs are constructed from XML (GIML, see the giml dtd module and the giml.dtd) data with one method from the gitk_dialog_new() family. The returned handle needs to be passed to all member functions as the first parameter.

After the dialog has been created one can show it by using gitk_dialog_show(), then one would connect callbacks using gitk_dialog_attach_callback() and finally start the event loop gitk_event_loop_start(). Apart from widget local callback, global callbacks exist e.g. to intercept closing of dialogs.

When the user finished using the dialog, it nned to be made invisible by gitk_dialog_hide() and then can by freed using gitk_dialog_free().


Typedef Documentation

typedef struct GitkCallbackNode GitkCallbackNode
 

gitk event callback node

Definition at line 249 of file gitk.h.

typedef GitkCallbackNode* GitkCallbackNodePtr
 

pointer to GitkCallbackNode

Definition at line 253 of file gitk.h.

Referenced by gitk__dialog_attach_callback(), gitk_dialog_detach_callback(), gitk_dialog_free(), gitk_dialog_process_event(), gitk_dialog_trans_callback(), gitk_done(), and gitk_get_callback_node().

typedef gboolean(* GitkCallbackPtr)(GitkDialogPtr dialog,gchar *widget_id,GitkEventPtr event,gpointer user_data)
 

gitk event callback

Parameters:
dialog to which dialog is the callback related, if NULL then it is a global event
widget_id to which widget the event applies, if NULL then it is a global event
event what kind of event it is
user_data the client application can attach any data to the event
Returns:
true for accepted event, false otherwise

Definition at line 242 of file gitk.h.

Referenced by gitk__dialog_attach_callback().

typedef struct GitkDialog GitkDialog
 

gitk dialog, active dialog with a GitkLayout

Definition at line 154 of file gitk.h.

typedef GitkDialog* GitkDialogPtr
 

a pointer to GitkDialog

Definition at line 161 of file gitk.h.

Referenced by dialog_on_clicked(), gitk__cxpath_get_node(), gitk__cxpath_get_object(), gitk__cxpath_get_string(), gitk__dialog_attach_callback(), gitk__dialog_get_doc(), gitk__dialog_get_widget(), gitk__dialog_set_title(), gitk__widget_get_value(), gitk__widget_set_value(), gitk__xpath_get_node(), gitk__xpath_get_object(), gitk__xpath_get_string(), gitk_context_activate(), gitk_context_count_active(), gitk_context_get_current(), gitk_context_get_highest_used_priority(), gitk_context_set_current(), gitk_dialog_detach_callback(), gitk_dialog_free(), gitk_dialog_get_dst(), gitk_dialog_get_src(), gitk_dialog_hide(), gitk_dialog_invalidate(), gitk_dialog_new(), gitk_dialog_new_from_file(), gitk_dialog_new_from_memory(), gitk_dialog_new_from_parser_context(), gitk_dialog_new_from_string(), gitk_dialog_process_event(), gitk_dialog_set_content(), gitk_dialog_show(), gitk_dialog_trans(), gitk_dialog_trans_callback(), gitk_dialog_trans_initial(), gitk_dialog_validate(), gitk_done(), gitk_event_loop_exchange(), gitk_get_callback_node(), gitk_relayout(), gitkr_cxpath_get_string(), gitkr_dialog_free_layout(), gitkr_dialog_generate_dialog_widgets(), gitkr_dialog_generate_hierarchical_layout(), gitkr_dialog_generate_layout(), gitkr_dialog_generate_layout_walker(), gitkr_dialog_generate_sequential_layout(), gitkr_dialog_generate_sequential_layout_build_page(), gitkr_dialog_generate_sequential_layout_count_pages(), gitkr_dialog_hide(), gitkr_dialog_new_layout(), gitkr_dialog_output_layout(), gitkr_dialog_show(), gitkr_render(), gitkr_select_context(), gitkr_set_context(), gitkr_widget_action_new(), gitkr_widget_characterinput_alphabetic_new(), gitkr_widget_characterinput_new(), gitkr_widget_get_value(), gitkr_widget_label_new(), gitkr_widget_new(), gitkr_widget_optionchoice_boolean_new(), gitkr_widget_optionchoice_new(), gitkr_widget_set_value(), gitkrnull_dialog_hide(), gitkrnull_dialog_show(), global_on_close(), index_html(), test_gitk_dialog_new_from_string_1(), test_gitk_dialog_show_1(), test_gitk_dialog_show_2(), test_gitk_valid_invalid_giml(), test_gitk_valid_not_giml(), test_gitk_valid_not_xml(), and test_gitk_widget_set_get_value().


Function Documentation

void gitk__dialog_attach_callback GitkDialogPtr const  dialog,
gchar *const  widget_id,
const GitkEventType  type,
gpointer const  user_data,
GitkCallbackPtr const  callback,
gchar *const  callback_name
 

connect a callback-method to one event-slot of a widget in a dialog. Widget related callbacks need a dialog and a widget_id. For global callbacks both parameters need to be NULL.

Parameters:
dialog to which dialog is the callback related, if NULL then it is a global event
widget_id to which widget the event applies, if NULL then it is a global event
type what kind of event it is (see GitkEventType)
user_data the client application can attach any data to the event
callback the function to invoke, when the event has been occured
callback_name the name to put into the live xml

Todo:
what do we do,if a callback already exists in the list ?

Definition at line 73 of file gitkcallback.c.

References GitkCallbackNode::callback, GitkDialog::callback_list, GitkCallbackNode::callback_name, callback_names, gitk__xpath_get_node(), GITK_DIALOG_ACCESS_CLIENT, GITK_DIALOG_ACCESS_RENDERER, gitk_dialog_list, GITK_EVENT_TYPE_ON_CHANGED, gitk_get_widget_xpath_expression(), gitk_global_callback_list, gitk_log2, GITK_NS_PREFIX, gitk_save_get_string, GitkCallbackNodePtr, GitkCallbackPtr, GitkDialogPtr, GitkEventType, GitkCallbackNode::type, GitkCallbackNode::user_data, and GitkCallbackNode::widget_id.

Here is the call graph for this function:

xmlDocPtr gitk__dialog_get_doc GitkDialogPtr const  dialog,
GitkDialogAccessType  access_type
 

get the source/destination giml/xml document

Parameters:
dialog the dialog handle
access_type how to access the dialog
Returns:
a xmlDocPtr or NULL if dialog contains no docment

Definition at line 304 of file gitkdialog.c.

References GITK_DIALOG_ACCESS_CLIENT, GITK_DIALOG_ACCESS_RENDERER, gitk_dialog_get_dst(), gitk_dialog_get_src(), GitkDialogAccessType, and GitkDialogPtr.

Referenced by gitk__cxpath_get_object().

Here is the call graph for this function:

xmlNodePtr gitk__dialog_get_widget GitkDialogPtr const  dialog,
GitkDialogAccessType const  access_type,
gchar *const  widget_id
 

retrieve the widget from the doc-tree

Parameters:
dialog the dialog which contains the widget
access_type how to access the dialog
widget_id the id of the widget to look up
Returns:
a xmlNodePtr or NULL if no widget with the given id was found
See also:
gitkcorewidget

Definition at line 402 of file gitkdialog.c.

References gitk__xpath_get_node(), gitk_get_widget_xpath_expression(), GitkDialogAccessType, and GitkDialogPtr.

Referenced by gitk__widget_get_value(), and gitk_dialog_move_focus().

Here is the call graph for this function:

void gitk__dialog_set_title GitkDialogPtr const  dialog,
GitkDialogAccessType const  access_type,
gchar *const  new_title
 

sets the dialog title

Parameters:
dialog the dialog where the title should be changed
access_type how to access the dialog
new_title the new dialog title

Definition at line 422 of file gitkdialog.c.

References gitk_dialog_set_content(), gitk_log1, GitkDialogAccessType, GitkDialogPtr, and xpath_get_dialog_name.

Here is the call graph for this function:

void gitk_dialog_detach_callback GitkDialogPtr const  dialog,
gchar *const  widget_id,
const GitkEventType  type
 

removes the callback from one event-slot of a widget

Parameters:
dialog to which dialog is the callback related, if NULL then it is a global event
widget_id to which widget the event applies, if NULL then it is a global event
type what kind of event it is (see GitkEventType)

Definition at line 134 of file gitkcallback.c.

References GitkDialog::callback_list, GitkCallbackNode::callback_name, callback_names, gitk__xpath_get_node(), GITK_DIALOG_ACCESS_CLIENT, GITK_DIALOG_ACCESS_RENDERER, gitk_dialog_list, gitk_get_callback_node(), gitk_get_widget_xpath_expression(), gitk_global_callback_list, GITK_NS_PREFIX, GitkCallbackNodePtr, GitkDialogPtr, GitkEventType, and GitkCallbackNode::widget_id.

Here is the call graph for this function:

void gitk_dialog_free GitkDialogPtr const  dialog  ) 
 

free a GitkDialog. This unconnects all callbacks and releases memory.

Parameters:
dialog giml dialog to free
See also:
gitk_dialog_new_from_file, gitk_dialog_new_from_memory, gitk_dialog_new_from_string

Definition at line 148 of file gitkdialog.c.

References GitkDialog::callback_list, GitkCallbackNode::callback_name, GitkDialog::dst, GitkCallbackNodePtr, GitkDialogPtr, GitkDialog::lock, GitkDialog::src, and GitkCallbackNode::widget_id.

Referenced by gitk_dialog_new(), gitk_done(), gitk_template_message_with_title(), gitkr_done(), gitkr_select_context(), main(), main_show(), test_gitk_dialog_new_from_string_1(), test_gitk_dialog_show_1(), test_gitk_dialog_show_2(), test_gitk_valid_invalid_giml(), test_gitk_valid_not_giml(), test_gitk_valid_not_xml(), and test_gitk_widget_set_get_value().

xmlDocPtr gitk_dialog_get_dst GitkDialogPtr const  dialog  ) 
 

get the target xml document, this takes care that the target document gets generated at least when someone accesses it

Parameters:
dialog the dialog handle
Returns:
a xmlDocPtr or NULL if the target document could not be produced
See also:
gitk_dialog_trans

Definition at line 285 of file gitkdialog.c.

References GitkDialog::dst, gitk_dialog_dump(), gitk_dialog_trans(), gitk_log, and GitkDialogPtr.

Referenced by gitk__dialog_get_doc().

Here is the call graph for this function:

xmlDocPtr gitk_dialog_get_src GitkDialogPtr const  dialog  ) 
 

get the source giml/xml document

Parameters:
dialog the dialog handle
Returns:
a xmlDocPtr or NULL if dialog contains no docment

Definition at line 273 of file gitkdialog.c.

References GitkDialogPtr, and GitkDialog::src.

Referenced by gitk__dialog_get_doc().

void gitk_dialog_hide GitkDialogPtr const  dialog  ) 
 

hide a dialog. Callbacks remain connected, so that calling gitk_dialog_show() reactivates the callbacks.

Parameters:
dialog the handle of the dialog to hide
See also:
gitk_dialog_show

Todo:
test if dialog is already in gitk_dialog_list, via g_list_find(gitk_dialog_list,dialog)

Definition at line 67 of file gitkwrapper.c.

References GitkEvent::data, gitk_dialog_list, gitk_dialog_process_event(), GITK_EVENT_TYPE_ON_DIALOG_HIDE, gitk_log, gitk_renderer, GitkDialogPtr, GitkRenderer::gitkr_dialog_hide, and GitkEvent::type.

Referenced by gitk_done(), gitk_template_message_with_title(), gitkr_done(), gitkr_select_context(), main(), main_show(), test_gitk_dialog_show_1(), test_gitk_dialog_show_2(), and test_gitk_widget_set_get_value().

Here is the call graph for this function:

void gitk_dialog_invalidate GitkDialogPtr const  dialog  ) 
 

invalidate the prepared dst doc, this ensures that on the next access the transformations are repeated

Parameters:
dialog the dialog handle
See also:
gitk_dialog_get_dst

Definition at line 319 of file gitkdialog.c.

References GitkDialog::changed, GitkDialog::dst, and GitkDialogPtr.

Referenced by gitk_event_loop_exchange(), and gitk_relayout().

GitkDialogPtr gitk_dialog_new xmlDocPtr const  doc  ) 
 

create GitkDialog from xml-doc

Parameters:
doc xml-doc containing giml dialog
Returns:
giml dialog or null on error
See also:
GITK_ERROR_INVALID_DOCUMENT, GITK_ERROR_EMPTY_DOCUMENT, GITK_ERROR_WRONG_DOCTYPE_NAMESPACE, GITK_ERROR_WRONG_DOCTYPE_ROOTNODE

gitk_dialog_free, gitk_dialog_new_from_file, gitk_dialog_new_from_memory, gitk_dialog_new_from_string

Definition at line 233 of file gitkdialog.c.

References GitkDialog::dst, gitk_dialog_dump(), gitk_dialog_free(), gitk_dialog_trans_initial(), gitk_dialog_validate(), gitk_log, gitk_log1, GitkDialogPtr, GitkDialog::lock, and GitkDialog::src.

Referenced by gitk_dialog_new_from_parser_context().

Here is the call graph for this function:

GitkDialogPtr gitk_dialog_new_from_file gchar *const  filename  ) 
 

create a GitkDialog from a giml-file

Parameters:
filename file containing giml-dialog description
Returns:
pointer to dialog or null on error
See also:
GITK_ERROR_INVALID_DOCUMENT, GITK_ERROR_EMPTY_DOCUMENT, GITK_ERROR_WRONG_DOCTYPE_NAMESPACE GITK_ERROR_WRONG_DOCTYPE_ROOTNODE

gitk_dialog_new_from_memory, gitk_dialog_new_from_string, gitk_dialog_free

Definition at line 43 of file gitkdialog.c.

References gitk_dialog_new_from_parser_context(), gitk_err1, and GitkDialogPtr.

Referenced by gitk_template_message_with_title(), and main_show().

Here is the call graph for this function:

GitkDialogPtr gitk_dialog_new_from_memory gchar *const  buffer,
const guint  size
 

create a GitkDialog from a memory block containing giml dialog description

Parameters:
buffer memory buffer containing giml-dialog description
size size of the memory buffer
Returns:
pointer to dialog or null on error
See also:
GITK_ERROR_INVALID_DOCUMENT, GITK_ERROR_EMPTY_DOCUMENT, GITK_ERROR_WRONG_DOCTYPE_NAMESPACE, GITK_ERROR_WRONG_DOCTYPE_ROOTNODE

gitk_dialog_new_from_file, gitk_dialog_new_from_string, gitk_dialog_free

Definition at line 68 of file gitkdialog.c.

References gitk_dialog_new_from_parser_context(), gitk_err, and GitkDialogPtr.

Here is the call graph for this function:

GitkDialogPtr gitk_dialog_new_from_parser_context xmlParserCtxtPtr const  ctxt  ) 
 

create a GitkDialog from a parser context

Parameters:
ctxt the prepared xml parser
Returns:
pointer to dialog or null on error
See also:
GITK_ERROR_INVALID_DOCUMENT, GITK_ERROR_EMPTY_DOCUMENT, GITK_ERROR_WRONG_DOCTYPE_NAMESPACE, GITK_ERROR_WRONG_DOCTYPE_ROOTNODE

gitk_dialog_new_from_file, gitk_dialog_new_from_memory, gitk_dialog_new_from_string, gitk_dialog_free

giml.dtd

Definition at line 118 of file gitkdialog.c.

References _, gitk_dialog_new(), GITK_ERROR_INVALID_DOCUMENT, gitk_log2, gitk_set_error(), and GitkDialogPtr.

Referenced by gitk_dialog_new_from_file(), gitk_dialog_new_from_memory(), and gitk_dialog_new_from_string().

Here is the call graph for this function:

GitkDialogPtr gitk_dialog_new_from_string gchar *const  str  ) 
 

create a GitkDialog from a string containing giml dialog description

Parameters:
str null terminated string containing giml-dialog description
Returns:
pointer to dialog or null on error
See also:
GITK_ERROR_INVALID_DOCUMENT, GITK_ERROR_EMPTY_DOCUMENT, GITK_ERROR_WRONG_DOCTYPE_NAMESPACE, GITK_ERROR_WRONG_DOCTYPE_ROOTNODE

gitk_dialog_new_from_file,gitk_dialog_new_from_memory , gitk_dialog_free

Definition at line 93 of file gitkdialog.c.

References gitk_dialog_new_from_parser_context(), gitk_err, and GitkDialogPtr.

Referenced by gitkr_select_context(), main(), main_show(), test_gitk_dialog_new_from_string_1(), test_gitk_dialog_show_1(), test_gitk_dialog_show_2(), test_gitk_valid_invalid_giml(), test_gitk_valid_not_giml(), test_gitk_valid_not_xml(), and test_gitk_widget_set_get_value().

Here is the call graph for this function:

gboolean gitk_dialog_process_event GitkDialogPtr const  dialog,
gchar *const  widget_id,
GitkEventPtr const  event
 

searches event-callback lists for a callback to this event for this widget and ivokes it. It first checks the list of callbacks that belongs to the dialog. If no handler is found, the global callbacklist (those of handlers connected with dialog=NULL) is searched.

Parameters:
dialog to which dialog is the callback related, if NULL then it is a global event
widget_id to which widget the event applies, if NULL then it is a global event
event the event to be processed
Returns:
true for accepted event or uncatched event, false otherwise

Definition at line 186 of file gitkcallback.c.

References GitkCallbackNode::callback, GitkCallbackNode::callback_name, gitk_get_callback_node(), gitk_log1, GitkCallbackNodePtr, GitkDialogPtr, GitkEventPtr, GitkEvent::type, and GitkCallbackNode::user_data.

Referenced by gitk__widget_set_value(), gitk_dialog_hide(), gitk_dialog_show(), handle_dialog_ctrl_widgets(), handle_dialog_main_widgets(), sighandler_editable_widget_on_changed(), sighandler_on_sighup(), sighandler_on_sigint(), sighandler_option_widget_on_changed(), sighandler_widget_on_clicked(), and sighandler_window_on_close().

Here is the call graph for this function:

void gitk_dialog_set_content GitkDialogPtr const  dialog,
GitkDialogAccessType const  access_type,
xmlXPathCompExprPtr  cxpath_expr,
gchar *const  xpath_expr,
const gchar *const  new_value
 

sets content in gitk doc tree to a new value

Parameters:
dialog the dialog where the title should be changed
access_type how to access the dialog
cxpath_expr the compiled xpath expression that addresses a single textnode or NULL (xpath_expr must not be NULL then)
xpath_expr the xpath expression that addresses a single textnode, will only be used if cxpath_expr is NULL
new_value the new dialog title

Definition at line 346 of file gitkdialog.c.

References gitk__cxpath_get_node(), gitk_err, gitk_log, gitk_log1, gitk_toggle_access_type(), GitkDialogAccessType, and GitkDialogPtr.

Referenced by gitk__dialog_set_title(), and gitk__widget_set_value().

Here is the call graph for this function:

gboolean gitk_dialog_show GitkDialogPtr const  dialog,
gboolean const  modal
 

show a dialog. When a dialog is show with model=TRUE, then it blocks all previous dialogs, unitl it is finished. The stack of dialog is maintained by the gitk context manager.

Parameters:
dialog the handle of the dialog to show
modal should the dialog run exclusive (modal) or not
Returns:
true for success
See also:
gitk_dialog_hide, gitk_dialog_new_from_file, gitk_dialog_new_from_memory, gitk_dialog_new_from_string

Todo:
test if dialog is not yet in gitk_dialog_list, via !g_list_find(gitk_dialog_list,dialog)

Definition at line 28 of file gitkwrapper.c.

References GitkDialog::changed, GitkEvent::data, gitk_context_get_highest_used_priority(), gitk_dialog_list, gitk_dialog_process_event(), GITK_EVENT_TYPE_ON_DIALOG_SHOW, gitk_log, gitk_log1, gitk_renderer, GitkDialogPtr, GitkRenderer::gitkr_dialog_show, GitkDialog::priority, and GitkEvent::type.

Referenced by gitk_template_message_with_title(), gitkr_select_context(), main(), main_show(), test_gitk_dialog_show_1(), test_gitk_dialog_show_2(), and test_gitk_widget_set_get_value().

Here is the call graph for this function:

gboolean gitk_dialog_trans GitkDialogPtr const  dialog  ) 
 

applies all transformations to GitkDialogPtr->src and puts result into GitkDialogPtr->dst. This transformation chain needs to be applied when structural changes have happend.

Parameters:
dialog giml dialog
Returns:
TRUE for succes, FALSE for failure

Todo:
later we might need another domain transformation step here (splitting complex widgets, etc.)

Definition at line 74 of file gitktrans.c.

References GitkDialog::dst, gitk_dialog_trans_domain(), gitk_dialog_trans_expand(), gitk_dialog_trans_i18n(), gitk_dialog_trans_style(), gitk_log, gitk_log_intro, gitk_log_outro, GITK_NS_URL, GitkDialogPtr, GitkDialog::ns, and GitkDialog::src.

Referenced by gitk_dialog_get_dst().

Here is the call graph for this function:

void gitk_dialog_trans_callback GitkDialogPtr  dialog  ) 
 

registers all global callbacks in giml dialog

Parameters:
dialog xml document to process
Returns:
the new document or NULL for failure

Definition at line 210 of file gitkcallback.c.

References GitkCallbackNode::callback_name, callback_names, gitk__xpath_get_node(), GITK_DIALOG_ACCESS_CLIENT, GITK_DIALOG_ACCESS_RENDERER, gitk_global_callback_list, GITK_NS_PREFIX, GitkCallbackNodePtr, GitkDialogPtr, and GitkCallbackNode::type.

Referenced by gitk_dialog_trans_initial().

Here is the call graph for this function:

xmlDocPtr gitk_dialog_trans_domain xmlDocPtr const  src  ) 
 

applies domain specific transformation

Parameters:
src xml document to process
Returns:
the new document or NULL for failure

Definition at line 23 of file gitktrans-domain.c.

References gitk_err1, gitk_log1, gitk_renderer_name, xsl_domain, and XSL_ROOT_PATH.

Referenced by gitk_dialog_trans().

xmlDocPtr gitk_dialog_trans_expand xmlDocPtr const  src  ) 
 

add default nodes to giml dialog

Parameters:
src xml document to process
Returns:
the new document or NULL for failure
See also:
expand.xsl

Definition at line 24 of file gitktrans-expand.c.

References gitk_err, gitk_log, and xsl_expand.

Referenced by gitk_dialog_trans(), and gitk_dialog_trans_initial().

xmlDocPtr gitk_dialog_trans_i18n xmlDocPtr const  src  ) 
 

translates i18n nodes in giml dialog

Parameters:
src xml document to process
Returns:
the new document or NULL for failure

Definition at line 94 of file gitktrans-i18n.c.

References gitk_err, and xsl_i18n.

Referenced by gitk_dialog_trans().

gboolean gitk_dialog_trans_initial GitkDialogPtr const  dialog  ) 
 

applies all transformations initially to GitkDialogPtr->src. This transformation chain must be completed by executing the gitk_dialog_trans() chain. This initial transformation is only executed to save some time at retransformation steps (e.g. not retranslating static texts).

Parameters:
dialog giml dialog
Returns:
TRUE for succes, FALSE for failure

Definition at line 32 of file gitktrans.c.

References gitk_dialog_trans_callback(), gitk_dialog_trans_expand(), gitk_log, gitk_log_intro, gitk_log_outro, GITK_NS_URL, GitkDialogPtr, GitkDialog::ns, and GitkDialog::src.

Referenced by gitk_dialog_new().

Here is the call graph for this function:

xmlDocPtr gitk_dialog_trans_style xmlDocPtr const  src  ) 
 

applies domain specific iuser style transformation

Parameters:
src xml document to process
Returns:
the new document or NULL for failure

Definition at line 23 of file gitktrans-style.c.

References gitk_err2, gitk_log2, gitk_renderer_name, gitk_style_name, XSL_ROOT_PATH, and xsl_style.

Referenced by gitk_dialog_trans().


Generated on Thu Oct 28 11:04:11 2004 for gitk by doxygen 1.3.6