mouse support inside terminal
[nikiroo-utils.git] / README.md
... / ...
CommitLineData
1Jexer - Java Text User Interface library
2========================================
3
4WARNING: THIS IS ALPHA CODE!
5
6This library is intended to implement a text-based windowing system
7loosely reminiscient of Borland's [Turbo
8Vision](http://en.wikipedia.org/wiki/Turbo_Vision) library. For those
9wishing to use the actual C++ Turbo Vision library, see [Sergio
10Sigala's updated version](http://tvision.sourceforge.net/) that runs
11on many more platforms.
12
13Two backends are available:
14
15* System.in/out to a command-line ECMA-48 / ANSI X3.64 type terminal
16 (tested on Linux + xterm). I/O is handled through terminal escape
17 sequences generated by the library itself: ncurses is not required
18 or linked to. xterm mouse tracking using UTF8 coordinates is
19 supported. This is the default backend on non-Windows platforms.
20
21* Java AWT UI. This backend can be selected by setting
22 jexer.AWT=true. This is the default backend on Windows platforms.
23 AWT is experimental, please consider filing bugs when you encounter
24 them. The default window size for AWT is 132x40, which is set in
25 jexer.session.AWTSession.
26
27A demo application showing the existing UI controls is available via
28'java -jar jexer.jar' or 'java -Djexer.AWT=true -jar jexer.jar' .
29
30
31
32License
33-------
34
35This project is licensed LGPL ("GNU Lesser General Public License")
36version 3 or greater. See the file LICENSE for the full license text,
37which includes both the GPL v3 and the LGPL supplemental terms.
38
39
40
41Acknowledgements
42----------------
43
44Jexer makes use of the Terminus TrueType font [made available
45here](http://files.ax86.net/terminus-ttf/) .
46
47
48
49Usage
50-----
51
52Usage patterns are still being worked on, but in general the goal will
53be to build applications somewhat as follows:
54
55```Java
56import jexer.*;
57
58public class MyApplication extends TApplication {
59
60 public MyApplication() {
61 super();
62
63 // Create standard menus for File and Window
64 addFileMenu();
65 addWindowMenu();
66 }
67
68 public static void main(String [] args) {
69 MyApplication app = new MyApplication();
70 app.run();
71 }
72}
73```
74
75See the file demos/Demo1.java for detailed examples.
76
77
78
79Known Issues / Arbitrary Decisions
80----------------------------------
81
82Some arbitrary design decisions had to be made when either the
83obviously expected behavior did not happen or when a specification was
84ambiguous. This section describes such issues.
85
86 TTerminalWindow
87 ---------------
88
89 - TTerminalWindow will hang on input from the remote if the
90 TApplication is exited before the TTerminalWindow's process has
91 closed on its own. This is due to a Java limitation/interaction
92 between blocking reads (which is necessary to get UTF8 translation
93 correct) and file streams.
94
95 - See jexer.tterminal.ECMA48 for more specifics of terminal
96 emulation limitations.
97
98
99Roadmap
100-------
101
102Many tasks remain before calling this version 1.0:
103
1040.0.2:
105
106- Making TMenu keyboard accelerators active/inactive
107- AWT:
108 - Blinking cursor
109 - Handle kbTab (disable focus traversal BS)
110 - Block cursor
111- ECMA48Backend running on socket
112- TTreeView
113- TDirectoryList
114- TFileOpen
115- Decide on naming convention: getText, getValue, getLabel: one or all
116 of them?
117- Refactor:
118 - TKeypress:
119 - getCh() --> getChar()
120 - getAlt/getCtrl/getShift --> isAltDown / isCtrlDown / isShiftDown
121 - Other boolean getters --> isSomething
122
1230.0.3:
124
125- TEditor
126
1270.0.4:
128
129- Bugs
130 - TSubMenu keyboard mnemonic not working
131 - TDirectoryList cannot be navigated only with keyboard
132 - TTreeView cannot be navigated only with keyboard
133 - RangeViolation after dragging scrollbar up/down
134
1350.1.0:
136
137- TWindow
138 - "Smart placement" for new windows
139
140Wishlist features (2.0):
141
142- TTerminal
143 - Handle resize events (pass to child process)
144- Screen
145 - Allow complex characters in putCharXY() and detect them in putStrXY().
146- TComboBox
147- TListBox
148- TSpinner
149- TCalendar widget
150- TColorPicker widget
151- Drag and drop
152 - TEditor
153 - TField
154 - TText
155 - TTerminal
156 - TComboBox
157
158
159Screenshots
160-----------
161
162![Several Windows Open Including A Terminal](/screenshots/screenshot1.png?raw=true "Several Windows Open Including A Terminal")
163