All Projects → PhonicUK → Clrcli

PhonicUK / Clrcli

Licence: mit
CLRCLI is an event-driven library for building line-art user interfaces in C#/.Net command-line applications.

Projects that are alternatives of or similar to Clrcli

Nnn
n³ The unorthodox terminal file manager
Stars: ✭ 13,138 (+10495.16%)
Mutual labels:  cli, command-line, console, tui
Mandown
man-page inspired Markdown viewer
Stars: ✭ 173 (+39.52%)
Mutual labels:  cli, command-line, console, tui
Jquery.terminal
jQuery Terminal Emulator - JavaScript library for creating web-based terminals with custom commands
Stars: ✭ 2,623 (+2015.32%)
Mutual labels:  cli, command-line, console, tui
Stig
TUI and CLI for the BitTorrent client Transmission
Stars: ✭ 360 (+190.32%)
Mutual labels:  cli, console, tui
Simple Console
Add an elegant command-line interface to any page
Stars: ✭ 107 (-13.71%)
Mutual labels:  cli, command-line, console
Tqdm
A Fast, Extensible Progress Bar for Python and CLI
Stars: ✭ 20,632 (+16538.71%)
Mutual labels:  cli, console, gui
Laravel Zero
A PHP framework for console artisans
Stars: ✭ 2,821 (+2175%)
Mutual labels:  cli, command-line, console
Pulsemixer
CLI and curses mixer for PulseAudio
Stars: ✭ 441 (+255.65%)
Mutual labels:  cli, console, tui
Kondo
Save disk space by cleaning non-essential files from software projects.
Stars: ✭ 373 (+200.81%)
Mutual labels:  cli, command-line, gui
Clui
Command Line User Interface (Console UI inspired by TurboVision)
Stars: ✭ 561 (+352.42%)
Mutual labels:  console, tui, gui
Wonders
🌈 Declarative JavaScript framework to build command-line applications.
Stars: ✭ 34 (-72.58%)
Mutual labels:  cli, command-line, console
Word Wrap
Wrap words to a specified length.
Stars: ✭ 107 (-13.71%)
Mutual labels:  cli, command-line, console
Php Console
🖥 PHP CLI application library, provide console argument parse, console controller/command run, color style, user interactive, format information show and more. 功能全面的PHP命令行应用库。提供控制台参数解析, 命令运行,颜色风格输出, 用户信息交互, 特殊格式信息显示
Stars: ✭ 310 (+150%)
Mutual labels:  cli, command-line, console
Sad
CLI search and replace | Space Age seD
Stars: ✭ 350 (+182.26%)
Mutual labels:  cli, command-line, tui
Whatspup
🔳 WhatsApp chat from commandline/console/cli using GoogleChrome puppeteer
Stars: ✭ 310 (+150%)
Mutual labels:  cli, command-line, console
Cocona
Micro-framework for .NET Core console application. Cocona makes it easy and fast to build console applications on .NET Core.
Stars: ✭ 398 (+220.97%)
Mutual labels:  cli, command-line, console
C Sharp Console Gui Framework
A GUI framework for C# console applications
Stars: ✭ 838 (+575.81%)
Mutual labels:  console, tui, gui
Crossline
A small, self-contained, zero-config, MIT licensed, cross-platform, readline and libedit replacement.
Stars: ✭ 53 (-57.26%)
Mutual labels:  cli, command-line, console
Window Size
Reliable way to to get the height and width of the terminal/console in a node.js environment.
Stars: ✭ 79 (-36.29%)
Mutual labels:  cli, command-line, console
S Tui
Terminal-based CPU stress and monitoring utility
Stars: ✭ 2,825 (+2178.23%)
Mutual labels:  cli, console, tui

CLRCLI README

About

CLRCLI (Common-Language-Runtime Command-Line-Interface) is an event-driven windowing system using a line-art interface for use by command-line applications.

example screenshot

Getting Started

Your starting point is the RootWindow. You only have one instance per application. You can add widgets directly to the root window, or to other widgets.

Once the UI has been built (either in code, or by loading it from an XML source) - the Run() method of the RootWindow is used to begin taking user input and handling events. You will not be able to recieve any keyboard input via Console.ReadLine() or similar while it is active.

RootWindow.Detach() is used to release control of the RootWindow so you can use the console as normal. Note that this can only be done in response to an event raised by a control or it may not terminate properly.

See the TestHarness app for a short 'Hello World' example.

Supported Widgets

Currently the following widgets are implemented:

  • Root Window
  • Dialog
  • Button
  • Label
  • Checkbox
  • Radiobox (Automatically toggles sibling radioboxes)
  • Slider (Stylized Checkbox)
  • Horizontal Progress Bar
  • Listbox (with scrolling)
  • Single-line textbox (with horizontal scroll, and password field support)
  • Horizontal and vertical lines
  • Borders with optional titles
  • Simple horizontal bar graph
  • Spinners (3x3 and 1x1 styles)

Writing new widgets

New widgets are required to implement two constructors, one public - which takes a parent widget as a parameter (which is passed to base()), and one internal which must not take any arguments. Both are required to do any setup needed to make the widget function. The internal constructor is used when the widget is created by loading its details from an XML file, the public one is used when creating the widget at runtime in code.

In addition any new widgets must be added to the list of XmlElements in the Widget base class for the Children property. This allows it to be saved/loaded with its proper name rather than just appearing as a widget with a type.

Widgets implement a Render() method. You must not use any Console methods directly from the widget, but rather use the methods exposed by ConsoleHelper. Render() needs to take into account whether or not a shadow is to be drawn by checking the DrawShadow property, and whether the widget currently has focus.

The Widget base class exposes a DrawBorderMethod() which uses the appropriate border method for the BorderType chosen for the widget.

Widgets that can be clicked need to implement IFocusable. There's no actual implementation involved, and the RootWindow handles firing the clicked event.

Widgets that need to handle keyboard input (such as textboxes) need to implement IAcceptInput. They will be passed every keypress via Keypress method. If the input will be 'swallowed' (i.e. the widget is using the input itself) it should return False. Otherwise it should return True to allow the input to be processed as normal.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].