--- gigedit/trunk/src/gigedit/dimregionchooser.h 2007/06/10 10:56:11 1225 +++ gigedit/trunk/src/gigedit/dimregionchooser.h 2010/11/21 12:38:41 2151 @@ -1,5 +1,5 @@ /* -*- c++ -*- - * Copyright (C) 2006, 2007 Andreas Persson + * Copyright (C) 2006-2010 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 @@ -26,22 +26,24 @@ #include +#include + class DimRegionChooser : public Gtk::DrawingArea { public: DimRegionChooser(); virtual ~DimRegionChooser(); - void set_fromto(int from, int to); - void set_region(gig::Region* region); - sigc::signal signal_sel_changed(); + 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(); virtual bool on_expose_event(GdkEventExpose* e); virtual void on_size_request(GtkRequisition* requisition); virtual bool on_button_press_event(GdkEventButton* event); @@ -49,19 +51,18 @@ 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; gig::Instrument* instrument; gig::Region* region; int dimregno; - sigc::signal sel_changed_signal; + sigc::signal dimregion_selected; + sigc::signal region_changed; gig::DimensionRegion* dimreg; int focus_line; - int dimvalue_from[256]; - int dimvalue_to[256]; + int dimvalue[256]; int label_width; int nbDimensions; @@ -84,7 +85,6 @@ bool is_in_resize_zone(double x, double y); int h; - int w; }; #endif