Menu Options

Keyboard

Because of the variety of graphical characters (letters) which the Unicode tables allow, it is necessary for the user to have a means for keyboard input. Unfortunately, in most cases either the keys on the keyboard are not enough or the already defined keyboards are not suitable.

In these cases the CLaRK System suggests the following solution. The user can define his/her own keyboard maps, i.e. for each key on the keyboard a different character can be attached. There are 94 keys available for mapping. For identification of each key, its ASCII character is used (which coincides with the beginning of the Unicode (UTF- 16)). It is a default for the specific machine architecture. The keyboard maps themselves are represented as sets of pairs. Each pair is responsible for one key. It has two elements: the default character and the code of the new attached character from the Unicode table. And when a newly defined keyboard is activated and any key is pressed, its character is searched for in the set of char-code pairs. If there is such a pair found, then the second element is taken and according to it a new character is retrieved from the Unicode table and is visualized on the screen. If there is no such a pair, then the same character appears on the screen.

When the system is running there are always two active keyboards. One which is fixed and which can not be modified (the hardware system keyboard) and one auxiliary. The second one can be defined by the user. The two keyboards can be switched alternatively by the key combination <Ctrl>+<Left Shift>. There is also an indicator on the toolbar, which shows the currently used keyboard. If the indicator is red colored and the sign is Aux, this means that the auxiliary one is in use. Otherwise it is green colored with a sigh Lat. A switch can be performed also by clicking on the indicator.

Defining a new user keyboard

When this item is selected the Keyboard Manager window appears. The initial view of the manager is:

Picture (702054 bytes)

The manager dialog window contains three subparts: Keyboard Preview, Unicode Table Preview and Control Panel.

Keyboard Preview

This is the table on the left side of the window (with the white background). It shows the current state of the auxiliary keyboard. Each row in it represents a pair from the keyboard map. The first column contains the characters of the hardware default keyboard. It is not editable. The second column contains the codes of the new attached characters. In the picture above the selection is set to a row with a character F. The character code attached to it is 1060, which means that when the user presses <Shift>+<F> on the screen will not appear capital F, but the character corresponding to this code.

Just under the table there is a Char preview which shows the new character for the key of the selected row. And by moving the selection the user can observe the whole keyboard character by character.

In the second column the user enters the codes of the desired characters. After entering a code, <Enter> is expected.

The question is how the user will know the code of the expected character. The answer comes from the second component - Unicode Table Preview. This is the table with the blue background on the picture. It contains the characters of the Unicode table available for the current font. The font is the same as this of the text area of the system. If the character, expected by the user is not in the table, he/she must change the font of the text area from Options/Fonts.

The first row and column contain numbers which are used for calculating the code of each character. The calculation is very simple. When we find the character in the table, we take the number from the cell, which is in the same row in the first column and add it to the number in the cell at the same column (with the character) in the first row. The result is the new character code.

Example: How do we get the number 1060 for the character in the Char preview? First, we find the location of the character in the Unicode Table Preview. In the picture above it is in the second column and in the 11th row. The number in the same row in the first column is 1060. The number in the same column in the first row is 0. So the final sum is 1060.

Navigation on the Unicode table can be done by using the two buttons: Page Up and Page Down situated on the right side next to the table. The small rectangle in some of the table cells means that for this code, there is no support by the current font.

As it has been seen, constructing a new keyboard is not easy. The interface is not very convenient and in future it will be developed. By now it is clear that constructing a keyboard each time the system is started is impossible. Therefore the system supports a mechanism for saving and loading keyboards. And when the user constructs his/her keyboard map, it can be used repeatedly later. This can be done by using the Control Panel, which is situated just above the Unicode Preview Table. It contains 6 buttons:

Fonts

This dialog window suggests a tool for changing the system fonts of several key components of the system. This tool concerns only the graphical interface. The reason is that the CLaRK System uses Unicode char encoding which allows the usage of a great range of different characters from different alphabets. Unfortunately, not every font supports the whole character table. In general, fonts are defined for a specific use and support 2 or 3 different alphabets. This manager allows changing the fonts of the components independently. The components for which the font can be changed are:

The dialog window:

The dialog contains 5 sections as follows:

Note: if the text in the font preview does not change when a new style is chosen, it means that the font does not support this style.

Visuals

This option can be used for changing the colors of the tags and the text in the text areas. The available colors are all the colors supported by the specific hardware and software environment where the system is used. The color selection is supplied by a standard color chooser (computer architecture dependant).
Here is the dialog which appears after choosing the "Visuals" option:

The two buttons on the top of the window are responsible for the colors, as follows: the left one for the tags color (on the picture in blue) and the right one - for the text color (on the picture in red). By pressing each of them a color chooser appears. If a new color is chosen, after closing the chooser, the background of the corresponding button is changed to the new selection. Otherwise it remains the same.

By using the two buttons in the bottom of the window, the user can apply the changes to all opened document views in the system. The changes (if any) are saved in the system settings and they will be used in later system usage.

Encoding Correction

This option can be used when the user works with files which use ASCII character encoding. It is used for correct mapping between ASCII and Unicode character encodings. Because of the limitations in size of the ASCII format and the need of using different symbols, there are many character-sets which use one and the same code ranges. The problem here is how to distinguish which character-set should be used for a certain ASCII file. Unfortunately, very often such information is not available and the system can make a wrong decision when reading a file. For example, the user expects to read a file containing a hebrew text but the system decides that it is a cyrillic text and interprets it in a wrong way in Unicode. So the user is needed to specify which character-set the system must use. That is the place where the Char Encoding Corrector can be used. Here is a screen-shot of the dialog window:

The choice list at the top of the window contains all the character-sets supported by the CLaRK System. For the moment the system supports 8 standard character-sets:

  1. Cyrillic (1251)
  2. Latin 1 (1250)
  3. Latin 2 (1252)
  4. Latin 5 (1254)
  5. Greek (1253)
  6. Hebrew (1255)
  7. Baltic (1257)
  8. Arabic (1256)

The table in the center represents a preview of the currently selected character-set. The table contains symbols with codes in the range from 128 to 255. The changing of the selected character-set refreshes the content of the table. If the user is not sure which character-set must be used, s/he can choose the first option from the list: (System Default). This will make the system to use the default character-set of the specific computer architecture and operating system.

The new selected character-set can be applied by using button Apply or rejected with button Cancel. If a new character-set is applied it will be taken into consideration each time an ASCII file is opened, like importing/exporting documents, compiling DTDs, etc.


Toolbar

Visualizes and hides the toolbar from the main system window.

Add Default Attributes On Loading

For each element in an XML document, a set of default attributes can be defined in the DTD. These are attributes which do not present in the elements expicitly, but it is assumed that they are there with a default value set in the DTD. If this option is selected, each time a document is opened, for every element in it in which a default attribute is absent it is explicitly added with its default value.

Show Current Node Path

Enables/disables the showing of the node path of the currently selected node in the tree. This node path is displayed in tha status bar in the bottom of the editor. The node path is a valid XPath expression in an abbreviated syntax. It can be selected in the status bar, copied and pasted wherever it is needed.

Simple Tags

An icon on the toolbar

Shows and hides the tags in the text area. If tha tags are hidden in the area, on their place square brackets are placed: [ - for the opening tags and ] - for the closing tags. If the showing of attributes in the area is activated and the tags are hidden, attributes are not visible at all.

Show Attributes In Area

An icon on the toolbar

Enables/disables the showing of the attributes in the text areas. If the attributes are shown in the area, they are not editable, that is, they can not be removed, added or modified. Attribute management is supported by using a right mouse click on the table below the tree panel of the editor.