[evolution/wip/webkit-composer: 178/372] Move EEditorWidgetCommand to e-util-enums.h.



commit d5fef60bbca54ca6e10f10f25218814a5ba5bf1f
Author: Matthew Barnes <mbarnes redhat com>
Date:   Thu Jan 17 16:16:49 2013 -0500

    Move EEditorWidgetCommand to e-util-enums.h.

 e-util/e-editor-widget.h |  111 +-------------------------------
 e-util/e-util-enums.h    |  163 ++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 164 insertions(+), 110 deletions(-)
---
diff --git a/e-util/e-editor-widget.h b/e-util/e-editor-widget.h
index 9a91ace..d132b44 100644
--- a/e-util/e-editor-widget.h
+++ b/e-util/e-editor-widget.h
@@ -29,6 +29,7 @@
 
 #include <e-util/e-editor-selection.h>
 #include <e-util/e-spell-checker.h>
+#include <e-util/e-util-enums.h>
 
 /* Standard GObject macros */
 #define E_TYPE_EDITOR_WIDGET \
@@ -51,116 +52,6 @@
 
 G_BEGIN_DECLS
 
-/**
- * EEditorWidgetCommand:
- * @E_EDITOR_WIDGET_COMMAND_BACKGROUND_COLOR: Sets background color to given value.
- * @E_EDITOR_WIDGET_COMMAND_BOLD: Toggles bold formatting of current selection.
- * @E_EDITOR_WIDGET_COMMAND_COPY: Copies current selection to clipboard.
- * @E_EDITOR_WIDGET_COMMAND_CREATE_LINK: Converts current selection to a link that points to URL in value
- * @E_EDITOR_WIDGET_COMMAND_CUT: Cuts current selection to clipboard.
- * @E_EDITOR_WIDGET_COMMAND_DEFAULT_PARAGRAPH_SEPARATOR:
- * @E_EDITOR_WIDGET_COMMAND_DELETE: Deletes current selection.
- * @E_EDITOR_WIDGET_COMMAND_FIND_STRING: Highlights given string.
- * @E_EDITOR_WIDGET_COMMAND_FONT_NAME: Sets font name to given value.
- * @E_EDITOR_WIDGET_COMMAND_FONT_SIZE: Sets font point size to given value (no units, just number)
- * @E_EDITOR_WIDGET_COMMAND_FONT_SIZE_DELTA: Changes font size by given delta value (no units, just number)
- * @E_EDITOR_WIDGET_COMMAND_FORE_COLOR: Sets font color to given value
- * @E_EDITOR_WIDGET_COMMAND_FORMAT_BLOCK: Sets block type of current paragraph to given format. Allowed 
formats
- *     are "BLOCKQUOTE", "H1", "H2", "H3", "H4", "H5", "H6", "P", "PRE" and "ADDRESS".
- * @E_EDITOR_WIDGET_COMMAND_FORWARD_DELETE:
- * @E_EDITOR_WIDGET_COMMAND_HILITE_COLOR: Sets color in which results of "FindString" command should be 
highlighted to given value.
- * @E_EDITOR_WIDGET_COMMAND_INDENT: Indents current paragraph by one level.
- * @E_EDITOR_WIDGET_COMMAND_INSERT_HTML: Inserts give HTML code into document.
- * @E_EDITOR_WIDGET_COMMAND_INSERT_HORIZONTAL_RULE: Inserts a horizontal rule (&lt;HR&gt;) on current line.
- * @E_EDITOR_WIDGET_COMMAND_INSERT_IMAGE: Inserts an image with given source file.
- * @E_EDITOR_WIDGET_COMMAND_INSERT_LINE_BREAK: Breaks line at current cursor position.
- * @E_EDITOR_WIDGET_COMMAND_INSERT_NEW_LINE_IN_QUOTED_CONTENT: Breaks citation at current cursor position.
- * @E_EDITOR_WIDGET_COMMAND_INSERT_ORDERED_LIST: Creates an ordered list environment at current cursor 
position.
- * @E_EDITOR_WIDGET_COMMAND_INSERT_PARAGRAPH: Inserts a new paragraph at current cursor position.
- * @E_EDITOR_WIDGET_COMMAND_INSERT_TEXT: Inserts given text at current cursor position.
- * @E_EDITOR_WIDGET_COMMAND_INSERT_UNORDERED_LIST: Creates an undordered list environment at current cursor 
position.
- * @E_EDITOR_WIDGET_COMMAND_ITALIC: Toggles italic formatting of current selection.
- * @E_EDITOR_WIDGET_COMMAND_JUSTIFY_CENTER: Aligns current paragraph to center.
- * @E_EDITOR_WIDGET_COMMAND_JUSTIFY_FULL: Justifies current paragraph to block.
- * @E_EDITOR_WIDGET_COMMAND_JUSTIFY_NONE: Removes any justification or alignment of current paragraph.
- * @E_EDITOR_WIDGET_COMMAND_JUSTIFY_RIGHT: Aligns current paragraph to right.
- * @E_EDITOR_WIDGET_COMMAND_OUTDENT: Outdents current paragraph by one level.
- * @E_EDITOR_WIDGET_COMMAND_PASTE: Pastes clipboard content at current cursor position.
- * @E_EDITOR_WIDGET_COMMAND_PASTE_AND_MATCH_STYLE: Pastes clipboard content and matches it's style to style 
at current cursor position.
- * @E_EDITOR_WIDGET_COMMAND_PASTE_AS_PLAIN_TEXT: Pastes clipboard content at current cursor position 
removing any HTML formatting.
- * @E_EDITOR_WIDGET_COMMAND_PRINT: Print current document.
- * @E_EDITOR_WIDGET_COMMAND_REDO: Redos last action.
- * @E_EDITOR_WIDGET_COMMAND_REMOVE_FORMAT: Removes any formatting of current selection.
- * @E_EDITOR_WIDGET_COMMAND_SELECT_ALL: Extends selects to the entire document.
- * @E_EDITOR_WIDGET_COMMAND_STRIKETHROUGH: Toggles strikethrough formatting.
- * @E_EDITOR_WIDGET_COMMAND_STYLE_WITH_CSS: Toggles whether style should be defined in CSS "style" attribute 
of elements or
- *     whether to use deprecated <FONT> tags. Depends on whether given value is "true" or "false".
- * @E_EDITOR_WIDGET_COMMAND_SUBSCRIPT: Toggles subscript of current selection.
- * @E_EDITOR_WIDGET_COMMAND_SUPERSCRIPT: Toggles superscript of current selection.
- * @E_EDITOR_WIDGET_COMMAND_TRANSPOSE:
- * @E_EDITOR_WIDGET_COMMAND_UNDERLINE: Toggles underline formatting of current selection.
- * @E_EDITOR_WIDGET_COMMAND_UNDO: Undos last action.
- * @E_EDITOR_WIDGET_COMMAND_UNLINK:  Removes active links (&lt;A&gt;) from current selection (if there's 
any).
- * @E_EDITOR_WIDGET_COMMAND_UNSELECT: Cancels current selection.
- * @E_EDITOR_WIDGET_COMMAND_USE_CSS: Whether to allow use of CSS or not depending on whether given value is 
"true" or "false".
- *
- * Used to identify DOM command to execute using e_editor_widget_exec_command().
- * Some commands require value to be passed in, which is always stated in the
- * documentation.
- */
-
-typedef enum {
-       E_EDITOR_WIDGET_COMMAND_BACKGROUND_COLOR,
-       E_EDITOR_WIDGET_COMMAND_BOLD,
-       E_EDITOR_WIDGET_COMMAND_COPY,
-       E_EDITOR_WIDGET_COMMAND_CREATE_LINK,
-       E_EDITOR_WIDGET_COMMAND_CUT,
-       E_EDITOR_WIDGET_COMMAND_DEFAULT_PARAGRAPH_SEPARATOR,
-       E_EDITOR_WIDGET_COMMAND_DELETE,
-       E_EDITOR_WIDGET_COMMAND_FIND_STRING,
-       E_EDITOR_WIDGET_COMMAND_FONT_NAME,
-       E_EDITOR_WIDGET_COMMAND_FONT_SIZE,
-       E_EDITOR_WIDGET_COMMAND_FONT_SIZE_DELTA,
-       E_EDITOR_WIDGET_COMMAND_FORE_COLOR,
-       E_EDITOR_WIDGET_COMMAND_FORMAT_BLOCK,
-       E_EDITOR_WIDGET_COMMAND_FORWARD_DELETE,
-       E_EDITOR_WIDGET_COMMAND_HILITE_COLOR,
-       E_EDITOR_WIDGET_COMMAND_INDENT,
-       E_EDITOR_WIDGET_COMMAND_INSERT_HTML,
-       E_EDITOR_WIDGET_COMMAND_INSERT_HORIZONTAL_RULE,
-       E_EDITOR_WIDGET_COMMAND_INSERT_IMAGE,
-       E_EDITOR_WIDGET_COMMAND_INSERT_LINE_BREAK,
-       E_EDITOR_WIDGET_COMMAND_INSERT_NEW_LINE_IN_QUOTED_CONTENT,
-       E_EDITOR_WIDGET_COMMAND_INSERT_ORDERED_LIST,
-       E_EDITOR_WIDGET_COMMAND_INSERT_PARAGRAPH,
-       E_EDITOR_WIDGET_COMMAND_INSERT_TEXT,
-       E_EDITOR_WIDGET_COMMAND_INSERT_UNORDERED_LIST,
-       E_EDITOR_WIDGET_COMMAND_ITALIC,
-       E_EDITOR_WIDGET_COMMAND_JUSTIFY_CENTER,
-       E_EDITOR_WIDGET_COMMAND_JUSTIFY_FULL,
-       E_EDITOR_WIDGET_COMMAND_JUSTIFY_LEFT,
-       E_EDITOR_WIDGET_COMMAND_JUSTIFY_NONE,
-       E_EDITOR_WIDGET_COMMAND_JUSTIFY_RIGHT,
-       E_EDITOR_WIDGET_COMMAND_OUTDENT,
-       E_EDITOR_WIDGET_COMMAND_PASTE,
-       E_EDITOR_WIDGET_COMMAND_PASTE_AND_MATCH_STYLE,
-       E_EDITOR_WIDGET_COMMAND_PASTE_AS_PLAIN_TEXT,
-       E_EDITOR_WIDGET_COMMAND_PRINT,
-       E_EDITOR_WIDGET_COMMAND_REDO,
-       E_EDITOR_WIDGET_COMMAND_REMOVE_FORMAT,
-       E_EDITOR_WIDGET_COMMAND_SELECT_ALL,
-       E_EDITOR_WIDGET_COMMAND_STRIKETHROUGH,
-       E_EDITOR_WIDGET_COMMAND_STYLE_WITH_CSS,
-       E_EDITOR_WIDGET_COMMAND_SUBSCRIPT,
-       E_EDITOR_WIDGET_COMMAND_SUPERSCRIPT,
-       E_EDITOR_WIDGET_COMMAND_TRANSPOSE,
-       E_EDITOR_WIDGET_COMMAND_UNDERLINE,
-       E_EDITOR_WIDGET_COMMAND_UNDO,
-       E_EDITOR_WIDGET_COMMAND_UNLINK,
-       E_EDITOR_WIDGET_COMMAND_UNSELECT,
-       E_EDITOR_WIDGET_COMMAND_USE_CSS
-} EEditorWidgetCommand;
-
 typedef struct _EEditorWidget EEditorWidget;
 typedef struct _EEditorWidgetClass EEditorWidgetClass;
 typedef struct _EEditorWidgetPrivate EEditorWidgetPrivate;
