User:FunkyFish/wip/Documentation/User interface

From CenterIM

Jump to: navigation, search

Contents

User interface

The text UI CenterIM has, as well as UI of other programs for console I have written, is very simple. There are menus, windows, menus and input lines. In the bottom line of the screen there is a status bar. It usually contains hints about what to press to invoke various menus, dialogs, and perform various actions.


The ESC key

This key is used for termination of input, if you wanna cancel the operation you wanted to perform. Say, if "send message" operation is chosen (invoked just with a press of "Enter" on a contact), an editor window appears. As status bar says, you can use "Ctrl-X" to send it, and ESC to cancel. The only hint is that you have to press the ESC key twice. It's a common practice for console based UNIX programs (Midnight commander is a good example), because checking for only one ESC would spoil arrow key processing. The point is that they have correspond sequences that start with an ASCII#27 character which is actually ESC.

If you still want to press a simple key combination to close a dialog or cancel something, try Alt-ESC. Though it's not guaranteed to work on all terminals.

The ESC key can also help you to issue shortcuts and key combinations such as Alt-? or F<x>. The former, if Alt-Shift-/ doesn't work can be produced by first pressing ESC and then Shift-/ (i.e. "?"). And instead of any F-key the ESC and then a number can be used.


The main screen

The main screen of CenterIM consists of three parts. First is contact list which is situated to the left. Next is information window which is used to show received events, users' details, and also to edit events that are going to be sent. And the smallest one is a log window in which you can see messages about what CenterIM is doing right now.


Menus

No need to say, menus are a common way to provide a user with an ability to select one (or several) items from a certain list. To make a difference between single and multiple choice menu you gotta just have a look at the items. If square brackets stand next to items text in every line, a multiple selection is requested. Otherwise you can only select one item. To do it, just press "Enter" on it. To make a multiple selection, press "Space" on items and use "Enter" to finish the selection. ESC does also work in all menus to cancel the selection.

I will mention two menus below. They are global menu and contact context menu, invoked with F4 and F2 correspondingly. The former allows to execute various actions of global kind, such as find and add users, manage ignore, visible and invisible lists, change settings, etc. With the context menu you can do various current contact specific things.


Dialogs

Every dialog in CenterIM has a tree-like view. When I was about to write classes for form-based input, I remembered that there was a "treeview" class written by me before. So, I decided to use it for dialogs and was right. There was no need to re-design the whole form in case I need to add some controls, or so. I just add it as a node or a leaf it scrolls, and nothing gets spoiled. Everything really nice is always simple :)


Hotkeys in dialogs

Dialogs of CenterIM usually have a bar with buttons. To access a button without moving the highlighted bar over it with the arrow keys you can use shortcuts. It's enough to press the first capital letter of a button name to access the function behind it.


Some UI tips

There at some quite standard key combinations supported by CenterIM I wanna tell you about. Here they go.

Ctrl-L
Redraws the screen in any place of program execution. If output of some kind of background programs or system messages spoil your screen just press it so CenterIM display is refreshed.
Ctrl-Y
In a message writing mode removes entire current line.
Ctrl-K
Single line edit mode.
Kills entire content.
Ctrl-U
Single line edit mode.
Kills a part of line to the left from cursor.
Alt-H
Single line edit mode.
Invokes history of recently entered lines.