From ce4710deb0c1bcdeb0c63e21a7525da66048a31f Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Thu, 24 Apr 2014 23:02:37 +0200 Subject: [PATCH] CComponentsHeader: add icons to button collection for use in headers or footers Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/9955fa92034203abbc95b5c46a8141500a19fd09 Author: Thilo Graf Date: 2014-04-24 (Thu, 24 Apr 2014) --- src/gui/components/cc_frm_header.cpp | 30 ++++++++++++++++++++++++++++ src/gui/components/cc_frm_header.h | 25 ++++++++++++++++++----- 2 files changed, 50 insertions(+), 5 deletions(-) diff --git a/src/gui/components/cc_frm_header.cpp b/src/gui/components/cc_frm_header.cpp index c761d73ac..80b6236a1 100644 --- a/src/gui/components/cc_frm_header.cpp +++ b/src/gui/components/cc_frm_header.cpp @@ -249,6 +249,36 @@ void CComponentsHeader::addContextButton(const int& buttons) addContextButton(NEUTRINO_ICON_BUTTON_INFO); if (buttons & CC_BTN_MENU) addContextButton(NEUTRINO_ICON_BUTTON_MENU); + if (buttons & CC_BTN_MUTE_ZAP_ACTIVE ) + addContextButton(NEUTRINO_ICON_BUTTON_MUTE_ZAP_ACTIVE); + if (buttons & CC_BTN_MUTE_ZAP_INACTIVE ) + addContextButton(NEUTRINO_ICON_BUTTON_MUTE_ZAP_INACTIVE); + if (buttons & CC_BTN_OKAY) + addContextButton(NEUTRINO_ICON_BUTTON_OKAY); + if (buttons & CC_BTN_MUTE) + addContextButton(NEUTRINO_ICON_BUTTON_MUTE); + if (buttons & CC_BTN_TOP) + addContextButton(NEUTRINO_ICON_BUTTON_TOP); + if (buttons & CC_BTN_DOWN) + addContextButton(NEUTRINO_ICON_BUTTON_DOWN); + if (buttons & CC_BTN_RIGHT) + addContextButton(NEUTRINO_ICON_BUTTON_RIGHT); + if (buttons & CC_BTN_LEFT) + addContextButton(NEUTRINO_ICON_BUTTON_LEFT); + if (buttons & CC_BTN_FORWARD) + addContextButton(NEUTRINO_ICON_BUTTON_FORWARD); + if (buttons & CC_BTN_BACKWARD) + addContextButton(NEUTRINO_ICON_BUTTON_BACKWARD); + if (buttons & CC_BTN_PAUSE) + addContextButton(NEUTRINO_ICON_BUTTON_PAUSE); + if (buttons & CC_BTN_PLAY) + addContextButton(NEUTRINO_ICON_BUTTON_PLAY); + if (buttons & CC_BTN_RECORD_ACTIVE) + addContextButton(NEUTRINO_ICON_BUTTON_RECORD_ACTIVE); + if (buttons & CC_BTN_RECORD_INACTIVE) + addContextButton(NEUTRINO_ICON_BUTTON_RECORD_INACTIVE); + if (buttons & CC_BTN_RECORD_STOP) + addContextButton(NEUTRINO_ICON_BUTTON_STOP); } void CComponentsHeader::removeContextButtons() diff --git a/src/gui/components/cc_frm_header.h b/src/gui/components/cc_frm_header.h index d30522d0b..76d015df5 100644 --- a/src/gui/components/cc_frm_header.h +++ b/src/gui/components/cc_frm_header.h @@ -153,12 +153,27 @@ class CComponentsHeader : public CComponentsForm enum { - CC_BTN_HELP = 0x02, - CC_BTN_INFO = 0x04, - CC_BTN_MENU = 0x40, - CC_BTN_EXIT = 0x80 - + CC_BTN_HELP = 0x02, + CC_BTN_INFO = 0x04, + CC_BTN_MENU = 0x40, + CC_BTN_EXIT = 0x80, + CC_BTN_MUTE_ZAP_ACTIVE = 0x100, + CC_BTN_MUTE_ZAP_INACTIVE = 0x200, + CC_BTN_OKAY = 0x400, + CC_BTN_MUTE = 0x800, + CC_BTN_TOP = 0x1000, + CC_BTN_DOWN = 0x2000, + CC_BTN_RIGHT = 0x4000, + CC_BTN_LEFT = 0x8000, + CC_BTN_FORWARD = 0x10000, + CC_BTN_BACKWARD = 0x20000, + CC_BTN_PAUSE = 0x40000, + CC_BTN_PLAY = 0x80000, + CC_BTN_RECORD_ACTIVE = 0x100000, + CC_BTN_RECORD_INACTIVE = 0x200000, + CC_BTN_RECORD_STOP = 0x400000 }; + ///set offset between icons within context button object virtual void setButtonsSpace(const int buttons_space){cch_buttons_space = buttons_space;};