History log of /haiku/src/apps/serialconnect/TermView.cpp
Revision Date Author Comments
# 3a6bc1cf 02-Aug-2023 PulkoMandy <pulkomandy@pulkomandy.tk>

SerialConnect: implement clipboard paste

Change-Id: Iaddb6588afa774bcffad9713f280a0078784605a
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6770
Reviewed-by: waddlesplash <waddlesplash@gmail.com>


# 5033d689 19-Jul-2020 Adrien Destugues <pulkomandy@pulkomandy.tk>

SerialConnect: make reverse video work

It's useful to see our openboot boot menu.

I'm not sure what B_NEGATIVE_FACE is meant to do. The be book says
"Characters are drawn in the low color, while the background is drawn in
the high color.", but DrawString does not draw the background, so some
color swapping will still be needed in this case anyway.


# 6d880c90 20-May-2019 Augustin Cavalier <waddlesplash@gmail.com>

SerialConnect: Fix build on 64-bit.


# d4b3a327 18-May-2019 Adrien Destugues <pulkomandy@pulkomandy.tk>

SerialConnect: implement PopLine to get items from scrollback

Allows to make the scrollback visible again when resizing, instead of
adding blank lines at the bottom.

Change-Id: I7a14188cdcb14bcd197325b935d8cfe2435ae80f
Reviewed-on: https://review.haiku-os.org/c/1464
Reviewed-by: waddlesplash <waddlesplash@gmail.com>


# 1eb38608 19-May-2019 Adrien Destugues <pulkomandy@pulkomandy.tk>

SerialConnect: add a clear/reset menu.

Change-Id: I0435ba679e19094d201d65ac0c6290cd194ec344
Reviewed-on: https://review.haiku-os.org/c/1463
Reviewed-by: waddlesplash <waddlesplash@gmail.com>


# 2c218a0e 08-Feb-2019 Adrien Destugues <pulkomandy@gmail.com>

SerialConnect: increase scrollback size

1000 lines is not enough for a full boot log.

Change-Id: If1fe48349dec5cf0574de612c533b0037abc5043
Reviewed-on: https://review.haiku-os.org/c/1021
Reviewed-by: Stephan Aßmus <superstippi@gmx.de>


# c5f9934c 20-Nov-2017 Adrien Destugues <pulkomandy@pulkomandy.tk>

SerialConnect: optimize drawing

The libvterm implementation was sending characters to app_server one by
one. This made it very slow to update the view and SerialConnect would
have noticeable flickering.

We now look through each line and try to find ranges of characters with
the same attributes. We can then draw each of these with a single
FillRect+DrawString. In the normal case (no special attributes or colors
anywhere), this means just one call per line, plus two for the cursor.


# 534d0e61 10-Nov-2015 Adrien Destugues <pulkomandy@pulkomandy.tk>

SerialConnect: allow to change line terminator

* It can now be used to send AT commands for example, which need \r
instead of \n.


# 06f436b3 21-Oct-2014 Adrien Destugues <pulkomandy@gmail.com>

Use strict mode when url-decoding file requests.

We don't want '+' to become a space here.
Fixes #11109.


# 604dad94 22-Aug-2014 Adrien Destugues <pulkomandy@pulkomandy.tk>

SerialConnect: fix return and backspace keys.


# 730d796a 21-Aug-2014 Adrien Destugues <pulkomandy@pulkomandy.tk>

Style fixes.


# 37bea909 20-Aug-2014 Adrien Destugues <pulkomandy@pulkomandy.tk>

Translate arrow keys to VT100 escape sequences

* I think this is what everyone expects.


# e6e13325 13-Aug-2014 Adrien Destugues <pulkomandy@pulkomandy.tk>

SerialConnect: some simplifications

* Use integers for x and y coordinates in the draw loop, too
* Simplify _GetCell by using the return value of vterm_screen_get_cell
to detect out of bounds access, instead of testing for that manually.


# 7e034645 12-Aug-2014 Adrien Destugues <pulkomandy@pulkomandy.tk>

Avoid calling PenLocation for every char.

PenLocation is retrieved from app_server (because DrawString changes it
there), so this made drawing very slow.


# 30636d2e 13-Aug-2014 Adrien Destugues <pulkomandy@pulkomandy.tk>

