panels

package
v0.31.0 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2023 License: MIT Imports: 27 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AjaxSubmit int = iota + 1
	ServerSubmit
	ButtonSubmit
	ResetStateSubmit
	ProxyClick
)
View Source
const (
	ButtonAlert = iota + 11010
	ButtonMessage
	MessageAction
)
View Source
const (
	FileUploadAction = iota + 10120
)

Variables

This section is empty.

Functions

func NewCheckboxPanel

func NewCheckboxPanel(ctx context.Context, parent page.ControlI)

func NewDefaultPanel

func NewDefaultPanel(ctx context.Context, parent page.ControlI)

func NewDialogsPanel added in v0.9.3

func NewDialogsPanel(ctx context.Context, parent page.ControlI)

func NewFileSelectPanel added in v0.31.0

func NewFileSelectPanel(ctx context.Context, parent page.ControlI)

func NewHListPanel

func NewHListPanel(ctx context.Context, parent page.ControlI)

func NewHtmlPanel added in v0.29.1

func NewHtmlPanel(parent page.ControlI, id string) control.PanelI

NewHtmlPanel creates a new HtmlPanel panel control.

func NewImageCapturePanel added in v0.13.3

func NewImageCapturePanel(ctx context.Context, parent page.ControlI)

func NewPanelTemplatePanel added in v0.29.1

func NewPanelTemplatePanel(ctx context.Context, parent page.ControlI)

NewPanelTemplatePanel creates an example panel for the template panel.

This is just for the examples code. You would not normally need to create this extra function. Just directly call NewHtmlPanel, or whatever you call it in the "control" macro you define in the template.

func NewRepeaterPanel added in v0.2.3

func NewRepeaterPanel(ctx context.Context, parent page.ControlI)

func NewSelectListPanel

func NewSelectListPanel(ctx context.Context, parent page.ControlI)

func NewTableCheckboxPanel

func NewTableCheckboxPanel(ctx context.Context, parent page.ControlI)

func NewTableDbPanel

func NewTableDbPanel(ctx context.Context, parent page.ControlI)

func NewTablePanel

func NewTablePanel(ctx context.Context, parent page.ControlI)

func NewTableProxyPanel

func NewTableProxyPanel(ctx context.Context, parent page.ControlI)

func NewTableSelectPanel added in v0.2.0

func NewTableSelectPanel(ctx context.Context, parent page.ControlI)

func NewTextboxPanel

func NewTextboxPanel(ctx context.Context, parent page.ControlI)

Types

type CheckboxPanel

type CheckboxPanel struct {
	Panel
}

func (*CheckboxPanel) DoAction added in v0.23.0

func (p *CheckboxPanel) DoAction(ctx context.Context, a action.Params)

func (*CheckboxPanel) DrawTemplate

func (ctrl *CheckboxPanel) DrawTemplate(ctx context.Context, _w io.Writer) (err error)

DrawTemplate draws the content of the matching control's template file.

func (*CheckboxPanel) Init added in v0.5.0

func (p *CheckboxPanel) Init(self any, ctx context.Context, parent page.ControlI, id string)

type DefaultPanel

type DefaultPanel struct {
	Panel
}

func (*DefaultPanel) DrawTemplate

func (ctrl *DefaultPanel) DrawTemplate(ctx context.Context, _w io.Writer) (err error)

DrawTemplate draws the content of the matching control's template file.

type DialogsPanel added in v0.9.3

type DialogsPanel struct {
	Panel
}

func (*DialogsPanel) DoAction added in v0.23.0

func (p *DialogsPanel) DoAction(ctx context.Context, a action.Params)

func (*DialogsPanel) DrawTemplate added in v0.9.3

func (ctrl *DialogsPanel) DrawTemplate(ctx context.Context, _w io.Writer) (err error)

DrawTemplate draws the content of the matching control's template file.

func (*DialogsPanel) Init added in v0.9.3

func (p *DialogsPanel) Init(self any, ctx context.Context, parent page.ControlI, id string)

type FileSelectPanel added in v0.31.0

type FileSelectPanel struct {
	Panel
}

func (*FileSelectPanel) DoAction added in v0.31.0

func (p *FileSelectPanel) DoAction(ctx context.Context, a action.Params)

func (*FileSelectPanel) DrawTemplate added in v0.31.0

func (ctrl *FileSelectPanel) DrawTemplate(ctx context.Context, _w io.Writer) (err error)

DrawTemplate draws the content of the matching control's template file.

func (*FileSelectPanel) Init added in v0.31.0

func (p *FileSelectPanel) Init(self any, ctx context.Context, parent page.ControlI, id string)

type HListPanel

type HListPanel struct {
	Panel
}

func (*HListPanel) BindData

func (p *HListPanel) BindData(ctx context.Context, s DataManagerI)

func (*HListPanel) DrawTemplate

