mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-27 15:32:52 +02:00
CComponents: add new parameter 'parent'
Use strictly CComponentsForm as parent parameter in constructors.
Some parts have been cleaned up (Constructors, init methodes removed)
New parameter makes it possible already add current item in constructor.
So in mostly situations is it not necessary to use explicit addCCItem(),
but addCCItem()is still valid and necessary in certain situations.
Affected are all cc-classes and their derivates.
Some classes must or can be adapted later. The function is
not currently restricted, because usage of parent parameter is not explicit
defined in constructors, see CImageInfo, here yet are used addCCItem()
methodes.
Generally this parameter is located in the constructors before bool has_shadow,
but it is not sure whether it would be better to use this parameter as the first.
That remains to be clarified.
Origin commit data
------------------
Branch: ni/coolstream
Commit: 23d7b62cf0
Author: Thilo Graf <dbt@novatux.de>
Date: 2014-03-03 (Mon, 03 Mar 2014)
------------------
This commit was generated by Migit
This commit is contained in:
@@ -36,25 +36,6 @@ using namespace std;
|
||||
|
||||
//abstract basic class CComponents
|
||||
CComponents::CComponents()
|
||||
{
|
||||
initVarBasic();
|
||||
}
|
||||
|
||||
CComponents::~CComponents()
|
||||
{
|
||||
hide();
|
||||
clearSavedScreen();
|
||||
clearFbData();
|
||||
}
|
||||
|
||||
void CComponents::clearSavedScreen()
|
||||
{
|
||||
if (saved_screen.pixbuf)
|
||||
delete[] saved_screen.pixbuf;
|
||||
saved_screen.pixbuf = NULL;
|
||||
}
|
||||
|
||||
void CComponents::initVarBasic()
|
||||
{
|
||||
x = saved_screen.x = 0;
|
||||
y = saved_screen.y = 0;
|
||||
@@ -73,7 +54,7 @@ void CComponents::initVarBasic()
|
||||
shadow_w = SHADOW_OFFSET;
|
||||
fr_thickness = 0;
|
||||
fr_thickness_sel = 3;
|
||||
|
||||
|
||||
firstPaint = true;
|
||||
is_painted = false;
|
||||
paint_bg = true;
|
||||
@@ -83,6 +64,20 @@ void CComponents::initVarBasic()
|
||||
saved_screen.pixbuf = NULL;
|
||||
}
|
||||
|
||||
CComponents::~CComponents()
|
||||
{
|
||||
hide();
|
||||
clearSavedScreen();
|
||||
clearFbData();
|
||||
}
|
||||
|
||||
void CComponents::clearSavedScreen()
|
||||
{
|
||||
if (saved_screen.pixbuf)
|
||||
delete[] saved_screen.pixbuf;
|
||||
saved_screen.pixbuf = NULL;
|
||||
}
|
||||
|
||||
bool CComponents::CheckFbData(const comp_fbdata_t& fbdata)
|
||||
{
|
||||
if ( (fbdata.x <= 0 || fbdata.y <= 0) ||
|
||||
|
Reference in New Issue
Block a user