|
Guitar
|
#include <AbstractCharacterBasedApplication.h>


Classes | |
| struct | Char |
| struct | Character |
| struct | CharAttr |
| class | FormattedLine2 |
| struct | Option |
| struct | Private |
Public Types | |
| enum class | WriteMode { Insert , Overwrite } |
| enum class | State { Normal , Exit } |
| enum | LineFlag { LineChanged = 1 } |
Public Member Functions | |
| QList< FormattedLine2 > | formatLine_ (const Document::Line &line, int tab_span, int anchor_a=-1, int anchor_b=-1) const |
| QList< FormattedLine2 > | formatLine2_ (int row_index) const |
| int | currentRow () const |
| int | currentCol () const |
| virtual void | layoutEditor () |
| void | scrollUp () |
| void | scrollDown () |
| void | moveCursorOut () |
| void | moveCursorHome () |
| void | moveCursorEnd () |
| void | moveCursorUp () |
| virtual void | moveCursorDown () |
| void | moveCursorLeft () |
| void | moveCursorRight () |
| void | movePageUp () |
| void | movePageDown () |
| void | scrollToTop () |
| AbstractCharacterBasedApplication () | |
| virtual | ~AbstractCharacterBasedApplication () |
| TextEditorEnginePtr | engine () const |
| int | screenWidth () const |
| int | screenHeight () const |
| void | setScreenSize (int w, int h, bool update_layout) |
| void | setTextEditorEngine (const TextEditorEnginePtr &e) |
| void | openFile (QString const &path) |
| void | saveFile (QString const &path) |
| void | loadExampleFile () |
| void | pressEnter () |
| void | pressEscape () |
| State | state () const |
| bool | isLineNumberVisible () const |
| void | showLineNumber (bool show, int left_margin=LEFT_MARGIN) |
| void | showHeader (bool f) |
| void | showFooter (bool f) |
| void | setAutoLayout (bool f) |
| void | setDocument (const QList< Document::Line > *source) |
| void | setSelectionAnchor (SelectionAnchor::Enabled enabled, bool update_anchor, bool auto_scroll) |
| void | setNormalTextEditorMode (bool f) |
| void | setToggleSelectionAnchorEnabled (bool f) |
| void | setReadOnly (bool f) |
| bool | isReadOnly () const |
| void | editPaste () |
| void | editCopy () |
| void | editCut () |
| void | setWriteMode (WriteMode wm) |
| bool | isInsertMode () const |
| bool | isOverwriteMode () const |
| void | setTerminalMode (bool f) |
| bool | isTerminalMode () const |
| void | moveToTop () |
| void | moveToBottom () |
| bool | isBottom () const |
| void | setLineMargin (int n) |
| void | write (uint32_t c, bool by_keyboard) |
| void | write (char const *ptr, int len, bool by_keyboard) |
| void | write (std::string const &text) |
| void | write (QKeyEvent *e) |
| void | setTextCodec (std::shared_ptr< MyTextCodec > codec) |
| void | setCursorVisible (bool show) |
| bool | isCursorVisible () |
| void | setModifierKeys (Qt::KeyboardModifiers const &keymod) |
| bool | isControlModifierPressed () const |
| bool | isShiftModifierPressed () const |
| void | clearShiftModifier () |
| void | retrieveLastText (std::vector< char > *out, int maxlen) const |
| bool | isChanged () const |
| void | setChanged (bool f) |
| void | logicalMoveToBottom () |
| void | logicalMoveToBottom2 () |
| void | appendBulk (std::string_view const &str) |
| void | clear () |
Static Public Member Functions | |
| static int | charWidth (uint32_t c) |
Static Public Attributes | |
| static const int | LEFT_MARGIN = 8 |
| static const int | RIGHT_MARGIN = 10 |
Protected Member Functions | |
| int | char_screen_w () const |
| int | char_screen_h () const |
| std::vector< Character > * | char_screen () |
| std::vector< Character > const * | char_screen () const |
| std::vector< uint8_t > * | line_flags () |
| void | initEditor () |
| void | fetchCurrentLine () const |
| QByteArray | fetchLine (int row) const |
| 現在行を取得 More... | |
| void | clearParsedLine () |
| int | currentColX () const |
| void | setCurrentRow (int row) |
| void | setCurrentCol (int col) |
| int | cursorCol () const |
| int | cursorRow () const |
| int | editorViewportWidth () const |
| int | editorViewportHeight () const |
| virtual int | print (int x, int y, QString const &text, Option const &opt) |
| TextEditorContext * | cx () |
| TextEditorContext const * | cx () const |
| Document * | document () |
| int | documentLines () const |
| bool | isSingleLineMode () const |
| void | ensureCurrentLineVisible () |
| int | decideColumnScrollPos () const |
| int | calcVisualWidth (Document::Line const &line) const |
| int | leftMargin_ () const |
| void | makeBuffer () |
| int | printArea (const TextEditorContext *cx, SelectionAnchor const *sel_a=nullptr, SelectionAnchor const *sel_b=nullptr) |
| virtual void | updateVisibility (bool ensure_current_line_visible, bool change_col, bool auto_scroll)=0 |
| void | commitLine (const std::vector< Char > &vec) |
| void | doDelete () |
| void | doBackspace () |
| bool | isDialogMode () |
| void | setDialogMode (bool f) |
| void | closeDialog (bool result) |
| void | setDialogOption (QString const &title, QString const &value, const DialogHandler &handler) |
| void | execDialog (QString const &dialog_title, const QString &dialog_value, const DialogHandler &handler) |
| void | deselect () |
| std::vector< Char > * | parseCurrentLine (std::vector< Char > *vec, int increase_hint, bool force) |
| 行のレイアウトを解析 More... | |
| void | parseLine (int row, std::vector< Char > *vec) const |
| 行の桁位置を求める More... | |
| virtual void | setCursorRow (int row, bool auto_scroll=true, bool by_mouse=false) |
| virtual void | setCursorCol (int col) |
| void | setCursorPosByMouse (RowCol pos, QPoint pt) |
| void | setCursorPos (int row, int col) |
| int | nextTabStop (int x) const |
| int | scrollBottomLimit () const |
| int | scrollBottomLimit2 () const |
| bool | isPaintingSuppressed () const |
| void | setPaintingSuppressed (bool f) |
| void | addNewLineToBottom () |
| void | appendNewLine (std::vector< Char > *vec) |
| void | writeNewLine () |
| void | updateCursorPos (bool auto_scroll) |
| QString | statusLine () const |
| void | preparePaintScreen () |
| void | setRecentlyUsedPath (QString const &path) |
| QString | recentlyUsedPath () |
| void | clearRect (int x, int y, int w, int h) |
| void | paintLineNumbers (std::function< void(int, QString const &, Document::Line const *)> const &draw) |
| bool | isAutoLayout () const |
| void | invalidateArea (int top_y=0) |
| void | savePos () |
| void | restorePos () |
| void | write_ (char const *ptr, bool by_keyboard) |
| void | write_ (QString const &text, bool by_keyboard) |
| void | makeColumnPosList (std::vector< int > *out) |
| 現在行の桁座標リストを作成する More... | |
| bool | isValidRowIndex (int row_index) const |
| bool | hasSelection () const |
| void | updateSelectionAnchor1 (bool auto_scroll) |
| void | updateSelectionAnchor2 (bool auto_scroll) |
Protected Attributes | |
| SelectionAnchor | selection_start |
| SelectionAnchor | selection_end |
| const int | reference_char_width_ = 1 |
| std::shared_ptr< TextEditorContext > | editor_cx |
| std::shared_ptr< TextEditorContext > | dialog_cx |
Private Types | |
| enum class | EditOperation { Cut , Copy } |
Private Member Functions | |
| int | internalParseLine (const QByteArray &parsed_line, int current_col, std::vector< Char > *vec, int increase_hint) const |
| 桁位置を求める More... | |
| void | internalWrite (const ushort *begin, const ushort *end) |
| void | pressLetterWithControl (int c) |
| void | invalidateAreaBelowTheCurrentLine () |
| void | onQuit () |
| void | onOpenFile () |
| void | onSaveFile () |
| void | printInvertedBar (int x, int y, char const *text, int padchar) |
| SelectionAnchor | currentAnchor (SelectionAnchor::Enabled enabled) |
| void | editSelected (EditOperation op, std::vector< Char > *cutbuffer) |
| int | calcColumnToIndex (int column) |
| void | edit_ (EditOperation op) |
| bool | isCurrentLineWritable () const |
| void | initEngine (const std::shared_ptr< TextEditorContext > &cx) |
| void | writeCR () |
| bool | deleteIfSelected () |
| void | setCursorCol_ (int col, bool auto_scroll=true, bool by_mouse=false) |
Static Private Member Functions | |
| static int | findSyntax (const QList< Document::CharAttr_ > *list, size_t offset) |
| static void | insertSyntax (QList< Document::CharAttr_ > *list, size_t offset, const Document::CharAttr_ &a) |
Private Attributes | |
| Private * | m |
|
strongprivate |
|
strong |
|
strong |
| AbstractCharacterBasedApplication::AbstractCharacterBasedApplication | ( | ) |
|
virtual |
|
protected |

