ObjectivelyMVC
Object oriented MVC framework for SDL3 and GNU C
Loading...
Searching...
No Matches
TextViewDelegate Struct Reference

The TextView delegate protocol. More...

#include <TextView.h>

Data Fields

Array *(* completionsForPrefix )(TextView *textView, const char *prefix)
 Delegate callback for auto-completing the text before the cursor with Tab.
 
ident data
 The Delegate user-data.
 
void(* didBeginEditing )(TextView *textView)
 Delegate callback for initiating text editing.
 
void(* didEdit )(TextView *textView)
 Delegate callback for text input events.
 
void(* didEndEditing )(TextView *textView)
 Delegate callback for finalizing text editing.
 
ident self
 The Delegate self-reference.
 

Detailed Description

The TextView delegate protocol.

Definition at line 44 of file TextView.h.

Field Documentation

◆ completionsForPrefix

Array *(* TextViewDelegate::completionsForPrefix) (TextView *textView, const char *prefix)

Delegate callback for auto-completing the text before the cursor with Tab.

Parameters
textViewThe TextView.
prefixThe text before the cursor.
Returns
The completions for prefix, in the order that Tab cycles through them, or NULL.
Remarks
Each completion SHOULD begin with prefix, as it replaces prefix. The TextView completes to the longest prefix the completions share, and then Tab and Shift+Tab cycle through them. The TextView releases the returned Array. If this is NULL, or returns NULL, an empty Array, or only prefix itself, Tab ends editing and advances, as it does for any other Control.

Definition at line 85 of file TextView.h.

◆ data

ident TextViewDelegate::data

The Delegate user-data.

Definition at line 54 of file TextView.h.

◆ didBeginEditing

void(* TextViewDelegate::didBeginEditing) (TextView *textView)

Delegate callback for initiating text editing.

Parameters
textViewThe TextView.

Definition at line 60 of file TextView.h.

◆ didEdit

void(* TextViewDelegate::didEdit) (TextView *textView)

Delegate callback for text input events.

Parameters
textViewThe TextView.

Definition at line 66 of file TextView.h.

◆ didEndEditing

void(* TextViewDelegate::didEndEditing) (TextView *textView)

Delegate callback for finalizing text editing.

Parameters
textViewThe TextView.

Definition at line 72 of file TextView.h.

◆ self

ident TextViewDelegate::self

The Delegate self-reference.

Definition at line 49 of file TextView.h.


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