A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://technical.swissmicros.com/dmcp/doc/DMCP-ifc-html/group__lcd__text.html below:

DMCP interface: Text functions

Loading...

Searching...

No Matches

LCD text functions. More...

#define  NR2T(x)   Toggle font number to TT font number.
  #define  T2NR(x)   Toggle TT font number to font number.
  #define  lcd_printAt(ds, ln, ...)   Jump to line ln and print formatted string.
  #define  lcd_printR(ds, ...)   Print formatted string inversely at current line.
  #define  lcd_printRAt(ds, ln, ...)   Jump to line ln and print formatted string inversely.
  #define  lcd_puts   lcd_writeText   Shortcut for lcd_writeText()
  #define  lcd_putsAt(ds, ln, str)   Jump to line ln and print string.
  #define  lcd_putsR(ds, str)   Print string inversely at current line.
  #define  lcd_putsRAt(ds, ln, str)   Jump to line ln and print string inversely.
  void  lcd_writeNl (disp_stat_t *ds)   Jump to next line.
  void  lcd_prevLn (disp_stat_t *ds)   Jump to previous line.
  void  lcd_writeClr (disp_stat_t *ds)   Jump to first line.
  void  lcd_setLine (disp_stat_t *ds, int ln_nr)   Jump to given line.
  void  lcd_setXY (disp_stat_t *ds, int x, int y)   Jump to pixel position (x,y)
  int  lcd_lineHeight (disp_stat_t *ds)   Returns line height.
  int  lcd_baseHeight (disp_stat_t *ds)   Returns baseline position.
  int  lcd_fontWidth (disp_stat_t *ds)   Returns width of font.
  void  lcd_writeText (disp_stat_t *ds, const char *text)   Display text.
  void  lcd_textToBox (disp_stat_t *ds, int x, int width, char *text, int from_right, int align_right)   Display text in confined area.
  int  lcd_textWidth (disp_stat_t *ds, const char *text)   Calculates width of text.
  int  lcd_charWidth (disp_stat_t *ds, int c)   Returns width of character.
  int  lcd_textToWidth (disp_stat_t *ds, const char *text, int expected_width, int *plen)   Determines which part of text fits in expected_width.
  int  lcd_textToWidthR (disp_stat_t *ds, const char *text, int expected_width, int *plen)   Determines which part of text from the end of the string fits in expected_width.
  void  lcd_writeTextWidth (disp_stat_t *ds, const char *text)   Updates display state as if lcd_writeText() was be called.
  int  lcd_textForWidth (disp_stat_t *ds, const char *text, int expected_width, int *plen)   Calculate text width without breaking words
  int  lcd_nextFontNr (int nr)   Get next (bigger) font number.
  int  lcd_prevFontNr (int nr)   Get previous (smaller) font number.
  void  lcd_switchFont (disp_stat_t *ds, int nr)   Set current font to given font number.
  int  lcd_toggleFontT (int nr)   Toggle font number between normal and TT font.
  void  lcd_print (disp_stat_t *ds, const char *fmt,...)   Print formatted string.
 

LCD text functions.

◆ lcd_printAt #define lcd_printAt ( ds, ln, ... ) Value:

void lcd_print(disp_stat_t *ds, const char *fmt,...)

Print formatted string.

void lcd_setLine(disp_stat_t *ds, int ln_nr)

Jump to given line.

Jump to line ln and print formatted string.

Parameters
ds Display state ln Line number
◆ lcd_printR #define lcd_printR ( ds, ... ) Value: do

{ ds->inv=1;

lcd_print

(ds, __VA_ARGS__); ds->inv=0; }

while

(0)

Print formatted string inversely at current line.

Parameters
◆ lcd_printRAt #define lcd_printRAt ( ds, ln, ... ) Value:

Jump to line ln and print formatted string inversely.

Parameters
ds Display state ln Line number
◆ lcd_putsAt #define lcd_putsAt ( ds, ln, str ) Value:

#define lcd_puts

Shortcut for lcd_writeText()

Definition dmcp.h:811

Jump to line ln and print string.

Parameters
ds Display state ln Line number str String to print
◆ lcd_putsR #define lcd_putsR ( ds, str ) Value: do

{ ds->inv=1;

lcd_puts

(ds,str); ds->inv=0; }

while

(0)

Print string inversely at current line.