| void AbstractCharacterBasedApplication::appendBulk | ( | std::string_view const & | str | ) |

|
protected |

|
private |

|
protected |

|
protected |
|
protected |
|
protected |
|
protected |
|
static |

| void AbstractCharacterBasedApplication::clear | ( | ) |

|
protected |
|
protected |

| void AbstractCharacterBasedApplication::clearShiftModifier | ( | ) |
|
protected |

|
protected |

|
private |

| int AbstractCharacterBasedApplication::currentCol | ( | ) | const |

|
protected |

| int AbstractCharacterBasedApplication::currentRow | ( | ) | const |

|
protected |

|
protected |

|
protected |

|
protected |

|
protected |

|
private |

|
protected |
|
protected |

|
protected |

|
protected |

|
protected |

|
private |

| void AbstractCharacterBasedApplication::editCopy | ( | ) |

| void AbstractCharacterBasedApplication::editCut | ( | ) |

|
protected |

|
protected |

| void AbstractCharacterBasedApplication::editPaste | ( | ) |

|
private |

| TextEditorEnginePtr AbstractCharacterBasedApplication::engine | ( | ) | const |

|
protected |

|
protected |

|
protected |

|
protected |
現在行を取得
| row |

|
staticprivate |
| QList< AbstractCharacterBasedApplication::FormattedLine2 > AbstractCharacterBasedApplication::formatLine2_ | ( | int | row_index | ) | const |

