Versions in this module Expand all Collapse all v1 v1.0.0 Nov 6, 2018 Changes in this version + func AddOnMouseHandler(l **OnMouseHandlerList, h OnMouseHandler, finalizer func()) + func AddOnPaintHandler(l **OnPaintHandlerList, h OnPaintHandler, finalizer func()) + func AddOnSetBoolHandler(l **OnSetBoolHandlerList, h OnSetBoolHandler, finalizer func()) + func AddOnSetIntHandler(l **OnSetIntHandlerList, h OnSetIntHandler, finalizer func()) + func AddOnSetPositionHandler(l **OnSetPositionHandlerList, h OnSetPositionHandler, finalizer func()) + func AddOnSetSizeHandler(l **OnSetSizeHandlerList, h OnSetSizeHandler, finalizer func()) + func AddOnSetStyleHandler(l **OnSetStyleHandlerList, h OnSetStyleHandler, finalizer func()) + func RemoveOnMouseHandler(l **OnMouseHandlerList) + func RemoveOnPaintHandler(l **OnPaintHandlerList) + func RemoveOnSetBoolHandler(l **OnSetBoolHandlerList) + func RemoveOnSetIntHandler(l **OnSetIntHandlerList) + func RemoveOnSetPositionHandler(l **OnSetPositionHandlerList) + func RemoveOnSetSizeHandler(l **OnSetSizeHandlerList) + func RemoveOnSetStyleHandler(l **OnSetStyleHandlerList) + type Application struct + var App *Application + func NewApplication(theme *Theme) (*Application, error) + func (a *Application) BeginUpdate() + func (a *Application) ChildWindowStyle() WindowStyle + func (a *Application) ClickDuration() time.Duration + func (a *Application) Colors() int + func (a *Application) Desktop() (d *Desktop) + func (a *Application) DesktopStyle() WindowStyle + func (a *Application) DoubleClickDuration() time.Duration + func (a *Application) EndUpdate() + func (a *Application) Exit(err error) + func (a *Application) NewDesktop() *Desktop + func (a *Application) OnKey(h OnKeyHandler, finalize func()) + func (a *Application) OnSetClickDuration(h OnSetDurationHandler, finalize func()) + func (a *Application) OnSetDesktop(h OnSetDesktopHandler, finalize func()) + func (a *Application) OnSetDoubleClickDuration(h OnSetDurationHandler, finalize func()) + func (a *Application) OnSetSize(h OnSetSizeHandler, finalize func()) + func (a *Application) Post(f func()) + func (a *Application) PostWait(f func()) + func (a *Application) RemoveOnKey() + func (a *Application) RemoveOnSetClickDuration() + func (a *Application) RemoveOnSetDesktop() + func (a *Application) RemoveOnSetDoubleClickDuration() + func (a *Application) RemoveOnSetSize() + func (a *Application) Run(setup func()) error + func (a *Application) SetClickDuration(d time.Duration) + func (a *Application) SetDesktop(d *Desktop) + func (a *Application) SetDoubleClickDuration(d time.Duration) + func (a *Application) Size() (s Size) + func (a *Application) Sync() + func (a *Application) Wait() error + type Desktop struct + func (d *Desktop) FocusedWindow() *Window + func (d *Desktop) OnSetFocusedWindow(h OnSetWindowHandler, finalize func()) + func (d *Desktop) OnSetSelection(h OnSetRectangleHandler, finalize func()) + func (d *Desktop) RemoveOnSetFocusedWindow() + func (d *Desktop) RemoveOnSetSelection() + func (d *Desktop) Root() *Window + func (d *Desktop) Selection() Rectangle + func (d *Desktop) SetFocusedWindow(w *Window) + func (d *Desktop) SetSelection(area Rectangle) + func (d *Desktop) Show() + type OnCloseHandler func(w *Window, prev OnCloseHandler) + type OnKeyHandler func(w *Window, prev OnKeyHandler, key tcell.Key, mod tcell.ModMask, r rune) bool + type OnMouseHandler func(w *Window, prev OnMouseHandler, button tcell.ButtonMask, ...) bool + type OnMouseHandlerList struct + func (l *OnMouseHandlerList) Clear() + func (l *OnMouseHandlerList) Handle(w *Window, button tcell.ButtonMask, screenPos, winPos Position, ...) bool + type OnPaintHandler func(w *Window, prev OnPaintHandler, ctx PaintContext) + type OnPaintHandlerList struct + func (l *OnPaintHandlerList) Clear() + func (l *OnPaintHandlerList) Handle(w *Window, ctx PaintContext) + type OnSetBoolHandler func(w *Window, prev OnSetBoolHandler, dst *bool, src bool) + type OnSetBoolHandlerList struct + func (l *OnSetBoolHandlerList) Clear() + func (l *OnSetBoolHandlerList) Handle(w *Window, dst *bool, src bool) + type OnSetDesktopHandler func(w *Window, prev OnSetDesktopHandler, dst **Desktop, src *Desktop) + type OnSetDurationHandler func(w *Window, prev OnSetDurationHandler, dst *time.Duration, src time.Duration) + type OnSetIntHandler func(w *Window, prev OnSetIntHandler, dst *int, src int) + type OnSetIntHandlerList struct + func (l *OnSetIntHandlerList) Clear() + func (l *OnSetIntHandlerList) Handle(w *Window, dst *int, src int) + type OnSetPositionHandler func(w *Window, prev OnSetPositionHandler, dst *Position, src Position) + type OnSetPositionHandlerList struct + func (l *OnSetPositionHandlerList) Clear() + func (l *OnSetPositionHandlerList) Handle(w *Window, dst *Position, src Position) + type OnSetRectangleHandler func(w *Window, prev OnSetRectangleHandler, dst *Rectangle, src Rectangle) + type OnSetSizeHandler func(w *Window, prev OnSetSizeHandler, dst *Size, src Size) + type OnSetSizeHandlerList struct + func (l *OnSetSizeHandlerList) Clear() + func (l *OnSetSizeHandlerList) Handle(w *Window, dst *Size, src Size) + type OnSetStringHandler func(w *Window, prev OnSetStringHandler, dst *string, src string) + type OnSetStyleHandler func(w *Window, prev OnSetStyleHandler, dst *Style, src Style) + type OnSetStyleHandlerList struct + func (l *OnSetStyleHandlerList) Clear() + func (l *OnSetStyleHandlerList) Handle(w *Window, dst *Style, src Style) + type OnSetWindowHandler func(w *Window, prev OnSetWindowHandler, dst **Window, src *Window) + type OnSetWindowStyleHandler func(w *Window, prev OnSetWindowStyleHandler, dst *WindowStyle, src WindowStyle) + type PaintContext struct + type Position struct + X int + Y int + func (p Position) In(r Rectangle) bool + type Rectangle struct + func NewRectangle(x1, y1, x2, y2 int) Rectangle + func (r *Rectangle) Clip(s Rectangle) bool + func (r *Rectangle) Has(p Position) bool + type Size struct + Height int + Width int + func (s *Size) IsZero() bool + type Style struct + Attr tcell.AttrMask + Background tcell.Color + Foreground tcell.Color + func NewStyle(s tcell.Style) Style + func (s *Style) IsZero() bool + func (s Style) TCellStyle() tcell.Style + type Theme struct + ChildWindow WindowStyle + Desktop WindowStyle + func (t *Theme) Clear() + func (t *Theme) ReadFrom(r io.Reader) (int64, error) + func (t *Theme) WriteTo(w io.Writer) (int64, error) + type Window struct + func (w *Window) Area() Rectangle + func (w *Window) BeginUpdate() + func (w *Window) BorderBottom() int + func (w *Window) BorderBottomArea() (r Rectangle) + func (w *Window) BorderLeft() int + func (w *Window) BorderLeftArea() (r Rectangle) + func (w *Window) BorderRight() int + func (w *Window) BorderRightArea() (r Rectangle) + func (w *Window) BorderStyle() Style + func (w *Window) BorderTop() int + func (w *Window) BorderTopArea() (r Rectangle) + func (w *Window) BringToFront() + func (w *Window) Child(n int) (r *Window) + func (w *Window) Children() (r int) + func (w *Window) ClientArea() Rectangle + func (w *Window) ClientAreaStyle() Style + func (w *Window) ClientPosition() Position + func (w *Window) ClientSize() Size + func (w *Window) Close() + func (w *Window) CloseButton() bool + func (w *Window) Desktop() *Desktop + func (w *Window) EndUpdate() + func (w *Window) Focus() bool + func (w *Window) Invalidate(area Rectangle) + func (w *Window) InvalidateClientArea(area Rectangle) + func (w *Window) NewChild(area Rectangle) *Window + func (w *Window) OnClick(h OnMouseHandler, finalize func()) + func (w *Window) OnClickBorder(h OnMouseHandler, finalize func()) + func (w *Window) OnClose(h OnCloseHandler, finalize func()) + func (w *Window) OnDoubleClick(h OnMouseHandler, finalize func()) + func (w *Window) OnDoubleClickBorder(h OnMouseHandler, finalize func()) + func (w *Window) OnDrag(h OnMouseHandler, finalize func()) + func (w *Window) OnDragBorder(h OnMouseHandler, finalize func()) + func (w *Window) OnDrop(h OnMouseHandler, finalize func()) + func (w *Window) OnKey(h OnKeyHandler, finalize func()) + func (w *Window) OnMouseMove(h OnMouseHandler, finalize func()) + func (w *Window) OnPaintBorderBottom(h OnPaintHandler, finalize func()) + func (w *Window) OnPaintBorderLeft(h OnPaintHandler, finalize func()) + func (w *Window) OnPaintBorderRight(h OnPaintHandler, finalize func()) + func (w *Window) OnPaintBorderTop(h OnPaintHandler, finalize func()) + func (w *Window) OnPaintClientArea(h OnPaintHandler, finalize func()) + func (w *Window) OnPaintTitle(h OnPaintHandler, finalize func()) + func (w *Window) OnSetBorderBottom(h OnSetIntHandler, finalize func()) + func (w *Window) OnSetBorderLeft(h OnSetIntHandler, finalize func()) + func (w *Window) OnSetBorderRight(h OnSetIntHandler, finalize func()) + func (w *Window) OnSetBorderStyle(h OnSetStyleHandler, finalize func()) + func (w *Window) OnSetBorderTop(h OnSetIntHandler, finalize func()) + func (w *Window) OnSetClientAreaStyle(h OnSetStyleHandler, finalize func()) + func (w *Window) OnSetClientSize(h OnSetSizeHandler, finalize func()) + func (w *Window) OnSetCloseButton(h OnSetBoolHandler, finalize func()) + func (w *Window) OnSetFocus(h OnSetBoolHandler, finalize func()) + func (w *Window) OnSetOrigin(h OnSetPositionHandler, finalize func()) + func (w *Window) OnSetPosition(h OnSetPositionHandler, finalize func()) + func (w *Window) OnSetSize(h OnSetSizeHandler, finalize func()) + func (w *Window) OnSetStyle(h OnSetWindowStyleHandler, finalize func()) + func (w *Window) OnSetTitle(h OnSetStringHandler, finalize func()) + func (w *Window) Origin() Position + func (w *Window) Parent() *Window + func (w *Window) Position() Position + func (w *Window) Printf(x, y int, style Style, format string, arg ...interface{}) + func (w *Window) RemoveOnClick() + func (w *Window) RemoveOnClickBorder() + func (w *Window) RemoveOnClose() + func (w *Window) RemoveOnDoubleClick() + func (w *Window) RemoveOnDoubleClickBorder() + func (w *Window) RemoveOnDrag() + func (w *Window) RemoveOnDragBorder() + func (w *Window) RemoveOnDrop() + func (w *Window) RemoveOnKey() + func (w *Window) RemoveOnMouseMove() + func (w *Window) RemoveOnPaintBorderBottom() + func (w *Window) RemoveOnPaintBorderLeft() + func (w *Window) RemoveOnPaintBorderRight() + func (w *Window) RemoveOnPaintBorderTop() + func (w *Window) RemoveOnPaintClientArea() + func (w *Window) RemoveOnPaintTitle() + func (w *Window) RemoveOnSetBorderBottom() + func (w *Window) RemoveOnSetBorderLeft() + func (w *Window) RemoveOnSetBorderRight() + func (w *Window) RemoveOnSetBorderStyle() + func (w *Window) RemoveOnSetBorderTop() + func (w *Window) RemoveOnSetClientAreaStyle() + func (w *Window) RemoveOnSetClientSize() + func (w *Window) RemoveOnSetCloseButton() + func (w *Window) RemoveOnSetFocus() + func (w *Window) RemoveOnSetOrigin() + func (w *Window) RemoveOnSetPosition() + func (w *Window) RemoveOnSetSize() + func (w *Window) RemoveOnSetStyle() + func (w *Window) RemoveOnSetTitle() + func (w *Window) Rendered() time.Duration + func (w *Window) SetBorderBottom(v int) + func (w *Window) SetBorderLeft(v int) + func (w *Window) SetBorderRight(v int) + func (w *Window) SetBorderStyle(s Style) + func (w *Window) SetBorderTop(v int) + func (w *Window) SetCell(x, y int, mainc rune, combc []rune, style tcell.Style) + func (w *Window) SetClientAreaStyle(s Style) + func (w *Window) SetClientSize(s Size) + func (w *Window) SetCloseButton(v bool) + func (w *Window) SetFocus(v bool) + func (w *Window) SetOrigin(p Position) + func (w *Window) SetPosition(p Position) + func (w *Window) SetSize(s Size) + func (w *Window) SetStyle(s WindowStyle) + func (w *Window) SetTitle(s string) + func (w *Window) Size() Size + func (w *Window) Style() WindowStyle + func (w *Window) Title() string + type WindowStyle struct + Border Style + ClientArea Style + Title Style