diff --git a/e-util/e-util-enums.h b/e-util/e-util-enums.h
index cf30713..4ccc970 100644
--- a/e-util/e-util-enums.h
+++ b/e-util/e-util-enums.h
@@ -164,6 +164,169 @@ typedef enum {
        E_EDITOR_SELECTION_GRANULARITY_WORD
 } EEditorSelectionGranularity;
 
+/**
+ * EEditorWidgetCommand:
+ * @E_EDITOR_WIDGET_COMMAND_BACKGROUND_COLOR:
+ *   Sets background color to given value.
+ * @E_EDITOR_WIDGET_COMMAND_BOLD:
+ *   Toggles bold formatting of current selection.
+ * @E_EDITOR_WIDGET_COMMAND_COPY:
+ *   Copies current selection to clipboard.
+ * @E_EDITOR_WIDGET_COMMAND_CREATE_LINK:
+ *   Converts current selection to a link that points to URL in value
+ * @E_EDITOR_WIDGET_COMMAND_CUT:
+ *   Cuts current selection to clipboard.
+ * @E_EDITOR_WIDGET_COMMAND_DEFAULT_PARAGRAPH_SEPARATOR:
+ *   (XXX Explain me!)
+ * @E_EDITOR_WIDGET_COMMAND_DELETE:
+ *   Deletes current selection.
+ * @E_EDITOR_WIDGET_COMMAND_FIND_STRING:
+ *   Highlights given string.
+ * @E_EDITOR_WIDGET_COMMAND_FONT_NAME:
+ *   Sets font name to given value.
+ * @E_EDITOR_WIDGET_COMMAND_FONT_SIZE:
+ *   Sets font point size to given value (no units, just number)
+ * @E_EDITOR_WIDGET_COMMAND_FONT_SIZE_DELTA:
+ *   Changes font size by given delta value (no units, just number)
+ * @E_EDITOR_WIDGET_COMMAND_FORE_COLOR:
+ *   Sets font color to given value
+ * @E_EDITOR_WIDGET_COMMAND_FORMAT_BLOCK:
+ *   Sets block type of current paragraph to given format. Allowed formats
+ *   are "BLOCKQUOTE", "H1", "H2", "H3", "H4", "H5", "H6", "P", "PRE" and
+ *   "ADDRESS".
+ * @E_EDITOR_WIDGET_COMMAND_FORWARD_DELETE:
+ *   (XXX Explain me!)
+ * @E_EDITOR_WIDGET_COMMAND_HILITE_COLOR:
+ *   Sets color in which results of "FindString" command should be
+ *   highlighted to given value.
+ * @E_EDITOR_WIDGET_COMMAND_INDENT:
+ *   Indents current paragraph by one level.
+ * @E_EDITOR_WIDGET_COMMAND_INSERT_HTML:
+ *   Inserts give HTML code into document.
+ * @E_EDITOR_WIDGET_COMMAND_INSERT_HORIZONTAL_RULE:
+ *   Inserts a horizontal rule (&lt;HR&gt;) on current line.
+ * @E_EDITOR_WIDGET_COMMAND_INSERT_IMAGE:
+ *   Inserts an image with given source file.
+ * @E_EDITOR_WIDGET_COMMAND_INSERT_LINE_BREAK:
+ *   Breaks line at current cursor position.
+ * @E_EDITOR_WIDGET_COMMAND_INSERT_NEW_LINE_IN_QUOTED_CONTENT:
+ *   Breaks citation at current cursor position.
+ * @E_EDITOR_WIDGET_COMMAND_INSERT_ORDERED_LIST:
+ *   Creates an ordered list environment at current cursor position.
+ * @E_EDITOR_WIDGET_COMMAND_INSERT_PARAGRAPH:
+ *   Inserts a new paragraph at current cursor position.
+ * @E_EDITOR_WIDGET_COMMAND_INSERT_TEXT:
+ *   Inserts given text at current cursor position.
+ * @E_EDITOR_WIDGET_COMMAND_INSERT_UNORDERED_LIST:
+ *   Creates an undordered list environment at current cursor position.
+ * @E_EDITOR_WIDGET_COMMAND_ITALIC:
+ *   Toggles italic formatting of current selection.
+ * @E_EDITOR_WIDGET_COMMAND_JUSTIFY_CENTER:
+ *   Aligns current paragraph to center.
+ * @E_EDITOR_WIDGET_COMMAND_JUSTIFY_FULL:
+ *   Justifies current paragraph to block.
+ * @E_EDITOR_WIDGET_COMMAND_JUSTIFY_NONE:
+ *   Removes any justification or alignment of current paragraph.
+ * @E_EDITOR_WIDGET_COMMAND_JUSTIFY_RIGHT:
+ *   Aligns current paragraph to right.
+ * @E_EDITOR_WIDGET_COMMAND_OUTDENT:
+ *   Outdents current paragraph by one level.
+ * @E_EDITOR_WIDGET_COMMAND_PASTE:
+ *   Pastes clipboard content at current cursor position.
+ * @E_EDITOR_WIDGET_COMMAND_PASTE_AND_MATCH_STYLE:
+ *   Pastes clipboard content and matches its style to style at current
+ *   cursor position.
+ * @E_EDITOR_WIDGET_COMMAND_PASTE_AS_PLAIN_TEXT:
+ *   Pastes clipboard content at current cursor position removing any HTML
+ *   formatting.
+ * @E_EDITOR_WIDGET_COMMAND_PRINT:
+ *   Print current document.
+ * @E_EDITOR_WIDGET_COMMAND_REDO:
+ *   Redoes last action.
+ * @E_EDITOR_WIDGET_COMMAND_REMOVE_FORMAT:
+ *   Removes any formatting of current selection.
+ * @E_EDITOR_WIDGET_COMMAND_SELECT_ALL:
+ *   Extends selects to the entire document.
+ * @E_EDITOR_WIDGET_COMMAND_STRIKETHROUGH:
+ *   Toggles strikethrough formatting.
+ * @E_EDITOR_WIDGET_COMMAND_STYLE_WITH_CSS:
+ *   Toggles whether style should be defined in CSS "style" attribute of
+ *   elements or whether to use deprecated &lt;FONT&gt; tags. Depends on
+ *   whether given value is "true" or "false".
+ * @E_EDITOR_WIDGET_COMMAND_SUBSCRIPT:
+ *   Toggles subscript of current selection.
+ * @E_EDITOR_WIDGET_COMMAND_SUPERSCRIPT:
+ *   Toggles superscript of current selection.
+ * @E_EDITOR_WIDGET_COMMAND_TRANSPOSE:
+ *   (XXX Explain me!)
+ * @E_EDITOR_WIDGET_COMMAND_UNDERLINE:
+ *   Toggles underline formatting of current selection.
+ * @E_EDITOR_WIDGET_COMMAND_UNDO:
+ *   Undoes last action.
+ * @E_EDITOR_WIDGET_COMMAND_UNLINK:
+ *   Removes active links (&lt;A&gt;) from current selection (if there's any).
+ * @E_EDITOR_WIDGET_COMMAND_UNSELECT:
+ *   Cancels current selection.
+ * @E_EDITOR_WIDGET_COMMAND_USE_CSS:
+ *   Whether to allow use of CSS or not depending on whether given value is
+ *   "true" or "false".
+ *
+ * Specifies the DOM command to execute in e_editor_widget_exec_command().
+ * Some commands require value to be passed in, which is always stated in the
+ * documentation.
+ */
+typedef enum {
+       E_EDITOR_WIDGET_COMMAND_BACKGROUND_COLOR,
+       E_EDITOR_WIDGET_COMMAND_BOLD,
+       E_EDITOR_WIDGET_COMMAND_COPY,
+       E_EDITOR_WIDGET_COMMAND_CREATE_LINK,
+       E_EDITOR_WIDGET_COMMAND_CUT,
+       E_EDITOR_WIDGET_COMMAND_DEFAULT_PARAGRAPH_SEPARATOR,
+       E_EDITOR_WIDGET_COMMAND_DELETE,
+       E_EDITOR_WIDGET_COMMAND_FIND_STRING,
+       E_EDITOR_WIDGET_COMMAND_FONT_NAME,
+       E_EDITOR_WIDGET_COMMAND_FONT_SIZE,
+       E_EDITOR_WIDGET_COMMAND_FONT_SIZE_DELTA,
+       E_EDITOR_WIDGET_COMMAND_FORE_COLOR,
+       E_EDITOR_WIDGET_COMMAND_FORMAT_BLOCK,
+       E_EDITOR_WIDGET_COMMAND_FORWARD_DELETE,
+       E_EDITOR_WIDGET_COMMAND_HILITE_COLOR,
+       E_EDITOR_WIDGET_COMMAND_INDENT,
+       E_EDITOR_WIDGET_COMMAND_INSERT_HTML,
+       E_EDITOR_WIDGET_COMMAND_INSERT_HORIZONTAL_RULE,
+       E_EDITOR_WIDGET_COMMAND_INSERT_IMAGE,
+       E_EDITOR_WIDGET_COMMAND_INSERT_LINE_BREAK,
+       E_EDITOR_WIDGET_COMMAND_INSERT_NEW_LINE_IN_QUOTED_CONTENT,
+       E_EDITOR_WIDGET_COMMAND_INSERT_ORDERED_LIST,
+       E_EDITOR_WIDGET_COMMAND_INSERT_PARAGRAPH,
+       E_EDITOR_WIDGET_COMMAND_INSERT_TEXT,
+       E_EDITOR_WIDGET_COMMAND_INSERT_UNORDERED_LIST,
+       E_EDITOR_WIDGET_COMMAND_ITALIC,
+       E_EDITOR_WIDGET_COMMAND_JUSTIFY_CENTER,
+       E_EDITOR_WIDGET_COMMAND_JUSTIFY_FULL,
+       E_EDITOR_WIDGET_COMMAND_JUSTIFY_LEFT,
+       E_EDITOR_WIDGET_COMMAND_JUSTIFY_NONE,
+       E_EDITOR_WIDGET_COMMAND_JUSTIFY_RIGHT,
+       E_EDITOR_WIDGET_COMMAND_OUTDENT,
+       E_EDITOR_WIDGET_COMMAND_PASTE,
+       E_EDITOR_WIDGET_COMMAND_PASTE_AND_MATCH_STYLE,
+       E_EDITOR_WIDGET_COMMAND_PASTE_AS_PLAIN_TEXT,
+       E_EDITOR_WIDGET_COMMAND_PRINT,
+       E_EDITOR_WIDGET_COMMAND_REDO,
+       E_EDITOR_WIDGET_COMMAND_REMOVE_FORMAT,
+       E_EDITOR_WIDGET_COMMAND_SELECT_ALL,
+       E_EDITOR_WIDGET_COMMAND_STRIKETHROUGH,
+       E_EDITOR_WIDGET_COMMAND_STYLE_WITH_CSS,
+       E_EDITOR_WIDGET_COMMAND_SUBSCRIPT,
+       E_EDITOR_WIDGET_COMMAND_SUPERSCRIPT,
+       E_EDITOR_WIDGET_COMMAND_TRANSPOSE,
+       E_EDITOR_WIDGET_COMMAND_UNDERLINE,
+       E_EDITOR_WIDGET_COMMAND_UNDO,
+       E_EDITOR_WIDGET_COMMAND_UNLINK,
+       E_EDITOR_WIDGET_COMMAND_UNSELECT,
+       E_EDITOR_WIDGET_COMMAND_USE_CSS
+} EEditorWidgetCommand;
+
 G_END_DECLS
 
 #endif /* E_UTIL_ENUMS_H */


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]