CMemo



Implements Memo control.

You can find more information in comments below. Overrided methods can be found in corresponding base classes and interfaces.

class CMemo :public virtual IMemo, public CControl
{
public:
    void(*OnChange)(IControl *sender); // Event called when text changed 

    // IControl methods 
    void Refresh(const bool refresh_children) override;

    CMemo();
    CMemo(IControl *parent);
    CMemo(IForm *parent);
    ~CMemo() override;

    // CControl getters 
    RectF getClientRect() override; // Rectangle with text area and scrolls 
    RectF getRenderRect() override;
    CURSOR_TYPE getCursor() override;
    String getText() override;

    bool setDPI(const Point &value) override;
    bool setText(const String &value) override;

    // ITextArea getters 
    String getSelectedText();
    Point getSelection();
    int getCaretPosition();
    PointF getScroll();
    int getMaxLength();
    int getUndoLimitCount();
    int getUndoLimitSize();
    bool canUndo();
    bool canRedo();
    TEXT_ALIGN getTextAlign();
    bool isWordWrap();
    bool isWordBreak();
    // Since 3.0.0 
    int getLineCount();
    String getLine(const int index);

    // CTextArea getters(works only if assocciated ITextInput is instance of CTextArea) 
    bool isReadOnly();
    bool isReplacing();
    float getScrollInterval();
    CTextArea::STATE getState();
    Color getTextColor(const CTextArea::STATE state);
    Color getTextShadowColor(const CTextArea::STATE state);
    Color getSelectionBackgroundColor(const CTextArea::STATE state);
    Color getSelectionTextColor(const CTextArea::STATE state);
    Color getSelectionTextShadowColor(const CTextArea::STATE state);
    PointF getTextShadowShift(const CTextArea::STATE state);
    int getTextShadowRadius(const CTextArea::STATE state);
    bool isCopyByMouseEnabled();
    bool isMoveByMouseEnabled();
    bool isSelectWordByDoubleClickEnabled();
    bool isKeyLeftEnabled();
    bool isKeyRightEnabled();
    bool isKeyHomeEnabled();
    bool isKeyEndEnabled();
    bool isKeyDeleteEnabled();
    bool isKeyBackspaceEnabled();
    bool isKeyUpEnabled();
    bool isKeyDownEnabled();
    bool isKeyPageUpEnabled();
    bool isKeyPageDownEnabled();
    bool isSelectAllByKeyEnabled();
    bool isPasteByKeyEnabled();
    bool isCopyByKeyEnabled();
    bool isCutByKeyEnabled();
    bool isHistoryByKeyEnabled();
    bool isInsertReplaceChangeByKeyEnabled();
    bool isWordWrapChangeByKeyEnabled();

    // Return layout properties 
    SCROLL_VISIBILITY getVerticalScrollType() const;
    float getVerticalScroll();
    float getMinVerticalScroll();
    float getMaxVerticalScroll();
    SCROLL_VISIBILITY getHorizontalScrollType() const;
    float getHorizontalScroll();
    float getMinHorizontalScroll();
    float getMaxHorizontalScroll();
    RectF getBorderWidth() const;
    float getLeftBorderWidth() const;
    float getTopBorderWidth() const;
    float getRightBorderWidth() const;
    float getBottomBorderWidth() const;
    RectF getBorderRadius() const;
    float getLeftBorderRadius() const;
    float getTopBorderRadius() const;
    float getRightBorderRadius() const;
    float getBottomBorderRadius() const;
    RectF getPadding() const;
    float getLeftPadding() const;
    float getTopPadding() const;
    float getRightPadding() const;
    float getBottomPadding() const;
    RectC getBorderColor(const CTextArea::STATE state) const;
    Color getLeftBorderColor(const CTextArea::STATE state) const;
    Color getTopBorderColor(const CTextArea::STATE state) const;
    Color getRightBorderColor(const CTextArea::STATE state) const;
    Color getBottomBorderColor(const CTextArea::STATE state) const;
    Color getBackgroundColor(const CTextArea::STATE state) const;
    Gradient *getBackgroundGradient(const CTextArea::STATE state);
    int getShadowRadius(const CTextArea::STATE state) const;
    PointF getShadowShift(const CTextArea::STATE state) const;
    Color getShadowColor(const CTextArea::STATE state) const;
    Color getCornerColor(const CTextArea::STATE state) const;

    // ITextArea setters 
    bool setSelection(const Point &value);
    bool setCaretPosition(const int value);
    bool setScroll(const PointF &value);
    bool setMaxLength(const int value);
    bool setUndoLimitCount(const int value);
    bool setUndoLimitSize(const int value);
    bool setTextAlign(const TEXT_ALIGN value);
    bool setWordWrap(const bool value);
    bool setWordBreak(const bool value);
    // Since 3.0.0 
    bool setLine(const int index, const String &value);

