VSTGUI 4.10
Graphical User Interface Framework not only for VST plugins
Loading...
Searching...
No Matches
TextEditorView Struct Reference
+ Inheritance diagram for TextEditorView:

Classes

struct  ModelData
 
struct  UndoGroup
 
struct  UndoRecord
 

Public Types

using UndoRecords = std::vector<UndoRecord>
 
using UndoList = std::vector<UndoGroup>
 
enum class  MouseListenerCall { MouseDown , MouseMoved , MouseUp , MouseCancel }
 
- Public Types inherited from ITextEditor
enum class  Command : uint32_t {
  Undo , Redo , Cut , Copy ,
  Paste , FindNext , FindPrevious , SelectAll ,
  UseSelectionForFind , ShiftLeft , ShiftRight , ShowFindPanel ,
  TakeFocus
}
 Editor command enumeration. More...
 
enum class  FindOption : uint32_t { CaseSensitive , WholeWords }
 Find options for searching text. More...
 
using FindOptions = EnumBitset<FindOption>
 
- Public Types inherited from IEditorExt
using ReadCallbackFunc = std::function<void (std::u32string_view text)>
 

Public Member Functions

 TextEditorView (ITextEditorController *controller)
 
void beforeDelete () override
 
void drawRect (CDrawContext *pContext, const CRect &dirtyRect) override
 called if the view should draw itself
 
bool attached (CView *parent) override
 view is attached to a parent view
 
bool removed (CView *parent) override
 view is removed from parent view
 
void parentSizeChanged () override
 notification that one of the views parent has changed its size
 
void looseFocus () override
 called if view should loose focus
 
void takeFocus () override
 called if view should take focus
 
void onKeyboardEvent (KeyboardEvent &event) override
 called when a keyboard event is dispatched to this view
 
void onMouseDownEvent (MouseDownEvent &event) override
 called when a mouse down event occurs
 
void onMouseMoveEvent (MouseMoveEvent &event) override
 called when a mouse move event occurs
 
void onMouseUpEvent (MouseUpEvent &event) override
 called when a mouse up event occurs
 
void onMouseCancelEvent (MouseCancelEvent &event) override
 called when mouse tracking should be canceled
 
void onMouseEnterEvent (MouseEnterEvent &event) override
 called when the mouse enters this view
 
void onMouseExitEvent (MouseExitEvent &event) override
 called when the mouse leaves this view
 
void viewOnEvent (CView *view, Event &event) override
 called on an event on a view
 
int32_t deleteChars (size_t pos, size_t num) const
 
int32_t insertChars (size_t pos, const CharT *text, size_t num) const
 
void layout (StbTexteditRow *row, size_t start_i) const
 
float getCharWidth (size_t row, size_t pos) const
 
CharT getChar (int32_t pos) const
 
int32_t getLength () const
 
size_t moveToWordPrevious (size_t pos) const
 
size_t moveToWordNext (size_t pos) const
 
- Public Member Functions inherited from CView
 CView (const CRect &size)
 
 CView (const CView &view)
 
uint64_t getRuntimeID () const
 get the unique runtime ID
 
virtual void dispatchEvent (Event &event)
 dispatch an event
 
virtual void onMouseWheelEvent (MouseWheelEvent &event)
 called when a mouse wheel event occurs
 
virtual void onZoomGestureEvent (ZoomGestureEvent &event)
 called when a zoom gesture event occurs
 
virtual void setMouseEnabled (bool bEnable=true)
 turn on/off mouse usage for this view
 
bool getMouseEnabled () const
 get the state of wheather this view uses the mouse or not
 
virtual void setMouseableArea (const CRect &rect)
 set the area in which the view reacts to the mouse
 
CRect getMouseableArea () const
 get the area in which the view reacts to the mouse
 
virtual CMouseEventResult onMouseDown (CPoint &where, const CButtonState &buttons)
 do not use any longer.
 
virtual CMouseEventResult onMouseUp (CPoint &where, const CButtonState &buttons)
 do not use any longer.
 
virtual CMouseEventResult onMouseMoved (CPoint &where, const CButtonState &buttons)
 do not use any longer.
 
virtual CMouseEventResult onMouseCancel ()
 do not use any longer.
 
virtual CMouseEventResult onMouseEntered (CPoint &where, const CButtonState &buttons)
 do not use any longer.
 
virtual CMouseEventResult onMouseExited (CPoint &where, const CButtonState &buttons)
 do not use any longer.
 
