VSTGUI: VSTGUI::TextEditor Namespace Reference

VSTGUI 4.10 Graphical User Interface Framework not only for VST plugins

Loading...
Searching...
No Matches
Classes | Typedefs | Functions | Variables
VSTGUI::TextEditor Namespace Reference

## Classes
struct | FindPanelController
struct | Key
struct | Line
struct | LineNumberView
struct | NewLineProcessor
struct | Range
struct | STB_TexteditState
struct | StbFindState
struct | StbTexteditRow
struct | StbUndoRecord
struct | StbUndoState
struct | TextEditorView
struct | TextModel

## Typedefs
using | CharT = char32_t
using | StringConvert = std::wstring_convert<std::codecvt_utf8<CharT>, CharT>
using | String = std::u32string
using | StringView = std::u32string_view
using | Lines = std::vector<Line>
using | CommandKeyArray = std::array<Key, static_cast<size_t> (ITextEditor::Command::TakeFocus) + 1>

## Functions
std::u32string | convert (const char *text, size_t numChars)
std::u32string | convert (const std::string &str)
std::string | convert (const char32_t *text, size_t numChars)
std::string | convert (const std::u32string &str)
bool | operator== (const Range &r1, const Range &r2)
bool | operator!= (const Range &r1, const Range &r2)
Range | makeRange (size_t start, size_t end)
Range | makeRange (const STB_TexteditState &state)
size_t | replaceTabs (std::string &str, uint32_t tabWidth, size_t lineOffset)
void | convertWinLineEndingsToUnixLineEndings (String &text)
bool | isStopChar (char32_t character)
static int | stb_text_locate_coord (const TextEditorView *str, float x, float y)
static void | stb_textedit_click (const TextEditorView *str, STB_TexteditState *state, float x, float y)
static void | stb_textedit_drag (const TextEditorView *str, STB_TexteditState *state, float x, float y)
static void | stb_text_undo (const TextEditorView *str, STB_TexteditState *state)
static void | stb_text_redo (const TextEditorView *str, STB_TexteditState *state)
static void | stb_text_makeundo_delete (const TextEditorView *str, STB_TexteditState *state, int where, int length)
static void | stb_text_makeundo_insert (const TextEditorView *str, STB_TexteditState *state, int where, int length)
static void | stb_text_makeundo_replace (const TextEditorView *str, STB_TexteditState *state, int where, int old_length, int new_length)
static void | stb_textedit_find_charpos (StbFindState *find, const TextEditorView *str, int n, int single_line)
static void | stb_textedit_clamp (const TextEditorView *str, STB_TexteditState *state)
static void | stb_textedit_delete (const TextEditorView *str, STB_TexteditState *state, int where, int len)
static void | stb_textedit_delete_selection (const TextEditorView *str, STB_TexteditState *state)
static void | stb_textedit_sortselection (STB_TexteditState *state)
static void | stb_textedit_move_to_first (STB_TexteditState *state)
static void | stb_textedit_move_to_last (const TextEditorView *str, STB_TexteditState *state)
static void | stb_textedit_prep_selection_at_cursor (STB_TexteditState *state)
static int | stb_textedit_cut (const TextEditorView *str, STB_TexteditState *state)
static int | stb_textedit_paste_internal (const TextEditorView *str, STB_TexteditState *state, CharT *text, int len)
static void | stb_textedit_key (const TextEditorView *str, STB_TexteditState *state, uint32_t key)
static CharT * | stb_text_createundo (const TextEditorView *str, StbUndoState *state, int pos, int insert_len, int delete_len)
static void | stb_textedit_clear_state (STB_TexteditState *state, int is_single_line)
static void | stb_textedit_initialize_state (STB_TexteditState *state, int is_single_line)
static int | stb_textedit_paste (const TextEditorView *str, STB_TexteditState *state, CharT const *ctext, int len)
static constexpr size_t | Index (ITextEditor::Command cmd)
Range | toLineSelection (const Range &line, size_t selStart, size_t selEnd)
template<bool forward, typename iterator_t>
bool | findStopChar (iterator_t &it, iterator_t end)

## Variables
static constexpr CPoint | MouseOutsidePos

## Typedef Documentation

## ◆ CharT

using CharT = char32_t

## ◆ CommandKeyArray

using CommandKeyArray = std::array<Key, static_cast<size_t> (ITextEditor::Command::TakeFocus) + 1>

## ◆ Lines

using Lines = std::vector<Line>

## ◆ String

using String = std::u32string

## ◆ StringConvert

using StringConvert = std::wstring_convert<std::codecvt_utf8<CharT>, CharT>

## ◆ StringView

using StringView = std::u32string_view

## Function Documentation

## ◆ convert() [1/4]

std::u32string convert | ( | const char * | text,
|  | size_t | numChars )
| inline

## ◆ convert() [2/4]

std::string convert | ( | const char32_t * | text,
|  | size_t | numChars )
| inline

## ◆ convert() [3/4]

std::u32string convert | ( | const std::string & | str | ) |
| inline

## ◆ convert() [4/4]

std::string convert | ( | const std::u32string & | str | ) |
| inline

## ◆ convertWinLineEndingsToUnixLineEndings()

void convertWinLineEndingsToUnixLineEndings | ( | String & | text | ) |
| inline

## ◆ findStopChar()

template<bool forward, typename iterator_t>

bool findStopChar | ( | iterator_t & | it,
|  | iterator_t | end )
| inline

