Top | ![]() |
![]() |
![]() |
![]() |
gboolean | can-search-again | Read |
char * | content-type | Read / Write |
gboolean | enable-search-highlighting | Read / Write |
PlumaEncoding * | encoding | Read |
char * | mime-type | Read |
PlumaDocumentNewlineType | newline-type | Read / Write |
gboolean | read-only | Read |
char * | shortname | Read / Write |
char * | 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 | PlumaSearchFlags |
PlumaDocumentPrivate | |
struct | PlumaDocument |
enum | PlumaDocumentSaveFlags |
#define | PLUMA_DOCUMENT_ERROR |
gchar *
pluma_document_get_uri_for_display (PlumaDocument *doc
);
Note: this never returns NULL
.
gchar *
pluma_document_get_short_name_for_display
(PlumaDocument *doc
);
Note: this never returns NULL
.
gchar *
pluma_document_get_mime_type (PlumaDocument *doc
);
Note: this never returns NULL
.
void pluma_document_load (PlumaDocument *doc
,const gchar *uri
,const PlumaEncoding *encoding
,gint line_pos
,gboolean create
);
Load a document. This results in the "load" signal to be emitted.
doc |
the PlumaDocument. |
|
uri |
the uri where to load the document from. |
|
encoding |
the PlumaEncoding to encode the document. |
|
line_pos |
the line to show. |
|
create |
whether the document should be created if it doesn't exist. |
gboolean pluma_document_insert_file (PlumaDocument *doc
,GtkTextIter *iter
,const gchar *uri
,const PlumaEncoding *encoding
);
gboolean
pluma_document_load_cancel (PlumaDocument *doc
);
Cancel load of a document.
void pluma_document_save (PlumaDocument *doc
,PlumaDocumentSaveFlags flags
);
Save the document to its previous location. This results in the "save" signal to be emitted.
void pluma_document_save_as (PlumaDocument *doc
,const gchar *uri
,const PlumaEncoding *encoding
,PlumaDocumentSaveFlags flags
);
Save the document to a new location. This results in the "save" signal to be emitted.
doc |
the PlumaDocument. |
|
uri |
the uri where to save the document. |
|
encoding |
the PlumaEncoding to encode the document. |
|
flags |
optionnal PlumaDocumentSaveFlags. |
void pluma_document_set_search_text (PlumaDocument *doc
,const gchar *text
,guint flags
);
gchar * pluma_document_get_search_text (PlumaDocument *doc
,guint *flags
);
gboolean
pluma_document_get_can_search_again (PlumaDocument *doc
);
gboolean pluma_document_search_forward (PlumaDocument *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 pluma_document_search_backward (PlumaDocument *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 pluma_document_replace_all (PlumaDocument *doc
,const gchar *find
,const gchar *replace
,guint flags
);
void pluma_document_set_language (PlumaDocument *doc
,GtkSourceLanguage *lang
);
void pluma_document_set_enable_search_highlighting (PlumaDocument *doc
,gboolean enable
);
gboolean
pluma_document_get_enable_search_highlighting
(PlumaDocument *doc
);
#define PLUMA_SEARCH_IS_DONT_SET_FLAGS(sflags) ((sflags & PLUMA_SEARCH_DONT_SET_FLAGS) != 0)
#define PLUMA_SEARCH_IS_ENTIRE_WORD(sflags) ((sflags & PLUMA_SEARCH_ENTIRE_WORD) != 0)
#define PLUMA_SEARCH_IS_CASE_SENSITIVE(sflags) ((sflags & PLUMA_SEARCH_CASE_SENSITIVE) != 0)
“can-search-again”
property “can-search-again” gboolean
Whether it's possible to search again in the document.
Owner: PlumaDocument
Flags: Read
Default value: FALSE
“content-type”
property “content-type” char *
The document's Content Type.
Owner: PlumaDocument
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.
Owner: PlumaDocument
Flags: Read / Write
Default value: FALSE
“encoding”
property“encoding” PlumaEncoding *
The PlumaEncoding used for the document.
Owner: PlumaDocument
Flags: Read
“mime-type”
property “mime-type” char *
The document's MIME Type.
Owner: PlumaDocument
Flags: Read
Default value: "text/plain"
“newline-type”
property “newline-type” PlumaDocumentNewlineType
The :newline-type property determines what is considered as a line ending when saving the document
Owner: PlumaDocument
Flags: Read / Write
Default value: PLUMA_DOCUMENT_NEWLINE_TYPE_LF
“read-only”
property “read-only” gboolean
Whether the document is read only or not.
Owner: PlumaDocument
Flags: Read
Default value: FALSE
“shortname”
property “shortname” char *
The document's short name.
Owner: PlumaDocument
Flags: Read / Write
Default value: NULL
“cursor-moved”
signalvoid user_function (PlumaDocument *plumadocument, gpointer user_data)
Flags: Run Last
“load”
signalvoid user_function (PlumaDocument *document, char *uri, PlumaEncoding *encoding, int line_pos, gboolean create, gpointer user_data)
The "load" signal is emitted when a document is loaded.
document |
the PlumaDocument. |
|
uri |
the uri where to load the document from. |
|
encoding |
the PlumaEncoding 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
“loaded”
signalvoid user_function (PlumaDocument *plumadocument, gpointer arg1, gpointer user_data)
Flags: Run Last
“loading”
signalvoid user_function (PlumaDocument *plumadocument, guint64 arg1, guint64 arg2, gpointer user_data)
Flags: Run Last
“save”
signalvoid user_function (PlumaDocument *document, char *uri, PlumaEncoding *encoding, PlumaDocumentSaveFlags flags, gpointer user_data)
The "save" signal is emitted when the document is saved.
document |
the PlumaDocument. |
|
uri |
the uri where the document is about to be saved. |
|
encoding |
the PlumaEncoding used to save the document. |
|
flags |
the PlumaDocumentSaveFlags for the save operation. |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run Last
“saved”
signalvoid user_function (PlumaDocument *plumadocument, gpointer arg1, gpointer user_data)
Flags: Run Last
“saving”
signalvoid user_function (PlumaDocument *plumadocument, guint64 arg1, guint64 arg2, gpointer user_data)
Flags: Run Last
“search-highlight-updated”
signalvoid user_function (PlumaDocument *plumadocument, GtkTextIter *arg1, GtkTextIter *arg2, gpointer user_data)
Flags: Run Last