SerialConnect: draw the cursor.

* Drawn as "inverse video" for now.
* Should use VTerm state to get the cursor shape (rect, underline or
left line)
* Should also handle blinking if enabled, and visibility.


# ea7fbc87 13-Aug-2014 Adrien Destugues <pulkomandy@pulkomandy.tk>

Build fix.


# c38dd82d 13-Aug-2014 Adrien Destugues <pulkomandy@pulkomandy.tk>

SerialConnect: use ints for font metrics

As pointed by Ingo, using a float here is useless because we want each
line to be the same integer number of pixels. Now thigs are drawn
properly and the view has the exact same size as Terminal's one (tested
with font sizes 10 and 18, so different leading values don't seem to be
a problem).

Thanks for reviewing!


# b59ed154 12-Aug-2014 Adrien Destugues <pulkomandy@pulkomandy.tk>

SerialConnect: implement scrollback.


# b54c6f2e 11-Aug-2014 Adrien Destugues <pulkomandy@pulkomandy.tk>

SerialConnect: fix font metrics for good.

* Set the background color in AttachedToWindow to avoid white lines in
initial drawing,
* Fix computation of font size again so lines don't overlap.

Note: lines are apparently spaced 1px less than in Terminal. But they
don't seem to touch or overlap each other in SerialConnect.


# 492ac416 22-Jan-2014 Adrien Destugues <pulkomandy@pulkomandy.tk>

Fixes CID 1162805, 1162804, 1162773, 1162759.


# ccc6b9be 20-Nov-2013 Adrien Destugues <pulkomandy@pulkomandy.tk>

Make SerialConnect more complete

* Mark the current connected device, or disable "Disconnect" menu when
there is no connection.
* Save and restore serial port settings
* Improve drawing code: make sure the border around the termview is
repainted, and do not leave a 1px space between lines unpainted.


# 5d6ec6d0 05-Nov-2012 Adrien Destugues - PulkoMandy <pulkomandy@pulkomandy.tk>

Handle colors.


# 7e23386a 05-Nov-2012 Adrien Destugues - PulkoMandy <pulkomandy@pulkomandy.tk>

Resize terminal buffer with window.

Unlike in Haiku terminal, vterm does not rearrange lines wen they
are wrapped. Chars outside the viewing area are just lost.


# a2021bee 26-Jul-2012 Adrien Destugues - PulkoMandy <pulkomandy@pulkomandy.tk>

Fix display for basic stuff.


# f441fd03 25-Jul-2012 Adrien Destugues - PulkoMandy <pulkomandy@pulkomandy.tk>

Working serial connection.
Still need some work on displaying the right chars at the right place.


# dae0a4e0 23-Jul-2012 Adrien Destugues - PulkoMandy <pulkomandy@pulkomandy.tk>

WIP version of SerialConnect. Not working, but added to the tree anyway so :
* You can code review it
* You can help developping
Uses libvterm as the backend for parsing ANSI escape sequences. The lib was
changed slightly to build with GCC2. It could be used by Terminal as well as
it seems cleaner and more reliable than our current parser.


# 06f436b3ac2c073913bc7e7afb56365a2ca978eb 21-Oct-2014 Adrien Destugues <pulkomandy@gmail.com>

Use strict mode when url-decoding file requests.

We don't want '+' to become a space here.
Fixes #11109.


# 604dad94904781892ef4b637facfe848282c206d 22-Aug-2014 Adrien Destugues <pulkomandy@pulkomandy.tk>

SerialConnect: fix return and backspace keys.


# 730d796a176b80c8822267726afa9452230b5022 21-Aug-2014 Adrien Destugues <pulkomandy@pulkomandy.tk>

Style fixes.


# 37bea90971b01478dbd89d2d8165a6a6471be3cc 20-Aug-2014 Adrien Destugues <pulkomandy@pulkomandy.tk>

Translate arrow keys to VT100 escape sequences

* I think this is what everyone expects.


# e6e13325db17c87f25ae34f955121ae989d5a1d7 13-Aug-2014 Adrien Destugues <pulkomandy@pulkomandy.tk>

SerialConnect: some simplifications

