forked from graemeg/fpGUI
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathadding_a_new_canvas_class.ipf
71 lines (63 loc) · 1.58 KB
/
adding_a_new_canvas_class.ipf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
.* This file is encoded using IBM850 encoding
.* :encoding=IBM850:
:userdoc.
:docprof toc=123456.
:title.Adding a new Canvas class
.* This as a marco definition
.nameit symbol=pubdate text='December 2016'
.nameit symbol=dv text='Docview'
.nameit symbol=fpg text='fpGUI Toolkit'
.nameit symbol=fpc text='Free Pascal Compiler'
:h1.Adding a new Canvas class
:font facename='Helvetica-20:antialias=true'.
.* :artwork name='img0.bmp' align=center.
:lines align=center.
Adding a new Canvas class
.br
:elines.
:font facename=default.
:lines align=center.
Written by Andrew Haines
.br
:elines.
:p.
:p.
:table cols='13 20'.
:row.
:c.Version
:c.v1.0
:row.
:c.Pub Date
:c.&pubdate.
:etable.
:h2.Abstact
:cgraphic.
þþþþþþþþþþ
Abstract
þþþþþþþþþþ
:ecgraphic.
:p.This will hopefully help anyone in the future implementing a new canvas
class in &fpg..
:h2.Steps
:cgraphic.
þþþþþþþ
Steps
þþþþþþþ
:ecgraphic.
:ol.
:li.Create a new unit that uses :color fc=darkred.fpg_base:color fc=default..
:li.Add a new canvas class i.e. :color fc=darkred.TfpgCairoCanvas:color fc=default. derived from :color fc=darkred.TfpgCanvasBase:color fc=default..
:li.Copy/Paste the :hp2.virtual; abstract;:ehp2. methods to the new type.
:li.Start implementing those methods.
:eol.
:h2.Further Reading
:cgraphic.
þþþþþþþþþþþþþþþþþ
Further Reading
þþþþþþþþþþþþþþþþþ
:ecgraphic.
:p.To get a better understanding of how &fpg.'s painting process works, what
methods get called, and how the various widget Canvas's work together, take a
look at
the :link reftype=hd refid=1 database='alienwindow_design.inf'.alienwindow_design.inf:elink. file.
:euserdoc.