1 #ifndef _GUISLICE_EX_XTEXTBOX_H_ 2 #define _GUISLICE_EX_XTEXTBOX_H_ 51 #define GSLC_TYPEX_TEXTBOX GSLC_TYPE_BASE_EXTEND + 4 54 #define GSLC_XTEXTBOX_CODE_COL_SET 187 55 #define GSLC_XTEXTBOX_CODE_COL_RESET 188 57 #define XTEXTBOX_REDRAW_NONE -1 58 #define XTEXTBOX_REDRAW_ALL -2 119 uint16_t nBufRows,uint16_t nBufCols);
219 #endif // __cplusplus 220 #endif // _GUISLICE_EX_XTEXTBOX_H_ int8_t nMarginX
Margin for text area within element rect (X)
Definition: XTextbox.h:68
uint8_t nChSizeY
Height of characters (pixels)
Definition: XTextbox.h:79
int8_t nMarginY
Margin for text area within element rect (Y)
Definition: XTextbox.h:69
gslc_teRedrawType
Redraw types.
Definition: GUIslice.h:370
gslc_tsElemRef * gslc_ElemXTextboxCreate(gslc_tsGui *pGui, int16_t nElemId, int16_t nPage, gslc_tsXTextbox *pXData, gslc_tsRect rElem, int16_t nFontId, char *pBuf, uint16_t nBufRows, uint16_t nBufCols)
Create a Textbox Element.
Definition: XTextbox.c:71
bool bWrapEn
Enable for line wrapping.
Definition: XTextbox.h:70
Extended data for Textbox element.
Definition: XTextbox.h:65
void gslc_ElemXTextboxAdd(gslc_tsGui *pGui, gslc_tsElemRef *pElemRef, char *pTxt)
Add a text string to the textbox.
Definition: XTextbox.c:383
uint8_t nBufPosY
Buffer Y position.
Definition: XTextbox.h:86
bool bScrollEn
Enable for scrollbar.
Definition: XTextbox.h:74
bool gslc_ElemXTextboxDraw(void *pvGui, void *pvElemRef, gslc_teRedrawType eRedraw)
Draw a Textbox element on the screen.
Definition: XTextbox.c:441
void gslc_ElemXTextboxScrollSet(gslc_tsGui *pGui, gslc_tsElemRef *pElemRef, uint8_t nScrollPos, uint8_t nScrollMax)
Set the textbox scroll position (nScrollPos) as a fraction of nScrollMax.
Definition: XTextbox.c:228
void gslc_ElemXTextboxReset(gslc_tsGui *pGui, gslc_tsElemRef *pElemRef)
Reset the contents of the textbox.
Definition: XTextbox.c:171
Rectangular region. Defines X,Y corner coordinates plus dimensions.
Definition: GUIslice.h:519
uint8_t nChSizeX
Width of characters (pixels)
Definition: XTextbox.h:78
void gslc_ElemXTextboxWrapSet(gslc_tsGui *pGui, gslc_tsElemRef *pElemRef, bool bWrapEn)
Enable or disable line wrap within textbox.
Definition: XTextbox.c:374
uint16_t nBufCols
Number of columns in buffer.
Definition: XTextbox.h:73
uint8_t nCurPosY
Cursor Y position.
Definition: XTextbox.h:84
char * pBuf
Ptr to the text buffer (circular buffer))
Definition: XTextbox.h:67
Element reference structure.
Definition: GUIslice.h:578
uint8_t nBufPosX
Buffer X position.
Definition: XTextbox.h:85
uint8_t nWndRowStart
First row of current window.
Definition: XTextbox.h:87
void gslc_ElemXTextboxColReset(gslc_tsGui *pGui, gslc_tsElemRef *pElemRef)
Insert a color reset code into the current buffer position.
Definition: XTextbox.c:358
void gslc_ElemXTextboxColSet(gslc_tsGui *pGui, gslc_tsElemRef *pElemRef, gslc_tsColor nCol)
Insert a color set code into the current buffer position.
Definition: XTextbox.c:330
uint8_t nCurPosX
Cursor X position.
Definition: XTextbox.h:83
GUI structure.
Definition: GUIslice.h:716
uint8_t nWndRows
Window Y size.
Definition: XTextbox.h:81
uint8_t nWndCols
Window X size.
Definition: XTextbox.h:80
uint16_t nScrollPos
Current scrollbar position.
Definition: XTextbox.h:75
Color structure. Defines RGB triplet.
Definition: GUIslice.h:534
uint16_t nBufRows
Number of rows in buffer.
Definition: XTextbox.h:72
int16_t nRedrawRow
Specific row to update in redraw (if not -1)
Definition: XTextbox.h:89