    // CTextArea setters(works only if assocciated ITextInput is instance of CTextArea) 
    bool setReadOnly(const bool value);
    bool setReplacing(const bool value);
    bool setScrollInterval(const float value);
    bool setTextColor(const CTextArea::STATE state, const Color &value);
    bool setTextShadowColor(const CTextArea::STATE state, const Color &value);
    bool setSelectionBackgroundColor(const CTextArea::STATE state, const Color &value);
    bool setSelectionTextColor(const CTextArea::STATE state, const Color &value);
    bool setSelectionTextShadowColor(const CTextArea::STATE state, const Color &value);
    bool setTextShadowShift(const CTextArea::STATE state, const PointF &value);
    bool setTextShadowRadius(const CTextArea::STATE state, const int value);
    bool setCopyByMouseEnabled(const bool value);
    bool setMoveByMouseEnabled(const bool value);
    bool setSelectWordByDoubleClickEnabled(const bool value);
    bool setKeyLeftEnabled(const bool value);
    bool setKeyRightEnabled(const bool value);
    bool setKeyHomeEnabled(const bool value);
    bool setKeyEndEnabled(const bool value);
    bool setKeyDeleteEnabled(const bool value);
    bool setKeyBackspaceEnabled(const bool value);
    bool setKeyUpEnabled(const bool value);
    bool setKeyDownEnabled(const bool value);
    bool setKeyPageUpEnabled(const bool value);
    bool setKeyPageDownEnabled(const bool value);
    bool setSelectAllByKeyEnabled(const bool value);
    bool setPasteByKeyEnabled(const bool value);
    bool setCopyByKeyEnabled(const bool value);
    bool setCutByKeyEnabled(const bool value);
    bool setHistoryByKeyEnabled(const bool value);
    bool setInsertReplaceChangeByKeyEnabled(const bool value);
    bool setWordWrapChangeByKeyEnabled(const bool value);

    // Set layout properties 
    bool setTextArea(IBuiltInTextArea *value);
    bool setVScroll(IBuiltInScroll *value);
    bool setHScroll(IBuiltInScroll *value);
    bool setVerticalScrollType(const SCROLL_VISIBILITY value);
    bool setVerticalScroll(const float value);
    bool setHorizontalScrollType(const SCROLL_VISIBILITY value);
    bool setHorizontalScroll(const float value);
    bool setBorderWidth(const RectF &value);
    bool setLeftBorderWidth(const float value);
    bool setTopBorderWidth(const float value);
    bool setRightBorderWidth(const float value);
    bool setBottomBorderWidth(const float value);
    bool setBorderRadius(const RectF &value);
    bool setLeftBorderRadius(const float value);
    bool setTopBorderRadius(const float value);
    bool setRightBorderRadius(const float value);
    bool setBottomBorderRadius(const float value);
    bool setPadding(const RectF &value);
    bool setLeftPadding(const float value);
    bool setTopPadding(const float value);
    bool setRightPadding(const float value);
    bool setBottomPadding(const float value);
    bool setBorderColor(const CTextArea::STATE state, const RectC &value);
    bool setLeftBorderColor(const CTextArea::STATE state, const Color &value);
    bool setTopBorderColor(const CTextArea::STATE state, const Color &value);
    bool setRightBorderColor(const CTextArea::STATE state, const Color &value);
    bool setBottomBorderColor(const CTextArea::STATE state, const Color &value);
    bool setBackgroundColor(const CTextArea::STATE state, const Color &value);
    bool setShadowRadius(const CTextArea::STATE state, const int value);
    bool setShadowShift(const CTextArea::STATE state, const PointF &value);
    bool setShadowColor(const CTextArea::STATE state, const Color &value);
    bool setCornerColor(const CTextArea::STATE state, const Color &value);

    // ITextInput action 
    bool DeleteSelection();
    bool DeleteCharBeforeCaret();
    bool DeleteCharAfterCaret();
    bool DeleteWordBeforeCaret();
    bool DeleteWordAfterCaret();
    bool DeleteToLineStart();
    bool DeleteToLineEnd();
    bool DeleteAllBeforeCaret();
    bool DeleteAllAfterCaret();
    bool MoveCaretLeft(const bool select);
    bool MoveCaretRight(const bool select);
    bool MoveCaretWordLeft(const bool select);
    bool MoveCaretWordRight(const bool select);
    bool MoveCaretLineStart(const bool select);
    bool MoveCaretLineEnd(const bool select);
    bool MoveCaretLineUp(const bool select);
    bool MoveCaretLineDown(const bool select);
    bool MoveCaretPageStart(const bool select);
    bool MoveCaretPageEnd(const bool select);
    bool MoveCaretPageUp(const bool select);
    bool MoveCaretPageDown(const bool select);
    bool MoveCaretStart(const bool select);
    bool MoveCaretEnd(const bool select);
    bool Undo();
    bool Redo();
    bool Insert(const wchar_t chr);
    bool Insert(const String &str);
    bool Replace(const wchar_t chr);
    bool Replace(const String &str);
    bool MoveSelection(const int dst_caret_pos);
    bool CopySelection(const int dst_caret_pos);
    bool Copy();
    bool Cut();
    bool Paste();
    bool ScrollLineUp();
    bool ScrollLineDown();
    bool SelectAll();
    bool DeselectAll();
    // Since 3.0.0 
    bool AddLine(const String &text);
    bool DeleteLine(const int index);
};
Namespace: nitisa::standard
Include: Standard/Controls/Memo/Memo.h