Documentation ¶
Index ¶
- Constants
- Variables
- func AttachFocusEvents(widget FocusableWidget, obj js.Value, rownum int)
- func ClearNode(node js.Value)
- func NewNode(parent js.Value, nodeType string) js.Value
- func RemoveNode(node js.Value)
- type BaseFocusableWidget
- func (w *BaseFocusableWidget) ColumnCell(parent js.Value) js.Value
- func (w *BaseFocusableWidget) DrawInMultiRow(parent js.Value, rownum int) js.Value
- func (w *BaseFocusableWidget) HTMLObject() js.Value
- func (w *BaseFocusableWidget) Index() int
- func (w *BaseFocusableWidget) Init(block *Block, widget FocusableWidget, parentWidget ParentWidget, label string)
- func (w *BaseFocusableWidget) IsFocusable() bool
- func (w *BaseFocusableWidget) IsInMultiRow() bool
- func (w *BaseFocusableWidget) Label() string
- func (w *BaseFocusableWidget) RefreshCell(cell js.Value, rowState int, value string)
- func (w *BaseFocusableWidget) SelectAll()
- func (w *BaseFocusableWidget) SetFocus()
- func (w *BaseFocusableWidget) SetIndex(index int)
- func (w *BaseFocusableWidget) SetLabel(label string)
- func (w *BaseFocusableWidget) WriteIfChanged(obj js.Value, rownum int) bool
- type BaseMultiRowWidget
- type BaseParentWidget
- func (w *BaseParentWidget) AddChild(child Widget)
- func (w *BaseParentWidget) Children() []Widget
- func (w *BaseParentWidget) Draw()
- func (w *BaseParentWidget) Init(block *Block, widget Widget, parentWidget ParentWidget)
- func (w *BaseParentWidget) IsParent() bool
- func (w *BaseParentWidget) Refresh()
- func (w *BaseParentWidget) RefreshCurrentRow()
- func (w *BaseParentWidget) Remove()
- type BaseWidget
- func (w *BaseWidget) Block() *Block
- func (w *BaseWidget) Draw()
- func (w *BaseWidget) HTMLObject() js.Value
- func (w *BaseWidget) Init(block *Block, widget Widget, parentWidget ParentWidget)
- func (w *BaseWidget) IsFocusable() bool
- func (w *BaseWidget) IsMultiRow() bool
- func (w *BaseWidget) IsParent() bool
- func (w *BaseWidget) ParentHTMLObject() js.Value
- func (w *BaseWidget) ParentWidget() Widget
- func (w *BaseWidget) Refresh()
- func (w *BaseWidget) RefreshCurrentRow()
- func (w *BaseWidget) Remove()
- func (w *BaseWidget) SetHTMLObject(obj js.Value)
- type Block
- func (b *Block) AddToFocusList(widget FocusableWidget)
- func (b *Block) Buffer() *Buffer
- func (b *Block) BufferPos2ViewRow(bufferPos int) (int, bool)
- func (b *Block) Close(msg string)
- func (b *Block) Connect(widget FocusableWidget, column string)
- func (b *Block) Draw()
- func (b *Block) FirstWidget() FocusableWidget
- func (b *Block) FocusCurrent()
- func (b *Block) GotoRequest(newWidget FocusableWidget, newPos int) bool
- func (b *Block) LastWidget() FocusableWidget
- func (b *Block) NextWidget() FocusableWidget
- func (b *Block) OnFocusToWidget(widget FocusableWidget)
- func (b *Block) Pos() int
- func (b *Block) PrevWidget() FocusableWidget
- func (b *Block) Refresh()
- func (b *Block) RefreshCurrentRow()
- func (b *Block) RownumState(rownum int) int
- func (b *Block) Send(msg string)
- func (b *Block) ViewRow2BufferPos(viewRow int) (int, bool)
- func (b *Block) Wait() string
- type Buffer
- func (b *Buffer) CalcView(begin int, end int, rows int) (int, int)
- func (b *Buffer) Field(name string) (*Field, error)
- func (b *Buffer) Fields() map[string]*Field
- func (b *Buffer) Get(column string) (string, error)
- func (b *Buffer) GetAt(pos int, column string) (string, error)
- func (b *Buffer) Goto(newPos int) int
- func (b *Buffer) InsertRow() int
- func (b *Buffer) Set(column string, value string) error
- func (b *Buffer) SetAt(pos int, column string, value string) error
- type Button
- type Container
- type Edit
- type Field
- type FocusableWidget
- type Label
- type ModalWindow
- type MultiRowWidget
- type ParentWidget
- type Row
- type Table
- func (w *Table) CellElement(colnum int, rownum int) js.Value
- func (w *Table) Draw()
- func (w *Table) DrawContent()
- func (w *Table) DrawRow(rownum int)
- func (w *Table) Refresh()
- func (w *Table) RefreshColumnAtRownum(widgetColumn FocusableWidget, rownum int)
- func (w *Table) RefreshCurrentRow()
- func (w *Table) RefreshRownum(rownum int)
- func (w *Table) Remove()
- type Widget
Constants ¶
View Source
const ( NOROW = -1 NOTINTABLE = -2 ROWNUM_NOT_EXISTS = 1 ROWNUM_NOT_CURRENT = 2 ROWNUM_CURRENT = 3 )
Variables ¶
View Source
var ( HTMLWindow = js.Global() HTMLDocument = HTMLWindow.Get("document") HTMLBody = HTMLDocument.Get("body") )
Functions ¶
func AttachFocusEvents ¶
func AttachFocusEvents(widget FocusableWidget, obj js.Value, rownum int)
func RemoveNode ¶
Types ¶
type BaseFocusableWidget ¶
type BaseFocusableWidget struct { BaseWidget // contains filtered or unexported fields }
func (*BaseFocusableWidget) ColumnCell ¶
func (w *BaseFocusableWidget) ColumnCell(parent js.Value) js.Value
If overriden, HTMLObject should be too
func (*BaseFocusableWidget) DrawInMultiRow ¶
func (*BaseFocusableWidget) HTMLObject ¶
func (w *BaseFocusableWidget) HTMLObject() js.Value
func (*BaseFocusableWidget) Index ¶
func (w *BaseFocusableWidget) Index() int
func (*BaseFocusableWidget) Init ¶
func (w *BaseFocusableWidget) Init(block *Block, widget FocusableWidget, parentWidget ParentWidget, label string)
func (*BaseFocusableWidget) IsFocusable ¶
func (w *BaseFocusableWidget) IsFocusable() bool
func (*BaseFocusableWidget) IsInMultiRow ¶
func (w *BaseFocusableWidget) IsInMultiRow() bool
func (*BaseFocusableWidget) Label ¶
func (w *BaseFocusableWidget) Label() string
func (*BaseFocusableWidget) RefreshCell ¶
func (w *BaseFocusableWidget) RefreshCell(cell js.Value, rowState int, value string)
func (*BaseFocusableWidget) SelectAll ¶
func (w *BaseFocusableWidget) SelectAll()
func (*BaseFocusableWidget) SetFocus ¶
func (w *BaseFocusableWidget) SetFocus()
func (*BaseFocusableWidget) SetIndex ¶
func (w *BaseFocusableWidget) SetIndex(index int)
func (*BaseFocusableWidget) SetLabel ¶
func (w *BaseFocusableWidget) SetLabel(label string)
func (*BaseFocusableWidget) WriteIfChanged ¶
func (w *BaseFocusableWidget) WriteIfChanged(obj js.Value, rownum int) bool
type BaseMultiRowWidget ¶
type BaseMultiRowWidget struct {
BaseParentWidget
}
func (*BaseMultiRowWidget) CellElement ¶
func (w *BaseMultiRowWidget) CellElement(colnum int, rownum int) js.Value
func (*BaseMultiRowWidget) Init ¶
func (w *BaseMultiRowWidget) Init(block *Block, widget Widget, parentWidget ParentWidget)
func (*BaseMultiRowWidget) IsMultiRow ¶
func (w *BaseMultiRowWidget) IsMultiRow() bool
type BaseParentWidget ¶
type BaseParentWidget struct { BaseWidget // contains filtered or unexported fields }
func (*BaseParentWidget) AddChild ¶
func (w *BaseParentWidget) AddChild(child Widget)
func (*BaseParentWidget) Children ¶
func (w *BaseParentWidget) Children() []Widget
func (*BaseParentWidget) Draw ¶
func (w *BaseParentWidget) Draw()
func (*BaseParentWidget) Init ¶
func (w *BaseParentWidget) Init(block *Block, widget Widget, parentWidget ParentWidget)
func (*BaseParentWidget) IsParent ¶
func (w *BaseParentWidget) IsParent() bool
func (*BaseParentWidget) Refresh ¶
func (w *BaseParentWidget) Refresh()
func (*BaseParentWidget) RefreshCurrentRow ¶
func (w *BaseParentWidget) RefreshCurrentRow()
func (*BaseParentWidget) Remove ¶
func (w *BaseParentWidget) Remove()
type BaseWidget ¶
type BaseWidget struct {
// contains filtered or unexported fields
}
func (*BaseWidget) Block ¶
func (w *BaseWidget) Block() *Block
func (*BaseWidget) Draw ¶
func (w *BaseWidget) Draw()
func (*BaseWidget) HTMLObject ¶
func (w *BaseWidget) HTMLObject() js.Value
func (*BaseWidget) Init ¶
func (w *BaseWidget) Init(block *Block, widget Widget, parentWidget ParentWidget)
func (*BaseWidget) IsFocusable ¶
func (w *BaseWidget) IsFocusable() bool
func (*BaseWidget) IsMultiRow ¶
func (w *BaseWidget) IsMultiRow() bool
func (*BaseWidget) IsParent ¶
func (w *BaseWidget) IsParent() bool
func (*BaseWidget) ParentHTMLObject ¶
func (w *BaseWidget) ParentHTMLObject() js.Value
func (*BaseWidget) ParentWidget ¶
func (w *BaseWidget) ParentWidget() Widget
func (*BaseWidget) Refresh ¶
func (w *BaseWidget) Refresh()
func (*BaseWidget) RefreshCurrentRow ¶
func (w *BaseWidget) RefreshCurrentRow()
func (*BaseWidget) Remove ¶
func (w *BaseWidget) Remove()
func (*BaseWidget) SetHTMLObject ¶
func (w *BaseWidget) SetHTMLObject(obj js.Value)
type Block ¶
type Block struct {
// contains filtered or unexported fields
}
func (*Block) AddToFocusList ¶
func (b *Block) AddToFocusList(widget FocusableWidget)
func (*Block) Connect ¶
func (b *Block) Connect(widget FocusableWidget, column string)
func (*Block) FirstWidget ¶
func (b *Block) FirstWidget() FocusableWidget
func (*Block) FocusCurrent ¶
func (b *Block) FocusCurrent()
func (*Block) GotoRequest ¶
func (b *Block) GotoRequest(newWidget FocusableWidget, newPos int) bool
func (*Block) LastWidget ¶
func (b *Block) LastWidget() FocusableWidget
func (*Block) NextWidget ¶
func (b *Block) NextWidget() FocusableWidget
func (*Block) OnFocusToWidget ¶
func (b *Block) OnFocusToWidget(widget FocusableWidget)
func (*Block) PrevWidget ¶
func (b *Block) PrevWidget() FocusableWidget
func (*Block) RefreshCurrentRow ¶
func (b *Block) RefreshCurrentRow()
func (*Block) RownumState ¶
type Button ¶
type Button struct { BaseFocusableWidget // contains filtered or unexported fields }
func (*Button) DrawInMultiRow ¶
func (*Button) RefreshCell ¶
func (*Button) SetHandler ¶
type Container ¶
type Container struct {
BaseParentWidget
}
func NewContainer ¶
func NewContainer(block *Block, parentWidget ParentWidget) *Container
type Edit ¶
type Edit struct { BaseFocusableWidget // contains filtered or unexported fields }
func (*Edit) RefreshCurrentRow ¶
func (w *Edit) RefreshCurrentRow()
type Field ¶
type Field struct {
// contains filtered or unexported fields
}
func NewBlockField ¶
func NewRowField ¶
func (*Field) IsRowField ¶
type FocusableWidget ¶
type Label ¶
type Label struct { BaseWidget // contains filtered or unexported fields }
type ModalWindow ¶
type ModalWindow struct { BaseParentWidget BackupDocumentOnMouseUp js.Value BackupDocumentOnMouseMove js.Value // contains filtered or unexported fields }
func NewModalWindow ¶
func NewModalWindow(block *Block, title string) *ModalWindow
func (*ModalWindow) Draw ¶
func (w *ModalWindow) Draw()
func (*ModalWindow) Remove ¶
func (w *ModalWindow) Remove()
func (*ModalWindow) SetCloseHandler ¶
func (w *ModalWindow) SetCloseHandler(hnd func(*ModalWindow))
type MultiRowWidget ¶
type MultiRowWidget interface { ParentWidget CellElement(int, int) js.Value }
type ParentWidget ¶
type Table ¶
type Table struct { BaseMultiRowWidget // contains filtered or unexported fields }
func NewTable ¶
func NewTable(block *Block, parentWidget ParentWidget) *Table
func (*Table) DrawContent ¶
func (w *Table) DrawContent()
func (*Table) RefreshColumnAtRownum ¶
func (w *Table) RefreshColumnAtRownum(widgetColumn FocusableWidget, rownum int)
func (*Table) RefreshCurrentRow ¶
func (w *Table) RefreshCurrentRow()
func (*Table) RefreshRownum ¶
Click to show internal directories.
Click to hide internal directories.