From eb6a8c41a2e128f33223b5d1530742b68873aa6b Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Wed, 14 Mar 2018 15:19:01 +0100 Subject: [PATCH] CComponentsIconForm: add member to add any number of identical icons Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/5f8722dc92f40b278c30d56e55aaadd5c014c32d Author: Thilo Graf Date: 2018-03-14 (Wed, 14 Mar 2018) --- src/gui/components/cc_frm_icons.cpp | 10 ++++++++++ src/gui/components/cc_frm_icons.h | 5 +++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/src/gui/components/cc_frm_icons.cpp b/src/gui/components/cc_frm_icons.cpp index f0ae5b90d..24a38323e 100644 --- a/src/gui/components/cc_frm_icons.cpp +++ b/src/gui/components/cc_frm_icons.cpp @@ -93,6 +93,16 @@ void CComponentsIconForm::addIcon(std::vector icon_name) addIcon(icon_name[i]); } +void CComponentsIconForm::addIcons(const std::string& icon_name, const size_t& count) +{ + if (count == 0){ + dprintf(DEBUG_ &v_icon_names, + const std::vector &v_icon_names = std::vector(), CComponentsForm *parent = NULL, int shadow_mode = CC_SHADOW_OFF, fb_pixel_t color_frame = COL_FRAME_PLUS_0, @@ -54,6 +54,7 @@ class CComponentsIconForm : public CComponentsFrmChain void addIcon(const std::string& icon_name); void addIcon(std::vector icon_name); + void addIcons(const std::string& icon_name, const size_t& count = 1); void removeIcons(){v_icons.clear();}; void insertIcon(const uint& icon_id, const std::string& icon_name); void removeIcon(const uint& icon_id);