virtual bool onWheel (const CPoint &where, const float &distance, const CButtonState &buttons) final
 
virtual bool onWheel (const CPoint &where, const CMouseWheelAxis &axis, const float &distance, const CButtonState &buttons)
 
CRectgetMouseableArea (CRect &rect) const
 get the area in which the view reacts to the mouse
 
void setHitTestPath (CGraphicsPath *path)
 
virtual bool hitTest (const CPoint &where, const Event &event=noEvent())
 check if where hits this view
 
virtual bool hitTest (const CPoint &where, const CButtonState &buttons)
 
bool doDrag (const DragDescription &dragDescription, const SharedPointer< IDragCallback > &callback={})
 start a drag operation
 
virtual SharedPointer< IDropTargetgetDropTarget ()
 get the drag target for drag and drop handling
 
void setDropTarget (const SharedPointer< IDropTarget > &dt)
 set a custom drop target
 
DragResult doDrag (IDataPackage *source, const CPoint &offset=CPoint(0, 0), CBitmap *dragBitmap=nullptr)
 a drag can only be started from within onMouseDown
 
virtual int32_t onKeyDown (VstKeyCode &keyCode)
 called if a key down event occurs and this view has focus
 
virtual int32_t onKeyUp (VstKeyCode &keyCode)
 called if a key up event occurs and this view has focus
 
CCoord getHeight () const
 get the height of the view
 
CCoord getWidth () const
 get the width of the view
 
virtual void setViewSize (const CRect &rect, bool invalid=true)
 set views size
 
const CRectgetViewSize () const
 read only access to view size
 
virtual CRect getVisibleViewSize () const
 returns the visible size of the view
 
virtual CPointframeToLocal (CPoint &point) const
 conversion from frame coordinates to local view coordinates
 
virtual CPointlocalToFrame (CPoint &point) const
 conversion from local view coordinates to frame coordinates
 
virtual void setAutosizeFlags (int32_t flags)
 set autosize flags
 
int32_t getAutosizeFlags () const
 get autosize flags
 
virtual bool sizeToFit ()
 resize view to optimal size
 
virtual bool wantsFocus () const
 check if view supports focus
 
virtual void setWantsFocus (bool state)
 set focus support on/off
 
bool getAttributeSize (const CViewAttributeID id, uint32_t &outSize) const
 get the size of an attribute
 
bool getAttribute (const CViewAttributeID id, const uint32_t inSize, void *outData, uint32_t &outSize) const
 get an attribute
 
bool setAttribute (const CViewAttributeID id, const uint32_t inSize, const void *inData)
 set an attribute
 
bool removeAttribute (const CViewAttributeID id)
 remove an attribute
 
template<typename T>
bool setAttribute (const CViewAttributeID id, const T &data)
 set an attribute
 
template<typename T>
bool getAttribute (const CViewAttributeID id, T &data) const
 get an attribute
 
virtual void setBackground (CBitmap *background)
 set the background image of this view
 
CBitmapgetBackground () const
 get the background image of this view
 
virtual void setDisabledBackground (CBitmap *background)
 set background image used when the mouse is not enabled
 
CBitmapgetDisabledBackground () const
 get background image used when the mouse is not enabled
 
CBitmapgetDrawBackground () const
 get the bitmap which is drawn depending on the enabled state.
 
virtual void setTransparency (bool val)
 set views transparent state
 
bool getTransparency () const
 get views transparent state
 
virtual void setAlphaValue (float alpha)
 set alpha value which will be applied when drawing this view
 
float getAlphaValue () const
 get alpha value
 
bool isAttached () const
 is view attached to a parentView
 
void setSubviewState (bool state)
 
bool isSubview () const
 
CViewgetParentView () const
 get parent view
 
CFramegetFrame () const
 get frame
 
virtual VSTGUIEditorInterfacegetEditor () const
 get editor
 
void addAnimation (IdStringPtr name, Animation::IAnimationTarget *target, Animation::ITimingFunction *timingFunction, CBaseObject *notificationObject)
 
void addAnimation (IdStringPtr name, Animation::IAnimationTarget *target, Animation::ITimingFunction *timingFunction, const Animation::DoneFunction &doneFunc=nullptr, bool callDoneOnCancel=false)
 
void removeAnimation (IdStringPtr name)
 
void removeAllAnimations ()
 
void registerViewListener (IViewListener *listener)
 
void unregisterViewListener (IViewListener *listener)
 
void registerViewEventListener (IViewEventListener *listener)
 
