ide.tex 32 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823
  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. % Using the IDE
  23. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  24. \chapter{Using the IDE}
  25. The IDE (\textbf{I}ntegrated \textbf{D}evelopment \textbf{E}nvironment)
  26. provides a comfortable user interface to the compiler. Moreover, it
  27. provides a debugger, symbol browser etc. The IDE is a textmode
  28. application which allows the same look and feel for all supported
  29. operating systems. Furthermore, it will be very familiar to all
  30. Turbo Pascal users.
  31. Currently the IDE is available for DOS, Win32 and Linux.
  32. \section{First steps with the IDE}
  33. The IDE is started by entering the command:
  34. \begin{verbatim}
  35. fp
  36. \end{verbatim}
  37. at the command line. Of course, you can also start the IDE
  38. from a graphical user interface (under the Windows enviroment, you
  39. can switch between windowed mode and full screen mode by pressing
  40. \textsc{Alt-Enter}).
  41. \subsection{The IDE screen}
  42. \begin{htmlonly}
  43. After start up, the screen of the IDE looks like this:
  44. \htmladdimg{../pics/idestart.gif}
  45. \end{htmlonly}
  46. \begin{latexonly}
  47. After start up, the screen of the IDE looks like figure \ref{fig:idestart}.
  48. \begin{figure}
  49. \caption{The IDE screen immediatly after startup}
  50. \label{fig:idestart}
  51. \ifpdf
  52. \epsfig{file=pics/idestart.pdf,width=\textwidth}
  53. \else
  54. %%%%%%%%%% !!!!!!!! eps\epsfig{file=pics/idestart.eps,width=\textwidth}
  55. \fi
  56. \end{figure}
  57. \end{latexonly}
  58. At top of the screen you see the \emph{menu bar}, at the bottom
  59. the \emph{status bar}. The empty bar between them is called the
  60. \emph{desktop}.
  61. The statusbar allows a quick access to often used commands by
  62. clicking them with the mouse. Further, it reminds you about
  63. keyboard shortcuts that are frequently used.
  64. In upper right corner of the IDE screen a clock is displayed to
  65. remind you to go to bed in time. At lower right corner you'll
  66. see the current amount of unsed memory. Don't worry if this value
  67. is low - the IDE allocates more memory from the operating system
  68. if it runs out of memory.
  69. You can exit from the IDE by selecting \var{File|Exit}
  70. \footnote{\var{File|Exit} means select the item Exit in the menu File}
  71. or by pressing \textsc{Alt-X}.
  72. \begin{remark}
  73. A complete reference of all keyboard shortcuts can be found in
  74. section \ref{ide:keyshortcuts}.
  75. \end{remark}
  76. \subsection{IDE Command line options}
  77. When starting the IDE, command line options can be passed:
  78. \begin{verbatim}
  79. fp [-option] [-option] ... <file name> ...
  80. \end{verbatim}
  81. \var{Option} is one of the following switches (the option letters
  82. aren't case sensitive):
  83. \begin{description}
  84. \item [-N] DOS only: Do not use long file names. Since Windows 95 an interface
  85. is provided to DOS applications to access long file names. The IDE uses
  86. this interface by default to access files. Under certain circumstances, this
  87. can lead to problems.
  88. \item [-Cfilename] This option followed by
  89. a filename uses the given file to read the options. The file name
  90. must follow the \var{C-} without spaces.
  91. \item [-R] After starting the IDE, it changes automatically to the directory
  92. which was active when you left the IDE the last time.
  93. \end{description}
  94. The files given at the command line are loaded into edit
  95. window automatically.
  96. \begin{remark}
  97. Under DOS/Win32, \var{/} can be used instead of \var{-} to pass a
  98. command line switch to the IDE.
  99. \end{remark}
  100. \subsection{Using the mouse}
  101. \label{ide:mouseusage}
  102. If the system is equipped with a mouse, it can be used to work with the
  103. IDE. The left button is used to select menu items, press buttons, select
  104. text blocks etc. The right mouse button is used to access the local menu.
  105. The local menu isn't always available. Holding down the \textsc{Ctrl} or
  106. \textsc{Alt} key and clicking the right button will
  107. execute user defined functions, see \ref{ide:prefmouse}
  108. \begin{remark}
  109. Occasionally, this manual uses the term "drag the mouse". This
  110. means that you have to move the mouse while pressing the left
  111. mouse button.
  112. \end{remark}
  113. \begin{remark}
  114. When talking about left and right mouse button, it always means that the
  115. mouse buttons aren't reversed, if you want you can exchange the
  116. behavior of the left and right mouse button, see \ref{ide:prefmouse}.
  117. \end{remark}
  118. \begin{remark}
  119. Under the following circumstances you won't be able to use the mouse,
  120. even if your system has one:
  121. \begin{itemize}
  122. \item The IDE is running under Linux throught a telnet connection
  123. \item The IDE is running under Linux in a window
  124. \end{itemize}
  125. \end{remark}
  126. \subsection{Accessing the menu}
  127. The menu (the gray bar at the top of the IDE) can be accessed by using
  128. the mouse to select items. If you do not use a mouse, you can use
  129. \textsc{F10} to switch to the menu. Use the arrow keys to navigate
  130. and the \textsc{Enter} key to select items.
  131. To access the menu very fast without leaving the
  132. keyboard with your hands, \textsc{Alt-<highlighted letter>}
  133. can be used, afterwards
  134. menu entries can be selected by pressing also the highlighted letter, but
  135. without \textsc{Alt}. E.g. \textsc{Alt-S G} is a fast way to
  136. display the \emph{goto line dialog}.
  137. Every menu item is explained by a short text in the status bar.
  138. In certain cases, a local menu is available. It can be accessed by pressing
  139. the right mouse button or \textsc{Alt-F10}.
  140. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  141. % Windows
  142. \section{Windows}
  143. In our days, working with windowed applications should be familiar to
  144. most users. Nevertheless, the following section describes how
  145. the windows work in the \fpc IDE to allow an efficient work with it.
  146. \subsection{Basics}
  147. \begin{htmlonly}
  148. A common IDE window looks like:
  149. \htmladdimg{../pics/idewin.gif}
  150. \end{htmlonly}
  151. \begin{latexonly}
  152. Figure \ref{fig:idewin} shows a common IDE edit window.
  153. \begin{figure}
  154. \caption{A common IDE window}
  155. \label{fig:idewin}
  156. \ifpdf
  157. \epsfig{file=pics/idewin.pdf,width=\textwidth}
  158. \else
  159. %%%%%%%%%% !!!!!!!!eps \epsfig{file=pics/idewin.eps,width=\textwidth}
  160. \fi
  161. \end{figure}
  162. \end{latexonly}
  163. The window is surround by the so called \emph{frame}, the whith double
  164. line around the window.
  165. At the top of the window you'll see the title bar, it contains the title
  166. of the window (what else?). To move the window click, on
  167. the title bar and drag the window with the mouse.
  168. If you do not have a mouse, see \ref{ide:keyboardwindow} how
  169. to use the keyboard to work with windows.
  170. At the upper left corner you see the \emph{close icon}. If you click it the
  171. window will be closed, it can be also closed by pressing \textsc{Alt-F3} or
  172. selecting the menu item \var{Window|Close}. All open windows can be closed
  173. by selecting the menu item \var{Window|Close all}.
  174. To resize the window, click on the lower left corner of the window
  175. and drag it (move the mouse while holding the left button pressed).
  176. Keyboard users should look at section \ref{ide:keyboardwindow}.
  177. Not all windows can be resized. This applies, for example, to
  178. \emph{dialog windows} (\ref{ide:dialogwindow}).
  179. At the upper right you'll see a green arrow. Clicking this arrow
  180. zooms the window to the whole desktop. If you click this arrow on
  181. a zoomed window, the old size of the window will be restored. Pressing
  182. the key \textsc{F5} has the same effect as clicking that arrow. Furthermore,
  183. this can be also done by selecting the menu item \var{Window|Zoom}.
  184. Windows which aren't resizeable can't be zoomed, either.
  185. The scrollbars at the right and bottom border can be used to scroll
  186. the window contents with the mouse. Click on the arrows to scroll
  187. line by line and on the dotted area between the arrows and the
  188. cyan-coloured
  189. rectangle to scroll page by page. By dragging the rectangle you can
  190. scroll continously through the window contents.
  191. The star and the numbers in the lower left corner
  192. are explained in the section about the editor, see \ref{ide:editingtext}.
  193. \subsection{Working with multiple windows}
  194. When working with larger projects, you'll have multible windows on your
  195. desktop. An inactive window is identified by a grey frame. You can
  196. activate it by clicking on the window with the mouse. Or you can
  197. step trough all open windows by pressing \textsc{F6}
  198. (menu item \var{Window|Next}).
  199. To activate the last activated window, press \textsc{Shift-F6}
  200. (menu item \var{Window|Previous}).
  201. If the window has a number in the upper
  202. right corner, you can activate it by pressing \textsc{Alt-<number>}.
  203. \textsc{Alt-0} has a special meaning,
  204. it shows a dialog box with all available
  205. windows which allows a quick activation of windows which don't have a
  206. number.
  207. Of course, you can order the windows on the IDE desktop by zooming and
  208. resizing them with the mouse or keyboard. This is particularly difficult
  209. with the keyboard. Instead, you can use the menu items
  210. \var{Window|Tile} and \var{Window|Cascade}. Tile means that the
  211. whole desktop space is divided up evenly between all resizable
  212. windows. \emph{Cascade} brings
  213. all windows in a cascaded position. Just try these commands if you've
  214. multiple windows on the IDE desktop.
  215. In very rare cases the screen of the IDE may be mixed up. In this
  216. case the whole IDE screen can bebe refreshed by selecting
  217. the menu item \var{Window|Refresh display}.
  218. \subsection{Dialog windows}
  219. \label{ide:dialogwindow}
  220. In many cases the IDE displays a dialog window to get user input.
  221. The main difference to other windows is that you can't activate
  222. other windows while a dialog is active. This behavior is called
  223. \emph{modal}. To activate another window, you've to close
  224. a modal window/dialog.
  225. \begin{htmlonly}
  226. A typical dialog window looks like:
  227. \htmladdimg{../pics/idedlg.gif}
  228. \end{htmlonly}
  229. \begin{latexonly}
  230. Figure \ref{fig:idedlg} shows a typical dialog window.
  231. \begin{figure}
  232. \caption{A typical dialog window}
  233. \label{fig:idedlg}
  234. \ifpdf
  235. \epsfig{file=pics/idedlg.pdf,width=\textwidth}
  236. \else
  237. %%%%%%%%%% !!!!!!!!eps \epsfig{file=pics/idedlg.eps,width=\textwidth}
  238. \fi
  239. \end{figure}
  240. \end{latexonly}
  241. %%%!!!!!!!!!!!!!!
  242. \subsection{Moving and zooming windows with the keyboard}
  243. \label{ide:keyboardwindow}
  244. To resize/move a window with the keyboard, go into the size/move mode
  245. by pressing \textsc{Ctrl-F5} or selecting the menu item
  246. \var{Window|Size/Move}. Now the window frame will be green. Using the
  247. cursor keys you can move the window. By pressing shift and the cursor
  248. keys, the window can be resized. The size/move mode can be left by pressing
  249. \textsc{Enter}. In this the window will keep it's size and position.
  250. Alternativly, you can press \textsc{Esc} and the old size will be restored.
  251. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  252. % The help system
  253. \section{The help system}
  254. If you are stuck somewhere while editing files, regarding the syntax
  255. of a pascal statment or the behavior of a subroutine of the runtime
  256. library, you can use the \emph{help system} to get some information. The
  257. help system is called up by pressing F1.
  258. \subsection{Navigating in the help system}
  259. The help system contains hyperlinks which can be accessed by clicking
  260. them with the mouse. Alternativly, \textsc{Tab} and \textsc{Shift-Tab}
  261. can be used to move between the different hyperlinks of a page
  262. and the \textsc{Enter} key can be used to select them.
  263. The contents of the help system is displayed, if you press \textsc{Shift-F1}.
  264. To go back to the last help topic, \textsc{press Alt-F1}. This also works
  265. if the help window isn't displayed on the desktop.
  266. \subsection{Working with help files}
  267. The IDE contains a help system which can display HTML files
  268. as well as the TPH format known from TP. Of course, the HTML
  269. viewer of the help system is limited, so forget about displaying
  270. HTML files which use e.g. CSS \footnote{\textbf{C}ascaded
  271. \textbf{S}tyle \textbf{S}heets, an extension to HTML to
  272. get a similiar look like of a document with all browsers}. It is designed to display the FPC
  273. help files, but feel free to improve it and send us patches...
  274. The menu item \var{Help|Files} permits you to add and delete
  275. help files.
  276. Press the \emph{new button} to add a new file. You'll be asked to enter
  277. the location of the help file. If it is an
  278. HTML file, a dialog box will be displayed
  279. which asks for a title. This title will then be included in the
  280. contents of help.
  281. A help file can be deleted from the help system (it ISN'T deleted from
  282. your hard disk) by pressing the \emph{delete button}.
  283. \subsection{The about dialog}
  284. The \emph{about dialog} (\var{Help|About...}) shows some information
  285. about the IDE, please include versions and dates of this
  286. dialog if you report bugs, have suggestion etc regarding the IDE.
  287. Furthermore, it contains copyright information.
  288. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  289. % Editing text
  290. \section{Editing text}
  291. \label{ide:editingtext}
  292. %%%!!!!!!!!!!!!!!
  293. \subsection{Insertion modes}
  294. %%%!!!!!!!!!!!!!!
  295. \subsection{Setting marks}
  296. The IDE provides a feature which permits you to set a mark at
  297. the current cursor position. Later, you can return to this
  298. position by pressing a keyboard shortcut.
  299. You can set up to 9 marks per source file, they are set by
  300. \textsc{Ctrl-K-<Number>} (where number is the number of the mark).
  301. To go to a previous set mark, press \textsc{Ctrl-Q-<Number}.
  302. \begin{remark}
  303. Currently, the marks aren't stored if the IDE is left. This may
  304. change in future implementations of the IDE.
  305. \end{remark}
  306. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  307. % Searching in the text
  308. \section{Searching in the text}
  309. \label{ide:searching}
  310. \subsection{The symbol browser}
  311. %%%!!!!!!!!!!!!!!
  312. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  313. % Running programs
  314. \section{Running programs}
  315. \label{ide:running}
  316. %%%!!!!!!!!!!!!!!
  317. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  318. % Debugging programs
  319. \section{Debugging programs}
  320. %%%!!!!!!!!!!!!!!
  321. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  322. % The tools menu
  323. \section{The tools menu}
  324. \label{ide:toolsmenu}
  325. The tools menu allows you an easy access to external tools. Further,
  326. it contains two other probaly helpful tools for programmers: an
  327. ascii table and a calculator.
  328. \subsection{The messages window}
  329. The output of the external utilies is redirected by the IDE and it
  330. will be displayed in the message window. The message window is
  331. displayed automatically, if an external tool was run. The
  332. messages window can be also display manual by the selecting the
  333. menu item \var{Tools|Messages} or by pressing the key \textsc{F11}.
  334. If the output of the tools contains filenames and line numbers,
  335. you can goto the source line by pressing \textsc{Enter} or
  336. double clicking the output line. To trace the source, press
  337. \textsc{Space}. The difference between goto and tracking is that
  338. goto closes the message window while tracking keeps the message
  339. window active and the source file is displayed only in the background.
  340. The algorithm which extracts the file names and line numbers from
  341. the tool output is quite sophisticated, but in some cases it may
  342. fail. In this case, please refer the sources of the IDE.
  343. \subsection{GREP}
  344. One external tool in the Tools menu is already predefined: an
  345. menu item to call the \file{grep} utility (\var{Tools|Grep} or
  346. \textsc{Shift-F2}). \file{grep} search for a given string in files and
  347. returns the lines which contain the string. The search string can
  348. be even a regular expression (see \ref{ide:regexpr}).
  349. \subsection{The ascii table}
  350. The tools menu provides also an ascii table (\var{Tools|Ascii table},
  351. it allows you to lookup ascii codes as well as
  352. inserting chars into the window which was active when calling the
  353. ascii chart. To get the ascii code of a char move the blocking block
  354. cursor on this char or click with the mouse on it. To insert a
  355. char into an editor window, double click it with the mouse
  356. or press \textsc{Enter} while the cursor is on it.
  357. \subsection{The calculator}
  358. The calculator allows you to do quickly some calculations. It doesn't
  359. take care of operator precedence, so be careful. For more information
  360. about the supported operations, see table \ref{ide:calculatorcommands}.
  361. \begin{FPCltable}{p{5cm}lll}{Calculator commands}{calculatorcommands}
  362. \label{ide:calculatorcommands}
  363. Operation & Button & Key \\
  364. \hline
  365. Add two numbers & \var{+} & \textsc{+} \\
  366. Subtract two numbers & \var{\-} & \textsc{\-} \\
  367. Multiply two numbers & \var{*} & \textsc{*} \\
  368. Divide two numbers & \var{/} & \textsc{/} \\
  369. Calculate power & \var{x\^y} & \\
  370. Add the displayed number to the memory & \var{M+} & \\
  371. Subtract the displayed number from the memory & \var{M-} & \\
  372. Move the memory contents to the display & \var{M->} & \\
  373. Move the display contents to the memory & \var{M<-} & \\
  374. Exchange display and memory contents & \var{M<->} & \\
  375. Square the display contents & \var{x\^2} & \\
  376. Calculate the reciproke value & \var{1/x} & \\
  377. Calculate the square root & \var{sqr} & \\
  378. Calulate the natural logarithm & \var{log} & \\
  379. Delete the last typed digit & \var{<-} & \textsc{Backspace} \\
  380. Delete the display & \var{C} & \textsc{C} \\
  381. Change the sign & \var{+\-} & \\
  382. Get result of operation & \var{=} & \textsc{Enter} \\
  383. Do per cent calculation & \var{\%} & \textsc{\%}
  384. \end{FPCltable}
  385. \subsection{Adding new tools}
  386. %%%!!!!!!!!!!!!!!
  387. \subsection{Meta parameters}
  388. When specifing the command line for the called tool, meta parameters can
  389. be used. Meta parameters are variables and and they are replaced
  390. by it's contents before passing the command line to the tool.
  391. %%%!!!!!!!!!!!!!!
  392. \begin{description}
  393. \item[\$CAP]
  394. \item[\$CAP\_MSG]
  395. \item[\$CAP\_EDIT]
  396. \item[\$COL] replaced by the coloumn of the cursor in the active window
  397. \item[\$CONFIG]
  398. \item[\$DIR]
  399. \item[\$DRIVE]
  400. \item[\$EDNAME]
  401. \item[\$EXENAME]
  402. \item[\$EXT]
  403. \item[\$LINE] replaced by the line number of the cursor in the active window
  404. \item[\$NAME]
  405. \item[\$NAMEEXT]
  406. \item[\$NOSWAP]
  407. \item[\$DRIVE]
  408. \item[\$PROMPT]
  409. \item[\$SAVE]
  410. \item[\$SAVE\_ALL]
  411. \item[\$SAVE\_CUR]
  412. \item[\$SAVE\_PROMPT]
  413. \item[\$WRITEMSG]
  414. \end{description}
  415. \subsection{Building your own tool command line dialog box}
  416. %%%!!!!!!!!!!!!!!
  417. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  418. % Project management
  419. \section{Project management}
  420. \label{ide:projectmanagement}
  421. Lucily, project mangament in pascal is much easier than with C. The
  422. compiler knows from the source which units, sources etc. it needs.
  423. So the \fpc IDE doesn't need a full features project manager like
  424. some C development environments offer. But some things make life easier...
  425. \subsection{The primary file}
  426. Without a primary file the IDE compiles/runs the source of the actived
  427. window when you start your program. If you have specified a primary
  428. file, the IDE compiles/runs always this source, no matter if another
  429. source window is active. Select the menu item \var{Compile|Primary file...}
  430. to get a file dialog where you can enter the primary file. Only the command
  431. \var{Compile|Compile} compiles still the active window, this is usefull
  432. if you have a large project and you want only check the syntax of the
  433. current source.
  434. The menu item \var{Compiler|Clear primary file} restores the default behavior
  435. i.e. the compile and run commands apply to the active window.
  436. \subsection{The switches mode}
  437. The IDE allows you to work with three different sets of compiler
  438. switches: Normal, Debug and Release. The different switch
  439. sets can be selected in the \var{Switches Mode} dialog which
  440. is executed by the menu item \var{Options|Mode...}.
  441. Change the switches mode doesn't do any active switch change, i.e.
  442. the debug mode doesn't include debug information automatically,
  443. it just loads another set of switches which were adjusted before
  444. by the user in the compiler or directory dialog.
  445. \subsection{The directory dialog}
  446. In the directory dialog, you've to specify the directories where
  447. the compiler should look for units, library etc, where the
  448. output files should be stored etc. You can specify multiple
  449. directories (except for the output directory) seperated by
  450. semicolon.
  451. \begin{description}
  452. %%%!!!!!!!!!!!!!!
  453. \end{description}
  454. \subsection{The target operating system}
  455. The menu item \var{Compile|Target} allows you to specify the target
  456. operating system. Changing the target doesn't affect any compiler
  457. switches or directories.
  458. \subsection{The configuration files}
  459. %%%!!!!!!!!!!!!!!
  460. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  461. % Customize the IDE
  462. \section{Customize the IDE}
  463. The IDE is configurable in a wide range, you can change colors, screen
  464. resolution etc. The configuration setting can reached via the
  465. submenu \var{Environment} in the \var{Options} menu.
  466. \subsection{Preferences}
  467. The \emph{preferences dialog} is called by the menu item
  468. \var{Options|Environment|Preferences}.
  469. %%%!!!!!!!!!!!!!!
  470. \subsubsection{Video modes}
  471. The \emph{drop down list} at the top of the dialog allows you
  472. to select a video mode.
  473. \begin{remark}
  474. You have to select the video mode by pressing space or clicking
  475. on it. If the drop down list is opened while leaving the dialog,
  476. the new video mode will not be applied.
  477. \end{remark}
  478. The available video modes depend on the system on which the IDE
  479. is running.
  480. \begin{remark}
  481. If you're using VESA modes under DOS, the display refresh rate may be
  482. annoying low. On older graphics card (1998 and before),
  483. you can try to use the \emph{UniVBE} driver of \emph{SciTech}. But
  484. it is quite outdated (last update somewhere in 1998). For newer
  485. graphics cards which support VESA 3.0, you can try to get one
  486. of the TSR programs
  487. \footnote{\textbf{T}erminate and \textbf{S}tay \textbf{R}esisdent}
  488. available at the internet to customize the refresh rate.
  489. \footnote{http://www.informatik.fh-muenchen.de/~ifw98223/vbehz.htm}
  490. \end{remark}
  491. \subsection{Editor}
  492. \label{ide:prefeditor}
  493. The \emph{editor dialog} is called by the menu item
  494. \var{Options|Environment|Editor}. This dialog allows you to custumize
  495. the behavior of the editor windows. These options apply only to
  496. newly created editor windows. I.e. the behavior of
  497. windows which are already open doesn't change.
  498. \subsubsection{Editor options}
  499. \begin{description}
  500. \item [Create backup files] Default: On %%!!!!!!!!!!
  501. \item [Insert mode] Default: On %%!!!!!!!!!!
  502. \item [Auto indent mode] Default: On %%!!!!!!!!!!
  503. \item [Use tab characters] %%!!!!!!!!!!
  504. \item [Backspace unindents] Default: On %%!!!!!!!!!!
  505. \item [Persistent blocks] Default: On %%!!!!!!!!!!
  506. \item [Syntax highlight] Default: On %%!!!!!!!!!!
  507. \item [Block insert cursor] %%!!!!!!!!!!
  508. \item [Vertical blocks] %%!!!!!!!!!!
  509. \item [Highlight column] %%!!!!!!!!!!
  510. \item [Highlight row] %%!!!!!!!!!!
  511. \item [Auto-closing brackets] %%!!!!!!!!!!
  512. \item [Keep trailing spaces] %%!!!!!!!!!!
  513. \item [CodeComplete enabled] Default: On %%!!!!!!!!!!
  514. \item [Enable folds]
  515. \end{description}
  516. \subsubsection{Tab size}
  517. The meaning of this value should be obvious. It configures how
  518. much space characters correspond to one tab character.
  519. \subsubsection{Highlight extensions}
  520. The IDE can highlight pascal source files. In this input line
  521. can be specified which files should be highlighted using file
  522. patterns as known from the command line. Multiple patterns can
  523. can be entered if they are seperated by semicolons. The standard
  524. value of this input line is \var{*.pas;*.pp;*.inc}.
  525. \subsubsection{File patterns needing tabs}
  526. Several tools like \file{GNU Make} require that tabs aren't replaced
  527. by spaces. This input line allows you to specify in which files
  528. the tab characters should be always kept. Multiple file patterns
  529. can be entered, if they are seperated by tabs. The standard
  530. value of this input line is \var{make*;make*.*}
  531. \subsection{Mouse}
  532. \label{ide:prefmouse}
  533. The \emph{mouse options dialog} is called by the menu item
  534. \var{Options|Environment|Mouse}. You can use the slider to adjust the
  535. double clock speed. If you're left handed you can exchange the
  536. behavior of the left and right mouse button by checking the checkbox
  537. item \var{Reverse mouse buttons}.
  538. The two lists with the radio buttons allows you
  539. to configure the behavior of the
  540. right mouse button, if it is clicked together while
  541. pressing the \textsc{Ctrl} or
  542. \textsc{Alt} key in an edit window.
  543. The following actions can be assigned to \textsc{Ctrl}-right mouse button or
  544. \textsc{Alt}-right mouse button:
  545. \begin{description}
  546. \item [Topic search] The keyword at the mouse cursor is searched in the
  547. help index
  548. \item [Go to cursor] The program is executed until the line where
  549. the mouse cursor is located
  550. \item [Breakpoint] Set a breakpoint at the mouse cursor position
  551. \item [Evalute] Evaluate the value of the variable at the mouse
  552. cursor
  553. \item [Add watch] Add the variable at the mouse cursor to the
  554. watch window
  555. \item [Browse symbol] The symbol at the mouse cursor is displayed
  556. by the browser
  557. \end{description}
  558. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  559. % Trouble shooting
  560. \section{Trouble shooting}
  561. %%%!!!!!!!!!!!!!!
  562. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  563. % Regular expressions
  564. \section{Regular expressions}
  565. \label{ide:regexpr}
  566. A regular expression is a string with sepcial characters which describes
  567. a whole class of expressions. You may know this from the command line
  568. where can enter a \file{ls *.pas} (or \file{dir *.pas}) to get a list
  569. of all pascal files in a directory. \file{*.pas} is something
  570. similiar to regular expression. It uses a wildcard to describe a whole
  571. class of strings: these which end with "\file{.pas}". The possibilty
  572. of the wildcards in the command line are especially on DOS very limited.
  573. Regular expressions offer much more: for example \file{[A-Z][0-9]+}
  574. describes all strings which begin with a upper case letter followed by
  575. one or more digits (you'll understand this regular expression later).
  576. %%%!!!!!!!!!!
  577. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  578. % Keyboard shortcuts
  579. \section{Keyboard shortcuts}
  580. \label{ide:keyshortcuts}
  581. A lot of keyboard shortcuts used by the IDE are compatible with the
  582. good old WordStar and should be well known to Turbo Pascal users.
  583. \begin{FPCltable}{p{5cm}ll}{General}{shortcutsgeneral}
  584. Command & Key shortcut & Alternative \\
  585. \hline
  586. Help & \textsc{F1} & \\
  587. Goto last help topic & \textsc{Alt-F1} & \\
  588. Search word at cursor position in help & \textsc{Ctrl-F1} & \\
  589. Help index & \textsc{Shift-F1} & \\
  590. Close active window & \textsc{Alt-F3} & \\
  591. Zomm/Unzoom window & \textsc{F5} & \\
  592. Move/Zoom active window & \textsc{Ctrl-F5} & \\
  593. Switch to next window & \textsc{F6} & \\
  594. Switch to last window & \textsc{Shift-F6} & \\
  595. Menu & \textsc{F10} & \\
  596. Local menu & \textsc{Alt-F10} & \\
  597. List of windows & \textsc{Alt-0} & \\
  598. Active another window & \textsc{Alt-<digit>} & \\
  599. Call \var{GREP} utility & \textsc{Shift-F2} & \\
  600. Exit IDE & \textsc{Alt-X} & \\
  601. \end{FPCltable}
  602. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  603. \begin{FPCltable}{p{5cm}ll}{Compiler}{shortcutscompiler}
  604. Command & Key shortcut & Alternative \\
  605. \hline
  606. Reset debugger/program & \textsc{Ctrl-F2} & \\
  607. Display call stack & \textsc{Ctrl-F3} & \\
  608. Run til cursor & \textsc{F4} & \\
  609. Switch to user screen & \textsc{Alt-F5} & \\
  610. Trace into & \textsc{F7} & \\
  611. Add watch & \textsc{Ctrl-F7} & \\
  612. Step over & \textsc{F8} & \\
  613. Set breakpoint at current line & \textsc{Ctrl-F8} & \\
  614. Make & \textsc{F9} & \\
  615. Run & \textsc{Ctrl-F9} & \\
  616. Compile the active source file & \textsc{Alt-F9} & \\
  617. Message & \textsc{F11} & \\
  618. Compiler messages & \textsc{F12} & \\
  619. \end{FPCltable}
  620. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  621. \begin{FPCltable}{p{5cm}ll}{Text navigation}{shortcutstextnavigation}
  622. Command & Key shortcut & Alternative \\
  623. \hline
  624. Char left & \textsc{Arrow left} & \textsc{Ctrl-S} \\
  625. Char right & \textsc{Arrow right} & \textsc{Ctrl-D} \\
  626. Line up & \textsc{Arrow up} & \textsc{Ctrl-E} \\
  627. Line down & \textsc{Arrow down} & \textsc{Ctrl-X} \\
  628. Word left & \textsc{Ctrl-Arrow left} & \textsc{Ctrl-A} \\
  629. Word right & \textsc{Ctrl-Arror right} & \textsc{Ctrl-F} \\
  630. Scroll one line up & \textsc{Ctrl-W} & \\
  631. Scroll one line down & \textsc{Ctrl-Z} & \\
  632. Page up & \textsc{PageUp} & \textsc{Ctrl-R} \\
  633. Page down & \textsc{PageDown} & \\
  634. Beginning of Line & \textsc{Pos1} & \textsc{Ctrl-Q-S} \\
  635. End of Line & \textsc{End} & \textsc{Ctrl-Q-D} \\
  636. First line of window & \textsc{Ctrl-Pos1} & \textsc{Ctrl-Q-E} \\
  637. Last line of window & \textsc{Ctrl-End} & \textsc{Ctrl-Q-X} \\
  638. First line of file & \textsc{Ctrl-PageUp} & \textsc{Ctrl-Q-R} \\
  639. Last line of file & \textsc{Ctrl-PageDown} & \textsc{Ctrl-Q-C} \\
  640. Last cursor position & \textsc{Ctrl-Q-P} & \\
  641. \end{FPCltable}
  642. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  643. \begin{FPCltable}{p{5cm}ll}{Edit}{shortcutsedit}
  644. Command & Key shortcut & Alternative \\
  645. \hline
  646. Delete char & \textsc{Del} & \textsc{Ctrl-G} \\
  647. Delete left char & \textsc{Backspace} & \textsc{Ctrl-H} \\
  648. Delete line & \textsc{Ctrl-Y} & \\
  649. Delete til end of line & \textsc{Ctrl-Q-Y} & \\
  650. Delete word & \textsc{Ctrl-T} & \\
  651. Insert line & \textsc{Ctrl-N} & \\
  652. Toggle insert mode & \textsc{Insert} & \textsc{Ctrl-V} \\
  653. \end{FPCltable}
  654. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  655. \begin{FPCltable}{p{5cm}ll}{Block commands}{shortcutsblockcommands}
  656. Command & Key shortcut & Alternative \\
  657. \hline
  658. Goto Beginning of selected text & \textsc{Ctrl-Q-B} & \\
  659. Goto end of selected text & \textsc{Ctrl-Q-K} & \\
  660. Select current line & \textsc{Ctrl-K-L} & \\
  661. Print selected text & \textsc{Ctrl-K-P} & \\
  662. Select current word & \textsc{Ctrl-K-T} & \\
  663. Delete selected text & \textsc{Ctrl-Del} & \textsc{Ctrl-K-Y} \\
  664. Copy selected text to cursor position & \textsc{Ctrl-K-C} & \\
  665. Move selected text to cursor position & \textsc{Ctrl-K-V} & \\
  666. Copy selected text to clipboard & \textsc{Ctrl-Ins} & \\
  667. Move selected text to the clipboard & \textsc{Shift-Del} & \\
  668. Indent block one coloumn & \textsc{Ctrl-K-I} & \\
  669. Unindent block one coloumn & \textsc{Ctrl-K-U} & \\
  670. Insert text from clipboard & \textsc{Shift-Insert} & \\
  671. Insert file & \textsc{Ctrl-K-R} & \\
  672. Write selected text to file & \textsc{Ctrl-K-W} & \\
  673. \end{FPCltable}
  674. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  675. \begin{FPCltable}{p{5cm}ll}{Change selection}{changeselection}
  676. Command & Key shortcut & Alternative \\
  677. \hline
  678. Mark beginning of selected text & \textsc{Ctrl-K-B} & \\
  679. Mark end of selected text& \textsc{Ctrl-K-K} & \\
  680. Remove selection & \textsc{Ctrl-K-H} & \\
  681. Extend selection one char to the left & \textsc{Shift-Arrow left} & \\
  682. Extend selection one char to the right & \textsc{Shift-Arrow right} & \\
  683. Extend selection to the beginning of the line & \textsc{Shift-Pos1} & \\
  684. Extend selection to the end of the line & \textsc{Shift-End} & \\
  685. Extend selection to the same coloumn in the last row & \textsc{Shift-Arrow up} & \\
  686. Extend selection to the same coloumn in the next row & \textsc{Shift-Arrow down} & \\
  687. Extend selection to the end of the line & \textsc{Shift-End} & \\
  688. Extend selection one word to the left & \textsc{Ctrl-Shift-Arrow left} & \\
  689. Extend selection one word to the right & \textsc{Ctrl-Shift-Arrow right} & \\
  690. Extend selection one page up & \textsc{Shift-PageUp} & \\
  691. Extend selection one page down & \textsc{Shift-PageDown} & \\
  692. Extend selection to the beginning of the file & \textsc{Ctrl-Shift-Pos1} &
  693. \textsc{Ctrl-Shift-PageUp} \\
  694. Extend selection to the end of the file & \textsc{Ctrl-Shift-End} &
  695. \textsc{Ctrl-Shift-PageUp} \\
  696. \end{FPCltable}
  697. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  698. \begin{FPCltable}{p{5cm}ll}{Misc. commands}{shortcutsmisccommands}
  699. Command & Key shortcut & Alternative \\
  700. \hline
  701. Save file & \textsc{F2} & \textsc{Ctrl-K-S} \\
  702. Open file & \textsc{F3} & \\
  703. Search & \textsc{Ctrl-Q-F} & \\
  704. Search again & \textsc{Ctrl-L}\ & \\
  705. Search and replace & \textsc{Ctrl-Q-A} & \\
  706. Set mark & \textsc{Ctrl-K-n} (where n can be 0..9) & \\
  707. Goto mark & \textsc{Ctrl-Q-n} (where n can be 0..9) & \\
  708. Undo & \textsc{Alt-Backspace} & \\
  709. \end{FPCltable}
  710. %
  711. % $Log$
  712. % Revision 1.2 2000-11-09 20:40:13 florian
  713. % + Editor options dialog documented
  714. %
  715. % Revision 1.1 2000/07/13 09:10:04 michael
  716. % + Initial import
  717. %
  718. % Revision 1.5 2000/03/04 07:47:28 florian
  719. % * some corrections and some new stuff
  720. %
  721. % Revision 1.4 2000/03/01 15:39:40 florian
  722. % * some new stuff
  723. %
  724. % Revision 1.3 2000/02/28 17:45:40 florian
  725. % * a lot of new stuff
  726. %