This simple but useful panel plugin displays a list of ASCII values and characters for a selected font. It is similar to the ASCII Chart plug-in for CodeRush 3 but it provides additional functionality, such as the ability to view ASCII codes in octal, decimal, or hexadecimal representations.
Displays a table of ASCII codes and their associated character values for a specified font.
Supports viewing ASCII codes in either decimal, octal, or hexadecimal notation.
Allows copying a selected ASCII code value to the clipboard in either binary, octal, decimal, or hexadecimal notation.
Allows copying a selected ASCII character value to the clipboard.
Allows copying the selected font name to the clipboard.
The ASCII Reference chart is a Panel plug-in. As such, it is automatically registered in the Panels submenu beneath the CodeRush main menu item, please see the screenshot below:
When invoked, the ASCII Reference chart appears as shown in the screenshot at the top. The panel consists of three primary sections, a toolbar for customizing the appearance of the chart, a central grid to display the ASCII values, and a font preview window / status bar for further ASCII value details. Each is described in further detail below:
The ASCII Display Grid is the heart of this plug-in. The grid consists of 128 cells, with each cell containing a single ASCII value. In addition to the numeric ASCII code, each cell displays the character representation of the ASCII value. For the low, "unprintable" device control characters, a description of the value appears; so for instance, in the cell for ASCII value 7 (the Bell), the code BEL appears. For the high, "printable" characters, CodeRush displays the ASCII characters using the font as specified in the Toolbar.
A sample of the grid appears below:
Overall, the grid presents ASCII codes divided into two sections, the lower-bound numbers (0-127) and the higher-bound numbers (128-255). By default, the ASCII Reference chart displays the lower bound values. The user is able to toggle the Low/High display by using buttons on the Toolbar, as described below.
As the cursor moves over the individual cells, the reference panes of the status bar are updated to report detailed information about the selected cell's ASCII value.
Display either the lower or upper bound ASCII values in the display grid. This is done using the Down and Up Arrow buttons. The Down Arrow toggles the view to the lower 128 characters, the Up Arrow toggles the display to show the upper 128 characters.
Display numeric ASCII codes in the grid in either Decimal, Octal, or Hexadecimal notation. This is handled with the D, O, and H keys, respectively.
Change the font used to generate the ASCII character display. This font selection is done using the Font Selection combo box. This control will contain all fonts registered on your workstation. When the ASCII Reference chart plug-in appears, it defaults to the font currently being used in the Delphi IDE. Changing the font in this control immediately redraws the display grid, showing you exactly what the new font's ASCII characters look like for each ASCII code. So, for instance, if you were looking at ASCII code #38 in Tahoma you would see an ASCII character value of "&"; however, if you changed the font to WingDings the new ASCII character value would appear as "&".
Change the font type and size used for the font preview window. This is handled by using two controls; the Font Selection combo box, as mentioned above, and the Font Size spin control. As the font type and/or font size are changed, the Font Preview window is updated accordingly. So, for example, if the Font Preview window shows "Developer Express" when viewed under 10pt Tahoma font, it will look like "Developer Express" if changed to 12pt WingDings font.
Restore any changes made to the active font type and size back to the Delphi editor defaults
Preview Window / Status Bar
The Preview Window simply exists to give you an idea of what alterations to the specified font can have on your sample text. If you are working on a project and want to select an alternate font for use in some output, it may be handy to enter your sample output into the Preview Window and cycle through the available fonts until you find one you like.
The contents of the Preview Window can be changed very easily. By simply double-clicking anywhere within the Preview pane, you can invoke the Font Preview Window Editor. This editor can also be invoked from a popup menu, which will be discussed later. The editor is shown below:
The currently displayed text from the Preview Window is defaulted in the edit window. From here, you can change the text to anything you wish. For example, if you wish to change the text to "CodeRush ROCKS!", you would call up the Editor and replace the text as follows:
Clicking the OK button causes the text in the Font Preview Window to be updated, as shown below:
Note that although the text keyed into this edit box appears in MS Sans Serif typeface, it will be displayed in your chosen font when it appears in the Font Preview Window.
Notice the button labeled Default on the Editor window. This button allows you to quickly and easily restore the plug-in's default preview text "Sample Text".
The Status Bar is more directly ASCII code related. It exists as an informational tool to give details about the selected ASCII character. It is made up of three panes.
Reference Type. ASCII code values fall into one of three classifications, 'Device Control', 'Printable', and 'Extended'. Device Control characters are the characters between #0 and #31, as well as #127. Characters between #32 and #126 are known as the Printable characters. These are the standard keys on your keyboard. All characters above #127 are known as the Extended characters and tend to include special graphics and symbols, like Copyright and Registered Trademark characters. As the cursor passes over an ASCII code, its Reference Type will appear in the first pane.
Display Mode. This pane will show one of three values, "D", "O", or "H" depending upon the display mode being used in the Display Grid. D appears for Decimal, O for Octal, and H for Hexadecimal.
Reference Description. This pane will remain empty for all characters above ASCII #31; that is, for all printable characters. For the non-printable Device Control characters, a description of the current ASCII code appears. So, for instance, if the cursor is over the cell containing the ASCII value CR the third pane of the status bar will display Carriage Return.
Interacting With Delphi
Finally, the plug-in includes a context menu to allow you to interact with the environment. The menu appears below:
There are numerous options for copying information to the clipboard. You have the ability to:
Copy the name of the active font in the ASCII Reference plug-in.
Copy either the Binary, Decimal, Octal, or Hexadecimal representation of the ASCII code under the cursor. So, for example, if you are on the SpaceBar character (#32), you can send any of the following values to the clipboard; "00100000" (Binary ), "32" (Decimal), "40" (Octal), "20" (Hexadecimal).
Copy the character value of the selected ASCII code. Note that when this is pasted, this character will appear as the corresponding value in the destination editor's selected font.
Update the Font Preview Window text, as described above.
Restore any font settings changes back to the defaults as read from the Delphi IDE settings.
If you paste a character (e.g. a WingDing) into Delphi, the character displayed in Delphi will be painted using the Font active in the IDE.
This plug-in is not the property of Developer Express; it is the sole property of its author. As such, Developer Express cannot be held liable for any incidental damages that may be related to the usage of this plug-in.