X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=gtk2_ardour%2Futils.h;h=5d7bf000ea619b38a27aedf350d674a2d0e30dda;hb=01e0f512232fe73c18339f368c90f581a5bebdb2;hp=d511b0e718166cc2959a52269880a289f85484db;hpb=7d32cf3813b7145b98c86b59867092e04aa2621a;p=ardour.git diff --git a/gtk2_ardour/utils.h b/gtk2_ardour/utils.h index d511b0e718..5d7bf000ea 100644 --- a/gtk2_ardour/utils.h +++ b/gtk2_ardour/utils.h @@ -44,14 +44,7 @@ namespace Gtk { extern sigc::signal DPIReset; -std::string fit_to_pixels (const std::string&, int pixel_width, Pango::FontDescription& font, int& actual_width, bool with_ellipses = false); - -std::pair fit_to_pixels (cairo_t *, std::string, double); - -int pixel_width (const std::string& str, Pango::FontDescription& font); - gint just_hide_it (GdkEventAny*, Gtk::Window*); -void allow_keyboard_focus (bool); void add_item_with_sensitivity (Gtk::Menu_Helpers::MenuList &, Gtk::Menu_Helpers::MenuElem, bool); unsigned char* xpm2rgb (const char** xpm, uint32_t& w, uint32_t& h); @@ -63,9 +56,7 @@ Pango::FontDescription get_font_for_style (std::string widgetname); uint32_t rgba_from_style (std::string, uint32_t, uint32_t, uint32_t, uint32_t, std::string = "fg", int = Gtk::STATE_NORMAL, bool = true); -Gdk::Color color_from_style (std::string widget_style_name, int state, std::string attr); -Glib::RefPtr gc_from_style (std::string widget_style_name, int state, std::string attr); - +bool rgba_p_from_style (std::string, float*, float*, float*, std::string = "fg", int = Gtk::STATE_NORMAL); void decorate (Gtk::Window& w, Gdk::WMDecoration d); @@ -76,6 +67,7 @@ void set_color (Gdk::Color&, int); bool relay_key_press (GdkEventKey* ev, Gtk::Window* win); bool forward_key_press (GdkEventKey* ev); bool key_press_focus_accelerator_handler (Gtk::Window& window, GdkEventKey* ev); +bool emulate_key_event (Gtk::Widget*, unsigned int); Glib::RefPtr get_xpm (std::string); std::string get_icon_path (const char*); @@ -90,6 +82,7 @@ void set_pango_fontsize (); void resize_window_to_proportion_of_monitor (Gtk::Window*, int, int); std::string escape_underscores (std::string const &); +std::string escape_angled_brackets (std::string const &); Gdk::Color unique_random_color (std::list &);