summaryrefslogtreecommitdiff
path: root/libs/canvas/canvas
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2015-10-05 16:17:49 +0200
committerRobin Gareus <robin@gareus.org>2015-10-05 16:17:49 +0200
commit22b07e0233a29d9633ffa825a79503befaf2e16e (patch)
tree1d8b06056f8e12197158f5d906319767d3dedda5 /libs/canvas/canvas
parente11ba7b79d68bc1070b170236c22123966d7bcc3 (diff)
NOOP, remove trailing tabs/whitespace.
Diffstat (limited to 'libs/canvas/canvas')
-rw-r--r--libs/canvas/canvas/arc.h2
-rw-r--r--libs/canvas/canvas/arrow.h4
-rw-r--r--libs/canvas/canvas/canvas.h8
-rw-r--r--libs/canvas/canvas/circle.h2
-rw-r--r--libs/canvas/canvas/colors.h10
-rw-r--r--libs/canvas/canvas/fill.h2
-rw-r--r--libs/canvas/canvas/flag.h4
-rw-r--r--libs/canvas/canvas/item.h18
-rw-r--r--libs/canvas/canvas/line.h2
-rw-r--r--libs/canvas/canvas/line_set.h2
-rw-r--r--libs/canvas/canvas/lookup_table.h2
-rw-r--r--libs/canvas/canvas/outline.h2
-rw-r--r--libs/canvas/canvas/poly_item.h2
-rw-r--r--libs/canvas/canvas/poly_line.h6
-rw-r--r--libs/canvas/canvas/polygon.h2
-rw-r--r--libs/canvas/canvas/rectangle.h2
-rw-r--r--libs/canvas/canvas/root_group.h2
-rw-r--r--libs/canvas/canvas/ruler.h10
-rw-r--r--libs/canvas/canvas/scroll_group.h2
-rw-r--r--libs/canvas/canvas/tracking_text.h2
-rw-r--r--libs/canvas/canvas/types.h20
-rw-r--r--libs/canvas/canvas/wave_view.h48
-rw-r--r--libs/canvas/canvas/widget.h2
23 files changed, 78 insertions, 78 deletions
diff --git a/libs/canvas/canvas/arc.h b/libs/canvas/canvas/arc.h
index 95bd157cbf..76342c3985 100644
--- a/libs/canvas/canvas/arc.h
+++ b/libs/canvas/canvas/arc.h
@@ -63,7 +63,7 @@ private:
double _arc_degrees;
double _start_degrees;
};
-
+
}
#endif
diff --git a/libs/canvas/canvas/arrow.h b/libs/canvas/canvas/arrow.h
index 6617e13bd2..ba74fa90e7 100644
--- a/libs/canvas/canvas/arrow.h
+++ b/libs/canvas/canvas/arrow.h
@@ -44,7 +44,7 @@ class Polygon;
* @todo Draws vertical lines only; could be generalised
* to draw lines at any angle.
*/
-
+
class LIBCANVAS_API Arrow : public Container
{
public:
@@ -66,7 +66,7 @@ public:
void set_x (Coord);
void set_y0 (Coord);
void set_y1 (Coord);
-
+
bool covers (Duple const &) const;
private:
diff --git a/libs/canvas/canvas/canvas.h b/libs/canvas/canvas/canvas.h
index c812f8a869..87e580e046 100644
--- a/libs/canvas/canvas/canvas.h
+++ b/libs/canvas/canvas/canvas.h
@@ -59,7 +59,7 @@ class ScrollGroup;
* of screen pixels, with an origin of (0, 0) at the top left. x increases
* rightwards and y increases downwards.
*/
-
+
class LIBCANVAS_API Canvas
{
public:
@@ -153,7 +153,7 @@ public:
/** Set the timeout used to display tooltips, in milliseconds
*/
static void set_tooltip_timeout (uint32_t msecs);
-
+
protected:
Root _root;
Color _bg_color;
@@ -205,7 +205,7 @@ protected:
bool on_motion_notify_event (GdkEventMotion *);
bool on_enter_notify_event (GdkEventCrossing*);
bool on_leave_notify_event (GdkEventCrossing*);
-
+
bool button_handler (GdkEventButton *);
bool motion_notify_handler (GdkEventMotion *);
bool deliver_event (GdkEvent *);
@@ -228,7 +228,7 @@ private:
Item * _grabbed_item;
/** the item that currently has key focus or 0 */
Item * _focused_item;
-
+
bool _single_exposure;
sigc::connection tooltip_timeout_connection;
diff --git a/libs/canvas/canvas/circle.h b/libs/canvas/canvas/circle.h
index c84e3aceec..64ce2ea62d 100644
--- a/libs/canvas/canvas/circle.h
+++ b/libs/canvas/canvas/circle.h
@@ -31,7 +31,7 @@ class LIBCANVAS_API Circle : public Arc
Circle (Canvas*);
Circle (Item*);
};
-
+
}
#endif
diff --git a/libs/canvas/canvas/colors.h b/libs/canvas/canvas/colors.h
index 331010e639..2a3cbb2060 100644
--- a/libs/canvas/canvas/colors.h
+++ b/libs/canvas/canvas/colors.h
@@ -59,11 +59,11 @@ class LIBCANVAS_API SVAModifier
double s() const { return _s; }
double v() const { return _v; }
double a() const { return _a; }
-
+
HSV operator () (HSV& hsv) const;
std::string to_string () const;
void from_string (std::string const &);
-
+
private:
Type type;
double _s;
@@ -77,7 +77,7 @@ struct LIBCANVAS_API HSV
HSV (double h, double s, double v, double a = 1.0);
HSV (Color);
HSV (const std::string&);
-
+
double h;
double s;
double v;
@@ -85,12 +85,12 @@ struct LIBCANVAS_API HSV
std::string to_string() const;
bool is_gray() const;
-
+
Color color() const { return hsva_to_color (h,s, v, a); }
operator Color() const { return color(); }
HSV mod (SVAModifier const & svam);
-
+
HSV operator+ (const HSV&) const;
HSV operator- (const HSV&) const;
diff --git a/libs/canvas/canvas/fill.h b/libs/canvas/canvas/fill.h
index 9eddeec6b6..42160a6190 100644
--- a/libs/canvas/canvas/fill.h
+++ b/libs/canvas/canvas/fill.h
@@ -50,7 +50,7 @@ public:
}
typedef std::vector<std::pair<double,Color> > StopList;
-
+
void set_gradient (StopList const & stops, bool is_vertical);
void set_pattern (Cairo::RefPtr<Cairo::Pattern>);
diff --git a/libs/canvas/canvas/flag.h b/libs/canvas/canvas/flag.h
index 82f257b7d2..ed7bc7cacb 100644
--- a/libs/canvas/canvas/flag.h
+++ b/libs/canvas/canvas/flag.h
@@ -41,7 +41,7 @@ public:
void set_font_description (Pango::FontDescription);
bool covers (Duple const &) const;
-
+
private:
void setup (Distance height, Duple position);
@@ -52,5 +52,5 @@ private:
Rectangle* _rectangle;
bool _invert;
};
-
+
}
diff --git a/libs/canvas/canvas/item.h b/libs/canvas/canvas/item.h
index 098816cd4a..e92fc7fb4b 100644
--- a/libs/canvas/canvas/item.h
+++ b/libs/canvas/canvas/item.h
@@ -36,7 +36,7 @@
namespace ArdourCanvas
{
-struct Rect;
+struct Rect;
class Canvas;
class ScrollGroup;
@@ -51,7 +51,7 @@ class ScrollGroup;
* Any item that is being displayed on a canvas has a pointer to that canvas,
* and all except the `root group' have a pointer to their parent group.
*/
-
+
class LIBCANVAS_API Item : public Fill, public Outline
{
public:
@@ -97,7 +97,7 @@ public:
void grab ();
void ungrab ();
-
+
void unparent ();
void reparent (Item *);
@@ -176,7 +176,7 @@ public:
}
bool visible () const;
-
+
/** @return Our canvas, or 0 if we are not attached to one */
Canvas* canvas () const {
return _canvas;
@@ -204,7 +204,7 @@ public:
static int default_items_per_cell;
-
+
/* This is a sigc++ signal because it is solely
concerned with GUI stuff and is thus single-threaded
*/
@@ -223,23 +223,23 @@ public:
return false;
}
};
-
+
sigc::signal1<bool, GdkEvent*, EventAccumulator<bool> > Event;
#ifdef CANVAS_DEBUG
std::string name;
#endif
-
+
#ifdef CANVAS_COMPATIBILITY
void grab_focus ();
-#endif
+#endif
const std::string& tooltip () const { return _tooltip; }
void set_tooltip (const std::string&);
void start_tooltip_timeout ();
void stop_tooltip_timeout ();
-
+
virtual void dump (std::ostream&) const;
std::string whatami() const;
diff --git a/libs/canvas/canvas/line.h b/libs/canvas/canvas/line.h
index b178554c84..bd58887604 100644
--- a/libs/canvas/canvas/line.h
+++ b/libs/canvas/canvas/line.h
@@ -60,7 +60,7 @@ class LIBCANVAS_API Line : public Item
private:
Duple _points[2];
};
-
+
}
#endif
diff --git a/libs/canvas/canvas/line_set.h b/libs/canvas/canvas/line_set.h
index fad100fdf9..c305cceab5 100644
--- a/libs/canvas/canvas/line_set.h
+++ b/libs/canvas/canvas/line_set.h
@@ -51,7 +51,7 @@ public:
struct Line {
Line (Coord p, Distance width_, Color color_) : pos (p), width (width_), color (color_) {}
-
+
Coord pos;
Distance width;
Color color;
diff --git a/libs/canvas/canvas/lookup_table.h b/libs/canvas/canvas/lookup_table.h
index cf52633524..2877f7a727 100644
--- a/libs/canvas/canvas/lookup_table.h
+++ b/libs/canvas/canvas/lookup_table.h
@@ -43,7 +43,7 @@ public:
virtual bool has_item_at_point (Duple const & point) const = 0;
protected:
-
+
Item const & _item;
};
diff --git a/libs/canvas/canvas/outline.h b/libs/canvas/canvas/outline.h
index 474501c8c7..38f8eb2e32 100644
--- a/libs/canvas/canvas/outline.h
+++ b/libs/canvas/canvas/outline.h
@@ -46,7 +46,7 @@ public:
Distance outline_width () const {
return _outline_width;
}
-
+
virtual void set_outline_width (Distance);
bool outline () const {
diff --git a/libs/canvas/canvas/poly_item.h b/libs/canvas/canvas/poly_item.h
index 732adb14b3..bdb7c20b1a 100644
--- a/libs/canvas/canvas/poly_item.h
+++ b/libs/canvas/canvas/poly_item.h
@@ -45,7 +45,7 @@ protected:
Points _points;
};
-
+
}
#endif
diff --git a/libs/canvas/canvas/poly_line.h b/libs/canvas/canvas/poly_line.h
index 04b05f5df1..fce013dfd6 100644
--- a/libs/canvas/canvas/poly_line.h
+++ b/libs/canvas/canvas/poly_line.h
@@ -31,11 +31,11 @@ class LIBCANVAS_API PolyLine : public PolyItem
public:
PolyLine (Canvas*);
PolyLine (Item*);
-
+
void render (Rect const & area, Cairo::RefPtr<Cairo::Context>) const;
virtual void set_steps (Points const &, bool stepped);
-
+
bool covers (Duple const &) const;
/**
* Set the distance at which a point will be considered to be covered
@@ -47,7 +47,7 @@ class LIBCANVAS_API PolyLine : public PolyItem
private:
double _threshold;
};
-
+
}
#endif
diff --git a/libs/canvas/canvas/polygon.h b/libs/canvas/canvas/polygon.h
index e0e6b1a1f7..65fcdde981 100644
--- a/libs/canvas/canvas/polygon.h
+++ b/libs/canvas/canvas/polygon.h
@@ -45,7 +45,7 @@ public:
void cache_shape_computation () const;
};
-
+
}
#endif
diff --git a/libs/canvas/canvas/rectangle.h b/libs/canvas/canvas/rectangle.h
index c40d3fccb0..8b65940454 100644
--- a/libs/canvas/canvas/rectangle.h
+++ b/libs/canvas/canvas/rectangle.h
@@ -34,7 +34,7 @@ public:
Rectangle (Canvas*, Rect const &);
Rectangle (Item*);
Rectangle (Item*, Rect const &);
-
+
void render (Rect const &, Cairo::RefPtr<Cairo::Context>) const;
void compute_bounding_box () const;
diff --git a/libs/canvas/canvas/root_group.h b/libs/canvas/canvas/root_group.h
index 1763fc11df..1d2c516b8b 100644
--- a/libs/canvas/canvas/root_group.h
+++ b/libs/canvas/canvas/root_group.h
@@ -29,7 +29,7 @@ class LIBCANVAS_API Root : public Container
{
private:
friend class Canvas;
-
+
Root (Canvas *);
void compute_bounding_box () const;
diff --git a/libs/canvas/canvas/ruler.h b/libs/canvas/canvas/ruler.h
index 0a6a13e078..0a2e43587e 100644
--- a/libs/canvas/canvas/ruler.h
+++ b/libs/canvas/canvas/ruler.h
@@ -28,7 +28,7 @@
namespace ArdourCanvas
{
-
+
class LIBCANVAS_API Ruler : public Rectangle
{
public:
@@ -42,7 +42,7 @@ public:
double position;
Style style;
};
-
+
struct Metric {
Metric () : units_per_pixel (0) {}
virtual ~Metric() {}
@@ -51,15 +51,15 @@ public:
/* lower and upper and sample positions, which are also canvas coordinates
*/
-
+
virtual void get_marks (std::vector<Mark>&, double lower, double upper, int maxchars) const = 0;
};
-
+
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_font_description (Pango::FontDescription);
void set_metric (const Metric&);
diff --git a/libs/canvas/canvas/scroll_group.h b/libs/canvas/canvas/scroll_group.h
index fd9b2388d4..0317662006 100644
--- a/libs/canvas/canvas/scroll_group.h
+++ b/libs/canvas/canvas/scroll_group.h
@@ -34,7 +34,7 @@ class LIBCANVAS_API ScrollGroup : public Container
ScrollsVertically = 0x1,
ScrollsHorizontally = 0x2
};
-
+
ScrollGroup (Canvas*, ScrollSensitivity);
ScrollGroup (Item*, ScrollSensitivity);
diff --git a/libs/canvas/canvas/tracking_text.h b/libs/canvas/canvas/tracking_text.h
index 901e5c2925..744e5370fb 100644
--- a/libs/canvas/canvas/tracking_text.h
+++ b/libs/canvas/canvas/tracking_text.h
@@ -29,7 +29,7 @@ class LIBCANVAS_API TrackingText : public Text
public:
TrackingText (Canvas*);
TrackingText (Item*);
-
+
void show_and_track (bool track_x, bool track_y);
void set_offset (Duple const &);
void set_x_offset (double);
diff --git a/libs/canvas/canvas/types.h b/libs/canvas/canvas/types.h
index c43be9bbdd..a92d637925 100644
--- a/libs/canvas/canvas/types.h
+++ b/libs/canvas/canvas/types.h
@@ -60,12 +60,12 @@ struct LIBCANVAS_API Duple
: x (0)
, y (0)
{}
-
+
Duple (Coord x_, Coord y_)
: x (x_)
, y (y_)
{}
-
+
Coord x;
Coord y;
@@ -104,14 +104,14 @@ struct LIBCANVAS_API Rect
, x1 (0)
, y1 (0)
{}
-
+
Rect (Coord x0_, Coord y0_, Coord x1_, Coord y1_)
: x0 (x0_)
, y0 (y0_)
, x1 (x1_)
, y1 (y1_)
{}
-
+
Coord x0;
Coord y0;
Coord x1;
@@ -120,14 +120,14 @@ struct LIBCANVAS_API Rect
boost::optional<Rect> intersection (Rect const & o) const throw () {
Rect i (std::max (x0, o.x0), std::max (y0, o.y0),
std::min (x1, o.x1), std::min (y1, o.y1));
-
+
if (i.x0 > i.x1 || i.y0 > i.y1) {
return boost::optional<Rect> ();
}
-
+
return boost::optional<Rect> (i);
}
-
+
Rect extend (Rect const & o) const throw () {
return Rect (std::min (x0, o.x0), std::min (y0, o.y0),
std::max (x1, o.x1), std::max (y1, o.y1));
@@ -150,7 +150,7 @@ struct LIBCANVAS_API Rect
return Rect (canvas_safe_add (x0, amount), canvas_safe_add (y0, amount),
x1 - amount, y1 - amount);
}
-
+
bool contains (Duple const & point) const throw () {
return point.x >= x0 && point.x < x1 && point.y >= y0 && point.y < y1;
}
@@ -158,7 +158,7 @@ struct LIBCANVAS_API Rect
return Rect (std::min (x0, x1), std::min (y0, y1),
std::max (x0, x1), std::max (y0, y1));
}
-
+
bool empty() const throw () { return (x0 == x1 && y0 == y1); }
Distance width () const throw () {
@@ -181,5 +181,5 @@ extern LIBCANVAS_API std::ostream & operator<< (std::ostream &, Rect const &);
typedef std::vector<Duple> Points;
}
-
+
#endif
diff --git a/libs/canvas/canvas/wave_view.h b/libs/canvas/canvas/wave_view.h
index 20c3ad5cce..8dfd988b6b 100644
--- a/libs/canvas/canvas/wave_view.h
+++ b/libs/canvas/canvas/wave_view.h
@@ -42,7 +42,7 @@ namespace Gdk {
}
class WaveViewTest;
-
+
namespace ArdourCanvas {
struct LIBCANVAS_API WaveViewThreadRequest
@@ -55,10 +55,10 @@ struct LIBCANVAS_API WaveViewThreadRequest
};
WaveViewThreadRequest () : stop (0) {}
-
+
bool should_stop () const { return (bool) g_atomic_int_get (const_cast<gint*>(&stop)); }
void cancel() { g_atomic_int_set (&stop, 1); }
-
+
RequestType type;
framepos_t start;
framepos_t end;
@@ -71,9 +71,9 @@ struct LIBCANVAS_API WaveViewThreadRequest
boost::weak_ptr<const ARDOUR::Region> region;
/* resulting image, after request has been satisfied */
-
+
Cairo::RefPtr<Cairo::ImageSurface> image;
-
+
private:
gint stop; /* intended for atomic access */
};
@@ -85,7 +85,7 @@ class LIBCANVAS_API WaveViewCache
public:
WaveViewCache();
~WaveViewCache();
-
+
struct Entry {
/* these properties define the cache entry as unique.
@@ -111,7 +111,7 @@ class LIBCANVAS_API WaveViewCache
/* last time the cache entry was used */
uint64_t timestamp;
-
+
Entry (int chan, Coord hght, float amp, Color fcl, double spp, framepos_t strt, framepos_t ed,
Cairo::RefPtr<Cairo::ImageSurface> img)
: channel (chan)
@@ -127,10 +127,10 @@ class LIBCANVAS_API WaveViewCache
uint64_t image_cache_threshold () const { return _image_cache_threshold; }
void set_image_cache_threshold (uint64_t);
void clear_cache ();
-
+
void add (boost::shared_ptr<ARDOUR::AudioSource>, boost::shared_ptr<Entry>);
void use (boost::shared_ptr<ARDOUR::AudioSource>, boost::shared_ptr<Entry>);
-
+
void consolidate_image_cache (boost::shared_ptr<ARDOUR::AudioSource>,
int channel,
Coord height,
@@ -196,18 +196,18 @@ public:
Cairo::RefPtr<Cairo::ImageSurface> _image;
PBD::Signal0<void> ImageReady;
-
+
/* Displays a single channel of waveform data for the given Region.
x = 0 in the waveview corresponds to the first waveform datum taken
from region->start() samples into the source data.
-
+
x = N in the waveview corresponds to the (N * spp)'th sample
measured from region->start() into the source data.
-
+
when drawing, we will map the zeroth-pixel of the waveview
into a window.
-
+
The waveview itself contains a set of pre-rendered Cairo::ImageSurfaces
that cache sections of the display. This is filled on-demand and
never cleared until something explicitly marks the cache invalid
@@ -235,10 +235,10 @@ public:
* want this behaviour.
*/
void set_start_shift (double pixels);
-
+
void set_fill_color (Color);
void set_outline_color (Color);
-
+
void region_resized ();
void gain_changed ();
@@ -277,8 +277,8 @@ public:
static void stop_drawing_thread ();
static void set_image_cache_size (uint64_t);
-
-#ifdef CANVAS_COMPATIBILITY
+
+#ifdef CANVAS_COMPATIBILITY
void*& property_gain_src () {
return _foo_void;
}
@@ -312,7 +312,7 @@ public:
double _amplitude_above_axis;
float _region_amplitude;
double _start_shift;
-
+
/** The `start' value to use for the region; we can't use the region's
* value as the crossfade editor needs to alter it.
*/
@@ -340,14 +340,14 @@ public:
keep updating (e.g. while recording)
*/
bool always_get_image_in_thread;
-
+
/** Set to true by render(). Used so that we know if the wave view
* has actually been displayed on screen. ::set_height() when this
* is true does not use get_image_in_thread, because it implies
* that the height is being set BEFORE the waveview is drawn.
*/
mutable bool rendered;
-
+
PBD::ScopedConnectionList invalidation_connection;
PBD::ScopedConnection image_ready_connection;
@@ -364,14 +364,14 @@ public:
boost::shared_ptr<WaveViewCache::Entry> get_image (framepos_t start, framepos_t end, bool& full_image) const;
boost::shared_ptr<WaveViewCache::Entry> get_image_from_cache (framepos_t start, framepos_t end, bool& full_image) const;
-
+
struct LineTips {
double top;
double bot;
double spread;
bool clip_max;
bool clip_min;
-
+
LineTips() : top (0.0), bot (0.0), clip_max (false), clip_min (false) {}
};
@@ -382,7 +382,7 @@ public:
void draw_image (Cairo::RefPtr<Cairo::ImageSurface>&, ARDOUR::PeakData*, int n_peaks, boost::shared_ptr<WaveViewThreadRequest>) const;
void draw_absent_image (Cairo::RefPtr<Cairo::ImageSurface>&, ARDOUR::PeakData*, int) const;
-
+
void cancel_my_render_request () const;
void queue_get_image (boost::shared_ptr<const ARDOUR::Region> region, framepos_t start, framepos_t end) const;
@@ -394,7 +394,7 @@ public:
mutable boost::shared_ptr<WaveViewCache::Entry> _current_image;
mutable boost::shared_ptr<WaveViewThreadRequest> current_request;
-
+
static WaveViewCache* images;
static void drawing_thread ();
diff --git a/libs/canvas/canvas/widget.h b/libs/canvas/canvas/widget.h
index 590bb3af7d..127862037c 100644
--- a/libs/canvas/canvas/widget.h
+++ b/libs/canvas/canvas/widget.h
@@ -33,7 +33,7 @@ class LIBCANVAS_API Widget : public Item
public:
Widget (Canvas*, CairoWidget&);
Widget (Item*, CairoWidget&);
-
+
void render (Rect const &, Cairo::RefPtr<Cairo::Context>) const;
void compute_bounding_box () const;