GtrTab: GTranslator Reference Manual

## GtrTab GtrTab |

## Functions

GtrTab * | gtr_tab_new ()
GtrPo * | gtr_tab_get_po ()
gint | gtr_tab_get_active_trans_tab ()
GtrContextPanel * | gtr_tab_get_context_panel ()
GtrView * | gtr_tab_get_active_view ()
GList * | gtr_tab_get_all_views ()
void | gtr_tab_message_go_to ()
GtrTab * | gtr_tab_get_from_document ()
gboolean | gtr_tab_get_autosave_enabled ()
void | gtr_tab_set_autosave_enabled ()
gint | gtr_tab_get_autosave_interval ()
void | gtr_tab_set_autosave_interval ()
void | gtr_tab_add_widget ()
void | gtr_tab_remove_widget ()
void | gtr_tab_show_widget ()
void | gtr_tab_clear_msgstr_views ()
void | gtr_tab_copy_to_translation ()
void | gtr_tab_block_movement ()
void | gtr_tab_unblock_movement ()
void | gtr_tab_go_to_next ()
void | gtr_tab_go_to_prev ()
void | gtr_tab_go_to_first ()
void | gtr_tab_go_to_last ()
gboolean | gtr_tab_go_to_next_fuzzy ()
gboolean | gtr_tab_go_to_prev_fuzzy ()
gboolean | gtr_tab_go_to_next_untrans ()
gboolean | gtr_tab_go_to_prev_untrans ()
gboolean | gtr_tab_go_to_next_fuzzy_or_untrans ()
gboolean | gtr_tab_go_to_prev_fuzzy_or_untrans ()
void | gtr_tab_go_to_number ()
void | gtr_tab_set_info_bar ()

## Types and Values

enum | GtrTabMove
enum | GtrTabPlacement

## Description

## Functions

### gtr_tab_new ()

    GtrTab *
    gtr_tab_new (GtrPo *po);

Creates a new GtrTab.

#### Parameters

po | a GtrPo |

#### Returns

a new GtrTab object

### gtr_tab_get_po ()

    GtrPo *
    gtr_tab_get_po (GtrTab *tab);

#### Parameters

tab | a GtrTab |

#### Returns

the GtrPo stored in the GtrTab.

[transfer none]

### gtr_tab_get_active_trans_tab ()

    gint
    gtr_tab_get_active_trans_tab (GtrTab *tab);

#### Parameters

tab | a GtranslationTab |

#### Returns

the number of the active translation notebook.

### gtr_tab_get_context_panel ()

    GtrContextPanel *
    gtr_tab_get_context_panel (GtrTab *tab);

#### Parameters

tab | a GtrTab |

#### Returns

the GtranslaorContextPanel.

[transfer none]

### gtr_tab_get_active_view ()

    GtrView *
    gtr_tab_get_active_view (GtrTab *tab);

#### Parameters

tab | a GtranslationTab |

#### Returns

the active page of the translation notebook.

[transfer none]

### gtr_tab_get_all_views ()

    GList *
    gtr_tab_get_all_views (GtrTab *tab,
                           gboolean original,
                           gboolean translated);

Returns all the views currently present in GtranslationTab

#### Parameters

tab | the GtranslationTab |
original | TRUE if you want original TextViews. |
translated | TRUE if you want tranlated TextViews. |

#### Returns

a newly allocated list of GtranslationTab objects.

[transfer container][element-type Gtranslator.View]

### gtr_tab_message_go_to ()

    void
    gtr_tab_message_go_to (GtrTab *tab,
                           GtrMsg *to_go,
                           gboolean searching,
                           GtrTabMove move);

Jumps to the specific `to_go` pointer message and show the message in the GtrView.

#### Parameters

tab | a GtrTab |
to_go | the GtrMsg you want to jump |
searching | TRUE if we are searching in the message list |

### gtr_tab_get_from_document ()

    GtrTab *
    gtr_tab_get_from_document (GtrPo *po);

Returns the GtrTab for a specific GtrPo.

#### Parameters

po | a GtrPo |

#### Returns

the GtrTab for a specific GtrPo.

[transfer none]

### gtr_tab_get_autosave_enabled ()

    gboolean
    gtr_tab_get_autosave_enabled (GtrTab *tab);

Gets the current state for the autosave feature

#### Parameters

tab | a GtrTab |

#### Returns

TRUE if the autosave is enabled, else FALSE

### gtr_tab_set_autosave_enabled ()

    void
    gtr_tab_set_autosave_enabled (GtrTab *tab,
                                  gboolean enable);

Enables or disables the autosave feature. It does not install an autosave timeout if the document is new or is read-only

#### Parameters

tab | a GtrTab |
enable | enable (TRUE) or disable (FALSE) auto save |

### gtr_tab_get_autosave_interval ()

    gint
    gtr_tab_get_autosave_interval (GtrTab *tab);

Gets the current interval for the autosaves

#### Parameters

tab | a GtrTab |

#### Returns

the value of the autosave

### gtr_tab_set_autosave_interval ()

    void
    gtr_tab_set_autosave_interval (GtrTab *tab,
                                   gint interval);

Sets the interval for the autosave feature. It does nothing if the interval is the same as the one already present. It removes the old interval timeout and adds a new one with the autosave passed as argument.

#### Parameters

tab | a GtrTab |
interval | the new interval |

### gtr_tab_add_widget ()

    void
    gtr_tab_add_widget (GtrTab *tab,
                        GtkWidget *widget,
                        const gchar *unique_name,
                        const gchar *name,
                        const gchar *stock_id,
                        GtrTabPlacement placement);

