1
  
2
  
3
  
4
  
5
  
6
  
7
  
8
  
9
  
10
  
11
  
12
  
13
  
14
  
15
  
16
  
17
  
18
  
19
  
20
  
21
  
22
  
23
  
24
  
25
  
26
  
27
  
28
  
29
  
30
  
31
  
32
  
33
  
34
  
35
  
36
  
37
  
38
  
39
  
40
  
41
  
42
  
43
  
44
  
45
  
46
  
47
  
48
  
49
  
50
  
51
  
52
  
53
  
54
  
55
  
56
  
57
  
58
  
59
  
60
  
61
  
62
  
63
  
64
  
65
  
66
  
67
  
68
  
69
  
70
  
71
  
72
  
73
  
74
  
75
  
76
  
77
  
78
  
79
  
80
  
81
  
82
  
83
  
84
  
85
  
86
  
/* -*- C -*- */ 
require gnomeui; 
 
class Gnome2.Appbar; 
inherit GTK2.Hbox; 
 
//!  A bar that GNOME applications put on the bottom of the windows to 
//!  display status, progress, hints for menu items or a minibuffer for 
//!  getting some sort of response. It has a stack for status messages 
//!  IMG: Gnome2.Appbar( 1, 1, Gnome2.PreferencesUser )->set_progress( 0.4 ); 
 
//! Properties: 
//! int has-progress 
//! int has-status 
//! int interactivity 
 
signal user_response; 
//! Emitted when the user hits enter after a prompt.<br> 
//!  mixed user_data 
 
signal clear_prompt; 
//! Emitted when the prompt is cleared.<br> 
//!  mixed user_data 
 
void create(int has_progress, int has_status, int interactivity); 
//! Create a new GNOME application status bar. If has_progress is TRUE, 
//! a small progress bar widget will be created, and placed on the left 
//! side of the appbar. If has_status is TRUE, a status bar, possibly 
//! an editable one, is created. 
//! <p> 
//! interactivity determines whether the appbar is an interactive 
//! "minibuffer" or just a status bar. If it is set to 
//! Gnome2.PREFERENCES_NEVER, it is never interactive. If it is set to 
//! Gnome2.PREFERENCES_USER we respect user preferences from 
//! ui-properties. If it's Gnome2.PREFERENCES_ALWAYS we are interactive 
//! whether the user likes it or not. Basically, if your app supports 
//! both interactive and not (for example, if you use the 
//! gnome-app-util interfaces), you should use 
//! Gnome2.PREFERENCES_USER. Otherwise, use the setting you 
//! support. Please note that "interactive" mode is not functional now; 
//! GtkEntry is inadequate and so a custom widget will be written eventually. 
//! </p> 
 
void set_status(string status); 
//! Sets the status label without changing widget state; next set or 
//! push will destroy this permanently. 
 
GTK2.Widget get_status(); 
//! Retrieves the statusbar widget. 
 
void set_default(string default_status); 
//! What to show when showing nothing else; defaults to "". 
 
void push(string what); 
//! Push a new status message onto the status bar stack, and display it. 
 
void pop(); 
//! Remove current status message, and display previous status message, 
//! if any. It is OK to call this with an empty stack. 
 
void clear_stack(); 
//! Remove all status messages from appbar, and display default status 
//! message (if present). 
 
void set_progress_percentage(float percentage); 
//! Sets progress bar to the given percentage. 
 
GTK2.ProgressBar get_progress(); 
//! Returns GTK2.ProgressBar widget pointer, so that the progress bar may 
//! be manipulated further. 
 
void refresh(); 
//! Reflect the current state of stack/default. Useful to force a 
//! set_status to disappear. 
 
void set_prompt(string prompt, int modal); 
//! Put a prompt in the appbar and wait for a response. When the user 
//! responds or cancels, a "user-response" signal is emitted. 
 
void clear_prompt(); 
//! Remove any prompt. 
 
string(free) get_response(); 
//! Get the response to the prompt, if any.