void unregisterViewEventListener (IViewEventListener *listener)
 
void registerViewMouseListener (IViewMouseListener *listener)
 
void unregisterViewMouseListener (IViewMouseListener *listener)
 
CGraphicsTransform getGlobalTransform (bool ignoreFrame=false) const
 get the active global transform for this view
 
template<typename T>
T & translateToGlobal (T &t, bool ignoreFrame=false) const
 translates a local coordinate to a global one using parent transforms
 
template<typename T>
translateToGlobal (const T &t, bool ignoreFrame=false) const
 translates a local coordinate to a global one using parent transforms
 
template<typename T>
T & translateToLocal (T &t, bool ignoreFrame=false) const
 translates a global coordinate to a local one using parent transforms
 
template<typename T>
translateToLocal (const T &t, bool ignoreFrame=false) const
 translates a local coordinate to a global one using parent transforms
 
virtual CViewContainerasViewContainer ()
 
virtual const CViewContainerasViewContainer () const
 
CMouseEventResult callMouseListener (MouseListenerCall type, CPoint pos, CButtonState buttons)
 
void callMouseListenerEnteredExited (bool mouseEntered)
 
CMessageResult notify (CBaseObject *sender, IdStringPtr message) override
 
CBaseObjectnewCopy () const override
 
virtual void draw (CDrawContext *pContext)
 called if the view should draw itself
 
virtual bool checkUpdate (const CRect &updateRect) const
 
virtual bool isDirty () const
 check if view is dirty
 
virtual void setDirty (bool val=true)
 set the view to dirty so that it is redrawn in the next idle.
 
virtual void invalidRect (const CRect &rect)
 mark rect as invalid
 
virtual void invalid ()
 mark whole view as invalid
 
virtual void setVisible (bool state)
 set visibility state
 
bool isVisible () const
 get visibility state
 
virtual void onIdle ()
 called on idle when view wants idle
 
void setWantsIdle (bool state)
 enable/disable onIdle() callback
 
bool wantsIdle () const
 returns if the view wants idle callback or not
 
virtual bool wantsWindowActiveStateChangeNotification () const
 whether this view wants to be informed if the window's active state changes
 
virtual void onWindowActivate (bool state)
 called when the active state of the window changes
 
void setTooltipText (UTF8StringPtr text)
 
- Public Member Functions inherited from CBaseObject
 CBaseObject ()=default
 
 ~CBaseObject () noexcept override=default
 
 CBaseObject (const CBaseObject &)
 
CBaseObjectoperator= (const CBaseObject &)
 
- Public Member Functions inherited from ReferenceCounted< int32_t >
 ReferenceCounted ()=default
 
virtual ~ReferenceCounted () noexcept=default
 
 ReferenceCounted (const ReferenceCounted &)
 
ReferenceCountedoperator= (const ReferenceCounted &)
 
 ReferenceCounted ()=default
 
 ReferenceCounted (const ReferenceCounted &)
 
virtual ~ReferenceCounted () noexcept=default
 
ReferenceCountedoperator= (const ReferenceCounted &)
 
void forget () override
 decrease refcount and delete object if refcount == 0
 
void remember () override
 increase refcount
 
virtual int32_t getNbReference () const
 get refcount
 
void forget () override
 decrease refcount and delete object if refcount == 0
 
void remember () override
 increase refcount
 
virtual int32_t getNbReference () const
 get refcount
 
- Public Member Functions inherited from ITextEditor
virtual ~ITextEditor () noexcept=default
 
- Public Member Functions inherited from IFocusDrawing
virtual ~IFocusDrawing () noexcept=default
 
- Public Member Functions inherited from ViewEventListenerAdapter
void viewOnEvent (CView *view, Event &event) override
 called on an event on a view
 
- Public Member Functions inherited from IViewEventListener
virtual ~IViewEventListener () noexcept=default
 

Static Public Member Functions

static int32_t deleteChars (const TextEditorView *self, size_t pos, size_t num)
 
static int32_t insertChars (const TextEditorView *self, size_t pos, const CharT *text, size_t num)
 
static void layout (StbTexteditRow *row, const TextEditorView *self, size_t start_i)
 
static float getCharWidth (const TextEditorView *self, size_t row, size_t pos)
 
static CharT getChar (const TextEditorView *self, int32_t pos)
 
static int32_t getLength (const TextEditorView *self)
 
static int moveToWordPrevious (const TextEditorView *self, size_t pos)
 
