Top | ![]() |
![]() |
![]() |
![]() |
gboolean | can-search-again | Read |
gchar * | content-type | Read / Write |
gboolean | enable-search-highlighting | Read / Write |
XedEncoding * | encoding | Read |
gchar * | mime-type | Read |
XedDocumentNewlineType | newline-type | Read / Write |
gboolean | read-only | Read |
gchar * | shortname | Read / Write |
gchar * | uri | Read |
void | cursor-moved | Run Last |
void | load | Run Last |
void | loaded | Run Last |
void | loading | Run Last |
void | save | Run Last |
void | saved | Run Last |
void | saving | Run Last |
void | search-highlight-updated | Run Last |
enum | XedSearchFlags |
XedDocumentPrivate | |
struct | XedDocument |
enum | XedDocumentSaveFlags |
#define | XED_DOCUMENT_ERROR |
gchar *
xed_document_get_uri_for_display (XedDocument *doc
);
Note: this never returns NULL
.
gchar *
xed_document_get_short_name_for_display
(XedDocument *doc
);
Note: this never returns NULL
.
gchar *
xed_document_get_mime_type (XedDocument *doc
);
Note: this never returns NULL
.
void xed_document_load (XedDocument *doc
,const gchar *uri
,const XedEncoding *encoding
,gint line_pos
,gboolean create
);
Load a document. This results in the "load" signal to be emitted.
doc |
the XedDocument. |
|
uri |
the uri where to load the document from. |
|
encoding |
the XedEncoding to encode the document. |
|
line_pos |
the line to show. |
|
create |
whether the document should be created if it doesn't exist. |
gboolean xed_document_insert_file (XedDocument *doc
,GtkTextIter *iter
,const gchar *uri
,const XedEncoding *encoding
);
gboolean
xed_document_load_cancel (XedDocument *doc
);
Cancel load of a document.
void xed_document_save (XedDocument *doc
,XedDocumentSaveFlags flags
);
Save the document to its previous location. This results in the "save" signal to be emitted.
void xed_document_save_as (XedDocument *doc
,const gchar *uri
,const XedEncoding *encoding
,XedDocumentSaveFlags flags
);
Save the document to a new location. This results in the "save" signal to be emitted.
doc |
the XedDocument. |
|
uri |
the uri where to save the document. |
|
encoding |
the XedEncoding to encode the document. |
|
flags |
optionnal XedDocumentSaveFlags. |
void xed_document_set_search_text (XedDocument *doc
,const gchar *text
,guint flags
);
gchar * xed_document_get_search_text (XedDocument *doc
,guint *flags
);
gboolean xed_document_search_forward (XedDocument *doc
,const GtkTextIter *start
,const GtkTextIter *end
,GtkTextIter *match_start
,GtkTextIter *match_end
);
start |
. |
[allow-none] |
end |
. |
[allow-none] |
match_start |
. |
[allow-none] |
match_end |
. |
[allow=none] |
gboolean xed_document_search_backward (XedDocument *doc
,const GtkTextIter *start
,const GtkTextIter *end
,GtkTextIter *match_start
,GtkTextIter *match_end
);
start |
. |
[allow-none] |
end |
. |
[allow-none] |
match_start |
. |
[allow-none] |
match_end |
. |
[allow=none] |
gint xed_document_replace_all (XedDocument *doc
,const gchar *find
,const gchar *replace
,guint flags
);
void xed_document_set_language (XedDocument *doc
,GtkSourceLanguage *lang
);
void xed_document_set_enable_search_highlighting (XedDocument *doc
,gboolean enable
);
gboolean
xed_document_get_enable_search_highlighting
(XedDocument *doc
);
#define XED_SEARCH_IS_DONT_SET_FLAGS(sflags) ((sflags & XED_SEARCH_DONT_SET_FLAGS) != 0)
#define XED_SEARCH_IS_ENTIRE_WORD(sflags) ((sflags & XED_SEARCH_ENTIRE_WORD) != 0)
#define XED_SEARCH_IS_CASE_SENSITIVE(sflags) ((sflags & XED_SEARCH_CASE_SENSITIVE) != 0)
“can-search-again”
property “can-search-again” gboolean
Whether it's possible to search again in the document.
Flags: Read
Default value: FALSE
“content-type”
property “content-type” gchar *
The document's Content Type.
Flags: Read / Write
Default value: NULL
“enable-search-highlighting”
property “enable-search-highlighting” gboolean
Whether all the occurrences of the searched string must be highlighted.
Flags: Read / Write
Default value: FALSE
“mime-type”
property “mime-type” gchar *
The document's MIME Type.
Flags: Read
Default value: "text/plain"
“newline-type”
property “newline-type” XedDocumentNewlineType
The :newline-type property determines what is considered as a line ending when saving the document
Flags: Read / Write
Default value: XED_DOCUMENT_NEWLINE_TYPE_LF
“read-only”
property “read-only” gboolean
Whether the document is read only or not.
Flags: Read
Default value: FALSE
“shortname”
property “shortname” gchar *
The document's short name.
Flags: Read / Write
Default value: NULL
“cursor-moved”
signalvoid user_function (XedDocument *xeddocument, gpointer user_data)
Flags: Run Last
“load”
signalvoid user_function (XedDocument *document, gchar *uri, XedEncoding *encoding, gint line_pos, gboolean create, gpointer user_data)
The "load" signal is emitted when a document is loaded.
document |
the XedDocument. |
|
uri |
the uri where to load the document from. |
|
encoding |
the XedEncoding to encode the document. |
|
line_pos |
the line to show. |
|
create |
whether the document should be created if it doesn't exist. |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run Last
Since 2.22
“loaded”
signalvoid user_function (XedDocument *xeddocument, gpointer arg1, gpointer user_data)
Flags: Run Last
“loading”
signalvoid user_function (XedDocument *xeddocument, guint64 arg1, guint64 arg2, gpointer user_data)
Flags: Run Last
“save”
signalvoid user_function (XedDocument *document, gchar *uri, XedEncoding *encoding, XedDocumentSaveFlags flags, gpointer user_data)
The "save" signal is emitted when the document is saved.
document |
the XedDocument. |
|
uri |
the uri where the document is about to be saved. |
|
encoding |
the XedEncoding used to save the document. |
|
flags |
the XedDocumentSaveFlags for the save operation. |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run Last
Since 2.20
“saved”
signalvoid user_function (XedDocument *xeddocument, gpointer arg1, gpointer user_data)
Flags: Run Last
“saving”
signalvoid user_function (XedDocument *xeddocument, guint64 arg1, guint64 arg2, gpointer user_data)
Flags: Run Last
“search-highlight-updated”
signalvoid user_function (XedDocument *xeddocument, GtkTextIter *arg1, GtkTextIter *arg2, gpointer user_data)
Flags: Run Last