All pastes #384076 Raw Edit

Anonymous

public cpp v1 · immutable
·published 2007-03-06 20:20 UTC
rendered paste body
TimeAxisViewItem::TimeAxisViewItem(const string & it_name, ArdourCanvas::Group& parent, TimeAxisView& tv, double spu, Gdk::Color& base_color, 				   nframes_t start, nframes_t duration,				   Visibility vis)	: trackview (tv){	if (!have_name_font) {		/* first constructed item sets up font info */		NAME_FONT = get_font_for_style (N_("TimeAxisViewItemName")); // 1st entry point				Gtk::Window win;		Gtk::Label foo;		win.add (foo);		Glib::RefPtr<Pango::Layout> layout = foo.create_pango_layout (X_("Hg")); /* ascender + descender */		int width;		int height;		layout->set_font_description (NAME_FONT);		Gtkmm2ext::get_ink_pixel_size (layout, width, height);		NAME_Y_OFFSET = height + 6;		NAME_HIGHLIGHT_SIZE = height + 6;		NAME_HIGHLIGHT_THRESH = NAME_HIGHLIGHT_SIZE * 2;		have_name_font = true;	}	group = new ArdourCanvas::Group (parent);		init (it_name, spu, base_color, start, duration, vis); // 2nd entry point}