## GtrStatusbar

GtrStatusbar

## Synopsis

    struct              GtrStatusbar;
    struct              GtrStatusbarClass;
    GtkWidget *         gtr_statusbar_new                   (void);
    void                gtr_statusbar_push_default          (GtrStatusbar *statusbar,
                                                             const gchar *text);
    void                gtr_statusbar_pop_default           (GtrStatusbar *statusbar);
    guint               gtr_statusbar_push                  (GtrStatusbar *statusbar,
                                                             guint context_id,
                                                             const gchar *text);
    void                gtr_statusbar_pop                   (GtrStatusbar *statusbar,
                                                             guint context_id);
    guint               gtr_statusbar_get_context_id        (GtrStatusbar *statusbar,
                                                             const gchar *context_description);
    void                gtr_statusbar_set_overwrite         (GtrStatusbar *statusbar,
                                                             gboolean overwrite);
    void                gtr_statusbar_clear_overwrite       (GtrStatusbar *statusbar);
    void                gtr_statusbar_flash_message         (GtrStatusbar *statusbar,
                                                             guint context_id,
                                                             const gchar *format,
                                                             ...);
    void                gtr_statusbar_update_progress_bar   (GtrStatusbar *statusbar,
                                                             gdouble translated_count,
                                                             gdouble messages_count);
    void                gtr_statusbar_clear_progress_bar    (GtrStatusbar *statusbar);

## Description

## Details

### struct GtrStatusbar

    struct GtrStatusbar {
      GtkBox parent;

      /* <private/> */
      GtrStatusbarPrivate *priv;
    };

### struct GtrStatusbarClass

    struct GtrStatusbarClass {
      GtkBoxClass parent_class;
    };

### gtr_statusbar_new ()

    GtkWidget *         gtr_statusbar_new                   (void);

Creates a new GtrStatusbar.

Returns : | the new GtrStatusbar object

### gtr_statusbar_push_default ()

    void                gtr_statusbar_push_default          (GtrStatusbar *statusbar,
                                                             const gchar *text);

Pushes a text onto the statusbar in the default context id.

`statusbar` : | a GtrStatusbar
`text` : | the text to push in the statusbar

### gtr_statusbar_pop_default ()

    void                gtr_statusbar_pop_default           (GtrStatusbar *statusbar);

Pops the text in the statusbar of the default context id.

`statusbar` : | a GtrStatusbar

### gtr_statusbar_push ()

    guint               gtr_statusbar_push                  (GtrStatusbar *statusbar,
                                                             guint context_id,
                                                             const gchar *text);

Pushes a new message onto a statusbar's stack.

`statusbar` : | a GtrStatusbar
`context_id` : | the message's context id, as returned by `gtk_statusbar_get_context_id()`
`text` : | the text to push in the statusbar
Returns : | a message id that can be used with `gtk_statusbar_remove()`

### gtr_statusbar_pop ()

    void                gtr_statusbar_pop                   (GtrStatusbar *statusbar,
                                                             guint context_id);

Removes the first message in the GtkStatusBar's stack with the given context id.

`statusbar` : | a GtrStatusbar
`context_id` : | a context identifier

### gtr_statusbar_get_context_id ()

    guint               gtr_statusbar_get_context_id        (GtrStatusbar *statusbar,
                                                             const gchar *context_description);

Returns a new context identifier, given a description of the actual context. Note that the description is not shown in the UI.

`statusbar` : | a GtrStatusbar
`context_description` : | textual description of what context the new message is being used in
Returns : | an integer id

### gtr_statusbar_set_overwrite ()

    void                gtr_statusbar_set_overwrite         (GtrStatusbar *statusbar,
                                                             gboolean overwrite);

Sets the overwrite mode on the statusbar.

`statusbar` : | a GtrStatusbar
`overwrite` : | if the overwrite mode is set

### gtr_statusbar_clear_overwrite ()

    void                gtr_statusbar_clear_overwrite       (GtrStatusbar *statusbar);

Clears the statusbar overwrite label.

`statusbar` : | a GtrStatusbar

### gtr_statusbar_flash_message ()

    void                gtr_statusbar_flash_message         (GtrStatusbar *statusbar,
                                                             guint context_id,
                                                             const gchar *format,
                                                             ...);

Flash a temporary message on the statusbar.

`statusbar` : | a GtrStatusbar
`context_id` : | message context_id
`format` : | message to flash on the statusbar

### gtr_statusbar_update_progress_bar ()

    void                gtr_statusbar_update_progress_bar   (GtrStatusbar *statusbar,
                                                             gdouble translated_count,
                                                             gdouble messages_count);

Updates the state of the progress bar with the given values.

`statusbar` : | a GtrStatusbar
`translated_count` : | the number of translated messages
`messages_count` : | the number of messages

### gtr_statusbar_clear_progress_bar ()

    void                gtr_statusbar_clear_progress_bar    (GtrStatusbar *statusbar);

Clear the progress bar

`statusbar` : | a GtrStatusbar