components: rework classes

- outsourced some classes cc_item.cpp/h, cc_draw.cpp/h
- added extra methodes for simple use of some basic components extra.cpp/h
- rework clock handling: use timer class, reworked members for
 enable/disable clock with external timer events,
 tryed to fix some display issues related with infoclock and
 time osd clock in moviebrowser, channellist, menuus
- reworked hide/kill handling, removed parameter for hide(), try to use
 cached backgrounds for other constallations, paint cache, image cache (all beta)
- reworked shadow/frame handling, add shadow modes for left/right
 arrangement, TODO: repaint for existant instances required
- reworked color gradient assignment (beta)

... Note: I had a data crash in my local git tree
and i tryed to restore my historie, but most was lost. Therefore here
the commit is large


Origin commit data
------------------
Branch: ni/coolstream
Commit: 0146511f38
Author: Thilo Graf <dbt@novatux.de>
Date: 2015-11-18 (Wed, 18 Nov 2015)

Origin message was:
------------------
components: rework classes

- outsourced some classes cc_item.cpp/h, cc_draw.cpp/h
- added extra methodes for simple use of some basic components extra.cpp/h
- rework clock handling: use timer class, reworked members for
 enable/disable clock with external timer events,
 tryed to fix some display issues related with infoclock and
 time osd clock in moviebrowser, channellist, menuus
- reworked hide/kill handling, removed parameter for hide(), try to use
 cached backgrounds for other constallations, paint cache, image cache (all beta)
- reworked shadow/frame handling, add shadow modes for left/right
 arrangement, TODO: repaint for existant instances required
- reworked color gradient assignment (beta)

... Note: I had a data crash in my local git tree
and i tryed to restore my historie, but most was lost. Therefore here
the commit is large


------------------
This commit was generated by Migit
This commit is contained in:
2015-11-18 18:08:23 +01:00
parent 34651cb704
commit 9e3882b7bc
68 changed files with 3207 additions and 1682 deletions

View File

@@ -26,7 +26,8 @@
#include "config.h"
#include <gui/components/cc_base.h>
#include "cc_base.h"
#include "cc_item.h"
#include "cc_frm_scrollbar.h"
class CComponentsForm : public CComponentsItem
@@ -55,10 +56,16 @@ class CComponentsForm : public CComponentsItem
///enable/disable page scrolling, default enabled with page scroll mode up/down keys, see also enablePageScroll()
int page_scroll_mode;
///initialize basic properties
virtual void Init( const int& x_pos, const int& y_pos, const int& w, const int& h,
const fb_pixel_t& color_frame,
const fb_pixel_t& color_body,
const fb_pixel_t& color_shadow);
public:
CComponentsForm( const int x_pos = 0, const int y_pos = 0, const int w = 800, const int h = 600,
CComponentsForm *parent = NULL,
bool has_shadow = CC_SHADOW_OFF,
int shadow_mode = CC_SHADOW_OFF,
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);
@@ -66,8 +73,6 @@ class CComponentsForm : public CComponentsItem
///paints current form on screen, for paint a page use paintPage()
void paint(bool do_save_bg = CC_SAVE_SCREEN_YES);
///hides current form, background will be restored, if parameter = false
void hide(bool no_restore = false);
///same like CComponentsItem::kill(), but erases all embedded items inside of parent at once, this = parent
///NOTE: Items always have parent bindings to "this" and use the parent background color as default! Set parameter 'ignore_parent=true' to ignore parent background color!
@@ -190,6 +195,14 @@ class CComponentsForm : public CComponentsItem
};
///scroll page and paint current selected page, if parameter2 = true (default)
virtual void ScrollPage(int direction = SCROLL_P_DOWN, bool do_paint = true);
virtual bool enableColBodyGradient(const int& enable_mode, const fb_pixel_t& sec_colorconst, const int& direction = -1 /*CFrameBuffer::gradientVertical*/);
///cleans saved screen buffer include from sub items, required by hide(), returns true if any buffer was deleted
virtual bool clearSavedScreen();
///cleanup paint cache include from sub items, removes saved buffer contents from cached foreground layers, returns true if any buffer was removed
virtual bool clearPaintCache();
///cleanup old gradient buffers include from sub items, returns true if any gradient buffer data was removed
virtual bool clearFbGradientData();
};
#endif