VSTGUI: IEditorExt Struct Reference

VSTGUI 4.10 Graphical User Interface Framework not only for VST plugins

Loading...
Searching...
No Matches
Public Types | Public Member Functions | List of all members
IEditorExt Struct Referenceabstract
New classes » Version 4.15

Extension to ITextEditor, use a dynamic_cast to get it from an ITextEditor. More...

`#include <ctexteditor.h>`

Inheritance diagram for IEditorExt:

## Public Types
using | ReadCallbackFunc = std::function<void (std::u32string_view text)>

## Public Member Functions
virtual bool | readText (size_t startOffset, size_t length, const ReadCallbackFunc &callback) const =0
| Get access to the internal string buffer of the text editor.
virtual size_t | getTextLength () const =0
| Get the length of the text.

## Detailed Description

Extension to ITextEditor, use a dynamic_cast to get it from an ITextEditor.

## Member Typedef Documentation

## ◆ ReadCallbackFunc

using ReadCallbackFunc = std::function<void (std::u32string_view text)>

## Member Function Documentation

## ◆ getTextLength()

virtual size_t getTextLength | ( |  | ) | const
| pure virtual

Get the length of the text.

Returns
  number of characters

Implemented in TextEditorView.

## ◆ readText()

virtual bool readText | ( | size_t | startOffset,
|  | size_t | length,
|  | const ReadCallbackFunc & | callback ) const
| pure virtual

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

  startOffset | Offset into the buffer in number of characters
  length | Number of characters
  callback | The callback which receives the text

Returns
  True if the callback was called, false otherwise

Implemented in TextEditorView.

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

- ctexteditor.h