diff --git a/README.md b/README.md index 0e44f41ef..7be6cfbc6 100644 --- a/README.md +++ b/README.md @@ -3,8 +3,8 @@ This is a simple UI toolkit for .NET. It is an updated version of -[gui.cs](https://github.com/mono/mono-curses/blob/master/gui.cs) that -I wrote for [mono-curses](https://github.com/mono/mono-curses). +[gui.cs](http://tirania.org/blog/archive/2007/Apr-16.html) that +I wrote for [mono-curses](https://github.com/mono/mono-curses) in 2007. The toolkit contains various controls (labesl, text entry, buttons, radio buttons, checkboxes, dialog boxes, windows, menus) for building diff --git a/Terminal.Gui/Core.cs b/Terminal.Gui/Core.cs index 79dc308c4..842888a2e 100644 --- a/Terminal.Gui/Core.cs +++ b/Terminal.Gui/Core.cs @@ -106,7 +106,11 @@ namespace Terminal.Gui { return false; } - // Mouse events + /// + /// Method invoked when a mouse event is generated + /// + /// true, if the event was handled, false otherwise. + /// Me. public virtual bool MouseEvent (MouseEvent me) { return false; diff --git a/Terminal.Gui/Driver.cs b/Terminal.Gui/Driver.cs index eb3753f00..49fc3dfcc 100644 --- a/Terminal.Gui/Driver.cs +++ b/Terminal.Gui/Driver.cs @@ -93,9 +93,14 @@ namespace Terminal.Gui { /// public struct Attribute { internal int value; - public Attribute (int v) + + /// + /// Initializes a new instance of the struct. + /// + /// Value. + public Attribute (int value) { - value = v; + this.value = value; } public static implicit operator int (Attribute c) => c.value; diff --git a/Terminal.Gui/Views/ListView.cs b/Terminal.Gui/Views/ListView.cs index 807b97002..aa2d4e716 100644 --- a/Terminal.Gui/Views/ListView.cs +++ b/Terminal.Gui/Views/ListView.cs @@ -256,6 +256,10 @@ namespace Terminal.Gui { CanFocus = true; } + /// + /// Redraws the ListView + /// + /// Region. public override void Redraw(Rect region) { var current = ColorScheme.Focus; @@ -287,6 +291,11 @@ namespace Terminal.Gui { /// public event Action SelectedChanged; + /// + /// Handles cursor movement for this view, passes all other events. + /// + /// true, if key was processed, false otherwise. + /// Keyboard event. public override bool ProcessKey (KeyEvent kb) { switch (kb.Key) { @@ -346,5 +355,13 @@ namespace Terminal.Gui { } return base.ProcessKey (kb); } + + /// + /// Positions the cursor in this view + /// + public override void PositionCursor() + { + Driver.Move (0, selected); + } } }