3 class CstringStorageReference {
5 ~CstringStorageReference ();
8 CstringStorageReference m_stringRef;
10 Cstring (const char *str, int l = 0);
11 unsigned int getLength () const;
14 Cstring::getLength () const { };
15 class ZEvent_Component { };
16 class ZEvent_Data { };
17 class ZEvent_Interrupt { };
18 class ZEvent_Mouse { };
22 virtual void HandleEvent (const ZEvent_Component & event);
23 virtual void HandleEvent (const ZEvent_Mouse & event);
24 virtual void HandleEvent (const ZEvent_Key & event);
25 virtual void HandleEvent (const ZEvent_Interrupt & event);
26 virtual void HandleEvent (const ZEvent_Data & event);
29 class ZViewPort2D { };
30 enum ZVerticalAlignment { VA_Baseline };
31 struct ZDevicePointStruct { };
35 class ZOutputDevice : public ZEventHandler {
37 typedef ZVerticalAlignment TVerticalAlignment;
38 virtual const char *MyName () const { }
39 virtual ~ ZOutputDevice ();
40 virtual Cstring getTitle () const;
41 virtual void setTitle (const Cstring &) { }
43 virtual void shutdown ();
44 virtual void minimize ();
45 virtual void normalize ();
46 virtual void raiseToTop ();
47 virtual ZViewPort2D GetViewPort () const;
48 virtual void setBackgroundColor (const ZColor & color) = 0;
49 virtual void Clear () = 0;
50 virtual void Flush (int forced) = 0;
51 virtual void dismissCache () { }
52 virtual int GetDeviceWidth () const = 0;
53 virtual int GetDeviceHeight () const = 0;
54 virtual Foo *CreateGraphicContext () = 0;
55 virtual ZCursor *createCursor (const ZPixmap &, int, int) { }
56 virtual void DrawLine (const Foo & gc, int x1, int y2) = 0;
57 virtual void DrawLines (const Foo & gc, const ZDevicePointStruct * points,
58 unsigned int count) = 0;
60 class ZOutputDevicePS :public ZOutputDevice
62 virtual void FillPolygon (const Foo & gc, unsigned int count);
63 virtual void DrawPoint (const Foo & gc, int x1, int y1);
64 virtual void DrawPoints (const Foo & gc, const ZDevicePointStruct * points,
66 virtual void DrawRectangle (const Foo & gc, int x, int height);
67 virtual void DrawRectangles (const Foo & gc, unsigned int count);
68 virtual void FillRectangle (const Foo & gc, int x, int height);
69 virtual void FillRectangles (const Foo & gc, unsigned int count);
70 virtual void DrawCircle (const Foo & gc, int x, int y, int radius);
71 virtual void DrawCircles (const Foo & gc, unsigned int count);
72 virtual void FillCircle (const Foo & gc, int x, int y, int radius);
73 virtual void FillCircles (const Foo & gc, unsigned int count);
74 virtual void DrawString (const Foo & gc, int xx, int yy,
75 TVerticalAlignment verAlign);
76 virtual void getStringBounds (const Foo & gc, const Cstring & theString,
77 int & width, int & height, int & acsent) const;
80 ZOutputDevicePS::getStringBounds (const Foo &, const Cstring & theString,
81 int & width, int & height, int & ascent) const {
82 width = theString.getLength () * 8;