Documentation ¶
Index ¶
- func NewBasicDialog(assignTo **walk.Dialog, title string, icon Property, db DataBinder, yes func(), ...) Dialog
- func NewBrowseLineEdit(assignTo **walk.LineEdit, visible, enable, text Property, title, filter string, ...) Composite
- func NewRadioButtonGroup(dataMember string, db *DataBinder, buttons []RadioButton) Composite
- func RunUI() error
- type AboutPage
- type Conf
- type ConfBinder
- type ConfPage
- type ConfView
- type DefaultListModel
- type DetailView
- type EditClientDialog
- type EditProxyDialog
- type FRPManager
- type GithubRelease
- type ListModel
- type LogModel
- type LogPage
- type PanelView
- type PluginProxyDialog
- type ProxyModel
- type ProxyView
- type QuickAdd
- type SimpleProxyDialog
- type SortedListModel
- type TextLine
- type View
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewBasicDialog ¶ added in v1.7.1
func NewBasicDialog(assignTo **walk.Dialog, title string, icon Property, db DataBinder, yes func(), widgets ...Widget) Dialog
NewBasicDialog returns a dialog with given widgets and default buttons
func NewBrowseLineEdit ¶ added in v1.7.0
func NewBrowseLineEdit(assignTo **walk.LineEdit, visible, enable, text Property, title, filter string, file bool) Composite
NewBrowseLineEdit places a tool button at the tail of a LineEdit, and opens a file dialog when the button is clicked
func NewRadioButtonGroup ¶ added in v1.7.1
func NewRadioButtonGroup(dataMember string, db *DataBinder, buttons []RadioButton) Composite
NewRadioButtonGroup returns a simple radio button group
Types ¶
type AboutPage ¶
func NewAboutPage ¶
func NewAboutPage() *AboutPage
type Conf ¶ added in v1.7.0
type Conf struct { sync.Mutex // Name of the config Name string // Path of the config file Path string // State of service State consts.ServiceState // Install indicates whether a service is installed Install bool // Data is ClientConfig or ServerConfig Data config.Config }
Conf contains all data of a config
type ConfBinder ¶ added in v1.7.0
type ConfBinder struct { // Current selected config Current *Conf // Selected indicates whether there's a selected config Selected bool // Commit will save the given config and try to reload service Commit func(conf *Conf, forceStart bool) }
ConfBinder is the view model of the current selected config
type ConfPage ¶
func NewConfPage ¶
func NewConfPage() *ConfPage
type ConfView ¶
func NewConfView ¶
func NewConfView() *ConfView
func (*ConfView) Invalidate ¶ added in v1.7.0
func (cv *ConfView) Invalidate()
Invalidate conf view with last selected index
type DefaultListModel ¶ added in v1.7.0
DefaultListModel has a default item at the top of the model
func NewDefaultListModel ¶ added in v1.7.0
func NewDefaultListModel(items []string, defaultKey string, defaultName string) []*DefaultListModel
type DetailView ¶
func NewDetailView ¶
func NewDetailView() *DetailView
func (*DetailView) Invalidate ¶ added in v1.7.0
func (dv *DetailView) Invalidate()
func (*DetailView) OnCreate ¶ added in v1.7.0
func (dv *DetailView) OnCreate()
func (*DetailView) View ¶ added in v1.7.0
func (dv *DetailView) View() Widget
type EditClientDialog ¶ added in v1.7.0
type EditClientDialog struct { *walk.Dialog // Config data Conf *Conf ShouldRestart bool // contains filtered or unexported fields }
func NewEditClientDialog ¶ added in v1.7.0
func NewEditClientDialog(conf *Conf) *EditClientDialog
func (*EditClientDialog) Run ¶ added in v1.7.0
func (cd *EditClientDialog) Run(owner walk.Form) (int, error)
func (*EditClientDialog) View ¶ added in v1.7.0
func (cd *EditClientDialog) View() Dialog
type EditProxyDialog ¶ added in v1.7.0
type EditProxyDialog struct { *walk.Dialog Proxy *config.Proxy // contains filtered or unexported fields }
func NewEditProxyDialog ¶ added in v1.7.0
func NewEditProxyDialog(proxy *config.Proxy) *EditProxyDialog
func (*EditProxyDialog) Run ¶ added in v1.7.0
func (pd *EditProxyDialog) Run(owner walk.Form) (int, error)
func (*EditProxyDialog) View ¶ added in v1.7.0
func (pd *EditProxyDialog) View() Dialog
type FRPManager ¶
type FRPManager struct { *walk.MainWindow // contains filtered or unexported fields }
type GithubRelease ¶ added in v1.7.0
type ListModel ¶ added in v1.7.0
type ListModel struct { walk.ListModelBase // contains filtered or unexported fields }
func NewListModel ¶ added in v1.7.0
type LogModel ¶
type LogModel struct { walk.ReflectTableModelBase // contains filtered or unexported fields }
func NewLogModel ¶
type LogPage ¶
func NewLogPage ¶
func NewLogPage() *LogPage
type PanelView ¶ added in v1.7.0
func NewPanelView ¶ added in v1.7.0
func NewPanelView() *PanelView
func (*PanelView) Invalidate ¶ added in v1.7.0
func (pv *PanelView) Invalidate()
Invalidate updates views using the current config
func (*PanelView) StartService ¶ added in v1.7.0
StartService creates a daemon service of the given config, then starts it
func (*PanelView) StopService ¶ added in v1.7.0
StopService stops the service of the given config, then removes it
func (*PanelView) ToggleService ¶ added in v1.7.0
func (pv *PanelView) ToggleService()
type PluginProxyDialog ¶ added in v1.7.1
type PluginProxyDialog struct { *walk.Dialog Proxies []*config.Proxy // contains filtered or unexported fields }
func NewPluginProxyDialog ¶ added in v1.7.1
func NewPluginProxyDialog(title string, icon *walk.Icon, plugin string) *PluginProxyDialog
NewPluginProxyDialog creates proxy with given plugin
func (*PluginProxyDialog) GetProxies ¶ added in v1.7.1
func (pp *PluginProxyDialog) GetProxies() []*config.Proxy
type ProxyModel ¶ added in v1.7.1
type ProxyModel struct { walk.ReflectTableModelBase // contains filtered or unexported fields }
func NewProxyModel ¶ added in v1.7.1
func NewProxyModel(conf *Conf) *ProxyModel
func (*ProxyModel) Items ¶ added in v1.7.1
func (m *ProxyModel) Items() interface{}
type ProxyView ¶ added in v1.7.1
func NewProxyView ¶ added in v1.7.1
func NewProxyView() *ProxyView
func (*ProxyView) Invalidate ¶ added in v1.7.1
func (pv *ProxyView) Invalidate()
type QuickAdd ¶ added in v1.7.1
type QuickAdd interface { // Run a new simple dialog to input few parameters Run(owner walk.Form) (int, error) // GetProxies returns the proxies generated by quick-add dialog GetProxies() []*config.Proxy }
QuickAdd is the interface that must be implemented to build a quick-add dialog
type SimpleProxyDialog ¶ added in v1.7.0
type SimpleProxyDialog struct { *walk.Dialog Proxies []*config.Proxy // contains filtered or unexported fields }
func NewSimpleProxyDialog ¶ added in v1.7.0
func NewSimpleProxyDialog(title string, icon *walk.Icon, service string, types []string, localAddr string) *SimpleProxyDialog
NewSimpleProxyDialog creates proxies connecting to the local service
func (*SimpleProxyDialog) GetProxies ¶ added in v1.7.1
func (sp *SimpleProxyDialog) GetProxies() []*config.Proxy
type SortedListModel ¶ added in v1.7.0
type SortedListModel struct { walk.TableModelBase // contains filtered or unexported fields }
func NewSortedListModel ¶ added in v1.7.0
func NewSortedListModel(items []*Conf) *SortedListModel
func (*SortedListModel) Items ¶ added in v1.7.0
func (m *SortedListModel) Items() interface{}
type View ¶ added in v1.7.0
type View interface { // View should define widget in declarative way, and will // be called by the parent widget. View() Widget // OnCreate will be called after the creation of views. The // view reference should be available now. OnCreate() // Invalidate should be called if data that view relying on // is changed. The view should be updated with new data. Invalidate() }
View is the interface that must be implemented to build a Widget.