libgitk context manager
[libgitk core]


Files

file  gitkcontext.c
 libgitk context functions

file  gitkcontext.h
 libgitk context functions


Functions

GitkDialogPtr gitk_context_activate (void)
 if there is just one context at highest priority then select it otherwise return NULL.

gint gitk_context_count_active (void)
 counts the number of active contexts. If there is a modal context or if there is just one context then select it.

GitkDialogPtr gitk_context_get_current (void)
 gets the currently active context

gint gitk_context_get_highest_used_priority (void)
 iterates over context list and returns the highest priority

void gitk_context_set_current (GitkDialogPtr const new_context)
 sets the currently active context


Variables

GitkDialogPtr cur_context
 current context, show all contexts of highest priority if NULL or use one if there is only one

GitkDialogPtr cur_context = NULL
 current context, show all contexts of highest priority if NULL or use one if there is only one


Detailed Description

The context manager maintains a list of dialog along with their stacking order. When one opens a new dialog using gitk_dialog_show() the parameter "modal" determines, wheter a new stacking layer is started or not. If a dialog is modal it blocks all parent dialogs, thus starting a new stacking layer.

Function Documentation

GitkDialogPtr gitk_context_activate void   ) 
 

if there is just one context at highest priority then select it otherwise return NULL.

Returns:
the newly activated context or NULL

Definition at line 68 of file gitkcontext.c.

References cur_context, gitk_dialog_list, gitk_log, gitk_log1, GitkDialogPtr, and GitkDialog::priority.

Referenced by gitkr_set_context(), and test_gitk_dialog_show_2().

gint gitk_context_count_active void   ) 
 

counts the number of active contexts. If there is a modal context or if there is just one context then select it.

Returns:
number of contexts

Definition at line 28 of file gitkcontext.c.

References cur_context, gitk_dialog_list, gitk_log, and GitkDialogPtr.

GitkDialogPtr gitk_context_get_current void   ) 
 

gets the currently active context

Returns:
the current context

Definition at line 124 of file gitkcontext.c.

References cur_context, and GitkDialogPtr.

Referenced by gitkr_event_loop_start().

gint gitk_context_get_highest_used_priority void   ) 
 

iterates over context list and returns the highest priority

Returns:
priority

Definition at line 100 of file gitkcontext.c.

References gitk_dialog_list, gitk_log, gitk_log1, GitkDialogPtr, and GitkDialog::priority.

Referenced by gitk_dialog_show(), and test_gitk_dialog_show_1().

void gitk_context_set_current GitkDialogPtr const  new_context  ) 
 

sets the currently active context

Parameters:
new_context the new current context

Definition at line 132 of file gitkcontext.c.

References cur_context, and GitkDialogPtr.

Referenced by gitkr_select_context().


Variable Documentation

GitkDialogPtr cur_context
 

current context, show all contexts of highest priority if NULL or use one if there is only one

Definition at line 45 of file gitkglobal.h.

GitkDialogPtr cur_context = NULL
 

current context, show all contexts of highest priority if NULL or use one if there is only one

Definition at line 99 of file gitkglobal.c.

Referenced by gitk_context_activate(), gitk_context_count_active(), gitk_context_get_current(), gitk_context_set_current(), gitkr_event_loop_start(), gitkr_render(), gitkr_set_context(), handle_dialog_ctrl_widgets(), handle_dialog_main_widgets(), next_page(), next_widget(), prev_page(), prev_widget(), and sighandler_on_sigwinch().


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