func (ctrl *HListPanel) DrawTemplate(ctx context.Context, _w io.Writer) (err error)

DrawTemplate draws the content of the matching control's template file.

func (*HListPanel) Init added in v0.5.0

func (p *HListPanel) Init(self any, ctx context.Context, parent page.ControlI, id string)

type HtmlPanel added in v0.29.1

type HtmlPanel struct {
	control.Panel
}

func GetHtmlPanel added in v0.29.1

func GetHtmlPanel(c page.ControlI, id string) *HtmlPanel

GetHtmlPanel is a convenience method to return the HtmlPanel with the given id from the page.

func (*HtmlPanel) DrawTemplate added in v0.29.1

func (ctrl *HtmlPanel) DrawTemplate(ctx context.Context, _w io.Writer) (err error)

DrawTemplate draws the template defined in the template file for the HtmlPanel control.

type HtmlPanelCreator added in v0.29.1

type HtmlPanelCreator struct {
	ID string
}

HtmlPanelCreator creates a div control that draws a template. Pass it to AddControls or as a child of a parent control.

func (HtmlPanelCreator) Create added in v0.29.1

Create is called by the framework to create the panel.

type ImageCapturePanel added in v0.13.3

type ImageCapturePanel struct {
	Panel
}

func (*ImageCapturePanel) DrawTemplate added in v0.13.3

func (ctrl *ImageCapturePanel) DrawTemplate(ctx context.Context, _w io.Writer) (err error)

DrawTemplate draws the content of the matching control's template file.

func (*ImageCapturePanel) Init added in v0.13.3

func (p *ImageCapturePanel) Init(self any, ctx context.Context, parent page.ControlI, id string)

type ProjectPanel

type ProjectPanel struct {
	Panel
	// contains filtered or unexported fields
}

func GetProjectPanel added in v0.2.0

func GetProjectPanel(c page.ControlI) *ProjectPanel

GetProjectPanel is a convenience method to return the panel with the given id from the page.

func NewProjectPanel

func NewProjectPanel(parent page.ControlI) *ProjectPanel

func (*ProjectPanel) DrawTemplate

func (p *ProjectPanel) DrawTemplate(ctx context.Context, _w io.Writer) (err error)

DrawTemplate draws the contents of the ProjectPanel panel.

func (*ProjectPanel) SetProject

func (p *ProjectPanel) SetProject(project *Project)

type ProjectPanelCreator added in v0.2.0

type ProjectPanelCreator struct {
}

ProjectPanelCreator creates a div control with child controls. Pass it to AddControls or as a child of a parent control.

func (ProjectPanelCreator) Create added in v0.2.0

Create is called by the framework to create the panel.

type RepeaterPanel added in v0.2.3

type RepeaterPanel struct {
	Panel
}

func (*RepeaterPanel) BindData added in v0.2.3

func (p *RepeaterPanel) BindData(ctx context.Context, s DataManagerI)

BindData satisfies the data provider interface so that the parent panel of the table is the one that is providing the table.

func (*RepeaterPanel) DrawTemplate added in v0.2.3

func (ctrl *RepeaterPanel) DrawTemplate(ctx context.Context, _w io.Writer) (err error)

DrawTemplate draws the content of the matching control's template file.

func (*RepeaterPanel) Init added in v0.5.0

func (p *RepeaterPanel) Init(self any, ctx context.Context, parent page.ControlI, id string)

func (*RepeaterPanel) RepeaterHtml added in v0.2.3

func (p *RepeaterPanel) RepeaterHtml(ctx context.Context, r RepeaterI, i int, data interface{}, w io.Writer)

type SelectListPanel

type SelectListPanel struct {
	Panel
}

func (*SelectListPanel) DoAction added in v0.23.0

func (p *SelectListPanel) DoAction(ctx context.Context, a action.Params)

func (*SelectListPanel) DrawTemplate

func (ctrl *SelectListPanel) DrawTemplate(ctx context.Context, _w io.Writer) (err error)

DrawTemplate draws the content of the matching control's template file.

func (*SelectListPanel) Init added in v0.5.0

func (p *SelectListPanel) Init(self any, ctx context.Context, parent page.ControlI, id string)

type SelectedProvider

type SelectedProvider struct {
	column2.DefaultCheckboxProvider
}

func (SelectedProvider) IsChecked

func (c SelectedProvider) IsChecked(data interface{}) bool

func (SelectedProvider) RowID

func (c SelectedProvider) RowID(data interface{}) string

type Table1Data

type Table1Data map[string]string

type TableCheckboxPanel

type TableCheckboxPanel struct {
	Panel
}

func (*TableCheckboxPanel) BindData

func (f *TableCheckboxPanel) BindData(ctx context.Context, s DataManagerI)

BindData satisfies the data provider interface so that the parent panel of the table is the one that is providing the table.

