mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-28 16:01:10 +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:
@@ -86,6 +86,7 @@ class CComponentsWindow : public CComponentsForm
|
||||
void initVarWindow( const int& x_pos = CC_CENTERED, const int& y_pos = CC_CENTERED, const int& w = 0, const int& h = 0,
|
||||
const std::string& caption = "",
|
||||
const std::string& iconname = "",
|
||||
CComponentsForm *parent = NULL,
|
||||
bool has_shadow = CC_SHADOW_OFF,
|
||||
fb_pixel_t color_frame = COL_MENUCONTENT_PLUS_6,
|
||||
fb_pixel_t color_body = COL_MENUCONTENT_PLUS_0,
|
||||
@@ -101,12 +102,13 @@ class CComponentsWindow : public CComponentsForm
|
||||
CC_WINDOW_ITEM_HEADER = 0
|
||||
};
|
||||
///simple constructor for CComponentsWindow, this shows a window over full screen
|
||||
CComponentsWindow();
|
||||
CComponentsWindow(CComponentsForm *parent = NULL);
|
||||
|
||||
///advanced constructor for CComponentsWindow, provides parameters for the most required properties, and caption as string, x_pos or y_pos = 0 will center window
|
||||
CComponentsWindow( const int& x_pos, const int& y_pos, const int& w, const int& h,
|
||||
const std::string& caption = "",
|
||||
const std::string& iconname = "",
|
||||
CComponentsForm *parent = NULL,
|
||||
bool has_shadow = CC_SHADOW_OFF,
|
||||
fb_pixel_t color_frame = COL_MENUCONTENT_PLUS_6,
|
||||
fb_pixel_t color_body = COL_MENUCONTENT_PLUS_0,
|
||||
@@ -116,6 +118,7 @@ class CComponentsWindow : public CComponentsForm
|
||||
CComponentsWindow( const int& x_pos, const int& y_pos, const int& w, const int& h,
|
||||
neutrino_locale_t locale_text = NONEXISTANT_LOCALE,
|
||||
const std::string& iconname = "",
|
||||
CComponentsForm *parent = NULL,
|
||||
bool has_shadow = CC_SHADOW_OFF,
|
||||
fb_pixel_t color_frame = COL_MENUCONTENT_PLUS_6,
|
||||
fb_pixel_t color_body = COL_MENUCONTENT_PLUS_0,
|
||||
@@ -163,6 +166,7 @@ class CComponentsWindowMax : public CComponentsWindow
|
||||
public:
|
||||
///simple constructor for CComponentsWindow, provides parameters for caption as string and icon, this shows a centered window based up current screen settings
|
||||
CComponentsWindowMax( const std::string& caption, const std::string& iconname = "",
|
||||
CComponentsForm *parent = NULL,
|
||||
bool has_shadow = CC_SHADOW_OFF,
|
||||
fb_pixel_t color_frame = COL_MENUCONTENT_PLUS_6,
|
||||
fb_pixel_t color_body = COL_MENUCONTENT_PLUS_0,
|
||||
@@ -170,6 +174,7 @@ class CComponentsWindowMax : public CComponentsWindow
|
||||
|
||||
///simple constructor for CComponentsWindow, provides parameters for caption from locales and icon, this shows a centered window based up current screen settings
|
||||
CComponentsWindowMax( neutrino_locale_t locale_caption, const std::string& iconname = "",
|
||||
CComponentsForm *parent = NULL,
|
||||
bool has_shadow = CC_SHADOW_OFF,
|
||||
fb_pixel_t color_frame = COL_MENUCONTENT_PLUS_6,
|
||||
fb_pixel_t color_body = COL_MENUCONTENT_PLUS_0,
|
||||
|
Reference in New Issue
Block a user