declarative

package
v0.0.0-...-e8188c5 Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2012 License: BSD-3-Clause Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateActions

func CreateActions(items ...MenuItem) ([]*walk.Action, error)

func InitWidget

func InitWidget(d Widget, w walk.Widget, customInit func() error) error

Types

type Action

type Action struct {
	AssignTo    **walk.Action
	Text        string
	Image       *walk.Bitmap
	OnTriggered walk.EventHandler
}

type ActionRef

type ActionRef struct {
	Action *walk.Action
}

type CheckBox

type CheckBox struct {
	AssignTo           **walk.CheckBox
	Name               string
	Disabled           bool
	Hidden             bool
	Font               Font
	MinSize            Size
	MaxSize            Size
	StretchFactor      int
	Row                int
	RowSpan            int
	Column             int
	ColumnSpan         int
	ContextMenuActions []*walk.Action
	Text               string
	OnClicked          walk.EventHandler
}

func (CheckBox) Create

func (cb CheckBox) Create(parent walk.Container) error

func (CheckBox) WidgetInfo

func (cb CheckBox) WidgetInfo() (name string, disabled, hidden bool, font *Font, minSize, maxSize Size, stretchFactor, row, rowSpan, column, columnSpan int, contextMenuActions []*walk.Action)

type ComboBox

type ComboBox struct {
	AssignTo              **walk.ComboBox
	Name                  string
	Disabled              bool
	Hidden                bool
	Font                  Font
	MinSize               Size
	MaxSize               Size
	StretchFactor         int
	Row                   int
	RowSpan               int
	Column                int
	ColumnSpan            int
	ContextMenuActions    []*walk.Action
	Format                string
	Precision             int
	Model                 walk.ListModel
	OnCurrentIndexChanged walk.EventHandler
}

func (ComboBox) Create

func (cb ComboBox) Create(parent walk.Container) error

func (ComboBox) WidgetInfo

func (cb ComboBox) WidgetInfo() (name string, disabled, hidden bool, font *Font, minSize, maxSize Size, stretchFactor, row, rowSpan, column, columnSpan int, contextMenuActions []*walk.Action)

type Composite

type Composite struct {
	AssignTo           **walk.Composite
	Name               string
	Disabled           bool
	Hidden             bool
	Font               Font
	MinSize            Size
	MaxSize            Size
	StretchFactor      int
	Row                int
	RowSpan            int
	Column             int
	ColumnSpan         int
	ContextMenuActions []*walk.Action
	Layout             Layout
	Children           []Widget
}

func (Composite) ContainerInfo

func (c Composite) ContainerInfo() (Layout, []Widget)

func (Composite) Create

func (c Composite) Create(parent walk.Container) error

func (Composite) WidgetInfo

func (c Composite) WidgetInfo() (name string, disabled, hidden bool, font *Font, minSize, maxSize Size, stretchFactor, row, rowSpan, column, columnSpan int, contextMenuActions []*walk.Action)

type Container

type Container interface {
	ContainerInfo() (Layout, []Widget)
}

type CustomWidget

type CustomWidget struct {
	AssignTo            **walk.CustomWidget
	Name                string
	Disabled            bool
	Hidden              bool
	Font                Font
	MinSize             Size
	MaxSize             Size
	StretchFactor       int
	Row                 int
	RowSpan             int
	Column              int
	ColumnSpan          int
	ContextMenuActions  []*walk.Action
	Style               uint32
	Paint               walk.PaintFunc
	ClearsBackground    bool
	InvalidatesOnResize bool
}

func (CustomWidget) Create

func (cw CustomWidget) Create(parent walk.Container) error

func (CustomWidget) WidgetInfo

func (cw CustomWidget) WidgetInfo() (name string, disabled, hidden bool, font *Font, minSize, maxSize Size, stretchFactor, row, rowSpan, column, columnSpan int, contextMenuActions []*walk.Action)

type DateEdit

