Giter Site home page Giter Site logo

Control: Attributed Label about terminal.gui HOT 1 OPEN

gui-cs avatar gui-cs commented on July 24, 2024 3
Control: Attributed Label

from terminal.gui.

Comments (1)

tig avatar tig commented on July 24, 2024

What about just supporting the ANSI Escape SGR parameters?

This way we don't have to invent new markup.

If we re-built Label on top of XTermSharp we'd get this mostly for free.

Related: #432 & #299

In my opinion we should do the following:

  • Implement a robust read-only text engine that supports:
  • left, right, center, justifiied justifiction
  • line wrap (both word and character based)
  • rendering ANSI color/formatting sequences
  • Put this text engine under Label

Use Label as a child control (or renderer) inside all other controls that display read-only text: Window.Title, MessageBox, TextField, etc...

@migueldeicaza has been doing work on a better text editor component for SwiftTerm. I suspect that work will not be useful to Terminal.Gui since it's probably tied to iOS. I think having a robust read-only text engine is more important that having BOTH that and an editor. And I'm not convinced they need to be based on the same thing (although one could argue that you'd read-only to just be a read-only version of edit.

(FWIW, I recently built an engine that comes close to this as part of https://github.com/tig/winprint. It doesn't support right, center, or justified and has lame word wrapping, but it DOES do ANSI formatting. It is based on https://github.com/rasmus-toftdahl-olesen/libvt100. I didn't know about @migueldeicaza's XtermSharp when I started, and XtermSharp doesn't support > 8bit color sequences, so I kept with libvt100. It's possible that one way to build this all is to simply layer it on top of XtermSharp or libvt100. I may build a POC of this.)

from terminal.gui.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.