| QList< FormattedLine > AbstractCharacterBasedApplication::formatLine_ | ( | const Document::Line & | line, |
| int | tab_span, | ||
| int | anchor_a = -1, |
||
| int | anchor_b = -1 |
||
| ) | const |

|
protected |
|
protected |

|
private |

|
staticprivate |

|
private |
桁位置を求める
| parsed_line | |
| current_col | |
| vec | |
| increase_hint |

|
private |

|
protected |

|
private |

|
protected |
| bool AbstractCharacterBasedApplication::isBottom | ( | ) | const |

| bool AbstractCharacterBasedApplication::isChanged | ( | ) | const |
| bool AbstractCharacterBasedApplication::isControlModifierPressed | ( | ) | const |
|
private |

| bool AbstractCharacterBasedApplication::isCursorVisible | ( | ) |
|
protected |
| bool AbstractCharacterBasedApplication::isInsertMode | ( | ) | const |

| bool AbstractCharacterBasedApplication::isLineNumberVisible | ( | ) | const |
| bool AbstractCharacterBasedApplication::isOverwriteMode | ( | ) | const |

|
protected |
| bool AbstractCharacterBasedApplication::isReadOnly | ( | ) | const |
| bool AbstractCharacterBasedApplication::isShiftModifierPressed | ( | ) | const |
|
protected |

| bool AbstractCharacterBasedApplication::isTerminalMode | ( | ) | const |
|
protected |

|
virtual |
|
protected |
|
protected |
| void AbstractCharacterBasedApplication::loadExampleFile | ( | ) |

| void AbstractCharacterBasedApplication::logicalMoveToBottom | ( | ) |

| void AbstractCharacterBasedApplication::logicalMoveToBottom2 | ( | ) |

|
protected |

|
protected |
現在行の桁座標リストを作成する
| out |
|
virtual |

| void AbstractCharacterBasedApplication::moveCursorEnd | ( | ) |

| void AbstractCharacterBasedApplication::moveCursorHome | ( | ) |

| void AbstractCharacterBasedApplication::moveCursorLeft | ( | ) |

| void AbstractCharacterBasedApplication::moveCursorOut | ( | ) |

| void AbstractCharacterBasedApplication::moveCursorRight | ( | ) |

| void AbstractCharacterBasedApplication::moveCursorUp | ( | ) |

| void AbstractCharacterBasedApplication::movePageDown | ( | ) |

| void AbstractCharacterBasedApplication::movePageUp | ( | ) |

| void AbstractCharacterBasedApplication::moveToBottom | ( | ) |