Adds a new widget to place in `tab` .

#### Parameters

tab | a GtrTab |
widget | a GtkWidget |
unique_name | an unique name for the widget |
name | the name of `widget` |
stock_id | stock id for the icon of `widget` or `NULL`. | [allow-none]
placement | where to place `widget` in the tab |

### gtr_tab_remove_widget ()

    void
    gtr_tab_remove_widget (GtrTab *tab,
                           GtkWidget *widget);

Removes the `widget` from `tab` .

#### Parameters

tab | a GtrTab |
widget | a GtkWidget |

### gtr_tab_show_widget ()

    void
    gtr_tab_show_widget (GtrTab *tab,
                         GtkWidget *widget);

Presents the widget if it is not visible

#### Parameters

tab | a GtrTab |
widget | a GtkWidget |

### gtr_tab_clear_msgstr_views ()

    void
    gtr_tab_clear_msgstr_views (GtrTab *tab);

Clears all text from msgstr text views.

#### Parameters

tab | a GtrTab |

### gtr_tab_copy_to_translation ()

    void
    gtr_tab_copy_to_translation (GtrTab *tab);

Copies the text from the original text box to the translation text box.

#### Parameters

tab | a GtrTab |

### gtr_tab_block_movement ()

    void
    gtr_tab_block_movement (GtrTab *tab);

Blocks the movement to the next/prev message.

#### Parameters

tab | a GtrTab |

### gtr_tab_unblock_movement ()

    void
    gtr_tab_unblock_movement (GtrTab *tab);

Unblocks the movement to the next/prev message.

#### Parameters

tab | a GtrTab |

### gtr_tab_go_to_next ()

    void
    gtr_tab_go_to_next (GtrTab *tab);

Moves to the next message or plural tab in case the message has plurals.

#### Parameters

tab | a GtrTab |

### gtr_tab_go_to_prev ()

    void
    gtr_tab_go_to_prev (GtrTab *tab);

Moves to the previous message or plural tab in case the message has plurals.

#### Parameters

tab | a GtrTab |

### gtr_tab_go_to_first ()

    void
    gtr_tab_go_to_first (GtrTab *tab);

Jumps to the first message.

#### Parameters

tab | a GtrTab |

### gtr_tab_go_to_last ()

    void
    gtr_tab_go_to_last (GtrTab *tab);

Jumps to the last message.

#### Parameters

tab | a GtrTab |

### gtr_tab_go_to_next_fuzzy ()

    gboolean
    gtr_tab_go_to_next_fuzzy (GtrTab *tab);

If there is a next fuzzy message it jumps to it.

#### Parameters

tab | a GtrTab |

#### Returns

TRUE if there is a next fuzzy message.

### gtr_tab_go_to_prev_fuzzy ()

    gboolean
    gtr_tab_go_to_prev_fuzzy (GtrTab *tab);

If there is a prev fuzzy message it jumps to it.

#### Parameters

tab | a GtrTab |

#### Returns

TRUE if there is a prev fuzzy message.

### gtr_tab_go_to_next_untrans ()

    gboolean
    gtr_tab_go_to_next_untrans (GtrTab *tab);

If there is a next untranslated message it jumps to it.

#### Parameters

tab | a GtrTab |

#### Returns

TRUE if there is a next untranslated message.

### gtr_tab_go_to_prev_untrans ()

    gboolean
    gtr_tab_go_to_prev_untrans (GtrTab *tab);

If there is a prev untranslated message it jumps to it.

#### Parameters

tab | a GtrTab |

#### Returns

TRUE if there is a prev untranslated message.

### gtr_tab_go_to_next_fuzzy_or_untrans ()

    gboolean
    gtr_tab_go_to_next_fuzzy_or_untrans (GtrTab *tab);

If there is a next fuzzy or untranslated message it jumps to it.

#### Parameters

tab | a GtrTab |

#### Returns

TRUE if there is a next fuzzy or untranslated message.

### gtr_tab_go_to_prev_fuzzy_or_untrans ()

    gboolean
    gtr_tab_go_to_prev_fuzzy_or_untrans (GtrTab *tab);

If there is a prev fuzzy or untranslated message it jumps to it.

#### Parameters

tab | a GtrTab |

#### Returns

TRUE if there is a prev fuzzy or untranslated message.

### gtr_tab_go_to_number ()

    void
    gtr_tab_go_to_number (GtrTab *tab,
                          gint number);

Jumps to the message with the `number` in the list, if the message does not exists it does not jump.

#### Parameters

tab | a GtrTab |
number | the message number you want to jump |

### gtr_tab_set_info_bar ()

    void
    gtr_tab_set_info_bar (GtrTab *tab,
                          GtkWidget *infobar);

Sets the `infobar` to be shown in the `tab` .

#### Parameters

tab | a GtrTab |
infobar | a GtrMessageArea |

## Types and Values

### enum GtrTabMove

#### Members

GTR_TAB_MOVE_NONE |  |
GTR_TAB_MOVE_NEXT |  |
GTR_TAB_MOVE_PREV |  |

### enum GtrTabPlacement

#### Members

GTR_TAB_PLACEMENT_NONE |  |
GTR_TAB_PLACEMENT_TOP |  |
GTR_TAB_PLACEMENT_BOTTOM |  |
GTR_TAB_PLACEMENT_RIGHT |  |
GTR_TAB_PLACEMENT_LEFT |  |
GTR_TAB_PLACEMENT_CENTER |  |
GTR_TAB_PLACEMENT_FLOATING |  |