mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-27 23:42:51 +02:00
clean up: remove unnecessary virtual declarations from cc classes
Origin commit data
------------------
Commit: 6660f9835f
Author: Thilo Graf <dbt@novatux.de>
Date: 2018-12-08 (Sat, 08 Dec 2018)
This commit is contained in:
@@ -99,11 +99,11 @@ class CCDraw : public COSDFader, public CComponentsSignals, public CCTypes
|
||||
///returns true if internal property was changed
|
||||
virtual bool hasChanges();
|
||||
///apply current position changes and returns true if internal values were changed
|
||||
virtual bool applyPosChanges();
|
||||
bool applyPosChanges();
|
||||
///apply current dimension changes and returns true if internal values were changed
|
||||
virtual bool applyDimChanges();
|
||||
bool applyDimChanges();
|
||||
///apply current color changes and returns true if internal values were changed
|
||||
virtual bool applyColChanges();
|
||||
bool applyColChanges();
|
||||
|
||||
///paint caching for body and shadow, default init value = true, see also enablePaintCache() NOTE: has no effect if paint_bg = false
|
||||
bool cc_paint_cache;
|
||||
@@ -164,16 +164,16 @@ class CCDraw : public COSDFader, public CComponentsSignals, public CCTypes
|
||||
virtual~CCDraw();
|
||||
|
||||
///cleans saved screen buffer, required by hide(), returns true if any buffer was deleted
|
||||
virtual bool clearSavedScreen();
|
||||
bool clearSavedScreen();
|
||||
///cleanup paint cache, removes saved buffer contents from cached foreground layers, returns true if any buffer was removed
|
||||
virtual bool clearPaintCache();
|
||||
bool clearPaintCache();
|
||||
///cleanup old gradient buffers, returns true if any gradient buffer data was removed
|
||||
virtual bool clearFbGradientData();
|
||||
bool clearFbGradientData();
|
||||
|
||||
///cleans all possible screen buffers, it calls clearSavedScreen(), clearPaintCache() and clearFbGradientData() at once
|
||||
virtual bool clearScreenBuffer();
|
||||
bool clearScreenBuffer();
|
||||
///does the same like clearScreenBuffer(), additional cleans v_fbdata layers and reset layer properties
|
||||
virtual void clearFbData();
|
||||
void clearFbData();
|
||||
|
||||
///set screen x-position, parameter as int
|
||||
virtual void setXPos(const int& xpos);
|
||||
@@ -189,49 +189,49 @@ class CCDraw : public COSDFader, public CComponentsSignals, public CCTypes
|
||||
///set width of component on screen
|
||||
virtual void setWidth(const int& w);
|
||||
///set all positions and dimensions of component at once
|
||||
virtual void setDimensionsAll(const int& xpos, const int& ypos, const int& w, const int& h){setPos(xpos, ypos); setWidth(w); setHeight(h);}
|
||||
void setDimensionsAll(const int& xpos, const int& ypos, const int& w, const int& h){setPos(xpos, ypos); setWidth(w); setHeight(h);}
|
||||
|
||||
///return screen x-position of component
|
||||
///Note: position of bound components (items) means position related within parent form, not for screen!
|
||||
///to get the real screen position, use getRealXPos(), to find in CComponentsItem sub classes
|
||||
virtual int getXPos(){return x;};
|
||||
int getXPos(){return x;};
|
||||
///return screen y-position of component
|
||||
///Note: position of bound components (items) means position related within parent form, not for screen!
|
||||
///to get the real screen position, use getRealYPos(), to find in CComponentsItem sub classes
|
||||
virtual int getYPos(){return y;}
|
||||
int getYPos(){return y;}
|
||||
///return height of component
|
||||
virtual int getHeight(){return height;}
|
||||
int getHeight(){return height;}
|
||||
///return width of component
|
||||
virtual int getWidth(){return width;}
|
||||
int getWidth(){return width;}
|
||||
|
||||
///return/set (pass through) width and height of component
|
||||
virtual void getSize(int* w, int* h){*w=width; *h=height;}
|
||||
void getSize(int* w, int* h){*w=width; *h=height;}
|
||||
///return/set (pass through) position and dimensions of component at once
|
||||
virtual void getDimensions(int* xpos, int* ypos, int* w, int* h){*xpos=x; *ypos=y; *w=width; *h=height;}
|
||||
void getDimensions(int* xpos, int* ypos, int* w, int* h){*xpos=x; *ypos=y; *w=width; *h=height;}
|
||||
|
||||
///set frame thickness
|
||||
virtual void setFrameThickness(const int& thickness);
|
||||
void setFrameThickness(const int& thickness);
|
||||
///return of frame thickness
|
||||
virtual int getFrameThickness(){return fr_thickness;}
|
||||
int getFrameThickness(){return fr_thickness;}
|
||||
///set frame color
|
||||
virtual void setColorFrame(fb_pixel_t color){col_frame = color;}
|
||||
void setColorFrame(fb_pixel_t color){col_frame = color;}
|
||||
|
||||
virtual void set2ndColor(fb_pixel_t col_2nd){cc_body_gradient_2nd_col = col_2nd;}
|
||||
void set2ndColor(fb_pixel_t col_2nd){cc_body_gradient_2nd_col = col_2nd;}
|
||||
|
||||
///get frame color
|
||||
virtual fb_pixel_t getColorFrame(){return col_frame;}
|
||||
fb_pixel_t getColorFrame(){return col_frame;}
|
||||
///get body color
|
||||
virtual fb_pixel_t getColorBody(){return col_body;}
|
||||
fb_pixel_t getColorBody(){return col_body;}
|
||||
///get shadow color
|
||||
virtual fb_pixel_t getColorShadow(){return col_shadow;}
|
||||
fb_pixel_t getColorShadow(){return col_shadow;}
|
||||
|
||||
///set body color
|
||||
virtual void setColorBody(fb_pixel_t color){col_body = color;}
|
||||
void setColorBody(fb_pixel_t color){col_body = color;}
|
||||
///set shadow color
|
||||
virtual void setColorShadow(fb_pixel_t color){col_shadow = color;}
|
||||
void setColorShadow(fb_pixel_t color){col_shadow = color;}
|
||||
///set all basic framebuffer element colors at once
|
||||
///Note: Possible color values are defined in "gui/color.h" and "gui/color_custom.h"
|
||||
virtual void setColorAll(fb_pixel_t color_frame, fb_pixel_t color_body, fb_pixel_t color_shadow){col_frame = color_frame; col_body = color_body; col_shadow = color_shadow;};
|
||||
void setColorAll(fb_pixel_t color_frame, fb_pixel_t color_body, fb_pixel_t color_shadow){col_frame = color_frame; col_body = color_body; col_shadow = color_shadow;};
|
||||
|
||||
///set corner types
|
||||
///Possible corner types are defined in CFrameBuffer (see: driver/framebuffer.h)
|
||||
@@ -240,39 +240,39 @@ class CCDraw : public COSDFader, public CComponentsSignals, public CCTypes
|
||||
///set corner radius and type
|
||||
virtual void setCorner(const int& radius, const int& type = CORNER_ALL);
|
||||
///get corner types
|
||||
inline virtual int getCornerType(){return corner_type;};
|
||||
int getCornerType(){return corner_type;};
|
||||
///get corner radius
|
||||
inline virtual int getCornerRadius(){return corner_rad;};
|
||||
int getCornerRadius(){return corner_rad;};
|
||||
|
||||
///switch shadow on/off
|
||||
virtual void setShadowWidth(const int& shadow_width){if (shadow_w != shadow_width) shadow_w = shadow_width;}
|
||||
void setShadowWidth(const int& shadow_width){if (shadow_w != shadow_width) shadow_w = shadow_width;}
|
||||
/**1st parameter requires defines CC_SHADOW_ON (default), CC_SHADOW_OFF, CC_SHADOW_BOTTOM or CC_SHADOW_RIGHT, see also cc_types.h
|
||||
* 2nd parameter defines shadow width, default = defined by system
|
||||
* 3rd parameter forces paint of shadow layer, default = false, Note: default shadow will paint only on first paint, use 3rd parameter=true ignores this
|
||||
*/
|
||||
virtual void enableShadow(int mode = CC_SHADOW_ON, const int& shadow_width = -1, bool force_paint = false);
|
||||
void enableShadow(int mode = CC_SHADOW_ON, const int& shadow_width = -1, bool force_paint = false);
|
||||
///switch shadow off
|
||||
virtual void disableShadow(){enableShadow(CC_SHADOW_OFF);}
|
||||
void disableShadow(){enableShadow(CC_SHADOW_OFF);}
|
||||
///return current schadow width
|
||||
int getShadowWidth(){return shadow_w;}
|
||||
|
||||
///paint caching for body and shadow, see also cc_paint_cache NOTE: has no effect if paint_bg = false
|
||||
virtual void enablePaintCache(bool enable = true);
|
||||
void enablePaintCache(bool enable = true);
|
||||
///disable paint caching for body and shadow
|
||||
virtual void disablePaintCache(){enablePaintCache(false);}
|
||||
void disablePaintCache(){enablePaintCache(false);}
|
||||
|
||||
///returns paint mode, true=item was painted
|
||||
virtual bool isPainted();
|
||||
bool isPainted();
|
||||
///allows paint of elementary item parts (shadow, frame and body), similar as background, set it usually to false, if item used in a form, returns true, if mode has changed, also cleans screnn buffer
|
||||
virtual bool doPaintBg(bool do_paint);
|
||||
bool doPaintBg(bool do_paint);
|
||||
///allows paint frame around body, default true , NOTE: ignored if frame width = 0
|
||||
virtual void enableFrame(bool enable = true, const int& frame_width = -1){cc_enable_frame = enable; setFrameThickness(frame_width == -1 ? fr_thickness : frame_width);}
|
||||
void enableFrame(bool enable = true, const int& frame_width = -1){cc_enable_frame = enable; setFrameThickness(frame_width == -1 ? fr_thickness : frame_width);}
|
||||
///disallow paint frame around body
|
||||
virtual void disableFrame(){enableFrame(false);}
|
||||
void disableFrame(){enableFrame(false);}
|
||||
///enable/disable background buffering, default action = enable, see also cc_save_bg
|
||||
virtual void enableSaveBg(bool save_bg = true);
|
||||
void enableSaveBg(bool save_bg = true);
|
||||
///disable background buffering, does the same like enableSaveBg(false), NOTE: cleans existant pixbuffer content!
|
||||
virtual void disableSaveBg(){enableSaveBg(false);}
|
||||
void disableSaveBg(){enableSaveBg(false);}
|
||||
///returns background buffering mode. Mode is assigned with paint() or enableSaveBg()/disableSaveBg())
|
||||
bool SaveBg(){return cc_save_bg;}
|
||||
|
||||
@@ -285,28 +285,28 @@ class CCDraw : public COSDFader, public CComponentsSignals, public CCTypes
|
||||
is_painted = false;
|
||||
}
|
||||
///returns visibility mode
|
||||
virtual bool paintAllowed(){return cc_allow_paint;};
|
||||
bool paintAllowed(){return cc_allow_paint;};
|
||||
|
||||
///set color gradient on/off, returns true if gradient mode was changed
|
||||
virtual bool enableColBodyGradient(const int& enable_mode, const fb_pixel_t& sec_color = 255 /*=COL_BACKGROUND*/, const int& direction = 1 /*CFrameBuffer::gradientVertical*/);
|
||||
bool enableColBodyGradient(const int& enable_mode, const fb_pixel_t& sec_color = 255 /*=COL_BACKGROUND*/, const int& direction = 1 /*CFrameBuffer::gradientVertical*/);
|
||||
///disable color gradient, returns true if gradient mode was changed
|
||||
virtual bool disableColBodyGradient(){return enableColBodyGradient(CC_COLGRAD_OFF);}
|
||||
bool disableColBodyGradient(){return enableColBodyGradient(CC_COLGRAD_OFF);}
|
||||
///set color gradient properties, possible parameter values for mode and intensity to find in CColorGradient, in driver/framebuffer.h>
|
||||
virtual void setColBodyGradient(const int& mode, const int& direction = 1 /*CFrameBuffer::gradientVertical*/, const fb_pixel_t& sec_color = 255 /*=COL_BACKGROUND*/, const int& intensity = CColorGradient::normal, uint8_t v_min=0x40, uint8_t v_max=0xE0, uint8_t s=0xC0)
|
||||
void setColBodyGradient(const int& mode, const int& direction = 1 /*CFrameBuffer::gradientVertical*/, const fb_pixel_t& sec_color = 255 /*=COL_BACKGROUND*/, const int& intensity = CColorGradient::normal, uint8_t v_min=0x40, uint8_t v_max=0xE0, uint8_t s=0xC0)
|
||||
{ cc_body_gradient_intensity=intensity;
|
||||
cc_body_gradient_intensity_v_min=v_min;
|
||||
cc_body_gradient_intensity_v_max=v_max;
|
||||
cc_body_gradient_saturation=s;
|
||||
enableColBodyGradient(mode, sec_color, direction);}
|
||||
///gets current color gradient mode
|
||||
virtual int getColBodyGradientMode(){return cc_body_gradient_enable;}
|
||||
int getColBodyGradientMode(){return cc_body_gradient_enable;}
|
||||
|
||||
///abstract: paint item, arg: do_save_bg see paintInit() above
|
||||
virtual void paint(bool do_save_bg = CC_SAVE_SCREEN_YES) = 0;
|
||||
///paint item, same like paint(CC_SAVE_SCREEN_NO) but without any argument
|
||||
virtual void paint0(){paint(CC_SAVE_SCREEN_NO);}
|
||||
void paint0(){paint(CC_SAVE_SCREEN_NO);}
|
||||
///paint item, same like paint(CC_SAVE_SCREEN_YES) but without any argument
|
||||
virtual void paint1(){paint(CC_SAVE_SCREEN_YES);}
|
||||
void paint1(){paint(CC_SAVE_SCREEN_YES);}
|
||||
|
||||
/**paint item with blink effect
|
||||
* This should work with all cc item types.
|
||||
@@ -317,7 +317,7 @@ class CCDraw : public COSDFader, public CComponentsSignals, public CCTypes
|
||||
* of this methode.
|
||||
* @see overloaded version of paintBlink()
|
||||
*/
|
||||
virtual bool paintBlink(CComponentsTimer* Timer);
|
||||
bool paintBlink(CComponentsTimer* Timer);
|
||||
|
||||
/**paint item with blink effect
|
||||
* This should work with all cc item types.
|
||||
@@ -336,7 +336,7 @@ class CCDraw : public COSDFader, public CComponentsSignals, public CCTypes
|
||||
* and it's possible you must remove from screen before e.g.:
|
||||
* item->kill();
|
||||
*/
|
||||
virtual bool paintBlink(const int& interval = 1, bool is_nano = false);
|
||||
bool paintBlink(const int& interval = 1, bool is_nano = false);
|
||||
|
||||
/**Cancel blink effect
|
||||
*
|
||||
@@ -361,7 +361,7 @@ class CCDraw : public COSDFader, public CComponentsSignals, public CCTypes
|
||||
restore last displayed background before item was painted and
|
||||
ensures demage of already existing screen buffers too.
|
||||
*/
|
||||
virtual void hide();
|
||||
void hide();
|
||||
|
||||
/**Erase or paint over rendered objects without restore of background, it's similar to paintBackgroundBoxRel() known
|
||||
* from CFrameBuffer but with possiblity to define color, default color is COL_BACKGROUND_PLUS_0 (empty background)
|
||||
@@ -385,7 +385,7 @@ class CCDraw : public COSDFader, public CComponentsSignals, public CCTypes
|
||||
* Shadow paint must be reworked, because dimensions of shadow containes not the real defined size. Parts of item are killed too.
|
||||
*
|
||||
*/
|
||||
virtual void kill(const fb_pixel_t& bg_color = COL_BACKGROUND_PLUS_0, const int& corner_radius = -1, const int& fblayer_type = ~CC_FBDATA_TYPES);
|
||||
void kill(const fb_pixel_t& bg_color = COL_BACKGROUND_PLUS_0, const int& corner_radius = -1, const int& fblayer_type = ~CC_FBDATA_TYPES);
|
||||
|
||||
/**Erase shadow around rendered item.
|
||||
* This is similar with the kill() member, but shadow will be handled only.
|
||||
@@ -398,10 +398,10 @@ class CCDraw : public COSDFader, public CComponentsSignals, public CCTypes
|
||||
* @see
|
||||
* kill()
|
||||
*/
|
||||
virtual void killShadow(const fb_pixel_t& bg_color = COL_BACKGROUND_PLUS_0, const int& corner_radius = -1);
|
||||
void killShadow(const fb_pixel_t& bg_color = COL_BACKGROUND_PLUS_0, const int& corner_radius = -1);
|
||||
|
||||
virtual void enableGradientBgCleanUp(bool enable = true) { cc_gradient_bg_cleanup = enable; }
|
||||
virtual void disableGradientBgCleanUp(){ enableGradientBgCleanUp(false); }
|
||||
void enableGradientBgCleanUp(bool enable = true) { cc_gradient_bg_cleanup = enable; }
|
||||
void disableGradientBgCleanUp(){ enableGradientBgCleanUp(false); }
|
||||
|
||||
/**Sets an image path for body background, returns true if new image was applied.
|
||||
*
|
||||
@@ -413,7 +413,7 @@ class CCDraw : public COSDFader, public CComponentsSignals, public CCTypes
|
||||
* cc_body_image
|
||||
* setBodyBGImageName()
|
||||
*/
|
||||
virtual bool setBodyBGImage(const std::string& image_path);
|
||||
bool setBodyBGImage(const std::string& image_path);
|
||||
|
||||
/**Sets an image name for body background, returns true if new image was applied.
|
||||
*
|
||||
@@ -425,7 +425,7 @@ class CCDraw : public COSDFader, public CComponentsSignals, public CCTypes
|
||||
* cc_body_image
|
||||
* setBodyBGImage()
|
||||
*/
|
||||
virtual bool setBodyBGImageName(const std::string& image_name);
|
||||
bool setBodyBGImageName(const std::string& image_name);
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@@ -62,7 +62,7 @@ class CComponentsForm : public CComponentsItem
|
||||
std::vector <neutrino_msg_t> v_exit_keys;
|
||||
|
||||
///initialize basic properties
|
||||
virtual void Init( const int& x_pos, const int& y_pos, const int& w, const int& h,
|
||||
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);
|
||||
@@ -81,7 +81,7 @@ class CComponentsForm : public CComponentsItem
|
||||
|
||||
///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!
|
||||
virtual void killCCItems(const fb_pixel_t& bg_color, bool ignore_parent);
|
||||
void killCCItems(const fb_pixel_t& bg_color, bool ignore_parent);
|
||||
|
||||
/**
|
||||
Removes possible contained items and finally removes
|
||||
@@ -94,20 +94,20 @@ class CComponentsForm : public CComponentsItem
|
||||
void hideCCItems();
|
||||
|
||||
///add an item to form collection, returns id
|
||||
virtual int addCCItem(CComponentsItem* cc_Item);
|
||||
int addCCItem(CComponentsItem* cc_Item);
|
||||
///add items from a vector to form collection, returns size/count of items
|
||||
virtual int addCCItem(const std::vector<CComponentsItem*> &cc_items);
|
||||
virtual void insertCCItem(const uint& cc_item_id, CComponentsItem* cc_Item);
|
||||
int addCCItem(const std::vector<CComponentsItem*> &cc_items);
|
||||
void insertCCItem(const uint& cc_item_id, CComponentsItem* cc_Item);
|
||||
|
||||
///removes item object from container and deallocates instance
|
||||
virtual void removeCCItem(const uint& cc_item_id);
|
||||
void removeCCItem(const uint& cc_item_id);
|
||||
///removes item object from container and deallocates instance
|
||||
virtual void removeCCItem(CComponentsItem* cc_Item);
|
||||
void removeCCItem(CComponentsItem* cc_Item);
|
||||
|
||||
virtual void replaceCCItem(const uint& cc_item_id, CComponentsItem* new_cc_Item);
|
||||
virtual void replaceCCItem(CComponentsItem* old_cc_Item, CComponentsItem* new_cc_Item);
|
||||
virtual void exchangeCCItem(const uint& item_id_a, const uint& item_id_b);
|
||||
virtual void exchangeCCItem(CComponentsItem* item_a, CComponentsItem* item_b);
|
||||
void replaceCCItem(const uint& cc_item_id, CComponentsItem* new_cc_Item);
|
||||
void replaceCCItem(CComponentsItem* old_cc_Item, CComponentsItem* new_cc_Item);
|
||||
void exchangeCCItem(const uint& item_id_a, const uint& item_id_b);
|
||||
void exchangeCCItem(CComponentsItem* item_a, CComponentsItem* item_b);
|
||||
|
||||
/**Function to get current item id from passed item.
|
||||
* @param[in] cc_Item
|
||||
@@ -141,7 +141,7 @@ class CComponentsForm : public CComponentsItem
|
||||
*/
|
||||
CComponentsItem* getNextCCItem(CComponentsItem* current_cc_item);
|
||||
|
||||
virtual void paintCCItems();
|
||||
void paintCCItems();
|
||||
|
||||
///clean up and deallocate existant items from v_cc_items at once
|
||||
virtual void clear();
|
||||
@@ -155,22 +155,22 @@ class CComponentsForm : public CComponentsItem
|
||||
virtual CComponentsItem* back(){return v_cc_items.back();};
|
||||
|
||||
///sets alignment offset between items
|
||||
virtual void setAppendOffset(const int &x_offset, const int& y_offset){append_x_offset = x_offset; append_y_offset = y_offset;};
|
||||
void setAppendOffset(const int &x_offset, const int& y_offset){append_x_offset = x_offset; append_y_offset = y_offset;};
|
||||
|
||||
///sets count of pages, parameter as uint8_t
|
||||
///NOTE: page numbers are primary defined in items and this values have priority!! Consider that smaller values
|
||||
///than the current values can make problems and are not allowed, therefore smaller values than
|
||||
///current page count are ignored!
|
||||
virtual void setPageCount(const uint8_t& pageCount);
|
||||
void setPageCount(const uint8_t& pageCount);
|
||||
///returns current count of pages,
|
||||
///NOTE: page number are primary defined in items and secondary in form variable 'page_count'. This function returns the maximal value from both!
|
||||
virtual uint8_t getPageCount();
|
||||
uint8_t getPageCount();
|
||||
///sets current page
|
||||
virtual void setCurrentPage(const uint8_t& current_page){cur_page = current_page;};
|
||||
void setCurrentPage(const uint8_t& current_page){cur_page = current_page;};
|
||||
///get current page
|
||||
virtual uint8_t getCurrentPage(){return cur_page;};
|
||||
uint8_t getCurrentPage(){return cur_page;};
|
||||
///paint defined page number 0...n
|
||||
virtual void paintPage(const uint8_t& page_number, bool do_save_bg = CC_SAVE_SCREEN_NO);
|
||||
void paintPage(const uint8_t& page_number, bool do_save_bg = CC_SAVE_SCREEN_NO);
|
||||
///enum page scroll modes
|
||||
enum
|
||||
{
|
||||
@@ -179,12 +179,12 @@ class CComponentsForm : public CComponentsItem
|
||||
PG_SCROLL_M_OFF = 4
|
||||
};
|
||||
///enable/disable page scroll, parameter1 default enabled for up/down keys
|
||||
virtual void enablePageScroll(const int& mode = PG_SCROLL_M_UP_DOWN_KEY){page_scroll_mode = mode;};
|
||||
void enablePageScroll(const int& mode = PG_SCROLL_M_UP_DOWN_KEY){page_scroll_mode = mode;};
|
||||
|
||||
///set width of scrollbar
|
||||
virtual void setScrollBarWidth(const int& scrollbar_width){w_sb = scrollbar_width;};
|
||||
void setScrollBarWidth(const int& scrollbar_width){w_sb = scrollbar_width;};
|
||||
///returns id of selected item, return value as int, returns -1: if is nothing selected
|
||||
virtual int getSelectedItem();
|
||||
int getSelectedItem();
|
||||
|
||||
/**Function to get consumed space of items inside form in y direction.
|
||||
* @return
|
||||
@@ -211,9 +211,9 @@ class CComponentsForm : public CComponentsItem
|
||||
int getFreeDX(){return width - getUsedDX();}
|
||||
|
||||
///returns pointer to selected item, return value as CComponentsItem*, returns NULL: if is nothing selected
|
||||
virtual CComponentsItem* getSelectedItemObject();
|
||||
CComponentsItem* getSelectedItemObject();
|
||||
///select a definied item, parameter1 as size_t
|
||||
virtual void setSelectedItem( int item_id,
|
||||
void setSelectedItem( int item_id,
|
||||
const fb_pixel_t& sel_frame_col = COL_MENUCONTENTSELECTED_PLUS_0,
|
||||
const fb_pixel_t& frame_col = COL_FRAME_PLUS_0,
|
||||
const fb_pixel_t& sel_body_col = COL_MENUCONTENT_PLUS_0,
|
||||
@@ -221,7 +221,7 @@ class CComponentsForm : public CComponentsItem
|
||||
const int& frame_w = DEFAULT_SEL_FRAME_WIDTH,
|
||||
const int& sel_frame_w = DEFAULT_SEL_FRAME_WIDTH);
|
||||
///select a definied item, parameter1 as CComponentsItem*
|
||||
virtual void setSelectedItem( CComponentsItem* cc_item,
|
||||
void setSelectedItem( CComponentsItem* cc_item,
|
||||
const fb_pixel_t& sel_frame_col = COL_MENUCONTENTSELECTED_PLUS_0,
|
||||
const fb_pixel_t& frame_col = COL_FRAME_PLUS_0,
|
||||
const fb_pixel_t& sel_body_col = COL_MENUCONTENT_PLUS_0,
|
||||
@@ -230,12 +230,12 @@ class CComponentsForm : public CComponentsItem
|
||||
const int& sel_frame_w = DEFAULT_SEL_FRAME_WIDTH);
|
||||
|
||||
///exec main method, see also sub exec methods
|
||||
virtual int exec();
|
||||
int exec();
|
||||
|
||||
///adds additional exec key to current collection, default exit keys are CRCInput::RC_home and CRCInput::RC_setup
|
||||
virtual void addExitKey(const neutrino_msg_t& key){v_exit_keys.push_back(key);}
|
||||
void addExitKey(const neutrino_msg_t& key){v_exit_keys.push_back(key);}
|
||||
///remove all current exec keys from current collection, NOTE: use addExitKey() if new exec key is required
|
||||
virtual void removeExitKeys(){v_exit_keys.clear();}
|
||||
void removeExitKeys(){v_exit_keys.clear();}
|
||||
|
||||
///enum exec loop control
|
||||
enum
|
||||
@@ -245,14 +245,14 @@ class CComponentsForm : public CComponentsItem
|
||||
};
|
||||
///execKey() methods handle events for defined neutrino messages, see class CRCInput::, this methodes contains a signal handler named OnExecMsg, so it is possible to connect with any common function or method
|
||||
///exec sub method for pressed keys, parameters1/2 by rev, parameter3 msg_list as vector contains a list of possible RC-messages for defined message, parameter4 force_exit default = false
|
||||
virtual void execKey( neutrino_msg_t& msg,
|
||||
void execKey( neutrino_msg_t& msg,
|
||||
neutrino_msg_data_t& data,
|
||||
int& res,
|
||||
bool& cancel_exec,
|
||||
const std::vector<neutrino_msg_t>& msg_list,
|
||||
bool force_exit = false);
|
||||
///exec sub method for pressed key, parameters1/2 by rev, parameter3 force_exit default = false
|
||||
virtual bool execKey( neutrino_msg_t& msg,
|
||||
bool execKey( neutrino_msg_t& msg,
|
||||
neutrino_msg_data_t& data,
|
||||
int& res,
|
||||
bool& cancel_exec,
|
||||
@@ -260,10 +260,10 @@ class CComponentsForm : public CComponentsItem
|
||||
bool force_exit = false);
|
||||
|
||||
///exec sub method for page scroll, parameter1 neutrino_msg_t by rev
|
||||
virtual void execPageScroll(neutrino_msg_t& msg, neutrino_msg_data_t& data, int& res, bool& cancel_exec);
|
||||
void execPageScroll(neutrino_msg_t& msg, neutrino_msg_data_t& data, int& res, bool& cancel_exec);
|
||||
|
||||
///exec sub method for exit loop, parameters by rev
|
||||
virtual void execExit( neutrino_msg_t& msg,
|
||||
void execExit( neutrino_msg_t& msg,
|
||||
neutrino_msg_data_t& data,
|
||||
int& res, bool& cancel_exec,
|
||||
const std::vector<neutrino_msg_t>& v_msg_list);
|
||||
@@ -275,15 +275,15 @@ class CComponentsForm : public CComponentsItem
|
||||
SCROLL_P_UP = 1
|
||||
};
|
||||
///scroll page and paint current selected page, if parameter2 = true (default)
|
||||
virtual void ScrollPage(int direction = SCROLL_P_DOWN, bool do_paint = true);
|
||||
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*/);
|
||||
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();
|
||||
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();
|
||||
bool clearPaintCache();
|
||||
///cleanup old gradient buffers include from sub items, returns true if any gradient buffer data was removed
|
||||
virtual bool clearFbGradientData();
|
||||
bool clearFbGradientData();
|
||||
|
||||
///slot for repaint event, reserved for actions before repaint if paint() already was done.
|
||||
sigc::slot0<void> sl_form_repaint;
|
||||
|
@@ -145,7 +145,7 @@ class CComponentsButton : public CComponentsFrmChain, public CCTextScreen
|
||||
* CTextBox::enableSaveScreen()
|
||||
* disableTboxSaveScreen()
|
||||
*/
|
||||
virtual void enableTboxSaveScreen(bool mode)
|
||||
void enableTboxSaveScreen(bool mode)
|
||||
{
|
||||
if (cc_txt_save_screen == mode)
|
||||
return;
|
||||
|
@@ -128,44 +128,44 @@ class CComponentsFrmClock : public CComponentsForm, public CCTextScreen
|
||||
Font* getClockFont();
|
||||
|
||||
///set text color
|
||||
virtual void setTextColor(fb_pixel_t color_text){ cl_col_text = color_text;}
|
||||
void setTextColor(fb_pixel_t color_text){ cl_col_text = color_text;}
|
||||
|
||||
///set height of clock on screen
|
||||
virtual void setHeight(const int& h);
|
||||
void setHeight(const int& h);
|
||||
///set width of clock on screen
|
||||
virtual void setWidth(const int& w);
|
||||
void setWidth(const int& w);
|
||||
|
||||
///use string expession: "%H:%M" = 12:22, "%H:%M:%S" = 12:22:12
|
||||
///set current time format string, 1st parameter set the default format, 2nd parameter sets an alternatively format for use as blink effect
|
||||
virtual void setClockFormat(const char* prformat_str, const char* secformat_str = NULL);
|
||||
void setClockFormat(const char* prformat_str, const char* secformat_str = NULL);
|
||||
///get current time format string,
|
||||
std::string getClockFormat(){return cl_format;}
|
||||
|
||||
///start and paint ticking clock
|
||||
virtual bool Start();
|
||||
bool Start();
|
||||
///same like Start() but for usage as simple call without return value
|
||||
virtual void unblock(){Start();}
|
||||
void unblock(){Start();}
|
||||
///stop ticking clock, but don't hide, use kill() or hide() to remove from screen
|
||||
virtual bool Stop();
|
||||
bool Stop();
|
||||
///same like Stop() but for usage as simple call without return value
|
||||
virtual void block(){Stop();}
|
||||
void block(){Stop();}
|
||||
///return true on blocked status, blocked means clock can be initalized but would be not paint, to unblock use unblock()
|
||||
virtual bool isBlocked(void) {return !paintClock;}
|
||||
bool isBlocked(void) {return !paintClock;}
|
||||
|
||||
///returns true, if clock is running
|
||||
virtual bool isRun() const {return cl_timer ? cl_timer->isRun() : false;}
|
||||
bool isRun() const {return cl_timer ? cl_timer->isRun() : false;}
|
||||
///set refresh interval in seconds, default value=1 (=1 sec)
|
||||
virtual void setClockInterval(const int& seconds){cl_interval = seconds;}
|
||||
void setClockInterval(const int& seconds){cl_interval = seconds;}
|
||||
|
||||
///show clock on screen
|
||||
virtual void paint(bool do_save_bg = CC_SAVE_SCREEN_YES);
|
||||
void paint(bool do_save_bg = CC_SAVE_SCREEN_YES);
|
||||
///hide clock on screen
|
||||
virtual void hide(){Stop(); CComponentsForm::hide();}
|
||||
void hide(){Stop(); CComponentsForm::hide();}
|
||||
///does the same like kill() from base class, but stopping clock before kill
|
||||
void kill(const fb_pixel_t& bg_color = COL_BACKGROUND_PLUS_0, bool ignore_parent = false);
|
||||
|
||||
///reinitialize clock contents
|
||||
virtual void refresh() { initCCLockItems(); }
|
||||
void refresh() { initCCLockItems(); }
|
||||
|
||||
///enables force to repaint of all segments on each interval, Note: repaint of all segemts is default enabled.
|
||||
void enableForceSegmentPaint(bool enable = true){cl_force_repaint = enable;}
|
||||
@@ -185,7 +185,7 @@ class CComponentsFrmClock : public CComponentsForm, public CCTextScreen
|
||||
void enableTboxSaveScreen(bool mode);
|
||||
|
||||
///set color gradient on/off, returns true if gradient mode was changed
|
||||
virtual bool enableColBodyGradient(const int& enable_mode, const fb_pixel_t& sec_color = 255 /*=COL_BACKGROUND*/);
|
||||
bool enableColBodyGradient(const int& enable_mode, const fb_pixel_t& sec_color = 255 /*=COL_BACKGROUND*/);
|
||||
#if 0
|
||||
///enable/disable automatic blitting
|
||||
void setBlit(bool _may_blit = true) { may_blit = _may_blit; }
|
||||
|
@@ -144,7 +144,7 @@ class CComponentsHeader : public CComponentsForm, public CCTextScreen, CCHeaderT
|
||||
///init font object and recalculates height if required
|
||||
void initCaptionFont();
|
||||
///init default fonts for size modes
|
||||
virtual void initDefaultFonts();
|
||||
void initDefaultFonts();
|
||||
///sub: init icon object
|
||||
void initIcon();
|
||||
///sub: init caption object
|
||||
@@ -191,12 +191,12 @@ class CComponentsHeader : public CComponentsForm, public CCTextScreen, CCHeaderT
|
||||
virtual ~CComponentsHeader();
|
||||
|
||||
///set caption text, parameters: string, int align_mode (default left)
|
||||
virtual void setCaption(const std::string& caption, const cc_title_alignment_t& align_mode = DEFAULT_TITLE_ALIGN, const fb_pixel_t& text_color = COL_MENUHEAD_TEXT);
|
||||
void setCaption(const std::string& caption, const cc_title_alignment_t& align_mode = DEFAULT_TITLE_ALIGN, const fb_pixel_t& text_color = COL_MENUHEAD_TEXT);
|
||||
///set caption text, parameters: loacle, int align_mode (default left)
|
||||
virtual void setCaption(neutrino_locale_t caption_locale, const cc_title_alignment_t& align_mode = DEFAULT_TITLE_ALIGN, const fb_pixel_t& text_color = COL_MENUHEAD_TEXT);
|
||||
void setCaption(neutrino_locale_t caption_locale, const cc_title_alignment_t& align_mode = DEFAULT_TITLE_ALIGN, const fb_pixel_t& text_color = COL_MENUHEAD_TEXT);
|
||||
|
||||
///set alignment of caption within header, possible paramters are CComponentsHeader::CC_TITLE_LEFT, CComponentsHeader::CC_TITLE_RIGHT, CComponentsHeader::CC_TITLE_CENTER
|
||||
virtual void setCaptionAlignment(const cc_title_alignment_t& align_mode){cch_caption_align = align_mode;}
|
||||
void setCaptionAlignment(const cc_title_alignment_t& align_mode){cch_caption_align = align_mode;}
|
||||
|
||||
/**Set text font for title.
|
||||
* Internal default font is g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE] and
|
||||
@@ -210,11 +210,11 @@ class CComponentsHeader : public CComponentsForm, public CCTextScreen, CCHeaderT
|
||||
* setCaptionAlignment(),
|
||||
* setCaption()
|
||||
*/
|
||||
virtual void setCaptionFont(Font* font);
|
||||
void setCaptionFont(Font* font);
|
||||
///returns font object of title caption
|
||||
virtual Font* getCaptionFont(){return cch_font;}
|
||||
Font* getCaptionFont(){return cch_font;}
|
||||
///set text color for caption
|
||||
virtual void setCaptionColor(fb_pixel_t text_color){cch_col_text = text_color;}
|
||||
void setCaptionColor(fb_pixel_t text_color){cch_col_text = text_color;}
|
||||
|
||||
enum
|
||||
{
|
||||
@@ -233,35 +233,35 @@ class CComponentsHeader : public CComponentsForm, public CCTextScreen, CCHeaderT
|
||||
* CC_HEADER_SIZE_SMALL
|
||||
* @see setCaption(), setHeight()
|
||||
*/
|
||||
virtual void setSizeMode(const int& size_mode){cch_size_mode = size_mode; initCCItems();}
|
||||
void setSizeMode(const int& size_mode){cch_size_mode = size_mode; initCCItems();}
|
||||
|
||||
///set offset between items
|
||||
virtual void setOffset(const int offset){cch_offset = offset;};
|
||||
void setOffset(const int offset){cch_offset = offset;};
|
||||
///set name of icon
|
||||
virtual void setIcon(const char* icon_name);
|
||||
void setIcon(const char* icon_name);
|
||||
///set name of icon
|
||||
virtual void setIcon(const std::string& icon_name);
|
||||
void setIcon(const std::string& icon_name);
|
||||
|
||||
///context buttons are to find on the right part of header
|
||||
///add a single context button icon to the header object, arg as string, icon will just add, existing icons are preserved
|
||||
virtual void addContextButton(const std::string& button_name);
|
||||
void addContextButton(const std::string& button_name);
|
||||
///add a group of context button icons to the header object, arg as string vector, icons will just add, existing icons are preserved
|
||||
virtual void addContextButton(const std::vector<std::string>& v_button_names);
|
||||
void addContextButton(const std::vector<std::string>& v_button_names);
|
||||
///add a single context button icon or combined button icons to the header object, possible types are for example: CC_BTN_HELP, CC_BTN_INFO, CC_BTN_MENU, CC_BTN_EXIT
|
||||
///icons will just add, existing icons are preserved
|
||||
virtual void addContextButton(const int& buttons);
|
||||
void addContextButton(const int& buttons);
|
||||
///remove context buttons from context button object
|
||||
virtual void removeContextButtons();
|
||||
void removeContextButtons();
|
||||
///sets a single context button icon to the header object, arg as string, existing buttons are removed
|
||||
virtual void setContextButton(const std::string& button_name){removeContextButtons(); addContextButton(button_name);};
|
||||
void setContextButton(const std::string& button_name){removeContextButtons(); addContextButton(button_name);};
|
||||
///sets a group of context button icons to the header object, arg as string vector, existing buttons are removed
|
||||
virtual void setContextButton(const std::vector<std::string>& v_button_names){removeContextButtons(); addContextButton(v_button_names);};
|
||||
void setContextButton(const std::vector<std::string>& v_button_names){removeContextButtons(); addContextButton(v_button_names);};
|
||||
///sets a single context button icon or combined button icons to the header object, possible types are for example: CC_BTN_HELP, CC_BTN_INFO, CC_BTN_MENU, CC_BTN_EXIT
|
||||
///existing buttons are removed
|
||||
virtual void setContextButton(const int& buttons){removeContextButtons(); addContextButton(buttons);};
|
||||
void setContextButton(const int& buttons){removeContextButtons(); addContextButton(buttons);};
|
||||
|
||||
///gets the embedded context button object, so it's possible to get access directly to its methods and properties
|
||||
virtual CComponentsIconForm* getContextBtnObject() { return cch_btn_obj;};
|
||||
CComponentsIconForm* getContextBtnObject() { return cch_btn_obj;};
|
||||
|
||||
enum
|
||||
{
|
||||
@@ -287,12 +287,12 @@ class CComponentsHeader : public CComponentsForm, public CCTextScreen, CCHeaderT
|
||||
};
|
||||
|
||||
///set offset between icons within context button object
|
||||
virtual void setButtonsSpace(const int buttons_space){cch_buttons_space = buttons_space;}
|
||||
void setButtonsSpace(const int buttons_space){cch_buttons_space = buttons_space;}
|
||||
|
||||
///init all items within header object
|
||||
virtual void initCCItems();
|
||||
void initCCItems();
|
||||
///returns the text object
|
||||
virtual CComponentsText* getTextObject(){return cch_text_obj;}
|
||||
CComponentsText* getTextObject(){return cch_text_obj;}
|
||||
|
||||
/**Member to modify background behavior of embeded title
|
||||
* @param[in] mode
|
||||
@@ -315,12 +315,12 @@ class CComponentsHeader : public CComponentsForm, public CCTextScreen, CCHeaderT
|
||||
CComponentsFrmClock* getClockObject(){return cch_cl_obj;}
|
||||
|
||||
///enable display of clock, parameter bool enable, const char* format, bool run
|
||||
virtual void enableClock(bool enable = true, const char* format = "%H:%M", const char* sec_format_str = NULL, bool run = false);
|
||||
void enableClock(bool enable = true, const char* format = "%H:%M", const char* sec_format_str = NULL, bool run = false);
|
||||
///disable clock, without parameter
|
||||
virtual void disableClock();
|
||||
void disableClock();
|
||||
|
||||
///paint header
|
||||
virtual void paint(bool do_save_bg = CC_SAVE_SCREEN_YES);
|
||||
void paint(bool do_save_bg = CC_SAVE_SCREEN_YES);
|
||||
|
||||
///hides item, arg: no_restore see hideCCItem()
|
||||
void hide(){disableClock(); CComponentsForm::hide();}
|
||||
@@ -328,7 +328,7 @@ class CComponentsHeader : public CComponentsForm, public CCTextScreen, CCHeaderT
|
||||
void kill(const fb_pixel_t& bg_color = COL_BACKGROUND_PLUS_0, const int& corner_radius = -1, const int& fblayer_type = ~CC_FBDATA_TYPES, bool disable_clock = true);
|
||||
|
||||
///set color gradient on/off, returns true if gradient mode was changed
|
||||
virtual bool enableColBodyGradient(const int& enable_mode, const fb_pixel_t& sec_color = 255 /*=COL_BACKGROUND*/, const int& direction = -1);
|
||||
bool enableColBodyGradient(const int& enable_mode, const fb_pixel_t& sec_color = 255 /*=COL_BACKGROUND*/, const int& direction = -1);
|
||||
|
||||
/**Methode to set channel logo into header body via id and/or channel name
|
||||
* @param[in] channelId
|
||||
|
@@ -69,15 +69,15 @@ class CComponentsItem : public CComponents
|
||||
CComponentsItem(CComponentsForm *parent = NULL);
|
||||
|
||||
///sets pointer to the form object in which this item is embedded.
|
||||
virtual void setParent(CComponentsForm *parent){cc_parent = parent;};
|
||||
void setParent(CComponentsForm *parent){cc_parent = parent;};
|
||||
///returns pointer to the form object in which this item is embedded.
|
||||
virtual CComponentsForm* getParent(){return cc_parent;};
|
||||
CComponentsForm* getParent(){return cc_parent;};
|
||||
///property: returns true if item is added to a form
|
||||
virtual bool isAdded();
|
||||
bool isAdded();
|
||||
///indicates wether item has focus
|
||||
virtual bool hasFocus(){return cc_has_focus;}
|
||||
bool hasFocus(){return cc_has_focus;}
|
||||
///set or unset focus of item, stand alone items without parent have always set focus to true, inside of a parent form object, always the last added item has focus
|
||||
virtual void setFocus(bool focus);
|
||||
void setFocus(bool focus);
|
||||
|
||||
/**Erase or paint over rendered objects without restore of background, it's similar to paintBackgroundBoxRel() known
|
||||
* from CFrameBuffer but with possiblity to define color, default color is COL_BACKGROUND_PLUS_0 (empty background)
|
||||
@@ -98,13 +98,13 @@ class CComponentsItem : public CComponents
|
||||
* gui/color.h
|
||||
* driver/framebuffer.h
|
||||
*/
|
||||
virtual void kill(const fb_pixel_t& bg_color = COL_BACKGROUND_PLUS_0, bool ignore_parent = false, const int& fblayer_type = ~CC_FBDATA_TYPES);
|
||||
void kill(const fb_pixel_t& bg_color = COL_BACKGROUND_PLUS_0, bool ignore_parent = false, const int& fblayer_type = ~CC_FBDATA_TYPES);
|
||||
|
||||
///syncronizes item colors with current color settings if required, NOTE: overwrites internal values!
|
||||
virtual void syncSysColors();
|
||||
void syncSysColors();
|
||||
|
||||
///set select mode
|
||||
virtual void setSelected(bool selected,
|
||||
void setSelected(bool selected,
|
||||
const fb_pixel_t& sel_frame_col = COL_MENUCONTENTSELECTED_PLUS_0,
|
||||
const fb_pixel_t& frame_col = COL_FRAME_PLUS_0,
|
||||
const fb_pixel_t& sel_body_col = COL_MENUCONTENT_PLUS_0,
|
||||
@@ -112,54 +112,54 @@ class CComponentsItem : public CComponents
|
||||
const int& frame_w = 3,
|
||||
const int& sel_frame_w = 3);
|
||||
///set enable mode, see also cc_item_enabled
|
||||
virtual void setEnable(bool enabled){cc_item_enabled = enabled;};
|
||||
void setEnable(bool enabled){cc_item_enabled = enabled;};
|
||||
|
||||
///get select mode, see also setSelected() above
|
||||
virtual bool isSelected(){return cc_item_selected;};
|
||||
bool isSelected(){return cc_item_selected;};
|
||||
///get enable mode, see also setEnable() above
|
||||
virtual bool isEnabled(){return cc_item_enabled;};
|
||||
bool isEnabled(){return cc_item_enabled;};
|
||||
|
||||
///get current index of item, see also attribut cc_item_index
|
||||
virtual int getIndex(){return cc_item_index;};
|
||||
int getIndex(){return cc_item_index;};
|
||||
///set an index to item, see also attribut cc_item_index.
|
||||
///To generate an index, use genIndex()
|
||||
virtual void setIndex(const int& index){cc_item_index = index;};
|
||||
void setIndex(const int& index){cc_item_index = index;};
|
||||
|
||||
///sets page location of current item, parameter as uint8_t, see: cc_page_number
|
||||
virtual void setPageNumber(const uint8_t& on_page_number){cc_page_number = on_page_number;};
|
||||
void setPageNumber(const uint8_t& on_page_number){cc_page_number = on_page_number;};
|
||||
///returns current number of page location of current item, see: cc_page_number
|
||||
virtual uint8_t getPageNumber(){return cc_page_number;};
|
||||
uint8_t getPageNumber(){return cc_page_number;};
|
||||
|
||||
///set screen x-position, parameter as int
|
||||
virtual void setXPos(const int& xpos);
|
||||
void setXPos(const int& xpos);
|
||||
///set screen y-position, parameter as int
|
||||
virtual void setYPos(const int& ypos);
|
||||
void setYPos(const int& ypos);
|
||||
|
||||
///set screen x-position, parameter as uint8_t, percent x value related to current width of parent form or screen
|
||||
virtual void setXPosP(const uint8_t& xpos_percent);
|
||||
void setXPosP(const uint8_t& xpos_percent);
|
||||
///set screen y-position, parameter as uint8_t, percent y value related to current height of parent form or screen
|
||||
virtual void setYPosP(const uint8_t& ypos_percent);
|
||||
void setYPosP(const uint8_t& ypos_percent);
|
||||
///set x and y position as percent value related to current parent form or screen dimensions at once
|
||||
virtual void setPosP(const uint8_t& xpos_percent, const uint8_t& ypos_percent);
|
||||
void setPosP(const uint8_t& xpos_percent, const uint8_t& ypos_percent);
|
||||
|
||||
///sets real x position on screen. Use this, if item is added to a parent form
|
||||
virtual void setRealXPos(const int& xr){cc_xr = xr;}
|
||||
void setRealXPos(const int& xr){cc_xr = xr;}
|
||||
///sets real y position on screen. Use this, if item is added to a parent form
|
||||
virtual void setRealYPos(const int& yr){cc_yr = yr;}
|
||||
void setRealYPos(const int& yr){cc_yr = yr;}
|
||||
///sets real x and y position on screen at once. Use this, if item is added to a parent form
|
||||
virtual void setRealPos(const int& xr, const int& yr){cc_xr = xr; cc_yr = yr;}
|
||||
void setRealPos(const int& xr, const int& yr){cc_xr = xr; cc_yr = yr;}
|
||||
///get real x-position on screen. Use this, if item contains own render methods and item is bound to a form
|
||||
virtual int getRealXPos(){return cc_parent ? cc_xr : x;}
|
||||
int getRealXPos(){return cc_parent ? cc_xr : x;}
|
||||
///get real y-position on screen. Use this, if item contains own render methods and item is bound to a form
|
||||
virtual int getRealYPos(){return cc_parent ? cc_yr : y;}
|
||||
int getRealYPos(){return cc_parent ? cc_yr : y;}
|
||||
|
||||
///do center item on screen or within a parent form, parameter along_mode assigns direction of centering
|
||||
virtual void setCenterPos(int along_mode = CC_ALONG_X | CC_ALONG_Y);
|
||||
void setCenterPos(int along_mode = CC_ALONG_X | CC_ALONG_Y);
|
||||
|
||||
///set item height, parameter as uint8_t, as percent value related to current height of parent form or screen
|
||||
virtual void setHeightP(const uint8_t& h_percent);
|
||||
void setHeightP(const uint8_t& h_percent);
|
||||
///set item width, parameter as uint8_t, as percent value related to current width of parent form or screen
|
||||
virtual void setWidthP(const uint8_t& w_percent);
|
||||
void setWidthP(const uint8_t& w_percent);
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@@ -155,21 +155,21 @@ class CComponentsPicture : public CComponentsItem
|
||||
int getHeight();
|
||||
|
||||
///set width of object and image, value >0 causes scale of image, parameter keep_aspect = true causes scaling of height with same aspect, default = false
|
||||
virtual void setWidth(const int& w, bool keep_aspect = false);
|
||||
void setWidth(const int& w, bool keep_aspect = false);
|
||||
///set height of object and image, value >0 causes scale of image, parameter keep_aspect = true causes scaling of width with same aspect, , default = false
|
||||
virtual void setHeight(const int& h, bool keep_aspect = false);
|
||||
void setHeight(const int& h, bool keep_aspect = false);
|
||||
///set width of object and image related to current screen size, see also CComponentsItem::setWidthP(), parameter as uint8_t
|
||||
virtual void setWidthP(const uint8_t& w_percent){CComponentsItem::setWidthP(w_percent), do_scale = true; need_init = hasChanges(); initCCItem();}
|
||||
void setWidthP(const uint8_t& w_percent){CComponentsItem::setWidthP(w_percent), do_scale = true; need_init = hasChanges(); initCCItem();}
|
||||
///set height of object and image related to current screen size, see also CComponentsItem::setHeightP(), parameter as uint8_t
|
||||
virtual void setHeightP(const uint8_t& h_percent){CComponentsItem::setHeightP(h_percent), do_scale = true; need_init = hasChanges(); initCCItem();}
|
||||
void setHeightP(const uint8_t& h_percent){CComponentsItem::setHeightP(h_percent), do_scale = true; need_init = hasChanges(); initCCItem();}
|
||||
|
||||
///set screen x-position, parameter as int
|
||||
virtual void setXPos(const int& xpos);
|
||||
void setXPos(const int& xpos);
|
||||
///set screen y-position, parameter as int
|
||||
virtual void setYPos(const int& ypos);
|
||||
void setYPos(const int& ypos);
|
||||
|
||||
///return paint mode of internal image, true=image was painted, please do not to confuse with isPainted()! isPainted() is related to item itself.
|
||||
virtual inline bool isPicPainted(){return is_image_painted;};
|
||||
bool isPicPainted(){return is_image_painted;};
|
||||
|
||||
/**sets transparency mode if icons
|
||||
* @param[in] t Transparency mode
|
||||
@@ -179,18 +179,18 @@ class CComponentsPicture : public CComponentsItem
|
||||
void SetTransparent(int t){ image_transparent = t; }
|
||||
|
||||
///paint item
|
||||
virtual void paint(bool do_save_bg = CC_SAVE_SCREEN_YES);
|
||||
void paint(bool do_save_bg = CC_SAVE_SCREEN_YES);
|
||||
///hide item, see also CComponents::hide();
|
||||
virtual void hide();
|
||||
void hide();
|
||||
|
||||
virtual bool hasChanges();
|
||||
bool hasChanges();
|
||||
|
||||
///remove possible cache
|
||||
virtual void clearCache();
|
||||
void clearCache();
|
||||
///enable/disable image cache
|
||||
virtual void enableCache(bool enable = true){if (enable_cache == enable) return; enable_cache = enable; if (!enable_cache) clearCache();}
|
||||
void enableCache(bool enable = true){if (enable_cache == enable) return; enable_cache = enable; if (!enable_cache) clearCache();}
|
||||
///disable image cache, makes clean up too
|
||||
virtual void disableCache(){enableCache(false);}
|
||||
void disableCache(){enableCache(false);}
|
||||
};
|
||||
|
||||
class CComponentsChannelLogo : public CComponentsPicture
|
||||
|
Reference in New Issue
Block a user