| gboolean | autosave | Read / Write |
| int | autosave-interval | Read / Write |
| gboolean | can-close | Read |
| char * | name | Read |
| GeditTabState | state | Read |
GEnum ╰── GeditTabState GObject ╰── GInitiallyUnowned ╰── GtkWidget ╰── GtkContainer ╰── GtkBox ╰── GeditTab
void gedit_tab_load_file (GeditTab *tab,GFile *location,const GtkSourceEncoding *encoding,gint line_pos,gint column_pos,gboolean create);
This function tries to load location
into tab
. It is usually called only on
a newly-created tab.
If location
doesn't exist, the behavior depends on create
:
If create
is FALSE, an error is shown.
If create
is TRUE, an empty GeditDocument is created without error (but
the file is not yet created on disk).
The tab
needs to be in GEDIT_TAB_STATE_NORMAL. The previous
GtkTextBuffer's content is lost.
tab |
a GeditTab. |
|
location |
the GFile to load. |
|
encoding |
a GtkSourceEncoding, or |
[nullable] |
line_pos |
the line position to visualize. |
|
column_pos |
the column position to visualize. |
|
create |
|
Since: 45
void gedit_tab_load_stream (GeditTab *tab,GInputStream *stream,const GtkSourceEncoding *encoding,gint line_pos,gint column_pos);
Loads stream
into tab
. This function is usually called only on a
newly-created tab.
The tab
needs to be in GEDIT_TAB_STATE_NORMAL. The previous
GtkTextBuffer's content is lost.
tab |
a GeditTab. |
|
stream |
the GInputStream to load, e.g. stdin. |
|
encoding |
a GtkSourceEncoding, or |
[nullable] |
line_pos |
the line position to visualize. |
|
column_pos |
the column position to visualize. |
Since: 45
GeditView *
gedit_tab_get_view (GeditTab *tab);
Gets the GeditView inside tab
.
GeditDocument *
gedit_tab_get_document (GeditTab *tab);
Gets the GeditDocument associated to tab
.
GeditTab *
gedit_tab_get_from_document (GeditDocument *doc);
Gets the GeditTab associated with doc
.
GeditTabState
gedit_tab_get_state (GeditTab *tab);
Gets the GeditTabState of tab
.
gboolean
gedit_tab_get_auto_save_enabled (GeditTab *tab);
Gets the current state for the autosave feature
void gedit_tab_set_auto_save_enabled (GeditTab *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
gint
gedit_tab_get_auto_save_interval (GeditTab *tab);
Gets the current interval for the autosaves
“autosave” property“autosave” gboolean
Autosave feature.
Owner: GeditTab
Flags: Read / Write
Default value: TRUE
“autosave-interval” property“autosave-interval” int
Time between two autosaves.
Owner: GeditTab
Flags: Read / Write
Allowed values: >= 0
Default value: 0
“can-close” property“can-close” gboolean
Whether the tab can be closed.
Owner: GeditTab
Flags: Read
Default value: TRUE
“state” property“state” GeditTabState
The tab's state.
Owner: GeditTab
Flags: Read
Default value: GEDIT_TAB_STATE_NORMAL