projects
/
ardour.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
package portaudio w/WASAPI for Vista or later
[ardour.git]
/
libs
/
canvas
/
canvas
/
ruler.h
diff --git
a/libs/canvas/canvas/ruler.h
b/libs/canvas/canvas/ruler.h
index ac72245c0f457c3a4fab36f67931d6fa13810e5f..0a6a13e078bedd5a9c51e28d6c511a97b44d223c 100644
(file)
--- a/
libs/canvas/canvas/ruler.h
+++ b/
libs/canvas/canvas/ruler.h
@@
-22,14
+22,14
@@
#include <string>
#include <vector>
#include <string>
#include <vector>
-#include
"canvas/item.h"
-#include "canvas/fill.h"
-#include "canvas/
outlin
e.h"
+#include
<pangomm/fontdescription.h>
+
+#include "canvas/
rectangl
e.h"
namespace ArdourCanvas
{
namespace ArdourCanvas
{
-class LIBCANVAS_API Ruler :
virtual public Item, public Fill, public Outlin
e
+class LIBCANVAS_API Ruler :
public Rectangl
e
{
public:
struct Mark {
{
public:
struct Mark {
@@
-52,26
+52,37
@@
public:
/* lower and upper and sample positions, which are also canvas coordinates
*/
/* lower and upper and sample positions, which are also canvas coordinates
*/
- virtual
int
get_marks (std::vector<Mark>&, double lower, double upper, int maxchars) const = 0;
+ virtual
void
get_marks (std::vector<Mark>&, double lower, double upper, int maxchars) const = 0;
};
};
- Ruler (Group *, const Metric& m);
+ Ruler (Canvas*, const Metric& m);
+ Ruler (Canvas*, const Metric& m, Rect const&);
+ Ruler (Item*, const Metric& m);
+ Ruler (Item*, const Metric& m, Rect const&);
void set_range (double lower, double upper);
void set_range (double lower, double upper);
- void set_size (Rect const&);
+ void set_font_description (Pango::FontDescription);
+ void set_metric (const Metric&);
void render (Rect const & area, Cairo::RefPtr<Cairo::Context>) const;
void render (Rect const & area, Cairo::RefPtr<Cairo::Context>) const;
- void compute_bounding_box () const;
-
+
+ void set_divide_colors (Color top, Color bottom);
+ void set_divide_height (double);
private:
private:
- const Metric& _metric;
- Rect _rect;
+ const Metric* _metric;
/* lower and upper and sample positions, which are also canvas coordinates
*/
Coord _lower;
Coord _upper;
/* lower and upper and sample positions, which are also canvas coordinates
*/
Coord _lower;
Coord _upper;
+ double _divide_height;
+ Color _divider_color_top;
+ Color _divider_color_bottom;
+
+ Pango::FontDescription* _font_description;
+ mutable std::vector<Mark> marks;
+ mutable bool _need_marks;
};
}
};
}