mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-09-03 02:41:12 +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
------------------
Commit: 23d7b62cf0
Author: Thilo Graf <dbt@novatux.de>
Date: 2014-03-03 (Mon, 03 Mar 2014)
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
Copyright (C) 2001 by Steffen Hehn 'McClean'
|
||||
|
||||
Classes for generic GUI-related components.
|
||||
Copyright (C) 2012, 2013, Thilo Graf 'dbt'
|
||||
Copyright (C) 2012-2014, Thilo Graf 'dbt'
|
||||
|
||||
License: GPL
|
||||
|
||||
@@ -52,8 +52,6 @@ class CComponentsInfoBox : public CComponentsText
|
||||
///property: path or default name of displayed image
|
||||
std::string pic_default_name;
|
||||
|
||||
///initialize all needed default attributes
|
||||
void initVarInfobox();
|
||||
///paint picture, used in initVarInfobox()
|
||||
void paintPicture();
|
||||
///property: path or name of displayed image
|
||||
@@ -63,9 +61,11 @@ class CComponentsInfoBox : public CComponentsText
|
||||
///object: internal used CTextBox object
|
||||
CComponentsText * cctext;
|
||||
|
||||
CComponentsInfoBox();
|
||||
CComponentsInfoBox( const int x_pos, const int y_pos, const int w, const int h,
|
||||
std::string info_text = "", const int mode = CTextBox::AUTO_WIDTH, Font* font_text = NULL,
|
||||
CComponentsInfoBox( const int& x_pos = 0, const int& y_pos = 0, const int& w = 800, const int& h = 600,
|
||||
std::string info_text = "",
|
||||
const int mode = CTextBox::AUTO_WIDTH,
|
||||
Font* font_text = NULL,
|
||||
CComponentsForm *parent = NULL,
|
||||
bool has_shadow = CC_SHADOW_OFF,
|
||||
fb_pixel_t color_text = COL_MENUCONTENT_TEXT, fb_pixel_t color_frame = COL_MENUCONTENT_PLUS_6, fb_pixel_t color_body = COL_MENUCONTENT_PLUS_0, fb_pixel_t color_shadow = COL_MENUCONTENTDARK_PLUS_0);
|
||||
|
||||
|
Reference in New Issue
Block a user