| swamigui Reference Manual | ||||
|---|---|---|---|---|
| Top | Description | Object Hierarchy | Implemented Interfaces | Properties | ||||
#define SWAMIGUI_STATUSBAR_GLOBAL_MAXLEN
SwamiguiStatusbar;
gboolean (*SwamiguiStatusbarCloseFunc) (SwamiguiStatusbar *statusbar,
GtkWidget *widg);
enum SwamiguiStatusbarPos;
enum SwamiguiStatusbarTimeout;
GtkWidget * swamigui_statusbar_new (void);
guint swamigui_statusbar_add (SwamiguiStatusbar *statusbar,
const char *group,
int timeout,
guint pos,
GtkWidget *widg);
void swamigui_statusbar_remove (SwamiguiStatusbar *statusbar,
guint id,
const char *group);
void swamigui_statusbar_printf (SwamiguiStatusbar *statusbar,
const char *format,
...);
GtkWidget * swamigui_statusbar_msg_label_new (const char *label,
guint maxlen);
GtkWidget * swamigui_statusbar_msg_progress_new (const char *label,
SwamiguiStatusbarCloseFunc close);
void swamigui_statusbar_msg_set_timeout (SwamiguiStatusbar *statusbar,
guint id,
const char *group,
int timeout);
void swamigui_statusbar_msg_set_label (SwamiguiStatusbar *statusbar,
guint id,
const char *group,
const char *label);
void swamigui_statusbar_msg_set_progress (SwamiguiStatusbar *statusbar,
guint id,
const char *group,
double val);
GObject +----GInitiallyUnowned +----GtkObject +----GtkWidget +----GtkContainer +----GtkBin +----GtkFrame +----SwamiguiStatusbar
gboolean (*SwamiguiStatusbarCloseFunc) (SwamiguiStatusbar *statusbar, GtkWidget *widg);
Callback function prototype which gets called when a close button on a progress status bar item gets activated.
|
The status bar widget |
|
The message widget |
Returns : |
Should return TRUE to remove the item from the status bar, FALSE
to keep it (useful if a confirmation dialog is popped for the user, etc).
|
typedef enum
{
SWAMIGUI_STATUSBAR_POS_LEFT,
SWAMIGUI_STATUSBAR_POS_RIGHT
} SwamiguiStatusbarPos;
typedef enum
{
SWAMIGUI_STATUSBAR_TIMEOUT_DEFAULT = -1, /* uses "default-timeout" property */
SWAMIGUI_STATUSBAR_TIMEOUT_FOREVER = 0 /* don't timeout */
} SwamiguiStatusbarTimeout;
GtkWidget * swamigui_statusbar_new (void);
Create a new status bar widget.
Returns : |
New widget. |
guint swamigui_statusbar_add (SwamiguiStatusbar *statusbar, const char *group, int timeout, guint pos, GtkWidget *widg);
Add a widget to a status bar. The widg is usually created with one of the
helper functions, such as swamigui_statusbar_msg_label_new() or
swamigui_statusbar_msg_progress_new(), although an arbitrary widget can
be added.
|
Statusbar widget |
|
Group identifier (existing message with same group is replaced, NULL for no group) |
|
Timeout of statusbar message in milliseconds (see SwamiguiStatusbarTimeout for special values including SWAMIGUI_STATUSBAR_TIMEOUT_FOREVER (0) for no timeout and SWAMIGUI_STATUSBAR_TIMEOUT_DEFAULT to use "default-timeout" property value) |
|
Position of message (SwamiguiStatusbarPos, 0 for default - left) |
|
Status widget to add to status bar |
Returns : |
New message unique ID (which can be used to change/remove message) |
void swamigui_statusbar_remove (SwamiguiStatusbar *statusbar,
guint id,
const char *group);
Remove a message by id or group.
|
Statusbar widget |
|
Unique ID of message (0 if group is specified)
|
|
Group of message to remove (NULL if id is specified)
|
void swamigui_statusbar_printf (SwamiguiStatusbar *statusbar,
const char *format,
...);
A convenience function to display a message label to a statusbar with the "default-timeout" property value for the timeout, no group and positioned left. This is commonly used to display an operation that was performed.
|
Statusbar widget |
|
printf() style format string.
|
|
Additional arguments for format string
|
GtkWidget * swamigui_statusbar_msg_label_new (const char *label, guint maxlen);
A helper function to create a label widget for use in a statusbar. Doesn't do a whole lot beyond just creating a regular GtkLabel and setting its max length.
|
Label text to assign to new widget |
|
Maximum length of label widget (sets size, 0 to set to width of label)
|
GtkWidget * swamigui_statusbar_msg_progress_new (const char *label, SwamiguiStatusbarCloseFunc close);
A helper function to create a progress status bar item.
|
Label text to assign to new widget |
|
Close callback function (NULL to not have a close button)
|
void swamigui_statusbar_msg_set_timeout (SwamiguiStatusbar *statusbar,
guint id,
const char *group,
int timeout);
Modify the timeout of an existing message in the statusbar. Message is
selected by id or group.
|
Statusbar widget |
|
Unique ID of message (0 if group is specified)
|
|
Group of message (NULL if id is specified)
|
|
New timeout of message in milliseconds (see SwamiguiStatusbarTimeout for special values including SWAMIGUI_STATUSBAR_TIMEOUT_FOREVER (0) for no timeout and SWAMIGUI_STATUSBAR_TIMEOUT_DEFAULT to use "default-timeout" property value) |
void swamigui_statusbar_msg_set_label (SwamiguiStatusbar *statusbar,
guint id,
const char *group,
const char *label);
Modify the label of an existing message in the statusbar. Message is
selected by id or group. This function should only be used for GtkLabel
widget status items or those created with
swamigui_statusbar_msg_label_new() and swamigui_statusbar_msg_progress_new().
|
Statusbar widget |
|
Unique ID of message (0 if group is specified)
|
|
Group of message (NULL if id is specified)
|
|
New label text to assign to statusbar item |
void swamigui_statusbar_msg_set_progress (SwamiguiStatusbar *statusbar,
guint id,
const char *group,
double val);
Modify the progress indicator of an existing message in the statusbar.
Message is selected by id or group. This function should only be used for
widget status items created with swamigui_statusbar_msg_progress_new().
|
Statusbar widget |
|
Unique ID of message (0 if group is specified)
|
|
Group of message (NULL if id is specified)
|
|
New progress value (0.0 to 1.0) |
"default-timeout" property"default-timeout" gint : Read / Write
Default timeout in milliseconds.
Allowed values: >= 0
Default value: 4000