hocmark.h
Go to the documentation of this file.00001 #ifndef hocmark_h
00002 #define hocmark_h
00003
00004 #undef check
00005
00006 #include <InterViews/polyglyph.h>
00007
00008 class Color;
00009 class Brush;
00010
00011 class HocMark : public PolyGlyph {
00012 public:
00013 virtual ~HocMark();
00014 static HocMark* instance(char style, float size,
00015 const Color*, const Brush*);
00016
00017 virtual void request(Requisition&) const;
00018 virtual void allocate(Canvas*, const Allocation&, Extension&);
00019 virtual void draw(Canvas*, const Allocation&) const;
00020
00021 virtual void pick(Canvas*, const Allocation&, int depth, Hit&);
00022
00023 protected:
00024 HocMark(char style, float size, const Color*, const Brush*);
00025 protected:
00026 float size_;
00027 const Color* c_;
00028 const Brush* b_;
00029 char style_;
00030 private:
00031 static void add(HocMark*);
00032 static HocMark* search(char style, float size, const Color*, const Brush*);
00033 static HocMark* check(char style, float size, const Color*, const Brush*);
00034 private:
00035 static PolyGlyph* mark_list_;
00036 static HocMark* most_recent_;
00037 };
00038
00039 #endif