Ardour  9.0-pre0-582-g084a23a80d
libs/widgets/widgets/ui_config.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2017 Robin Gareus <robin@gareus.org>
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 2 of the License, or
7  * (at your option) any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License along
15  * with this program; if not, write to the Free Software Foundation, Inc.,
16  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
17  */
18 
19 #ifndef _WIDGETS_UI_BASE_H_
20 #define _WIDGETS_UI_BASE_H_
21 
22 #include <cassert>
23 
24 #include <pangomm/fontdescription.h>
25 
26 #include "pbd/configuration.h"
27 #include "gtkmm2ext/colors.h"
28 
29 #include "widgets/visibility.h"
30 
31 namespace ArdourWidgets {
32 
34 {
35 protected:
36  virtual ~UIConfigurationBase() { _instance = 0; }
38 
39 public:
40  static UIConfigurationBase& instance() { return *_instance; }
41 
42  sigc::signal<void> DPIReset;
43  sigc::signal<void> ColorsChanged;
44 
45  virtual float get_ui_scale () = 0;
46  virtual bool get_all_floating_windows_are_dialogs () const = 0;
47  virtual bool get_widget_prelight () const = 0;
48  virtual Gtkmm2ext::Color color (const std::string&, bool* failed = 0) const = 0;
49 
50  virtual Pango::FontDescription get_NormalFont () const = 0;
51  virtual Pango::FontDescription get_SmallFont () const = 0;
52  virtual Pango::FontDescription get_NormalMonospaceFont () const = 0;
53  virtual Pango::FontDescription get_SmallMonospaceFont () const = 0;
54  virtual Pango::FontDescription get_ArdourSmallFont () const = 0;
55 };
56 
57 }
58 #endif
virtual bool get_all_floating_windows_are_dialogs() const =0
virtual Pango::FontDescription get_SmallMonospaceFont() const =0
virtual bool get_widget_prelight() const =0
virtual Pango::FontDescription get_NormalMonospaceFont() const =0
virtual Gtkmm2ext::Color color(const std::string &, bool *failed=0) const =0
virtual Pango::FontDescription get_NormalFont() const =0
virtual Pango::FontDescription get_ArdourSmallFont() const =0
virtual Pango::FontDescription get_SmallFont() const =0
uint32_t Color
Definition: colors.h:33
#define LIBWIDGETS_API