64 Commits

Author SHA1 Message Date
Roi Martin
b5f65e10ad Minor refactoring 2016-01-26 00:48:12 +01:00
Roi Martin
4b628e45b2 Add Gui.Execute to safely update the GUI from goroutines. 2016-01-26 00:06:54 +01:00
Roi Martin
639723c288 Rename Gui.EnableMouse to Gui.Mouse 2016-01-23 17:18:30 +01:00
Roi Martin
faa12e105a Full mouse support. Add mouse example. Make golint happy.
- Full mouse support based on hazbo's initial work.
- Add example to show mouse support.
- Fix comments, naming conventions, etc. to make golint happy.
2016-01-23 16:07:42 +01:00
Harry Lawrence
c36dfefa9b Enabled very basic mouse support
I see this as work in progress, for now. In terms of the public API, all the
end user has to do is something like g.EnableMouse = true. I think this is
reasonable and may not have to really change. Although I think the way it's
used with KeyBindings should maybe be changed. We need to expose the X and Y of
the click event - I'm not sure if this is possible currently, although Gui has
an unexported event field of type termbox.Event that I believe contains this
information.

Mouse support is something I need for a project I'm using Gocui, I noticed
there was an issue open in relation to this so I figured I'd send back what
I've started already.

Thanks for making gocui - it's awesome.
2015-12-11 11:51:43 +00:00
Roi Martin
e2590f1300 Decouple edition mode via Editor interface 2015-02-24 13:05:33 +01:00
Roi Martin
4dfc4973e0 Decouple edition mode 2015-02-24 00:26:26 +01:00
Roi Martin
4ad26839aa Mark views as tainted when they are resized 2015-02-23 16:37:49 +01:00
Roi Martin
622e7cbdf9 Initial implementation of the full edition mode 2015-02-23 00:34:41 +01:00
Roi Martin
b1ad4a9fa7 Remove internal call to View.SetCursor() and fix comment 2015-02-16 23:39:37 +01:00
Roi Martin
0193dee642 Refactoring of Gui.onKey() 2015-02-13 21:02:56 +01:00
Roi Martin
311dedb655 Move handleEdit to edit.go 2015-02-13 18:40:45 +01:00
Roi Martin
9b25959056 Optimizations on view redrawing when View.Wrap is enabled.
Refresh internal view buffer only when needed. Do not uses copy's.
2015-02-03 17:09:21 +01:00
Roi Martin
f819237d78 Add more details to Gui.Flush()'s documentation 2015-02-02 01:04:33 +01:00
Roi Martin
d786a4aec1 Update Gui.Flush()'s comment. 2015-02-02 00:46:04 +01:00
Roi Martin
c9c982ea9d Protect Gui from being flushed concurrently 2015-02-02 00:42:34 +01:00
Roi Martin
98a2fe7a6a Add missing LICENSE header. Fix typo in LICENSE headers 2015-01-31 20:39:43 +01:00
Roi Martin
f5cd17c3cc Rename ErrorQuit to Quit 2015-01-30 17:19:11 +01:00
Roi Martin
2db4573e76 Add function Gui.ViewPosition(). Add example.
The example "delete.go" will be useful to test optimization algorithms.
2015-01-25 14:07:14 +01:00
Roi Martin
264959b01e Minor code clean-up 2014-10-18 15:47:24 +02:00
Roi Martin
0aed73291b Merge branch 'master' of https://github.com/KayoticSully/gocui into Frame 2014-10-18 15:35:01 +02:00
Ryan Sullivan
8d584203d4 Added Support to toggle View Frames 2014-10-17 17:22:28 -04:00
Roi Martin (@nibble_ds)
cbacee3e65 Allow different colors per view 2014-05-03 15:20:46 +02:00
Roi Martin (@nibble_ds)
553b48c903 Fix typo in documentation. Minor fix in demo2 2014-01-27 22:50:02 +01:00
Roi Martin (@nibble_ds)
46b1452e71 Simplify demo2. Add Gui.CurrentView(). Fix keybindings 2014-01-27 22:41:58 +01:00
Roi Martin (@nibble_ds)
4b396e1d8b Move edit functions to edit.go 2014-01-22 23:44:08 +01:00
Roi Martin (@nibble_ds)
19e6c59da4 Implement basic edition 2014-01-22 22:37:53 +01:00
Roi Martin (@nibble_ds)
8b911edb5a Add doc. Check if name is "" in Gui.SetView 2014-01-21 07:59:53 +01:00
Roi Martin (@nibble_ds)
9726137f3b Use rune ' ' for empty cells 2014-01-20 23:28:08 +01:00
Roi Martin (@nibble_ds)
bae20cc034 Fix typo 2014-01-20 23:10:16 +01:00
Roi Martin (@nibble_ds)
0ae41d5e52 Editable views. Minor fix in Gui.draw()
First implementation of edit mode (overwrite)
Fix error handling in Gui.draw()
2014-01-20 23:03:28 +01:00
Roi Martin (@nibble_ds)
5dc9b75bc3 Add API documentation 2014-01-19 17:03:52 +01:00
Roi Martin (@nibble_ds)
9478f8b134 Support overlapping views 2014-01-18 13:47:08 +01:00
Roi Martin (@nibble_ds)
db002da861 Refactoring. Split Views internal buffer in lines. 2014-01-18 12:31:53 +01:00
Roi Martin (@nibble_ds)
4112df7d76 Simplify API. Rename getters. 2014-01-16 23:01:53 +01:00
Roi Martin (@nibble_ds)
83687dd884 Clean up API. Show text file in demo2.go 2014-01-16 00:28:16 +01:00
Roi Martin (@nibble_ds)
8a88a69100 Add LICENSE/AUTHORS headers and files 2014-01-14 20:11:12 +01:00
Roi Martin (@nibble_ds)
35b346590c Add scroll support. First approach. 2014-01-13 20:15:39 +01:00
Roi Martin (@nibble_ds)
a7d5a3d2cc Handle nil keybinding CB 2014-01-11 22:34:56 +01:00
Roi Martin (@nibble_ds)
cee092a9f8 Clean up API 2014-01-11 20:29:16 +01:00
Roi Martin (@nibble_ds)
f2e15a3795 Dispose old layout when a new one is selected. 2014-01-10 20:46:43 +01:00
Roi Martin (@nibble_ds)
47459ff2bc Minor fix 2014-01-10 20:25:37 +01:00
Roi Martin (@nibble_ds)
271ec3f2a0 Remove Gui.Start callback. Add Gui.SetLayout() 2014-01-10 20:21:54 +01:00
Roi Martin (@nibble_ds)
7c70c8be3b Implement View.Clear(). Simplify code. 2014-01-10 12:38:08 +01:00
Roi Martin (@nibble_ds)
dba04bf839 Add highlighting 2014-01-09 21:55:23 +01:00
Roi Martin (@nibble_ds)
10769ec99c Implement view's buffer and draw 2014-01-09 20:20:14 +01:00
Roi Martin (@nibble_ds)
82ad9fa4ba Implement View.SetCursor() 2014-01-06 18:36:38 +01:00
Roi Martin (@nibble_ds)
e9c0f38143 Hide cursor when Gui.ShowCursor==false 2014-01-06 13:56:28 +01:00
Roi Martin (@nibble_ds)
18bc554075 Add Gui.Start callback for initializations. Draw cursor. 2014-01-06 02:21:22 +01:00
Roi Martin (@nibble_ds)
efa370bfa8 Add SetCurrentView(). Remove dupped field Gui.curview 2014-01-06 01:47:22 +01:00