-
Notifications
You must be signed in to change notification settings - Fork 35
/
Copy pathdlg_savesnippet.htm
155 lines (154 loc) · 5.84 KB
/
dlg_savesnippet.htm
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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<!--
* This Source Code Form is subject to the terms of the Mozilla Public License,
* v. 2.0. If a copy of the MPL was not distributed with this file, You can
* obtain one at https://mozilla.org/MPL/2.0/
*
* Copyright (C) 2005-2025, Peter Johnson (gravatar.com/delphidabbler).
*
* Help topic for Save Annotated Source dialogue box.
-->
<html>
<head>
<meta
name="generator"
content="HTML Tidy, see www.w3.org">
<meta
http-equiv="Content-Type"
content="text-html; charset=Windows-1252">
<title>
Save Annotated Source Dialogue Box
</title>
<link
rel="stylesheet"
href="../css/codesnip.css"
type="text/css">
</head>
<body>
<object
type="application/x-oleobject"
classid="clsid:1e2a7bd0-dab9-11d0-b93a-00c04fc99f9e">
<param
name="ALink Name"
value="SaveSnippetDlg">
</object>
<h1>
<a name="dlg_savesnippet"></a>Save Annotated Source Dialogue Box
</h1>
<p>
This dialogue box is displayed when the <em>File | Save Annotated
Source</em> menu option is clicked. It is used to specify the required
file name, type and formatting information for the
<a href="snippet_routine.htm">routine</a> snippet or category that is to
be saved.
</p>
<p>
The saved code includes comments noting the units and any other snippets
from the database that are required by the saved routine(s).
</p>
<p>
The output file contains the source code of the currently selected
<a href="snippet_routine.htm">routine</a> snippet or category. If a
category is selected its contained routines are included in the output
file, but any non-routine snippets are ignored.
</p>
<p>
The dialogue is a standard Windows save dialogue box with a few added
options.
</p>
<p>
You specify the name and folder for the file in the usual way.
</p>
<p>
Use the <em>Save as type</em> drop down list to specify the type of file
to be saved. Options are:
</p>
<ul>
<li>
A Pascal include file (.inc) – The code is written to a file with
extension .inc that can be included in any Pascal source file. The file
should be valid for inclusion in a Pascal unit using the
<code>$INCLUDE</code> (or <code>$I</code>) directive.
</li>
<li>
A plain text file (.txt) – This is the same as the Pascal include
file except that the extension is .txt rather than .inc.
</li>
<li>
A HTML 5 file (.html) – This option writes the source code out as a
valid HTML 5 document that uses embedded CSS to format the code. The
source code will be syntax highlighted if the <em>Use syntax
highlighting</em> check box is checked.
</li>
<li>
An XHTML file (.html) – This option writes the source code out as a
valid XHTML document that uses embedded CSS to format the code. The
source code will be syntax highlighted if the <em>Use syntax
highlighting</em> check box is checked.
</li>
<li>
A rich text file (.rtf) – The source code is written out as an RTF
document. Again syntax highlighting can be used if the <em>Use syntax
highlighting</em> check box is checked.
</li>
</ul>
<p>
Snippet descriptions can be written as a Pascal comment to the output
file. Use the <em>Comment style</em> drop down list to specify the style
of commenting to be used. Such comments can be inhibited by selecting the
<em>No descriptive comments</em> option from the list. If the <em>Truncate
comments to 1st paragraph</em> check box is ticked then only the first
paragraph of the snippet's description is used. Clearing this check box
means that the full text of the description is used.
</p>
<p>
The output file encoding can be be specified in the <em>File Encoding</em>
drop down list. Options vary depending on the file type. Some file types
support only a single encoding, in which case the drop down list will be
disabled. The encodings are:
</p>
<ul>
<li>
<em>ANSI Code Page <code>nnn</code></em> – ANSI encoding for the system default code page,
where <code>nnn</code> is the code page for the user's locale.
Available for both plain text and Pascal include files.
</li>
<li>
<em>UTF-8</em> – UTF-8 encoding, with BOM<sup>†</sup>.
Available for both plain text and Pascal include files and as the only
option for HTML5 and XHTML files. If used for Pascal include files be warned that
the files will only compile with compilers that support Unicode source
files.
</li>
<li>
<em>UTF-16 Little Endian</em> – UTF-16 LE encoding, with
BOM<sup>†</sup>. Available for plain text files only.
</li>
<li>
<em>UTF-18 Big Endian</em> – UTF-16 BE encoding, with
BOM<sup>†</sup>. Available for plain text files only.
</li>
<li>
<em>ASCII</em> – ASCII encoding. Available as the only option for
rich text files.
</li>
</ul>
<p>
The output can be previewed by clicking the <em>Preview</em> button. This
displays the source code in a dialogue box, formatted according to your
selections. Text in the preview can be selected and copied to the
clipboard if required.
</p>
<p>
Use the <em>Save</em> button to write the file to disk or press
<em>Cancel</em> to abort.
</p>
<h3>
Footnote
</h3>
<p>
† BOM = Byte Order Mark or Preamble: a sequence of bytes at the
start of a text file that identifies its encoding.
</p>
</body>
</html>