Documentation
¶
Overview ¶
Package copymodetable provides a wrapper around a table that supports copy mode. The implementation currently supports clipping a whole row and also the whole table by providing these as interfaces to the New function. It's easy to imagine supporting narrowing the copy selection to a single column, but I don't need that yet...
Index ¶
- type ICopyModeTableNeeds
- type IRowCopier
- type ITableCopier
- type Widget
- func (w *Widget) Clips(app gowid.IApp) []gowid.ICopyResult
- func (w *Widget) CopyModeLevels() int
- func (w *Widget) ID() interface{}
- func (w *Widget) Render(size gowid.IRenderSize, focus gowid.Selector, app gowid.IApp) gowid.ICanvas
- func (w *Widget) SubWidget() gowid.IWidget
- func (w *Widget) UserInput(ev interface{}, size gowid.IRenderSize, focus gowid.Selector, app gowid.IApp) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ICopyModeTableNeeds ¶
type ICopyModeTableNeeds interface {
gowid.IWidget
list.IWalker
table.IGoToMiddle
withscrollbar.IScrollOneLine
withscrollbar.IScrollOnePage
CurrentRow() int
SetCurrentRow(table.Position)
Model() table.IModel
SetModel(table.IModel, gowid.IApp)
Cache() *lru.Cache
OnFocusChanged(gowid.IWidgetChangedCallback)
}
type IRowCopier ¶
type IRowCopier interface {
CopyRow(id table.RowId) []gowid.ICopyResult
}
type ITableCopier ¶
type ITableCopier interface {
CopyTable() []gowid.ICopyResult
}
type Widget ¶
type Widget struct {
ICopyModeTableNeeds
RowClip IRowCopier // Knows how to make a clip result set given a row
AllClip ITableCopier // Knows how to make a clip result set from the whole table
// contains filtered or unexported fields
}
func New ¶
func New(wrapped ICopyModeTableNeeds, rowClip IRowCopier, allClip ITableCopier, name string, clip gowid.IClipboardSelected) *Widget
func (*Widget) CopyModeLevels ¶
func (*Widget) ID ¶
func (w *Widget) ID() interface{}
The app stores which widget claims copy mode, and so each widget must check whether it's the one when it render itself.
Click to show internal directories.
Click to hide internal directories.