--- /dev/null
+# Jexer - Java Text User Interface - Makefile
+#
+# $Id$
+#
+# This program is licensed under the GNU Lesser General Public License
+# Version 3. Please see the file "COPYING" in this directory for more
+# information about the GNU Lesser General Public License Version 3.
+#
+# Copyright (C) 2015 Kevin Lamonte
+#
+# This library is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License as
+# published by the Free Software Foundation; either version 3 of the
+# License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, see
+# http://www.gnu.org/licenses/, or write to the Free Software
+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301
+# USA
+
+
+# This Makefile is a quick-and-dirty build that is useful to execute
+# the Demo1 application that uses stdin/stdout. Use 'make run'.
+#
+# Generally it would be better to use the ant build.
+
+default: all
+
+.SUFFIXES: .class .java
+
+SRC_DIR = src
+ANT_TARGET_DIR = build
+TARGET_DIR = classes
+
+JEXER_SRC = $(SRC_DIR)/jexer/TApplication.java
+
+JEXER_BIN = $(TARGET_DIR)/jexer/TApplication.class
+
+JAVAC = javac
+JAVAFLAGS = -g -deprecation
+
+all: jexer demos
+
+run: jexer run-demo1
+
+all-demos: jexer demos/Demo1.class
+
+demos/Demo1.class: demos/Demo1.java
+ $(JAVAC) $(JAVAFLAGS) -cp $(TARGET_DIR) -d demos demos/Demo1.java
+
+run-demo1: demos/Demo1.class
+ java -cp $(TARGET_DIR):demos Demo1
+
+clean: clean-demos
+ -rm -r $(ANT_TARGET_DIR)
+ -rm -r $(TARGET_DIR)
+ -mkdir $(TARGET_DIR)
+
+clean-demos:
+ -rm demos/Demo1.class
+
+jexer: $(JEXER_SRC)
+ $(JAVAC) $(JAVAFLAGS) -sourcepath $(SRC_DIR) -d $(TARGET_DIR) $(JEXER_SRC)
-# jexer
-Java Text User Interface
+Jexer - Java Text User Interface library
+========================================
+
+This library is currently in design, but when finished it is intended
+to implement a text-based windowing system loosely reminiscient of
+Borland's [Turbo Vision](http://en.wikipedia.org/wiki/Turbo_Vision)
+library. For those wishing to use the actual C++ Turbo Vision
+library, see [Sergio Sigala's updated
+version](http://tvision.sourceforge.net/) that runs on many more
+platforms.
+
+
+License
+-------
+
+This library is licensed LGPL ("GNU Lesser General Public License")
+version 3 or greater. See the file LICENSE for the full license text,
+which includes both the GPL v3 and the LGPL supplemental terms.
+
+
+Usage
+-----
+
+The library is currently under initial development, usage patterns are
+still being worked on. Generally the goal will be to build
+applications somewhat as follows:
+
+```Java
+import jexer.*;
+
+public class MyApplication extends TApplication {
+
+ public MyApplication() {
+ super();
+
+ // Create an editor window that has support for
+ // copy/paste, search text, arrow keys, horizontal
+ // and vertical scrollbar, etc.
+ addEditor();
+
+ // Create standard menus for File and Window
+ addFileMenu();
+ addWindowMenu();
+ }
+
+ public static void main(String [] args) {
+ MyApplication app = new MyApplication();
+ app.run();
+ }
+}
+```
+
+
+Roadmap
+-------
+
+This is a work in progress. Many tasks remain before calling this
+version 1.0:
+
+0.0.1:
+
+- Base classes:
+ - Events
+ - Codepage
+ - TApplication loop
+
+0.0.2:
+
+- Get modal messagebox running without fibers
+- Port remaining d-tui functionality over
+ - All widgets
+
+0.0.3:
+
+- ECMATerminal
+ - Mouse 1006 mode parsing
+ - Win32 support (used for reading/writing sockets)
+- Bugs
+ - TDirectoryList cannot be navigated only with keyboard
+ - TTreeView cannot be navigated only with keyboard
+ - RangeViolation after dragging scrollbar up/down
+
+Wishlist features (2.0):
+
+- TTerminal
+ - Handle resize events (pass to child process)
+ - xterm mouse handling
+- TWindow
+ - "Smart placement" for new windows
+- Screen
+ - Allow complex characters in putCharXY() and detect them in putStrXY().
+- TComboBox
+- TListBox
+- TSpinner
+- TCalendar widget
+- TColorPicker widget
+- Drag and drop
+ - TEditor
+ - TField
+ - TText
+ - TTerminal
+ - TComboBox
+- AWTBackend
+- ECMABackend
+ - libgpm support
--- /dev/null
+<!--
+
+ Jexer - Java Text User Interface - Ant build
+
+ $Id$
+
+ This program is licensed under the GNU Lesser General Public License
+ Version 3. Please see the file "COPYING" in this directory for more
+ information about the GNU Lesser General Public License Version 3.
+
+ Copyright (C) 2015 Kevin Lamonte
+
+ This library is free software; you can redistribute it and/or modify
+ it under the terms of the GNU Lesser General Public License as
+ published by the Free Software Foundation; either version 3 of the
+ License, or (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this program; if not, see
+ http://www.gnu.org/licenses/, or write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301
+ USA
+
+-->
+
+<project name="jexer" basedir="." default="run">
+
+ <property name="src.dir" value="src"/>
+ <property name="build.dir" value="build"/>
+ <property name="classes.dir" value="${build.dir}/classes"/>
+ <property name="jar.dir" value="${build.dir}/jar"/>
+
+ <property name="demo.class" value="Demo1"/>
+
+ <target name="clean">
+ <delete dir="${build.dir}"/>
+ </target>
+
+ <target name="compile">
+ <mkdir dir="${classes.dir}"/>
+ <javac srcdir="${src.dir}" destdir="${classes.dir}"
+ includeantruntime="false"/>
+ </target>
+
+ <target name="jar" depends="compile">
+ <mkdir dir="${jar.dir}"/>
+ <jar destfile="${jar.dir}/${ant.project.name}.jar"
+ basedir="${classes.dir}"
+ excludes="**/Demo*" >
+ </jar>
+ </target>
+
+ <target name="demos" depends="jar">
+ <mkdir dir="${classes.dir}"/>
+ <javac srcdir="demos" destdir="${classes.dir}"
+ includeantruntime="false"/>
+ </target>
+
+ <target name="run" depends="jar,demos">
+ <java classname="${demo.class}" fork="false">
+ <classpath>
+ <path location="${jar.dir}/${ant.project.name}.jar"/>
+ <path location="${classes.dir}"/>
+ </classpath>
+ </java>
+ </target>
+
+ <target name="clean-build" depends="clean,jar"/>
+
+ <target name="main" depends="clean,run"/>
+
+</project>
--- /dev/null
+/**
+ * Jexer - Java Text User Interface - demonstration program
+ *
+ * Version: $Id$
+ *
+ * Author: Kevin Lamonte, <a href="mailto:kevin.lamonte@gmail.com">kevin.lamonte@gmail.com</a>
+ *
+ * License: LGPLv3 or later
+ *
+ * Copyright: This module is licensed under the GNU Lesser General
+ * Public License Version 3. Please see the file "COPYING" in this
+ * directory for more information about the GNU Lesser General Public
+ * License Version 3.
+ *
+ * Copyright (C) 2015 Kevin Lamonte
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 3 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this program; if not, see
+ * http://www.gnu.org/licenses/, or write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA
+ */
+import jexer.TApplication;
+
+/**
+ * The demo application itself.
+ */
+class DemoApplication extends TApplication {
+}
+
+/**
+ * This class provides a simple demonstration of Jexer's capabilities.
+ */
+public class Demo1 {
+ /**
+ * Main entry point.
+ *
+ * @param args Command line arguments
+ */
+ public static void main(String [] args) {
+ DemoApplication app = new DemoApplication();
+ app.run();
+ }
+
+}
--- /dev/null
+/**
+ * Jexer - Java Text User Interface - demonstration program
+ *
+ * Version: $Id$
+ *
+ * Author: Kevin Lamonte, <a href="mailto:kevin.lamonte@gmail.com">kevin.lamonte@gmail.com</a>
+ *
+ * License: LGPLv3 or later
+ *
+ * Copyright: This module is licensed under the GNU Lesser General
+ * Public License Version 3. Please see the file "COPYING" in this
+ * directory for more information about the GNU Lesser General Public
+ * License Version 3.
+ *
+ * Copyright (C) 2015 Kevin Lamonte
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 3 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this program; if not, see
+ * http://www.gnu.org/licenses/, or write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA
+ */
+package jexer;
+
+/**
+ * TApplication sets up a full Text User Interface application.
+ */
+public class TApplication {
+
+ /**
+ * Run this application until it exits, using stdin and stdout
+ */
+ final public void run() {
+
+ /*
+ while (quit == false) {
+
+ // Timeout is in milliseconds, so default timeout after 1
+ // second of inactivity.
+ uint timeout = getSleepTime(1000);
+ // std.stdio.stderr.writefln("poll() timeout: %d", timeout);
+
+ if (eventQueue.length > 0) {
+ // Do not wait if there are definitely events waiting to be
+ // processed or a screen redraw to do.
+ timeout = 0;
+ }
+
+ // Pull any pending input events
+ TInputEvent [] events = backend.getEvents(timeout);
+ metaHandleEvents(events);
+
+ // Process timers and call doIdle()'s
+ doIdle();
+
+ // Update the screen
+ drawAll();
+ }
+
+ // Shutdown the fibers
+ eventQueue.length = 0;
+ if (secondaryEventFiber !is null) {
+ assert(secondaryEventReceiver !is null);
+ secondaryEventReceiver = null;
+ if (secondaryEventFiber.state == Fiber.State.HOLD) {
+ // Wake up the secondary handler so that it can exit.
+ secondaryEventFiber.call();
+ }
+ }
+
+ if (primaryEventFiber.state == Fiber.State.HOLD) {
+ // Wake up the primary handler so that it can exit.
+ primaryEventFiber.call();
+ }
+
+ backend.shutdown();
+ */
+
+ System.out.println("Hello");
+ }
+}