diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2016-07-11 09:07:52 -0400 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2016-09-27 14:59:31 -0500 |
commit | 4cc71d296673bddb64043dff2d27c2f30d9aff0f (patch) | |
tree | 83559cc95d82684674a800744127666fc553081e /libs/surfaces/push2/push2.h | |
parent | 79025e8c420dbc4b2b28686a435c9e7f321520d8 (diff) |
push2: parameterize and centralize colors
Diffstat (limited to 'libs/surfaces/push2/push2.h')
-rw-r--r-- | libs/surfaces/push2/push2.h | 28 |
1 files changed, 27 insertions, 1 deletions
diff --git a/libs/surfaces/push2/push2.h b/libs/surfaces/push2/push2.h index eb6fc49e7a..df6f0fa772 100644 --- a/libs/surfaces/push2/push2.h +++ b/libs/surfaces/push2/push2.h @@ -282,6 +282,25 @@ class Push2 : public ARDOUR::ControlProtocol : Button (bb, ex, press, release, long_press) {} }; + enum ColorName { + DarkBackground, + LightBackground, + + ParameterName, + + KnobArcBackground, + KnobArcStart, + KnobArcEnd, + + KnobLine, + KnobLineShadow, + + KnobForeground, + KnobBackground, + KnobShadow, + KnobBorder, + }; + public: Push2 (ARDOUR::Session&); ~Push2 (); @@ -329,6 +348,7 @@ class Push2 : public ARDOUR::ControlProtocol void write (const MidiByteArray&); uint8_t get_color_index (uint32_t rgb); + uint32_t get_color (ColorName); static const int cols; static const int rows; @@ -536,13 +556,19 @@ class Push2 : public ARDOUR::ControlProtocol bool percussion; void set_percussive_mode (bool); - /* color map */ + /* color map (device side) */ typedef std::map<uint32_t,uint8_t> ColorMap; typedef std::stack<uint8_t> ColorMapFreeList; ColorMap color_map; ColorMapFreeList color_map_free_list; void build_color_map (); + + /* our own colors */ + + typedef std::map<ColorName,uint32_t> Colors; + Colors colors; + void fill_color_table (); }; } /* namespace */ |