Documentation
¶
Index ¶
- Constants
- Variables
- func CESizeToCoords(cs CeSize) (int, int, int, int)
- func CreateButtonBarPage(style tvPageStyle) tview.Primitive
- func CreatePageByStyle(style tvPageStyle) tview.Primitive
- func RegisterTemplate(styleId int, clbck func(tvPageStyle) tview.Primitive)
- type CECard
- type CEListener
- type CElement
- type CElementBehavior
- type CeBox
- type CeSize
- type CeString
- type CellApp
- type TViewApplication
- func (t *TViewApplication) GetPages() *tview.Pages
- func (t *TViewApplication) NewPage(name string, style tvPageStyle, args ...interface{}) error
- func (t *TViewApplication) NewPageWithFlex(name string) *tview.Flex
- func (t *TViewApplication) SetHeader(header string)
- func (t *TViewApplication) Start() (*TViewApplication, error)
- func (t *TViewApplication) Stop()
- type TvButton
Constants ¶
View Source
const ( BubbleOff = 0 // no 'bubble' check. so any element that can hit, is hitted BubbleDown = 1 // only the last element on the list (what means it is visual on top) can be hit BubbleUp = 2 // reverse to BubleDown. means the first element (first drawn so visual in the background) only )
View Source
const ( // default events EventOnStart = "OnStart" EventOnInit = "OnInit" // defaut templates TplPageButtonMenu = 1 )
Variables ¶
View Source
var (
ButtonMenuPageStyle tvPageStyle = tvPageStyle{/* contains filtered or unexported fields */}
)
Functions ¶
func CESizeToCoords ¶
convert CESize to screen coordinates
func CreateButtonBarPage ¶
func CreatePageByStyle ¶
func RegisterTemplate ¶
Types ¶
type CECard ¶
type CECard struct { OnMouseOver func(x, y int) OnMouseLeave func() // contains filtered or unexported fields }
func (*CECard) GetBehavior ¶
func (card *CECard) GetBehavior() CElementBehavior
type CEListener ¶
type CElement ¶
type CElement interface { SetDim(left, top, width, height int) GetBehavior() CElementBehavior // contains filtered or unexported methods }
type CElementBehavior ¶
type CElementBehavior struct {
// contains filtered or unexported fields
}
Defines the behavior of the element
type CeBox ¶
type CeBox struct { OnMouseOver func(x, y int) OnMouseLeave func() // contains filtered or unexported fields }
func (*CeBox) GetBehavior ¶
func (box *CeBox) GetBehavior() CElementBehavior
type CeString ¶
type CeString struct { OnMouseOver func(x, y int) OnMouseLeave func() // contains filtered or unexported fields }
func NewTextLine ¶
func (*CeString) GetBehavior ¶
func (str *CeString) GetBehavior() CElementBehavior
type CellApp ¶
type CellApp struct { Listener CEListener // contains filtered or unexported fields }
func (*CellApp) AddElement ¶
AddElement adds visiual component to the application because it is added last, it be displayed on top
type TViewApplication ¶
type TViewApplication struct { OnStart *trigger.Event OnInit *trigger.Event // contains filtered or unexported fields }
func NewApplication ¶
func NewApplication(fullscreen bool) *TViewApplication
NewApplication creates a new Application with some default settings so it adds a main frame that includes some pages
func (*TViewApplication) GetPages ¶
func (t *TViewApplication) GetPages() *tview.Pages
func (*TViewApplication) NewPage ¶
func (t *TViewApplication) NewPage(name string, style tvPageStyle, args ...interface{}) error
func (*TViewApplication) NewPageWithFlex ¶
func (t *TViewApplication) NewPageWithFlex(name string) *tview.Flex
func (*TViewApplication) SetHeader ¶
func (t *TViewApplication) SetHeader(header string)
func (*TViewApplication) Start ¶
func (t *TViewApplication) Start() (*TViewApplication, error)
Start executes the Application and send the initial events
func (*TViewApplication) Stop ¶
func (t *TViewApplication) Stop()
Click to show internal directories.
Click to hide internal directories.