20 #ifndef __ardour_gtk_utils_h__
21 #define __ardour_gtk_utils_h__
29 #include <gdkmm/types.h>
30 #include <gtkmm/menushell.h>
32 #include "canvas/types.h"
36 class ScopedConnectionList;
57 unsigned char*
xpm2rgb (
const char** xpm, uint32_t& w, uint32_t& h);
58 unsigned char*
xpm2rgba (
const char** xpm, uint32_t& w, uint32_t& h);
65 void decorate (Gtk::Window& w, Gdk::WMDecoration d);
77 Glib::RefPtr<Gdk::Pixbuf>
get_xpm (std::string);
79 std::string
get_icon_path (
const char*, std::string icon_set = std::string(),
bool is_image =
true);
80 Glib::RefPtr<Gdk::Pixbuf>
get_icon (
const char*, std::string icon_set = std::string());
81 static std::map<std::string, Glib::RefPtr<Gdk::Pixbuf> >
xpm_map;
83 std::string
longest (std::vector<std::string>&);
bool relay_key_press(GdkEventKey *ev, Gtk::Window *win)
Gdk::Color unique_random_color(std::list< Gdk::Color > &)
unsigned char * xpm2rgba(const char **xpm, uint32_t &w, uint32_t &h)
static std::map< std::string, Glib::RefPtr< Gdk::Pixbuf > > xpm_map
void resize_window_to_proportion_of_monitor(Gtk::Window *, int, int)
Pango::FontDescription sanitized_font(std::string const &)
bool emulate_key_event(Gtk::Widget *, unsigned int)
sigc::signal< void > DPIReset
Pango::FontDescription get_font_for_style(std::string widgetname)
bool forward_key_press(GdkEventKey *ev)
bool key_press_focus_accelerator_handler(Gtk::Window &window, GdkEventKey *ev)
std::vector< std::string > get_icon_sets()
unsigned char * xpm2rgb(const char **xpm, uint32_t &w, uint32_t &h)
void add_item_with_sensitivity(Gtk::Menu_Helpers::MenuList &, Gtk::Menu_Helpers::MenuElem, bool)
gint just_hide_it(GdkEventAny *, Gtk::Window *)
uint32_t gdk_color_to_rgba(Gdk::Color const &)
uint32_t contrasting_text_color(uint32_t c)
void set_color_from_rgba(Gdk::Color &, uint32_t)
std::string longest(std::vector< std::string > &)
std::string rate_as_string(float r)
void set_color_from_rgb(Gdk::Color &, uint32_t)
bool key_is_legal_for_numeric_entry(guint keyval)
void set_pango_fontsize()
const char *const * get_xpm_data(std::string path)
void decorate(Gtk::Window &w, Gdk::WMDecoration d)
ArdourCanvas::Points * get_canvas_points(std::string who, uint32_t npoints)
Glib::RefPtr< Gdk::Pixbuf > get_xpm(std::string)
std::string get_icon_path(const char *, std::string icon_set=std::string(), bool is_image=true)
std::string escape_underscores(std::string const &)
Glib::RefPtr< Gdk::Pixbuf > get_icon(const char *cname)
std::string escape_angled_brackets(std::string const &)