## ◆ Index()

static constexpr size_t Index | ( | ITextEditor::Command | cmd | ) |
| staticconstexpr

## ◆ isStopChar()

bool isStopChar | ( | char32_t | character | ) |
| inline

## ◆ makeRange() [1/2]

Range makeRange | ( | const STB_TexteditState & | state | ) |
| inline

## ◆ makeRange() [2/2]

Range makeRange | ( | size_t | start,
|  | size_t | end )
| inline

## ◆ operator!=()

bool operator!= | ( | const Range & | r1,
|  | const Range & | r2 )

## ◆ operator==()

bool operator== | ( | const Range & | r1,
|  | const Range & | r2 )

## ◆ replaceTabs()

size_t replaceTabs | ( | std::string & | str,
|  | uint32_t | tabWidth,
|  | size_t | lineOffset )
| inline

## ◆ stb_text_createundo()

static CharT * stb_text_createundo | ( | const TextEditorView * | str,
|  | StbUndoState * | state,
|  | int | pos,
|  | int | insert_len,
|  | int | delete_len )
| static

## ◆ stb_text_locate_coord()

static int stb_text_locate_coord | ( | const TextEditorView * | str,
|  | float | x,
|  | float | y )
| static

## ◆ stb_text_makeundo_delete()

static void stb_text_makeundo_delete | ( | const TextEditorView * | str,
|  | STB_TexteditState * | state,
|  | int | where,
|  | int | length )
| static

## ◆ stb_text_makeundo_insert()

static void stb_text_makeundo_insert | ( | const TextEditorView * | str,
|  | STB_TexteditState * | state,
|  | int | where,
|  | int | length )
| static

## ◆ stb_text_makeundo_replace()

static void stb_text_makeundo_replace | ( | const TextEditorView * | str,
|  | STB_TexteditState * | state,
|  | int | where,
|  | int | old_length,
|  | int | new_length )
| static

## ◆ stb_text_redo()

static void stb_text_redo | ( | const TextEditorView * | str,
|  | STB_TexteditState * | state )
| static

## ◆ stb_text_undo()

static void stb_text_undo | ( | const TextEditorView * | str,
|  | STB_TexteditState * | state )
| static

## ◆ stb_textedit_clamp()

static void stb_textedit_clamp | ( | const TextEditorView * | str,
|  | STB_TexteditState * | state )
| static

## ◆ stb_textedit_clear_state()

static void stb_textedit_clear_state | ( | STB_TexteditState * | state,
|  | int | is_single_line )
| static

## ◆ stb_textedit_click()

static void stb_textedit_click | ( | const TextEditorView * | str,
|  | STB_TexteditState * | state,
|  | float | x,
|  | float | y )
| static

## ◆ stb_textedit_cut()

static int stb_textedit_cut | ( | const TextEditorView * | str,
|  | STB_TexteditState * | state )
| static

## ◆ stb_textedit_delete()

static void stb_textedit_delete | ( | const TextEditorView * | str,
|  | STB_TexteditState * | state,
|  | int | where,
|  | int | len )
| static

## ◆ stb_textedit_delete_selection()

static void stb_textedit_delete_selection | ( | const TextEditorView * | str,
|  | STB_TexteditState * | state )
| static

## ◆ stb_textedit_drag()

static void stb_textedit_drag | ( | const TextEditorView * | str,
|  | STB_TexteditState * | state,
|  | float | x,
|  | float | y )
| static

## ◆ stb_textedit_find_charpos()

static void stb_textedit_find_charpos | ( | StbFindState * | find,
|  | const TextEditorView * | str,
|  | int | n,
|  | int | single_line )
| static

## ◆ stb_textedit_initialize_state()

static void stb_textedit_initialize_state | ( | STB_TexteditState * | state,
|  | int | is_single_line )
| static

## ◆ stb_textedit_key()

static void stb_textedit_key | ( | const TextEditorView * | str,
|  | STB_TexteditState * | state,
|  | uint32_t | key )
| static

## ◆ stb_textedit_move_to_first()

static void stb_textedit_move_to_first | ( | STB_TexteditState * | state | ) |
| static

## ◆ stb_textedit_move_to_last()

static void stb_textedit_move_to_last | ( | const TextEditorView * | str,
|  | STB_TexteditState * | state )
| static

## ◆ stb_textedit_paste()

static int stb_textedit_paste | ( | const TextEditorView * | str,
|  | STB_TexteditState * | state,
|  | CharT const * | ctext,
|  | int | len )
| static

## ◆ stb_textedit_paste_internal()

static int stb_textedit_paste_internal | ( | const TextEditorView * | str,
|  | STB_TexteditState * | state,
|  | CharT * | text,
|  | int | len )
| static

## ◆ stb_textedit_prep_selection_at_cursor()

static void stb_textedit_prep_selection_at_cursor | ( | STB_TexteditState * | state | ) |
| static

## ◆ stb_textedit_sortselection()

static void stb_textedit_sortselection | ( | STB_TexteditState * | state | ) |
| static

## ◆ toLineSelection()

Range toLineSelection | ( | const Range & | line,
|  | size_t | selStart,
|  | size_t | selEnd )
| inline

## Variable Documentation

## ◆ MouseOutsidePos

CPoint MouseOutsidePos
| staticconstexpr

Initial value:
= {std::numeric_limits<CCoord>::max (),
std::numeric_limits<CCoord>::max ()}