12 #ifndef ROOT_X11Buffer
13 #define ROOT_X11Buffer
18 #include <Cocoa/Cocoa.h>
60 virtual void Execute()
const = 0;
61 virtual void Execute(CGContextRef )
const;
76 bool IsGraphicsCommand()
const
82 class DrawSegments :
public Command {
84 std::vector<Segment_t> fSegments;
89 bool IsGraphicsCommand()
const
95 class ClearArea :
public Command {
102 bool IsGraphicsCommand()
const
108 class CopyArea :
public Command {
112 const Point fDstPoint;
118 bool IsGraphicsCommand()
const
127 class DrawString :
public Command {
130 const std::string fText;
135 bool IsGraphicsCommand()
const
143 class FillRectangle :
public Command {
150 bool IsGraphicsCommand()
const
158 class FillPolygon :
public Command {
160 std::vector<Point_t> fPolygon;
165 bool IsGraphicsCommand()
const
173 class DrawRectangle :
public Command {
180 bool IsGraphicsCommand()
const
188 class UpdateWindow :
public Command {
195 bool IsGraphicsCommand()
const
203 class DeletePixmap :
public Command {
210 class DrawBoxXor :
public Command {
216 DrawBoxXor(
Window_t windowID,
const Point &
p1,
const Point &
p2);
219 void Execute(CGContextRef ctx)
const;
222 class DrawLineXor :
public Command {
228 DrawLineXor(
Window_t windowID,
const Point &
p1,
const Point &
p2);
231 void Execute(CGContextRef ctx)
const;
234 class CommandBuffer {
236 CommandBuffer(
const CommandBuffer &rhs);
237 CommandBuffer &
operator = (
const CommandBuffer &rhs);
239 std::vector<Command *> fCommands;
240 std::vector<QuartzView *> fViewBranch;
242 std::vector<Command *> fXorOps;
244 typedef std::vector<Command *>::size_type size_type;
258 void AddDeletePixmap(
Pixmap_t pixmap);
266 void RemoveOperationsForDrawable(
Drawable_t wid);
267 void RemoveGraphicsOperationsForWindow(
Window_t wid);
268 void RemoveXORGraphicsOperationsForWindow(
Window_t wid);
270 size_type BufferSize()
const
272 return fCommands.size();
275 void ClearCommands();
276 void ClearXOROperations();
287 : fX1(0), fY1(0), fX2(0), fY2(0)
291 WidgetRect(
int leftX,
int bottomY,
int rightX,
int topY)
292 : fX1(leftX), fY1(bottomY), fX2(rightX), fY2(topY)
298 void BuildClipRegion(
const WidgetRect &rect);
300 std::vector<WidgetRect> fRectsToClip;
301 std::vector<CGRect> fClippedRegion;
302 std::vector<int> fXBounds;
303 std::vector<int> fYBounds;
304 std::vector<bool> fGrid;
virtual void Execute() const =0
friend class CommandBuffer
static const double x2[5]
static double p2(double t, double a, double b, double c)
Command & operator=(const Command &rhs)
static double p1(double t, double a, double b)
lv DrawLine(0.33, 0.0, 0.33, 1.0)
static const double x1[5]
virtual bool HasOperand(Drawable_t drawable) const
virtual bool IsGraphicsCommand() const
Binding & operator=(OUT(*fun)(void))