ardour
Functions | Variables
ARDOUR_UI_UTILS Namespace Reference

Functions

bool relay_key_press (GdkEventKey *ev, Gtk::Window *win)
 
bool forward_key_press (GdkEventKey *ev)
 
Glib::RefPtr< Gdk::Pixbuf > get_icon (const char *cname)
 
gint just_hide_it (GdkEventAny *, Gtk::Window *)
 
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)
 
unsigned char * xpm2rgba (const char **xpm, uint32_t &w, uint32_t &h)
 
ArdourCanvas::Points * get_canvas_points (std::string who, uint32_t npoints)
 
Pango::FontDescription sanitized_font (std::string const &)
 
Pango::FontDescription get_font_for_style (std::string widgetname)
 
void decorate (Gtk::Window &w, Gdk::WMDecoration d)
 
void set_color_from_rgb (Gdk::Color &, uint32_t)
 
void set_color_from_rgba (Gdk::Color &, uint32_t)
 
uint32_t gdk_color_to_rgba (Gdk::Color const &)
 
uint32_t contrasting_text_color (uint32_t c)
 
bool key_press_focus_accelerator_handler (Gtk::Window &window, GdkEventKey *ev)
 
bool emulate_key_event (Gtk::Widget *, unsigned int)
 
Glib::RefPtr< Gdk::Pixbuf > get_xpm (std::string)
 
std::vector< std::string > get_icon_sets ()
 
std::string get_icon_path (const char *, std::string icon_set=std::string(), bool is_image=true)
 
Glib::RefPtr< Gdk::Pixbuf > get_icon (const char *, std::string icon_set=std::string())
 
const char *const * get_xpm_data (std::string path)
 
std::string longest (std::vector< std::string > &)
 
bool key_is_legal_for_numeric_entry (guint keyval)
 
void reset_dpi ()
 
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< Gdk::Color > &)
 
std::string rate_as_string (float r)
 

Variables

sigc::signal< void > ColorsChanged
 
sigc::signal< void > DPIReset
 
static std::map< std::string,
Glib::RefPtr< Gdk::Pixbuf > > 
xpm_map
 

Function Documentation

void ARDOUR_UI_UTILS::add_item_with_sensitivity ( Gtk::Menu_Helpers::MenuList &  ,
Gtk::Menu_Helpers::MenuElem  ,
bool   
)
uint32_t ARDOUR_UI_UTILS::contrasting_text_color ( uint32_t  c)
void ARDOUR_UI_UTILS::decorate ( Gtk::Window &  w,
Gdk::WMDecoration  d 
)
bool ARDOUR_UI_UTILS::emulate_key_event ( Gtk::Widget *  w,
unsigned int  keyval 
)

Definition at line 323 of file utils.cc.

std::string ARDOUR_UI_UTILS::escape_angled_brackets ( std::string const &  )
std::string ARDOUR_UI_UTILS::escape_underscores ( std::string const &  )
bool ARDOUR_UI_UTILS::forward_key_press ( GdkEventKey *  ev)

Definition at line 317 of file utils.cc.

uint32_t ARDOUR_UI_UTILS::gdk_color_to_rgba ( Gdk::Color const &  c)

Definition at line 285 of file utils.cc.

ArdourCanvas::Points* ARDOUR_UI_UTILS::get_canvas_points ( std::string  who,
uint32_t  npoints 
)
Pango::FontDescription ARDOUR_UI_UTILS::get_font_for_style ( std::string  widgetname)
Glib::RefPtr<Gdk::Pixbuf> ARDOUR_UI_UTILS::get_icon ( const char *  ,
std::string  icon_set = std::string() 
)
Glib::RefPtr<Gdk::Pixbuf> ARDOUR_UI_UTILS::get_icon ( const char *  cname)

Definition at line 674 of file utils.cc.

std::string ARDOUR_UI_UTILS::get_icon_path ( const char *  ,
std::string  icon_set = std::string(),
bool  is_image = true 
)
vector< string > ARDOUR_UI_UTILS::get_icon_sets ( )

Definition at line 591 of file utils.cc.

Glib::RefPtr< Gdk::Pixbuf > ARDOUR_UI_UTILS::get_xpm ( std::string  name)

Definition at line 566 of file utils.cc.

const char* const* ARDOUR_UI_UTILS::get_xpm_data ( std::string  path)
gint ARDOUR_UI_UTILS::just_hide_it ( GdkEventAny *  ,
Gtk::Window *  win 
)

Definition at line 92 of file utils.cc.

bool ARDOUR_UI_UTILS::key_is_legal_for_numeric_entry ( guint  keyval)

Definition at line 718 of file utils.cc.

bool ARDOUR_UI_UTILS::key_press_focus_accelerator_handler ( Gtk::Window &  window,
GdkEventKey *  ev 
)

Definition at line 410 of file utils.cc.

std::string ARDOUR_UI_UTILS::longest ( std::vector< std::string > &  )
string ARDOUR_UI_UTILS::rate_as_string ( float  r)

Definition at line 914 of file utils.cc.

bool ARDOUR_UI_UTILS::relay_key_press ( GdkEventKey *  ev,
Gtk::Window *  win 
)

Definition at line 301 of file utils.cc.

void ARDOUR_UI_UTILS::reset_dpi ( )

Definition at line 819 of file utils.cc.

void ARDOUR_UI_UTILS::resize_window_to_proportion_of_monitor ( Gtk::Window *  window,
int  max_width,
int  max_height 
)

Definition at line 831 of file utils.cc.

Pango::FontDescription ARDOUR_UI_UTILS::sanitized_font ( std::string const &  name)

Returns a Pango::FontDescription given a string describing the font.

If the returned FontDescription does not specify a family, then the family is set to "Sans". This mirrors GTK's behaviour in gtkstyle.c.

Some environments will force Pango to specify the family even if it was not specified in the string describing the font. Such environments should be left unaffected by this function, since the font family will be left alone.

There may be other similar font specification enforcement that we might add here later.

Definition at line 226 of file utils.cc.

void ARDOUR_UI_UTILS::set_color_from_rgb ( Gdk::Color &  c,
uint32_t  rgb 
)

Definition at line 267 of file utils.cc.

void ARDOUR_UI_UTILS::set_color_from_rgba ( Gdk::Color &  c,
uint32_t  rgba 
)

Definition at line 276 of file utils.cc.

void ARDOUR_UI_UTILS::set_pango_fontsize ( )

Definition at line 803 of file utils.cc.

Gdk::Color ARDOUR_UI_UTILS::unique_random_color ( std::list< Gdk::Color > &  used_colors)

Definition at line 873 of file utils.cc.

unsigned char * ARDOUR_UI_UTILS::xpm2rgb ( const char **  xpm,
uint32_t &  w,
uint32_t &  h 
)

Definition at line 107 of file utils.cc.

unsigned char * ARDOUR_UI_UTILS::xpm2rgba ( const char **  xpm,
uint32_t &  w,
uint32_t &  h 
)

Definition at line 149 of file utils.cc.

Variable Documentation

sigc::signal< void > ARDOUR_UI_UTILS::ColorsChanged

Definition at line 63 of file theme_manager.cc.

sigc::signal< void > ARDOUR_UI_UTILS::DPIReset

Definition at line 68 of file utils.cc.

std::map<std::string, Glib::RefPtr<Gdk::Pixbuf> > ARDOUR_UI_UTILS::xpm_map
static

Definition at line 81 of file utils.h.