--- gigedit/trunk/src/gigedit/dimregionchooser.h 2007/09/10 19:56:26 1339 +++ gigedit/trunk/src/gigedit/dimregionchooser.h 2011/03/06 07:51:04 2169 @@ -1,5 +1,5 @@ /* -*- c++ -*- - * Copyright (C) 2006, 2007 Andreas Persson + * Copyright (C) 2006-2011 Andreas Persson * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as @@ -21,11 +21,14 @@ #define GIGEDIT_DIMREGIONCHOOSER_H #include -#include #include +#include "compat.h" + #include +#include + class DimRegionChooser : public Gtk::DrawingArea { public: @@ -37,19 +40,21 @@ sigc::signal& signal_dimregion_selected(); sigc::signal& signal_region_changed(); - gig::DimensionRegion* get_dimregion() { return dimreg; } + gig::DimensionRegion* get_dimregion() const { return dimreg; } + void get_dimregions(const gig::Region* region, bool stereo, + std::set& dimregs) const; protected: - virtual void on_realize(); +#if (GTKMM_MAJOR_VERSION == 2 && GTKMM_MINOR_VERSION < 90) || GTKMM_MAJOR_VERSION < 2 virtual bool on_expose_event(GdkEventExpose* e); - virtual void on_size_request(GtkRequisition* requisition); +#endif + virtual bool on_draw(const Cairo::RefPtr& cr); virtual bool on_button_press_event(GdkEventButton* event); virtual bool on_button_release_event(GdkEventButton* event); virtual bool on_motion_notify_event(GdkEventMotion* event); virtual bool on_focus(Gtk::DirectionType direction); - Glib::RefPtr gc; - Gdk::Color blue, red, black, white, green; + Gdk::RGBA red, black, white; gig::Instrument* instrument; gig::Region* region; @@ -83,7 +88,6 @@ bool is_in_resize_zone(double x, double y); int h; - int w; }; #endif