#include <vector>
#include <list>
-#include <gtkmm.h>
-#include <libgnomecanvasmm/group.h>
-#include <libgnomecanvasmm/canvas.h>
+#include <gtkmm/box.h>
+#include <gtkmm/frame.h>
+#include <gtkmm/eventbox.h>
+#include <gtkmm/table.h>
+#include <gtkmm/entry.h>
+#include <gtkmm/label.h>
#include <ardour/types.h>
#include <ardour/region.h>
#include "axis_view.h"
#include "enums.h"
#include "editing.h"
+#include "canvas.h"
namespace ARDOUR {
class Session;
class Playlist;
}
+namespace Gtk {
+ class Menu;
+}
+
class PublicEditor;
class AudioRegionSelection;
class TimeSelection;
valued so that there is a precise
middle.
*/
- Largest = 301,
- Large = 201,
- Larger = 101,
- Normal = 51,
- Smaller = 31,
- Small = 21
+ Largest = 307,
+ Large = 207,
+ Larger = 107,
+ Normal = 57,
+ Smaller = 37,
+ Small = 27
};
- TimeAxisView(ARDOUR::Session& sess, PublicEditor& ed, TimeAxisView* parent, Gtk::Widget *canvas);
+ TimeAxisView(ARDOUR::Session& sess, PublicEditor& ed, TimeAxisView* parent, ArdourCanvas::Canvas& canvas);
virtual ~TimeAxisView ();
/* public data: XXX create accessor/mutators for these ?? */
PublicEditor& editor;
-
+
guint32 height; /* in canvas units */
guint32 effective_height; /* in canvas units */
double y_position;
int order;
- Gnome::Canvas::Item *canvas_display;
+ ArdourCanvas::Group *canvas_display;
Gtk::VBox *control_parent;
/* The Standard LHS Controls */
return 0;
}
- void order_selection_trims (Gnome::Canvas::Item *item, bool put_start_on_top);
+ void order_selection_trims (ArdourCanvas::Item *item, bool put_start_on_top);
virtual void get_selectables (jack_nframes_t start, jack_nframes_t end, double top, double bot, list<Selectable*>& results);
virtual void get_inverted_selectables (Selection&, list<Selectable *>& results);
/* call this on the parent */
- virtual XMLNode* get_child_xml_node (std::string childname) { return 0; }
+ virtual XMLNode* get_child_xml_node (const string & childname) { return 0; }
protected:
string controls_base_unselected_name;
string controls_base_selected_name;
- /**
- * Handle mouse press on our LHS control name entry.
- *
- * @param ev the event
- */
- virtual bool name_entry_button_press (GdkEventButton *ev);
+ bool name_entry_button_press (GdkEventButton *ev);
+ bool name_entry_button_release (GdkEventButton *ev);
+ bool name_entry_key_release (GdkEventKey *ev);
+ void name_entry_activated ();
+ sigc::connection name_entry_key_timeout;
+ bool name_entry_key_timed_out ();
+ guint32 last_name_entry_key_press_event;
+
+ /* derived classes can override these */
- /**
- * Handle mouse relaese on our LHS control name entry.
- *
- *@ param ev the event
- */
- virtual bool name_entry_button_release (GdkEventButton *ev);
+ virtual void name_entry_changed ();
+ virtual bool name_entry_focus_in (GdkEventFocus *ev);
+ virtual bool name_entry_focus_out (GdkEventFocus *ev);
/**
* Handle mouse relaese on our LHS control name ebox.
*
*@ param ev the event
*/
- virtual gint controls_ebox_button_release (GdkEventButton *ev);
+ virtual bool controls_ebox_button_release (GdkEventButton *ev);
+ virtual bool controls_ebox_scroll (GdkEventScroll *ev);
/**
* Displays the standard LHS control menu at when.
* Do anything that needs to be done to dynamically reset
* the LHS control menu.
*/
- virtual gint handle_display_menu_map_event (GdkEventAny *ev) { return FALSE; }
+ virtual bool handle_display_menu_map_event (GdkEventAny *ev) { return false; }
/**
* Build the standard LHS control size menu for the default TrackHeight options.
/* selection display */
- Gnome::Canvas::Group *selection_group;
+ ArdourCanvas::Group *selection_group;
list<SelectionRect*> free_selection_rects;
list<SelectionRect*> used_selection_rects;
bool _hidden;
bool _has_state;
+ void check_height (Gdk::Rectangle&);
+
}; /* class TimeAxisView */
#endif /* __ardour_gtk_time_axis_h__ */