static int moveToWordNext (const TextEditorView *self, size_t pos)
 
static CharTcreateUndoRecord (const TextEditorView *self, size_t pos, size_t insert_len, size_t delete_len)
 
static void undo (const TextEditorView *self)
 
static void redo (const TextEditorView *self)
 

Protected Member Functions

bool drawFocusOnTop () override
 draw focus before view will be drawn or afterwards
 
bool getFocusPath (CGraphicsPath &outPath) override
 the graphics path will be drawn filled with the evenodd method and the color set in CFrame::setFocusColor()
 
bool setPlainText (std::string_view utf8Text, bool clearSelection) const override
 Set the plain text content of the editor.
 
std::string getPlainText () const override
 Get the plain text content of the editor.
 
void resetController () const override
 Reset the controller associated with this text editor.
 
void setStyle (const Style &style) const override
 Set the style of the text editor.
 
bool canHandleCommand (Command cmd) const override
 Query if a command can be handled by the editor.
 
bool handleCommand (Command cmd) const override
 Handle a command in the editor.
 
bool setCommandKeyBinding (Command cmd, char32_t character, VirtualKey virt, Modifiers modifiers) const override
 Set a key binding for a command.
 
void setFindOptions (FindOptions opt) const override
 Set the find options for searching text.
 
void setFindString (std::string_view utf8Text) const override
 Set the string to search for.
 
bool readText (size_t startOffset, size_t length, const ReadCallbackFunc &callback) const override
 Get access to the internal string buffer of the text editor.
 
size_t getTextLength () const override
 Get the length of the text.
 
bool doShifting (bool right) const
 
void selectAll () const
 
bool doCut () const
 
bool doCopy () const
 
bool doPaste () const
 
bool useSelectionForFind () const
 
bool doFind (bool forward=true, size_t oldPos=String::npos) const
 
bool showFindPanel () const
 
bool gotoLine (size_t lineNo) const
 
String::size_type doFindCaseSensitive (bool forward) const
 
String::size_type doFindIgnoreCase (bool forward) const
 
CharTcreateUndoRecord (size_t pos, size_t insertLen, size_t deleteLen) const
 
void checkCurrentUndoGroup (bool force) const
 
void doUndo () const
 
void doRedo () const
 
template<bool iterateForward>
void doUndoRedo () const
 
void flushUndoList () const
 
void clearUndoList () const
 
 ~CView () noexcept override
 
CGraphicsPathgetHitTestPath () const
 
bool hasViewFlag (int32_t bit) const
 
void setViewFlag (int32_t bit, bool state)
 
void setAlphaValueNoInvalidate (float value)
 
void setParentFrame (CFrame *frame)
 
void setParentView (CView *parent)
 

Additional Inherited Members

static bool kDirtyCallAlwaysOnMainThread = false
 if this is true, setting a view dirty will call invalid() instead of checking it in idle.
 
static uint32_t idleRate = 30
 global idle rate in Hz, defaults to 30 Hz
 
- Protected Types inherited from CView
enum  {
  kMouseEnabled = 1 << 0 , kTransparencyEnabled = 1 << 1 , kWantsFocus = 1 << 2 , kIsAttached = 1 << 3 ,
  kVisible = 1 << 4 , kDirty = 1 << 5 , kWantsIdle = 1 << 6 , kIsSubview = 1 << 7 ,
  kHasAlpha = 1 << 8 , kHasBackground = 1 << 9 , kHasDisabledBackground = 1 << 10 , kHasMouseableArea = 1 << 11 ,
  kLastCViewFlag = 11
}
 

Member Typedef Documentation

◆ UndoList

using UndoList = std::vector<UndoGroup>

◆ UndoRecords

using UndoRecords = std::vector<UndoRecord>

Constructor & Destructor Documentation

◆ TextEditorView()

Member Function Documentation

◆ attached()

bool attached ( CView * parent)
overridevirtual

view is attached to a parent view

Parameters
parentparent view
Returns
true if view successfully attached to parent

Reimplemented from CView.

◆ beforeDelete()

void beforeDelete ( )
overridevirtual

Reimplemented from CView.

◆ canHandleCommand()

bool canHandleCommand ( Command cmd) const
overrideprotectedvirtual

Query if a command can be handled by the editor.

Parameters
cmdThe command to query.
Returns
True if the command can be handled, false otherwise.

Implements ITextEditor.

◆ checkCurrentUndoGroup()

void checkCurrentUndoGroup ( bool force) const
protected

◆ clearUndoList()

