Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Label Class Reference
#include <Label.h>
Inherits Control.
Public Member Functions | |
| Label (int x, int y, int w, int h, Font *fnt) | |
| Create a Label object with the specified size, position, and font. | |
| virtual void | paint (Canvas *canvas) |
| Paint the Label on the specified canvas. | |
| int | posX () |
| Get the X coordinate of the control. | |
| void | posX (int x) |
| Set the X coordinate of the control. | |
| int | posY () |
| Get the Y coordinate of the control. | |
| void | posY (int y) |
| Set the Y coordinate of the control. | |
| int | width () |
| Get the width of the control. | |
| void | width (int w) |
| Set the width of the control. | |
| int | height () |
| Get the height of the control. | |
| void | height (int h) |
| Set the height of the control. | |
| int | margin () |
| Get the current margin width. | |
| void | margin (int m) |
| Set the margin width. | |
| int | border () |
| Get the current border width. | |
| void | border (int b) |
| Set the border width. | |
| int | padding () |
| Get the current padding width. | |
| void | padding (int p) |
| Set the padding width. | |
| int | contentPosX () |
| Get the X coordinate of the control's content area. | |
| int | contentPosY () |
| Get the Y coordinate of the control's content area. | |
| int | contentWidth () |
| Get the width of the control's content area. | |
| int | contentHeight () |
| Get the height of the control's content area. | |
| unsigned int | foreColor () |
| Get the foreground color. | |
| void | foreColor (unsigned int c) |
| Set the foreground color. | |
| unsigned int | backColor () |
| Get the background color. | |
| void | backColor (unsigned int c) |
| Set the background color. | |
| const char * | text () |
| Get the current text of the control. | |
| void | text (const char *text) |
| Set the text of the control. | |
| Font * | font () |
| Get the current font of the control. | |
| void | font (Font *fnt) |
| Set the font of the control. | |
| bool | invalid () |
| Determine whether the control needs to be repainted. | |
| void | invalidate () |
| Mark this control as invalid. | |
Detailed Description
Label class.
Used to display strings.
Definition at line 27 of file Label.h.
Constructor & Destructor Documentation
Member Function Documentation
| unsigned int backColor | ( | ) | [inherited] |
Get the background color.
- Returns:
- The background color as a 32-bit ARGB value.
Definition at line 184 of file Control.cpp.
| void backColor | ( | unsigned int | c ) | [inherited] |
Set the background color.
- Parameters:
-
c The new background color as a 32-bit ARGB value.
Definition at line 189 of file Control.cpp.
| int border | ( | ) | [inherited] |
Get the current border width.
- Returns:
- The current border width.
Definition at line 122 of file Control.cpp.
| void border | ( | int | b ) | [inherited] |
Set the border width.
- Parameters:
-
b The new border width.
Definition at line 127 of file Control.cpp.
| int contentHeight | ( | ) | [inherited] |
Get the height of the control's content area.
- Returns:
- The height of the control's content area.
Definition at line 165 of file Control.cpp.
| int contentPosX | ( | ) | [inherited] |
Get the X coordinate of the control's content area.
- Returns:
- The X coordinate of the control's content area.
Definition at line 150 of file Control.cpp.
| int contentPosY | ( | ) | [inherited] |
Get the Y coordinate of the control's content area.
- Returns:
- The Y coordinate of the control's content area.
Definition at line 155 of file Control.cpp.
| int contentWidth | ( | ) | [inherited] |
Get the width of the control's content area.
- Returns:
- The width of the control's content area.
Definition at line 160 of file Control.cpp.
| Font * font | ( | ) | [inherited] |
Get the current font of the control.
- Returns:
- The current font of the control.
Definition at line 212 of file Control.cpp.
| void font | ( | Font * | fnt ) | [inherited] |
Set the font of the control.
- Parameters:
-
fnt The new font.
Definition at line 217 of file Control.cpp.
| void foreColor | ( | unsigned int | c ) | [inherited] |
Set the foreground color.
- Parameters:
-
c The new foreground color as a 32-bit ARGB value.
Definition at line 175 of file Control.cpp.
| unsigned int foreColor | ( | ) | [inherited] |
Get the foreground color.
- Returns:
- The foreground color as a 32-bit ARGB value.
Definition at line 170 of file Control.cpp.
| void height | ( | int | h ) | [inherited] |
Set the height of the control.
- Parameters:
-
h The new height for the control.
Definition at line 99 of file Control.cpp.
| int height | ( | ) | [inherited] |
Get the height of the control.
- Returns:
- The height of the control.
Definition at line 94 of file Control.cpp.
| bool invalid | ( | ) | [inherited] |
Determine whether the control needs to be repainted.
- Returns:
- Whether or not the control needs to be repainted.
Definition at line 226 of file Control.cpp.
| void invalidate | ( | ) | [inherited] |
Mark this control as invalid.
Definition at line 231 of file Control.cpp.
| int margin | ( | ) | [inherited] |
Get the current margin width.
- Returns:
- The current margin width.
Definition at line 108 of file Control.cpp.
| void margin | ( | int | m ) | [inherited] |
Set the margin width.
- Parameters:
-
m The new margin width.
Definition at line 113 of file Control.cpp.
| int padding | ( | ) | [inherited] |
Get the current padding width.
- Returns:
- The current padding width.
Definition at line 136 of file Control.cpp.
| void padding | ( | int | p ) | [inherited] |
Set the padding width.
- Parameters:
-
p The new padding width.
Definition at line 141 of file Control.cpp.
| void paint | ( | Canvas * | canvas ) | [virtual] |
| void posX | ( | int | x ) | [inherited] |
Set the X coordinate of the control.
- Parameters:
-
x The new X coordinate for the control.
Definition at line 57 of file Control.cpp.
| int posX | ( | ) | [inherited] |
Get the X coordinate of the control.
- Returns:
- The X coordinate of the control.
Definition at line 52 of file Control.cpp.
| void posY | ( | int | y ) | [inherited] |
Set the Y coordinate of the control.
- Parameters:
-
y The new Y coordinate for the control.
Definition at line 71 of file Control.cpp.
| int posY | ( | ) | [inherited] |
Get the Y coordinate of the control.
- Returns:
- The Y coordinate of the control.
Definition at line 66 of file Control.cpp.
| const char * text | ( | ) | [inherited] |
Get the current text of the control.
- Returns:
- The current text of the control.
Definition at line 198 of file Control.cpp.
| void text | ( | const char * | text ) | [inherited] |
Set the text of the control.
- Parameters:
-
text The new text.
Definition at line 203 of file Control.cpp.
| int width | ( | ) | [inherited] |
Get the width of the control.
- Returns:
- The width of the control.
Definition at line 80 of file Control.cpp.
| void width | ( | int | w ) | [inherited] |
Set the width of the control.
- Parameters:
-
w The new width for the control.
Definition at line 85 of file Control.cpp.
Generated on Tue Jul 12 2022 21:38:03 by
1.7.2