mirror of
https://github.com/Ardour/ardour.git
synced 2026-01-04 12:45:45 +01:00
a metric boatload of changes; plugin UIs work, adding tracks work, redirect list is useful again, and more
git-svn-id: svn://localhost/trunk/ardour2@273 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
aa659d3788
commit
2e582e03e4
17 changed files with 243 additions and 282 deletions
|
|
@ -74,7 +74,7 @@ class Redirect : public IO
|
|||
virtual uint32_t natural_input_streams () const { return n_inputs(); }
|
||||
|
||||
uint32_t sort_key() const { return _sort_key; }
|
||||
void set_sort_key (uint32_t sk,void *src) { _sort_key = sk; sort_key_changed (this, src); }
|
||||
void set_sort_key (uint32_t key);
|
||||
|
||||
Placement placement() const { return _placement; }
|
||||
void set_placement (Placement, void *src);
|
||||
|
|
@ -87,7 +87,6 @@ class Redirect : public IO
|
|||
virtual void set_block_size (jack_nframes_t nframes) {}
|
||||
|
||||
sigc::signal<void,Redirect*,void*> active_changed;
|
||||
sigc::signal<void,Redirect*,void*> sort_key_changed;
|
||||
sigc::signal<void,Redirect*,void*> placement_changed;
|
||||
sigc::signal<void,Redirect*,bool> AutomationPlaybackChanged;
|
||||
sigc::signal<void,Redirect*,uint32_t> AutomationChanged;
|
||||
|
|
|
|||
|
|
@ -81,6 +81,12 @@ Redirect::clone (const Redirect& other)
|
|||
return 0;
|
||||
}
|
||||
|
||||
void
|
||||
Redirect::set_sort_key (uint32_t key)
|
||||
{
|
||||
_sort_key = key;
|
||||
}
|
||||
|
||||
void
|
||||
Redirect::set_placement (Placement p, void *src)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -54,6 +54,8 @@ BarController::BarController (Gtk::Adjustment& adj,
|
|||
with_text = true;
|
||||
use_parent = false;
|
||||
|
||||
layout = darea.create_pango_layout("");
|
||||
|
||||
set_shadow_type (SHADOW_NONE);
|
||||
|
||||
initial_value = adjustment.get_value ();
|
||||
|
|
@ -308,10 +310,10 @@ BarController::expose (GdkEventExpose* event)
|
|||
|
||||
win->draw_rectangle (get_style()->get_bg_gc (get_state()),
|
||||
false,
|
||||
0, 0, darea.get_width(), darea.get_height());
|
||||
0, 0, darea.get_width() - 1, darea.get_height() - 1);
|
||||
|
||||
/* draw active box */
|
||||
|
||||
|
||||
win->draw_rectangle (get_style()->get_fg_gc (get_state()),
|
||||
true,
|
||||
1 + x1,
|
||||
|
|
@ -347,11 +349,25 @@ BarController::expose (GdkEventExpose* event)
|
|||
label_callback (buf, 64);
|
||||
|
||||
if (buf[0] != '\0') {
|
||||
int width = 0, height;
|
||||
darea.create_pango_layout(buf)->get_pixel_size(width, height);
|
||||
darea.set_size_request(width + 2, -1);
|
||||
|
||||
int width;
|
||||
int height;
|
||||
|
||||
layout->set_text (buf);
|
||||
layout->get_pixel_size(width, height);
|
||||
|
||||
int xpos;
|
||||
|
||||
xpos = max (3, 1 + (x2 - (width/2)));
|
||||
xpos = min (darea.get_width() - width - 3, xpos);
|
||||
|
||||
win->draw_layout (get_style()->get_text_gc (get_state()),
|
||||
xpos,
|
||||
(darea.get_height()/2) - (height/2),
|
||||
layout);
|
||||
}
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -73,6 +73,7 @@ class BarController : public Gtk::Frame
|
|||
Gtkmm2ext::PopUp prompter;
|
||||
MIDI::Controllable* midi_control;
|
||||
sigc::slot<void,char*,unsigned int> label_callback;
|
||||
Glib::RefPtr<Pango::Layout> layout;
|
||||
Style _style;
|
||||
bool grabbed;
|
||||
bool switching;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue