#include "ardour/version.h"
#include "ardour/filesystem_paths.h"
-#include "utils.h"
#include "version.h"
#include "about.h"
#include "gtkmm2ext/actions.h"
-#include "utils.h"
#include "actions.h"
#include "i18n.h"
using namespace std;
using namespace PBD;
using namespace ARDOUR;
+using namespace ARDOUR_UI_UTILS;
std::vector<std::string> AddRouteDialog::channel_combo_strings;
#include "ardour/session.h"
#include "ardour_ui.h"
-#include "utils.h"
#include "add_video_dialog.h"
#include "utils_videotl.h"
#include "i18n.h"
, _hovering (false)
, _focused (false)
{
- ColorsChanged.connect (sigc::mem_fun (*this, &ArdourButton::color_handler));
+ ARDOUR_UI_UTILS::ColorsChanged.connect (sigc::mem_fun (*this, &ArdourButton::color_handler));
}
ArdourButton::ArdourButton (const std::string& str, Element e)
using namespace std;
using namespace Gtk;
using namespace Gtkmm2ext;
+using namespace ARDOUR_UI_UTILS;
ArdourDialog::ArdourDialog (string title, bool modal, bool use_seperator)
: Dialog (title, modal, use_seperator)
#include "i18n.h"
using namespace ARDOUR;
+using namespace ARDOUR_UI_UTILS;
using namespace PBD;
using namespace Gtkmm2ext;
using namespace Gtk;
using namespace Gtkmm2ext;
using namespace Gtk;
using namespace Glib;
+using namespace ARDOUR_UI_UTILS;
int
ARDOUR_UI::setup_windows ()
#include "actions.h"
#include "mixer_ui.h"
#include "startup.h"
-#include "utils.h"
#include "window_manager.h"
#include "global_port_matrix.h"
#include "location_ui.h"
using namespace std;
using namespace Gtk;
using namespace Gtkmm2ext;
+using namespace ARDOUR_UI_UTILS;
ArdourWindow::ArdourWindow (string title)
: Window ()
#include "i18n.h"
using namespace ARDOUR;
+using namespace ARDOUR_UI_UTILS;
using namespace PBD;
using namespace Gtk;
using namespace std;
#include "audio_region_editor.h"
#include "audio_region_view.h"
#include "ardour_ui.h"
-#include "utils.h"
#include "gui_thread.h"
#include "i18n.h"
#include "control_point.h"
#include "ghostregion.h"
#include "audio_time_axis.h"
-#include "utils.h"
#include "rgb_macros.h"
#include "gui_thread.h"
#include "ardour_ui.h"
#include "ardour_ui.h"
#include "rgb_macros.h"
#include "gui_thread.h"
-#include "utils.h"
#include "i18n.h"
using namespace std;
using namespace ARDOUR;
+using namespace ARDOUR_UI_UTILS;
using namespace PBD;
using namespace Gtk;
using namespace Editing;
#include "ardour/session.h"
#include "ardour_ui.h"
-#include "utils.h"
#include "automation_controller.h"
#include "gui_thread.h"
#include "rgb_macros.h"
#include "ardour_ui.h"
#include "public_editor.h"
-#include "utils.h"
#include "selection.h"
#include "time_axis_view.h"
#include "point_selection.h"
#include "ardour_ui.h"
#include "rgb_macros.h"
#include "gui_thread.h"
-#include "utils.h"
using namespace std;
using namespace ARDOUR;
using namespace std;
using namespace ARDOUR;
+using namespace ARDOUR_UI_UTILS;
using namespace PBD;
using namespace Gtk;
using namespace Gtkmm2ext;
using namespace Gtk;
using namespace Gtkmm2ext;
using namespace ARDOUR;
+using namespace ARDOUR_UI_UTILS;
list<Gdk::Color> AxisView::used_colors;
using std::min;
using std::string;
+using namespace ARDOUR_UI_UTILS;
BigClockWindow::BigClockWindow (AudioClock& c)
: ArdourWindow (_("Big Clock"))
using namespace std;
using namespace ARDOUR;
+using namespace ARDOUR_UI_UTILS;
BundleEditorMatrix::BundleEditorMatrix (Gtk::Window* parent, Session* session, boost::shared_ptr<Bundle> bundle)
: PortMatrix (parent, session, DataType::NIL)
#include "crossfade_edit.h"
#include "rgb_macros.h"
#include "keyboard.h"
-#include "utils.h"
#include "gui_thread.h"
#include "actions.h"
using namespace std;
using namespace ARDOUR;
+using namespace ARDOUR_UI_UTILS;
using namespace PBD;
using namespace Gtk;
using namespace Glib;
using namespace Glib;
using namespace std;
using namespace ARDOUR;
+using namespace ARDOUR_UI_UTILS;
using namespace PBD;
using namespace Editing;
#include "audio_time_axis.h"
#include "midi_time_axis.h"
#include "session_import_dialog.h"
-#include "utils.h"
#include "gui_thread.h"
#include "interthread_progress_window.h"
#include "mouse_cursors.h"
using namespace std;
using namespace ARDOUR;
+using namespace ARDOUR_UI_UTILS;
using namespace PBD;
using namespace Gtk;
using namespace Glib;
#include "canvas/debug.h"
#include "canvas/scroll_group.h"
-#include "utils.h"
#include "editor_cursors.h"
#include "editor.h"
*/
#include "pbd/signals.h"
+#include "ardour/types.h"
#include "canvas/arrow.h"
#include "canvas/line.h"
#include "ardour_ui.h"
#include "gui_thread.h"
#include "control_point.h"
-#include "utils.h"
#include "region_gain_line.h"
#include "editor_drag.h"
#include "audio_time_axis.h"
using namespace std;
using namespace ARDOUR;
+using namespace ARDOUR_UI_UTILS;
EditorGroupTabs::EditorGroupTabs (Editor* e)
: EditorComponent (e)
#include "automation_time_axis.h"
#include "control_point.h"
#include "prompter.h"
-#include "utils.h"
#include "selection.h"
#include "keyboard.h"
#include "editing.h"
#include "strip_silence_dialog.h"
#include "time_axis_view.h"
#include "transpose_dialog.h"
-#include "utils.h"
#include "i18n.h"
if (!lock_dialog) {
lock_dialog = new Gtk::Dialog (string_compose (_("%1: Locked"), PROGRAM_NAME), true);
- Gtk::Image* padlock = manage (new Gtk::Image (::get_icon ("padlock_closed")));
+ Gtk::Image* padlock = manage (new Gtk::Image (ARDOUR_UI_UTILS::get_icon ("padlock_closed")));
lock_dialog->get_vbox()->pack_start (*padlock);
ArdourButton* b = manage (new ArdourButton);
using namespace std;
using namespace ARDOUR;
+using namespace ARDOUR_UI_UTILS;
using namespace PBD;
using namespace Gtk;
using namespace Glib;
using namespace std;
using namespace ARDOUR;
+using namespace ARDOUR_UI_UTILS;
using namespace PBD;
using namespace Gtk;
using Gtkmm2ext::Keyboard;
using namespace std;
using namespace ARDOUR;
+using namespace ARDOUR_UI_UTILS;
using namespace PBD;
using namespace Gtk;
using namespace Gtkmm2ext;
#include "time_axis_view.h"
#include "editor_drag.h"
#include "editor_cursors.h"
-#include "utils.h"
#include "i18n.h"
using namespace PBD;
using namespace Gtk;
using namespace ARDOUR;
+using namespace ARDOUR_UI_UTILS;
EditorSnapshots::EditorSnapshots (Editor* e)
: EditorComponent (e)
#include "time_axis_view.h"
#include "ardour_ui.h"
#include "tempo_lines.h"
-#include "utils.h"
#include "i18n.h"
using namespace Gtkmm2ext;
using namespace PBD;
using namespace Glib;
+using namespace ARDOUR_UI_UTILS;
static const unsigned int midi_tab = 2;
static const unsigned int latency_tab = 1; /* zero-based, page zero is the main setup page */
#include "i18n.h"
using namespace ARDOUR;
+using namespace ARDOUR_UI_UTILS;
using namespace PBD;
ExportFileNotebook::ExportFileNotebook () :
#include "ardour/session_metadata.h"
#include "ardour/broadcast_info.h"
-#include "utils.h"
#include "opts.h"
#include "export_video_dialog.h"
#include "utils_videotl.h"
#include "i18n.h"
using namespace ARDOUR;
+using namespace ARDOUR_UI_UTILS;
using namespace PBD;
using namespace Gtkmm2ext;
using namespace Gtk;
#include "ardour_ui.h"
#include "prompter.h"
#include "plugin_ui.h"
-#include "utils.h"
#include "gui_thread.h"
#include "automation_controller.h"
using namespace std;
using namespace ARDOUR;
+using namespace ARDOUR_UI_UTILS;
GlobalPortMatrix::GlobalPortMatrix (Gtk::Window* p, Session* s, DataType t)
: PortMatrix (p, s, t)
#include <sigc++/signal.h>
+namespace ARDOUR_UI_UTILS {
extern sigc::signal<void> ColorsChanged;
extern sigc::signal<void> DPIReset;
+} // namespace
#endif /* __gtk_ardour_global_signals_h__ */
using namespace std;
using namespace Gtk;
using namespace ARDOUR;
+using namespace ARDOUR_UI_UTILS;
using Gtkmm2ext::Keyboard;
list<Gdk::Color> GroupTabs::_used_colors;
#include "midi_region_view.h"
#include "public_editor.h"
-#include "utils.h"
#include "hit.h"
using namespace ARDOUR;
#include "i18n.h"
using namespace ARDOUR;
+using namespace ARDOUR_UI_UTILS;
using namespace Gtk;
IOSelector::IOSelector (Gtk::Window* p, ARDOUR::Session* session, boost::shared_ptr<ARDOUR::IO> io)
#include "actions.h"
#include "keyboard.h"
#include "keyeditor.h"
-#include "utils.h"
#include "i18n.h"
#include "i18n.h"
using namespace ARDOUR;
+using namespace ARDOUR_UI_UTILS;
using namespace PBD;
using namespace Gtkmm2ext;
using namespace Gtk;
using namespace std;
using namespace ARDOUR;
+using namespace ARDOUR_UI_UTILS;
using namespace PBD;
using namespace Gtk;
using namespace Gtkmm2ext;
#include <gtkmm2ext/utils.h>
#include "version.h"
-#include "utils.h"
#include "ardour_ui.h"
#include "opts.h"
#include "enums.h"
using namespace std;
using namespace ARDOUR;
+using namespace ARDOUR_UI_UTILS;
using namespace Gtkmm2ext;
PBD::Signal1<void,Marker*> Marker::CatchDeletion;
#include "i18n.h"
using namespace ARDOUR;
+using namespace ARDOUR_UI_UTILS;
using namespace PBD;
using namespace Gtk;
using namespace Gtkmm2ext;
#include "i18n.h"
using namespace ARDOUR;
+using namespace ARDOUR_UI_UTILS;
using namespace PBD;
using namespace Gtk;
using namespace Gtkmm2ext;
#include "i18n.h"
using namespace ARDOUR;
+using namespace ARDOUR_UI_UTILS;
using namespace PBD;
using namespace Gtk;
using namespace Glib;
#include "rgb_macros.h"
#include "selection.h"
#include "streamview.h"
-#include "utils.h"
#include "patch_change_dialog.h"
#include "verbose_cursor.h"
#include "ardour_ui.h"
using namespace std;
using namespace ARDOUR;
+using namespace ARDOUR_UI_UTILS;
using namespace PBD;
using namespace Editing;
#include "i18n.h"
using namespace ARDOUR;
+using namespace ARDOUR_UI_UTILS;
using namespace PBD;
using namespace Gtk;
using namespace Gtkmm2ext;
using namespace std;
using namespace Gtk;
using namespace ARDOUR;
+using namespace ARDOUR_UI_UTILS;
using namespace PBD;
MixerGroupTabs::MixerGroupTabs (Mixer_UI* m)
#include "i18n.h"
using namespace ARDOUR;
+using namespace ARDOUR_UI_UTILS;
using namespace PBD;
using namespace Gtk;
using namespace Gtkmm2ext;
#include "i18n.h"
using namespace ARDOUR;
+using namespace ARDOUR_UI_UTILS;
using namespace PBD;
using namespace Gtk;
using namespace Glib;
#include "i18n.h"
using namespace ARDOUR;
+using namespace ARDOUR_UI_UTILS;
using namespace Gtk;
using namespace Gtkmm2ext;
using namespace PBD;
using namespace std;
using namespace Gtk;
using namespace Gtkmm2ext;
+using namespace ARDOUR_UI_UTILS;
static const int pos_box_size = 9;
static const int lr_box_size = 15;
#include "mouse_cursors.h"
#include "editor_xpms"
+using namespace ARDOUR_UI_UTILS;
+
MouseCursors::MouseCursors ()
: cross_hair (0)
, trimmer (0)
#include "option_editor.h"
#include "gui_thread.h"
-#include "utils.h"
#include "i18n.h"
using namespace std;
using namespace std;
using namespace Gtk;
using namespace ARDOUR;
+using namespace ARDOUR_UI_UTILS;
using namespace PBD;
using Gtkmm2ext::Keyboard;
#include "ardour_ui.h"
#include "panner_ui.h"
#include "panner2d.h"
-#include "utils.h"
#include "gui_thread.h"
#include "stereo_panner.h"
#include "mono_panner.h"
using namespace std;
using namespace ARDOUR;
+using namespace ARDOUR_UI_UTILS;
using namespace PBD;
using namespace Gtkmm2ext;
using namespace Gtk;
#include "ardour/session.h"
#include "port_insert_ui.h"
-#include "utils.h"
#include "gui_thread.h"
#include "i18n.h"
using namespace std;
using namespace Gtk;
using namespace ARDOUR;
+using namespace ARDOUR_UI_UTILS;
/** PortMatrix constructor.
* @param session Our session.
#include "port_matrix_column_labels.h"
#include "port_matrix.h"
#include "port_matrix_body.h"
-#include "utils.h"
#include "i18n.h"
#include "port_matrix.h"
#include "port_matrix_body.h"
#include "i18n.h"
-#include "utils.h"
using namespace std;
#include "return_ui.h"
#include "route_processor_selection.h"
#include "send_ui.h"
-#include "utils.h"
#include "i18n.h"
class XMLNode;
struct SelectionRect;
+namespace ARDOUR_UI_UTILS {
+bool relay_key_press (GdkEventKey* ev, Gtk::Window* win);
+bool forward_key_press (GdkEventKey* ev);
+}
+
using ARDOUR::framepos_t;
using ARDOUR::framecnt_t;
static PublicEditor* _instance;
- friend bool relay_key_press (GdkEventKey*, Gtk::Window*);
- friend bool forward_key_press (GdkEventKey*);
+ friend bool ARDOUR_UI_UTILS::relay_key_press (GdkEventKey*, Gtk::Window*);
+ friend bool ARDOUR_UI_UTILS::forward_key_press (GdkEventKey*);
PBD::Signal0<void> SnapChanged;
PBD::Signal0<void> MouseModeChanged;
using namespace Gtkmm2ext;
using namespace PBD;
using namespace ARDOUR;
+using namespace ARDOUR_UI_UTILS;
class ClickOptions : public OptionEditorBox
{
#include "main_clock.h"
#include "gui_thread.h"
#include "region_editor.h"
-#include "utils.h"
#include "i18n.h"
#include "control_point.h"
#include "region_gain_line.h"
#include "audio_region_view.h"
-#include "utils.h"
#include "time_axis_view.h"
#include "editor.h"
using namespace std;
using namespace Gtk;
using namespace ARDOUR;
+using namespace ARDOUR_UI_UTILS;
RegionLayeringOrderEditor::RegionLayeringOrderEditor (PublicEditor& pe)
: ArdourWindow (_("RegionLayeringOrderEditor"))
using namespace std;
using namespace ARDOUR;
+using namespace ARDOUR_UI_UTILS;
using namespace PBD;
using namespace Editing;
using namespace Gtk;
#include "ardour/rc_configuration.h"
#include "ardour/return.h"
-#include "utils.h"
#include "return_ui.h"
#include "io_selector.h"
#include "ardour_ui.h"
#include "rhythm_ferret.h"
#include "audio_region_view.h"
#include "editor.h"
-#include "utils.h"
#include "time_axis_view.h"
#include "i18n.h"
using namespace Gtk;
using namespace ARDOUR;
+using namespace ARDOUR_UI_UTILS;
using namespace std;
using namespace PBD;
#include "return_ui.h"
#include "route_params_ui.h"
#include "send_ui.h"
-#include "utils.h"
#include "i18n.h"
#include "i18n.h"
using namespace ARDOUR;
+using namespace ARDOUR_UI_UTILS;
using namespace PBD;
using namespace Gtkmm2ext;
using namespace Gtk;
using namespace Gtk;
using namespace Gtkmm2ext;
using namespace ARDOUR;
+using namespace ARDOUR_UI_UTILS;
using namespace PBD;
uint32_t RouteUI::_max_invert_buttons = 3;
#include "ardour/send.h"
#include "ardour/rc_configuration.h"
-#include "utils.h"
#include "send_ui.h"
#include "io_selector.h"
#include "ardour_ui.h"
using namespace Glib;
using namespace PBD;
using namespace ARDOUR;
+using namespace ARDOUR_UI_UTILS;
static string poor_mans_glob (string path)
{
#include "prompter.h"
#include "sfdb_ui.h"
#include "editing.h"
-#include "utils.h"
#include "gain_meter.h"
#include "main_clock.h"
#include "public_editor.h"
sc_table.set_row_spacings (5);
sc_frame->add (sc_table);
- sc_table.attach ( *(Gtk::manage (new Gtk::Image (get_icon (X_("soundcloud"))))) , 0, 1, 0, 2);
+ sc_table.attach ( *(Gtk::manage (new Gtk::Image (ARDOUR_UI_UTILS::get_icon (X_("soundcloud"))))) , 0, 1, 0, 2);
sc_table.attach (soundcloud_username_label, 0, 1, 1, 2);
sc_table.attach (soundcloud_username_entry, 1, 3, 1, 2);
using namespace Glib;
using namespace PBD;
using namespace ARDOUR;
+using namespace ARDOUR_UI_UTILS;
ArdourStartup* ArdourStartup::the_startup = 0;
using namespace Gtkmm2ext;
using namespace PBD;
using namespace ARDOUR;
+using namespace ARDOUR_UI_UTILS;
static void
_note_off_event_handler (GtkWidget* /*widget*/, int note, gpointer arg)
using namespace std;
using namespace Gtk;
using namespace Gtkmm2ext;
+using namespace ARDOUR_UI_UTILS;
static const int pos_box_size = 8;
static const int lr_box_size = 15;
using namespace std;
using namespace ARDOUR;
+using namespace ARDOUR_UI_UTILS;
using namespace PBD;
using namespace Editing;
#include "ardour/rc_configuration.h"
#include "tempo_dialog.h"
-#include "utils.h"
#include "i18n.h"
using namespace Gtk;
using namespace PBD;
using namespace ARDOUR;
+using namespace ARDOUR_UI_UTILS;
-sigc::signal<void> ColorsChanged;
-sigc::signal<void,uint32_t> ColorChanged;
+namespace ARDOUR_UI_UTILS {
+ sigc::signal<void> ColorsChanged;
+ sigc::signal<void,uint32_t> ColorChanged;
+}
ThemeManager::ThemeManager()
: ArdourWindow (_("Theme Manager"))
using namespace Gtk;
using namespace Gdk;
using namespace ARDOUR;
+using namespace ARDOUR_UI_UTILS;
using namespace PBD;
using namespace Editing;
using namespace ArdourCanvas;
using namespace Glib;
using namespace PBD;
using namespace ARDOUR;
+using namespace ARDOUR_UI_UTILS;
using namespace Gtkmm2ext;
Pango::FontDescription TimeAxisViewItem::NAME_FONT;
#include "ardour_ui.h"
#include "gui_thread.h"
-#include "utils.h"
#include "opts.h"
#include "transcode_video_dialog.h"
#include "utils_videotl.h"
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; }
#define CANVAS_FONT_VARIABLE(var,name) \
- Pango::FontDescription get_##var () const { return sanitized_font (var.get()); } \
+ Pango::FontDescription get_##var () const { return ARDOUR_UI_UTILS::sanitized_font (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
using namespace PBD;
using Gtkmm2ext::Keyboard;
-sigc::signal<void> DPIReset;
+namespace ARDOUR_UI_UTILS {
+ sigc::signal<void> DPIReset;
+}
#ifdef PLATFORM_WINDOWS
#define random() rand()
* @param s true to make sensitive, false to make insensitive
*/
void
-add_item_with_sensitivity (Menu_Helpers::MenuList& m, Menu_Helpers::MenuElem e, bool s)
+ARDOUR_UI_UTILS::add_item_with_sensitivity (Menu_Helpers::MenuList& m, Menu_Helpers::MenuElem e, bool s)
{
m.push_back (e);
if (!s) {
gint
-just_hide_it (GdkEventAny */*ev*/, Gtk::Window *win)
+ARDOUR_UI_UTILS::just_hide_it (GdkEventAny */*ev*/, Gtk::Window *win)
{
win->hide ();
return 0;
*/
unsigned char*
-xpm2rgb (const char** xpm, uint32_t& w, uint32_t& h)
+ARDOUR_UI_UTILS::xpm2rgb (const char** xpm, uint32_t& w, uint32_t& h)
{
static long vals[256], val;
uint32_t t, x, y, colors, cpp;
}
unsigned char*
-xpm2rgba (const char** xpm, uint32_t& w, uint32_t& h)
+ARDOUR_UI_UTILS::xpm2rgba (const char** xpm, uint32_t& w, uint32_t& h)
{
static long vals[256], val;
uint32_t t, x, y, colors, cpp;
* that we might add here later.
*/
Pango::FontDescription
-sanitized_font (std::string const& name)
+ARDOUR_UI_UTILS::sanitized_font (std::string const& name)
{
Pango::FontDescription fd (name);
}
Pango::FontDescription
-get_font_for_style (string widgetname)
+ARDOUR_UI_UTILS::get_font_for_style (string widgetname)
{
Gtk::Window window (WINDOW_TOPLEVEL);
Gtk::Label foobar;
}
uint32_t
-rgba_from_style (string style, uint32_t r, uint32_t g, uint32_t b, uint32_t a, string attr, int state, bool rgba)
+ARDOUR_UI_UTILS::rgba_from_style (string style, uint32_t r, uint32_t g, uint32_t b, uint32_t a, string attr, int state, bool rgba)
{
/* In GTK+2, styles aren't set up correctly if the widget is not
attached to a toplevel window that has a screen pointer.
}
bool
-rgba_p_from_style (string style, float *r, float *g, float *b, string attr, int state)
+ARDOUR_UI_UTILS::rgba_p_from_style (string style, float *r, float *g, float *b, string attr, int state)
{
static Gtk::Window* window = 0;
assert (r && g && b);
}
void
-set_color_from_rgb (Gdk::Color& c, uint32_t rgb)
+ARDOUR_UI_UTILS::set_color_from_rgb (Gdk::Color& c, uint32_t rgb)
{
/* Gdk::Color color ranges are 16 bit, so scale from 8 bit by
multiplying by 256.
}
void
-set_color_from_rgba (Gdk::Color& c, uint32_t rgba)
+ARDOUR_UI_UTILS::set_color_from_rgba (Gdk::Color& c, uint32_t rgba)
{
/* Gdk::Color color ranges are 16 bit, so scale from 8 bit by
multiplying by 256.
}
uint32_t
-gdk_color_to_rgba (Gdk::Color const& c)
+ARDOUR_UI_UTILS::gdk_color_to_rgba (Gdk::Color const& c)
{
/* since alpha value is not available from a Gdk::Color, it is
hardcoded as 0xff (aka 255 or 1.0)
}
uint32_t
-contrasting_text_color (uint32_t c)
+ARDOUR_UI_UTILS::contrasting_text_color (uint32_t c)
{
double r, g, b, a;
ArdourCanvas::color_to_rgba (c, r, g, b, a);
}
bool
-relay_key_press (GdkEventKey* ev, Gtk::Window* win)
+ARDOUR_UI_UTILS::relay_key_press (GdkEventKey* ev, Gtk::Window* win)
{
PublicEditor& ed (PublicEditor::instance());
}
bool
-forward_key_press (GdkEventKey* ev)
+ARDOUR_UI_UTILS::forward_key_press (GdkEventKey* ev)
{
- return PublicEditor::instance().on_key_press_event(ev);
+ return PublicEditor::instance().on_key_press_event(ev);
}
bool
-emulate_key_event (Gtk::Widget* w, unsigned int keyval)
+ARDOUR_UI_UTILS::emulate_key_event (Gtk::Widget* w, unsigned int keyval)
{
GdkDisplay *display = gtk_widget_get_display (GTK_WIDGET(w->gobj()));
GdkKeymap *keymap = gdk_keymap_get_for_display (display);
}
bool
-key_press_focus_accelerator_handler (Gtk::Window& window, GdkEventKey* ev)
+ARDOUR_UI_UTILS::key_press_focus_accelerator_handler (Gtk::Window& window, GdkEventKey* ev)
{
GtkWindow* win = window.gobj();
GtkWidget* focus = gtk_window_get_focus (win);
}
Glib::RefPtr<Gdk::Pixbuf>
-get_xpm (std::string name)
+ARDOUR_UI_UTILS::get_xpm (std::string name)
{
if (!xpm_map[name]) {
}
vector<string>
-get_icon_sets ()
+ARDOUR_UI_UTILS::get_icon_sets ()
{
Searchpath spath(ARDOUR::ardour_data_search_path());
spath.add_subdirectory_to_paths ("icons");
}
std::string
-get_icon_path (const char* cname, string icon_set)
+ARDOUR_UI_UTILS::get_icon_path (const char* cname, string icon_set)
{
std::string data_file_path;
string name = cname;
}
Glib::RefPtr<Gdk::Pixbuf>
-get_icon (const char* cname, string icon_set)
+ARDOUR_UI_UTILS::get_icon (const char* cname, string icon_set)
{
Glib::RefPtr<Gdk::Pixbuf> img;
try {
return img;
}
+namespace ARDOUR_UI_UTILS {
Glib::RefPtr<Gdk::Pixbuf>
get_icon (const char* cname)
{
return img;
}
+}
string
-longest (vector<string>& strings)
+ARDOUR_UI_UTILS::longest (vector<string>& strings)
{
if (strings.empty()) {
return string ("");
}
bool
-key_is_legal_for_numeric_entry (guint keyval)
+ARDOUR_UI_UTILS::key_is_legal_for_numeric_entry (guint keyval)
{
/* we assume that this does not change over the life of the process
*/
return false;
}
+
void
-set_pango_fontsize ()
+ARDOUR_UI_UTILS::set_pango_fontsize ()
{
long val = ARDOUR::Config->get_font_scale();
}
void
-reset_dpi ()
+ARDOUR_UI_UTILS::reset_dpi ()
{
long val = ARDOUR::Config->get_font_scale();
set_pango_fontsize ();
}
void
-resize_window_to_proportion_of_monitor (Gtk::Window* window, int max_width, int max_height)
+ARDOUR_UI_UTILS::resize_window_to_proportion_of_monitor (Gtk::Window* window, int max_width, int max_height)
{
Glib::RefPtr<Gdk::Screen> screen = window->get_screen ();
Gdk::Rectangle monitor_rect;
/** Replace _ with __ in a string; for use with menu item text to make underscores displayed correctly */
string
-escape_underscores (string const & s)
+ARDOUR_UI_UTILS::escape_underscores (string const & s)
{
string o;
string::size_type const N = s.length ();
/** Replace < and > with < and > respectively to make < > display correctly in markup strings */
string
-escape_angled_brackets (string const & s)
+ARDOUR_UI_UTILS::escape_angled_brackets (string const & s)
{
string o = s;
boost::replace_all (o, "<", "<");
}
Gdk::Color
-unique_random_color (list<Gdk::Color>& used_colors)
+ARDOUR_UI_UTILS::unique_random_color (list<Gdk::Color>& used_colors)
{
Gdk::Color newcolor;
}
string
-rate_as_string (float r)
+ARDOUR_UI_UTILS::rate_as_string (float r)
{
char buf[32];
if (fmod (r, 1000.0f)) {
class Item;
}
+namespace ARDOUR_UI_UTILS {
+
extern sigc::signal<void> DPIReset;
gint just_hide_it (GdkEventAny*, Gtk::Window*);
std::string rate_as_string (float r);
+} // namespace
#endif /* __ardour_gtk_utils_h__ */
#include "editor.h"
#include "editor_drag.h"
#include "main_clock.h"
-#include "utils.h"
#include "verbose_cursor.h"
#include "i18n.h"
#include "ardour_ui.h"
#include "video_image_frame.h"
#include "public_editor.h"
-#include "utils.h"
#include "canvas/container.h"
#include "utils_videotl.h"
using namespace std;
using namespace PBD;
+using namespace ARDOUR_UI_UTILS;
VideoMonitor::VideoMonitor (PublicEditor *ed, std::string xjadeo_bin_path)
: editor (ed)
#include "ardour_ui.h"
#include "public_editor.h"
#include "gui_thread.h"
-#include "utils.h"
#include "utils_videotl.h"
#include "rgb_macros.h"
#include "video_timeline.h"