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

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

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

revision 1225 by schoenebeck, Sun Jun 10 10:56:11 2007 UTC revision 2151 by persson, Sun Nov 21 12:38:41 2010 UTC
# Line 1  Line 1 
1  /*                                                         -*- c++ -*-  /*                                                         -*- c++ -*-
2   * Copyright (C) 2006, 2007 Andreas Persson   * Copyright (C) 2006-2010 Andreas Persson
3   *   *
4   * This program is free software; you can redistribute it and/or   * This program is free software; you can redistribute it and/or
5   * modify it under the terms of the GNU General Public License as   * modify it under the terms of the GNU General Public License as
# Line 26  Line 26 
26    
27  #include <gig.h>  #include <gig.h>
28    
29    #include <set>
30    
31  class DimRegionChooser : public Gtk::DrawingArea  class DimRegionChooser : public Gtk::DrawingArea
32  {  {
33  public:  public:
34      DimRegionChooser();      DimRegionChooser();
35      virtual ~DimRegionChooser();      virtual ~DimRegionChooser();
36    
     void set_fromto(int from, int to);  
   
37      void set_region(gig::Region* region);      void set_region(gig::Region* region);
38    
39      sigc::signal<void> signal_sel_changed();      sigc::signal<void>& signal_dimregion_selected();
40        sigc::signal<void>& signal_region_changed();
41    
42      gig::DimensionRegion* get_dimregion() { return dimreg; }      gig::DimensionRegion* get_dimregion() const { return dimreg; }
43        void get_dimregions(const gig::Region* region, bool stereo,
44                            std::set<gig::DimensionRegion*>& dimregs) const;
45    
46  protected:  protected:
     virtual void on_realize();  
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);
# Line 49  protected: Line 51  protected:
51      virtual bool on_motion_notify_event(GdkEventMotion* event);      virtual bool on_motion_notify_event(GdkEventMotion* event);
52      virtual bool on_focus(Gtk::DirectionType direction);      virtual bool on_focus(Gtk::DirectionType direction);
53    
     Glib::RefPtr<Gdk::GC> gc;  
54      Gdk::Color blue, red, black, white, green;      Gdk::Color blue, red, black, white, green;
55    
56      gig::Instrument* instrument;      gig::Instrument* instrument;
57      gig::Region* region;      gig::Region* region;
58      int dimregno;      int dimregno;
59    
60      sigc::signal<void> sel_changed_signal;      sigc::signal<void> dimregion_selected;
61        sigc::signal<void> region_changed;
62    
63      gig::DimensionRegion* dimreg;      gig::DimensionRegion* dimreg;
64      int focus_line;      int focus_line;
65      int dimvalue_from[256];      int dimvalue[256];
     int dimvalue_to[256];  
66      int label_width;      int label_width;
67      int nbDimensions;      int nbDimensions;
68    
# Line 84  protected: Line 85  protected:
85      bool is_in_resize_zone(double x, double y);      bool is_in_resize_zone(double x, double y);
86    
87      int h;      int h;
     int w;  
88  };  };
89    
90  #endif  #endif

Legend:
Removed from v.1225  
changed lines
  Added in v.2151

  ViewVC Help
Powered by ViewVC