Commit Graph

28 Commits

Author SHA1 Message Date
Antonio Lassandro c3ed795e59
Enable mouse support in views.Application (#494) 2021-10-10 22:41:26 -07:00
Adam Bozanich beb254a9ac
viewport: truncate size to area avaiable in parent (#153)
* viewport: truncate size to area avaiable in parent

* boxlayout: handle widget removal
2021-09-26 09:38:46 -07:00
Garrett D'Amore 8a32d2b0c8 Version 2.0 work in progress. 2020-08-25 16:20:58 -07:00
VÖRÖSKŐI András b0084cc526 Remove SetCursor(0,0) from CellArea SetModel
Removing SetCursor makes it possible to add lines to the model on the fly,
while keeping the cursor in position.

Go also initializes them with 0, no need to set it manually.
2020-05-27 19:47:21 -07:00
VÖRÖSKŐI András e277d9c03b Fix TextArea SetContent method
SetContent should overwrite the model, not append to it.

Add a test to check model's width and height after SetContent calls.
2020-05-07 07:39:48 -07:00
VÖRÖSKŐI András 1f1f979c1b TextArea: use [][]rune instead of []string in linesModel
This way GetCell() will get full runes, not just bytes. Now accent characters will show properly

Adjust SetLines() and Init() to work on [][]rune instead of []string
2020-04-13 12:51:31 -07:00
Anatoly Rugalev 96a065d8ff Fixed text incorrect width calculation for multiline strings 2020-03-15 10:34:41 -07:00
VÖRÖSKŐI András b03a4607a4 Add GetModel() method to CellView
GetModel() returns CellView.model type CellModel
2020-02-28 11:53:41 -08:00
VÖRÖSKŐI András 66b1faf255 CeellView corsor remove
Do not store cursor info (cursorX, CursorY) in CellView, as it belongs to the model (CellModel)

Use GetCursor() to identify current cursor position from CellModel
2020-02-28 11:53:41 -08:00
Garrett D'Amore a24b9b6b1c fixes #238 views: BoxLayout.Draw does unnecessary filling 2018-09-23 19:54:34 -07:00
Garrett D'Amore 82b7404080 fix regression caused by #177 in cleaning up
The defer of the screen.Fini() needed to include the defer of the
app.wg.Done(), and the original wg.Done needed to be eliminated.
The problem was originally spotted by @thechriswalker, with a proposed
fix that was close but not quite correct.
2018-01-08 09:49:58 -08:00
Joshua T Corbin d400d66308 Defer screen finish in app run 2017-12-25 02:13:52 -08:00
Adam Bozanich 582c2db721 boxlayout: handle widget removal (#160) 2017-09-14 23:13:49 -07:00
Tomas Vik 57a866e10c Adding Widget Resize to BoxLayout function
- Widget might be using not just View but other mechanisms for rendering
  aware of the view size (e.g. ViewPort).
- By updating the view reference out of Widget, Widget doesn't have a
  chance to react on this layout algorithm
- That's an existing bug that happens when we try to use CellView inside
  of an BoxLayout
2017-08-06 10:31:10 -07:00
Frank Braun 1f66b72172 views: move method call out of the inner loop
No need to retrieve the same values multiple times.
2017-06-20 20:13:35 -07:00
Frank Braun b87161466d views: fix corner case for limitCursor()
If m.width and m.height have not been initialized yet m.x and m.y would
be set to -1. Changing the order fixes that.
2017-06-20 20:13:35 -07:00
Frank Braun 440aba81dc Remove unnecessary initialization
window.updatesKeys() is called anyway
2017-06-20 20:10:52 -07:00
Frank Braun 9b7bd5c526 Remove unused struct field 2017-06-20 20:10:52 -07:00
Garrett D'Amore ad43f8729b fixes #117 Add PGUP, PGDN, HOME, and END key handling to TextArea 2016-05-24 01:26:09 -07:00
Garrett D'Amore c3e5bc256f fixes #116 Various improvements to tcell Views API 2016-05-24 00:50:38 -07:00
Garrett D'Amore e05a300454 fixes #113 Create SimpleStyledTextBar (forgot git add) 2016-05-23 15:30:37 -07:00
Garrett D'Amore 91d5e748ae fixes #114 Add Fill() method View API
fixes #113 Create SimpleStyledTextBar
2016-05-23 14:55:11 -07:00
Garrett D'Amore 114688d248 fixes #112 SimpleStyledText could have simpler & more powerful API 2016-05-23 13:13:23 -07:00
Garrett D'Amore 43f9cc0d07 fixes #75 Add goreport and fix related issues 2015-11-04 17:05:24 -08:00
Garrett D'Amore b727b9f424 fixes #74 Make Application an object/class
fixes #73 Views package has many go lint issues
2015-11-04 14:26:57 -08:00
Garrett D'Amore ed2fa2d51c fixes #72 Make TextBar zero value usable 2015-11-04 11:24:20 -08:00
Garrett D'Amore ca965237d9 fixes #52 Begin integrating topsl components 2015-11-01 14:44:23 -08:00
Garrett D'Amore e7d14c2863 fixes #62 windows console may have FIFO hang
fixes #63 Initial views API integration
2015-10-30 12:18:06 -07:00