BEAST/BSE - Better Audio System and Sound Engine  0.8.2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
gxkstatusbar.hh
Go to the documentation of this file.
00001  // Licensed GNU LGPL v2.1 or later: http://www.gnu.org/licenses/lgpl.html
00002 #ifndef __GXK_STATUS_BAR_H__
00003 #define __GXK_STATUS_BAR_H__
00004 
00005 #include <gxk/gxkutils.hh>
00006 
00007 G_BEGIN_DECLS
00008 
00009 /* --- status percentages --- */
00010 #define GXK_STATUS_PROGRESS     (+200.0)
00011 #define GXK_STATUS_DONE         (+100.0)
00012 #define GXK_STATUS_IDLE_HINT    (-0.4)
00013 #define GXK_STATUS_IDLE         (-0.5)
00014 #define GXK_STATUS_WAIT         (-1.0)
00015 #define GXK_STATUS_ERROR        (-2.0)
00016 /* 0..+100 is normal progression percentage */
00017 
00018 
00019 /* --- auxillary structure --- */
00020 typedef struct
00021 {
00022   GtkWidget      *sbar;
00023   GtkProgressBar *pbar;
00024   GtkProgress    *prog;
00025   GtkLabel       *message;
00026   GtkLabel       *status;
00027   guint           is_idle : 1;
00028   guint           timer_id;
00029 } GxkStatusBar;
00030 
00031 
00032 /* --- prototypes --- */
00033 GtkWidget* gxk_status_bar_create                (void);
00034 void       gxk_status_enable_error_bell         (gboolean        enable_error_bell);
00035 void       gxk_status_set                       (gfloat          percentage,
00036                                                  const gchar    *message,
00037                                                  const gchar    *status_msg);
00038 #define    gxk_status_printf(percentage, status_msg, ...)       gxk_status_set (percentage, status_msg, Rapicorn::string_format (__VA_ARGS__).c_str())
00039 void       gxk_status_clear                     (void);
00040 void       gxk_status_window_push               (gpointer        widget);
00041 void       gxk_status_window_pop                (void);
00042 void       gxk_status_push_progress_window      (gpointer        widget);
00043 void       gxk_status_pop_progress_window       (void);
00044 
00045 
00046 G_END_DECLS
00047 
00048 #endif  /* __GXK_STATUS_BAR_H__ */
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines