cursorwindow.h File Reference

This file defines the class, CursorWindow, which provides an interface to curses style windows -- including sub-windows, called CursorWindow::viewport's. The viewports form a mechanism for writing text windowing applications. Before directly using any of the classes in this file, you should consider reading text_windows. More...

#include <string>
#include <vector>
#include <string.h>
#include <list>
#include <map>
#include <cxxtls/streamable.h>
#include <memory>
Include dependency graph for cursorwindow.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  CursorWindow
 Before directly using this class, you should consider reading text_windows. More...
class  Dialog
 A Dialog is a list of fields which which will be displayed in a viewport and the user can edit them. Users of a Dialog initalize the list of fields, each of which must be a Dialog::Element. They then let the user edit the fields. After editing is complete, the caller iterates over the fields to see what changed. More...
class  Element
 An input element in a Dialog. This is an abstract base class from which you can derive -- although there are some builtins (Ok,string, etc). The popup() function will handle some keys and some will be sent to the element's handle_key method. The draw() method may be invoked multiples times within the popup() function call. More...
class  Ok
 A dialog element that does nothing -- you typically use this as the last element of dialog so that the user has one last chance after entering data in the last real field to edit his work. It has not input semantics -- except wasting time. More...
class  Password
 Same as String, except that the user never gets to see what he has typed in. More...
class  String
 A String is a dialog element that prompts the user for a character string -- providing a default value. Normal keyboard editing keys are active. The 'tab' key has special interpretation. It completes the string under the cursor. That is, if you press the tab key, the string under the cursor is treated as a partial file name fragment and you are presented with the valid completions for your selection. If there is only one valid selection, it is chosen for you automatically. More...
class  FileSelector
struct  input_event
 An input_event is _any_ kind of input from the user, including keys, screen resizes, etc. If NoKey is the type, then the event should be ignored. More...
class  Message
 A Message object is a simpler version of a Dialog. It does not allow the user to make any selections -- it just presents the user with a scrolloing list of lines of test. When the user presses enter, the message goes away. More...
struct  resize_handler
 A resize_handler gets invoked if the user resizes the window. But only if you have specified the resize handler to use by calling the set_resize_handler() method. If you don't make such a call, the window size change event will be reported by the read_input() function. If you do make the setting, you will not receive any ResizeKey events. If you are using viewports, the resize_handler's job is mainly to enforce your viewport resize policy. That is, you use this function to scale the viewports after a resize. If you are not using viewports, this function's job will be to repaint the window correctly. If you are using viewports, the resizing event will automatically invoke their repaint methods after first invoking your resize_handler. See the file lib/cursorwindow.c and look for function resize_viewports() to see what a resize_handler has to do. Note that you can't use that code directly. If you are using a resize_handler of your own construction, you should maintain your own list of viewports over which can iterate. More...
struct  row_col
 A pair of integers representing a row and a column. More...
class  Selection
 A Selection object is a simpler version of a Dialog. It presents the user with a list of strings of which he/she is allowed to select exactly one -- or press the escape key to abort. To use a Selection object, do the following: More...
class  viewport
 Before directly using this class, you should consider reading text_windows. More...
struct  repaint_handler
 Derive from repaint_handler to implement your repaint object which will be invoked whenever there is a resize event or if some other viewport is created or deleted or activated. Your repaint handler is expected to ask for the viewports size and completely repaint this region. The cmd passed to your repaint handler is one of the cmd_constant enum values. More...

Namespaces

namespace  cxxtls
 

The namespace that encapsulates most of the functionality in the CXX toolkit.



Detailed Description

This file defines the class, CursorWindow, which provides an interface to curses style windows -- including sub-windows, called CursorWindow::viewport's. The viewports form a mechanism for writing text windowing applications. Before directly using any of the classes in this file, you should consider reading text_windows.

OK, so this is going out of style, but this particular implementation should at least eliminate the problems with function key incompatibilities and problems using rsh to remotely launch curses applications. It tries anyway.

Definition in file cursorwindow.h.

Generated on Wed Feb 29 22:51:04 2012 for CXXUtilities by  doxygen 1.6.3