* Use integers for x and y coordinates in the draw loop, too
* Simplify _GetCell by using the return value of vterm_screen_get_cell
to detect out of bounds access, instead of testing for that manually.


# 7e03464586277ae65a27b074b129bab1f2dc6124 12-Aug-2014 Adrien Destugues <pulkomandy@pulkomandy.tk>

Avoid calling PenLocation for every char.

PenLocation is retrieved from app_server (because DrawString changes it
there), so this made drawing very slow.


# 30636d2eb6364d45ffb804c51662eefbf6c03671 13-Aug-2014 Adrien Destugues <pulkomandy@pulkomandy.tk>

SerialConnect: draw the cursor.

* Drawn as "inverse video" for now.
* Should use VTerm state to get the cursor shape (rect, underline or
left line)
* Should also handle blinking if enabled, and visibility.


# ea7fbc874f27b3911ef191033736fde4c845eae0 13-Aug-2014 Adrien Destugues <pulkomandy@pulkomandy.tk>

Build fix.


# c38dd82ded6b8c5080c720b8f240eff4f4a70bf5 13-Aug-2014 Adrien Destugues <pulkomandy@pulkomandy.tk>

SerialConnect: use ints for font metrics

As pointed by Ingo, using a float here is useless because we want each
line to be the same integer number of pixels. Now thigs are drawn
properly and the view has the exact same size as Terminal's one (tested
with font sizes 10 and 18, so different leading values don't seem to be
a problem).

Thanks for reviewing!


# b59ed154866f94ab50fa95d10327dc9987d370e0 12-Aug-2014 Adrien Destugues <pulkomandy@pulkomandy.tk>

SerialConnect: implement scrollback.


# b54c6f2e65084a02437cb396f915aa347440b390 11-Aug-2014 Adrien Destugues <pulkomandy@pulkomandy.tk>

SerialConnect: fix font metrics for good.

* Set the background color in AttachedToWindow to avoid white lines in
initial drawing,
* Fix computation of font size again so lines don't overlap.

Note: lines are apparently spaced 1px less than in Terminal. But they
don't seem to touch or overlap each other in SerialConnect.


# 492ac4160ab1c3a9dfba827bcbae34f08494ee2d 22-Jan-2014 Adrien Destugues <pulkomandy@pulkomandy.tk>

Fixes CID 1162805, 1162804, 1162773, 1162759.


# ccc6b9be5b6527d14bb35b6ce57dcb422c0422f0 20-Nov-2013 Adrien Destugues <pulkomandy@pulkomandy.tk>

Make SerialConnect more complete

* Mark the current connected device, or disable "Disconnect" menu when
there is no connection.
* Save and restore serial port settings
* Improve drawing code: make sure the border around the termview is
repainted, and do not leave a 1px space between lines unpainted.


# 5d6ec6d03a891b68cdb52bd21430bc4f338f8773 05-Nov-2012 Adrien Destugues - PulkoMandy <pulkomandy@pulkomandy.tk>

Handle colors.


# 7e23386ae81d3e0b2053d1fc43d3d31267d516ad 05-Nov-2012 Adrien Destugues - PulkoMandy <pulkomandy@pulkomandy.tk>

Resize terminal buffer with window.

Unlike in Haiku terminal, vterm does not rearrange lines wen they
are wrapped. Chars outside the viewing area are just lost.


# a2021beee2e3391ebb2b2da1ed29438b6c4338e9 26-Jul-2012 Adrien Destugues - PulkoMandy <pulkomandy@pulkomandy.tk>

Fix display for basic stuff.


# f441fd03b6a6b31341c3f1d58d30395d220bcf50 25-Jul-2012 Adrien Destugues - PulkoMandy <pulkomandy@pulkomandy.tk>

Working serial connection.
Still need some work on displaying the right chars at the right place.


# dae0a4e0abda9ce3dff8e31007a8f66bc14421c8 23-Jul-2012 Adrien Destugues - PulkoMandy <pulkomandy@pulkomandy.tk>

WIP version of SerialConnect. Not working, but added to the tree anyway so :
* You can code review it
* You can help developping
Uses libvterm as the backend for parsing ANSI escape sequences. The lib was
changed slightly to build with GCC2. It could be used by Terminal as well as
it seems cleaner and more reliable than our current parser.