12.12.2012 Views

Teach Yourself Borland C++ in 14 Days - portal

Teach Yourself Borland C++ in 14 Days - portal

Teach Yourself Borland C++ in 14 Days - portal

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

More on Projects<br />

f<strong>in</strong>d a match<strong>in</strong>g brace, place the cursor before a brace (it doesn’t matter if it’s the open<strong>in</strong>g or<br />

clos<strong>in</strong>g brace). Now press Ctrl+[ on the keyboard. The cursor jumps to the brace that matches<br />

the brace you started on. Press Ctrl+[ aga<strong>in</strong>, and the cursor jumps back to where you started.<br />

Gett<strong>in</strong>g lost <strong>in</strong> the maze of braces <strong>in</strong> a long series of if statements is still a possibility, but at<br />

least now you know how to f<strong>in</strong>d your way out aga<strong>in</strong>.<br />

The Code Editor Speed Menu<br />

Like most of the different w<strong>in</strong>dows you encounter <strong>in</strong> <strong>C++</strong>Builder, the Code Editor has its<br />

own speed menu. The Code Editor speed menu can essentially be broken down <strong>in</strong>to two<br />

parts: editor items and debugger items. I will leave the debugger items of the speed menu for<br />

tomorrow when I discuss debugg<strong>in</strong>g, but I’ll go over the editor items on the speed menu now.<br />

Table 10.2 conta<strong>in</strong>s a list of the speed menu items that perta<strong>in</strong> to the editor, along with a<br />

description of each.<br />

Table 10.2. The Code Editor speed menu items.<br />

Item Description<br />

Swap Cpp/Hdr Files If the header file correspond<strong>in</strong>g to the current source<br />

file is not opened <strong>in</strong> the Code Editor, choos<strong>in</strong>g this<br />

menu item opens the header file, creates a new tab for<br />

it, and changes focus to that w<strong>in</strong>dow. Choos<strong>in</strong>g this<br />

option when both the .cpp and .h files are open<br />

switches focus back and forth between the two files.<br />

Close Page Closes the active page <strong>in</strong> the edit w<strong>in</strong>dow. If the file on<br />

the page has been modified s<strong>in</strong>ce it was last saved, you<br />

will be prompted to save the file.<br />

Open File At Cursor Opens the file under the cursor. This option has an<br />

effect only when the text under the cursor represents a<br />

source code file. For example, if you had a header<br />

<strong>in</strong>cluded with #<strong>in</strong>clude “myclass.h”, you could place<br />

the cursor over the filename and choose this menu item<br />

to open the file. The file will be placed <strong>in</strong> a new editor<br />

w<strong>in</strong>dow, and focus will be set to the w<strong>in</strong>dow.<br />

New Edit W<strong>in</strong>dow Opens a new copy of the Code Editor. This is convenient<br />

if you want to compare two source files side-byside.<br />

383<br />

cont<strong>in</strong>ues<br />

10

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!