Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » Developing U++ » UppHub » A terminal emulator widget for U++
Re: A terminal emulator widget for U++ [message #60339 is a reply to message #51415] Sun, 17 December 2023 15:04 Go to previous messageGo to next message
Oblivion is currently offline  Oblivion
Messages: 1202
Registered: August 2007
Senior Contributor
Hi, a minor addition to TerminalCtrl:

It is now possible to override the application mouse tracking mode by using a configurable modifier key (ctrl, shift, alt and their combinations).


Best regards,
Oblivion


Re: A terminal emulator widget for U++ [message #60359 is a reply to message #51415] Fri, 22 December 2023 00:23 Go to previous messageGo to next message
Oblivion is currently offline  Oblivion
Messages: 1202
Registered: August 2007
Senior Contributor
Hi,

TerminalCtrl has gained another important feature:

Custom highlighting support: Client code can now manipulate the visible terminal lines to add custom highlighting to TerminalCtrl.



Best regards,
Oblivion


Re: A terminal emulator widget for U++ [message #60423 is a reply to message #51415] Sat, 06 January 2024 21:45 Go to previous messageGo to next message
Oblivion is currently offline  Oblivion
Messages: 1202
Registered: August 2007
Senior Contributor
Hi,

Another weekly update.
TerminalCtrl has gained text search support. Client code can now add any type of custom text search method to TerminalCtrl. 



Best regards,
Oblivion


Re: A terminal emulator widget for U++ [message #60541 is a reply to message #51415] Sat, 13 April 2024 10:42 Go to previous messageGo to next message
Oblivion is currently offline  Oblivion
Messages: 1202
Registered: August 2007
Senior Contributor
Hi,

After a long, silent period, we're back here again.

There has been much work going into TerminalCtrl nowadays, mostly bug fixes, optimizatios and internal maintenance but also some cool new features are here too. Since the next "release" (milestone) will be 2024.1 (v0.9), I'd like to give an update on its status.

Bug fixes aside, there are now six important features, already fully or partially implemented:
1) Selector Mode: TerminalCtrl now allows full keyboard navigation for selecting text in a special mode called "Selector Mode".
   At the moment, three types of selection are possible in this mode: text, rectangle, word.

2) Annotations:  This is a cool new feature. User or the hosted app can now add annotations to terminal texts (in both plain text and rich text (qtf) format).
   This can be done via user input (mouse, or keyboard in selector mode) or programatically (using a simple, proprietary protocol). AFAIK, this has been one of the most favored iterm2 features.

3) Word Selection filters: Word selection filter can now be set by the client code. It allows cell-level inspection, so it is even possible to select blocks of text ("words") according to their SGR attributes, associated data type, or colors.

4) Highlighting: TerminalCtrl allows full cell-level highlighting.

5) Shell integration: TerminalCtrl now allows hosted apps or shells to notify the terminal of the working directory, so the terminal can be aware of its environment (and act accordingly).

6) Configurable Keyboard shortcuts: Keyboard shortcuts are now configurable and can be redefined in client code.



All of these features are already utilized in Bobcat, cross-platform terminal emulator.

Best regards,
Oblivion


[Updated on: Sat, 13 April 2024 10:52]

Report message to a moderator