| void AbstractCharacterBasedApplication::moveToTop | ( | ) |

|
protected |

|
private |

|
private |

|
private |

| void AbstractCharacterBasedApplication::openFile | ( | QString const & | path | ) |

|
protected |

|
protected |
行のレイアウトを解析
| vec | |
| increase_hint | |
| force |

|
protected |
行の桁位置を求める
| row | |
| vec |

|
protected |

| void AbstractCharacterBasedApplication::pressEnter | ( | ) |

| void AbstractCharacterBasedApplication::pressEscape | ( | ) |

|
private |

|
protectedvirtual |

|
protected |

|
private |

|
protected |
|
protected |
| void AbstractCharacterBasedApplication::retrieveLastText | ( | std::vector< char > * | out, |
| int | maxlen | ||
| ) | const |

| void AbstractCharacterBasedApplication::saveFile | ( | QString const & | path | ) |

|
protected |
| int AbstractCharacterBasedApplication::screenHeight | ( | ) | const |
| int AbstractCharacterBasedApplication::screenWidth | ( | ) | const |
|
protected |

|
protected |

| void AbstractCharacterBasedApplication::scrollDown | ( | ) |

| void AbstractCharacterBasedApplication::scrollToTop | ( | ) |

| void AbstractCharacterBasedApplication::scrollUp | ( | ) |

| void AbstractCharacterBasedApplication::setAutoLayout | ( | bool | f | ) |

| void AbstractCharacterBasedApplication::setChanged | ( | bool | f | ) |
|
protected |

|
protected |

|
inlineprotectedvirtual |
|
private |

|
inlineprotected |

|
inlineprotected |

|
protectedvirtual |
| void AbstractCharacterBasedApplication::setCursorVisible | ( | bool | show | ) |
|
protected |

|
protected |
| void AbstractCharacterBasedApplication::setDocument | ( | const QList< Document::Line > * | source | ) |

| void AbstractCharacterBasedApplication::setLineMargin | ( | int | n | ) |
| void AbstractCharacterBasedApplication::setModifierKeys | ( | Qt::KeyboardModifiers const & | keymod | ) |
| void AbstractCharacterBasedApplication::setNormalTextEditorMode | ( | bool | f | ) |

|
protected |
| void AbstractCharacterBasedApplication::setReadOnly | ( | bool | f | ) |
|
protected |
| void AbstractCharacterBasedApplication::setScreenSize | ( | int | w, |
| int | h, | ||
| bool | update_layout | ||
| ) |

| void AbstractCharacterBasedApplication::setSelectionAnchor | ( | SelectionAnchor::Enabled | enabled, |
| bool | update_anchor, | ||
| bool | auto_scroll | ||
| ) |

| void AbstractCharacterBasedApplication::setTerminalMode | ( | bool | f | ) |

| void AbstractCharacterBasedApplication::setTextCodec | ( | std::shared_ptr< MyTextCodec > | codec | ) |

| void AbstractCharacterBasedApplication::setTextEditorEngine | ( | const TextEditorEnginePtr & | e | ) |

| void AbstractCharacterBasedApplication::setToggleSelectionAnchorEnabled | ( | bool | f | ) |
| void AbstractCharacterBasedApplication::setWriteMode | ( | WriteMode | wm | ) |
| void AbstractCharacterBasedApplication::showFooter | ( | bool | f | ) |

| void AbstractCharacterBasedApplication::showHeader | ( | bool | f | ) |

| void AbstractCharacterBasedApplication::showLineNumber | ( | bool | show, |
| int | left_margin = LEFT_MARGIN |
||
| ) |
| AbstractCharacterBasedApplication::State AbstractCharacterBasedApplication::state | ( | ) | const |
|
protected |

|
protected |

|
protected |

|
protected |

|
protectedpure virtual |
Implemented in TextEditorView.
| void AbstractCharacterBasedApplication::write | ( | char const * | ptr, |
| int | len, | ||
| bool | by_keyboard | ||
| ) |

| void AbstractCharacterBasedApplication::write | ( | QKeyEvent * | e | ) |

| void AbstractCharacterBasedApplication::write | ( | std::string const & | text | ) |

| void AbstractCharacterBasedApplication::write | ( | uint32_t | c, |
| bool | by_keyboard | ||
| ) |

|
protected |

|
protected |

|
private |

|
protected |

|
protected |
|
protected |
|
static |
|
private |
|
protected |
|
static |
|
protected |
|
protected |