Parameters
ds Display state str String to print
◆ lcd_putsRAt #define lcd_putsRAt ( ds, ln, str ) Value:

Jump to line ln and print string inversely.

Parameters
ds Display state ln Line number str String to print
◆ NR2T Value:

Toggle font number to TT font number.

◆ T2NR Value:

Toggle TT font number to font number.

◆ lcd_baseHeight()

Returns baseline position.

Parameters
Returns
Baseline position
◆ lcd_charWidth()

Returns width of character.

Parameters
ds Display state c Character
Returns
Width of character
◆ lcd_fontWidth()

Returns width of font.

Parameters
Returns
Font width
◆ lcd_lineHeight()

Returns line height.

Parameters
Returns
Line height
◆ lcd_nextFontNr() int lcd_nextFontNr ( int nr )

Get next (bigger) font number.

Returns
Next font number

It returns the same number for biggest font.

◆ lcd_prevFontNr() int lcd_prevFontNr ( int nr )

Get previous (smaller) font number.

Returns
Previous font number

It returns the same number for smallest font.

◆ lcd_prevLn()

Jump to previous line.

Parameters
◆ lcd_print() void lcd_print ( disp_stat_t * ds, const char * fmt, ... )

Print formatted string.

Parameters
ds Display state fmt Printf like format
◆ lcd_setLine()

Jump to given line.

Parameters
ds Display state ln_nr Line number
◆ lcd_setXY()

Jump to pixel position (x,y)

Parameters
ds Display state x X position y Y position
◆ lcd_switchFont()

Set current font to given font number.

Parameters
ds Display state nr Font number
◆ lcd_textForWidth() int lcd_textForWidth ( disp_stat_t * ds, const char * text, int expected_width, int * plen )

Calculate text width without breaking words

Parameters
ds Display state text Text expected_width Expected width plen (optional, out) Width of text which fits into expected_width. Could be NULL.
Returns
Index of character which breaks the space limit. Returns strlen(text) if whole text fits into expected_width.

Gets text which fits in expected width without breaking words. Word could be broken in the middle only if single long word is placed on whole line. It means it is possible to get empty string if ds->x is non-zero.

◆ lcd_textToBox() void lcd_textToBox ( disp_stat_t * ds, int x, int width, char * text, int from_right, int align_right )

Display text in confined area.

Parameters
ds Display state x X position width X width text Text from_right (0/1) 1 - end of text is displayed align_right (0/1) 1 - text is aligned to the right

Current line is used.

Only part of the text is displayed if it doesn't fit into given area. Ellipsis is displayed in place of text omission.

Note that due to implementation limitation the text has to be in RAM.

◆ lcd_textToWidth() int lcd_textToWidth ( disp_stat_t * ds, const char * text, int expected_width, int * plen )

Determines which part of text fits in expected_width.

Parameters
ds Display state text Text expected_width Expected width plen (optional, out) Width of text which fits into expected_width. Could be NULL.
Returns
Index of character which breaks the space limit. Returns strlen(text) if whole text fits into expected_width.
◆ lcd_textToWidthR() int lcd_textToWidthR ( disp_stat_t * ds, const char * text, int expected_width, int * plen )

Determines which part of text from the end of the string fits in expected_width.

Parameters
ds Display state text Text expected_width Expected width plen (optional, out) Width of text which fits into expected_width. Could be NULL.
Returns
Index of character which breaks the space limit. Returns -1 if whole text fits into expected_width.
◆ lcd_textWidth() int lcd_textWidth ( disp_stat_t * ds, const char * text )

Calculates width of text.

Parameters
ds Display state text Text
Returns
Width of text
◆ lcd_toggleFontT() int lcd_toggleFontT ( int nr )

Toggle font number between normal and TT font.

Returns
Toggled font number
◆ lcd_writeClr()

Jump to first line.

Parameters
◆ lcd_writeNl()

Jump to next line.

Parameters
◆ lcd_writeText() void lcd_writeText ( disp_stat_t * ds, const char * text )

Display text.

Parameters
ds Display state text Text

Displays text according to display state ds. Which specifies position, font, background handling, etc.

◆ lcd_writeTextWidth() void lcd_writeTextWidth ( disp_stat_t * ds, const char * text )

Updates display state as if lcd_writeText() was be called.

Parameters
ds Display state text Text

Advances ds->x only. Doesn't print anything.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4