new crossfade editor button icons from thorsten; ignore loop+range markers when looking for next/previous locations

git-svn-id: svn://localhost/ardour2/trunk@1506 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Paul Davis
2007-02-25 20:53:55 +00:00
parent 8adfb38bd6
commit eae83763fb
16 changed files with 44 additions and 23 deletions

View File

@@ -193,7 +193,7 @@ CrossfadeEditor::CrossfadeEditor (Session& s, boost::shared_ptr<Crossfade> xf, d
for (list<Preset*>::iterator i = fade_in_presets->begin(); i != fade_in_presets->end(); ++i) {
pxmap = manage (new Image (get_xpm((*i)->xpm)));
pxmap = manage (new Image (::get_icon ((*i)->image_name)));
pbutton = manage (new Button);
pbutton->add (*pxmap);
pbutton->set_name ("CrossfadeEditButton");
@@ -214,7 +214,7 @@ CrossfadeEditor::CrossfadeEditor (Session& s, boost::shared_ptr<Crossfade> xf, d
for (list<Preset*>::iterator i = fade_out_presets->begin(); i != fade_out_presets->end(); ++i) {
pxmap = manage (new Image (get_xpm((*i)->xpm)));
pxmap = manage (new Image (::get_icon ((*i)->image_name)));
pbutton = manage (new Button);
pbutton->add (*pxmap);
pbutton->set_name ("CrossfadeEditButton");
@@ -831,7 +831,8 @@ CrossfadeEditor::build_presets ()
fade_out_presets = new Presets;
/* FADE OUT */
p = new Preset ("hiin.xpm");
// p = new Preset ("hiin.xpm");
p = new Preset ("crossfade_in_fast-cut");
p->push_back (PresetPoint (0, 0));
p->push_back (PresetPoint (0.0207373, 0.197222));
p->push_back (PresetPoint (0.0645161, 0.525));
@@ -842,7 +843,8 @@ CrossfadeEditor::build_presets ()
p->push_back (PresetPoint (1, 1));
fade_in_presets->push_back (p);
p = new Preset ("loin.xpm");
// p = new Preset ("loin.xpm");
p = new Preset ("crossfade_in_transition");
p->push_back (PresetPoint (0, 0));
p->push_back (PresetPoint (0.389401, 0.0333333));
p->push_back (PresetPoint (0.629032, 0.0861111));
@@ -852,7 +854,8 @@ CrossfadeEditor::build_presets ()
p->push_back (PresetPoint (1, 1));
fade_in_presets->push_back (p);
p = new Preset ("regin.xpm");
// p = new Preset ("regin.xpm");
p = new Preset ("crossfade_in_constant");
p->push_back (PresetPoint (0, 0));
p->push_back (PresetPoint (0.0737327, 0.308333));
p->push_back (PresetPoint (0.246544, 0.658333));
@@ -862,7 +865,8 @@ CrossfadeEditor::build_presets ()
p->push_back (PresetPoint (1, 1));
fade_in_presets->push_back (p);
p = new Preset ("regin2.xpm");
// p = new Preset ("regin2.xpm");
p = new Preset ("crossfade_in_slow-cut");
p->push_back (PresetPoint (0, 0));
p->push_back (PresetPoint (0.304147, 0.0694444));
p->push_back (PresetPoint (0.529954, 0.152778));
@@ -872,14 +876,16 @@ CrossfadeEditor::build_presets ()
p->push_back (PresetPoint (1, 1));
fade_in_presets->push_back (p);
p = new Preset ("linin.xpm");
// p = new Preset ("linin.xpm");
p = new Preset ("crossfade_in_dipped");
p->push_back (PresetPoint (0, 0));
p->push_back (PresetPoint (1, 1));
fade_in_presets->push_back (p);
/* FADE OUT */
p = new Preset ("hiout.xpm");
// p = new Preset ("hiout.xpm");
p = new Preset ("crossfade_out_fast-cut");
p->push_back (PresetPoint (0, 1));
p->push_back (PresetPoint (0.305556, 1));
p->push_back (PresetPoint (0.548611, 0.991736));
@@ -889,7 +895,8 @@ CrossfadeEditor::build_presets ()
p->push_back (PresetPoint (1, 0));
fade_out_presets->push_back (p);
p = new Preset ("regout.xpm");
// p = new Preset ("regout.xpm");
p = new Preset ("crossfade_out_constant");
p->push_back (PresetPoint (0, 1));
p->push_back (PresetPoint (0.228111, 0.988889));
p->push_back (PresetPoint (0.347926, 0.972222));
@@ -899,7 +906,8 @@ CrossfadeEditor::build_presets ()
p->push_back (PresetPoint (1, 0));
fade_out_presets->push_back (p);
p = new Preset ("loout.xpm");
// p = new Preset ("loout.xpm");
p = new Preset ("crossfade_out_transition");
p->push_back (PresetPoint (0, 1));
p->push_back (PresetPoint (0.023041, 0.697222));
p->push_back (PresetPoint (0.0553, 0.483333));
@@ -909,7 +917,8 @@ CrossfadeEditor::build_presets ()
p->push_back (PresetPoint (1, 0));
fade_out_presets->push_back (p);
p = new Preset ("regout2.xpm");
// p = new Preset ("regout2.xpm");
p = new Preset ("crossfade_out_slow-fade");
p->push_back (PresetPoint (0, 1));
p->push_back (PresetPoint (0.080645, 0.730556));
p->push_back (PresetPoint (0.277778, 0.289256));
@@ -918,7 +927,8 @@ CrossfadeEditor::build_presets ()
p->push_back (PresetPoint (1, 0));
fade_out_presets->push_back (p);
p = new Preset ("linout.xpm");
// p = new Preset ("linout.xpm");
p = new Preset ("crossfade_out_dipped");
p->push_back (PresetPoint (0, 1));
p->push_back (PresetPoint (1, 0));
fade_out_presets->push_back (p);

View File

@@ -43,10 +43,9 @@ class CrossfadeEditor : public ArdourDialog
};
struct Preset : public list<PresetPoint> {
string xpm;
const char* image_name;
Preset (string x)
: xpm (x) {}
Preset (const char* x) : image_name (x) {}
};
typedef list<Preset*> Presets;

Binary file not shown.

After

Width:  |  Height:  |  Size: 693 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 667 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 686 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 723 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 730 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 692 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 720 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 831 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 737 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 770 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 798 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 737 B

View File

@@ -159,11 +159,11 @@ class Locations : public PBD::StatefulDestructible
int set_current (Location *, bool want_lock = true);
Location *current () const { return current_location; }
Location *first_location_before (nframes_t);
Location *first_location_after (nframes_t);
Location *first_location_before (nframes_t, bool include_special_ranges = false);
Location *first_location_after (nframes_t, bool include_special_ranges = false);
nframes_t first_mark_before (nframes_t);
nframes_t first_mark_after (nframes_t);
nframes_t first_mark_before (nframes_t, bool include_special_ranges = false);
nframes_t first_mark_after (nframes_t, bool include_special_ranges = false);
sigc::signal<void,Location*> current_changed;
sigc::signal<void> changed;

View File

@@ -661,7 +661,7 @@ struct LocationStartLaterComparison
};
Location *
Locations::first_location_before (nframes_t frame)
Locations::first_location_before (nframes_t frame, bool include_special_ranges)
{
LocationList locs;
@@ -676,6 +676,9 @@ Locations::first_location_before (nframes_t frame)
/* locs is now sorted latest..earliest */
for (LocationList::iterator i = locs.begin(); i != locs.end(); ++i) {
if (!include_special_ranges && ((*i)->is_auto_loop() || (*i)->is_auto_punch())) {
continue;
}
if (!(*i)->is_hidden() && (*i)->start() < frame) {
return (*i);
}
@@ -685,7 +688,7 @@ Locations::first_location_before (nframes_t frame)
}
Location *
Locations::first_location_after (nframes_t frame)
Locations::first_location_after (nframes_t frame, bool include_special_ranges)
{
LocationList locs;
@@ -700,6 +703,9 @@ Locations::first_location_after (nframes_t frame)
/* locs is now sorted earliest..latest */
for (LocationList::iterator i = locs.begin(); i != locs.end(); ++i) {
if (!include_special_ranges && ((*i)->is_auto_loop() || (*i)->is_auto_punch())) {
continue;
}
if (!(*i)->is_hidden() && (*i)->start() > frame) {
return (*i);
}
@@ -709,7 +715,7 @@ Locations::first_location_after (nframes_t frame)
}
nframes_t
Locations::first_mark_before (nframes_t frame)
Locations::first_mark_before (nframes_t frame, bool include_special_ranges)
{
LocationList locs;
@@ -724,6 +730,9 @@ Locations::first_mark_before (nframes_t frame)
/* locs is now sorted latest..earliest */
for (LocationList::iterator i = locs.begin(); i != locs.end(); ++i) {
if (!include_special_ranges && ((*i)->is_auto_loop() || (*i)->is_auto_punch())) {
continue;
}
if (!(*i)->is_hidden()) {
if ((*i)->is_mark()) {
/* MARK: start == end */
@@ -746,7 +755,7 @@ Locations::first_mark_before (nframes_t frame)
}
nframes_t
Locations::first_mark_after (nframes_t frame)
Locations::first_mark_after (nframes_t frame, bool include_special_ranges)
{
LocationList locs;
@@ -761,6 +770,9 @@ Locations::first_mark_after (nframes_t frame)
/* locs is now sorted earliest..latest */
for (LocationList::iterator i = locs.begin(); i != locs.end(); ++i) {
if (!include_special_ranges && ((*i)->is_auto_loop() || (*i)->is_auto_punch())) {
continue;
}
if (!(*i)->is_hidden()) {
if ((*i)->is_mark()) {
/* MARK, start == end so just compare start */