mirror of
https://github.com/apache/nuttx-apps.git
synced 2025-10-24 20:01:35 +08:00
Squashed commit of the following:
apps/graphics/twm4nx: Try to improve icon text spacing. Not noticeably better, however.
apps/graphics: Split long icon title on two lines below the icon image.
apps/graphics/twm4nx: Both iconification and de-iconification work.
apps/graphics/twm4nx: Various fixed toward de-iconifying a window. Progress but still not there yet.
This commit is contained in:
@@ -169,6 +169,11 @@ namespace NXWidgets
|
||||
|
||||
nxgl_coord_t getStringWidth(const CNxString &text) const;
|
||||
|
||||
inline nxgl_coord_t getStringWidth(FAR const CNxString *text) const
|
||||
{
|
||||
return getStringWidth(*text);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the width of a portion of a string in pixels when drawn with this
|
||||
* font.
|
||||
@@ -179,9 +184,15 @@ namespace NXWidgets
|
||||
* @return The width of the substring in pixels.
|
||||
*/
|
||||
|
||||
nxgl_coord_t getStringWidth(const CNxString& text,
|
||||
nxgl_coord_t getStringWidth(const CNxString &text,
|
||||
int startIndex, int length) const;
|
||||
|
||||
inline nxgl_coord_t getStringWidth(FAR const CNxString *text,
|
||||
int startIndex, int length) const
|
||||
{
|
||||
return getStringWidth(*text, startIndex, length);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets font metrics for a particular character
|
||||
*
|
||||
|
||||
@@ -257,6 +257,11 @@ namespace NXWidgets
|
||||
|
||||
void setText(const CNxString &text);
|
||||
|
||||
inline void setText(FAR const CNxString *text)
|
||||
{
|
||||
setText(*text);
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the text in the string.
|
||||
*
|
||||
@@ -433,7 +438,7 @@ namespace NXWidgets
|
||||
* substring.
|
||||
*/
|
||||
|
||||
CNxString *subString(int startIndex) const;
|
||||
FAR CNxString *subString(int startIndex) const;
|
||||
|
||||
/**
|
||||
* Get a substring from this string. It is the responsibility of the
|
||||
@@ -445,7 +450,7 @@ namespace NXWidgets
|
||||
* substring.
|
||||
*/
|
||||
|
||||
CNxString *subString(int startIndex, int length) const;
|
||||
FAR CNxString *subString(int startIndex, int length) const;
|
||||
|
||||
/**
|
||||
* Overloaded assignment operator. Copies the data within the argument
|
||||
|
||||
Reference in New Issue
Block a user