X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=libs%2Fcanvas%2Fcanvas%2Fflag.h;h=ac77cc759f7f22a96da157eeb53e4af8556321ec;hb=9a0a2a29b53a7d8b74d64039a3a594e54262ef29;hp=fe14a63d96160ef1ec44711c925dadaf8d4f7477;hpb=6473cc7cb431abe71721341c550130e61cf64aa1;p=ardour.git diff --git a/libs/canvas/canvas/flag.h b/libs/canvas/canvas/flag.h index fe14a63d96..ac77cc759f 100644 --- a/libs/canvas/canvas/flag.h +++ b/libs/canvas/canvas/flag.h @@ -17,8 +17,14 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -#include "canvas/group.h" +#ifndef __CANVAS_FLAG_H__ +#define __CANVAS_FLAG_H__ + +#include + +#include "canvas/visibility.h" #include "canvas/types.h" +#include "canvas/container.h" namespace ArdourCanvas { @@ -26,23 +32,32 @@ class Text; class Line; class Rectangle; -class Flag : public Group +class LIBCANVAS_API Flag : public Container { public: - Flag (Group *, Distance, Color, Color, Duple); + Flag (Canvas *, Distance, Gtkmm2ext::Color, Gtkmm2ext::Color, Duple, bool invert=false); + Flag (Item*, Distance, Gtkmm2ext::Color, Gtkmm2ext::Color, Duple, bool invert=false); void set_text (std::string const &); void set_height (Distance); - bool covers (Duple const &) const; - + void set_font_description (Pango::FontDescription); + + bool covers (Duple const &) const; + + double width() const; + private: - Distance _height; - Color _outline_color; - Color _fill_color; + void setup (Distance height, Duple position); + + Gtkmm2ext::Color _outline_color; + Gtkmm2ext::Color _fill_color; Text* _text; Line* _line; Rectangle* _rectangle; + bool _invert; }; - + } + +#endif // __CANVAS_FLAG_H__