type DateEdit struct {
	AssignTo           **walk.DateEdit
	Name               string
	Disabled           bool
	Hidden             bool
	Font               Font
	MinSize            Size
	MaxSize            Size
	StretchFactor      int
	Row                int
	RowSpan            int
	Column             int
	ColumnSpan         int
	ContextMenuActions []*walk.Action
	MinDate            time.Time
	MaxDate            time.Time
	Date               time.Time
	OnDateChanged      walk.EventHandler
}

func (DateEdit) Create

func (de DateEdit) Create(parent walk.Container) error

func (DateEdit) WidgetInfo

func (de DateEdit) WidgetInfo() (name string, disabled, hidden bool, font *Font, minSize, maxSize Size, stretchFactor, row, rowSpan, column, columnSpan int, contextMenuActions []*walk.Action)

type Dialog

type Dialog struct {
	AssignTo           **walk.Dialog
	Name               string
	Disabled           bool
	Hidden             bool
	Font               Font
	MinSize            Size
	MaxSize            Size
	ContextMenuActions []*walk.Action
	Title              string
	Size               Size
	Layout             Layout
	Children           []Widget
	DefaultButton      **walk.PushButton
	CancelButton       **walk.PushButton
}

func (Dialog) ContainerInfo

func (d Dialog) ContainerInfo() (Layout, []Widget)

func (Dialog) Create

func (d Dialog) Create(parent walk.Container) error

func (Dialog) WidgetInfo

func (d Dialog) WidgetInfo() (name string, disabled, hidden bool, font *Font, minSize, maxSize Size, stretchFactor, row, rowSpan, column, columnSpan int, contextMenuActions []*walk.Action)

type Font

type Font struct {
	Family    string
	PointSize int
	Bold      bool
	Italic    bool
	Underline bool
	StrikeOut bool
}

func (Font) Create

func (f Font) Create() (*walk.Font, error)

type Grid

type Grid struct {
	Margins     Margins
	Spacing     int
	MarginsZero bool
	SpacingZero bool
}

func (Grid) Create

func (g Grid) Create() (walk.Layout, error)

type GroupBox

type GroupBox struct {
	AssignTo           **walk.GroupBox
	Name               string
	Disabled           bool
	Hidden             bool
	Font               Font
	MinSize            Size
	MaxSize            Size
	StretchFactor      int
	Row                int
	RowSpan            int
	Column             int
	ColumnSpan         int
	ContextMenuActions []*walk.Action
	Title              string
	Layout             Layout
	Children           []Widget
}

func (GroupBox) ContainerInfo

func (gb GroupBox) ContainerInfo() (Layout, []Widget)

func (GroupBox) Create

func (gb GroupBox) Create(parent walk.Container) error

func (GroupBox) WidgetInfo

func (gb GroupBox) WidgetInfo() (name string, disabled, hidden bool, font *Font, minSize, maxSize Size, stretchFactor, row, rowSpan, column, columnSpan int, contextMenuActions []*walk.Action)

type HBox

type HBox struct {
	Margins     Margins
	Spacing     int
	MarginsZero bool
	SpacingZero bool
}

func (HBox) Create

func (hb HBox) Create() (walk.Layout, error)

type HSpacer

type HSpacer struct {
	Name          string
	MinSize       Size
	MaxSize       Size
	StretchFactor int
	Row           int
	RowSpan       int
	Column        int
	ColumnSpan    int
	Size          int
}

func (HSpacer) Create

func (hs HSpacer) Create(parent walk.Container) (err error)

func (HSpacer) WidgetInfo

func (hs HSpacer) WidgetInfo() (name string, disabled, hidden bool, font *Font, minSize, maxSize Size, stretchFactor, row, rowSpan, column, columnSpan int, contextMenuActions []*walk.Action)

type ImageView

type ImageView struct {
	AssignTo           **walk.ImageView
	Name               string
	Disabled           bool
	Hidden             bool
	Font               Font
	MinSize            Size
	MaxSize            Size
	StretchFactor      int
	Row                int
	RowSpan            int
	Column             int
	ColumnSpan         int
	ContextMenuActions []*walk.Action
	Image              walk.Image
}