func (*TableCheckboxPanel) DoAction added in v0.23.0

func (p *TableCheckboxPanel) DoAction(ctx context.Context, a action.Params)

func (*TableCheckboxPanel) DrawTemplate

func (ctrl *TableCheckboxPanel) DrawTemplate(ctx context.Context, _w io.Writer) (err error)

DrawTemplate draws the content of the matching control's template file.

func (*TableCheckboxPanel) Init added in v0.5.0

func (p *TableCheckboxPanel) Init(self any, ctx context.Context, parent page.ControlI, id string)

type TableDbPanel

type TableDbPanel struct {
	Panel
}

func (*TableDbPanel) BindData

func (p *TableDbPanel) BindData(ctx context.Context, s DataManagerI)

BindData satisfies the data provider interface so that the parent panel of the table is the one that is providing the table.

func (*TableDbPanel) CellText

func (p *TableDbPanel) CellText(ctx context.Context, col ColumnI, info CellInfo) string

func (*TableDbPanel) DrawTemplate

func (ctrl *TableDbPanel) DrawTemplate(ctx context.Context, _w io.Writer) (err error)

DrawTemplate draws the content of the matching control's template file.

func (*TableDbPanel) Init added in v0.5.0

func (p *TableDbPanel) Init(self any, ctx context.Context, parent page.ControlI, id string)

type TableMapData

type TableMapData map[string]string

func (TableMapData) Get

func (m TableMapData) Get(i string) string

Get satisfies the Getter interface so it can be used in a Getter column.

type TablePanel

type TablePanel struct {
	Panel
}

func (*TablePanel) BindData

func (p *TablePanel) BindData(ctx context.Context, s DataManagerI)

BindData satisfies the data provider interface so that the parent panel of the table is the one that is providing the table.

func (*TablePanel) CellText

func (p *TablePanel) CellText(ctx context.Context, col ColumnI, info CellInfo) string

CellText here satisfies the CellTexter interface so that the panel can provide the text for a cell.

func (*TablePanel) DrawTemplate

func (ctrl *TablePanel) DrawTemplate(ctx context.Context, _w io.Writer) (err error)

DrawTemplate draws the content of the matching control's template file.

func (*TablePanel) Init added in v0.5.0

func (p *TablePanel) Init(self any, ctx context.Context, parent page.ControlI, id string)

type TableProxyPanel

type TableProxyPanel struct {
	Panel
}

func (*TableProxyPanel) BindData

func (p *TableProxyPanel) BindData(ctx context.Context, s DataManagerI)

BindData satisfies the data provider interface so that the parent panel of the table is the one that is providing the table.

func (*TableProxyPanel) CellText

func (p *TableProxyPanel) CellText(ctx context.Context, col ColumnI, info CellInfo) string

func (*TableProxyPanel) DoAction added in v0.23.0

func (p *TableProxyPanel) DoAction(ctx context.Context, a action.Params)

func (*TableProxyPanel) DrawTemplate

func (ctrl *TableProxyPanel) DrawTemplate(ctx context.Context, _w io.Writer) (err error)

DrawTemplate draws the content of the matching control's template file.

func (*TableProxyPanel) Init added in v0.5.0

func (p *TableProxyPanel) Init(self any, ctx context.Context, parent page.ControlI, id string)

type TableSelectPanel added in v0.2.0

type TableSelectPanel struct {
	Panel
}

func (*TableSelectPanel) BindData added in v0.2.0

func (p *TableSelectPanel) BindData(ctx context.Context, s DataManagerI)

BindData satisfies the data provider interface so that the parent panel of the table is the one that is providing the table.

func (*TableSelectPanel) DoAction added in v0.23.0

func (p *TableSelectPanel) DoAction(ctx context.Context, a action.Params)

func (*TableSelectPanel) DrawTemplate added in v0.2.0

func (ctrl *TableSelectPanel) DrawTemplate(ctx context.Context, _w io.Writer) (err error)

DrawTemplate draws the content of the matching control's template file.

func (*TableSelectPanel) Init added in v0.5.0

func (p *TableSelectPanel) Init(self any, ctx context.Context, parent page.ControlI, id string)

type TableSliceData

type TableSliceData []string

type TextboxPanel

type TextboxPanel struct {
	Panel
}

func (*TextboxPanel) DoAction added in v0.23.0

func (p *TextboxPanel) DoAction(ctx context.Context, a action.Params)

func (*TextboxPanel) DrawTemplate

func (ctrl *TextboxPanel) DrawTemplate(ctx context.Context, _w io.Writer) (err error)

DrawTemplate draws the content of the matching control's template file.

func (*TextboxPanel) Init added in v0.5.0

func (p *TextboxPanel) Init(self any, ctx context.Context, parent page.ControlI, id string)

Jump to

Keyboard shortcuts

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