void clearUndoList ( ) const
protected

◆ createUndoRecord() [1/2]

static CharT * createUndoRecord ( const TextEditorView * self,
size_t pos,
size_t insert_len,
size_t delete_len )
inlinestatic

◆ createUndoRecord() [2/2]

CharT * createUndoRecord ( size_t pos,
size_t insertLen,
size_t deleteLen ) const
protected

◆ deleteChars() [1/2]

static int32_t deleteChars ( const TextEditorView * self,
size_t pos,
size_t num )
inlinestatic

◆ deleteChars() [2/2]

int32_t deleteChars ( size_t pos,
size_t num ) const

◆ doCopy()

bool doCopy ( ) const
protected

◆ doCut()

bool doCut ( ) const
protected

◆ doFind()

bool doFind ( bool forward = true,
size_t oldPos = String::npos ) const
protected

◆ doFindCaseSensitive()

String::size_type doFindCaseSensitive ( bool forward) const
protected

◆ doFindIgnoreCase()

String::size_type doFindIgnoreCase ( bool forward) const
protected

◆ doPaste()

bool doPaste ( ) const
protected

◆ doRedo()

void doRedo ( ) const
protected

◆ doShifting()

bool doShifting ( bool right) const
protected

◆ doUndo()

void doUndo ( ) const
protected

◆ doUndoRedo()

template<bool iterateForward>
void doUndoRedo ( ) const
protected

◆ drawFocusOnTop()

bool drawFocusOnTop ( )
overrideprotectedvirtual

draw focus before view will be drawn or afterwards

Implements IFocusDrawing.

◆ drawRect()

void drawRect ( CDrawContext * pContext,
const CRect & updateRect )
overridevirtual

called if the view should draw itself

Reimplemented from CView.

◆ flushUndoList()

void flushUndoList ( ) const
protected

◆ getChar() [1/2]

static CharT getChar ( const TextEditorView * self,
int32_t pos )
inlinestatic

◆ getChar() [2/2]

CharT getChar ( int32_t pos) const

◆ getCharWidth() [1/2]

static float getCharWidth ( const TextEditorView * self,
size_t row,
size_t pos )
inlinestatic

◆ getCharWidth() [2/2]

float getCharWidth ( size_t row,
size_t pos ) const

◆ getFocusPath()

bool getFocusPath ( CGraphicsPath & outPath)
overrideprotectedvirtual

the graphics path will be drawn filled with the evenodd method and the color set in CFrame::setFocusColor()

Implements IFocusDrawing.

◆ getLength() [1/2]

int32_t getLength ( ) const

◆ getLength() [2/2]

static int32_t getLength ( const TextEditorView * self)
inlinestatic

◆ getPlainText()

std::string getPlainText ( ) const
overrideprotectedvirtual

Get the plain text content of the editor.

Returns
The current text as a UTF-8 string.

Implements ITextEditor.

◆ getTextLength()

size_t getTextLength ( ) const
overrideprotectedvirtual

Get the length of the text.

Returns
number of characters

Implements IEditorExt.

◆ gotoLine()

bool gotoLine ( size_t lineNo) const
protected

◆ handleCommand()

bool handleCommand ( Command cmd) const
overrideprotectedvirtual

Handle a command in the editor.

Parameters
cmdThe command to handle.
Returns
True if the command was handled, false otherwise.

Implements ITextEditor.

◆ insertChars() [1/2]

static int32_t insertChars ( const TextEditorView * self,
size_t pos,
const CharT * text,
size_t num )
inlinestatic

◆ insertChars() [2/2]

int32_t insertChars ( size_t pos,
const CharT * text,
size_t num ) const

◆ layout() [1/2]

static void layout ( StbTexteditRow * row,
const TextEditorView * self,
size_t start_i )
inlinestatic

◆ layout() [2/2]

void layout ( StbTexteditRow * row,
size_t start_i ) const

◆ looseFocus()

void looseFocus ( )
overridevirtual

called if view should loose focus

Reimplemented from CView.

◆ moveToWordNext() [1/2]

static int moveToWordNext ( const TextEditorView * self,
size_t pos )
inlinestatic

◆ moveToWordNext() [2/2]

size_t moveToWordNext ( size_t pos) const

◆ moveToWordPrevious() [1/2]

static int moveToWordPrevious ( const TextEditorView * self,
size_t pos )
inlinestatic

◆ moveToWordPrevious() [2/2]

size_t moveToWordPrevious ( size_t pos) const

