ide.tex 110 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731
  1. %
  2. % $Id$
  3. % This file is part of the FPC documentation.
  4. % Copyright (C) 2000 by Florian Klaempfl
  5. %
  6. % The FPC documentation is free text; you can redistribute it and/or
  7. % modify it under the terms of the GNU Library General Public License as
  8. % published by the Free Software Foundation; either version 2 of the
  9. % License, or (at your option) any later version.
  10. %
  11. % The FPC Documentation is distributed in the hope that it will be useful,
  12. % but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  14. % Library General Public License for more details.
  15. %
  16. % You should have received a copy of the GNU Library General Public
  17. % License along with the FPC documentation; see the file COPYING.LIB. If not,
  18. % write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  19. % Boston, MA 02111-1307, USA.
  20. %
  21. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  22. % The IDE
  23. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  24. \chapter{The IDE}
  25. The IDE (\textbf{I}ntegrated \textbf{D}evelopment \textbf{E}nvironment)
  26. provides a comfortable user interface to the compiler. It contains an
  27. editor with syntax highlighting, a debugger, symbol browser etc.
  28. The IDE is a text-mode application which has the same look and feel
  29. on all supported operating systems. It is modelled after the IDE of Turbo
  30. Pascal, so many people should feel comfortable using it.
  31. Currently, the IDE is available for \dos, \windows and \linux.
  32. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  33. % First steps with the IDE
  34. \section{First steps with the IDE}
  35. %
  36. % Starting the IDE
  37. %
  38. \subsection{Starting the IDE}
  39. The IDE is started by entering the command:
  40. \begin{verbatim}
  41. fp
  42. \end{verbatim}
  43. at the command line. It can also be started from a graphical user
  44. interface such as \windows.
  45. \begin{remark}
  46. Under \windows, it is possible to switch between windowed mode and
  47. full screen mode by pressing \key{Alt-Enter}).
  48. \end{remark}
  49. %
  50. % IDE command-line options.
  51. %
  52. \subsection{IDE Command line options}
  53. When starting the IDE, command line options can be passed:
  54. \begin{verbatim}
  55. fp [-option] [-option] ... <file name> ...
  56. \end{verbatim}
  57. \var{Option} is one of the following switches (the option letters
  58. are case insensitive):
  59. \begin{description}
  60. \item [-N] (\dos only) Do not use long file names. \windows 95 and later
  61. versions of \windows provide an interface to DOS applications to access
  62. long file names.
  63. The IDE uses this interface by default to access files. Under certain
  64. circumstances, this can lead to problems. This switch tells the IDE not to
  65. use the long filenames.
  66. \item [-Cfilename] This option, followed by a filename, tells the IDE to
  67. read its options from \file{filename}. There should be no whitespace between
  68. the file name and the \var{-C}.
  69. \item [-F] use alternative graphic characters. This can be used to run the
  70. IDE on \linux in an X-term or through a telnet session.
  71. \item [-R] After starting the IDE, it changes automatically to the directory
  72. which was active when the IDE exited the last time.
  73. \item [-S] Disable the mouse. When this option is used, then the mouse is
  74. disabled, even if a mouse is present.
  75. \item[-Tttyname] (linux/unix only) Sends program output to tty \var{ttyname}.
  76. This is useful so one doesn't have to switch between program output and ide
  77. all the time.
  78. \end{description}
  79. The files given at the command line are loaded into edit windows automatically.
  80. \begin{remark}
  81. Under DOS/Win32, the first character of a command-line option can be a \var{/}
  82. character instead of a \var{-} character. So \var{/S} is equivalent to \var{-S}.
  83. \end{remark}
  84. \subsection{The IDE screen}
  85. After start up, the screen of the IDE can look like \seefig{idestart}.
  86. \FPCpic{The IDE screen immediately after startup}{}{idestart}
  87. At top of the screen the \emph{menu bar} is visible, at the bottom
  88. the \emph{status bar}. The empty space between them is called the
  89. \emph{desktop}.
  90. The status bar shows the keyboard shortcuts for frequently used
  91. commands, and allows quick access to these commands by clicking
  92. them with the mouse.
  93. At the right edge of the status bar, the current amount of unused
  94. memory is displayed. This is only an indication, since the IDE
  95. tries to allocate more memory from the operating system if it
  96. runs out of memory.
  97. The menu provides access to all of the IDE's functionality, and
  98. at the right edge of the menu, a clock is displayed.
  99. The IDE can be left by selecting \menu{File|Exit} in the menu
  100. \footnote{\menu{File|Exit} means select the item 'Exit' in the menu 'File'.}
  101. or by pressing \key{Alt-X}.
  102. \begin{remark}
  103. If a file \file{fp.ans} is found in the current directory,
  104. then it is loaded and used to paint the background.
  105. This file should contain ANSI drawing commands to draw on a screen.
  106. \end{remark}
  107. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  108. % Navigating in the IDE
  109. \section{Navigating in the IDE}
  110. The IDE can be navigated both with the keyboard and with a mouse, if the
  111. system is equipped with a mouse.
  112. %
  113. % Using the keyboard
  114. %
  115. \subsection{Using the keyboard}
  116. All functionality of the IDE is available through use of the keyboard.
  117. \begin{itemize}
  118. \item It is used for typing and navigating through the sources.
  119. \item Editing commands such as copying and pasting text.
  120. \item Moving and resizing windows.
  121. \item It can be used to access the menu, by pressing \key{ALT} and the
  122. appropriate highlighted menu letter, or by pressing \key{F10} and
  123. navigating through the menu with the arrow keys.
  124. more information on the menu can be found in \sees{idemenu}
  125. \item Many commands in the IDE are bound to shortcuts, i.e. typing a special
  126. combination of keys will execute a command immediately.
  127. \end{itemize}
  128. \begin{remark}
  129. \begin{itemize}
  130. \item When working in a \linux X-Term or through a telnet session, the
  131. key combination with \key{Alt} may not be available. To remedy this, the
  132. \key{Ctrl-Z} combination can be typed first. This means that e.g. \key{Alt-X}
  133. can be replaced by \key{Ctrl-Z X}.
  134. \item A complete reference of all keyboard shortcuts can be found in
  135. \sees{keyshortcuts}.
  136. \end{itemize}
  137. \end{remark}
  138. %
  139. % Using the mouse
  140. %
  141. \subsection{Using the mouse}
  142. \label{suse:mouseusage}
  143. If the system is equipped with a mouse, it can be used to work with the
  144. IDE. The left button is used to select menu items, press buttons, select
  145. text blocks etc.
  146. The right mouse button is used to access the local menu, if available.
  147. Holding down the \key{Ctrl} or \key{Alt} key and clicking the right
  148. button will execute user defined functions, see \sees{prefmouse}.
  149. \begin{remark}
  150. \begin{enumerate}
  151. \item Occasionally, the manual uses the term "drag the mouse". This
  152. means that the mouse is moved while the left mouse button is being
  153. pressed.
  154. \item
  155. The action of mouse buttons may be reversed, i.e. the actions of the left
  156. mouse button can be assigned to the right mouse button and vice versa
  157. \footnote{See \sees{prefmouse} for more information on how to reverse the
  158. actions of the mouse buttons.}. Throughout the manual, it is assumed
  159. that the actions of the mouse buttons are not reversed.
  160. \item
  161. The mouse is not always available, even if a mouse is installed:
  162. \begin{itemize}
  163. \item The IDE is running under \linux through a telnet connection from
  164. a \windows machine.
  165. \item The IDE is running under \linux in an X-term under X-windows.
  166. \end{itemize}
  167. \end{enumerate}
  168. \end{remark}
  169. %
  170. % Navigating in dialogs
  171. %
  172. \subsection{Navigating in dialogs}
  173. \label{se:navigatingdialogs}
  174. Dialogs usually have a lot of elements in them such as buttons, edit fields,
  175. memo fields, list boxes and so on. To activate one of these fields, it is
  176. sufficient to:
  177. \begin{enumerate}
  178. \item Click on the element with the mouse.
  179. \item Press the \key{Tab} key till the focus reaches the mouse
  180. \item Press the highlighted letter in the element's label. If the focus
  181. is currently on an element that allows to edit, then \key{Alt} should be
  182. pressed simultaneously with the highlighted letter. For a button, the action
  183. associated with the button will then be executed.
  184. \end{enumerate}
  185. Inside edit fields, list boxes, memos, navigation is carried out with the
  186. usual arrow key commands.
  187. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  188. % Windows
  189. \section{Windows}
  190. \label{se:windows}
  191. Nowadays, working with windowed applications should be no problem for
  192. most \windows and \linux users. Nevertheless, the following section
  193. describes how the windows work in the \fpc IDE, to allow efficient
  194. work with it.
  195. %
  196. % Window basics
  197. %
  198. \subsection{Window basics}
  199. \label{se:windowbasics}
  200. A common IDE window is displayed in \seefig{idewin}.
  201. \FPCpic{A common IDE window}{}{idewin}
  202. The window is surrounded by a so-called \emph{frame}, the white double
  203. line around the window.
  204. At the top of the window 4 things are displayed:
  205. \begin{itemize}
  206. \item
  207. At the upper left corner of the window, a \emph{close icon} is shown.
  208. When clicked, the window will be closed. It can be also closed by
  209. pressing \key{Alt-F3} or selecting the menu item \menu{Window|Close}.
  210. All open windows can be closed by selecting the menu item
  211. \menu{Window|Close all}.
  212. \item In the middle, the title of the window is displayed.
  213. \item Almost at the upper right corner, a number is visible.
  214. This number identifies the editor window, and pressing \key{Alt-Number}
  215. will jump to this window. Only the first 9 windows will get such a number.
  216. \item At the upper right corner, a small green arrow is visible.
  217. Clicking this arrow zooms the window so it covers the whole desktop.
  218. Clicking this arrow on a zoomed window will restore old size of the
  219. window. Pressing the key \key{F5} has the same effect as clicking
  220. that arrow. The same effect can be achieved with the menu item
  221. \menu{Window|Zoom}.
  222. Windows and dialogs which aren't resizeable can't be zoomed, either.
  223. \end{itemize}
  224. The right edge and bottom edges of a window contain scrollbars.
  225. They can be used to scroll the window contents with the mouse.
  226. The arrows at the ends of the scrollbars can be clicked to scroll the
  227. contents line by line. Clicking on the dotted area between the arrows
  228. and the cyan-coloured rectangle will scroll the window's content
  229. page by page. By dragging the rectangle the content can be scrolled
  230. continuously.
  231. The star and the numbers in the lower left corner of the window
  232. display information about the contents of the window. They
  233. are explained in the section about the editor, see \sees{editingtext}.
  234. %
  235. % Sizing+moving windows
  236. %
  237. \subsection{Sizing and moving windows}
  238. \label{se:windowsizingmoving}
  239. A window can be moved and sized using the mouse and the keyboard:
  240. To move a window:
  241. \begin{itemize}
  242. \item using the mouse, click on the title bar and drag the window
  243. with the mouse.
  244. \item using the keyboard, go into the size/move mode
  245. by pressing \key{Ctrl-F5} or selecting the menu item
  246. \menu{Window|Size/Move}. . Using the cursor keys the window can be moved.
  247. The size/move mode can be left by pressing \key{Enter}.
  248. In this case, the window will keep its size and position.
  249. Alternatively, pressing \key{Esc} will restore the old position.
  250. \end{itemize}
  251. To resize a window:
  252. \begin{itemize}
  253. \item using the mouse, click on the lower right corner of the window
  254. and drag it.
  255. \item using the keyboard, go into the size/move mode
  256. by pressing \key{Ctrl-F5} or selecting the menu item
  257. \menu{Window|Size/Move}. The window frame will be green to indicate that
  258. the IDE is in size/move mode.
  259. By pressing shift and the cursor keys simultaneously, the window can
  260. be resized. The size/move mode can be left by pressing
  261. \key{Enter}. In this case, the window will keep the new size.
  262. Pressing \key{Esc} will restore the old size.
  263. \end{itemize}
  264. Not all windows can be resized. This applies, for example, to
  265. \emph{dialog windows} (\sees{dialogwindow}).
  266. A window can also be hidden. To hide a window, the \key{Ctrl-F6} key
  267. combination can be used, or the \menu{Window|Hide} menu may be selected.
  268. To restore a Hidden window, it is necessary to select it from the window
  269. list. More information about the window list can be found in the next
  270. section.
  271. %
  272. % Multiple windows
  273. %
  274. \subsection{Working with multiple windows}
  275. \label{se:multiplewindows}
  276. When working with larger projects, it is likely that multiple windows
  277. will appear on the desktop. However, only one of these windows will be
  278. the active window, all other windows will be inactive.
  279. An inactive window is identified by a grey frame. An inactive window can
  280. be made active in one of several ways:
  281. \begin{itemize}
  282. \item using the mouse, activate a window by clicking on it.
  283. \item using the keyboard, pressing \key{F6} will step trough all open
  284. windows. To activate the previously activated window, \key{Shift-F6} can
  285. be used.
  286. \item the menu item \menu{Window|Next} can be used to activate the next
  287. window in the list of windows, while \var{Window|Previous} will select
  288. the previous window.
  289. \item If the window has a number in the upper right corner, it can be
  290. activated by pressing \key{Alt-<number>}.
  291. \item Pressing \key{Alt-0} will pop up a dialog with all
  292. available windows which allows a quick activation of windows which
  293. don't have a number.
  294. \end{itemize}
  295. The windows can be ordered and placed on the IDE desktop by zooming and
  296. resizing them with the mouse or keyboard. This is a time-consuming task,
  297. and particularly difficult with the keyboard. Instead, the menu items
  298. \menu{Window|Tile} and \menu{Window|Cascade} can be used:
  299. \begin{description}
  300. \item[Tile] will divide whole desktop space evenly between all resizable
  301. windows.
  302. \item[Cascade] puts all windows in a cascaded position.
  303. \end{description}
  304. In very rare cases the screen of the IDE may be mixed up. In this
  305. case the whole IDE screen can be refreshed by selecting the menu item
  306. \menu{Window|Refresh display}.
  307. %
  308. % Dialog windows
  309. %
  310. \subsection{Dialog windows}
  311. \label{se:dialogwindow}
  312. In many cases the IDE displays a dialog window to get user input.
  313. The main difference to normal windows is that other windows cannot be
  314. activated while a dialog is active. Also the menu is not accessible while in
  315. a dialog. This behaviour is called \emph{modal}. To activate another window,
  316. the modal window or dialog must be closed first.
  317. A typical dialog window is shown in \seefig{idedlg}.
  318. \FPCpic{A typical dialog window}{}{idedlg}
  319. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  320. % The menu
  321. \section{The Menu}
  322. \label{se:idemenu}
  323. The main menu (the gray bar at the top of the IDE) provides access to all the
  324. functionality of the IDE. It also displays a clock, displaying the current
  325. time. The menu is always available, except when a dialog is opened. If a
  326. dialog is opened, it must be closed first in order to access the menu.
  327. In certain windows, a local menu is also available. The local menu will
  328. appear where the cursor is, and provides additional commands that are
  329. context-sensitive.
  330. %
  331. % Accessing the menu
  332. %
  333. \subsection{Accessing the menu}
  334. The menu can be accessed in a number of ways:
  335. \begin{enumerate}
  336. \item By using the mouse to select items. The mouse cursor should be located
  337. over the desired menu item, and a left mouse click will then select it.
  338. \item By pressing \key{F10}. This will switch the IDE focus to the menu.
  339. Use the arrow keys can then be used to navigate in the menu, the
  340. \key{Enter} key should be used to select items.
  341. \item To access menu items directly, \key{Alt-<highlighted menu letter>}
  342. can be used to select a menu item. Afterwards submenu entries can be selected
  343. by pressing the highlighted letter, but without \key{Alt}.
  344. E.g. \key{Alt-S G} is a fast way to display the \emph{goto line} dialog.
  345. \end{enumerate}
  346. Every menu item is explained by a short text in the status bar.
  347. When a local menu is available, it can be accessed by pressing
  348. the right mouse button or \key{Alt-F10}.
  349. In the subsequent, all menu entries and their actions are described.
  350. %
  351. % The file menu
  352. %
  353. \subsection{The File menu}
  354. \label{se:menufile}
  355. The \menu{File} menu contains all menu items that allow to load and save
  356. files, as well as to exit the IDE.
  357. \begin{description}
  358. \item[New] Opens a new, empty editor window.
  359. \item[New from template] Prompts for a template to be used, asks to fill in
  360. any parameters, and then starts a new editor window with the template.
  361. \item[Open] (\key{F3}) Presents a file selection dialog, and opens
  362. the selected file in a new editor window.
  363. \item[Save] (\key{F2}) Saves the contents of the current edit window
  364. with the current filename. If the current edit window does not yet have
  365. a filename, a dialog is presented to enter a filename.
  366. \item[Save as] Presents a dialog in which a filename can be entered. The
  367. current window's contents are then saved to this new filename, and the
  368. filename is stored for further save actions.
  369. \item[Change dir] Presents a dialog in which a directory can be selected.
  370. The current working directory is then changed to the selected directory.
  371. \item[Command shell] Executes a command shell. After the shell exited, the
  372. IDE resumes. Which command shell is executed depends on the system.
  373. \item[Exit] (\key{ALT-X}) Exits the IDE. If any unsaved files are
  374. in the editor, the IDE will ask if these files should be saved.
  375. \end{description}
  376. Under the \menu{Exit} menu appear some filenames of recently used files.
  377. These entries can be used to quickly reload these files in the editor.
  378. %
  379. % The edit menu
  380. %
  381. \subsection{The Edit menu}
  382. \label{se:menuedit}
  383. The \menu{Edit} menu contains entries for accessing the clipboard, and
  384. undoing or redoing editing actions. Most of these functions have shortcut
  385. keys associated with them.
  386. \begin{description}
  387. \item[Undo] (\key{ALT-BKSP})
  388. Undo the last editing action. The editing actions are stored in a buffer,
  389. selecting this mechanism will move backwards through this buffer, i.e.
  390. multiple undo levels are possible. The selection is not preserved, though.
  391. \item[Redo] Redo the last action that was previously undone. Redo can redo
  392. multiple undone actions.
  393. %\item[Dump undo]
  394. %Shows the contents of the UNDO list in the messages window.
  395. %\item[Undo all]
  396. %Undo all actions in the undo buffer. If a new empty file was started, this
  397. %action should clear the window contents again.
  398. %\item[Redo all]
  399. %Redo all editing actions that were undone.
  400. \item[Cut] (\key{Shift-DEL}) Copy the current selection to the clipboard
  401. and delete the selection from the text. Any previous clipboard contents is
  402. lost after this action. After this action, the clipboard contents can be
  403. pasted elsewhere in the text.
  404. \item[Copy] (\key{Ctrl-INS}) Copy the current selection to the clipboard.
  405. Any previous clipboard contents is lost after this action.
  406. After this action, the clipboard contents can be pasted elsewhere in the text.
  407. \item[Paste] (\key{Shift-INS}) Insert the current clipboard contents in
  408. the text at the cursor position. The clipboard contents remains as it was.
  409. \item[Clear] (\key{Ctrl-DEL}) Clears (i.e. deletes) the current
  410. selection.
  411. \item[Show clipboard] Opens a window in which the current clipboard contents
  412. is shown.
  413. \end{description}
  414. When running an IDE under \windows, the \menu{Edit} menu has two
  415. additional entries. The IDE maintains a separate clipboard which does
  416. not share its contents with the windows clipboard. To access the Windows
  417. clipboard, the following two entries are also present:
  418. \begin{description}
  419. \item[Copy to Windows] this will copy the selection to the Windows
  420. clipboard.
  421. \item[Paste from Windows] this will insert the content of the windows
  422. clipboard (if it contains text) in the edit window at the current cursor
  423. position.
  424. \end{description}
  425. %
  426. % The Search menu
  427. %
  428. \subsection{The Search menu}
  429. \label{se:menusearch}
  430. The \menu{Search} menu provides access to the search and replace dialogs, as well as
  431. access to the symbol browser of the IDE.
  432. \begin{description}
  433. \item[Find] (\key{Ctrl-Q F}) Presents the search dialog. A search text
  434. can be entered, and when the dialog is closed, the entered text is searched
  435. in the active window. If the text is found, it will be selected.
  436. \item[Replace] (\key{Ctrl-Q A}) Presents the search and replace dialog.
  437. After the dialog is closed, the search text will be replaced by the replace
  438. text in the active window.
  439. \item[Search again] (\key{CTRL-L}) Repeats the last search or search and replace action,
  440. using the same parameters.
  441. \item[Go to line number] (\key{Alt-G}) Prompts for a line number, and
  442. then jumps to this line number.
  443. \end{description}
  444. When the program and units are compiled with browse information, then
  445. the following menu entries are also enabled:
  446. \begin{description}
  447. \item[Find procedure]
  448. Not yet implemented.
  449. \item[Objects]
  450. Asks for the name of an object and opens a browse window for this object.
  451. \item[Modules]
  452. Asks for the name of a module and opens a browse window for this object.
  453. \item[Globals]
  454. Asks for the name of a global symbol and opens a browse window for this object.
  455. \item[Symbol]
  456. Opens a window with all known symbols, so a symbol can be selected. After
  457. the symbol is selected, a browse window for that symbol is opened.
  458. \end{description}
  459. %
  460. % The Run menu
  461. %
  462. \subsection{The Run menu}
  463. \label{se:menurun}
  464. The \menu{Run} menu contains all entries related to running a program,
  465. \begin{description}
  466. \item[Run] (\key{Ctrl-F9})
  467. If the sources were modified, compiles the program. If the compile is
  468. successful, the program is executed. If the primary file was set, then
  469. that is used to determine which program to execute. See \sees{menucompile}
  470. for more information on how to set the primary file.
  471. \item[Step over] (\key{F8})
  472. Run the program till the next source line is reached. If any calls to
  473. procedures are made, these will be executed completely as well.
  474. \item[Trace into] (\key{F7})
  475. Execute the current line. If the current line contains a call to another
  476. procedure, the process will stop at the entry point of the called procedure.
  477. \item[Goto cursor] (\key{F4})
  478. Runs the program till the execution point matches the line where the cursor
  479. is.
  480. \item[Until return]
  481. Runs the current procedure till it exits.
  482. \item[Parameters]
  483. This menu item allows to enter parameters that will be passed on to the
  484. program when it is being executed.
  485. \item[Program reset] (\key{Ctrl-F2}) if the program is being run or
  486. debugged, the debug session is aborted, and the running program is killed.
  487. \end{description}
  488. %
  489. % The compile menu
  490. %
  491. \subsection{The Compile menu}
  492. \label{se:menucompile}
  493. The \menu{Compile} menu contains all entries related to compiling a program or
  494. unit.
  495. \begin{description}
  496. \item[Compile] (\key{Alt-F9}) Compiles the contents of the active window,
  497. irrespective of the primary file setting.
  498. \item[Make] (\key{F9}) Compiles the contents of the active window, and
  499. any files that the unit or program depends on and that were modified since
  500. the last compile.
  501. If the primary file was set, the primary file is compiled instead.
  502. \item[Build]
  503. Compiles the contents of the active window, and any files that the unit or
  504. program depends on, whether they were modified or not.
  505. If the primary file was set, the primary file is compiled instead.
  506. \item[Target] Sets the target operating system for which should be compiled.
  507. \item[Primary file] Sets the primary file. If set, any run or compile command
  508. will act on the primary file instead of on the active window. The primary
  509. file need not be loaded in the IDE for this to have effect.
  510. \item[Clear primary file]
  511. Clears the primary file. After this command, any run or compile action will
  512. act on the active window.
  513. \item[Information] Displays some information about the current program.
  514. \item[Compiler messages] (\key{F12}) Displays the compiler messages
  515. window. This window will display the messages generated by the compiler
  516. during the last compile.
  517. \end{description}
  518. %
  519. % The debug menu
  520. %
  521. \subsection{The Debug menu}
  522. \label{se:menudebug}
  523. The \menu{Debug} menu contains menu entries to aid in debugging a program, such as
  524. setting breakpoints and watches.
  525. \begin{description}
  526. \item[Output]
  527. \item[User screen] (\key{Alt-F5})
  528. Switches to the screen as it was last left by the running program.
  529. \item[Breakpoint] (\key{Ctrl-F8})
  530. Sets a breakpoint at the current line. When debugging, program execution
  531. will stop at this breakpoint.
  532. \item[Call stack] (\key{Ctrl-F3})
  533. Shows the call stack. The call stack is the list of addresses (and
  534. filenames and line numbers, if this information was compiled in) of
  535. procedures that are currently being called by the running program.
  536. \item[Registers]
  537. Shows the current content of the CPU registers.
  538. \item[Add watch] (\key{Ctrl-F7}) Add a watch. A watch is an expression
  539. that can be evaluated by the IDE and will be shown in a special window.
  540. Usually this is the content of some variable.
  541. \item[Watches]
  542. Shows the current list of watches in a separate window.
  543. \item[Breakpoint list]
  544. Shows the current list of breakpoints in a separate window.
  545. \item[GDB window]
  546. Shows the GDB debugger console. This can be used to interact with the debugger
  547. directly; here arbitrary GDB commands can be typed and the result will be
  548. shown in the window.
  549. \end{description}
  550. %
  551. % The tools menu
  552. %
  553. \subsection{The Tools menu}
  554. \label{se:menutools}
  555. The \menu{Tools} menu defines some standard tools. If new tools are defined by the
  556. user, they are appended to this menu as well.
  557. \begin{description}
  558. \item[Messages] (\key{F11}) Show the messages window.
  559. This window contains the output from one of the tools. For more information,
  560. see \sees{toolsmessages}.
  561. \item[Goto next] (\key{Alt-F8}) Goto next message.
  562. \item[Goto previous] (\key{Alt-F7}) Goto previous message
  563. \item[Grep] (\key{SHIFT-F2}) Prompts for a regular expression and options
  564. to be given to grep, and then executes \file{grep} with the given expression and
  565. options. For this to work, the \file{grep} program must be installed on the
  566. system, and be in a directory that is in the \var{PATH}. For more
  567. information, see \sees{grep}.
  568. \item[Calculator]
  569. Displays the calculator. For more information, see \sees{calculator}
  570. \item[Ascii table] Displays the \var{ASCII} table. For more information, see
  571. \sees{asciitable}
  572. \end{description}
  573. %
  574. % The Options menu
  575. %
  576. \subsection{The Options menu}
  577. \label{se:menuoptions}
  578. The \menu{Options} menu is the entry point for all dialogs that are used to set
  579. options for compiler and IDE, as well as the user preferences.
  580. \begin{description}
  581. \item[Mode] Presents a dialog to set the current mode of the compiler. The
  582. current mode is shown at the right of the menu entry. For more information,
  583. see \sees{compilermode}.
  584. \item[Compiler] Presents a dialog that can be used to set common compiler
  585. options. These options will be used when compiling a program or unit.
  586. \item[Memory sizes]
  587. Presents a dialog where the stack size and the heap size for the program can
  588. be set. These options will be used when compiling a program.
  589. \item[Linker]
  590. Presents a dialog where some linker options can be set. These options will
  591. be used when a program or library is compiled.
  592. \item[Debugger]
  593. Presents a dialog where the debugging options can be stored. These options
  594. are used when compiling units or programs. Note that the debugger will not
  595. work unless debugging information is generated in the program.
  596. \item[Directories]
  597. Presents a dialog where the various directories needed by the compiler can
  598. be set. These directories will be used when a program or unit is compiled.
  599. \item[Browser]
  600. Presents a dialog where the browser options can be set. The browser options
  601. affect the behaviour of the symbol browser of the IDE.
  602. \item[Tools]
  603. Presents a dialog to configure the tools menu. For more information, see
  604. \sees{addingtools}.
  605. \item[Environment]
  606. Presents a dialog to configure the behaviour of the IDE. A sub menu is
  607. presented with the various aspects of the IDE:
  608. \begin{description}
  609. \item[Preferences]
  610. General preferences, such as whether to save files or not, and which files
  611. should be saved. The video mode can also be set here.
  612. \item[Editor]
  613. Controls various aspects of the edit windows.
  614. \item[CodeComplete]
  615. Used to set the words which can be automatically completed when typing in
  616. the editor windows.
  617. \item[Codetemplates]
  618. Used to define code templates, which can be inserted in an edit window.
  619. \item[Desktop]
  620. Used to control the behaviour of the desktop, i.e. several features can be
  621. switched on or off.
  622. \item[Mouse]
  623. Can be used to control the actions of the mouse, and to assign commands to
  624. various mouse actions.
  625. \item[Startup]
  626. Not yet implemented.
  627. \item[Colors]
  628. Here the various colors used in the IDE and the editor windows can be set.
  629. \end{description}
  630. \item[Open]
  631. Presents a dialog in which a file with editor preferences can be selected.
  632. after the dialog is closed, the preferences file will be read and the
  633. preferences will be applied.
  634. \item[Save]
  635. Save the current options in the default file.
  636. \item[Save as]
  637. Saves the current options in an alternate file. A file selection dialog box
  638. will be presented in which the alternate settings file can be entered.
  639. \end{description}
  640. Please note that options are not saved automatically, they should be saved
  641. explicitly with the \menu{Options|\-Save} command.
  642. %
  643. % The window menu
  644. %
  645. \subsection{The Window menu}
  646. \label{se:menuwindow}
  647. The \menu{Window} menu provides access to some window functions. More information
  648. on all these functions can be found in \sees{windows}
  649. \begin{description}
  650. \item[Tile]
  651. Tiles all opened windows on the desktop.
  652. \item[Cascade]
  653. Cascades all opened windows on the desktop.
  654. \item[Close all]
  655. Close all opened windows.
  656. \item[Size/move] (\key{Ctrl-F5})
  657. Put the IDE in Size/move modus; after this command the active window can be
  658. moved and resized using the arrow keys.
  659. \item[Zoom] (\key{F5})
  660. Zooms or unzooms the current window.
  661. \item[Next] (\key{F6})
  662. Activates the next window in the window list.
  663. \item[Previous] (\key{SHIFT-F6})
  664. Activates the previous window in the window list.
  665. \item[Hide] (\key{Ctrl-F6})
  666. Hides the active window.
  667. \item[Close] (\key{ALT-F3})
  668. Closes the active window.
  669. \item[List] (\key{Alt-0})
  670. Shows the list of opened windows. From there a
  671. window can be activated, closed, shown and hidden.
  672. \item[Refresh display]
  673. Redraws the screen.
  674. \end{description}
  675. %
  676. % The Help menu
  677. %
  678. \subsection{The Help menu}
  679. \label{se:menuhelp}
  680. The \menu{Help} menu provides entry points to all the help functionality of
  681. the IDE, as well as the entry to customize the help system.
  682. \begin{description}
  683. \item[Contents]
  684. Shows the help table of contents
  685. \item[Index] (SHIFT-F1)
  686. Jumps to the help Index.
  687. \item[Topic search] (CTRL-F1)
  688. Jumps to the topic associated with the currently highlighted text.
  689. \item[Previous topic] (ALT-F1)
  690. Jumps to the previously visited topic.
  691. \item[Using help]
  692. Displays help on using the help system.
  693. \item[Files]
  694. Allows to configure the help menu. With this menu item, help files can be added to the help
  695. system.
  696. \item[About]
  697. Displays information about the IDE. See \sees{about} for more information.
  698. \end{description}
  699. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  700. % Editing text
  701. \section{Editing text}
  702. \label{se:editingtext}
  703. In this section, the basics of editing (source) text are explained. The IDE
  704. works like many other text editors in this respect, so mainly the
  705. distinguishing points of the IDE will be explained.
  706. \subsection{Insert modes}
  707. Standard, the IDE is in insert mode. This means that any text that is typed
  708. will be inserted before text that is present after the cursor.
  709. In overwrite mode, any text that is typed will replace existing text.
  710. When in insert mode, the cursor is a flat blinking line. If the IDE is in
  711. overwrite, the cursor is a cube with the height of one line. Switching between
  712. insert mode or overwrite mode happens with the \key{Insert} key or with the
  713. \key{Ctrl-V} key.
  714. %
  715. % blocks
  716. %
  717. \subsection{Blocks}
  718. \label{se:blocks}
  719. The IDE handles selected text just as the \tp IDE handles it. This is
  720. slightly different from the way e.g. Windows applications handle selected
  721. text.
  722. Text can be selected in 3 ways:
  723. \begin{enumerate}
  724. \item Using the mouse, dragging the mouse over existing text selects it.
  725. \item Using the keyboard, press \key{Ctrl-K B} to mark the beginning of
  726. the selected text, and \key{Ctrl-K K} to mark the end of the selected
  727. text.
  728. \item Using the keyboard, hold the \key{Shift} key depressed while
  729. navigating with the cursor keys.
  730. \end{enumerate}
  731. There are also some special select commands:
  732. \begin{enumerate}
  733. \item The current line can be selected using \key{Ctrl-K L}.
  734. \item The current word can be selected using \key{Ctrl-K T}.
  735. \end{enumerate}
  736. In the \fpc IDE, selected text is persistent. After selecting a range of
  737. text, the cursor can be moved, and the selection will not be destroyed;
  738. hence the term 'block' is more appropriate for the selection, and will be
  739. used henceforth...
  740. Several commands can be executed on a block:
  741. \begin{itemize}
  742. \item Move the block to the cursor location (\key{Ctrl-K V}).
  743. \item Copy the block to the cursor location (\key{Ctrl-K C}).
  744. \item Delete the block (\key{Ctrl-K Y}).
  745. \item Write the block to a file (\key{Ctrl-K W}).
  746. \item Read the contents of a file into a block (\key{Ctrl-K R}).
  747. If there is already a block, this block is not replaced by this command.
  748. The file is inserted at the current cursor position, and then the
  749. inserted text is selected.
  750. \item Indent a block (\key{Ctrl-K I}).
  751. \item Undent a block (\key{Ctrl-K U}).
  752. \item Print the block contents (\key{Ctrl-K P}).
  753. \end{itemize}
  754. When searching and replacing, the search can be restricted to the block
  755. contents.
  756. %
  757. % Bookmarks
  758. %
  759. \subsection{Setting bookmarks}
  760. \label{se:bookmarks}
  761. The IDE provides a feature which allows to set a bookmark at the current
  762. cursor position. Later, the cursor can be returned to this position
  763. by pressing a keyboard shortcut.
  764. Up to 9 bookmarks per source file can be set up, they are set by
  765. \key{Ctrl-K <Number>} (where number is the number of the mark).
  766. To go to a previously set bookmark, press \key{Ctrl-Q <Number>}.
  767. \begin{remark}
  768. Currently, the bookmarks are not stored if the IDE is left. This may
  769. change in future implementations of the IDE.
  770. \end{remark}
  771. %
  772. % Jumping to a source line
  773. %
  774. \subsection{Jumping to a source line}
  775. It is possible to go directly to a specific source line. To do this, open
  776. the {\em goto line} dialog via the \menu{Search|Goto line} menu.
  777. In the dialog that appears, the line-number the IDE should jump to can be
  778. entered. The goto line dialog is shown in \seefig{gotoline}.
  779. \FPCpic{The goto line dialog.}{ide}{gotoline}
  780. %
  781. % Syntax highlighting and code completion
  782. %
  783. \subsection{Syntax highlighting}
  784. \label{se:syntaxhighlighting}
  785. The IDE is capable of syntax highlighting, i.e. the color of certain
  786. Pascal elements can be set. As text is entered in an editor window,
  787. the IDE will try to recognise the elements, and set the color of the
  788. text accordingly.
  789. The syntax highlighting can be customized in the colors preferences dialog,
  790. using the menu option \menu{Options|\-Environment|\-Colors}. In the colors dialog, the
  791. group "Syntax" must be selected. The item list will then display the
  792. various syntactical elements that can be colored:
  793. \begin{description}
  794. \item[Whitespace] The empty text between words. Remark that for whitespace,
  795. only the background color will be used.
  796. \item[Comments] All styles of comments in Free Pascal.
  797. \item[Reserved words] All reserved words of Free Pascal. (see also \refref).
  798. \item[Strings] Constant string expressions.
  799. \item[Numbers] Numbers in decimal notation.
  800. \item[Hex numbers] Numbers in hexadecimal notation.
  801. \item[Assembler] Any assembler blocks.
  802. \item[Symbols] Recognised symbols (variables, types)
  803. \item[Directives] Compiler directives.
  804. \item[Tabs] Tab characters in the source can be given a different color than
  805. other whitespace.
  806. \end{description}
  807. The editor uses some default settings, but experimentation is the best way
  808. to find a fitting color scheme. A good color scheme helps detecting errors
  809. in sources, since errors will result in wrong syntax highlighting.
  810. % Code completion
  811. \subsection{Code Completion}
  812. \label{se:codecompletion}
  813. Code completion means the editor will try to guess the text as it
  814. is being typed. It does this by checking what text is typed, and as soon
  815. as the typed text can be used to identify a keyword in a list of keywords,
  816. the keyword will be presented in a small colored box under the typed text.
  817. Pressing the \key{Enter} key will complete the word in the text.
  818. There is no code completion yet for filling in function arguments, choosing
  819. object methods as in e.g. \delphi.
  820. Code completion can be customized in the Code completion dialog, reachable
  821. through the menu option \menu{Options|\-Preferences|\-Codecompletion}.
  822. The list of keywords that can be completed can be maintained here.
  823. The code completion dialog is shown in \seefig{codecomp}.
  824. \FPCpic{The code completion dialog.}{ide}{codecomp}
  825. The dialog shows the currently defined keywords that will be completed in
  826. alphabetical order.
  827. The following buttons are available:
  828. \begin{description}
  829. \item[Ok] Saves all changes and closes the dialog.
  830. \item[Edit] Pops up a dialog that allows to edit the currently
  831. highlighted keyword.
  832. \item[New] Pops up a dialog that allows to enter a new keyword which will be
  833. added to the list.
  834. \item[Delete] Deletes the currently highlighted keyword from the list
  835. \item[Cancel] Discards all changes and closes the dialog.
  836. \end{description}
  837. All keywords are saved and are available the next time the IDE is started.
  838. Duplicate names are not allowed. If an attempt is made to add a duplicate
  839. name to the list, an error will follow.
  840. % Code templates
  841. \subsection{Code Templates}
  842. Code templates are a way to insert large pieces of code at once. Each
  843. code templates is identified by a unique name. This name can be used to
  844. insert the associated piece of code in the text.
  845. For example, the name \var{ifthen} could be associated to the following
  846. piece of code:
  847. \begin{verbatim}
  848. If | Then
  849. begin
  850. end
  851. \end{verbatim}
  852. A code template can be inserted by typing its name, and pressing \key{Ctrl-J}
  853. when the cursor is positioned right after the template name.
  854. If there is no template name before the cursor, a dialog will pop up to
  855. allow selection of a template.
  856. If a vertical bar (|) is present in the code template, the cursor is positioned
  857. on it, and the vertical bar is deleted. In the above example, the cursor would be
  858. positioned between the \var{if} and \var{then}, ready to type an expression.
  859. Code templates can be added and edited in the code templates dialog, reachable via
  860. the menu option \menu{Options|\-Preferences|\-Codetemplates}.
  861. The code templates dialog is shown in \seefig{codetemp}.
  862. \FPCpic{The code templates dialog.}{ide}{codetemp}
  863. The top listbox in the code templates dialog shows the names of all
  864. known templates. The bottom half of the dialog shows the text associated
  865. with the currently highlighted code template.
  866. The following buttons are available:
  867. \begin{description}
  868. \item[Ok] Saves all changes and closes the dialog.
  869. \item[Edit] Pops up a dialog that allows to edit the currently
  870. highlighted code template. Both the name and text can be edited.
  871. \item[New] Pops up a dialog that allows to enter a new code template
  872. which will be added to the list. A name must be entered for the new
  873. template.
  874. \item[Delete] Deletes the currently highlighted code template from the list
  875. \item[Cancel] Discards all changes and closes the dialog.
  876. \end{description}
  877. All templates are saved and are available the next time the IDE is started.
  878. \begin{remark}
  879. Duplicates are not allowed. If an attempt is made to add a duplicate name
  880. to the list, an error will occur.
  881. \end{remark}
  882. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  883. % Searching in the text
  884. \section{Searching and replacing}
  885. \label{se:searching}
  886. The IDE allows to search for text in the active editor window.
  887. To search for text, one of the following can be done:
  888. \begin{enumerate}
  889. \item Select \menu{Search|Find} in the menu.
  890. \item Press \key{Ctrl-Q F}.
  891. \end{enumerate}
  892. After that, the dialog shown in \seefig{search} will pop up,
  893. and the following options can be entered
  894. \FPCpic{The search dialog.}{ide}{search}
  895. \begin{description}
  896. \item[Text to find] The text to be searched for. If a block was active when
  897. the dialog was started, the first line of this block is proposed.
  898. \item[Case sensitive] When checked, the search is case sensitive.
  899. \item[Whole words only] When checked, the search text must appear in the
  900. text as a complete word.
  901. \item[Direction] The direction in which the search must be conducted,
  902. starting from the specified origin.
  903. \item[Scope] Specifies if the search should be on the whole file, or just the selected
  904. text.
  905. \item[Origin] Specifies if the search should start from the cursor position or the start
  906. of the scope.
  907. \end{description}
  908. After the dialog has closed, the search is performed using the given options.
  909. A search can be repeated (using the same options) in one of 2 ways:
  910. \begin{enumerate}
  911. \item Select \menu{Search|Find again} from the menu.
  912. \item Press \key{Ctrl-L}.
  913. \end{enumerate}
  914. It is also possible to replace occurrences of a text with another text.
  915. This can be done in a similar manner to searching for a text:
  916. \begin{enumerate}
  917. \item Select \menu{Search|Replace} from the menu.
  918. \item Press \key{Ctrl-Q A}.
  919. \end{enumerate}
  920. A dialog, similar to the search dialog will pop up, as shown in \seefig{replace}.
  921. \FPCpic{The replace dialog.}{ide}{replace}
  922. In this dialog, in addition to the things that can be filled in in the
  923. search dialog, the following things can be entered:
  924. \begin{description}
  925. \item [New text] Text by which found text will be replaced.
  926. \item [Prompt on replace] Before a replacement is made, the IDE will ask for
  927. confirmation.
  928. \end{description}
  929. If the dialog is closed with the 'OK' button, only the next occurrence of
  930. the the search text will be replaced.
  931. If the dialog is closed with the 'Change All' button, all occurrences of
  932. the search text will be replaced.
  933. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  934. % The symbol browser
  935. \section{The symbol browser}
  936. \label{se:browser}
  937. The symbol browser allows to find all occurrences of a symbol. A symbol
  938. can be a variable, type, procedure or constant that occurs in the
  939. program or unit sources.
  940. To enable the symbol browser, the program or unit must be compiled with
  941. browser information. This can be done by setting the browser information
  942. options in the compiler options dialog.
  943. The IDE allows to browse several types of symbols:
  944. \begin{description}
  945. \item[procedures] Allows to quickly jump to a procedure definition or
  946. implementation.
  947. \item[Objects] Allows to quickly browse an object.
  948. \item[Modules] Allows to browse a module.
  949. \item[Globals] Allows to browse any global symbol.
  950. \item[Arbitrary symbol] Allows to browse an arbitrary symbol.
  951. \end{description}
  952. In all cases, first a symbol to be browsed must be selected. After that,
  953. a browse window appears. In the browse window, all locations where the
  954. symbol was encountered are shown. Selecting a location and pressing the
  955. space bar will cause the editor to jump to that location; the line
  956. containing the symbol will be highlighted.
  957. If the location is in a source file that is not yet displayed, a new
  958. window will be opened with the source file loaded.
  959. After the desired location was reached, the browser window can be closed
  960. with the usual commands.
  961. The behaviour of the browser can be customized with the browser options
  962. dialog, using the \menu{Options|Browser} menu.
  963. The browser options dialog looks like \seefig{obrowser}.
  964. \FPCpic{The browser options dialog.}{ide}{obrowser}
  965. The following options can be set in the browser options dialog:
  966. \begin{description}
  967. \item[Symbols] Here the types of symbols displayed in the browser can be
  968. selected:
  969. \begin{description}
  970. \item[Labels] labels are shown.
  971. \item[Constants] Constants are shown.
  972. \item[Types] Types are shown.
  973. \item[Variables] Variables are shown.
  974. \item[Procedures] Procedures are shown.
  975. \item[Inherited]
  976. \end{description}
  977. \item[Sub-browsing] Specifies what the browser should do when displaying the
  978. members of a complex symbol such as a record or class:
  979. \begin{description}
  980. \item[New browser] The members are shown in a new browser window.
  981. \item[Replace current] The contents of the current window are replaced with
  982. the members of the selected complex symbol.
  983. \end{description}
  984. \item[Preferred pane] Specifies what pane is shown in the browser when it is
  985. initially opened:
  986. \begin{description}
  987. \item[scope]
  988. \item[Reference]
  989. \end{description}
  990. \item[Display] Determines how the browser should display the symbols:
  991. \begin{description}
  992. \item[Qualified symbols]
  993. \item[Sort always] sorts the symbols in the browser window.
  994. \end{description}
  995. \end{description}
  996. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  997. % Running programs
  998. \section{Running programs}
  999. \label{se:running}
  1000. A compiled program can be run straight from the IDE. This can be done
  1001. in one of several ways:
  1002. \begin{enumerate}
  1003. \item select the \menu{Run|Run} menu, or
  1004. \item press \key{Ctrl-F9}.
  1005. \end{enumerate}
  1006. If command-line parameters should be passed to the program, then these
  1007. can be set through the \menu{Run|Parameters} menu.
  1008. The program parameters dialog looks like \seefig{params}.
  1009. \FPCpic{The program parameters dialog.}{ide}{params}
  1010. Once the program started, it will continue to run, until
  1011. \begin{enumerate}
  1012. \item the program quits normally,
  1013. \item an error happens,
  1014. \item a breakpoint is encountered or
  1015. \item the program is reset by the user.
  1016. \end{enumerate}
  1017. The last alternative is only possible if the program is compiled
  1018. with debug information.
  1019. Alternatively, it is possible to position the cursor somewhere in a
  1020. source file, and run the program till the execution reaches the
  1021. source-line where the cursor is located. This can be done by
  1022. \begin{enumerate}
  1023. \item selecting \menu{Run|Goto Cursor} in the menu,
  1024. \item pressing \key{F4}.
  1025. \end{enumerate}
  1026. Again, this is only possible if the program was compiled with debug
  1027. information.
  1028. The program can also executed line by line. Pressing \key{F8} will
  1029. execute the next line of the program. If the program wasn't started
  1030. yet, it is started. Repeatedly pressing \key{F8} will execute line
  1031. by line of the program, and the IDE will show the line to be executed
  1032. in an editor window. If somewhere in the code a call occurs to a subroutine,
  1033. then pressing \key{F8} will cause the whole routine to be executed before
  1034. control returns to the IDE. If the code of the subroutine should be stepped
  1035. through as well, then \key{F7} should be used instead. Using \key{F7} will
  1036. cause the IDE to execute line by line of any subroutine that is encountered.
  1037. If a subroutine is being stepped through, then the \menu{Run|Until return} menu
  1038. will execute the program till the current subroutine ends.
  1039. If the program should be stopped before it quits by itself, then this can be
  1040. done by
  1041. \begin{enumerate}
  1042. \item selecting \menu{Run|Program reset} from the menu, or
  1043. \item pressing \key{Ctrl-F2}.
  1044. \end{enumerate}
  1045. The running program will then be aborted.
  1046. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  1047. % Debugging programs
  1048. \section{Debugging programs}
  1049. \label{se:debugging}
  1050. To debug a program, it must be compiled with debug information. Compiling a
  1051. program with debug information allows to:
  1052. \begin{enumerate}
  1053. \item Execute the program line by line.
  1054. \item Run the program till a certain point (a breakpoint)
  1055. \item Inspect the contents of variables or memory locations while the
  1056. program is running.
  1057. \end{enumerate}
  1058. %
  1059. % Using breakpoints
  1060. %
  1061. \subsection{Using breakpoints}
  1062. Breakpoints will cause a running program to stop when the execution
  1063. reaches the line where the breakpoint was set. At that moment, control
  1064. is returned to the IDE, and it is possible to continue execution.
  1065. To set a breakpoint on the current source line, use the
  1066. \menu{Debug|Breakpoint} menu entry, or press \key{Ctrl-F8}.
  1067. A list of current breakpoints can be obtained through the
  1068. \menu{Debug|Breakpoint list} menu. The breakpoint list window
  1069. is shown in \seefig{brklist}.
  1070. \FPCpic{The breakpoint list window}{ide}{brklist}
  1071. In the breakpoint list window, the following things can be done:
  1072. \begin{description}
  1073. \item[New] Shows the breakpoint property dialog where the properties
  1074. for a new breakpoint can be entered.
  1075. \item[Edit] Shows the breakpoint property dialog where the properties of
  1076. the highlighted breakpoint can be changed.
  1077. \item[Delete] Deletes the highlighted breakpoint.
  1078. \end{description}
  1079. The dialog can be closed with the 'Close' button.
  1080. The breakpoint properties dialog is shown in \seefig{brkprop}
  1081. \FPCpic{The breakpoint properties dialog}{ide}{brkprop}
  1082. The following properties can be set:
  1083. \begin{description}
  1084. \item[type]
  1085. \begin{description}
  1086. \item[function] function breakpoint. The program will stop when the function
  1087. with the given name is reached.
  1088. \item[file-line] Source line breakpoint. The program will stop when the
  1089. source file with given name and line is reached;
  1090. \item[watch] Expression breakpoint. An expression may be entered, and the
  1091. program will stop as soon as the expression changes.
  1092. \item[awatch] (access watch) Expression breakpoint. An expression that references a
  1093. memory location may be entered, and the program will stop as soon as
  1094. the memory indicated by the expression is accessed.
  1095. \item[rwatch] (read watch) Expression breakpoint. An expression that references a
  1096. memory location may be entered, and the program will stop as soon as
  1097. the memory indicated by the expression is read.
  1098. \end{description}
  1099. \item[name] Name of the function or file where to stop.
  1100. \item[line] Line number in the file where to stop. Only for breakpoints of
  1101. type file-line.
  1102. \item[Conditions] Here an expression can be entered which must evaluate
  1103. \var{True} for the program to stop at the breakpoint. The expressions that
  1104. can be entered must be valid GDB expressions.
  1105. \item[Ignore count] The number of times the breakpoint will be ignored
  1106. before the program stops;
  1107. \end{description}
  1108. \begin{remark}
  1109. \begin{enumerate}
  1110. \item Because the IDE uses GDB to do its debugging, it is necessary to enter all
  1111. expressions in {\em uppercase} on \freebsd.
  1112. \item Expressions that reference memory locations should be no longer than 16
  1113. bytes on \linux or go32v2 on an Intel processor, since the Intel processor's
  1114. debug registers are used to monitor these locations.
  1115. \item Memory location watches will not function on Win32 unless a special
  1116. patch is applied.
  1117. \end{enumerate}
  1118. \end{remark}
  1119. %
  1120. % Using watches
  1121. %
  1122. \subsection{Using watches}
  1123. When debugging information is compiled in the program, watches can be used.
  1124. Watches are expressions which can be evaluated by the IDE and shown in a
  1125. separate window. When program execution stops (e.g. at a breakpoint) all
  1126. watches will be evaluated and their current values will be shown.
  1127. Setting a new watch can be done with the \menu{Debug|Add watch} menu
  1128. command or by pressing \key{Ctrl-F7}. When this is done, the watch
  1129. property dialog appears, and a new expression can be entered.
  1130. The watch property dialog is shown in \seefig{watch}.
  1131. \FPCpic{The watch property dialog}{ide}{watch}
  1132. In the dialog, the expression can be entered, any possible previous value
  1133. and current value are shown.
  1134. \begin{remark}
  1135. Because the IDE uses GDB to do it's debugging, it is necessary to enter all
  1136. expressions in {\em uppercase} in \freebsd.
  1137. \end{remark}
  1138. A list of watches and their present value is available in the watches
  1139. window, which can be opened with the \menu{Debug|Watches} menu.
  1140. The watch list window is shown in \seefig{brklist}.
  1141. \FPCpic{The watch list window.}{ide}{watchlst}
  1142. Pressing \key{Enter} or the space bar will show the watch property dialog
  1143. for the currently highlighted watch in the watches window.
  1144. The list of watches is updated whenever the IDE resumes control when
  1145. debugging a program.
  1146. %
  1147. % The call stack
  1148. %
  1149. \subsection{The call stack}
  1150. \label{se:callstack}
  1151. The call stack helps in showing the program flow. It shows the list of
  1152. procedures that are being called at this moment, in reverse order.
  1153. The call stack window can be shown using the \menu{Debug|Call Stack}
  1154. It will show the address or procedure name of all currently active
  1155. procedures with their filename and addresses. If parameters were passed
  1156. they will be shown as well. The call stack is shown in \seefig{callstck}.
  1157. \FPCpic{The call stack window.}{ide}{callstck}
  1158. By pressing the space bar in the call stack window, the line corresponding
  1159. to the call will be highlighted in the edit window.
  1160. % The GDB Window
  1161. \subsection{The GDB window}
  1162. \label{se:gdbwindow}
  1163. The GDB window provides direct interaction with the GDB debugger.
  1164. In it, GDB commands can be typed as they would be typed in GDB.
  1165. The response of GDB will be shown in the window.
  1166. Some more information on using GDB can be found in \sees{usinggdb}, but
  1167. the final reference is of course the GDB manual itself
  1168. \footnote{Available from the Free Software Foundation website.}.
  1169. The GDB window is shown in \seefig{gdbwin}.
  1170. \FPCpic{The GDB window}{ide}{gdbwin}
  1171. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  1172. % The tools menu
  1173. \section{Using Tools}
  1174. \label{se:toolsmenu}
  1175. The tools menu provides easy access to external tools. It also has
  1176. three pre-defined tools for programmers: an ASCII table, a grep tool
  1177. and a calculator. The output of the external tools can be accessed through
  1178. this menu as well.
  1179. %
  1180. % The messages window.
  1181. %
  1182. \subsection{The messages window}
  1183. \label{se:toolsmessages}
  1184. The output of the external utilities is redirected by the IDE and it
  1185. will be displayed in the messages window. The messages window is
  1186. displayed automatically, if an external tool was run. The
  1187. messages window can be also displayed manually by the selecting the
  1188. menu item \menu{Tools|Messages} or by pressing the key \key{F11}.
  1189. The messages window is shown in \seefig{messages}.
  1190. \FPCpic{The messages window}{ide}{messages}
  1191. If the output of the tool contains filenames and line numbers,
  1192. the messages window can be used to navigate the source as in a browse
  1193. window:
  1194. \begin{enumerate}
  1195. \item Pressing \key{Enter} or double clicking the output line will jump
  1196. to the specified source line and close the messages window.
  1197. \item Pressing the space bar will jump to the specified source line, but
  1198. will leave the messages window open, with the focus on it. This allows to
  1199. quickly select another message line with the arrow keys and jump to
  1200. another location in the sources.
  1201. \end{enumerate}
  1202. The algorithm which extracts the file names and line numbers from
  1203. the tool output is quite sophisticated, but in some cases it may
  1204. fail\footnote{Suggestions for improvement, or better yet, patches
  1205. that improve the algorithm, are always welcome.}.
  1206. %
  1207. % Grep
  1208. %
  1209. \subsection{Grep}
  1210. \label{se:grep}
  1211. One external tool in the Tools menu is already predefined: a
  1212. menu item to call the \file{grep} utility (\menu{Tools|Grep} or
  1213. \key{Shift-F2}). \file{Grep} searches for a given string in files and
  1214. returns the lines which contain the string. The search string can
  1215. be even a regular expression. For this menu item to work, the
  1216. \file{grep} program must be installed, since it does not come with \fpc.
  1217. The messages window displayed in \seefig{messages} in the previous
  1218. section shows the output of a typical \file{grep} session. The messages
  1219. window can be used in combination with \file{grep} to find special
  1220. occurrences in the text.
  1221. \file{Grep} supports regular expressions. A regular expression is a
  1222. string with special characters which describe a whole class of
  1223. expressions. The command line in \dos or \linux have limited
  1224. support for regular expressions: entering \var{ls *.pas}
  1225. (or \var{dir *.pas}) to get a list of all Pascal files in a
  1226. directory. \file{*.pas} is something similar to a regular expression.
  1227. It uses a wildcard to describe a whole class of strings: those which
  1228. end on "\file{.pas}".
  1229. Regular expressions offer much more: for example \var{[A-Z][0-9]+}
  1230. describes all strings which begin with a upper case letter followed by
  1231. one or more digits.
  1232. It is outside the scope of this manual to describe regular expressions
  1233. in great detail. Users of a \linux system can get more information on grep
  1234. using \var{man grep} on the command-line.
  1235. %
  1236. % The ASCII table.
  1237. %
  1238. \subsection{The ASCII table}
  1239. \label{se:asciitable}
  1240. The tools menu provides also an ASCII table (\menu{Tools|Ascii table}),
  1241. The ASCII table can be used to look up ASCII codes as well as
  1242. inserting characters into the window which was active when invoking the
  1243. table. To get the ASCII code of a char move the cursor on this char
  1244. or click with the mouse on it. To insert a
  1245. char into an editor window either:
  1246. \begin{enumerate}
  1247. \item using the mouse, double click it,
  1248. \item using the keyboard, press \key{Enter} while the cursor is on it.
  1249. \end{enumerate}
  1250. This is especially useful for pasting graphical characters in a constant
  1251. string.
  1252. The ASCII table remains active till another window is explicitly activated,
  1253. thus multiple characters can be inserted at once.
  1254. The ASCII table is shown in \seefig{ascii}.
  1255. \FPCpic{The ASCII table}{ide}{ascii}
  1256. %
  1257. % The calculator
  1258. %
  1259. \subsection{The calculator}
  1260. \label{se:calculator}
  1261. The calculator allows to do some quick calculations. It is a simple
  1262. calculator, since it does not take care of operator precedence, and
  1263. bracketing of operations is not (yet) supported.
  1264. The result of the calculations can be pasted into the text using the
  1265. \key{Ctrl-Enter} keystroke. The calculator dialog is shown in
  1266. \seefig{calc}.
  1267. \FPCpic{The calculator dialog}{ide}{calc}
  1268. The calculator supports all basic mathematical operations such as
  1269. addition, subtraction, division and multiplication. They are summarised in
  1270. \seet{calculatorbasic}.
  1271. \begin{FPCltable}{p{8cm}lll}{Advanced calculator commands}{calculatorbasic}
  1272. Operation & Button & Key \\ \hline
  1273. Add two numbers & \var{+} & \key{+} \\
  1274. Subtract two numbers & \var{\-} & \key{\-} \\
  1275. Multiply two numbers & \var{*} & \key{*} \\
  1276. Divide two numbers & \var{/} & \key{/} \\
  1277. Delete the last typed digit & \var{<-} & \key{Backspace} \\
  1278. Delete the display & \var{C} & \key{C} \\
  1279. Change the sign & \var{+\-} & \\
  1280. Do per cent calculation & \var{\%} & \key{\%} \\ \hline
  1281. Get result of operation & \var{=} & \key{Enter} \\ \hline
  1282. \end{FPCltable}
  1283. But also more sophisticated mathematical operations such as exponentiation
  1284. and logarithms are supported. The available mathematical calculations are
  1285. shown in \seet{calculatoradvanced}.
  1286. \begin{FPCltable}{p{8cm}lll}{Advanced calculator commands}{calculatoradvanced}
  1287. Operation & Button & Key \\ \hline
  1288. Calculate power & \var{x\^{}y} & \\
  1289. Calculate the inverse value & \var{1/x} & \\
  1290. Calculate the square root & \var{sqr} & \\
  1291. Calculate the natural logarithm & \var{log} & \\
  1292. Square the display contents & \var{x\^{}2} & \\ \hline.
  1293. \end{FPCltable}
  1294. Like many calculators, the calculator in the IDE also supports storing
  1295. a single value in memory, and several operations can be done on this memory
  1296. value. The available operations are listed in \seet{calculatormemory}
  1297. \begin{FPCltable}{p{8cm}lll}{Advanced calculator commands}{calculatormemory}
  1298. Operation & Button & Key \\ \hline
  1299. Add the displayed number to the memory & \var{M+} & \\
  1300. Subtract the displayed number from the memory & \var{M-} & \\
  1301. Move the memory contents to the display & \var{M->} & \\
  1302. Move the display contents to the memory & \var{M<-} & \\
  1303. Exchange display and memory contents & \var{M<->} & \\ \hline
  1304. \end{FPCltable}
  1305. %
  1306. % Adding new tools
  1307. %
  1308. \subsection{Adding new tools}
  1309. \label{se:addingtools}
  1310. The tools menu can be extended with any external program which is command-line
  1311. oriented. The output of such a program will be caught and displayed in the
  1312. messages window.
  1313. Adding a tool to the tools menu can be done using the \menu{Options|Tools} menu.
  1314. This will display the tools dialog. The tools dialog is shown in \seefig{otools}.
  1315. \FPCpic{The tools configuration dialog}{ide}{otools}
  1316. In the tools dialog, the following actions are available:
  1317. \begin{description}
  1318. \item[New] Shows the tool properties dialog where the
  1319. properties of a new tool can be entered.
  1320. \item[Edit] Shows the tool properties dialog where the
  1321. properties of the highlighted tool can be edited.
  1322. \item[Delete] Removes the currently highlighted tool.
  1323. \item[Cancel] Discards all changes and closes the dialog.
  1324. \item[OK] Saves all changes and closes the dialog.
  1325. \end{description}
  1326. The definitions of the tools are written in the desktop
  1327. configuration file, so unless auto-saving of the desktop file
  1328. is enabled, the desktop file should be saved explicitly after
  1329. the dialog is closed.
  1330. \subsection{Meta parameters}
  1331. When specifying the command line for the called tool, meta parameters can
  1332. be used. Meta parameters are variables and and they are replaced
  1333. by their contents before passing the command line to the tool.
  1334. \begin{description}
  1335. \item[\$CAP]
  1336. Captures the output of the tool.
  1337. \item[\$CAP\_MSG]
  1338. Captures the output of the tool and puts it in the messages window.
  1339. \item[\$CAP\_EDIT]
  1340. Captures the output of the tool and puts it in a separate editor window.
  1341. \item[\$COL]
  1342. Replaced by the column of the cursor in the active editor window. If there is no
  1343. active window or the active window is a dialog, then it is replaced by 0.
  1344. \item[\$CONFIG]
  1345. Replaced by the complete filename of the current configuration file.
  1346. \item[\$DIR()]
  1347. Replaced by the full directory of the filename argument, including trailing
  1348. directory separator. e.g.
  1349. \begin{verbatim}
  1350. $DIR('d:\data\myfile.pas')
  1351. \end{verbatim}
  1352. would return \verb|d:\data\|.
  1353. \item[\$DRIVE()]
  1354. Replaced by the drive letter of the filename argument. e.g.
  1355. \begin{verbatim}
  1356. $DRIVE('d:\data\myfile.pas')
  1357. \end{verbatim}
  1358. would return \file{d:}.
  1359. \item[\$EDNAME]
  1360. Replaced by the complete file name of the file in the active edit window.
  1361. If there is no active edit window, this is an empty string.
  1362. \item[\$EXENAME]
  1363. Replaced by the executable name that would be created if the make command
  1364. was used. (i.e. from the 'Primary File' setting or the active edit window).
  1365. \item[\$EXT()]
  1366. Replaced by the extension of the filename argument.
  1367. The extension includes the dot.
  1368. e.g.
  1369. \begin{verbatim}
  1370. $EXT('d:\data\myfile.pas')
  1371. \end{verbatim}
  1372. would return \file{.pas}.
  1373. \item[\$LINE]
  1374. Replaced by the line number of the cursor in the active edit window.
  1375. If no edit window is present or active, this is 0.
  1376. \item[\$NAME()]
  1377. Replaced by the name part (excluding extension and dot) of the filename
  1378. argument.
  1379. e.g.
  1380. \begin{verbatim}
  1381. $NAME('d:\data\myfile.pas')
  1382. \end{verbatim}
  1383. would return \file{myfile}.
  1384. \item[\$NAMEEXT()]
  1385. Replaced by the name and extension part of the filename argument.
  1386. e.g.
  1387. \begin{verbatim}
  1388. $NAMEEXT('d:\data\myfile.pas')
  1389. \end{verbatim}
  1390. would return \file{myfile.pas}.
  1391. \item[\$NOSWAP]
  1392. Does nothing in the IDE, it is provided for compatibility with \tp only.
  1393. \item[\$PROMPT()]
  1394. Prompt displays a dialog bow that allows editing of all arguments that
  1395. come after it. Arguments that appear before the \var{\$PROMPT} keyword
  1396. are not presented for editing.
  1397. If a (optional) filename argument is present, \var{\$PROMPT()} will load
  1398. a dialog description from the filename argument, e.g.
  1399. \begin{verbatim}
  1400. $PROMPT(cvsco.tdf)
  1401. \end{verbatim}
  1402. would parse the file \file{cvsco.tdf}, construct a dialog with it and
  1403. display it. After the dialog closed, the information entered by the user
  1404. is used to construct the tool command line.
  1405. See \sees{commanddialogs} for more information on how to create a dialog
  1406. description.
  1407. \item[\$SAVE]
  1408. Before executing the command, the active editor window is saved, even if it is not modified.
  1409. \item[\$SAVE\_ALL]
  1410. Before executing the command, all unsaved editor files are saved without prompting.
  1411. \item[\$SAVE\_CUR]
  1412. Before executing the command the contents of the active editor window are
  1413. saved without prompting if they are modified.
  1414. \item[\$SAVE\_PROMPT]
  1415. Before executing the command, a dialog is displayed asking whether any
  1416. unsaved files should be saved before executing the command.
  1417. \item[\$WRITEMSG()]
  1418. Writes the parsed tool output information to a file with name as in the argument.
  1419. \end{description}
  1420. \subsection{Building a command line dialog box}
  1421. \label{se:commanddialogs}
  1422. When defining a tool, it is possible to show a dialog to the user, asking for
  1423. additional arguments, using the \var{\$PROMPT(filename)} command-macro.
  1424. \fpc comes with some dialogs, such as a 'grep' dialog, a 'cvs checkout' dialog
  1425. and a 'cvs check in' dialog. The files for these dialogs are in the binary
  1426. directory and have an extension \file{.tdf}.
  1427. In this section, the file format for the dialog description file is explained.
  1428. The format of this file resembles a windows \file{.INI} file, where each section
  1429. in the file describes an element (or control) in the dialog.
  1430. An \var{OK} and an \var{Cancel} button will be added to the bottom of the dialog,
  1431. so these should not be specified in the dialog definition.
  1432. A special section is the \var{Main} section. It describes how the result of
  1433. the dialog will be passed on the command-line, and the total size of the dialog.
  1434. \begin{remark}
  1435. Keywords that contain a string value, should have the string value enclosed
  1436. in double quotes as in
  1437. \begin{verbatim}
  1438. Title="Dialog title"
  1439. \end{verbatim}
  1440. \end{remark}
  1441. The \var{Main} section should contain the following keywords:
  1442. \begin{description}
  1443. \item[Title] The title of the dialog. This will appear in the frame title of the dialog.
  1444. The string should be enclosed in quotes.
  1445. \item[Size] The size of the dialog, this is formatted as \var{(Cols,Rows)}, so
  1446. \begin{verbatim}
  1447. Size=(59,9)
  1448. \end{verbatim}
  1449. means the dialog is 59 characters wide, and 9 lines high. This size does not include
  1450. the border of the dialog.
  1451. \item[CommandLine] specifies how the command-line will be passed to the
  1452. program, based on the entries made in the dialog. The text typed here will be passed
  1453. on after replacing some control placeholders with their values.
  1454. A control placeholder is the name of some control in the dialog, enclosed in
  1455. percent (\var{\%}) characters. The name of the control will be replaced with
  1456. the text, associated with the control. Consider the following example:
  1457. \begin{verbatim}
  1458. CommandLine="-n %l% %v% %i% %w% %searchstr% %filemask%"
  1459. \end{verbatim}
  1460. Here the values associated with the controls named \var{l, i, v, w} and
  1461. \var{searchstr} and \var{filemask} will be inserted in the command-line
  1462. string.
  1463. \item[Default]
  1464. The name of the control that is the default control, i.e. the control
  1465. that has the focus when the dialog is opened.
  1466. \end{description}
  1467. The following is an example of a valid main section:
  1468. \begin{verbatim}
  1469. [Main]
  1470. Title="GNU Grep"
  1471. Size=(56,9)
  1472. CommandLine="-n %l% %v% %i% %w% %searchstr% %filemask%"
  1473. Default="searchstr"
  1474. \end{verbatim}
  1475. After the \var{Main} section, a section must be specified for each control that
  1476. should appear on the dialog. Each section has the name of the control it
  1477. describes, as in the following example:
  1478. \begin{verbatim}
  1479. [CaseSensitive]
  1480. Type=CheckBox
  1481. Name="~C~ase sensitive"
  1482. Origin=(2,6)
  1483. Size=(25,1)
  1484. Default=On
  1485. On="-i"
  1486. \end{verbatim}
  1487. Each control section must have at least the following keywords associated
  1488. with it:
  1489. \begin{description}
  1490. \item[Type] The type of control. Possible values are:
  1491. \begin{description}
  1492. \item[Label] A plain text label which will be shown on the dialog.
  1493. A control can be linked to this label, so it will be focused when
  1494. the user presses the highlighted letter in the label caption (if any).
  1495. \item[InputLine] An edit field where a text can be entered.
  1496. \item[CheckBox] A Checkbox which can be in a on or off state.
  1497. \end{description}
  1498. \item[Origin] Specifies where the control should be located in the dialog.
  1499. The origin is specified as \var{(left,Top)} and the top-left corned of
  1500. the dialog has coordinate \var{(1,1)} (not counting the frame).
  1501. \item[Size] Specifies the size of the control, which should be specified
  1502. as \var{(Cols,Rows)}.
  1503. \end{description}
  1504. Each control has some specific keywords associated with it;
  1505. they will be described below.
  1506. A label (\var{Type=Label}) has the following extra keywords associated
  1507. with it:
  1508. \begin{description}
  1509. \item[Text] the text displayed in the label. If one of the letters should
  1510. be highlighted so it can be used as a shortcut, then it should be enclosed
  1511. in tilde characters (\~{}), e.g. in
  1512. \begin{verbatim}
  1513. Text="~T~ext to find"
  1514. \end{verbatim}
  1515. The \var{T} will be highlighted.
  1516. \item[Link] here the name of a control in the dialog may be specified.
  1517. If specified, pressing the label's highlighted letter in combination
  1518. with the \key{Alt} key will put the focus on the control specified here.
  1519. \end{description}
  1520. A label does not contribute to the text of the command-line, it is for
  1521. informational and navigational purposes only. The following is an
  1522. example of a label description section:
  1523. \begin{verbatim}
  1524. [label2]
  1525. Type=Label
  1526. Origin=(2,3)
  1527. Size=(22,1)
  1528. Text="File ~m~ask"
  1529. Link="filemask"
  1530. \end{verbatim}
  1531. An edit control (\var{Type=InputLine}) allows to enter arbitrary text.
  1532. The text of the edit control will be pasted in the command-line if it
  1533. is referenced there. The following keyword can be specified in a
  1534. inputline control section:
  1535. \begin{description}
  1536. \item[Value] here a standard value (text) for the edit control can be
  1537. specified. This value will be filled in when the dialog appears.
  1538. \end{description}
  1539. The following is an example of a input line section:
  1540. \begin{verbatim}
  1541. [filemask]
  1542. Type=InputLine
  1543. Origin=(2,4)
  1544. Size=(22,1)
  1545. Value="*.pas *.pp *.inc"
  1546. \end{verbatim}
  1547. A combo-box control (\var{Type=CheckBox}) presents a checkbox which
  1548. can be in one of two states, \var{on} or \var{off}. With each of
  1549. these states, a value can be associated which will be passed on to
  1550. the command-line. The following keywords can appear in a checkbox
  1551. type section:
  1552. \begin{description}
  1553. \item[Name] the text that appears after the checkbox.
  1554. If there is a highlighted letter in it, this letter can be used
  1555. to set or unset the checkbox using the \key{Alt}-letter combination.
  1556. \item[Default] specifies whether the checkbox is checked or not when
  1557. the dialog appears (values \var{on} or \var{off})
  1558. \item[On] the text associated with this checkbox if it is in the checked
  1559. state.
  1560. \item[Off] the text associated with this checkbox if it is in the
  1561. unchecked state.
  1562. \end{description}
  1563. The following is a example of a valid checkbox description:
  1564. \begin{verbatim}
  1565. [i]
  1566. Type=CheckBox
  1567. Name="~C~ase sensitive"
  1568. Origin=(2,6)
  1569. Size=(25,1)
  1570. Default=On
  1571. On="-i"
  1572. \end{verbatim}
  1573. If the checkbox is checked, then the value \var{-i} will be added on
  1574. the command-line of the tool. If it is unchecked, no value will be added.
  1575. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  1576. % Project management
  1577. \section{Project management and compiler options}
  1578. \label{se:projectmanagement}
  1579. Project management in Pascal is much easier than with C. The
  1580. compiler knows from the source which units, sources etc. it needs.
  1581. So the \fpc IDE does not need a full featured project manager like
  1582. some C development environments offer, nevertheless there are some
  1583. settings in the IDE which apply to projects.
  1584. %
  1585. % The primary file
  1586. %
  1587. \subsection{The primary file}
  1588. \label{se:primaryfile}
  1589. Without a primary file the IDE compiles/runs the source of the active
  1590. window when a program is started. If a primary file is specified,
  1591. the IDE compiles/runs always this source, even if another
  1592. source window is active. With the menu item \menu{Compile|Primary file...}
  1593. a file dialog can be opened where the primary file can be selected.
  1594. Only the menu item \menu{Compile|Compile} compiles still the active window,
  1595. this is useful if a large project is being edited, and only the syntax of
  1596. the current source should be checked.
  1597. The menu item \menu{Compiler|Clear primary file} restores the default
  1598. behaviour of the IDE, i.e. the 'compile' and 'run' commands apply to the
  1599. active window.
  1600. %
  1601. % The directory dialog
  1602. %
  1603. \subsection{The directory dialog}
  1604. In the directory dialog, the directories can be specified where the
  1605. compiler should look for units, libraries, object files. It also says
  1606. where the output files should be stored. Multiple directories (except
  1607. for the output directory) can be entered, separated by semicolons.
  1608. The directories dialog is shown in \seefig{odirs}.
  1609. \FPCpic{The directories configuration dialog}{ide}{odirs}
  1610. The following directories can be specified:
  1611. \begin{description}
  1612. \item[EXE \& PPU directories] Specifies where the compiled units and
  1613. executables will go. (\seeo{FE} on the command line.)
  1614. \item[Object directories] Specifies where the compiler looks for external
  1615. object files. (\seeo{Fo} on the command line.)
  1616. \item[Library directories] Specifies where the compiler (more exactly, the
  1617. linker) looks for external libraries. (\seeo{Fl} on the command line.)
  1618. \item[Include directories] Specifies where the compiler will look for
  1619. include files, included with the \var{\{\$i \}} directive.
  1620. (\seeo{Fi} or \seeo{I} on the command line.)
  1621. \item[Unit directories] Specifies where the compiler will look for compiled
  1622. units. The compiler always looks first in the current directory, and also in
  1623. some standard directories. (\seeo{Fu} on the command line.)
  1624. \end{description}
  1625. %
  1626. % The target operating system.
  1627. %
  1628. \subsection{The target operating system}
  1629. The menu item \menu{Compile|Target} allows to specify the target
  1630. operating system for which the sources will be compiled.
  1631. Changing the target doesn't affect any compiler switches or
  1632. directories. It does affect some defines defined by the compiler.
  1633. The settings here correspond to the option \seeo{T}
  1634. on the command-line. The compilation target dialog is shown in \seefig{target}.
  1635. \FPCpic{The compilation target dialog}{ide}{target}
  1636. The following targets can be set:
  1637. \begin{description}
  1638. \item[Dos (go32v1)] This switch will dissapear in time as this target is no
  1639. longer being maintained.
  1640. \item[Dos (go32v2)] Compile for \dos, using version 2 of the Go32 extender.
  1641. \item[FreeBSD] Compile for \freebsd.
  1642. \item[Linux] Compile for \linux.
  1643. \item[OS/2] Compile for OS/2 (using the EMX extender)
  1644. \item[Win32] Compile for windows 32 bit.
  1645. \end{description}
  1646. The currently selected target operating system is shown in the menu item in
  1647. the \menu{Compile} menu. Standard this should be the operating system for
  1648. which the IDE was compiled.
  1649. %
  1650. % Other compiler options
  1651. %
  1652. \subsection{Compiler options}
  1653. The menu \menu{Options|Compiler} allows to set other options that affect the
  1654. compilers behaviour. When this menu item is chosen, a dialog pops up that
  1655. displays several tabs.
  1656. There are 5 tabs:
  1657. \begin{description}
  1658. \item[Syntax] Here options can be set that affect the various syntax aspects
  1659. of the code. They correspond mostly to the \var{-S} option on the command
  1660. line (\sees{sourceoptions}).
  1661. \item[Code generation] These options control the generated code; they are
  1662. mostly concerned with the \var{-C} and \var{-X} command-line options.
  1663. \item[Verbose] These set the verbosity of the compiler when compiling. The
  1664. messages of the compiler are shown in the compiler messages window (can be
  1665. called with \key{F12}).
  1666. \item[Browser] options concerning the generated browser information. Browser
  1667. information needs to be generated for the symbol browser to work.
  1668. \item[Assembler] Options concerning the reading of assembler blocks (-R on
  1669. the command line) and the generated assembler (\var{-A} on the command line)
  1670. \end{description}
  1671. Under the tab pages, the {\em Conditional defines} entry box is visible;
  1672. here symbols to define can be entered. The symbols should be separated with
  1673. semicolons. The syntax tab of the compiler options dialog is shown in
  1674. \seefig{ocompa}.
  1675. \FPCpic{The syntax options tab}{ide}{ocompa}
  1676. In this dialog, the following options can be set:
  1677. \begin{description}
  1678. \item[Delphi 2 extensions on]
  1679. Enables the use of classes and exceptions (\seeo{Sd} on the command-line).
  1680. \item[C-like operators]
  1681. Allows the use of some extended operators such as \var{+=, -=} etc.
  1682. (\seeo{Sc} on the command-line).
  1683. \item[Stop after first error] when checked, the compiler stops after the
  1684. first error. Normally the compiler continues compiling till a fatal error is
  1685. reached. (\seeo{Se} on the command-line)
  1686. \item[Allow label and goto] Allow the use of label declarations and goto
  1687. statements (\seeo{Sg} on the command line).
  1688. \item[C++ styled inline] allows the use of inlined functions (\seeo{Sc} on
  1689. the command-line).
  1690. \item[TP/BP 7.0 compatibility] Try to be more \tp compatible (\seeo{So} on
  1691. the command-line).
  1692. \item[Delphi compatibility] try to be more \delphi compatible (\seeo{Sd} on
  1693. the command-line).
  1694. \item[Allow STATIC in objects] Allow the \var{Static} modifier for object
  1695. methods (\seeo{St} on the command-line)
  1696. \item[Strict var-strings] Not used.
  1697. \item[Extended syntax] Not used.
  1698. \item[Allow MMX operations] Allow MMX operations.
  1699. \end{description}
  1700. The code generation tab of the compiler options dialog is shown in
  1701. \seefig{ocompb}.
  1702. \FPCpic{The code generation options tab}{ide}{ocompb}
  1703. In this dialog, the following options can be set:
  1704. \begin{description}
  1705. \item[Run-time checks] Controls what run-time checking code is generated. If
  1706. such a check fails, a run-time error is generated.
  1707. the following checking code can be generated:
  1708. \begin{description}
  1709. \item[Range checking] Code that checks the results of enumeration and subset
  1710. type operations is generated (\seeo{Cr} command-line option)
  1711. \item[Stack checking] Code that checks whether the stack limit is not
  1712. reached is generated (\seeo{Cs} command-line option)
  1713. \item[I/O checking] Code that checks the result of IO operations is
  1714. generated. (\seeo{Ci} command-line option).
  1715. \item[Integer overflow checking] The result of integer operations is
  1716. checked (\seeo{Co} command-line option)
  1717. \end{description}
  1718. \item[Target processor] Set the target process for optimizations. The
  1719. compiler can use different optimizations for different processors. This
  1720. corresponds to the \var{Op} option.
  1721. \begin{description}
  1722. \item[i386/i486] Code is optimized for less than Pentium processors.
  1723. \item[Pentium/pentiumMMX] Code is optimized for Pentium processors.
  1724. \item[PPro/PII/c6x86/K6] Code is optimized for Pentium pro and higher
  1725. processors.
  1726. \end{description}
  1727. \item[Optimizations] What optimizations should be used when compiling:
  1728. \begin{description}
  1729. \item[Generate faster code] Corresponds to the \var{-OG} command-line option.
  1730. \item[Generate smaller code] Corresponds to the \var{-Og} command-line option.
  1731. \item[Use register variables] Corresponds to the \var{-Or} command-line
  1732. option.
  1733. \item[Uncertain optimizations] Corresponds to the \var{-Ou} command-line
  1734. option.
  1735. \item[Level 1 optimizations] Corresponds to the \var{O1} command-line
  1736. option.
  1737. \item[Level 2 optimizations] Corresponds to the \var{O1} command-line
  1738. option.
  1739. \end{description}
  1740. \end{description}
  1741. More information on these switches can be found in \sees{codegen}.
  1742. The verbose tab of the compiler options dialog is shown in
  1743. \seefig{ocompc}.
  1744. \FPCpic{The verbosity options tab}{ide}{ocompc}
  1745. In this dialog, the following verbosity options (\seeo{v} on the
  1746. command-line) can be set:
  1747. \begin{description}
  1748. \item[Warnings] Generate warnings, corresponds to \var{-vw} on the
  1749. command-line.
  1750. \item[Notes] Generate notes, corresponds to \var{-vn} on the
  1751. command-line.
  1752. \item[Hints] Generate hints, corresponds to \var{-vh} on the
  1753. command-line.
  1754. \item[General info] Generate general information, corresponds to \var{-vi} on the
  1755. command-line.
  1756. \item[User,tried info] Generate information on used and tried files. Corresponds to \var{-vut} on the
  1757. command-line.
  1758. \item[All] Switch on full verbosity. Corresponds to \var{-va} on the
  1759. command-line.
  1760. \item[Show all procedure if error] If an error using overloaded procedure
  1761. occurs, show all procedures. Corresponds to \var{-vb} on the
  1762. command-line.
  1763. \end{description}
  1764. The browser tab of the compiler options dialog is shown in
  1765. \seefig{ocompd}.
  1766. \FPCpic{The browser options tab}{ide}{ocompd}
  1767. In this dialog, the browser options can be set:
  1768. \begin{description}
  1769. \item[No browser] (default) no browser information is generated by the
  1770. compiler.
  1771. \item[Only global browser] Browser information is generated for global
  1772. symbols only, i.e. symbols defined not in a procedure or function (\var{-b} on the command-line)
  1773. \item[Local and global browser] Browser information is generated for all
  1774. symbols, i.e. also for symbols that are defined in procedures or functions
  1775. (\var{-bl} on the command-line)
  1776. \end{description}
  1777. \begin{remark}
  1778. If no browser information is generated, the symbol browser of the IDE will
  1779. not work.
  1780. \end{remark}
  1781. The assembler tab of the compiler options dialog is shown in
  1782. \seefig{ocompe}.
  1783. \FPCpic{The assembler options tab}{ide}{ocompe}
  1784. In this dialog, the assembler reader and writer options can be set:
  1785. \begin{description}
  1786. \item[Assembler reader] This allows to set the style of the assembler blocks
  1787. in the sources:
  1788. \begin{description}
  1789. \item[Direct assembler] The assembler blocks are copied as-is to the output
  1790. (\var{-Rdirect} on the command-line).
  1791. \item[AT\&T assembler] The assembler is written in \var{AT\&T} style
  1792. assembler (\var{-Ratt} on the command-line).
  1793. \item[Intel style assembler] The assembler is written in \var{Intel} style
  1794. assembler blocks (\var{-Rintel} on the command-line).
  1795. \end{description}
  1796. remark that this option is global, but locally the assembler style can be
  1797. changed with compiler directives.
  1798. \item[Assembler info] When writing assembler files, this option decides
  1799. which extra information is written to the assembler file in comments:
  1800. \begin{description}
  1801. \item[List source] The source lines are written to the assembler files
  1802. together with the generated assembler (\var{-al} on the command line).
  1803. \item[List register allocation] The compilers internal register
  1804. allocation/deallocation information is written to the assembler file
  1805. (\var{-ar} on the command-line).
  1806. \item[List temp allocation] The temporary register allocation/deallocation
  1807. is written to the assembler file. (\var{-at} on the command-line).
  1808. \end{description}
  1809. The latter two of these options are mainly useful for debugging the
  1810. compiler itself, it should be rarely necessary to use these.
  1811. \item[Assembler output] This option tells the compiler what assembler output
  1812. should be generated.
  1813. \begin{description}
  1814. \item[Use default output] This depends on the target.
  1815. \item[Use GNU as] assemble using \gnu \file{as} (\var{-Aas} on the
  1816. command-line).
  1817. \item[Use NASM coff] produce NASM coff assembler (go32v2, \var{-Anasmcoff} on the
  1818. command-line)
  1819. \item[Use NASM elf] produce NASM elf assembler (\linux, \var{-Anasmelf} on
  1820. the command-line).
  1821. \item[Use NASM obj] produce NASM obj assembler (\var{-Anasmobj} on the
  1822. command-line).
  1823. \item[Use MASM] produce MASM (Microsoft assembler) assembler (\var{-Amasm} on the
  1824. command-line).
  1825. \item[Use TASM] produce TASM (Turbo Assembler) assembler (\var{-Atasm} on the
  1826. command-line).
  1827. \item[Use coff] Write binary coff files directly using the internal
  1828. assembler (go32v2, \var{-Acoff} on the command-line).
  1829. \item[Use pecoff] Write binary pecoff files files directly using the
  1830. internal writer. (Win32)
  1831. \end{description}
  1832. \end{description}
  1833. %
  1834. % Linker options
  1835. %
  1836. \subsection{Linker options}
  1837. The linker options can be set in the menu \menu{Options|Linker}. It allows
  1838. to determine how libraries and units are linked, and how the linker should
  1839. be called.
  1840. The linker options dialog is shown in \seefig{olinker}.
  1841. \FPCpic{The linker options dialog}{ide}{olinker}
  1842. The following options can be set:
  1843. \begin{description}
  1844. \item[Call linker after] If this option is set then a script is written
  1845. which calls the linker. This corresponds to the \seeo{s} on the
  1846. command-line.
  1847. \item[Preferred library type] With this option, the type of library to be
  1848. linked in can be set:
  1849. \begin{description}
  1850. \item[Target default] This depends on the platform.
  1851. \item[Dynamic libraries] Tries to link in units in dynamical libraries.
  1852. (option \var{-XD} on the command-line)
  1853. \item[Static libraries] Tries to link in units in statical libraries.
  1854. (option \var{-XS} on the command-line)
  1855. \item[Smart libraries] Tries to link in units in smartlinked libraries.
  1856. (option \var{-XX} on the command-line)
  1857. \end{description}
  1858. \end{description}
  1859. %
  1860. % Memory sizes dialog
  1861. %
  1862. \subsection{Memory sizes}
  1863. The memory sizes dialog (reachable via \menu{options|Memory sizes}) allows
  1864. to enter the memory sizes for the project.
  1865. The memory sizes dialog is shown in \seefig{omemsize}.
  1866. \FPCpic{The memory sizes dialog}{ide}{omemsize}
  1867. The following sizes can be entered:
  1868. \begin{description}
  1869. \item[Stack size] Sets the size of the stack in bytes;
  1870. (option \var{-Cs} on the command line). This size may be ignored on some
  1871. systems.
  1872. \item[Heap size] Sets the size of the heap in bytes; (option \var{-Ch} on
  1873. the command-line). Note that the heap grows dynamically as much as the OS
  1874. allows.
  1875. \end{description}
  1876. %
  1877. % Debugging options
  1878. %
  1879. \subsection{Debug options}
  1880. \label{se:debugoptions}
  1881. In the debug options dialog some options for inclusion of debug information
  1882. in the binary can be set; it is also possible to add additional compiler
  1883. options in this dialog.
  1884. The debug options dialog is shown in \seefig{odebug}.
  1885. \FPCpic{The debug options dialog}{ide}{odebug}
  1886. The following options can be set:
  1887. \begin{description}
  1888. \item[Debugging information] tells the compiler which debug information
  1889. should be compiled in. One of following options can be chosen:
  1890. \begin{description}
  1891. \item[Strip all debug symbols from executable] Will strip all debug nd
  1892. symbol information from the binary. (option \var{-Xs} on the command-line).
  1893. \item[Generate debug symbol information] include debug information in the
  1894. binary (option \var{-g} on the command-line). Please note that no debug
  1895. information for units in the Run-Time Library will be included, unless a
  1896. version of the RTL compiled with debug information is available. Only units
  1897. specific to the current project will have debug information included.
  1898. \item[Generate also backtrace lines information] Will compile with debug
  1899. information, and will additionally include the \file{lineinfo} unit in the
  1900. binary, so in case of an error the backtrace will contain the filenames and
  1901. linenumbers of procedures in the call-stack. (Option \var{-gl} on the
  1902. command-line)
  1903. \end{description}
  1904. \item[Profiling switches] Tells the compiler whether or not profile code
  1905. should be included in the binary.
  1906. \begin{description}
  1907. \item[No profile information] Has no effect, as it is the default.
  1908. \item[Generate Profile code for gprof] If checked, profiling code is
  1909. included in the binary (option \var{-p} on the command-line).
  1910. \end{description}
  1911. \item[Addition compiler args] Here arbitrary options can be entered as they
  1912. would be entered on the command-line, they will be passed on to the compiler
  1913. as typed here.
  1914. \item[Debuggee redirection]
  1915. If checked, an attempt will be made to redirect the output of the program
  1916. being debugged to another window (terminal).
  1917. \end{description}
  1918. %
  1919. % The switches mode.
  1920. %
  1921. \subsection{The switches mode}
  1922. \label{se:compilermode}
  1923. The IDE allows to save a set of compiler settings under a common name; it
  1924. provides 3 names under which the switches can be saved:
  1925. \begin{description}
  1926. \item[Normal] For normal (fast) compilation.
  1927. \item[Debug] For debugging; intended to set most debug switches on. Also
  1928. useful for setting conditional defines that e.g. allow to include some
  1929. debug code.
  1930. \item[release] For a compile of the program as it should be released, debug
  1931. information should be off, the binary should be stripped, and optimizations
  1932. should be used.
  1933. \end{description}
  1934. Selecting one of these modes will load the compiler options as they were
  1935. saved the last time the selected mode was active, i.e. it doesn't
  1936. specifically set or unset options.
  1937. When setting and saving compiler options, be sure to select the correct
  1938. switch mode first; it makes little sense to set debug options while the
  1939. release switch is active.
  1940. The switches mode dialog is shown in \seefig{oswitch}.
  1941. \FPCpic{The switches mode dialog}{ide}{oswitch}
  1942. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  1943. % Customize the IDE
  1944. \section{Customizing the IDE}
  1945. The IDE is configurable in a wide range: Colors can be changed, screen
  1946. resolution. The configuration setting can reached via the
  1947. sub-menu \var{Environment} in the \var{Options} menu.
  1948. %
  1949. % general preferences
  1950. %
  1951. \subsection{Preferences}
  1952. The {\em preferences dialog} is called by the menu item
  1953. \menu{Options|Environment|Preferences}.
  1954. The preferences dialog is shown in \seefig{oeprefs}.
  1955. \FPCpic{The preferences dialog}{ide}{oeprefs}
  1956. \begin{description}
  1957. \item[Video modes]
  1958. The drop down list at the top of the dialog allows to select a video mode.
  1959. The available video modes depend on the system on which the IDE
  1960. is running.
  1961. \begin{remark}
  1962. \begin{enumerate}
  1963. \item The video mode must be selected by pressing space or clicking
  1964. on it. If the drop down list is opened while leaving the dialog,
  1965. the new video mode will not be applied.
  1966. \item For the \dos version of the IDE, the following should be noted:
  1967. When using VESA modes, the display refresh rate may be very low.
  1968. On older graphics card (1998 and before), it is possible to use the
  1969. {\em UniVBE} driver of {\em SciTech}\footnote{It can be downloaded from
  1970. \seeurl{http://www.informatik.fh-muenchen.de/~ifw98223/vbehz.htm}
  1971. {http://www.informatik.fh-muenchen.de/\~{}ifw98223/vbehz.htm}}
  1972. % It is quite outdated
  1973. %(last update somewhere in 1998).
  1974. %For newer graphics cards which support VESA 3.0, you can try to get one
  1975. %of the TSR programs
  1976. %\footnote{\textbf{T}erminate and \textbf{S}tay \textbf{R}esisdent}
  1977. % available at the net to customize the refresh rate.
  1978. %%%%!!!!!!!! footnote with URL
  1979. \end{enumerate}
  1980. \end{remark}
  1981. \item[Desktop File]
  1982. Specifies where the desktop file is saved: the current directory, or the
  1983. directory where the config file was found;
  1984. \item[Auto save]
  1985. Here it is possible to set which files are saved when a program is run or
  1986. when the IDE is exited:
  1987. \begin{description}
  1988. \item[Editor files] The contents of all open edit windows will be saved.
  1989. \item[Environment] The current environment settings will be saved
  1990. \item[Desktop] The desktop file with all desktop settings (open windows,
  1991. history lists, breakpoints etc.) will be saved.
  1992. \end{description}
  1993. \item[Options]
  1994. Some special behaviour of the IDE can be specified here:
  1995. \begin{description}
  1996. \item[Auto track source]
  1997. \item[Close on go to source] When checked, the messages window is closed
  1998. when the 'go to source line' action is executed.
  1999. \item[Change dir on open] When a file is opened, the directory of that file
  2000. is made the current working directory.
  2001. \end{description}
  2002. \end{description}
  2003. %
  2004. % Desktop customization
  2005. %
  2006. \subsection{The desktop}
  2007. \label{se:prefdesktop}
  2008. The desktop preferences dialog allows to specify what elements of the
  2009. desktop are saved across sessions, i.e. they are saved when the IDE is left,
  2010. and they are again restored when the IDE is started the next time.
  2011. They are saved in a file \file{fp.dsk}.
  2012. The desktop preferences dialog is shown in \seefig{oedesk}.
  2013. \FPCpic{The desktop preferences dialog}{ide}{oedesk}
  2014. The following elements can be saved and restored across IDE sessions:
  2015. \begin{description}
  2016. \item[History lists] Most entry boxes have a history list where previous
  2017. entries are saved and can be selected. When this option is saved, these
  2018. entries are saved in the desktop file. On by default.
  2019. \item[Clipboard content]
  2020. When checked, the contents of the clipboard is also saved to disk. Off by
  2021. default.
  2022. \item[Watch expressions]
  2023. When checked, all watch expressions are saved in the desktop file. Off by
  2024. default.
  2025. \item[Breakpoints]
  2026. When checked, all break points with their properties are saved in the
  2027. desktop file. Off by default.
  2028. \item[Open windows]
  2029. When checked, the list of files in open editor windows is saved in the
  2030. desktop file, and the windows will be restored the next time the IDE
  2031. is run. On by default.
  2032. \item[Symbol information]
  2033. When checked, the information for the symbol browser is saved in the desktop
  2034. file. Off by default.
  2035. \item[CodeComplete wordlist]
  2036. When checked, the list of code-completion words is saved. On by default.
  2037. \item[CodeTemplates]
  2038. When checked, the defined code-templates are saved. On by default.
  2039. \end{description}
  2040. %
  2041. % Editor customization
  2042. %
  2043. \subsection{The Editor}
  2044. Several aspects of the editor window behaviour can be set in this dialog.
  2045. The editor preferences dialog is shown in \seefig{oeeditor}.
  2046. \FPCpic{The editor preferences dialog}{ide}{oeeditor}
  2047. The following elements can be set in the editor preferences dialog:
  2048. \begin{description}
  2049. \item[Create backup files]
  2050. Whenever an editor file is saved, a backup is made of the old file. On by
  2051. default.
  2052. \item[Auto indent mode]
  2053. Smart indenting is on. This means that pressing \key{Enter} will position the
  2054. cursor on the next line in the same column where text starts on the current
  2055. line. On by default.
  2056. \item[Use tab characters]
  2057. When the tab key is pressed, use a tab character. Normally, when the tab key
  2058. is pressed, spaces are inserted. When this option is checked, tab characters
  2059. will be inserted instead. Off by default.
  2060. \item[Backspace unindents]
  2061. Pressing the \key{Bksp} key will unindent if the beginning of the text on
  2062. the current line is reached, instead of deleting just the previous
  2063. character. On by default.
  2064. \item[Persistent blocks]
  2065. When a selection is made, and the cursor is moved, the selection is not
  2066. destroyed, i.e. the selected block stays selected. On by default.
  2067. \item[Syntax highlight]
  2068. Use syntax highlighting on the files that have an extension which appears in
  2069. the list of highlight extensions. On by default.
  2070. \item[Block insert cursor]
  2071. The insert cursor is a block instead of an underscore character. By default
  2072. the overwrite cursor is a block. This option reverses that behaviour. Off by
  2073. default.
  2074. \item[Vertical blocks]
  2075. When selecting blocks over several lines, the block doesn't select the whole
  2076. lines in the block, it selects the lines till the column on which the cursor
  2077. is located. Off by default.
  2078. \item[Highlight column]
  2079. When checked, the current column (i.e. the column where the cursor is) is
  2080. highlighted. Off by default.
  2081. \item[Highlight row]
  2082. When checked, the current row (i.e. the row where the cursor is) is
  2083. highlighted. Off by default.
  2084. \item[Auto closing brackets]
  2085. When an opening bracket character is typed, the closing bracket is also
  2086. inserted at once. Off by default.
  2087. \item[Keep trailing spaces]
  2088. When saving a file, the spaces at the end of lines are stripped off. This
  2089. behaviour disables that behaviour, i.e. any trailing spaces are also saved
  2090. to file. Off by default.
  2091. \item[Codecomplete enabled]
  2092. Enable code completion. On by default.
  2093. \item[enable folds]
  2094. ???. Off by default.
  2095. \item[Tab size]
  2096. The number of spaces that are inserted when the \key{Tab} key is pressed.
  2097. The default value is 8.
  2098. \item[Indent size]
  2099. The number of spaces a block is indented when calling the block indent function.
  2100. The default value is 2.
  2101. \item[Highlight extensions]
  2102. When syntax highlighting is on, the list of file masks entered here will be
  2103. used to determine which files are highlighted. File masks should be
  2104. separated with semicolon (;) characters. The default is
  2105. \file{*.pas;*.pp;*.inc}.
  2106. \item[File patterns needing tabs]
  2107. Some files (such as makefiles) need actual tab characters instead of spaces.
  2108. Here a series of file masks can be entered for which tab characters will
  2109. always be used. Default is \file{make*;make*.*}.
  2110. \end{description}
  2111. \begin{remark}
  2112. These options will not be applied to already opened windows, only newly
  2113. opened windows will have these options.
  2114. \end{remark}
  2115. %
  2116. % Mouse customization
  2117. %
  2118. \subsection{Mouse}
  2119. \label{se:prefmouse}
  2120. The mouse options dialog is called by the menu item
  2121. \menu{Options|Environment|Mouse}. It allows to adjust the behaviour of the
  2122. mouse as well as the sensitivity of the mouse.
  2123. The mouse options dialog is shown in \seefig{oemouse}.
  2124. \FPCpic{The mouse options dialog}{ide}{oemouse}
  2125. \begin{description}
  2126. \item[Mouse double click]
  2127. The slider can be used to adjust the double click speed. Fast means that the
  2128. time between two clicks is very short, slow means that the time between two
  2129. mouse clicks can be quite long.
  2130. \item[Reverse mouse buttons]
  2131. the behaviour of the left and right mouse buttons can be changed by
  2132. by checking the checkbox; this is especially useful for left-handed people.
  2133. \item[Ctrl+Right mouse button]
  2134. Assigns an action to a right mouse button click while holding the
  2135. \key{Ctrl} key pressed.
  2136. \item[Ctrl+Left mouse button]
  2137. Assigns an action to a left mouse button click while holding the
  2138. \key{Ctrl} key pressed.
  2139. \end{description}
  2140. The following actions can be assigned to \key{Ctrl}-right mouse button or
  2141. \key{Alt}-right mouse button:
  2142. \begin{description}
  2143. \item [Topic search] The keyword at the mouse cursor is searched in the
  2144. help index.
  2145. \item [Go to cursor] The program is executed until the line where
  2146. the mouse cursor is located.
  2147. \item [Breakpoint] Set a breakpoint at the mouse cursor position.
  2148. \item [Evaluate] Evaluate the value of the variable at the mouse
  2149. cursor.
  2150. \item [Add watch] Add the variable at the mouse cursor to the
  2151. watch list.
  2152. \item [Browse symbol] The symbol at the mouse cursor is displayed
  2153. in the browser.
  2154. \end{description}
  2155. %
  2156. % Color customization
  2157. %
  2158. \subsection{Colors}
  2159. \label{se:prefcolors}
  2160. Almost all elements of the IDE such as borders input fields, buttons and so
  2161. on can have their color set in this dialog. The dialog sets the colors for
  2162. all elements at once, i.e. it is not so that the color of one particular
  2163. button can be set.
  2164. The syntax highlighting colors for the editor windows of the IDE can also
  2165. be set in this dialog.
  2166. The colors dialog is shown in \seefig{oecolors}.
  2167. \FPCpic{The colors dialog}{ide}{oecolors}
  2168. The following elements are visible in the color dialog:
  2169. \begin{description}
  2170. \item[Group]
  2171. Here the group to be customized is displayed; A group is a specific window
  2172. or series of windows in the editor. A special group is {\em Syntax} which
  2173. sets the colors for syntax highlighting.
  2174. \begin{description}
  2175. \item[Browser] Sets the colors for the symbol browser window.
  2176. \item[Clock] Sets the colors for the clock in the menu.
  2177. \item[Desktop] Sets the colors for the desktop.
  2178. \item[Dialogs] Sets the colors for the dialog windows.
  2179. \item[Editor] Sets the colors for the editor windows.
  2180. \item[Help] Sets the colors for the help windows.
  2181. \item[Menus] Sets the colors used in the menus.
  2182. \item[Syntax] Sets the colors used when performing syntax highlighting in the
  2183. editor windows.
  2184. \end{description}
  2185. \item[item]
  2186. Here the item for the current group can be selected. The foreground and
  2187. background of this item can be set using the color selectors on the right of
  2188. the dialog.
  2189. \item[Foreground]
  2190. Sets the foreground color of the selected item.
  2191. \item[background]
  2192. Sets the background color of the selected item.
  2193. \item[Sample text]
  2194. This shows the colors of the selected item in a sample text.
  2195. \end{description}
  2196. Setting a good color scheme is important especially for syntax highlighting;
  2197. a good syntax highlighting scheme helps in eliminating errors when typing,
  2198. without needing to compile the sources.
  2199. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  2200. % The help system
  2201. \section{The help system}
  2202. More information on how to handle the IDE, or about the use of various
  2203. calls in the RTL, explanations regarding the syntax of a Pascal statement,
  2204. can be found in the \emph{help system}. The help system is activated
  2205. by pressing \key{F1}.
  2206. \subsection{Navigating in the help system}
  2207. The help system contains hyperlinks; these are sensitive locations that
  2208. lead to another topic in the help system. They are marked by a different
  2209. color. The hyperlinks can be activated in 2 ways:
  2210. \begin{enumerate}
  2211. \item by clicking them with the mouse,
  2212. \item by using the \key{Tab} and \key{Shift-Tab} keys to move between
  2213. the different hyperlinks of a page and the \key{Enter} key can be used
  2214. to activate them.
  2215. \end{enumerate}
  2216. The contents of the help system is displayed, if \key{Shift-F1} is
  2217. pressed. To go back to the previous help topic, press \key{Alt-F1}.
  2218. This also works if the help window isn't displayed on the desktop; the help
  2219. window will then be activated.
  2220. %
  2221. % Working with help files.
  2222. %
  2223. \subsection{Working with help files}
  2224. The IDE contains a help system which can display the following file formats:
  2225. \begin{description}
  2226. \item[TPH] The help format for the Turbo Pascal help viewer.
  2227. \item[INF] The OS/2 help format.
  2228. \item[NG] The Norton Guide Help format.
  2229. \item[HTML] HTML files.
  2230. \end{description}
  2231. In future some more formats may be added. However, the above formats should
  2232. cover already a wide spectrum of help files available.
  2233. \begin{remark}
  2234. Concerning the support for HTML files the following should be noted:
  2235. \begin{enumerate}
  2236. \item
  2237. The HTML viewer of the help system is limited, it can only handle the
  2238. most basic HTML files (graphics excluded), since it is only designed
  2239. to display the \fpc help files. \footnote{...but feel free to improve it and send patches to the
  2240. \fpc development team...}.
  2241. \item
  2242. When the HTML help viewer encounters a graphics file, it will try and find a
  2243. file with the same name but an extension of \file{.ans}; If this file is
  2244. found, this will be interpreted as a file with ANSI escape sequences, and
  2245. these will be used to display a text image. The displays of the IDE dialogs
  2246. in the IDE help files are made in this way.
  2247. \end{enumerate}
  2248. \end{remark}
  2249. The menu item \menu{Help|Files} permits to add and delete help files to the
  2250. list of files in the help table of contents.
  2251. The help files dialog is displayed in \seefig{helpfils}.
  2252. \FPCpic{The help files dialog}{ide}{helpfils}
  2253. The dialogs lists the files that will be presented in the table of contents
  2254. window of the help system. Each entry has a small descriptive title and a
  2255. filename next to it. The following actions are available when adding help
  2256. files:
  2257. \begin{description}
  2258. \item[New] Adds a new file. IDE will display a prompt, in which the
  2259. location of the help file should be entered.
  2260. If the added file is an HTML file, a dialog box will be displayed
  2261. which asks for a title. This title will then be included in the
  2262. contents of help.
  2263. \item[Delete] Deletes the currently highlighted file from the help system.
  2264. It is \emph{not} deleted from the hard disk, only the help system entry is
  2265. removed.
  2266. \item[Cancel] Discards all changes and closes the dialog.
  2267. \item[OK] Saves the changes and closes the dialog.
  2268. \end{description}
  2269. The \fpc documentation in HTML format can be added to the IDE's help system,
  2270. this way the documentation can be viewed from within the IDE. If \fpc has
  2271. been installed using the installer, the installer should have added the
  2272. FPC documentation to the list of help files, if the documentation was
  2273. installed as well.
  2274. %
  2275. % The about dialog.
  2276. %
  2277. \subsection{The about dialog}
  2278. \label{se:about}
  2279. The {\em about dialog}, reachable through (\menu{Help|About...}) shows some
  2280. information about the IDE, such as the version number, the date it was built,
  2281. what compiler and debugger it uses. When reporting bugs about the IDE, please
  2282. use the information given by this dialog to identify the version of the IDE
  2283. that was used.
  2284. It also displays some copyright information.
  2285. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  2286. % Keyboard shortcuts
  2287. \section{Keyboard shortcuts}
  2288. \label{se:keyshortcuts}
  2289. A lot of keyboard shortcuts used by the IDE are compatible with
  2290. WordStar and should be well known to Turbo Pascal users.
  2291. Below are the following tables:
  2292. \begin{enumerate}
  2293. \item In \seet{shortcutsgeneral} some shortcuts for handling the IDE windows
  2294. and Help are listed.
  2295. \item In \seet{shortcutscompiler} the shortcuts for compiling, running and
  2296. debugging a program are presented.
  2297. \item In \seet{shortcutsnavigation} the navigation keys are described.
  2298. \item In \seet{shortcutsedit} the editing keys are listed.
  2299. \item In \seet{shortcutsblock} lists all block command shortcuts.
  2300. \item In \seet{shortcutsselection} all selection-changing shortcuts are
  2301. presented.
  2302. \item In \seet{shortcutsmisc} some general shortcuts are presented,
  2303. which do not fit in the previous categories.
  2304. \end{enumerate}
  2305. \begin{FPCltable}{p{5cm}ll}{General}{shortcutsgeneral}
  2306. Command & Key shortcut & Alternative \\ \hline
  2307. Help & \key{F1} & \\
  2308. Goto last help topic & \key{Alt-F1} & \\
  2309. Search word at cursor position in help & \key{Ctrl-F1} & \\
  2310. Help index & \key{Shift-F1} & \\
  2311. Close active window & \key{Alt-F3} & \\
  2312. Zoom/Unzoom window & \key{F5} & \\
  2313. Move/Zoom active window & \key{Ctrl-F5} & \\
  2314. Switch to next window & \key{F6} & \\
  2315. Switch to last window & \key{Shift-F6} & \\
  2316. Menu & \key{F10} & \\
  2317. Local menu & \key{Alt-F10} & \\
  2318. List of windows & \key{Alt-0} & \\
  2319. Active another window & \key{Alt-<digit>} & \\
  2320. Call \file{grep} utility & \key{Shift-F2} & \\
  2321. Exit IDE & \key{Alt-X} & \\
  2322. \end{FPCltable}
  2323. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  2324. \begin{FPCltable}{p{5cm}ll}{Compiler}{shortcutscompiler}
  2325. Command & Key shortcut & Alternative \\
  2326. \hline
  2327. Reset debugger/program & \key{Ctrl-F2} & \\
  2328. Display call stack & \key{Ctrl-F3} & \\
  2329. Run til cursor & \key{F4} & \\
  2330. Switch to user screen & \key{Alt-F5} & \\
  2331. Trace into & \key{F7} & \\
  2332. Add watch & \key{Ctrl-F7} & \\
  2333. Step over & \key{F8} & \\
  2334. Set breakpoint at current line & \key{Ctrl-F8} & \\
  2335. Make & \key{F9} & \\
  2336. Run & \key{Ctrl-F9} & \\
  2337. Compile the active source file & \key{Alt-F9} & \\
  2338. Message & \key{F11} & \\
  2339. Compiler messages & \key{F12} & \\
  2340. \end{FPCltable}
  2341. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  2342. \begin{FPCltable}{p{5cm}ll}{Text navigation}{shortcutsnavigation}
  2343. Command & Key shortcut & Alternative \\
  2344. \hline
  2345. Char left & \key{Arrow left} & \key{Ctrl-S} \\
  2346. Char right & \key{Arrow right} & \key{Ctrl-D} \\
  2347. Line up & \key{Arrow up} & \key{Ctrl-E} \\
  2348. Line down & \key{Arrow down} & \key{Ctrl-X} \\
  2349. Word left & \key{Ctrl-Arrow left} & \key{Ctrl-A} \\
  2350. Word right & \key{Ctrl-Arrow right} & \key{Ctrl-F} \\
  2351. Scroll one line up & \key{Ctrl-W} & \\
  2352. Scroll one line down & \key{Ctrl-Z} & \\
  2353. Page up & \key{PageUp} & \key{Ctrl-R} \\
  2354. Page down & \key{PageDown} & \\
  2355. Beginning of Line & \key{Pos1} & \key{Ctrl-Q-S} \\
  2356. End of Line & \key{End} & \key{Ctrl-Q-D} \\
  2357. First line of window & \key{Ctrl-Pos1} & \key{Ctrl-Q-E} \\
  2358. Last line of window & \key{Ctrl-End} & \key{Ctrl-Q-X} \\
  2359. First line of file & \key{Ctrl-PageUp} & \key{Ctrl-Q-R} \\
  2360. Last line of file & \key{Ctrl-PageDown} & \key{Ctrl-Q-C} \\
  2361. Last cursor position & \key{Ctrl-Q-P} & \\
  2362. \end{FPCltable}
  2363. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  2364. \begin{FPCltable}{p{5cm}ll}{Edit}{shortcutsedit}
  2365. Command & Key shortcut & Alternative \\
  2366. \hline
  2367. Delete char & \key{Del} & \key{Ctrl-G} \\
  2368. Delete left char & \key{Backspace} & \key{Ctrl-H} \\
  2369. Delete line & \key{Ctrl-Y} & \\
  2370. Delete til end of line & \key{Ctrl-Q-Y} & \\
  2371. Delete word & \key{Ctrl-T} & \\
  2372. Insert line & \key{Ctrl-N} & \\
  2373. Toggle insert mode & \key{Insert} & \key{Ctrl-V} \\
  2374. \end{FPCltable}
  2375. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  2376. \begin{FPCltable}{p{5cm}ll}{Block commands}{shortcutsblock}
  2377. Command & Key shortcut & Alternative \\
  2378. \hline
  2379. Goto Beginning of selected text & \key{Ctrl-Q-B} & \\
  2380. Goto end of selected text & \key{Ctrl-Q-K} & \\
  2381. Select current line & \key{Ctrl-K-L} & \\
  2382. Print selected text & \key{Ctrl-K-P} & \\
  2383. Select current word & \key{Ctrl-K-T} & \\
  2384. Delete selected text & \key{Ctrl-Del} & \key{Ctrl-K-Y} \\
  2385. Copy selected text to cursor position & \key{Ctrl-K-C} & \\
  2386. Move selected text to cursor position & \key{Ctrl-K-V} & \\
  2387. Copy selected text to clipboard & \key{Ctrl-Ins} & \\
  2388. Move selected text to the clipboard & \key{Shift-Del} & \\
  2389. Indent block one column & \key{Ctrl-K-I} & \\
  2390. Unindent block one column & \key{Ctrl-K-U} & \\
  2391. Insert text from clipboard & \key{Shift-Insert} & \\
  2392. Insert file & \key{Ctrl-K-R} & \\
  2393. Write selected text to file & \key{Ctrl-K-W} & \\
  2394. Uppercase current block & \key{Ctrl-K-N} & \\
  2395. \end{FPCltable}
  2396. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  2397. \begin{FPCltable}{p{5cm}ll}{Change selection}{shortcutsselection}
  2398. Command & Key shortcut & Alternative \\
  2399. \hline
  2400. Mark beginning of selected text & \key{Ctrl-K-B} & \\
  2401. Mark end of selected text& \key{Ctrl-K-K} & \\
  2402. Remove selection & \key{Ctrl-K-Y} & \\
  2403. Extend selection one char to the left & \key{Shift-Arrow left} & \\
  2404. Extend selection one char to the right & \key{Shift-Arrow right} & \\
  2405. Extend selection to the beginning of the line & \key{Shift-Pos1} & \\
  2406. Extend selection to the end of the line & \key{Shift-End} & \\
  2407. Extend selection to the same column in the last row & \key{Shift-Arrow up} & \\
  2408. Extend selection to the same column in the next row & \key{Shift-Arrow down} & \\
  2409. Extend selection to the end of the line & \key{Shift-End} & \\
  2410. Extend selection one word to the left & \key{Ctrl-Shift-Arrow left} & \\
  2411. Extend selection one word to the right & \key{Ctrl-Shift-Arrow right} & \\
  2412. Extend selection one page up & \key{Shift-PageUp} & \\
  2413. Extend selection one page down & \key{Shift-PageDown} & \\
  2414. Extend selection to the beginning of the file & \key{Ctrl-Shift-Pos1} &
  2415. \key{Ctrl-Shift-PageUp} \\
  2416. Extend selection to the end of the file & \key{Ctrl-Shift-End} &
  2417. \key{Ctrl-Shift-PageUp} \\
  2418. \end{FPCltable}
  2419. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  2420. \begin{FPCltable}{p{5cm}ll}{Misc. commands}{shortcutsmisc}
  2421. Command & Key shortcut & Alternative \\
  2422. \hline
  2423. Save file & \key{F2} & \key{Ctrl-K-S} \\
  2424. Open file & \key{F3} & \\
  2425. Search & \key{Ctrl-Q-F} & \\
  2426. Search again & \key{Ctrl-L}\ & \\
  2427. Search and replace & \key{Ctrl-Q-A} & \\
  2428. Set mark & \key{Ctrl-K-n} (where n can be 0..9) & \\
  2429. Goto mark & \key{Ctrl-Q-n} (where n can be 0..9) & \\
  2430. Undo & \key{Alt-Backspace} & \\
  2431. \end{FPCltable}
  2432. %
  2433. % $Log$
  2434. % Revision 1.7 2003-03-17 18:19:59 michael
  2435. % + fixed some chars that confused tex4ht.
  2436. %
  2437. % Revision 1.6 2003/03/16 15:22:18 peter
  2438. % * support for hevea
  2439. % * provided local copies or required styles since debian does not
  2440. % supply the listings.sty anymore
  2441. %
  2442. % Revision 1.5 2002/05/20 12:03:19 michael
  2443. % + Added -t option.
  2444. %
  2445. % Revision 1.4 2001/11/05 19:08:47 michael
  2446. % + Some small corrections before 1.0.6
  2447. %
  2448. % Revision 1.3 2001/07/19 15:07:56 michael
  2449. % + Merged from fixbranch
  2450. %
  2451. % Revision 1.1.2.21 2001/06/29 19:44:47 peter
  2452. % * create pdf without latex2html installed
  2453. %
  2454. % Revision 1.1.2.20 2000/12/08 23:59:53 michael
  2455. % + Some changes noted by marco
  2456. %
  2457. % Revision 1.1.2.19 2000/12/08 21:15:39 michael
  2458. % + spell-checked
  2459. %
  2460. % Revision 1.1.2.18 2000/12/08 20:41:50 michael
  2461. % + Fixed some references
  2462. %
  2463. % Revision 1.1.2.17 2000/12/08 16:55:54 michael
  2464. % + Some remarks corrected
  2465. %
  2466. % Revision 1.1.2.16 2000/12/08 12:57:21 michael
  2467. % + Documented tdf format
  2468. %
  2469. % Revision 1.1.2.15 2000/12/07 23:19:04 michael
  2470. % + Added memsizes, goto line and debug options
  2471. %
  2472. % Revision 1.1.2.14 2000/12/06 23:08:56 michael
  2473. % + Linker options dialog documented
  2474. %
  2475. % Revision 1.1.2.13 2000/12/03 22:32:06 michael
  2476. % + More compiler options
  2477. %
  2478. % Revision 1.1.2.12 2000/11/28 22:53:06 michael
  2479. % + Better sized pictures, start of options
  2480. %
  2481. % Revision 1.1.2.11 2000/11/21 22:02:25 peter
  2482. % * html image including fixed
  2483. %
  2484. % Revision 1.1.2.10 2000/11/21 18:44:38 peter
  2485. % * removed last gifs
  2486. %
  2487. % Revision 1.1.2.9 2000/11/21 14:16:06 michael
  2488. % + Pages 1-23 corrected after remarks from Luk Vandelaer
  2489. %
  2490. % Revision 1.1.2.8 2000/11/20 18:53:52 michael
  2491. % + Documenting tools
  2492. %
  2493. % Revision 1.1.2.7 2000/11/19 23:08:32 michael
  2494. % + Further implementation.
  2495. %
  2496. % Revision 1.1.2.6 2000/11/18 00:06:11 michael
  2497. % + Added code templates
  2498. % + Added syntax highlighting
  2499. % + Added codecompletion
  2500. % + Added gdb window
  2501. %
  2502. % Revision 1.1.2.5 2000/11/15 23:43:32 michael
  2503. % + Debugging finished
  2504. %
  2505. % Revision 1.1.2.4 2000/11/15 18:58:35 michael
  2506. % + Debug continued
  2507. %
  2508. % Revision 1.1.2.3 2000/11/14 23:24:09 michael
  2509. % + Documented run menu
  2510. %
  2511. % Revision 1.1.2.2 2000/11/13 23:46:03 michael
  2512. % + documented blocks, search, and the browser
  2513. %
  2514. % Revision 1.1.2.1 2000/11/12 23:40:32 michael
  2515. % + Changes for final version
  2516. %
  2517. % Revision 1.1 2000/07/13 09:10:04 michael
  2518. % + Initial import
  2519. %
  2520. % Revision 1.5 2000/03/04 07:47:28 florian
  2521. % * some corrections and some new stuff
  2522. %
  2523. % Revision 1.4 2000/03/01 15:39:40 florian
  2524. % * some new stuff
  2525. %
  2526. % Revision 1.3 2000/02/28 17:45:40 florian
  2527. % * a lot of new stuff
  2528. %