neutrino: let menus resize to the needed dimension

Instead of letting the caller of the menuewidget specify the
dimensions, determine them based on the text that is to be
displayed.

git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@226 e54a6e83-5905-42d5-8d5c-058d10e6a962
This commit is contained in:
seife
2010-01-30 16:48:13 +00:00
parent 61bd99e27f
commit 7148987625
2 changed files with 41 additions and 8 deletions

View File

@@ -264,6 +264,7 @@ class CMenuOptionChooser : public CAbstractMenuOptionChooser
void setOptionValue(const int newvalue);
int getOptionValue(void) const;
int getWidth(void) const;
int paint(bool selected, bool last = 0);
@@ -332,6 +333,7 @@ class CMenuWidget : public CMenuTarget
std::vector<unsigned int> page_start;
std::string iconfile;
int needed_width;
int width;
int height;
int wanted_height;
@@ -349,6 +351,7 @@ class CMenuWidget : public CMenuTarget
public:
CMenuWidget();
/* TODO: mwidth and mheight are not used anymore. remove if nobody misses them */
CMenuWidget(const char* Name, const std::string & Icon = "", const int mwidth = 400, const int mheight = 576);
CMenuWidget(const neutrino_locale_t Name, const std::string & Icon = "", const int mwidth = 400, const int mheight = 576);
~CMenuWidget();