Documentation
¶
Overview ¶
Copyright Consensys Software Inc.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
SPDX-License-Identifier: Apache-2.0
Copyright Consensys Software Inc.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
SPDX-License-Identifier: Apache-2.0
Copyright Consensys Software Inc.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
SPDX-License-Identifier: Apache-2.0
Copyright Consensys Software Inc.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
SPDX-License-Identifier: Apache-2.0
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewSeparator ¶
NewSeparator constructs a new separator with a given separator character.
Types ¶
type Separator ¶
type Separator struct {
// contains filtered or unexported fields
}
Separator is intended to be something like a horizontal rule, where the separator character can be specified.
type Table ¶
type Table struct {
// contains filtered or unexported fields
}
Table is a grid of cells of varying width.
func NewTable ¶
func NewTable(source TableSource) *Table
NewTable constructs a new table with a given source.
func (*Table) GetHeight ¶
GetHeight of this widget, where MaxUint indicates widget expands to take as much as it can.
func (*Table) SetSource ¶
func (p *Table) SetSource(source TableSource)
SetSource sets the table source.
type TableSource ¶
type TableSource interface { // Width returns the width of a given column. ColumnWidth(col uint) uint // Get content of given cell in table. CellAt(col, row uint) termio.FormattedText }
TableSource is an abstraction used by a table to determine what values to put in each cell.
type Tabs ¶
type Tabs struct {
// contains filtered or unexported fields
}
Tabs is a simple widget which shows a bunch of titles in a bar, and highlights a selected one.
func (*Tabs) GetHeight ¶
GetHeight of this widget, where MaxUint indicates widget expands to take as much as it can.
type TextLine ¶
type TextLine struct {
// contains filtered or unexported fields
}
TextLine displays a line of formatted text.
func NewText ¶
func NewText() *TextLine
NewText constructs a new text widget which is initially empty.
func (*TextLine) Add ¶
func (p *TextLine) Add(txt termio.FormattedText)
Add a new chunk of formatted text.