func (ImageView) Create

func (iv ImageView) Create(parent walk.Container) error

func (ImageView) WidgetInfo

func (iv ImageView) WidgetInfo() (name string, disabled, hidden bool, font *Font, minSize, maxSize Size, stretchFactor, row, rowSpan, column, columnSpan int, contextMenuActions []*walk.Action)

type Label

type Label struct {
	AssignTo           **walk.Label
	Name               string
	Disabled           bool
	Hidden             bool
	Font               Font
	MinSize            Size
	MaxSize            Size
	StretchFactor      int
	Row                int
	RowSpan            int
	Column             int
	ColumnSpan         int
	ContextMenuActions []*walk.Action
	Text               string
}

func (Label) Create

func (l Label) Create(parent walk.Container) error

func (Label) WidgetInfo

func (l Label) WidgetInfo() (name string, disabled, hidden bool, font *Font, minSize, maxSize Size, stretchFactor, row, rowSpan, column, columnSpan int, contextMenuActions []*walk.Action)

type Layout

type Layout interface {
	Create() (walk.Layout, error)
}

type LineEdit

type LineEdit struct {
	AssignTo           **walk.LineEdit
	Name               string
	Disabled           bool
	Hidden             bool
	Font               Font
	MinSize            Size
	MaxSize            Size
	StretchFactor      int
	Row                int
	RowSpan            int
	Column             int
	ColumnSpan         int
	ContextMenuActions []*walk.Action
	Text               string
	ReadOnly           bool
	CueBanner          string
	MaxLength          int
	PasswordMode       bool
	OnEditingFinished  walk.EventHandler
	OnReturnPressed    walk.EventHandler
	OnTextChanged      walk.EventHandler
}

func (LineEdit) Create

func (le LineEdit) Create(parent walk.Container) error

func (LineEdit) WidgetInfo

func (le LineEdit) WidgetInfo() (name string, disabled, hidden bool, font *Font, minSize, maxSize Size, stretchFactor, row, rowSpan, column, columnSpan int, contextMenuActions []*walk.Action)

type ListBox

type ListBox struct {
	AssignTo              **walk.ListBox
	Name                  string
	Disabled              bool
	Hidden                bool
	Font                  Font
	MinSize               Size
	MaxSize               Size
	StretchFactor         int
	Row                   int
	RowSpan               int
	Column                int
	ColumnSpan            int
	ContextMenuActions    []*walk.Action
	Format                string
	Precision             int
	Model                 walk.ListModel
	OnCurrentIndexChanged walk.EventHandler
	OnItemActivated       walk.EventHandler
}

func (ListBox) Create

func (lb ListBox) Create(parent walk.Container) error

func (ListBox) WidgetInfo

func (lb ListBox) WidgetInfo() (name string, disabled, hidden bool, font *Font, minSize, maxSize Size, stretchFactor, row, rowSpan, column, columnSpan int, contextMenuActions []*walk.Action)

type MainWindow

type MainWindow struct {
	AssignTo           **walk.MainWindow
	Name               string
	Disabled           bool
	Hidden             bool
	Font               Font
	MinSize            Size
	MaxSize            Size
	ContextMenuActions []*walk.Action
	Title              string
	Size               Size
	Layout             Layout
	Children           []Widget
	MenuActions        []*walk.Action
	ToolBarActions     []*walk.Action
}

func (MainWindow) ContainerInfo

func (mw MainWindow) ContainerInfo() (Layout, []Widget)

func (MainWindow) Create

func (mw MainWindow) Create(parent walk.Container) error

func (MainWindow) WidgetInfo

func (mw MainWindow) WidgetInfo() (name string, disabled, hidden bool, font *Font, minSize, maxSize Size, stretchFactor, row, rowSpan, column, columnSpan int, contextMenuActions []*walk.Action)

type Margins

type Margins struct {
	Left   int
	Top    int
	Right  int
	Bottom int
}
type Menu struct {
	AssignTo       **walk.Menu
	AssignActionTo **walk.Action
	Text           string
	Image          *walk.Bitmap
	Items          []MenuItem
}
type MenuItem interface {
	// contains filtered or unexported methods
}

type NumberEdit

type NumberEdit struct {
	AssignTo           **walk.NumberEdit
	Name               string
	Disabled           bool
	Hidden             bool
	Font               Font
	MinSize            Size
	MaxSize            Size
	StretchFactor      int
	Row                int
	RowSpan            int
	Column             int
	ColumnSpan         int
	ContextMenuActions []*walk.Action
	Decimals           int
	Increment          float64
	MinValue           float64
	MaxValue           float64
	Value              float64
	OnValueChanged     walk.EventHandler
}

func (NumberEdit) Create

func (ne NumberEdit) Create(parent walk.Container) error

func (NumberEdit) WidgetInfo

func (ne NumberEdit) WidgetInfo() (name string, disabled, hidden bool, font *Font, minSize, maxSize Size, stretchFactor, row, rowSpan, column, columnSpan int, contextMenuActions []*walk.Action)

type Orientation

type Orientation byte

type ProgressBar

type ProgressBar struct {
	AssignTo           **walk.ProgressBar
	Name               string
	Disabled           bool
	Hidden             bool
	Font               Font
	MinSize            Size
	MaxSize            Size
	StretchFactor      int
	Row                int
	RowSpan            int
	Column             int
	ColumnSpan         int
	ContextMenuActions []*walk.Action
	MinValue           int
	MaxValue           int
	Value              int
}

func (ProgressBar) Create

func (pb ProgressBar) Create(parent walk.Container) error

func (ProgressBar) WidgetInfo

func (pb ProgressBar) WidgetInfo() (name string, disabled, hidden bool, font *Font, minSize, maxSize Size, stretchFactor, row, rowSpan, column, columnSpan int, contextMenuActions []*walk.Action)

type PushButton

type PushButton struct {
	AssignTo           **walk.PushButton
	Name               string
	Disabled           bool
	Hidden             bool
	Font               Font
	MinSize            Size
	MaxSize            Size
	StretchFactor      int
	Row                int
	RowSpan            int
	Column             int
	ColumnSpan         int
	ContextMenuActions []*walk.Action
	Text               string
	OnClicked          walk.EventHandler
}

func (PushButton) Create

func (pb PushButton) Create(parent walk.Container) error

func (PushButton) WidgetInfo

func (pb PushButton) WidgetInfo() (name string, disabled, hidden bool, font *Font, minSize, maxSize Size, stretchFactor, row, rowSpan, column, columnSpan int, contextMenuActions []*walk.Action)

type RadioButton

type RadioButton struct {
	AssignTo           **walk.RadioButton
	Name               string
	Disabled           bool
	Hidden             bool
	Font               Font
	MinSize            Size
	MaxSize            Size
	StretchFactor      int
	Row                int
	RowSpan            int
	Column             int
	ColumnSpan         int
	ContextMenuActions []*walk.Action
	Text               string
	OnClicked          walk.EventHandler
}

func (RadioButton) Create

func (rb RadioButton) Create(parent walk.Container) error

func (RadioButton) WidgetInfo

func (rb RadioButton) WidgetInfo() (name string, disabled, hidden bool, font *Font, minSize, maxSize Size, stretchFactor, row, rowSpan, column, columnSpan int, contextMenuActions []*walk.Action)

type Size

type Size struct {
	Width  int
	Height int
}

type Splitter

type Splitter struct {
	AssignTo           **walk.Splitter
	Name               string
	Disabled           bool
	Hidden             bool
	Font               Font
	MinSize            Size
	MaxSize            Size
	StretchFactor      int
	Row                int
	RowSpan            int
	Column             int
	ColumnSpan         int
	ContextMenuActions []*walk.Action
	Layout             Layout
	Children           []Widget
	HandleWidth        int
	Orientation        Orientation
}

func (Splitter) ContainerInfo

func (s Splitter) ContainerInfo() (Layout, []Widget)

func (Splitter) Create

func (s Splitter) Create(parent walk.Container) error

func (Splitter) WidgetInfo

func (s Splitter) WidgetInfo() (name string, disabled, hidden bool, font *Font, minSize, maxSize Size, stretchFactor, row, rowSpan, column, columnSpan int, contextMenuActions []*walk.Action)

type TabPage

type TabPage struct {
	AssignTo           **walk.TabPage
	Name               string
	Disabled           bool
	Hidden             bool
	Font               Font
	MinSize            Size
	MaxSize            Size
	ContextMenuActions []*walk.Action
	Title              string
	Layout             Layout
	Children           []Widget
}

func (TabPage) ContainerInfo

func (tp TabPage) ContainerInfo() (Layout, []Widget)

func (TabPage) Create

func (tp TabPage) Create(parent walk.Container) error

func (TabPage) WidgetInfo

func (tp TabPage) WidgetInfo() (name string, disabled, hidden bool, font *Font, minSize, maxSize Size, stretchFactor, row, rowSpan, column, columnSpan int, contextMenuActions []*walk.Action)

type TabWidget

type TabWidget struct {
	AssignTo           **walk.TabWidget
	Name               string
	Disabled           bool
	Hidden             bool
	Font               Font
	MinSize            Size
	MaxSize            Size
	StretchFactor      int
	Row                int
	RowSpan            int
	Column             int
	ColumnSpan         int
	ContextMenuActions []*walk.Action
	Pages              []TabPage
}

func (TabWidget) Create

func (tw TabWidget) Create(parent walk.Container) error

func (TabWidget) WidgetInfo

func (tw TabWidget) WidgetInfo() (name string, disabled, hidden bool, font *Font, minSize, maxSize Size, stretchFactor, row, rowSpan, column, columnSpan int, contextMenuActions []*walk.Action)

type TableView

type TableView struct {
	AssignTo                   **walk.TableView
	Name                       string
	Disabled                   bool
	Hidden                     bool
	Font                       Font
	MinSize                    Size
	MaxSize                    Size
	StretchFactor              int
	Row                        int
	RowSpan                    int
	Column                     int
	ColumnSpan                 int
	ContextMenuActions         []*walk.Action
	Model                      walk.TableModel
	AlternatingRowBGColor      walk.Color
	CheckBoxes                 bool
	ItemStateChangedEventDelay int
	LastColumnStretched        bool
	ReorderColumnsEnabled      bool
	SingleItemSelection        bool
	OnCurrentIndexChanged      walk.EventHandler
	OnSelectedIndexesChanged   walk.EventHandler
	OnItemActivated            walk.EventHandler
}

func (TableView) Create

func (tv TableView) Create(parent walk.Container) error

func (TableView) WidgetInfo

func (tv TableView) WidgetInfo() (name string, disabled, hidden bool, font *Font, minSize, maxSize Size, stretchFactor, row, rowSpan, column, columnSpan int, contextMenuActions []*walk.Action)

type TextEdit

type TextEdit struct {
	AssignTo           **walk.TextEdit
	Name               string
	Disabled           bool
	Hidden             bool
	Font               Font
	MinSize            Size
	MaxSize            Size
	StretchFactor      int
	Row                int
	RowSpan            int
	Column             int
	ColumnSpan         int
	ContextMenuActions []*walk.Action
	Text               string
	ReadOnly           bool
}

func (TextEdit) Create

func (te TextEdit) Create(parent walk.Container) error

func (TextEdit) WidgetInfo

func (te TextEdit) WidgetInfo() (name string, disabled, hidden bool, font *Font, minSize, maxSize Size, stretchFactor, row, rowSpan, column, columnSpan int, contextMenuActions []*walk.Action)

type ToolBar

type ToolBar struct {
	AssignTo           **walk.ToolBar
	Name               string
	Disabled           bool
	Hidden             bool
	Font               Font
	MinSize            Size
	MaxSize            Size
	StretchFactor      int
	Row                int
	RowSpan            int
	Column             int
	ColumnSpan         int
	ContextMenuActions []*walk.Action
	Actions            []*walk.Action
	MaxTextRows        int
	Orientation        Orientation
}

func (ToolBar) Create

func (tb ToolBar) Create(parent walk.Container) (err error)

func (ToolBar) WidgetInfo

func (tb ToolBar) WidgetInfo() (name string, disabled, hidden bool, font *Font, minSize, maxSize Size, stretchFactor, row, rowSpan, column, columnSpan int, contextMenuActions []*walk.Action)

type ToolButton

type ToolButton struct {
	AssignTo           **walk.ToolButton
	Name               string
	Disabled           bool
	Hidden             bool
	Font               Font
	MinSize            Size
	MaxSize            Size
	StretchFactor      int
	Row                int
	RowSpan            int
	Column             int
	ColumnSpan         int
	ContextMenuActions []*walk.Action
	Text               string
	OnClicked          walk.EventHandler
}

func (ToolButton) Create

func (tb ToolButton) Create(parent walk.Container) error

func (ToolButton) WidgetInfo

func (tb ToolButton) WidgetInfo() (name string, disabled, hidden bool, font *Font, minSize, maxSize Size, stretchFactor, row, rowSpan, column, columnSpan int, contextMenuActions []*walk.Action)

type TreeView

type TreeView struct {
	AssignTo           **walk.TreeView
	Name               string
	Disabled           bool
	Hidden             bool
	Font               Font
	MinSize            Size
	MaxSize            Size
	StretchFactor      int
	Row                int
	RowSpan            int
	Column             int
	ColumnSpan         int
	ContextMenuActions []*walk.Action
}

func (TreeView) Create

func (tv TreeView) Create(parent walk.Container) error

func (TreeView) WidgetInfo

func (tv TreeView) WidgetInfo() (name string, disabled, hidden bool, font *Font, minSize, maxSize Size, stretchFactor, row, rowSpan, column, columnSpan int, contextMenuActions []*walk.Action)

type VBox

type VBox struct {
	Margins     Margins
	Spacing     int
	MarginsZero bool
	SpacingZero bool
}

func (VBox) Create

func (vb VBox) Create() (walk.Layout, error)

type VSpacer

type VSpacer struct {
	Name          string
	MinSize       Size
	MaxSize       Size
	StretchFactor int
	Row           int
	RowSpan       int
	Column        int
	ColumnSpan    int
	Size          int
}

func (VSpacer) Create

func (vs VSpacer) Create(parent walk.Container) (err error)

func (VSpacer) WidgetInfo

func (vs VSpacer) WidgetInfo() (name string, disabled, hidden bool, font *Font, minSize, maxSize Size, stretchFactor, row, rowSpan, column, columnSpan int, contextMenuActions []*walk.Action)

type WebView

type WebView struct {
	AssignTo           **walk.WebView
	Name               string
	Disabled           bool
	Hidden             bool
	Font               Font
	MinSize            Size
	MaxSize            Size
	StretchFactor      int
	Row                int
	RowSpan            int
	Column             int
	ColumnSpan         int
	ContextMenuActions []*walk.Action
	URL                string
}

func (WebView) Create

func (wv WebView) Create(parent walk.Container) error

func (WebView) WidgetInfo

func (wv WebView) WidgetInfo() (name string, disabled, hidden bool, font *Font, minSize, maxSize Size, stretchFactor, row, rowSpan, column, columnSpan int, contextMenuActions []*walk.Action)

type Widget

type Widget interface {
	Create(parent walk.Container) error
	WidgetInfo() (name string, disabled, hidden bool, font *Font, minSize, maxSize Size, stretchFactor, row, rowSpan, column, columnSpan int, contextMenuActions []*walk.Action)
}

Jump to

Keyboard shortcuts

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