/[svn]/gigedit/trunk/src/regionchooser.h
ViewVC logotype

Diff of /gigedit/trunk/src/regionchooser.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

gigedit/branches/linuxsampler_org/src/regionchooser.h revision 1060 by persson, Sat Mar 3 12:20:08 2007 UTC gigedit/trunk/src/regionchooser.h revision 1104 by persson, Sun Mar 18 17:15:00 2007 UTC
# Line 22  Line 22 
22    
23  #include <gtkmm/drawingarea.h>  #include <gtkmm/drawingarea.h>
24  #include <gdkmm/colormap.h>  #include <gdkmm/colormap.h>
25    #include <gtkmm/uimanager.h>
26  #include <gdkmm/window.h>  #include <gdkmm/window.h>
27    
28    #include <gtkmm/menu.h>
29    
30  #include <gig.h>  #include <gig.h>
31    
32  class RegionChooser : public Gtk::DrawingArea  class RegionChooser : public Gtk::DrawingArea
# Line 33  public: Line 36  public:
36      virtual ~RegionChooser();      virtual ~RegionChooser();
37    
38      void set_instrument(gig::Instrument* instrument);      void set_instrument(gig::Instrument* instrument);
     void set_region(gig::Region* region);  
39    
40      sigc::signal<void> signal_sel_changed();      sigc::signal<void> signal_sel_changed();
41    
# Line 44  protected: Line 46  protected:
46      virtual bool on_expose_event(GdkEventExpose* e);      virtual bool on_expose_event(GdkEventExpose* e);
47      virtual void on_size_request(GtkRequisition* requisition);      virtual void on_size_request(GtkRequisition* requisition);
48      virtual bool on_button_press_event(GdkEventButton* event);      virtual bool on_button_press_event(GdkEventButton* event);
49        virtual bool on_button_release_event(GdkEventButton* event);
50      virtual bool on_motion_notify_event(GdkEventMotion* event);      virtual bool on_motion_notify_event(GdkEventMotion* event);
51    
52  //    virtual void on_size_allocate(Gtk::Allocation& allocation);      gig::Region* get_region(int key);
53    
54      Glib::RefPtr<Gdk::GC> gc;      Glib::RefPtr<Gdk::GC> gc;
55      Gdk::Color blue, red, black, white, green, grey1;      Gdk::Color blue, red, black, white, green, grey1;
# Line 57  protected: Line 60  protected:
60    
61      gig::Instrument* instrument;      gig::Instrument* instrument;
62      gig::Region* region;      gig::Region* region;
63    
64        // information needed during a resize
65        struct {
66            bool active;
67            enum {
68                undecided,
69                moving_high_limit,
70                moving_low_limit
71            } mode;
72            int pos;
73            int min;
74            int max;
75            gig::Region* region;
76            gig::Region* prev_region;
77        } resize;
78    
79        bool cursor_is_resize;
80        bool is_in_resize_zone(double x, double y);
81    
82        int h1;
83        int width;
84    
85        Gtk::Menu* popup_menu_inside_region;
86        Gtk::Menu* popup_menu_outside_region;
87        void show_region_properties();
88        void add_region();
89        void delete_region();
90        int new_region_pos;
91    
92        Glib::RefPtr<Gtk::ActionGroup> actionGroup;
93        Glib::RefPtr<Gtk::UIManager> uiManager;
94  };  };
95    
96  #endif  #endif

Legend:
Removed from v.1060  
changed lines
  Added in v.1104

  ViewVC Help
Powered by ViewVC