summaryrefslogtreecommitdiffstats
path: root/gui/objects.hpp
diff options
context:
space:
mode:
authorthat <github@that.at>2015-02-25 08:52:19 +0100
committerDees Troy <dees_troy@teamw.in>2015-03-05 04:46:10 +0100
commit0af779569095af43a2762843f40d2d5e88168bf9 (patch)
tree6fb324919992edc103f441303098ce1dedef03f9 /gui/objects.hpp
parentminuitwrp: fix crash issue, when the console use TTF font to display unicode font. (diff)
downloadandroid_bootable_recovery-0af779569095af43a2762843f40d2d5e88168bf9.tar
android_bootable_recovery-0af779569095af43a2762843f40d2d5e88168bf9.tar.gz
android_bootable_recovery-0af779569095af43a2762843f40d2d5e88168bf9.tar.bz2
android_bootable_recovery-0af779569095af43a2762843f40d2d5e88168bf9.tar.lz
android_bootable_recovery-0af779569095af43a2762843f40d2d5e88168bf9.tar.xz
android_bootable_recovery-0af779569095af43a2762843f40d2d5e88168bf9.tar.zst
android_bootable_recovery-0af779569095af43a2762843f40d2d5e88168bf9.zip
Diffstat (limited to '')
-rw-r--r--gui/objects.hpp15
1 files changed, 8 insertions, 7 deletions
diff --git a/gui/objects.hpp b/gui/objects.hpp
index 0f853ac59..d5c3b2738 100644
--- a/gui/objects.hpp
+++ b/gui/objects.hpp
@@ -533,12 +533,14 @@ protected:
// derived classes need to implement these
// get number of items
virtual size_t GetItemCount() { return 0; }
- // get data for one item
- virtual int GetListItem(size_t item_index, ImageResource*& icon, std::string &text)
- { icon = NULL; text = ""; return -1; }
+ // render a single item in rect (mRenderX, yPos, mRenderW, actualItemHeight)
+ virtual void RenderItem(size_t itemindex, int yPos, bool selected);
// an item was selected
virtual void NotifySelect(size_t item_selected) {}
+ // render a standard-layout list item with optional icon and text
+ void RenderStdItem(int yPos, bool selected, ImageResource* icon, const char* text, int iconAndTextH = 0);
+
enum { NO_ITEM = (size_t)-1 };
// returns item index at coordinates or NO_ITEM if there is no item there
size_t HitTestItem(int x, int y);
@@ -562,7 +564,6 @@ protected:
// Background
COLOR mBackgroundColor;
ImageResource* mBackground; // background image, if any, automatically centered
- int mBackgroundW, mBackgroundH; // background width and height if using an image for the background
// Header
COLOR mHeaderBackgroundColor;
@@ -630,7 +631,7 @@ public:
virtual void SetPageFocus(int inFocus);
virtual size_t GetItemCount();
- virtual int GetListItem(size_t item_index, ImageResource*& icon, std::string &text);
+ virtual void RenderItem(size_t itemindex, int yPos, bool selected);
virtual void NotifySelect(size_t item_selected);
protected:
@@ -685,7 +686,7 @@ public:
virtual void SetPageFocus(int inFocus);
virtual size_t GetItemCount();
- virtual int GetListItem(size_t item_index, ImageResource*& icon, std::string &text);
+ virtual void RenderItem(size_t itemindex, int yPos, bool selected);
virtual void NotifySelect(size_t item_selected);
protected:
@@ -721,7 +722,7 @@ public:
virtual void SetPageFocus(int inFocus);
virtual size_t GetItemCount();
- virtual int GetListItem(size_t item_index, ImageResource*& icon, std::string &text);
+ virtual void RenderItem(size_t itemindex, int yPos, bool selected);
virtual void NotifySelect(size_t item_selected);
protected: