/[svn]/gigedit/branches/release0_0_3/src/regionchooser.h
ViewVC logotype

Diff of /gigedit/branches/release0_0_3/src/regionchooser.h

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

revision 1061 by persson, Sat Mar 3 12:20:08 2007 UTC revision 1111 by schoenebeck, Fri Mar 23 00:22:44 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    #include <gtkmm/menu.h>
28    
29    #include "dimensionmanager.h"
30    
31  #include <gig.h>  #include <gig.h>
32    
# Line 33  public: Line 37  public:
37      virtual ~RegionChooser();      virtual ~RegionChooser();
38    
39      void set_instrument(gig::Instrument* instrument);      void set_instrument(gig::Instrument* instrument);
     void set_region(gig::Region* region);  
40    
41      sigc::signal<void> signal_sel_changed();      sigc::signal<void> signal_sel_changed();
42    
# Line 44  protected: Line 47  protected:
47      virtual bool on_expose_event(GdkEventExpose* e);      virtual bool on_expose_event(GdkEventExpose* e);
48      virtual void on_size_request(GtkRequisition* requisition);      virtual void on_size_request(GtkRequisition* requisition);
49      virtual bool on_button_press_event(GdkEventButton* event);      virtual bool on_button_press_event(GdkEventButton* event);
50        virtual bool on_button_release_event(GdkEventButton* event);
51      virtual bool on_motion_notify_event(GdkEventMotion* event);      virtual bool on_motion_notify_event(GdkEventMotion* event);
52    
53  //    virtual void on_size_allocate(Gtk::Allocation& allocation);      gig::Region* get_region(int key);
54    
55      Glib::RefPtr<Gdk::GC> gc;      Glib::RefPtr<Gdk::GC> gc;
56      Gdk::Color blue, red, black, white, green, grey1;      Gdk::Color blue, red, black, white, green, grey1;
# Line 57  protected: Line 61  protected:
61    
62      gig::Instrument* instrument;      gig::Instrument* instrument;
63      gig::Region* region;      gig::Region* region;
64    
65        // information needed during a resize
66        struct {
67            bool active;
68            enum {
69                undecided,
70                moving_high_limit,
71                moving_low_limit
72            } mode;
73            int pos;
74            int min;
75            int max;
76            gig::Region* region;
77            gig::Region* prev_region;
78        } resize;
79    
80        bool cursor_is_resize;
81        bool is_in_resize_zone(double x, double y);
82    
83        int h1;
84        int width;
85    
86        Gtk::Menu* popup_menu_inside_region;
87        Gtk::Menu* popup_menu_outside_region;
88        void show_region_properties();
89        void add_region();
90        void delete_region();
91        void manage_dimensions();
92        void on_dimension_manager_changed();
93        int new_region_pos;
94    
95        Glib::RefPtr<Gtk::ActionGroup> actionGroup;
96        Glib::RefPtr<Gtk::UIManager> uiManager;
97    
98        DimensionManager dimensionManager;
99  };  };
100    
101  #endif  #endif

Legend:
Removed from v.1061  
changed lines
  Added in v.1111

  ViewVC Help
Powered by ViewVC