![]() |
![]() |
![]() |
GTranslator Reference Manual | ![]() |
---|---|---|---|---|
enum GtranslatorSearchFlags; GtranslatorViewPrivate; GtranslatorView; GType gtranslator_view_register_type (GTypeModule *module); GtkWidget* gtranslator_view_new (void); gboolean gtranslator_view_get_selected_text (GtranslatorView *view, gchar **selected_text, gint *len); void gtranslator_view_enable_spellcheck (GtranslatorView *view, gboolean enable); void gtranslator_view_enable_visible_whitespace (GtranslatorView *view, gboolean enable); void gtranslator_view_cut_clipboard (GtranslatorView *view); void gtranslator_view_copy_clipboard (GtranslatorView *view); void gtranslator_view_paste_clipboard (GtranslatorView *view); void gtranslator_view_set_font (GtranslatorView *view, gboolean def, const gchar *font_name); void gtranslator_view_set_search_text (GtranslatorView *view, const gchar *text, guint flags); gchar* gtranslator_view_get_search_text (GtranslatorView *view, guint *flags); void gtranslator_view_reload_scheme_color (GtranslatorView *view); #define GTR_SEARCH_IS_DONT_SET_FLAGS (sflags) #define GTR_SEARCH_SET_DONT_SET_FLAGS (sflags,state) #define GTR_SEARCH_IS_ENTIRE_WORD (sflags) #define GTR_SEARCH_SET_ENTIRE_WORD (sflags,state) #define GTR_SEARCH_IS_CASE_SENSITIVE (sflags) #define GTR_SEARCH_SET_CASE_SENSITIVE (sflags,state)
typedef enum { GTR_SEARCH_DONT_SET_FLAGS = 1 << 0, GTR_SEARCH_ENTIRE_WORD = 1 << 1, GTR_SEARCH_CASE_SENSITIVE = 1 << 2 } GtranslatorSearchFlags;
GType gtranslator_view_register_type (GTypeModule *module);
|
|
Returns : |
GtkWidget* gtranslator_view_new (void);
Creates a new GtranslatorView. An empty default buffer will be created for you.
Returns : |
a new GtranslatorView |
gboolean gtranslator_view_get_selected_text (GtranslatorView *view, gchar **selected_text, gint *len);
Gets the selected text region of the GtranslatorView
|
a GtranslatorView |
|
it stores the text selected in the GtranslatorView |
|
it stores the length of the selected_text
|
Returns : |
TRUE if the selected_text was got correctly.
|
void gtranslator_view_enable_spellcheck (GtranslatorView *view, gboolean enable);
Enables the spellcheck
|
a GtranslatorView |
|
TRUE if you want enable the spellcheck |
void gtranslator_view_enable_visible_whitespace (GtranslatorView *view, gboolean enable);
Enables special chars for white spaces including \n and \t
|
a GtranslatorView |
|
TRUE if you want to enable special chars for white spaces |
void gtranslator_view_cut_clipboard (GtranslatorView *view);
Pastes the contents of a clipboard at the insertion point, or at override_location.
|
a GtranslatorView |
void gtranslator_view_copy_clipboard (GtranslatorView *view);
Copies the currently-selected text to a clipboard.
|
a GtranslatorView |
void gtranslator_view_paste_clipboard (GtranslatorView *view);
|
void gtranslator_view_set_font (GtranslatorView *view, gboolean def, const gchar *font_name);
Sets the GtranslatorView font.
|
a GtranslatorView |
|
TRUE if you want to use the default font |
|
The name of the font you want to use in the GtranslatorView |
void gtranslator_view_set_search_text (GtranslatorView *view, const gchar *text, guint flags);
Stores the text to search for in the view
with some specific flags
.
|
a GtranslatorView |
|
the text to set for searching |
|
a GtranslatorSearchFlags |
gchar* gtranslator_view_get_search_text (GtranslatorView *view, guint *flags);
Returns the text to search for it and the GtranslatorSearchFlags of that text.
|
a GtranslatorView |
|
the GtranslatorSearchFlags of the stored text. |
Returns : |
the text to search for it. |
void gtranslator_view_reload_scheme_color (GtranslatorView *view);
Reloads the gtksourceview scheme color. Neccessary when the scheme color changes.
|
a GtranslatorView |
#define GTR_SEARCH_IS_DONT_SET_FLAGS(sflags) ((sflags & GTR_SEARCH_DONT_SET_FLAGS) != 0)
|
#define GTR_SEARCH_SET_DONT_SET_FLAGS(sflags,state)
|
|
|
#define GTR_SEARCH_IS_ENTIRE_WORD(sflags) ((sflags & GTR_SEARCH_ENTIRE_WORD) != 0)
|
#define GTR_SEARCH_IS_CASE_SENSITIVE(sflags) ((sflags & GTR_SEARCH_CASE_SENSITIVE) != 0)
|