Top | ![]() |
![]() |
![]() |
![]() |
char * | filename | Read / Write |
EContentEditorMode | mode | Read / Write |
gboolean | paste-plain-prefer-pre | Read / Write |
void | after-mode-changed | Action |
void | spell-languages-changed | Run Last |
void | update-actions | Run Last |
#define | E_HTML_EDITOR_MAX_INDENT_LEVEL |
#define | E_HTML_EDITOR_UI_OBJECT_MAIN_MENU |
#define | E_HTML_EDITOR_UI_OBJECT_MAIN_TOOLBAR |
GObject ╰── GInitiallyUnowned ╰── GtkWidget ╰── GtkContainer ╰── GtkGrid ╰── EHTMLEditor
void e_html_editor_new (GAsyncReadyCallback callback
,gpointer user_data
);
Constructs a new EHTMLEditor asynchronously. The result is returned
by e_html_editor_new_finish()
, which should be called inside callback
.
callback |
a callback to be called when the editor is ready |
|
user_data |
a used data passed into the |
Since: 3.22
GtkWidget * e_html_editor_new_finish (GAsyncResult *result
,GError **error
);
Finishes the call of e_html_editor_new()
.
result |
a GAsyncResult passed to callback from |
|
error |
an optional GError |
Since: 3.22
void e_html_editor_connect_focus_tracker (EHTMLEditor *editor
,EFocusTracker *focus_tracker
);
Connects editor
actions and widgets to the focus_tracker
.
Since: 3.44
GtkWidget *
e_html_editor_get_content_box (EHTMLEditor *editor
);
Since: 3.44
EContentEditor *
e_html_editor_get_content_editor (EHTMLEditor *editor
);
Returns instance of EContentEditor used in the editor
.
void e_html_editor_register_content_editor (EHTMLEditor *editor
,const gchar *name
,EContentEditor *cnt_editor
);
EContentEditorMode
e_html_editor_get_mode (EHTMLEditor *editor
);
Since: 3.44
void e_html_editor_set_mode (EHTMLEditor *editor
,EContentEditorMode mode
);
Sets the editor mode.
Since: 3.44
void
e_html_editor_cancel_mode_change_content_update
(EHTMLEditor *editor
);
Cancels any ongoing content update after the mode change. This is useful when setting content before the read of the current editor's content is finished, which can happen due to reading the editor's content asynchronously.
Since: 3.50
EUIManager *
e_html_editor_get_ui_manager (EHTMLEditor *editor
);
Returns an EUIManager that manages all the actions in the editor
.
EUIAction * e_html_editor_get_action (EHTMLEditor *editor
,const gchar *action_name
);
Gets action named action_name
from the internal EUIManager.
an EUIAction matching action_name
or
NULL
, if no such action exists.
[transfer none][nullable]
gpointer e_html_editor_get_ui_object (EHTMLEditor *editor
,const gchar *object_name
);
Gets a UI object (usually a GtkWidget descendant) by its name. There are only few objects recognized, namely: E_HTML_EDITOR_UI_OBJECT_MAIN_MENU: the main menu as an EUIMenu; E_HTML_EDITOR_UI_OBJECT_MAIN_TOOLBAR: the main toolbar as a GtkToolbar.
the UI object named object_name
, or NULL
,
when the name is not recognized.
[transfer none][nullable]
Since: 3.56
const gchar *
e_html_editor_get_filename (EHTMLEditor *editor
);
Returns path and name of file to which content of the editor should be saved.
void e_html_editor_set_filename (EHTMLEditor *editor
,const gchar *filename
);
Sets file to which content of the editor should be saved (see
e_html_editor_save()
).
EActivityBar *
e_html_editor_get_activity_bar (EHTMLEditor *editor
);
EActivity *
e_html_editor_new_activity (EHTMLEditor *editor
);
Creates and configures a new EActivity so its progress is shown in
the editor
. The EActivity comes pre-loaded with a CamelOperation.
void e_html_editor_pack_above (EHTMLEditor *editor
,GtkWidget *child
);
Inserts child
right between the toolbars and the editor widget itself.
void
e_html_editor_update_spell_actions (EHTMLEditor *editor
);
void e_html_editor_save (EHTMLEditor *editor
,const gchar *filename
,gboolean as_html
,GCancellable *cancellable
,GAsyncReadyCallback callback
,gpointer user_data
);
Starts an asynchronous save of the current content of the EContentEditor
into given file. When as_html
is FALSE
, the content is first converted
into plain text.
Finish the call with e_html_editor_save_finish()
from the callback
.
editor |
an EHTMLEditor |
|
filename |
file into which to save the content |
|
as_html |
whether the content should be saved as HTML or plain text |
|
cancellable |
an optional GCancellable, or |
|
callback |
a GAsyncReadyCallback to call when the save is finished. |
[scope async] |
user_data |
user data passed to |
[closure callback] |
Since: 3.38
gboolean e_html_editor_save_finish (EHTMLEditor *editor
,GAsyncResult *result
,GError **error
);
Finished the previous call of e_html_editor_save()
.
editor |
an EHTMLEditor |
|
result |
a GAsyncResult of the operation |
|
error |
return location for a GError, or |
Since: 3.38
void e_html_editor_add_cid_part (EHTMLEditor *editor
,CamelMimePart *mime_part
);
Add the mime_part
with its Content-ID (if not set, one is assigned),
which can be later obtained with e_html_editor_ref_cid_part()
;
Since: 3.38
void e_html_editor_remove_cid_part (EHTMLEditor *editor
,const gchar *cid_uri
);
Removes CID part with given cid_uri
, previously added with
e_html_editor_add_cid_part()
. The function does nothing if no
such part is stored.
Since: 3.38
void e_html_editor_remove_unused_cid_parts (EHTMLEditor *editor
,GSList *used_mime_parts
,GSList **out_removed_mime_parts
);
Traverses the list of "cid:" parts and removes all which are not part
of the used_mime_parts
.
The optional out_removed_mime_parts
is filled with the removed parts.
Free it with g_slist_free_full (list, g_object_unref);, when no longer needed.
editor |
an EHTMLEditor |
|
used_mime_parts |
list of used CamelMimePart-s to keep. |
[nullable][element-type CamelMimePart] |
out_removed_mime_parts |
list of removed parts. |
[out][optional][element-type CamelMimePart][transfer full] |
Since: 3.44
void
e_html_editor_remove_all_cid_parts (EHTMLEditor *editor
);
Removes all CID parts previously added with
e_html_editor_add_cid_part()
.
Since: 3.38
CamelMimePart * e_html_editor_ref_cid_part (EHTMLEditor *editor
,const gchar *cid_uri
);
References a CamelMimePart with given cid_uri
as Content ID, if
previously added with e_html_editor_add_cid_part()
. The cid_uri
should start with "cid:".
The returned non-NULL
object is references, thus it should be freed
with g_object_unref()
, when no longer needed.
editor |
an EHTMLEditor |
|
cid_uri |
a Content ID URI (starts with "cid:") to obtain the part for |
Since: 3.38
void
e_html_editor_clear_alerts (EHTMLEditor *editor
);
Clears all shown alerts in the editor
.
Since: 3.50
EAlertBar *
e_html_editor_get_alert_bar (EHTMLEditor *editor
);
Returns an EAlertBar used by the editor
.
Since: 3.50
EActionComboBox *
e_html_editor_util_new_mode_combobox (void
);
Creates a new combo box containing all composer modes.
It's a descendant of EActionComboBox, thus use e_action_combo_box_get_current_value()
and e_action_combo_box_set_current_value()
to get the currently selected mode.
Since: 3.44
“filename”
property “filename” char *
Owner: EHTMLEditor
Flags: Read / Write
Default value: NULL
“mode”
property“mode” EContentEditorMode
Owner: EHTMLEditor
Flags: Read / Write
Default value: E_CONTENT_EDITOR_MODE_HTML
“after-mode-changed”
signalvoid user_function (EHTMLEditor *ehtmleditor, gpointer user_data)
Flags: Action
“spell-languages-changed”
signalvoid user_function (EHTMLEditor *ehtmleditor, gpointer user_data)
Flags: Run Last
“update-actions”
signalvoid user_function (EHTMLEditor *ehtmleditor, guint arg1, char *arg2, char *arg3, gpointer user_data)
Flags: Run Last