Merge branch 'master' into pu/mp

This commit is contained in:
Jacek Jendrzej
2017-06-07 16:20:47 +02:00
80 changed files with 1972 additions and 512 deletions

View File

@@ -61,7 +61,7 @@ void CComponentsDetailsLine::initVarDline( const int& x_pos, const int& y_pos_to
shadow_w = 1;
//CComponentsDetailsLine
thickness = 4; /* MUST be an even value! */
dl_w = CFrameBuffer::getInstance()->scale2Res(3);
cc_body_gradient_enable = false;
}
@@ -101,6 +101,7 @@ void CComponentsDetailsLine::paint(bool do_save_bg)
int y_mark_top = y-h_mark_top/2;
int y_mark_down = y_down-h_mark_down/2;
int dx_c = dl_w%2; //correction for odd values
cc_fbdata_t fbdata[] =
{
@@ -108,26 +109,26 @@ void CComponentsDetailsLine::paint(bool do_save_bg)
{true, CC_FBDATA_TYPE_BGSCREEN, x, y_mark_top, width, y_mark_down-y_mark_top+h_mark_down+sw, 0, 0, 0, 0, NULL, NULL, NULL, false},
/* vertical item mark | */
{true, CC_FBDATA_TYPE_BOX, x+width-thickness-sw, y_mark_top, thickness, h_mark_top, col_body, 0, 0, 0, NULL, NULL, NULL, false},
{true, CC_FBDATA_TYPE_BOX, x+width-dl_w-sw, y_mark_top, dl_w, h_mark_top, col_body, 0, 0, 0, NULL, NULL, NULL, false},
{true, CC_FBDATA_TYPE_BOX, x+width-sw, y_mark_top+sw, sw, h_mark_top-sw, col_shadow, 0, 0, 0, NULL, NULL, NULL, false},
{true, CC_FBDATA_TYPE_BOX, x+width-thickness, y_mark_top+h_mark_top, thickness, sw, col_shadow, 0, 0, 0, NULL, NULL, NULL, false},
{true, CC_FBDATA_TYPE_BOX, x+width-dl_w, y_mark_top+h_mark_top, dl_w, sw, col_shadow, 0, 0, 0, NULL, NULL, NULL, false},
/* horizontal item line - */
{true, CC_FBDATA_TYPE_BOX, x, y-thickness/2, width-thickness-sw, thickness, col_body, 0, 0, 0, NULL, NULL, NULL, false},
{true, CC_FBDATA_TYPE_BOX, x+thickness, y+thickness/2, width-2*thickness-sw, sw, col_shadow, 0, 0, 0, NULL, NULL, NULL, false},
{true, CC_FBDATA_TYPE_BOX, x, y-dl_w/2, width-dl_w-sw, dl_w, col_body, 0, 0, 0, NULL, NULL, NULL, false},
{true, CC_FBDATA_TYPE_BOX, x+dl_w, y+dl_w/2+dx_c, width-2*dl_w-sw, sw, col_shadow, 0, 0, 0, NULL, NULL, NULL, false},
/* vertical connect line [ */
{true, CC_FBDATA_TYPE_BOX, x, y+thickness/2, thickness, y_down-y-thickness, col_body, 0, 0, 0, NULL, NULL, NULL, false},
{true, CC_FBDATA_TYPE_BOX, x+thickness, y+thickness/2+sw, sw, y_down-y-thickness-sw, col_shadow, 0, 0, 0, NULL, NULL, NULL, false},
{true, CC_FBDATA_TYPE_BOX, x, y+dl_w/2+dx_c, dl_w, y_down-y-dl_w, col_body, 0, 0, 0, NULL, NULL, NULL, false},
{true, CC_FBDATA_TYPE_BOX, x+dl_w, y+dl_w/2+dx_c, sw, y_down-y-dl_w, col_shadow, 0, 0, 0, NULL, NULL, NULL, false},
/* horizontal info line - */
{true, CC_FBDATA_TYPE_BOX, x, y_down-thickness/2, width-thickness-sw, thickness, col_body, 0, 0, 0, NULL, NULL, NULL, false},
{true, CC_FBDATA_TYPE_BOX, x+sw, y_down+thickness/2, width-thickness-2*sw, sw, col_shadow, 0, 0, 0, NULL, NULL, NULL, false},
{true, CC_FBDATA_TYPE_BOX, x, y_down-dl_w/2, width-dl_w-sw, dl_w, col_body, 0, 0, 0, NULL, NULL, NULL, false},
{true, CC_FBDATA_TYPE_BOX, x+sw, y_down+dl_w/2+dx_c, width-dl_w-2*sw, sw, col_shadow, 0, 0, 0, NULL, NULL, NULL, false},
/* vertical info mark | */
{true, CC_FBDATA_TYPE_BOX, x+width-thickness-sw, y_mark_down, thickness, h_mark_down, col_body, 0, 0, 0, NULL, NULL, NULL, false},
{true, CC_FBDATA_TYPE_BOX, x+width-dl_w-sw, y_mark_down, dl_w, h_mark_down, col_body, 0, 0, 0, NULL, NULL, NULL, false},
{true, CC_FBDATA_TYPE_BOX, x+width-sw, y_mark_down+sw, sw, h_mark_down-sw, col_shadow, 0, 0, 0, NULL, NULL, NULL, false},
{true, CC_FBDATA_TYPE_BOX, x+width-thickness, y_mark_down+h_mark_down,thickness, sw, col_shadow, 0, 0, 0, NULL, NULL, NULL, false},
{true, CC_FBDATA_TYPE_BOX, x+width-dl_w, y_mark_down+h_mark_down,dl_w, sw, col_shadow, 0, 0, 0, NULL, NULL, NULL, false},
};
for(size_t i =0; i< (sizeof(fbdata) / sizeof(fbdata[0])) ;i++)

