Loading...
Searching...
No Matches
text_box.h File Reference

GUI: TextBox view module API. More...

#include <gui/view.h>

Go to the source code of this file.

Typedefs

typedef struct TextBox TextBox
 TextBox anonymous structure.
 

Enumerations

enum  TextBoxFont { TextBoxFontText , TextBoxFontHex }
 
enum  TextBoxFocus { TextBoxFocusStart , TextBoxFocusEnd }
 

Functions

TextBoxtext_box_alloc (void)
 Allocate and initialize text_box.
 
void text_box_free (TextBox *text_box)
 Deinitialize and free text_box.
 
Viewtext_box_get_view (TextBox *text_box)
 Get text_box view.
 
void text_box_reset (TextBox *text_box)
 Clean text_box.
 
void text_box_set_text (TextBox *text_box, const char *text)
 Set text for text_box.
 
void text_box_set_font (TextBox *text_box, TextBoxFont font)
 Set TextBox font.
 
void text_box_set_focus (TextBox *text_box, TextBoxFocus focus)
 Set TextBox focus.
 

Detailed Description

GUI: TextBox view module API.

Function Documentation

◆ text_box_alloc()

TextBox * text_box_alloc ( void )

Allocate and initialize text_box.

Returns
TextBox instance

◆ text_box_free()

void text_box_free ( TextBox * text_box)

Deinitialize and free text_box.

Parameters
text_boxtext_box instance

◆ text_box_get_view()

View * text_box_get_view ( TextBox * text_box)

Get text_box view.

Parameters
text_boxTextBox instance
Returns
View instance that can be used for embedding

◆ text_box_reset()

void text_box_reset ( TextBox * text_box)

Clean text_box.

Parameters
text_boxTextBox instance

◆ text_box_set_focus()

void text_box_set_focus ( TextBox * text_box,
TextBoxFocus focus )

Set TextBox focus.

Note
Use to display from start or from end
Parameters
text_boxTextBox instance
focusTextBoxFocus instance

◆ text_box_set_font()

void text_box_set_font ( TextBox * text_box,
TextBoxFont font )

Set TextBox font.

Parameters
text_boxTextBox instance
fontTextBoxFont instance

◆ text_box_set_text()

void text_box_set_text ( TextBox * text_box,
const char * text )

Set text for text_box.

Parameters
text_boxTextBox instance
texttext to set