titrmlib

A curses-style TUI library for the TI-84 Plus CE. Panels, widgets, scenes, dialogs, colors and text styles for CE C programs.

View the Project on GitHub gavinhsmith/titrmlib

Input

Keys and the events delivered to the app.

Classes

Name Description
term_event_t An event passed to the update function.

Enumerations

Name Description
term_key_t Keys, as delivered in term_event_t.key.
term_event_type_t Kinds of event passed to the handlers.

term_key_t

enum term_key_t

Defined in src/titrm.h:145

Keys, as delivered in term_event_t.key.

Value Description
TERM_KEY_NONE  
TERM_KEY_UP  
TERM_KEY_DOWN  
TERM_KEY_LEFT  
TERM_KEY_RIGHT  
TERM_KEY_ENTER  
TERM_KEY_CLEAR  
TERM_KEY_DEL  
TERM_KEY_2ND  
TERM_KEY_MODE  
TERM_KEY_VARS [vars]: an ordinary key; the app decides what it does
TERM_KEY_F1 [y=]; F2-F5 are [window] [zoom] [trace] [graph]
TERM_KEY_F2  
TERM_KEY_F3  
TERM_KEY_F4  
TERM_KEY_F5  
TERM_KEY_ALPHA [alpha], after the alpha state changed; see term_alpha_mode()
TERM_KEY_CHAR a printable character; see term_event_t.ch

term_event_type_t

enum term_event_type_t

Defined in src/titrm.h:173

Kinds of event passed to the handlers.

Events go to the focused widget first (keys only), then the active scene’s handler, then the global handler given to term_run(), stopping at the first handler that returns true. The scene events go only to that scene’s handler.

| Value | Description | |——-|————-| | TERM_EV_START | once, before the first frame | | TERM_EV_KEY | a key the focused widget did not consume | | TERM_EV_TICK | the interval set with term_set_tick() elapsed | | TERM_EV_SUBMIT | the user confirmed with [enter]: an input, or a list item (value = index) | | TERM_EV_CHANGE | the user changed a widget: list selection moved (value = index) or input text edited | | TERM_EV_FOCUS_LOST | the focused panel was hidden, destroyed (panel = NULL) or left behind by a scene switch; focus is now empty | | TERM_EV_SCENE_ENTER | to a scene’s handler: the scene became active (panel = the scene) | | TERM_EV_SCENE_LEAVE | to a scene’s handler: another scene became active (panel = this scene) |

Typedefs

Return Name Description
bool(*) term_update_fn An event handler: the global one given to term_run(), or a scene’s.

term_update_fn

using term_update_fn = bool(*)

Defined in src/titrm.h:199

An event handler: the global one given to term_run(), or a scene’s.

Return true if the event was handled, so it goes no further along the chain; false to let the next handler see it.

Functions

Return Name Description
int term_alpha_mode Alpha state, for status displays: 0 = off, 1 = next key only, 2 = locked.

term_alpha_mode

int term_alpha_mode(const term_ctx_t * ctx)

Defined in src/titrm.h:206

Alpha state, for status displays: 0 = off, 1 = next key only, 2 = locked.

[alpha] arms it, [2nd][alpha] locks it. Letters come out upper case.

Class Definitions

term_event_t

#include <titrm.h>
struct term_event_t

Defined in src/titrm.h:185

An event passed to the update function.

Public Attributes

Return Name Description
term_event_type_t type what happened
term_key_t key TERM_EV_KEY
char ch TERM_EV_KEY with TERM_KEY_CHAR: typed character
term_panel_t * panel widget events: the source. key events: focused panel
int value TERM_EV_SUBMIT and TERM_EV_CHANGE from a list: item index

type
term_event_type_t type

Type: term_event_type_t

Defined in src/titrm.h:186

what happened


key
term_key_t key

Type: term_key_t

Defined in src/titrm.h:187

TERM_EV_KEY


ch
char ch

Defined in src/titrm.h:188

TERM_EV_KEY with TERM_KEY_CHAR: typed character


panel
term_panel_t * panel

Type: term_panel_t *

Defined in src/titrm.h:189

widget events: the source. key events: focused panel


value
int value

Defined in src/titrm.h:190

TERM_EV_SUBMIT and TERM_EV_CHANGE from a list: item index