View File

@@ -40,8 +40,8 @@ Not usable as CCItem!
class CComponentsDetailsLine : public CComponents
{
private:
///property: line thickness
int thickness;
///property: line width
int dl_w;
///property: lowest y position
int y_down;
///property: height of top marker
@@ -73,6 +73,8 @@ class CComponentsDetailsLine : public CComponents
///set all positions and dimensions of details line at once
void setDimensionsAll(const int& x_pos,const int& y_pos, const int& y_pos_down, const int& h_mark_top_ , const int& h_mark_down_)
{setXPos(x_pos); setYPos(y_pos); setYPosDown(y_pos_down); setHMarkTop(h_mark_top_); setHMarkDown(h_mark_down_);}
///property: set line thickness
void setLineWidth(const int& w){dl_w = w;}
///paint all to screen
void paint(bool do_save_bg = CC_SAVE_SCREEN_YES);

View File

@@ -31,7 +31,8 @@
#include <driver/fontrenderer.h>
#define DEF_HEIGHT 27
#define DEF_HEIGHT CFrameBuffer::getInstance()->scale2Res(27)
#define DEF_WIDTH CFrameBuffer::getInstance()->scale2Res(300)
#define DEF_LABEL_WIDTH_PERCENT 30
using namespace std;
@@ -39,7 +40,7 @@ using namespace std;
CComponentsExtTextForm::CComponentsExtTextForm(CComponentsForm* parent)
{
Font* t_font = g_Font[SNeutrinoSettings::FONT_TYPE_MENU_INFO];
initVarExtTextForm(0, 0, 300, t_font->getHeight(), "", "", t_font, parent, CC_SHADOW_OFF, COL_MENUCONTENTINACTIVE_TEXT, COL_MENUCONTENT_TEXT, COL_FRAME_PLUS_0, COL_MENUCONTENT_PLUS_0, COL_SHADOW_PLUS_0);
initVarExtTextForm(0, 0, DEF_WIDTH, t_font->getHeight(), "", "", t_font, parent, CC_SHADOW_OFF, COL_MENUCONTENTINACTIVE_TEXT, COL_MENUCONTENT_TEXT, COL_FRAME_PLUS_0, COL_MENUCONTENT_PLUS_0, COL_SHADOW_PLUS_0);
initCCTextItems();
}
@@ -86,8 +87,7 @@ void CComponentsExtTextForm::initVarExtTextForm(const int& x_pos, const int& y_p
width = w;
//init ccx_label_width and ccx_text_width
//default ccx_label_width = 30% of form width
ccx_percent_label_w = DEF_LABEL_WIDTH_PERCENT;
ccx_label_width = ccx_percent_label_w * width/100;
ccx_label_width = DEF_LABEL_WIDTH_PERCENT * width/100;
ccx_text_width = width-ccx_label_width;
height = h;
@@ -223,7 +223,8 @@ void CComponentsExtTextForm::initCCTextItems()
void CComponentsExtTextForm::setLabelWidthPercent(const uint8_t& percent_val)
{
ccx_percent_label_w = (int)percent_val;
ccx_label_width = (int)percent_val * width/100;
ccx_text_width = width-ccx_label_width;
initCCTextItems();
}

View File

@@ -49,8 +49,6 @@ class CComponentsExtTextForm : public CComponentsForm, public CCTextScreen
int ccx_text_width;
///property: font type of both items (label and text), see also setLabelAndText()
Font* ccx_font;
///property: percentage val of label width related to full width, causes fit of text automatically into the available remaining size of item, see also setLabelWidthPercent()
uint8_t ccx_percent_label_w;
///centered y position of label and text
int y_text;

View File

@@ -169,9 +169,13 @@ void CComponentsWindow::initWindowSize()
if (cc_parent)
return;
if (width < 0 && width >= -100) //percentage conversion TODO: behavior inside parent
width = frameBuffer->getScreenWidth()*abs(width)/100;
if (width == 0 || (unsigned)width > frameBuffer->getScreenWidth())
width = frameBuffer->getScreenWidth();
if (height < 0 && height >= -100) //percentage conversion TODO: behavior inside parent
height = frameBuffer->getScreenHeight()*abs(height)/100;
if (height == 0 || (unsigned)height > frameBuffer->getScreenHeight())
height = frameBuffer->getScreenHeight();
}

View File

@@ -29,6 +29,8 @@
#include "cc_frm_header.h"
#include "cc_frm_footer.h"
#define CCW_PERCENT - //placeholder for negative sign '-', used for discret dimensions parameters
//! Sub class of CComponentsForm. Shows a window with prepared items.
/*!
CComponentsWindow provides prepared items like header, footer and a container for
@@ -128,10 +130,56 @@ class CComponentsWindow : public CComponentsForm, CCHeaderTypes
{
CC_WINDOW_ITEM_HEADER = 0
};
///simple constructor for CComponentsWindow, this shows a window over full screen
enum
{
CC_WINDOW_LEFT_SIDEBAR = 1,
CC_WINDOW_RIGHT_SIDEBAR = 2
};
/**simple constructor for CComponentsWindow, this shows a window over full screen
* @param[in] parent
* @li optional: expects type CComponentsForm * as possible parent object, default = NULL
*/
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
/**
* advanced constructor for CComponentsWindow, provides parameters for the most required properties, and caption as string, x_pos or y_pos = 0 will center window
* @param[in] x_pos
* @li expects type const &int, defines x position on screen
* @param[in] y_pos
* @li expects type const &int, defines y position on screen
* @param[in] w
* @li expects type const &int, width of window, Note: value = 0 uses full screen
* @param[in] h
* @li expects type const &int, height of window, Note: value = 0 uses full screen
* @param[in] caption
* @li optional: expects type const std::string&, defines title of window header
* @param[in] iconname
* @li optional: expects type const std::string&, defines icon name of window header
* @param[in] parent
* @li optional: expects type CComponentsForm * as possible parent object, default = NULL
* @param[in] shadow_mode
* @li optional: expects type int as mode, default = CC_SHADOW_OFF \n
* possible values are \n
* CC_SHADOW_ON = (CC_SHADOW_RIGHT | CC_SHADOW_BOTTOM | CC_SHADOW_CORNER_BOTTOM_LEFT | CC_SHADOW_CORNER_BOTTOM_RIGHT | CC_SHADOW_CORNER_TOP_RIGHT) \n
* Take a look into cc_types.h
* @param[in] color_frame
* @li optional: expects type fb_pixel_t, defines frame color, default = COL_FRAME_PLUS_0
* @param[in] color_body
* @li optional: expects type fb_pixel_t, defines color color, default = COL_MENUCONTENT_PLUS_0
* @param[in] color_shadow
* @li optional: expects type fb_pixel_t, defines shadow color, default = COL_SHADOW_PLUS_0
*
* @note Discret dimensions parameters: values < 0 to -100 will be interpreted as percent values related to screen.
* For better readability please use placeholder 'CCW_PERCENT' as negative sign '-' \n
* Example: \n
* this inits a window with position x100 y100 on screen with dimensions 700px x 800px \n
* CComponentsWindow win(100, 100, 700, 800, "Test window");\n
* this inits a window with position x100 y100 on screen with 50% of screen size assigned with discret percental screen dimensions \n
* CComponentsWindow win(100, 100, CCW_PERCENT 50, CCW_PERCENT 50, "Test window");
*/
CComponentsWindow( const int& x_pos, const int& y_pos, const int& w, const int& h,
const std::string& caption = "",
const std::string& iconname = "",
@@ -141,7 +189,12 @@ class CComponentsWindow : public CComponentsForm, CCHeaderTypes
fb_pixel_t color_body = COL_MENUCONTENT_PLUS_0,
fb_pixel_t color_shadow = COL_SHADOW_PLUS_0);
///advanced constructor for CComponentsWindow, provides parameters for the most required properties, and caption from locales, x_pos or y_pos = 0 will center window
/**
* advanced constructor for CComponentsWindow, provides parameters for the most required properties
* @param[in] locale_text
* @li optional: expects type neutrino_locale_t, defines title of window header
* @see for other parameters take a look to CComponentsWindow base class above
*/
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 = "",
@@ -151,92 +204,249 @@ class CComponentsWindow : public CComponentsForm, CCHeaderTypes
fb_pixel_t color_body = COL_MENUCONTENT_PLUS_0,
fb_pixel_t color_shadow = COL_SHADOW_PLUS_0);
///add item to body object, also usable is addCCItem() to add items to the windo object
/**
* Add an item to body object, also usable is addCCItem() to add items to the window object
* @param[in] cc_Item
* @li expects type CComponentsItem* , defines a cc item
* @return Returns item ID
* @see Take a look to cc_types.h for possible types.
*/
int addWindowItem(CComponentsItem* cc_Item);
///allow/disallow paint a footer, default true, see also ccw_show_footer, showHeader()
void showFooter(bool show = true){ccw_show_footer = show; initCCWItems();};
///allow/disallow paint a header, default true, see also ccw_show_header, showFooter()
void showHeader(bool show = true){ccw_show_header = show; initCCWItems();};
/**
* enable/disable paint of footer, default true
* @param[in] show
* @li expects type bool, default = true
* @see ccw_show_footer, showHeader()
*/
void showFooter(bool show = true){ccw_show_footer = show; initCCWItems();}
enum
{
CC_WINDOW_LEFT_SIDEBAR = 1,
CC_WINDOW_RIGHT_SIDEBAR = 2
};
///allow/disallow paint a sidebar, default are enabled
/**
* enable/disable paint of header, default true
* @param[in] show
* @li expects type bool, default = true
* @see ccw_show_header, showFooter()
*/
void showHeader(bool show = true){ccw_show_header = show; initCCWItems();}
/**
* enable/disable paint of sidebar,
* @param[in] show
* @li optional: expects type const int&, default = enabled
*/
void enableSidebar(const int& sidbar_type = CC_WINDOW_LEFT_SIDEBAR | CC_WINDOW_RIGHT_SIDEBAR);
///set caption in header with string, see also getHeaderObject()
/**
* sets title text in header
* @param[in] text
* @li expects type const std::string&, defines title of window header
* @param[in] align_mode
* @li optional: expects type const cc_title_alignment_t&, defines allignment of title text
* @see CTextBox for alignment modes
*/
void setWindowCaption(const std::string& text, const cc_title_alignment_t& align_mode = DEFAULT_TITLE_ALIGN){ccw_caption = text; ccw_align_mode = align_mode;}
///set header text color
/**
* sets title text in header
* @param[in] text
* @li expects type neutrino_locale_t
* @param[in] align_mode
* @li optional: expects type const cc_title_alignment_t&, defines allignment of title text
* @see CTextBox for alignment modes
*/
void setWindowCaption(neutrino_locale_t locale_text, const cc_title_alignment_t& align_mode = DEFAULT_TITLE_ALIGN);
/**
* Sets header text color
* @param[in] const fb_pixel_t&
* @li expects type const fb_pixel_t&
*/
void setWindowHeaderTextColor(const fb_pixel_t& color){ccw_col_head_text = color;}
///set background to header
/**
* Sets header background color
* @param[in] const fb_pixel_t&
* @li expects type const fb_pixel_t&
*/
void setWindowHeaderColor(const fb_pixel_t& color){ccw_col_head = color;}
///set caption in header from locales, see also getHeaderObject()
void setWindowCaption(neutrino_locale_t locale_text, const cc_title_alignment_t& align_mode = DEFAULT_TITLE_ALIGN);
///set caption alignment, see CTextBox for possible modes
/**
* sets title text alignment
* @param[in] align_mode
* @li expects type const cc_title_alignment_t&
* @see CTextBox for alignment modes
*/
void setWindowCaptionAlignment(const cc_title_alignment_t& align_mode){ccw_align_mode = align_mode;};
///set icon name in header, see also getHeaderObject()
/**
* Sets icon name of window header.
* @param[in] iconname
* @li expects type const std::string&
*/
void setWindowIcon(const std::string& iconname){ccw_icon_name = iconname; initHeader();};
///set default header icon buttons, see also getHeaderObject()
void setWindowHeaderButtons(const int& buttons){ccw_buttons = buttons;};
/**
* Sets context buttons in window header.
* @param[in] buttons
* @li expects type const int&
* @note possible types are:
* CC_BTN_HELP,
CC_BTN_INFO,
CC_BTN_MENU,
CC_BTN_EXIT,
CC_BTN_MUTE_ZAP_ACTIVE,
CC_BTN_MUTE_ZAP_INACTIVE,
CC_BTN_OKAY,
CC_BTN_MUTE,
CC_BTN_UP,
CC_BTN_DOWN,
CC_BTN_LEFT,
CC_BTN_RIGHT,
CC_BTN_FORWARD,
CC_BTN_BACKWARD,
CC_BTN_PAUSE,
CC_BTN_PLAY,
CC_BTN_RECORD_ACTIVE,
CC_BTN_RECORD_INACTIVE,
CC_BTN_RECORD_STOP,
* @see cc_frm_header.h for current types
*/
void setWindowHeaderButtons(const int& buttons){ccw_buttons = buttons;}
///returns a pointer to the internal header object, use this to get access to header properities
CComponentsHeader* getHeaderObject(){return ccw_head;};
/**
* Gets a pointer to the internal header object, use this to get direct access to header properities
* @return CComponentsHeader*
*/
CComponentsHeader* getHeaderObject(){return ccw_head;}
///returns a pointer to the internal body object, use this to get access to body properities
CComponentsForm* getBodyObject(){return ccw_body;};
///returns a pointer to the internal footer object, use this to get access to footer properities
CComponentsFooter* getFooterObject(){return ccw_footer;};
/**
* Gets a pointer to the internal body object, use this to get access to body properities
* @return CComponentsForm*
*/
CComponentsForm* getBodyObject(){return ccw_body;}
///set background to footer
/**
* Gets a pointer to the internal footer object, use this to get access to footer properities
* @return CComponentsFooter*
*/
CComponentsFooter* getFooterObject(){return ccw_footer;}
/**
* Sets footer background color
* @param[in] color
* @li expects type const fb_pixel_t&
*/
void setWindowFooterColor(const fb_pixel_t& color){ccw_col_footer = color;}
///set font for footer buttons
/**
* Sets font for footer buttons
* @param[in] font_type
* @li expects type Font*
*/
void setWindowFooterFont(Font* font_type){ccw_button_font = font_type;}
///returns a pointer to the internal left side bar object, use this to get access to left sidebar properities
CComponentsFrmChain* getLeftSidebarObject(){return ccw_left_sidebar;};
///returns a pointer to the internal right side bar object, use this to get access to right sidebar properities
CComponentsFrmChain* getRightSidebarObject(){return ccw_right_sidebar;};
///sets width of sidebars
void setWidthSidebar(const int& sidebar_width){ccw_w_sidebar = sidebar_width; initCCWItems();};
/**
* Gets a pointer to the internal left side bar object, use this to get access to left sidebar properities
* @return CComponentsFrmChain*
*/
CComponentsFrmChain* getLeftSidebarObject(){return ccw_left_sidebar;}
///sets current page, NOTE: this is simliar with setCurrentPage() known from basic class CComponentsForm, but here it is related only for window body object
/**
* Gets a pointer to the internal right side bar object, use this to get access to right sidebar properities
* @return CComponentsFrmChain*
*/
CComponentsFrmChain* getRightSidebarObject(){return ccw_right_sidebar;}
/**
* Sets width of sidebars
* @param[in] sidebar_width
* @li expects type const int&
*/
void setWidthSidebar(const int& sidebar_width){ccw_w_sidebar = sidebar_width; initCCWItems();}
/**
* Sets current page number
* @param[in] sidebar_width
* @li expects type const int&
* @note This is simliar to setCurrentPage() known from basic class CComponentsForm, but here it is related only for window body object.
*/
void setCurrentPage(const u_int8_t& current_page);
///get current page, NOTE: this is simliar with getCurrentPage() known from basic class CComponentsForm, but here it is related only for window body object
/**
* Gets current page number
* @return CComponentsFrmChain*
* @note This simliar to getCurrentPage() known from basic class CComponentsForm, but here it is related only for window body object
*/
u_int8_t getCurrentPage();
///paint window body items, this paints only the current page, body = page, current page is definied in body object, see setCurrentPage()
/**
* Paints window body items, this paints only the current page, body = page, current page is definied in body object, see setCurrentPage()
* @param[in] do_save_bg
* @li optional: expects type bool, default = CC_SAVE_SCREEN_NO (false), sets background save mode
*/
void paintCurPage(bool do_save_bg = CC_SAVE_SCREEN_NO);
///paint defined page of body, parameter number 0...n
/**
* Paints defined page of body, parameter number 0...n
* @param[in] page_number
* @li expects type const u_int8_t& as page number
* @param[in] do_save_bg
* @li optional: expects type bool, default = CC_SAVE_SCREEN_NO (false), sets background save mode
*/
void paintPage(const u_int8_t& page_number, bool do_save_bg = CC_SAVE_SCREEN_NO);
///enable/disable page scroll, parameter1 default enabled for up/down keys, only for body!
/**
* enable/disable page scroll
* @param[in] mode
* @li optional: expects type const int&, default enabled for up/down keys, only for body!
*/
void enablePageScroll(const int& mode = PG_SCROLL_M_UP_DOWN_KEY);
///set width of body scrollbar
/**
* Sets width of body scrollbar
* @param[in] crollbar_width
* @li expects type const int&
*/
void setScrollBarWidth(const int& scrollbar_width);
///refresh position and dimension and reinitialize elemenatary properties
/**
* Reinit position and dimensions and reinitialize mostly elemenatary properties
*/
void Refresh(){initCCWItems();};
///paint all window items, this overwriting paint() from CComponentsForm
/**
* Paint window
* @param[in] do_save_bg
* @li optional: expects type bool, sets background save mode
*/
void paint(bool do_save_bg = CC_SAVE_SCREEN_YES);
///adds additional exec key to current collection, default exit keys are CRCInput::RC_home and CRCInput::RC_setup
/**
* Adds an additional exec key to current collection, default exit keys are CRCInput::RC_home and CRCInput::RC_setup
* @param[in] key
* @li expects type const neutrino_msg_t&
* @see river/rcinput.h for possible keys
*/
virtual void addExitKey(const neutrino_msg_t& key){getBodyObject()->addExitKey(key);}
///remove all current exec keys from current collection, NOTE: use addExitKey() if new exec key is required
/**
* Removes all current exec keys from current collection.
* @note use addExitKey() if new exec key is required
*/
virtual void removeExitKeys(){getBodyObject()->removeExitKeys();}
};
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
/**
* Simple constructor for CComponentsWindow, this shows only a centered window based up current screen settings
* @see for other parameters take a look to CComponentsWindow base class above
* @param[in] caption
* @li expects type const std::string&, defines title of window header
* @see for other parameters take a look to CComponentsWindow base class above
*/
CComponentsWindowMax( const std::string& caption, const std::string& iconname = "",
CComponentsForm *parent = NULL,
int shadow_mode = CC_SHADOW_OFF,
@@ -244,7 +454,13 @@ class CComponentsWindowMax : public CComponentsWindow
fb_pixel_t color_body = COL_MENUCONTENT_PLUS_0,
fb_pixel_t color_shadow = COL_SHADOW_PLUS_0);
///simple constructor for CComponentsWindow, provides parameters for caption from locales and icon, this shows a centered window based up current screen settings
/**
* Simple constructor for CComponentsWindow, this shows only a centered window based up current screen settings
* @see for other parameters take a look to CComponentsWindow base class above
* @param[in] locale_text
* @li expects type neutrino_locale_t, defines title of window header
* @see for other parameters take a look to CComponentsWindow base class above
*/
CComponentsWindowMax( neutrino_locale_t locale_caption, const std::string& iconname = "",
CComponentsForm *parent = NULL,
int shadow_mode = CC_SHADOW_OFF,

View File

@@ -157,9 +157,6 @@ class CProgressBar : public CComponentsItem
//set gradient (overides g_settings.theme.progressbar_gradient)
void setGradient(int &gradient) { pb_gradient = &gradient; }
void setXPos(const int& xpos){CCDraw::setXPos(xpos);}
void setYPos(const int& ypos){CCDraw::setYPos(ypos);}
};
#endif /* __CC_PROGRESSBAR_H__ */

View File

@@ -197,8 +197,8 @@ typedef struct button_label_cc
directKeys(1, CRCInput::RC_nokey){}
} button_label_cc_struct;
#define CC_WIDTH_MIN 16
#define CC_HEIGHT_MIN 16
#define CC_WIDTH_MIN CFrameBuffer::getInstance()->scale2Res(16)
#define CC_HEIGHT_MIN CC_WIDTH_MIN
#define CC_SHADOW_OFF 0x0
#define CC_SHADOW_RIGHT 0x2