mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-29 16:31:05 +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:
@@ -68,6 +68,7 @@ class CComponentsExtTextForm : public CComponentsForm
|
||||
///initialize basic variables
|
||||
void initVarExtTextForm(const int& x_pos, const int& y_pos, const int& w, const int& h,
|
||||
const std::string& label_text, const std::string& text,
|
||||
CComponentsForm* parent,
|
||||
bool has_shadow,
|
||||
fb_pixel_t label_color,
|
||||
fb_pixel_t text_color,
|
||||
@@ -77,10 +78,13 @@ class CComponentsExtTextForm : public CComponentsForm
|
||||
///advanced constructor for CComponentsExtTextForm, provides parameters for the most required properties, and caption as string
|
||||
CComponentsExtTextForm( const int& x_pos = 1, const int& y_pos = 1, const int& w = 300, const int& h = 48,
|
||||
const std::string& label_text = "", const std::string& text = "",
|
||||
CComponentsForm *parent = NULL,
|
||||
bool has_shadow = CC_SHADOW_OFF,
|
||||
fb_pixel_t label_color = COL_MENUCONTENTINACTIVE_TEXT,
|
||||
fb_pixel_t text_color = 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);
|
||||
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);
|
||||
// ~CComponentsExtTextForm(); //inherited from CComponentsForm
|
||||
|
||||
///assigns texts for label and text, parameter as string, parameter Font is optional for required font type, default font is dependently from defined item height
|
||||
@@ -119,6 +123,7 @@ class CComponentsExtTextFormLocalized : public CComponentsExtTextForm
|
||||
///advanced constructor for CComponentsExtTextForm, provides parameters for the most required properties, and caption as locales
|
||||
CComponentsExtTextFormLocalized(const int& x_pos = 1, const int& y_pos = 1, const int& w = 300, const int& h = 48,
|
||||
const neutrino_locale_t& locale_label_text = NONEXISTANT_LOCALE, const neutrino_locale_t& locale_text = NONEXISTANT_LOCALE,
|
||||
CComponentsForm *parent = NULL,
|
||||
bool has_shadow = CC_SHADOW_OFF,
|
||||
fb_pixel_t label_color = COL_MENUCONTENTINACTIVE_TEXT,
|
||||
fb_pixel_t text_color = COL_MENUCONTENT_TEXT,
|
||||
|
Reference in New Issue
Block a user