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:
Gregory Nutt
2019-05-06 12:05:53 -06:00
parent 1879949cdc
commit 02c148e07e
7 changed files with 362 additions and 145 deletions

View File

@@ -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
*

View File

@@ -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