eb05362005-11-05Henrik Grubbström (Grubba) /* -*- C -*- */
1a05542005-07-28Martin Nilsson require gnome; 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.