ui

package
v0.7.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 22, 2024 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	WindowTheme paint.Theme

	ActiveButtonTheme  paint.Theme
	DefaultButtonTheme paint.Theme

	SidebarFrameTheme  paint.Theme
	SidebarHeaderTheme paint.Theme
	SidebarButtonTheme paint.Theme
	SidebarActiveTheme paint.Theme
)
View Source
var ButtonActiveTheme paint.ThemeName = "toggle-button-active"

Functions

This section is empty.

Types

type CUI

type CUI struct {
	App ctk.Application

	HostFile     *editor.Hostfile
	SourceFile   string
	LastError    error
	ReadOnlyMode bool

	ContentsHBox ctk.HBox
	ActionHBox   ctk.HButtonBox
	Display      cdk.Display
	Window       ctk.Window
	SaveButton   ctk.Button
	ReloadButton ctk.Button
	QuitButton   ctk.Button

	EditingHBox ctk.HBox

	ByDomainsButton ctk.Button
	ByAddressButton ctk.Button
	ByEntryButton   ctk.Button

	SidebarFrame        ctk.Frame
	SidebarEntryList    ctk.VBox
	SidebarLocalsList   ctk.VBox
	SidebarCustomList   ctk.VBox
	SidebarCommentsList ctk.VBox

	SidebarAddEntryButton      ctk.Button
	SidebarMoveEntryUpButton   ctk.Button
	SidebarMoveEntryDownButton ctk.Button

	CommentsEntry  ctk.Entry
	HostEditVBox   ctk.VBox
	AddressEntry   ctk.Entry
	AddressButton  ctk.Button
	DomainsEntry   ctk.Entry
	ActivateButton ctk.Button
	DeleteButton   ctk.Button

	HostSelectedFrame    ctk.Frame
	NothingSelectedFrame ctk.Frame
	CommentSelectedFrame ctk.Frame

	SidebarMode  SidebarListMode
	SelectedHost *editor.Host

	EditorCommentList   []*editor.Host
	EditorAddressLookup map[string]*editor.Host
	EditorDomainsLookup map[string]*editor.Host

	sync.RWMutex
}

func NewUI

func NewUI(name string, usage string, description string, version string, tag string, title string, ttyPath string) (e *CUI)

func (*CUI) Run

func (c *CUI) Run(argv []string) (err error)

type SidebarListMode

type SidebarListMode uint8
const (
	ListByDomain SidebarListMode = iota
	ListByAddress
	ListByEntry
)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL