From: Paul Davis Date: Fri, 13 Jun 2014 11:30:09 +0000 (-0400) Subject: add CANVAS_STRING_VARIABLE, the first step in being able to avoid using GTK rc files... X-Git-Tag: 4.0-rc1~1601^2~924 X-Git-Url: https://main.carlh.net/gitweb/?a=commitdiff_plain;h=d6c41f393588544af3276896abc1ac34acadd53a;p=ardour.git 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 --- 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 var; +#define CANVAS_STRING_VARIABLE(var,name) UIConfigVariable var; #include "canvas_vars.h" #undef CANVAS_VARIABLE +#undef CANVAS_STRING_VARIABLE XMLNode& state (); bool _dirty;