Re: A terminal emulator widget for U++ [message #60572 is a reply to message #51415] Sat, 11 May 2024 19:00 Go to previous messageGo to next message
Oblivion is currently offline  Oblivion
Messages: 1202
Registered: August 2007
Senior Contributor
Hi,

TerminalCtrl has gained a new functionality that is used by many modern terminal emulators: Progress notification and tracking protocol:

OSC 9 ; 4 ; [state] ; [value] ST


This protocol is also supported by Windows Terminal, ConEMU, mintty


Best regards,


Re: A terminal emulator widget for U++ [message #60737 is a reply to message #51415] Thu, 15 August 2024 21:31 Go to previous messageGo to next message
Oblivion is currently offline  Oblivion
Messages: 1202
Registered: August 2007
Senior Contributor
Here is a short video demonstrating the basic capabilities of Bobcat, the terminal emulator (based on TerminalCtrl):


https://vimeo.com/999236026



What is demonstrated in the video, you may ask?

1 - Running Doom in terminal emulator
2 - Navigating the open terminals, using the Navigator.
3 - Using the Finder to find text.
4 - Navigating through the open terminals using l/r keys.


Best regards,
Oblivion


[Updated on: Thu, 15 August 2024 21:32]

Report message to a moderator

Re: A terminal emulator widget for U++ [message #60739 is a reply to message #60737] Fri, 16 August 2024 07:38 Go to previous messageGo to next message
koldo is currently offline  koldo
Messages: 3432
Registered: August 2008
Senior Veteran
It's insane what you can do with your terminal. Cool

Best regards
Iñaki
Re: A terminal emulator widget for U++ [message #60890 is a reply to message #60739] Mon, 30 September 2024 23:35 Go to previous messageGo to next message
Oblivion is currently offline  Oblivion
Messages: 1202
Registered: August 2007
Senior Contributor
Quote:
It's insane what you can do with your terminal. Cool


Ah, I haven't seen your reply, sorry.

Well, thanks to U++, yes. It has become a reasonably powerful terminal emulator. Very Happy Cool

Now it also officially supports Turtle for remote connections and SDL2-GL for headless gui mode (though, it is experimental for now).

A screenshot on SDLGUI backend:

index.php?t=getfile&id=6969&private=0


Rumour has that I am also secretly building an SSH terminal, with virtually the same code-base ("Tomcat") Wink

Best regards,
Oblivion


[Updated on: Mon, 30 September 2024 23:36]

Report message to a moderator

Re: A terminal emulator widget for U++ [message #60941 is a reply to message #51415] Sun, 13 October 2024 00:18 Go to previous messageGo to next message
Oblivion is currently offline  Oblivion
Messages: 1202
Registered: August 2007
Senior Contributor
Hi,

There is another significant improvement in TerminalCtrl package, specifially in PtyProcesss package: PtyProcess package refactored, and process types are split into their respective classes.

- All PtyProcess classes are now derived from APtyProcess base class.
- On Windows, it is now possible to use both WinPty (as WinPtyProcess) and Windows console api (ConPtyProcess) at the same time
- On Linux the actual class is named as PosixPtyProcess.
- Existing code will work, since the PtyProcess is now an alias which designates PosixPtyProcess on *NIX systems, and depending on the WIN10 flag it designates either ConPty or WinPty. (Old behavior is kept.)
- Since they are all derived from the APtyProcess class, it is now possible to dynamically create and store them in the same container.


Best regards,
Oblivion


Re: A terminal emulator widget for U++ [message #61213 is a reply to message #51415] Sun, 08 December 2024 10:23 Go to previous messageGo to next message
Oblivion is currently offline  Oblivion
Messages: 1202
Registered: August 2007
Senior Contributor
[code]
Hi,

The day has arrived, and TerminalCtrl 2025.1 is released. Smile

Release Notes:

---

Requirements
- U++ >= 2024.1
- C++17

Customizability
- Custom Word/Cell Selection: Supports client-defined word selection via a filter. Selections can be based on text, SGR attributes, data types, or colors.
- Selector Mode: Introduced "Selector Mode" for keyboard navigation and text selection, supporting text, rectangle, line, and word selections. 
- Configurable keyboard Shortcuts: All shortcuts are made configurable and can be redefined in client code.
- Text Search: TerminalCtrl now have support for text search, including range-based and parallel (`CoFind`) search 
- Annotations: Users and hosted apps can now add annotations to terminal text (plain text or rich text via a simple protocol or menu).
- Custom Highlighting: Custom *cell-level* highlighting support.
- Application Mouse Tracking Override: Added the ability to override application mouse tracking with customizable modifier keys (Ctrl, Shift, Alt, and their combinations).
---

Protocols
- Directory Change Protocol: Implements the `OSC 7` and `OSC 9 ; 9`protocols to notify the terminal of the shell's working directory.
- Message Notification Protocol: Implements the `OSC 9 ; 2` message notification support.
- Progress Notification Protocol: Implements the `OSC 9 ; 4` protocol, used by modern terminal emulators, this protocol allows tracking of progress from hosted applications.
- iTerm2 Background Image Protocol: Implements iTerm2's background image change protocol.
  
---

Appearance
- Hyperlink Underline: Hyperlinks now switch to an under-dot pattern when using the underline attribute.
- Size Hint: The size hint now has rounded edges for better aesthetics.
  
---

Bug Fixes
- Mouse Reporting: Fixed mouse reporting bug.
- PC-Style Keys: Fixed the handling of HOME/END keys in PC-style mode.
- Stray Unicode Character: Fixed the Alt+Win key combination issue that produced stray Unicode characters.
- Background Transparency: Addressed transparency and background rendering issues.
- Selection on Resize: Selections are now cleared properly when resizing the terminal.

---

Performance Improvements
- Renderer Optimization: Refactored the renderer to combine non-contiguous characters, resulting in better performance
  
---

Behavior Changes
- Modifier Keys: `AltGr` and `Super` modifier keys no longer scroll the page.
- Page Scroll on Paste: The page now automatically scrolls to the bottom when pasting.
- Terminal Resize Behavior: Terminal lines are no longer truncated when resizing to a smaller window.

Code Maintenance
- Code Cleanup: Removed unused variables, redundant code.
- APtyProcess Base Class: 
  - All PtyProcess classes are now derived from APtyProcess.
  - On Linux, the active class is `PosixPtyProcess`.
  - On Windows, it can use either `WinPtyProcess` or `ConPtyProcess` based on system configuration.
  - This makes it possible to dynamically manage different PtyProcess types in a single container.


If you wonder what can be achieved with TerminalCtrl, just check Bobcat (which is to be released officially before the end of the year.).

Best regards,
Oblivion


[Updated on: Sun, 08 December 2024 10:24]

Report message to a moderator

Re: A terminal emulator widget for U++ [message #61240 is a reply to message #61213] Sat, 14 December 2024 17:12 Go to previous messageGo to next message
Lance is currently offline  Lance
Messages: 656
Registered: March 2007
Contributor
great job, Oblivion!
Re: A terminal emulator widget for U++ [message #61245 is a reply to message #61240] Sat, 14 December 2024 20:50 Go to previous messageGo to next message
koldo is currently offline  koldo
Messages: 3432
Registered: August 2008
Senior Veteran
Oh, it's right

I love this development and how our partner maintains, improves and publishes it.
Long live U++ applications! Smile


Best regards
Iñaki
Re: A terminal emulator widget for U++ [message #61627 is a reply to message #51415] Tue, 01 April 2025 09:29 Go to previous messageGo to next message
Oblivion is currently offline  Oblivion
Messages: 1202
Registered: August 2007
Senior Contributor
Hi,

New feature is added to Terminal/Ptyprocess:

PtyWaitEvent class

- Its API is virtually identical to SocketWaitEvent but for Pty processes.
- Provides a mechanism for waiting on multiple pseudoterminal (pty) processes to become ready for I/O operations.
- On windows it uses I/O Completion Ports (IOCP) to wait for events on process and pipe handles.
- On POSIX-compliant operating systems it uses the poll() system call to wait for events on pty/file descriptors
- On all platform this class effectively removes the  limitation of max 64 wait objects.


Best regards,
Oblivion


[Updated on: Tue, 01 April 2025 09:30]

Report message to a moderator

Re: A terminal emulator widget for U++ [message #61644 is a reply to message #51415] Sun, 13 April 2025 14:08 Go to previous message
Oblivion is currently offline  Oblivion
Messages: 1202
Registered: August 2007
Senior Contributor
Hi,

TerminalCtrl has gained another capability, another feature: Semantic Information Protocol, or OSC 133


| Sequence                               | Description                                                         | Device Level |
| ---                                    | ---                                                                 | ---          |
|`OSC 133 ; [command] ST`                | Sets the semantic information, starting from the cursor position.   | Level 1      |

#### Notes

- `command` can be one of the following four values (case sensitive):
   - `A`: Marks the starting point of the shell prompt.
   - `B`: Marks the end of the shell prompt and the start of the user input.
   - `C`: Marks the end of the user input and the start of the command output.
   - `D`: Marks the end of the command output.

- TerminalCtrl currently supports only a minimal--but reasonable--subset of this protocol. This may change in the future.
- TerminalCtrl does not process or display semantic information by itself. Instead, it is up to the client code to make use of the protocol, typically in combination with features like cell highlighting or search functionality.



Well, what is it good for, you might ask.

It allows clear separation between three semantically different sections of terminal output, usually on shells: prompt, user input and command output.
By this separation, it becomes possible to treat three different section of terminal output separately. For example, a search function can search exclusively for command outputs, user inputs or prompts.
Or extracting and highlighting only a specific type of data (e.g. command outputs) become possible.

Of course, Bobcat will utilize this protocol ASAP.

Best regards,
Oblivion


Previous Topic: NetProxy package. (HTTP/SOCKS4/4a/5 with BIND support) encapsulation for U++
Next Topic: XForm3D library for U++
Goto Forum:
  


Current Time: Fri Apr 25 12:32:32 CEST 2025

Total time taken to generate the page: 0.01078 seconds