Improve doc

This commit is contained in:
Roi Martin 2016-01-30 02:44:09 +01:00
parent 7e313a536f
commit 82070fd113

16
doc.go
View File

@ -24,15 +24,15 @@ Set the layout function:
g.SetLayout(fcn) g.SetLayout(fcn)
On each iteration of the GUI's main loop, the "layout function" will be On each iteration of the GUI's main loop, the "layout function" is executed.
executed. These layout functions can be used to set-up and update the main These layout functions can be used to set-up and update the application's main
application views, being possible to freely switch between them. Also, it is views, being possible to freely switch between them. Also, it is important to
important to mention that a main loop iteration is executed on each reported mention that a main loop iteration is executed on each reported event
event (key-press, mouse event, window resize, etc). (key-press, mouse event, window resize, etc).
GUIs are composed by Views, you can think of it as free text buffers. Views GUIs are composed by Views, you can think of it as buffers. Views implement the
implement the io.ReadWriter interface, so you can just write to them if you io.ReadWriter interface, so you can just write to them if you want to modify
want to modify their content and the same is valid for reading. their content. The same is valid for reading.
Create and initialize a view with absolute coordinates: Create and initialize a view with absolute coordinates: