Test commit from within Eclipse
[nikiroo-utils.git] / README.md
... / ...
CommitLineData
1Jexer - Java Text User Interface library
2========================================
3
4WARNING: THIS IS ALPHA CODE! PLEASE CONSIDER FILING BUGS AS YOU
5ENCOUNTER THEM.
6
7This library is intended to implement a text-based windowing system
8loosely reminiscient of Borland's [Turbo
9Vision](http://en.wikipedia.org/wiki/Turbo_Vision) library. For those
10wishing to use the actual C++ Turbo Vision library, see [Sergio
11Sigala's updated version](http://tvision.sourceforge.net/) that runs
12on many more platforms.
13
14Two backends are available:
15
16* System.in/out to a command-line ECMA-48 / ANSI X3.64 type terminal
17 (tested on Linux + xterm). I/O is handled through terminal escape
18 sequences generated by the library itself: ncurses is not required
19 or linked to. xterm mouse tracking using UTF8 coordinates is
20 supported. For the demo application, this is the default backend on
21 non-Windows platforms.
22
23* Java Swing UI. This backend can be selected by setting
24 jexer.Swing=true. The default window size for Swing is 132x40,
25 which is set in jexer.session.SwingSession. For the demo
26 application, this is the default backend on Windows platforms.
27
28The demo application showing the existing UI controls is available via
29'java -jar jexer.jar' or 'java -Djexer.Swing=true -jar jexer.jar' .
30
31Additional backends can be created by subclassing
32jexer.backend.Backend and passing it into the TApplication
33constructor.
34
35
36
37License
38-------
39
40This project is licensed LGPL ("GNU Lesser General Public License",
41sometimes called the "Library GPL") version 3 or greater. You may
42freely use Jexer in both closed source (proprietary) and open source
43applications, however any changes you make to the Jexer code must be
44made available to your users.
45
46See the file LICENSE for the full license text, which includes both
47the GPL v3 and the LGPL supplemental terms.
48
49
50
51Acknowledgements
52----------------
53
54Jexer makes use of the Terminus TrueType font [made available
55here](http://files.ax86.net/terminus-ttf/) .
56
57
58
59Usage
60-----
61
62Usage patterns are still being worked on, but in general the goal will
63be to build applications as follows:
64
65```Java
66import jexer.*;
67
68public class MyApplication extends TApplication {
69
70 public MyApplication() {
71 super(BackendType.SWING); // Could also use BackendType.XTERM
72
73 // Create standard menus for File and Window
74 addFileMenu();
75 addWindowMenu();
76 }
77
78 public static void main(String [] args) {
79 MyApplication app = new MyApplication();
80 (new Thread(app)).start();
81 }
82}
83```
84
85See the file demos/Demo1.java for detailed examples.
86
87
88
89Known Issues / Arbitrary Decisions
90----------------------------------
91
92Some arbitrary design decisions had to be made when either the
93obviously expected behavior did not happen or when a specification was
94ambiguous. This section describes such issues.
95
96 TTerminalWindow
97 ---------------
98
99 - TTerminalWindow will hang on input from the remote if the
100 TApplication is exited before the TTerminalWindow's process has
101 closed on its own. This is due to a Java limitation/interaction
102 between blocking reads (which is necessary to get UTF8 translation
103 correct) and file streams.
104
105 - See jexer.tterminal.ECMA48 for more specifics of terminal
106 emulation limitations.
107
108 - TTerminalWindow uses cmd.exe on Windows. Output will not be seen
109 until enter is pressed, due to cmd.exe's use of line-oriented
110 input (see the ENABLE_LINE_INPUT flag for GetConsoleMode() and
111 SetConsoleMode()).
112
113 ECMA48 Backend
114 --------------
115
116 - Mouse support for BackendType.ECMA48/XTERM currently requires UTF-8
117 coordinates (1005 mode). Terminals that support UTF-8 mouse coordinates
118 include xterm, rxvt-unicode, gnome-terminal, and konsole. Due to Java's
119 InputStreamReader requirement of a valid UTF-8 stream, one must assume
120 the terminal will always generate correct UTF-8 bytes. Mode 1006 (SGR)
121 will be supported in a future release.
122
123
124
125Roadmap
126-------
127
128Many tasks remain before calling this version 1.0:
129
1300.0.2: STABILIZE EXISTING
131
132- TTerminalWindow
133 - Expose shell commands as properties
134- Swing:
135 - Blinking cursor
136 - Block cursor
137- ECMA48Backend running on socket
138- TFileOpen
139- Decide on naming convention: getText, getValue, getLabel: one or all
140 of them?
141- Refactor:
142 - TKeypress:
143 - getCh() --> getChar()
144 - getAlt/getCtrl/getShift --> isAltDown / isCtrlDown / isShiftDown
145 - Other boolean getters --> isSomething
146- Document any properties used
147 - Expose use of 'stty'
148
1490.0.3: FINISH PORTING
150
151- TTreeView
152 - Also add keyboard navigation
153- TDirectoryList
154 - Also add keyboard navigation
155
1560.0.4: NEW STUFF
157
158- Making TMenu keyboard accelerators active/inactive
159- TStatusBar
160- TEditor
161- TWindow
162 - "Smart placement" for new windows
163
1640.0.5: BUG HUNT
165
166- TSubMenu keyboard mnemonic not working
167- ECMA48Terminal
168 - Mode 1006 mouse coordinates
169
1700.1.0: BETA RELEASE
171
172- TSpinner
173- TComboBox
174- TListBox
175- TCalendar
176- TColorPicker
177
178Wishlist features (2.0):
179
180- TTerminal
181 - Handle resize events (pass to child process)
182- Screen
183 - Allow complex characters in putCharXY() and detect them in putStrXY().
184- Drag and drop
185 - TEditor
186 - TField
187 - TText
188 - TTerminal
189 - TComboBox
190
191
192Screenshots
193-----------
194
195![Several Windows Open Including A Terminal](/screenshots/screenshot1.png?raw=true "Several Windows Open Including A Terminal")
196
197![Yo Dawg...](/screenshots/yodawg.png?raw=true "Yo Dawg, I heard you like text windowing systems, so I ran a text windowing system inside your text windowing system so you can have a terminal in your terminal.")
198