/*
- Copyright (C) 2000 Paul Davis
+ Copyright (C) 2000 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <libgnomecanvasmm/canvas.h>
#include <libgnomecanvasmm/item.h>
-#include <pbd/error.h>
+#include "pbd/error.h"
#include <gtkmm2ext/utils.h>
#include <gtkmm2ext/selector.h>
#include <gtkmm2ext/stop_signal.h>
-#include <ardour/session.h>
-#include <ardour/utils.h>
-#include <ardour/ladspa_plugin.h>
-#include <ardour/processor.h>
-#include <ardour/location.h>
+#include "ardour/session.h"
+#include "ardour/utils.h"
+#include "ardour/ladspa_plugin.h"
+#include "ardour/processor.h"
+#include "ardour/location.h"
#include "ardour_ui.h"
#include "public_editor.h"
#include "i18n.h"
+using namespace std;
using namespace Gtk;
using namespace Gdk;
-using namespace sigc;
+using namespace sigc;
using namespace ARDOUR;
using namespace PBD;
using namespace Editing;
bool TimeAxisView::need_size_info = true;
int const TimeAxisView::_max_order = 512;
-TimeAxisView::TimeAxisView (ARDOUR::Session& sess, PublicEditor& ed, TimeAxisView* rent, Canvas& canvas)
- : AxisView (sess),
+TimeAxisView::TimeAxisView (ARDOUR::Session& sess, PublicEditor& ed, TimeAxisView* rent, Canvas& /*canvas*/)
+ : AxisView (sess),
controls_table (2, 8),
_y_position (0),
_editor (ed),
name_hbox.show ();
+ controls_table.set_size_request (200);
controls_table.set_border_width (2);
controls_table.set_row_spacings (0);
controls_table.set_col_spacings (0);
controls_hbox.pack_start (controls_ebox,true,true);
controls_hbox.show ();
- // controls_frame.add (controls_hbox);
- // controls_frame.set_name ("TimeAxisViewControlsBaseUnselected");
- // controls_vbox.set_name ("TimeAxisViewControlsBaseUnselected");
- // controls_frame.set_shadow_type (Gtk::SHADOW_ETCHED_OUT);
-
ColorsChanged.connect (mem_fun (*this, &TimeAxisView::color_handler));
}
_canvas_display->hide ();
_canvas_background->hide ();
- controls_frame.hide ();
if (control_parent) {
control_parent->remove (controls_hbox);
return true;
/* Shift+Tab Keys Pressed. Note that for Shift+Tab, GDK actually
- * generates a different ev->keyval, rather than setting
+ * generates a different ev->keyval, rather than setting
* ev->state.
*/
case GDK_ISO_Left_Tab:
break;
}
-#ifdef TIMEOUT_NAME_EDIT
+#ifdef TIMEOUT_NAME_EDIT
/* adapt the timeout to reflect the user's typing speed */
guint32 name_entry_timeout;
}
bool
-TimeAxisView::name_entry_focus_in (GdkEventFocus* ev)
+TimeAxisView::name_entry_focus_in (GdkEventFocus*)
{
name_entry.select_region (0, -1);
name_entry.set_name ("EditorActiveTrackNameDisplay");
}
bool
-TimeAxisView::name_entry_focus_out (GdkEventFocus* ev)
+TimeAxisView::name_entry_focus_out (GdkEventFocus*)
{
/* clean up */
}
conditionally_add_to_selection ();
- display_menu->popup (1, when);
+ display_menu->popup (1, when);
}
gint
rect->rect->signal_event().connect (bind (mem_fun (_editor, &PublicEditor::canvas_selection_rect_event), rect->rect, rect));
rect->start_trim->signal_event().connect (bind (mem_fun (_editor, &PublicEditor::canvas_selection_start_trim_event), rect->rect, rect));
rect->end_trim->signal_event().connect (bind (mem_fun (_editor, &PublicEditor::canvas_selection_end_trim_event), rect->rect, rect));
- }
+ }
rect = free_selection_rects.front();
rect->id = id;
}
void
-TimeAxisView::get_selectables (nframes_t start, nframes_t end, double top, double bot, list<Selectable*>& result)
+TimeAxisView::get_selectables (nframes_t /*start*/, nframes_t /*end*/, double /*top*/, double /*bot*/, list<Selectable*>& /*result*/)
{
return;
}
void
-TimeAxisView::get_inverted_selectables (Selection& sel, list<Selectable*>& result)
+TimeAxisView::get_inverted_selectables (Selection& /*sel*/, list<Selectable*>& /*result*/)
{
return;
}
*/
double mybot = _y_position + current_height();
-
- return ((_y_position <= bot && _y_position >= top) ||
- ((mybot <= bot) && (top < mybot)) ||
+
+ return ((_y_position <= bot && _y_position >= top) ||
+ ((mybot <= bot) && (top < mybot)) ||
(mybot >= bot && _y_position < top));
-}
+}
void
TimeAxisView::set_parent (TimeAxisView& p)
if (parent->has_state()) {
return parent;
- }
+ }
return parent->get_parent_with_state ();
}
}
int
-TimeAxisView::set_state (const XMLNode& node)
+TimeAxisView::set_state (const XMLNode& node, int /*version*/)
{
const XMLProperty *prop;
} else if ((prop = node.property ("height")) != 0) {
set_height (atoi (prop->value()));
-
+
} else {
set_height (hNormal);
(*i)->set_height ((*i)->height);
}
}
-
+
void
TimeAxisView::compute_controls_size_info ()
{
}
one_row_table.attach (*buttons[0], 6, 7, 0, 1, Gtk::FILL|Gtk::EXPAND, Gtk::FILL|Gtk::EXPAND, 0, 0);
-
+
one_row_table.show_all ();
Gtk::Requisition req(one_row_table.size_request ());
two_row_table.show_all ();
req = two_row_table.size_request ();
- cerr << "Normal height is " << req.height << " + " << extra_height << endl;
-
- // height required to show all normal buttons
+ // height required to show all normal buttons
hNormal = /*req.height*/ 48 + extra_height;
- // these heights are all just larger than normal. no more
+ // these heights are all just larger than normal. no more
// elements are visible (yet).
hLarger = hNormal + 50;
l = view()->layers() - 1;
}
}
-
+
return std::make_pair (this, l);
}
TimeAxisView::resizer_button_press (GdkEventButton* event)
{
_resize_drag_start = event->y_root;
- _resize_idle_target = current_height ();
- _editor.start_resize_line_ops ();
return true;
}
bool
-TimeAxisView::resizer_button_release (GdkEventButton* ev)
+TimeAxisView::resizer_button_release (GdkEventButton*)
{
_resize_drag_start = -1;
- _editor.end_resize_line_ops ();
return true;
}
return true;
}
- int32_t const delta = (int32_t) floor (_resize_drag_start - ev->y_root);
-
- _resize_idle_target = std::max (_resize_idle_target - delta, (int) hSmall);
- _editor.add_to_idle_resize (this, _resize_idle_target);
-
+ int32_t const delta = (int32_t) floor (ev->y_root - _resize_drag_start);
+ _editor.add_to_idle_resize (this, delta);
_resize_drag_start = ev->y_root;
return true;
win->get_geometry (x, y, w, h, d);
/* handle/line #1 */
-
+
win->draw_line (dark, 0, 0, w - 2, 0);
win->draw_point (dark, 0, 1);
win->draw_line (light, 1, 1, w - 1, 1);