12 #ifndef ROOT_X11Buffer
13 #define ROOT_X11Buffer
18 #include <Cocoa/Cocoa.h>
20 #ifndef ROOT_CocoaGuiTypes
64 virtual void Execute()
const = 0;
65 virtual void Execute(CGContextRef )
const;
80 bool IsGraphicsCommand()
const
86 class DrawSegments :
public Command {
88 std::vector<Segment_t> fSegments;
93 bool IsGraphicsCommand()
const
99 class ClearArea :
public Command {
106 bool IsGraphicsCommand()
const
112 class CopyArea :
public Command {
116 const Point fDstPoint;
122 bool IsGraphicsCommand()
const
131 class DrawString :
public Command {
134 const std::string fText;
139 bool IsGraphicsCommand()
const
147 class FillRectangle :
public Command {
154 bool IsGraphicsCommand()
const
162 class FillPolygon :
public Command {
164 std::vector<Point_t> fPolygon;
169 bool IsGraphicsCommand()
const
177 class DrawRectangle :
public Command {
184 bool IsGraphicsCommand()
const
192 class UpdateWindow :
public Command {
199 bool IsGraphicsCommand()
const
207 class DeletePixmap :
public Command {
214 class DrawBoxXor :
public Command {
220 DrawBoxXor(
Window_t windowID,
const Point &
p1,
const Point &
p2);
223 void Execute(CGContextRef ctx)
const;
226 class DrawLineXor :
public Command {
232 DrawLineXor(
Window_t windowID,
const Point &
p1,
const Point &
p2);
235 void Execute(CGContextRef ctx)
const;
238 class CommandBuffer {
240 CommandBuffer(
const CommandBuffer &rhs);
241 CommandBuffer &
operator = (
const CommandBuffer &rhs);
243 std::vector<Command *> fCommands;
244 std::vector<QuartzView *> fViewBranch;
246 std::vector<Command *> fXorOps;
248 typedef std::vector<Command *>::size_type size_type;
262 void AddDeletePixmap(
Pixmap_t pixmap);
270 void RemoveOperationsForDrawable(
Drawable_t wid);
271 void RemoveGraphicsOperationsForWindow(
Window_t wid);
272 void RemoveXORGraphicsOperationsForWindow(
Window_t wid);
274 size_type BufferSize()
const
276 return fCommands.size();
279 void ClearCommands();
280 void ClearXOROperations();
291 : fX1(0), fY1(0), fX2(0), fY2(0)
295 WidgetRect(
int leftX,
int bottomY,
int rightX,
int topY)
296 : fX1(leftX), fY1(bottomY), fX2(rightX), fY2(topY)
302 void BuildClipRegion(
const WidgetRect &rect);
304 std::vector<WidgetRect> fRectsToClip;
305 std::vector<CGRect> fClippedRegion;
306 std::vector<int> fXBounds;
307 std::vector<int> fYBounds;
308 std::vector<bool> fGrid;
virtual void Execute() const =0
Namespace for new ROOT classes and functions.
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))