mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-30 00:41:09 +02:00
CComponentsItem/Form: add var for real item position
If items are used in forms it can be usefully to have a variable
which contains the real position on screen.
This can happen e.g. if an item contains separate render methods, because within forms
usual x/y values related to form dimensions and be converted.
Origin commit data
------------------
Branch: ni/coolstream
Commit: 62efe2cb59
Author: Thilo Graf <dbt@novatux.de>
Date: 2013-04-10 (Wed, 10 Apr 2013)
------------------
This commit was generated by Migit
This commit is contained in:
@@ -32,7 +32,7 @@
|
||||
#include <string>
|
||||
#include <driver/pictureviewer/pictureviewer.h>
|
||||
|
||||
// #define DEBUG_CC
|
||||
//#define DEBUG_CC
|
||||
|
||||
class CComponents
|
||||
{
|
||||
@@ -98,6 +98,9 @@ class CComponentsItem : public CComponents
|
||||
protected:
|
||||
int cc_item_type;
|
||||
int cc_item_index;
|
||||
|
||||
///contains real position and dimensions on screen,
|
||||
int cc_item_xr, cc_item_yr;
|
||||
|
||||
void hideCCItem(bool no_restore = false);
|
||||
void paintInit(bool do_save_bg);
|
||||
@@ -105,6 +108,9 @@ class CComponentsItem : public CComponents
|
||||
|
||||
public:
|
||||
CComponentsItem();
|
||||
|
||||
///sets real position on screen. Use this, if item contains own render methods and item is added to a form
|
||||
virtual void setRealPos(const int& xr, const int& yr){cc_item_xr = xr; cc_item_yr = yr;};
|
||||
|
||||
virtual void paint(bool do_save_bg = CC_SAVE_SCREEN_YES) = 0;
|
||||
virtual void hide(bool no_restore = false);
|
||||
|
Reference in New Issue
Block a user