Content


NTL
Core
CCaret

CCaret



Provide default implementation of caret. Form uses it. A control which shows the caret should assign feedback callback and call form repaint of corresponding area. Inversed mode could work slow for huge carets(it is recommended to disable this mode for such caret sizes). It also works only when caret is being rendered on render target. When there is no render target active(drawing directly onto a form) nothing will be drawn. Standard text input and text area always draw onto internal buffer and handle this properly

You can find more information in comments below. Overrided methods can be found in corresponding base class or interface.

class CCaret :public virtual ICaret, public CFeedback
{
public:
    IRenderer *getRenderer() override;
    bool isVisible() override;
    PointF getSize() override;
    float getIntervalVisible() override;
    float getIntervalHidden() override;
    bool isInversed() override; // True by default. See note above
    bool setRenderer(IRenderer *value) override;
    bool setVisible(const bool value) override;
    bool setSize(const PointF &value) override;
    bool setIntervalVisible(const float value) override;
    bool setIntervalHidden(const float value) override;
    bool setInversed(const bool value) override;

    void Render(const Mat4f &matrix) override;
    void Release() override;

    CCaret(IFeedbackListener *listener); // Listener notification is called when repaint is required    virtual ~CCaret();
};
Namespace: nitisa
Include: Nitisa/Core/Caret.h