Skip to content

UplinkCoder/d-tui

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

D Text User Interface library

This library implements a text-based windowing system loosely reminiscient of Borland's Turbo Vision library. For those wishing to use the actual C++ Turbo Vision library, see Sergio Sigala's updated version that runs on many more platforms.

Three platforms are available:

  • Posix under an X11 terminal (tested on Linux + xterm). Input/output is handled through terminal escape sequences generated by the library itself: ncurses is not required or linked to. xterm mouse tracking using UTF8 coordinates is supported.

  • Windows console mode (tested on Windows XP). Input/output is handled via Win32 console functions.

  • As an X11-style terminal communicating over a non-blocking socket.

Contributions towards supporting other platforms would be greatly appreciated.

License

This library is licensed LGPL ("GNU Lesser General Public License") version 3 or greater. See the file COPYING 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:

import tui;

public class MyApplication : TApplication {

    this() {
        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();
    }
}

void main(string [] args) {
    MyApplication app = new MyApplication();
    app.run();
}

See the file demo1.d for many example usages.

Acknowledgements

Thanks go out to Adam Ruppe for his terminal.d class which greatly accelerated support for the Win32 console.

Roadmap

This is a work in progress. Many tasks remain before calling this version 1.0:

0.0.1:

  • Bugs
    • TSubMenu keyboard mnemonic not working
    • kbDel assertion failure in TMenu (MID_CLEAR)

0.0.2:

  • TEditor
    • Word wrap
    • Forward/backward word
    • Search
    • Replace
    • Cut/Copy/Paste

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
  • GTKBackend (use GtkD)
  • ECMABackend
    • libgpm support

About

D Text User Interface library

Resources

License

Stars

Watchers

Forks

Packages

No packages published