1 |
/* -*- c++ -*- |
/* -*- c++ -*- |
2 |
* Copyright (C) 2006, 2007 Andreas Persson |
* Copyright (C) 2006-2008 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 |
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: |
47 |
virtual void on_realize(); |
virtual void on_realize(); |
59 |
gig::Region* region; |
gig::Region* region; |
60 |
int dimregno; |
int dimregno; |
61 |
|
|
62 |
sigc::signal<void> sel_changed_signal; |
sigc::signal<void> dimregion_selected; |
63 |
|
sigc::signal<void> region_changed; |
64 |
|
|
65 |
gig::DimensionRegion* dimreg; |
gig::DimensionRegion* dimreg; |
66 |
int focus_line; |
int focus_line; |
67 |
int dimvalue_from[256]; |
int dimvalue[256]; |
|
int dimvalue_to[256]; |
|
68 |
int label_width; |
int label_width; |
69 |
int nbDimensions; |
int nbDimensions; |
70 |
|
|
87 |
bool is_in_resize_zone(double x, double y); |
bool is_in_resize_zone(double x, double y); |
88 |
|
|
89 |
int h; |
int h; |
|
int w; |
|
90 |
}; |
}; |
91 |
|
|
92 |
#endif |
#endif |