|
|
Home » Developing U++ » UppHub » A terminal emulator widget for U++
Re: A terminal emulator widget for U++ [message #52065 is a reply to message #51415] |
Sat, 13 July 2019 17:35 |
Oblivion
Messages: 1091 Registered: August 2007
|
Senior Contributor |
|
|
Hello,
It's been a while since I posted any news about the Terminal package. I had to focus on my other works fo a while.
The good news is last week I implemented the final missing pieces for the 0.1 release:
- 256 colors support added.
- ANSI colors support added.
- XTerm dynamic colors suppport added.
- VT 4xx rectangular area operations are added (copy, invert, move, fill, in both selective and normal modes)
- UDK (DEC's user-defined function keys support) added.
- Lazy resize option is added (to reduce flickers on network terminals uch as SSH-based ones)
- Size hint added.
- A .usc file is added to the Terminal package. (The most common options (font, ink, paper, cursor, sizehint etc.) can be set using TheIDE's layout editor. Also it shows a size hint (in calculated cell size) to simplfy positiong the widget in the layout ediyor.
- It is also tested on Windows, and it works well. :) (currently as SSH terminal, in the near future as a frontend for Windows power shell too)
Two notes on the upcoming initial release:
1) Terminal package currently does not contain any external code/libaray. It uses U++, and it's plugins.
2) Although a virtual terminal requires a pty device, and Terminal pacjage contains one, they are completely decoupled.
Terminal ctrl can be used and compiled without PtyProcess. This gives it a huge flexibility
In this regard I will provide 4 basic examples with the package:
- TerminalExample | Uses ptyprocess (currently ptyprocess requires POSIX-compliant operationg systems (or possibly cygwin on Windows.)
- TerminalExampleWithLayout | The same as above.
--------------------------------
- SShTerminalExample | Does not use PtyProcess. IT uses Core/SSH package isntead
- SshTerminalExampleWithLayout | The same as above.
Here is the actual code of TerminalExample (36 LOCs total):
#include <Core/Core.h>
#include <Terminal/Terminal.h>
using namespace Upp;
const char *nixshell = "/bin/bash";
struct TerminalExample : TopWindow {
Terminal term;
PtyProcess pty;
TerminalExample()
{
term.WhenBell = [=]() { BeepExclamation(); };
term.WhenTitle = [=](String s) { Title(s); };
term.WhenResize = [=]() { pty.SetSize(term.GetPageSize()); };
term.WhenOutput = [=](String s) { PutGet(s); };
SetRect(term.GetStdSize()); // 80 x 24 cells (scaled).
Sizeable().Zoomable().CenterScreen().Add(term.SizePos());
SetTimeCallback(-1, [=]() { PutGet(); });
pty.Start(nixshell, Environment(), GetHomeDirectory());
}
void PutGet(String out = Null)
{
term.Write(pty.Get());
pty.Write(out);
if(!pty.IsRunning())
Break();
}
};
GUI_APP_MAIN
{
TerminalExample().Run();
}
Below was a sort of "final boss" for the first release. It shows the mapscii, an OpenStreetMap implementation for terminal devices, running on the above code and on Gnome-terminal.
On the left is TerminalExample, running mapscii.
On the right is gnome terminal running mapscii
Both are running on 256 colors mode + mouse tracking support.
As a final note: Terminal package will be availabe within this weeek.
Best regards,
Oblivion
-
Attachment: Terminal.png
(Size: 513.88KB, Downloaded 1238 times)
Github page: https://github.com/ismail-yilmaz
upp-components: https://github.com/ismail-yilmaz/upp-components
Bobcat the terminal emulator: https://github.com/ismail-yilmaz/Bobcat
[Updated on: Sat, 13 July 2019 17:39] Report message to a moderator
|
|
|
|
|
A terminal emulator widget for U++
By: Oblivion on Sat, 23 March 2019 22:31
|
|
|
Re: A terminal emulator widget for U++
By: koldo on Sun, 24 March 2019 16:15
|
|
|
Re: A terminal emulator widget for U++
By: Oblivion on Tue, 26 March 2019 10:02
|
|
|
Re: A terminal emulator widget for U++
By: Oblivion on Tue, 26 March 2019 13:11
|
|
|
Re: A terminal emulator widget for U++
By: koldo on Tue, 26 March 2019 13:21
|
|
|
Re: A terminal emulator widget for U++
By: Novo on Wed, 27 March 2019 23:14
|
|
|
Re: A terminal emulator widget for U++
By: Oblivion on Thu, 28 March 2019 08:01
|
|
|
Re: A terminal emulator widget for U++
By: Novo on Thu, 28 March 2019 16:57
|
|
|
Re: A terminal emulator widget for U++
By: Oblivion on Thu, 28 March 2019 19:21
|
|
|
Re: A terminal emulator widget for U++
By: Oblivion on Mon, 08 April 2019 11:45
|
|
|
Re: A terminal emulator widget for U++
By: Xemuth on Mon, 13 May 2019 13:47
|
|
|
Re: A terminal emulator widget for U++
|
|
|
Re: A terminal emulator widget for U++
|
|
|
Re: A terminal emulator widget for U++
|
|
|
Re: A terminal emulator widget for U++
By: Xemuth on Tue, 16 July 2019 09:34
|
|
|
Re: A terminal emulator widget for U++
|
|
|
Re: A terminal emulator widget for U++
|
|
|
Re: A terminal emulator widget for U++
|
|
|
Re: A terminal emulator widget for U++
|
|
|
Re: A terminal emulator widget for U++
By: koldo on Fri, 26 July 2019 08:18
|
|
|
Re: A terminal emulator widget for U++
|
|
|
Re: A terminal emulator widget for U++
|
|
|
Re: A terminal emulator widget for U++
By: Oblivion on Fri, 02 August 2019 13:54
|
|
|
Re: A terminal emulator widget for U++
By: Oblivion on Wed, 07 August 2019 21:24
|
|
|
Re: A terminal emulator widget for U++
By: Oblivion on Mon, 12 August 2019 11:39
|
|
|
Re: A terminal emulator widget for U++
By: Oblivion on Fri, 16 August 2019 14:29
|
|
|
Re: A terminal emulator widget for U++
By: Oblivion on Sun, 22 September 2019 12:01
|
|
|
Re: A terminal emulator widget for U++
By: Oblivion on Sat, 28 September 2019 22:00
|
|
|
Re: A terminal emulator widget for U++
By: Oblivion on Sun, 03 November 2019 15:03
|
|
|
Re: A terminal emulator widget for U++
By: Oblivion on Sun, 10 November 2019 21:49
|
|
|
Re: A terminal emulator widget for U++
By: Oblivion on Tue, 12 November 2019 16:36
|
|
|
Re: A terminal emulator widget for U++
By: Oblivion on Tue, 12 November 2019 20:08
|
|
|
Re: A terminal emulator widget for U++
By: Oblivion on Wed, 25 March 2020 14:20
|
|
|
Re: A terminal emulator widget for U++
By: deep on Wed, 25 March 2020 19:12
|
|
|
Re: A terminal emulator widget for U++
By: Oblivion on Thu, 26 March 2020 16:54
|
|
|
Re: A terminal emulator widget for U++
By: Oblivion on Fri, 10 April 2020 02:17
|
|
|
Re: A terminal emulator widget for U++
By: Oblivion on Sat, 11 April 2020 00:30
|
|
|
Re: A terminal emulator widget for U++
By: Oblivion on Fri, 17 April 2020 22:30
|
|
|
Re: A terminal emulator widget for U++
By: Oblivion on Tue, 21 April 2020 18:35
|
|
|
Re: A terminal emulator widget for U++
By: Oblivion on Wed, 22 April 2020 18:51
|
|
|
Re: A terminal emulator widget for U++
By: Oblivion on Sat, 25 April 2020 00:36
|
|
|
Re: A terminal emulator widget for U++
|
|
|
Re: A terminal emulator widget for U++
|
|
|
Re: A terminal emulator widget for U++
|
|
|
Re: A terminal emulator widget for U++
|
|
|
Re: A terminal emulator widget for U++
|
|
|
Re: A terminal emulator widget for U++
|
|
|
Re: A terminal emulator widget for U++
|
|
|
Re: A terminal emulator widget for U++
|
|
|
Re: A terminal emulator widget for U++
By: Zbych on Thu, 11 June 2020 00:13
|
|
|
Re: A terminal emulator widget for U++
|
|
|
Re: A terminal emulator widget for U++
By: Zbych on Sun, 21 June 2020 22:16
|
|
|
Re: A terminal emulator widget for U++
|
|
|
Re: A terminal emulator widget for U++
By: Zbych on Sun, 21 June 2020 22:47
|
|
|
Re: A terminal emulator widget for U++
|
|
|
Re: A terminal emulator widget for U++
|
|
|
Re: A terminal emulator widget for U++
By: Zbych on Thu, 25 June 2020 20:40
|
|
|
Re: A terminal emulator widget for U++
|
|
|
Re: A terminal emulator widget for U++
|
|
|
Re: A terminal emulator widget for U++
|
|
|
Re: A terminal emulator widget for U++
|
|
|
Re: A terminal emulator widget for U++
|
|
|
Re: A terminal emulator widget for U++
By: Oblivion on Sat, 01 August 2020 20:48
|
|
|
Re: A terminal emulator widget for U++
By: Oblivion on Fri, 21 August 2020 13:29
|
|
|
Re: A terminal emulator widget for U++
By: Oblivion on Sat, 05 September 2020 16:45
|
|
|
Re: A terminal emulator widget for U++
By: Oblivion on Thu, 01 October 2020 18:11
|
|
|
Re: A terminal emulator widget for U++
By: Oblivion on Tue, 13 October 2020 12:41
|
|
|
Re: A terminal emulator widget for U++
By: Klugier on Tue, 13 October 2020 20:41
|
|
|
Re: A terminal emulator widget for U++
By: hongnod on Thu, 03 December 2020 15:05
|
|
|
Re: A terminal emulator widget for U++
By: Oblivion on Thu, 03 December 2020 16:25
|
|
|
Re: A terminal emulator widget for U++
By: hongnod on Fri, 04 December 2020 06:58
|
|
|
Re: A terminal emulator widget for U++
By: Oblivion on Sat, 05 December 2020 16:21
|
|
|
Re: A terminal emulator widget for U++
By: Oblivion on Wed, 09 December 2020 00:54
|
|
|
Re: A terminal emulator widget for U++
By: Oblivion on Sat, 23 January 2021 01:25
|
|
|
Re: A terminal emulator widget for U++
By: Oblivion on Mon, 01 February 2021 21:18
|
|
|
Re: A terminal emulator widget for U++
By: Oblivion on Wed, 03 February 2021 17:12
|
|
|
Re: A terminal emulator widget for U++
By: Oblivion on Fri, 12 February 2021 17:42
|
|
|
Re: A terminal emulator widget for U++
By: Klugier on Fri, 12 February 2021 21:58
|
|
|
Re: A terminal emulator widget for U++
By: Oblivion on Fri, 12 February 2021 22:26
|
|
|
Re: A terminal emulator widget for U++
By: Klugier on Fri, 12 February 2021 23:00
|
|
|
Re: A terminal emulator widget for U++
By: Oblivion on Fri, 12 February 2021 23:14
|
|
|
Re: A terminal emulator widget for U++
By: Oblivion on Tue, 23 February 2021 22:57
|
|
|
Re: A terminal emulator widget for U++
By: Oblivion on Sat, 27 February 2021 22:07
|
|
|
Re: A terminal emulator widget for U++
By: Oblivion on Mon, 01 March 2021 23:49
|
|
|
Re: A terminal emulator widget for U++
By: Oblivion on Wed, 03 March 2021 20:45
|
|
|
Re: A terminal emulator widget for U++
By: Oblivion on Sun, 07 March 2021 14:42
|
|
|
Re: A terminal emulator widget for U++
|
|
|
Re: A terminal emulator widget for U++
|
|
|
Re: A terminal emulator widget for U++
|
|
|
Re: A terminal emulator widget for U++
|
|
|
Re: A terminal emulator widget for U++
By: Novo on Tue, 15 June 2021 16:41
|
|
|
Re: A terminal emulator widget for U++
By: Klugier on Fri, 26 November 2021 23:19
|
|
|
Re: A terminal emulator widget for U++
By: Oblivion on Sat, 27 November 2021 07:51
|
|
|
Re: A terminal emulator widget for U++
By: Oblivion on Sat, 27 November 2021 10:47
|
|
|
Re: A terminal emulator widget for U++
By: slashupp on Tue, 21 December 2021 07:39
|
|
|
Re: A terminal emulator widget for U++
By: Oblivion on Tue, 21 December 2021 09:40
|
|
|
Re: A terminal emulator widget for U++
By: Oblivion on Sat, 12 February 2022 19:16
|
|
|
Re: A terminal emulator widget for U++
|
|
|
Re: A terminal emulator widget for U++
|
|
|
Re: A terminal emulator widget for U++
|
|
|
Re: A terminal emulator widget for U++
|
|
|
Re: A terminal emulator widget for U++
|
|
|
Re: A terminal emulator widget for U++
|
|
|
Compile problem on WIN10
By: peterh on Tue, 13 September 2022 15:15
|
|
|
Re: Compile problem on WIN10
By: Oblivion on Tue, 13 September 2022 21:39
|
|
|
Re: Compile problem on WIN10
By: peterh on Wed, 14 September 2022 03:48
|
|
|
Re: Compile problem on WIN10
By: Oblivion on Thu, 15 September 2022 00:31
|
|
|
Re: Compile problem on WIN10
By: peterh on Thu, 15 September 2022 06:54
|
|
|
Re: Compile problem on WIN10
By: Oblivion on Thu, 15 September 2022 07:14
|
|
|
Re: A terminal emulator widget for U++
By: Oblivion on Thu, 15 September 2022 07:25
|
|
|
Re: A terminal emulator widget for U++
By: peterh on Thu, 15 September 2022 07:58
|
|
|
Re: A terminal emulator widget for U++
By: peterh on Thu, 15 September 2022 09:03
|
|
|
Re: A terminal emulator widget for U++
By: Oblivion on Thu, 15 September 2022 19:09
|
|
|
Re: A terminal emulator widget for U++
By: peterh on Fri, 16 September 2022 06:10
|
|
|
Re: A terminal emulator widget for U++
By: peterh on Fri, 16 September 2022 07:41
|
|
|
Re: A terminal emulator widget for U++
By: Oblivion on Sat, 17 September 2022 18:40
|
|
|
Re: A terminal emulator widget for U++
By: peterh on Sat, 17 September 2022 20:58
|
|
|
Re: A terminal emulator widget for U++
By: Oblivion on Sun, 20 November 2022 21:11
|
|
|
Re: A terminal emulator widget for U++
By: Oblivion on Sat, 31 December 2022 11:19
|
|
|
Re: A terminal emulator widget for U++
|
|
|
Re: A terminal emulator widget for U++
By: Oblivion on Sun, 17 December 2023 15:04
|
|
|
Re: A terminal emulator widget for U++
By: Oblivion on Fri, 22 December 2023 00:23
|
|
|
Re: A terminal emulator widget for U++
By: Oblivion on Sat, 06 January 2024 21:45
|
Goto Forum:
Current Time: Fri Mar 29 15:46:33 CET 2024
Total time taken to generate the page: 0.01703 seconds
|
|
|