◆ onKeyboardEvent()

void onKeyboardEvent ( KeyboardEvent & event)
overridevirtual

called when a keyboard event is dispatched to this view

This happens normally only if the view is the focus view.

Reimplemented from CView.

◆ onMouseCancelEvent()

void onMouseCancelEvent ( MouseCancelEvent & event)
overridevirtual

called when mouse tracking should be canceled

Reimplemented from CView.

◆ onMouseDownEvent()

void onMouseDownEvent ( MouseDownEvent & event)
overridevirtual

called when a mouse down event occurs

Reimplemented from CView.

◆ onMouseEnterEvent()

void onMouseEnterEvent ( MouseEnterEvent & event)
overridevirtual

called when the mouse enters this view

Reimplemented from CView.

◆ onMouseExitEvent()

void onMouseExitEvent ( MouseExitEvent & event)
overridevirtual

called when the mouse leaves this view

Reimplemented from CView.

◆ onMouseMoveEvent()

void onMouseMoveEvent ( MouseMoveEvent & event)
overridevirtual

called when a mouse move event occurs

Reimplemented from CView.

◆ onMouseUpEvent()

void onMouseUpEvent ( MouseUpEvent & event)
overridevirtual

called when a mouse up event occurs

Reimplemented from CView.

◆ parentSizeChanged()

void parentSizeChanged ( )
overridevirtual

notification that one of the views parent has changed its size

Reimplemented from CView.

◆ readText()

bool readText ( size_t startOffset,
size_t length,
const ReadCallbackFunc & callback ) const
overrideprotectedvirtual

Get access to the internal string buffer of the text editor.

The callback is called synchronously within this call. The text passed to the callback is only valid inside the callback.

Parameters
startOffsetOffset into the buffer in number of characters
lengthNumber of characters
callbackThe callback which receives the text
Returns
True if the callback was called, false otherwise

Implements IEditorExt.

◆ redo()

static void redo ( const TextEditorView * self)
inlinestatic

◆ removed()

bool removed ( CView * parent)
overridevirtual

view is removed from parent view

Parameters
parentparent view
Returns
true if view successfully removed from parent

Reimplemented from CView.

◆ resetController()

void resetController ( ) const
overrideprotectedvirtual

Reset the controller associated with this text editor.

Implements ITextEditor.

◆ selectAll()

void selectAll ( ) const
protected

◆ setCommandKeyBinding()

bool setCommandKeyBinding ( Command cmd,
char32_t character,
VirtualKey virt,
Modifiers modifiers ) const
overrideprotectedvirtual

Set a key binding for a command.

Parameters
cmdThe command to bind.
characterThe character to bind.
virtThe virtual key code.
modifiersThe key modifiers.
Returns
True if the key binding was set, false otherwise.

Implements ITextEditor.

◆ setFindOptions()

void setFindOptions ( FindOptions opt) const
overrideprotectedvirtual

Set the find options for searching text.

Parameters
optThe find options to set.

Implements ITextEditor.

◆ setFindString()

void setFindString ( std::string_view utf8Text) const
overrideprotectedvirtual

Set the string to search for.

Parameters
utf8TextThe search string as a UTF-8 string view.

Implements ITextEditor.

◆ setPlainText()

bool setPlainText ( std::string_view utf8Text,
bool clearSelection ) const
overrideprotectedvirtual

Set the plain text content of the editor.

Parameters
utf8TextThe new text to set, as a UTF-8 string view.
clearSelectionIf true, clears the current selection after setting the text.
Returns
True if the text was set successfully, false otherwise.

Implements ITextEditor.

◆ setStyle()

void setStyle ( const Style & style) const
overrideprotectedvirtual

Set the style of the text editor.

Parameters
styleThe style configuration to apply.

Implements ITextEditor.

◆ showFindPanel()

bool showFindPanel ( ) const
protected

◆ takeFocus()

void takeFocus ( )
overridevirtual

called if view should take focus

Reimplemented from CView.

◆ undo()

static void undo ( const TextEditorView * self)
inlinestatic

◆ useSelectionForFind()

bool useSelectionForFind ( ) const
protected

◆ viewOnEvent()

void viewOnEvent ( CView * view,
Event & event )
overridevirtual

called on an event on a view

whenever an event is dispatched to a view, the listener will be notified about it and can mark the event as consumed if necessary to prevent that the event is handled by the view and further dispatched in the view hierarchy.

Implements IViewEventListener.


The documentation for this struct was generated from the following file: