diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2014-06-13 07:30:09 -0400 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2014-06-13 07:30:27 -0400 |
commit | d6c41f393588544af3276896abc1ac34acadd53a (patch) | |
tree | 5dc521570cfe0756c60e5eb6668204fccd854341 /gtk2_ardour/ui_config.h | |
parent | 3573b4ee0a71ecdd216a12591b1d981479403d15 (diff) |
add CANVAS_STRING_VARIABLE, the first step in being able to avoid using GTK rc files for font specifications
Still needs a way to generate the font specs at build time to account for platform differences
Diffstat (limited to 'gtk2_ardour/ui_config.h')
-rw-r--r-- | gtk2_ardour/ui_config.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/gtk2_ardour/ui_config.h b/gtk2_ardour/ui_config.h index bfa8859afd..46dd8e9806 100644 --- a/gtk2_ardour/ui_config.h +++ b/gtk2_ardour/ui_config.h @@ -101,11 +101,16 @@ class UIConfiguration : public PBD::Stateful #include "ui_config_vars.h" #undef UI_CONFIG_VARIABLE #undef CANVAS_VARIABLE +#undef CANVAS_STRING_VARIABLE #define CANVAS_VARIABLE(var,name) \ uint32_t get_##var () const { return var.get(); } \ bool set_##var (uint32_t val) { bool ret = var.set (val); if (ret) { ParameterChanged (name); } return ret; } +#define CANVAS_STRING_VARIABLE(var,name) \ + std::string get_##var () const { return var.get(); } \ + bool set_##var (const std::string& val) { bool ret = var.set (val); if (ret) { ParameterChanged (name); } return ret; } #include "canvas_vars.h" #undef CANVAS_VARIABLE +#undef CANVAS_STRING_VARIABLE private: @@ -118,8 +123,10 @@ class UIConfiguration : public PBD::Stateful #undef CANVAS_VARIABLE #define CANVAS_VARIABLE(var,name) UIConfigVariable<uint32_t> var; +#define CANVAS_STRING_VARIABLE(var,name) UIConfigVariable<std::string> var; #include "canvas_vars.h" #undef CANVAS_VARIABLE +#undef CANVAS_STRING_VARIABLE XMLNode& state (); bool _dirty; |