Molybden API
Loading...
Searching...
No Matches
editor_command.hpp
1// Copyright (c) 2000-2023 TeamDev Ltd. All rights reserved.
2// TeamDev PROPRIETARY and CONFIDENTIAL.
3// Use is subject to license terms.
4
5#ifndef MOLYBDEN_EDITOR_COMMAND_HPP
6#define MOLYBDEN_EDITOR_COMMAND_HPP
7
8#include <string>
9
10#include "molybden/ui/color.hpp"
11#include "molybden/ui/font.hpp"
12
13namespace molybden {
14
16 explicit EditorCommand(const std::string& name,
17 const std::string& value = "");
18
24
29
35
41
47
53
59
65
71
76
81
87
93
99
105
111
117
123
129
135
141
147
153
159
165
170
175
180
185
190
196
202
208
214
220
226
232
238
244
250
256
261
266
272
278
284
290
296
302
308
314
320
326
332
338
344
351 static EditorCommand backgroundColor(const Color& color);
352
359 static EditorCommand backgroundColor(const std::string& color_name);
360
370 static EditorCommand findText(const std::string& text);
371
378 static EditorCommand fontSize(AbsoluteFontSize font_size);
379
386 static EditorCommand fontName(const std::string& font_name);
387
394 static EditorCommand foregroundColor(const Color& color);
395
402 static EditorCommand foregroundColor(const std::string& color_name);
403
411 static EditorCommand insertImage(const std::string& image_src);
412
419 static EditorCommand insertHtml(const std::string& html);
420
427 static EditorCommand insertText(const std::string& text);
428
435 static EditorCommand createLink(const std::string& url);
436
440 std::string name;
441
445 std::string value;
446};
447
448} // namespace molybden
449
450#endif // MOLYBDEN_EDITOR_COMMAND_HPP
A numeric model of an RGB color.
Definition color.hpp:23
Definition editor_command.hpp:15
static EditorCommand subscript()
Returns a command that allows making the selected text subscript in a WYSIWYG editor.
static EditorCommand justifyLeft()
Returns a command that allows full justification the selected text in a WYSIWYG editor.
static EditorCommand insertNewLine()
Returns a command that allows inserting a new line in a WYSIWYG editor.
static EditorCommand ignoreSpelling()
Returns a command that allows disabling the spelling mistakes highlighting in a text area or a WYSIWY...
static EditorCommand selectLine()
Returns a command that allows selecting a line at the caret position in a text area or a WYSIWYG edit...
static EditorCommand moveWordLeftAndModifySelection()
Returns a command that allows moving a word left and modifying selection in a text area or a WYSIWYG ...
static EditorCommand fontName(const std::string &font_name)
Returns a command that allows setting the given fontName for the selected text in a WYSIWYG editor.
static EditorCommand scrollToBeginningOfDocument()
Returns a command that allows scrolling content to the beginning of the document in the frame.
static EditorCommand moveToBeginningOfLine()
Returns a command that allows moving a word to the beginning of line in a text area or a WYSIWYG edit...
static EditorCommand insertHtml(const std::string &html)
Returns a command that allows inserting the given html content in a WYSIWYG editor.
static EditorCommand deleteWordBackward()
Returns a command that allows deleting a word before the caret position in a text field,...
static EditorCommand cut()
Returns a command that allows cutting the selected text in a text field, text area or WYSIWYG editor.
static EditorCommand indent()
Returns a command that allows making indent of the selected text in a WYSIWYG editor.
static EditorCommand scrollPageBackward()
Returns a command that allows scrolling a page backward.
static EditorCommand italic()
Returns a command that allows making the selected text italic in a WYSIWYG editor.
static EditorCommand moveWordRightAndModifySelection()
Returns a command that allows moving a word right and modifying selection in a text area or a WYSIWYG...
static EditorCommand deleteToBeginningOfLine()
Returns a command that allows deleting character from the caret position to the beginning of line in ...
static EditorCommand justifyFull()
Returns a command that allows full justification the selected text in a WYSIWYG editor.
static EditorCommand copy()
Returns a command that allows copying the selected text in the frame.
static EditorCommand backgroundColor(const std::string &color_name)
Returns a command that allows setting the given background color_name for the selected text in a WYSI...
static EditorCommand foregroundColor(const Color &color)
Returns a command that allows setting the given foreground color for the selected text in a WYSIWYG e...
static EditorCommand foregroundColor(const std::string &color_name)
Returns a command that allows setting the given foreground color_name for the selected text in a WYSI...
static EditorCommand moveToBeginningOfLineAndModifySelection()
Returns a command that allows moving a word to the beginning of line and modifying selection in a tex...
static EditorCommand unselect()
Returns a command that allows clearing the current selection in a frame.
static EditorCommand insertTab()
Returns a command that allows inserting a tab character in a WYSIWYG editor.
static EditorCommand outdent()
Returns a command that allows making outdent of the selected text in a WYSIWYG editor.
static EditorCommand insertOrderedList()
Returns a command that allows inserting an ordered list in a WYSIWYG editor.
static EditorCommand scrollPageForward()
Returns a command that allows scrolling a page forward.
static EditorCommand insertParagraph()
Returns a command that allows inserting a paragraph in a WYSIWYG editor.
static EditorCommand createLink(const std::string &url)
Returns a command that allows making the link to the specified URL in a WYSIWYG editor.
static EditorCommand selectWord()
Returns a command that allows selecting the word at the caret position in a text field,...
static EditorCommand strikethrough()
Returns a command that allows making the selected text strikethrough in a WYSIWYG editor.
std::string value
A string that represents the command value.
Definition editor_command.hpp:445
static EditorCommand justifyRight()
Returns a command that allows right justification the selected text in a WYSIWYG editor.
static EditorCommand deleteWordForward()
Returns a command that allows deleting a word after the caret position in a text field,...
static EditorCommand toggleBold()
Returns a command that allows toggling bold style for the selected text in a WYSIWYG editor.
static EditorCommand moveToEndOfLine()
Returns a command that allows moving a word to the end of line in a text area or a WYSIWYG editor.
static EditorCommand moveWordLeft()
Returns a command that allows moving a word left in a text area or a WYSIWYG editor.
static EditorCommand deleteBackward()
Returns a command that allows deleting character before the caret position in a text field,...
static EditorCommand selectParagraph()
Returns a command that allows selecting the whole paragraph at the caret position in a text area or a...
static EditorCommand moveToEndOfLineAndModifySelection()
Returns a command that allows moving a word to the end of line and modifying selection in a text area...
static EditorCommand moveWordRight()
Returns a command that allows moving a word right in a text area or a WYSIWYG editor.
static EditorCommand bold()
Returns a command that allows making the selected text bold in a WYSIWYG editor.
static EditorCommand backgroundColor(const Color &color)
Returns a command that allows setting the given background color for the selected text in a WYSIWYG e...
static EditorCommand deleteSelectedText()
Returns a command that allows deleting the selected text in a text field, text area or WYSIWYG editor...
static EditorCommand fontSize(AbsoluteFontSize font_size)
Returns a command that allows setting the given font_size for the selected text in a WYSIWYG editor.
static EditorCommand justifyCenter()
Returns a command that allows center justification the selected text in a WYSIWYG editor.
static EditorCommand removeFormat()
Returns a command that allows removing all styles of the selected text (bold, italic,...
static EditorCommand movePageDown()
Returns a command that allows moving the caret position at one page down in a text area or a WYSIWYG ...
static EditorCommand underline()
Returns a command that allows underlying the selected text in a WYSIWYG editor.
static EditorCommand undo()
Returns a command that allows reversing the last action.
static EditorCommand toggleItalic()
Returns a command that allows toggling italic style for the selected text in a WYSIWYG editor.
static EditorCommand redo()
Returns a command that allows reversing the last undo() action.
static EditorCommand insertUnorderedList()
Returns a command that allows inserting an unordered list in a WYSIWYG editor.
static EditorCommand insertText(const std::string &text)
Returns a command that allows inserting the given text content in a WYSIWYG editor or a text field.
static EditorCommand unlink()
Returns a command that allows removing the link from the text in a WYSIWYG editor.
static EditorCommand selectAll()
Returns a command that allows selecting all text in the frame or the currently focused text field,...
static EditorCommand findText(const std::string &text)
Returns a command that allows searching for the given text occurrence from the current caret position...
static EditorCommand superscript()
Returns a command that allows making the selected text superscript in a WYSIWYG editor.
static EditorCommand scrollToEndOfDocument()
Returns a command that allows scrolling content to the end of the document in the frame.
static EditorCommand scrollLineUp()
Returns a command that allows scrolling one line up.
static EditorCommand selectSentence()
Returns a command that allows selecting the whole sentence at the caret position in a text area or a ...
static EditorCommand paste()
Returns a command that allows pasting content of the clipboard in a text field, text area or a WYSIWY...
static EditorCommand insertImage(const std::string &image_src)
Returns a command that allows inserting an image with the given image_src in a WYSIWYG editor.
std::string name
The name of the command.
Definition editor_command.hpp:440
static EditorCommand toggleUnderline()
Returns a command that allows toggling underline style for the selected text in a WYSIWYG editor.
static EditorCommand movePageUp()
Returns a command that allows moving the caret position at one page up in a text area or a WYSIWYG ed...
static EditorCommand scrollLineDown()
Returns a command that allows scrolling one line down.
static EditorCommand deleteForward()
Returns a command that allows deleting character after the caret position in a text field,...