Commit Graph

71 Commits

Author SHA1 Message Date
Roi Martin 8c49240a03 Remove unreachable code 2016-05-17 22:42:36 +02:00
Roi Martin 248e4f4437 Do not show cursor when it's out of screen 2016-02-07 16:58:15 +01:00
Roi Martin 28abcdb8e4 Support set views on top
- Add method *Gui.SetViewOnTop
- Add example _examples/ontop.go to test this feature
2016-02-07 16:52:31 +01:00
Roi Martin bb01d13a95 Add view title (based on the implementation of @conejoninja) 2016-02-06 14:50:30 +01:00
Roi Martin 4aed924ceb Editor refactoring. Add doc. Simplify _examples. 2016-01-30 02:36:10 +01:00
Roi Martin ea4d0466c4 Rename Gui.ShowCursor to Gui.Cursor for consistency 2016-01-26 09:55:08 +01:00
Roi Martin 260872b0f7 Set cursor on mouse events 2016-01-26 09:40:06 +01:00
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