guipb

package module
v0.0.25 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2025 License: GPL-3.0 Imports: 11 Imported by: 21

README

protobuf definition files for the GO gui plugins

Almost all of this code is autogenerated and there are no docs yet. This is an abstraction GUI protobuf that allows any protobuf .proto file to be turned into a spreadsheet and passed to the GO plugin to be displayed to the user.

The only functions written by hand are the Custom() functions which pass mouse clicks on the spreadsheet cells back to the application.

Rather than try to read this code, it's better to look at an example application that uses it. (forge, virtigo)

This code is what is called 'winning'

-- jcarr 2025/03/23

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ColAttr_VarType_name = map[int32]string{
		0: "ANY",
		1: "INT",
		2: "STRING",
		3: "TIME",
		4: "DURATION",
		5: "BYTES",
	}
	ColAttr_VarType_value = map[string]int32{
		"ANY":      0,
		"INT":      1,
		"STRING":   2,
		"TIME":     3,
		"DURATION": 4,
		"BYTES":    5,
	}
)

Enum value maps for ColAttr_VarType.

View Source
var (
	WidgetType_name = map[int32]string{
		0:  "Root",
		1:  "Flag",
		2:  "Window",
		3:  "Tab",
		4:  "Box",
		5:  "Group",
		6:  "Grid",
		7:  "Button",
		8:  "Checkbox",
		9:  "Dropdown",
		10: "Combobox",
		11: "Label",
		12: "Textbox",
		13: "TablePB",
	}
	WidgetType_value = map[string]int32{
		"Root":     0,
		"Flag":     1,
		"Window":   2,
		"Tab":      3,
		"Box":      4,
		"Group":    5,
		"Grid":     6,
		"Button":   7,
		"Checkbox": 8,
		"Dropdown": 9,
		"Combobox": 10,
		"Label":    11,
		"Textbox":  12,
		"TablePB":  13,
	}
)

Enum value maps for WidgetType.

View Source
var File_table_proto protoreflect.FileDescriptor
View Source
var File_widget_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type AnyCol added in v0.0.15

type AnyCol struct {
	Header  *Widget      `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"`
	Widgets []*Widget    `protobuf:"bytes,2,rep,name=widgets,proto3" json:"widgets,omitempty"`
	Attr    *ColAttr     `protobuf:"bytes,3,opt,name=attr,proto3" json:"attr,omitempty"`
	Vals    []*anypb.Any `protobuf:"bytes,4,rep,name=vals,proto3" json:"vals,omitempty"` // deprecate
	// contains filtered or unexported fields
}

func (*AnyCol) Descriptor deprecated added in v0.0.15

func (*AnyCol) Descriptor() ([]byte, []int)

Deprecated: Use AnyCol.ProtoReflect.Descriptor instead.

func (*AnyCol) GetAttr added in v0.0.15

func (x *AnyCol) GetAttr() *ColAttr

func (*AnyCol) GetHeader added in v0.0.15

func (x *AnyCol) GetHeader() *Widget

func (*AnyCol) GetVals added in v0.0.15

func (x *AnyCol) GetVals() []*anypb.Any

func (*AnyCol) GetWidgets added in v0.0.15

func (x *AnyCol) GetWidgets() []*Widget

func (*AnyCol) ProtoMessage added in v0.0.15

func (*AnyCol) ProtoMessage()

func (*AnyCol) ProtoReflect added in v0.0.15

func (x *AnyCol) ProtoReflect() protoreflect.Message

func (*AnyCol) Reset added in v0.0.15

func (x *AnyCol) Reset()

func (*AnyCol) String added in v0.0.15

func (x *AnyCol) String() string

type AnyColScanner added in v0.0.15

type AnyColScanner struct {
	sync.Mutex
	// contains filtered or unexported fields
}

func (*AnyColScanner) Next added in v0.0.15

func (it *AnyColScanner) Next() *AnyCol

Next() returns the next thing in the array

func (*AnyColScanner) Scan added in v0.0.15

func (it *AnyColScanner) Scan() bool

type ColAttr added in v0.0.15

type ColAttr struct {
	Pad   int32           `protobuf:"varint,1,opt,name=pad,proto3" json:"pad,omitempty"`
	Width int32           `protobuf:"varint,2,opt,name=width,proto3" json:"width,omitempty"`
	Click bool            `protobuf:"varint,3,opt,name=click,proto3" json:"click,omitempty"`
	Type  ColAttr_VarType `protobuf:"varint,4,opt,name=type,proto3,enum=gitpb.ColAttr_VarType" json:"type,omitempty"`
	// contains filtered or unexported fields
}

func (*ColAttr) Descriptor deprecated added in v0.0.15

func (*ColAttr) Descriptor() ([]byte, []int)

Deprecated: Use ColAttr.ProtoReflect.Descriptor instead.

func (*ColAttr) GetClick added in v0.0.15

func (x *ColAttr) GetClick() bool

func (*ColAttr) GetPad added in v0.0.15

func (x *ColAttr) GetPad() int32

func (*ColAttr) GetType added in v0.0.15

func (x *ColAttr) GetType() ColAttr_VarType

func (*ColAttr) GetWidth added in v0.0.15

func (x *ColAttr) GetWidth() int32

func (*ColAttr) ProtoMessage added in v0.0.15

func (*ColAttr) ProtoMessage()

func (*ColAttr) ProtoReflect added in v0.0.15

func (x *ColAttr) ProtoReflect() protoreflect.Message

func (*ColAttr) Reset added in v0.0.15

func (x *ColAttr) Reset()

func (*ColAttr) String added in v0.0.15

func (x *ColAttr) String() string

type ColAttrScanner added in v0.0.15

type ColAttrScanner struct {
	sync.Mutex
	// contains filtered or unexported fields
}

func (*ColAttrScanner) Next added in v0.0.15

func (it *ColAttrScanner) Next() *ColAttr

Next() returns the next thing in the array

func (*ColAttrScanner) Scan added in v0.0.15

func (it *ColAttrScanner) Scan() bool

type ColAttr_VarType added in v0.0.15

type ColAttr_VarType int32
const (
	ColAttr_ANY      ColAttr_VarType = 0
	ColAttr_INT      ColAttr_VarType = 1
	ColAttr_STRING   ColAttr_VarType = 2
	ColAttr_TIME     ColAttr_VarType = 3
	ColAttr_DURATION ColAttr_VarType = 4
	ColAttr_BYTES    ColAttr_VarType = 5
)

func (ColAttr_VarType) Descriptor added in v0.0.15

func (ColAttr_VarType) Enum added in v0.0.15

func (x ColAttr_VarType) Enum() *ColAttr_VarType

func (ColAttr_VarType) EnumDescriptor deprecated added in v0.0.15

func (ColAttr_VarType) EnumDescriptor() ([]byte, []int)

Deprecated: Use ColAttr_VarType.Descriptor instead.

func (ColAttr_VarType) Number added in v0.0.15

func (ColAttr_VarType) String added in v0.0.15

func (x ColAttr_VarType) String() string

func (ColAttr_VarType) Type added in v0.0.15

type Location added in v0.0.2

type Location struct {
	X int64 `protobuf:"varint,1,opt,name=x,proto3" json:"x,omitempty"`
	Y int64 `protobuf:"varint,2,opt,name=y,proto3" json:"y,omitempty"`
	// contains filtered or unexported fields
}

used for grid layouts

func (*Location) Descriptor deprecated added in v0.0.2

func (*Location) Descriptor() ([]byte, []int)

Deprecated: Use Location.ProtoReflect.Descriptor instead.

func (*Location) GetX added in v0.0.2

func (x *Location) GetX() int64

func (*Location) GetY added in v0.0.2

func (x *Location) GetY() int64

func (*Location) ProtoMessage added in v0.0.2

func (*Location) ProtoMessage()

func (*Location) ProtoReflect added in v0.0.2

func (x *Location) ProtoReflect() protoreflect.Message

func (*Location) Reset added in v0.0.2

func (x *Location) Reset()

func (*Location) String added in v0.0.2

func (x *Location) String() string

type LocationScanner added in v0.0.11

type LocationScanner struct {
	sync.Mutex
	// contains filtered or unexported fields
}

func (*LocationScanner) Next added in v0.0.11

func (it *LocationScanner) Next() *Location

Next() returns the next thing in the array

func (*LocationScanner) Scan added in v0.0.11

func (it *LocationScanner) Scan() bool

type Size added in v0.0.2

type Size struct {
	Width  int64 `protobuf:"varint,1,opt,name=width,proto3" json:"width,omitempty"`
	Height int64 `protobuf:"varint,2,opt,name=height,proto3" json:"height,omitempty"`
	// contains filtered or unexported fields
}

func (*Size) Descriptor deprecated added in v0.0.2

func (*Size) Descriptor() ([]byte, []int)

Deprecated: Use Size.ProtoReflect.Descriptor instead.

func (*Size) GetHeight added in v0.0.2

func (x *Size) GetHeight() int64

func (*Size) GetWidth added in v0.0.2

func (x *Size) GetWidth() int64

func (*Size) ProtoMessage added in v0.0.2

func (*Size) ProtoMessage()

func (*Size) ProtoReflect added in v0.0.2

func (x *Size) ProtoReflect() protoreflect.Message

func (*Size) Reset added in v0.0.2

func (x *Size) Reset()

func (*Size) String added in v0.0.2

func (x *Size) String() string

type SizeScanner added in v0.0.11

type SizeScanner struct {
	sync.Mutex
	// contains filtered or unexported fields
}

func (*SizeScanner) Next added in v0.0.11

func (it *SizeScanner) Next() *Size

Next() returns the next thing in the array

func (*SizeScanner) Scan added in v0.0.11

func (it *SizeScanner) Scan() bool

type Table added in v0.0.2

type Table struct {
	Uuid    string    `protobuf:"bytes,1,opt,name=uuid,proto3" json:"uuid,omitempty"`
	Title   string    `protobuf:"bytes,2,opt,name=title,proto3" json:"title,omitempty"`
	Parent  *Widget   `protobuf:"bytes,3,opt,name=parent,proto3" json:"parent,omitempty"`
	AnyCols []*AnyCol `protobuf:"bytes,4,rep,name=anyCols,proto3" json:"anyCols,omitempty"`
	Grid    *Widget   `protobuf:"bytes,5,opt,name=grid,proto3" json:"grid,omitempty"` // deprecate
	// contains filtered or unexported fields
}

func (*Table) Custom added in v0.0.9

func (pb *Table) Custom(w *Widget)

func (*Table) Descriptor deprecated added in v0.0.2

func (*Table) Descriptor() ([]byte, []int)

Deprecated: Use Table.ProtoReflect.Descriptor instead.

func (*Table) FormatJSON added in v0.0.2

func (v *Table) FormatJSON() string

human readable JSON

func (*Table) FormatTEXT added in v0.0.2

func (v *Table) FormatTEXT() string

apparently this isn't stable, but it's awesomely better https://protobuf.dev/reference/go/faq/#unstable-text it's brilliant for config files!

func (*Table) GetAnyCols added in v0.0.15

func (x *Table) GetAnyCols() []*AnyCol

func (*Table) GetGrid added in v0.0.3

func (x *Table) GetGrid() *Widget

func (*Table) GetParent added in v0.0.5

func (x *Table) GetParent() *Widget

func (*Table) GetTitle added in v0.0.3

func (x *Table) GetTitle() string

func (*Table) GetUuid added in v0.0.6

func (x *Table) GetUuid() string

func (*Table) Marshal added in v0.0.2

func (v *Table) Marshal() ([]byte, error)

marshal to wire. This is called winning.

func (*Table) MarshalJSON added in v0.0.2

func (v *Table) MarshalJSON() ([]byte, error)

marshal json

func (*Table) ProtoMessage added in v0.0.2

func (*Table) ProtoMessage()

func (*Table) ProtoReflect added in v0.0.2

func (x *Table) ProtoReflect() protoreflect.Message

func (*Table) RegisterCustom added in v0.0.9

func (pb *Table) RegisterCustom(f func(*Widget))

func (*Table) Reset added in v0.0.2

func (x *Table) Reset()

func (*Table) String added in v0.0.2

func (x *Table) String() string

func (*Table) Unmarshal added in v0.0.2

func (v *Table) Unmarshal(data []byte) error

unmarshal from wire. You have won.

func (*Table) UnmarshalJSON added in v0.0.2

func (v *Table) UnmarshalJSON(data []byte) error

unmarshal json

func (*Table) UnmarshalTEXT added in v0.0.2

func (v *Table) UnmarshalTEXT(data []byte) error

unmarshalTEXT. This reads the .text config file back in after the user edits it

type TableScanner added in v0.0.11

type TableScanner struct {
	sync.Mutex
	// contains filtered or unexported fields
}

func (*TableScanner) Next added in v0.0.11

func (it *TableScanner) Next() *Table

Next() returns the next thing in the array

func (*TableScanner) Scan added in v0.0.11

func (it *TableScanner) Scan() bool

type Tables added in v0.0.2

type Tables struct {
	Uuid    string   `protobuf:"bytes,1,opt,name=uuid,proto3" json:"uuid,omitempty"`       // `autogenpb:uuid:c328aa62-3c4f-4d00-9244-cc44ae75ab1b`
	Version string   `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"` // `autogenpb:version:v1`
	Tables  []*Table `protobuf:"bytes,3,rep,name=Tables,proto3" json:"Tables,omitempty"`
	// contains filtered or unexported fields
}

func NewTables added in v0.0.2

func NewTables() *Tables

func (*Tables) All added in v0.0.2

func (x *Tables) All() *TableScanner

func (*Tables) Append added in v0.0.2

func (x *Tables) Append(y *Table)

a Append() shortcut (that does Clone() with a mutex) notsure if it really works doesn't allow nil

func (*Tables) Clone added in v0.0.22

func (x *Tables) Clone(y *Table) *Table

a Clone() shortcut (with a mutex). notsure if it really works

func (*Tables) Custom added in v0.0.9

func (pb *Tables) Custom(w *Widget)

func (*Tables) Delete added in v0.0.2

func (x *Tables) Delete(y *Table) bool

func (*Tables) Descriptor deprecated added in v0.0.2

func (*Tables) Descriptor() ([]byte, []int)

Deprecated: Use Tables.ProtoReflect.Descriptor instead.

func (*Tables) FormatJSON added in v0.0.2

func (v *Tables) FormatJSON() string

human readable JSON

func (*Tables) FormatTEXT added in v0.0.2

func (v *Tables) FormatTEXT() string

apparently this isn't stable, but it's awesomely better https://protobuf.dev/reference/go/faq/#unstable-text it's brilliant for config files!

func (*Tables) GetTables added in v0.0.2

func (x *Tables) GetTables() []*Table

func (*Tables) GetUuid added in v0.0.2

func (x *Tables) GetUuid() string

func (*Tables) GetVersion added in v0.0.2

func (x *Tables) GetVersion() string

func (*Tables) IterAll added in v0.0.10

func (x *Tables) IterAll() iter.Seq[*Table]

Iterate 'for x := range' syntax using the awesome golang 1.24 'iter'

func (*Tables) Len added in v0.0.2

func (x *Tables) Len() int

func (*Tables) Marshal added in v0.0.2

func (v *Tables) Marshal() ([]byte, error)

marshal to wire. This is called winning.

func (*Tables) MarshalJSON added in v0.0.2

func (v *Tables) MarshalJSON() ([]byte, error)

marshal json

func (*Tables) ProtoMessage added in v0.0.2

func (*Tables) ProtoMessage()

func (*Tables) ProtoReflect added in v0.0.2

func (x *Tables) ProtoReflect() protoreflect.Message

func (*Tables) Reset added in v0.0.2

func (x *Tables) Reset()

func (*Tables) String added in v0.0.2

func (x *Tables) String() string

func (*Tables) Unmarshal added in v0.0.2

func (v *Tables) Unmarshal(data []byte) error

unmarshal from wire. You have won.

func (*Tables) UnmarshalJSON added in v0.0.2

func (v *Tables) UnmarshalJSON(data []byte) error

unmarshal json

func (*Tables) UnmarshalTEXT added in v0.0.2

func (v *Tables) UnmarshalTEXT(data []byte) error

unmarshalTEXT. This reads the .text config file back in after the user edits it

type TablesScanner added in v0.0.11

type TablesScanner struct {
	sync.Mutex
	// contains filtered or unexported fields
}

func (*TablesScanner) Next added in v0.0.11

func (it *TablesScanner) Next() *Tables

Next() returns the next thing in the array

func (*TablesScanner) Scan added in v0.0.11

func (it *TablesScanner) Scan() bool

type Widget added in v0.0.2

type Widget struct {

	// Types that are assignable to Type:
	//
	//	*Widget_Root
	//	*Widget_Button
	//	*Widget_Window
	//	*Widget_Tab
	//	*Widget_Checkbox
	//	*Widget_TablePB
	//	*Widget_Textbox
	Type     isWidget_Type `protobuf_oneof:"type"`
	Id       int64         `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	Name     string        `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	Val      *anypb.Any    `protobuf:"bytes,3,opt,name=val,proto3" json:"val,omitempty"`
	Type_    WidgetType    `protobuf:"varint,6,opt,name=Type,proto3,enum=gitpb.WidgetType" json:"Type,omitempty"`
	Location *Location     `protobuf:"bytes,7,opt,name=location,proto3" json:"location,omitempty"`
	Children []*Widget     `protobuf:"bytes,8,rep,name=children,proto3" json:"children,omitempty"`
	// contains filtered or unexported fields
}

func (*Widget) Descriptor deprecated added in v0.0.2

func (*Widget) Descriptor() ([]byte, []int)

Deprecated: Use Widget.ProtoReflect.Descriptor instead.

func (*Widget) GetButton added in v0.0.11

func (x *Widget) GetButton() *Widget_Standard

func (*Widget) GetCheckbox added in v0.0.11

func (x *Widget) GetCheckbox() *Widget_Standard

func (*Widget) GetChildren added in v0.0.11

func (x *Widget) GetChildren() []*Widget

func (*Widget) GetId added in v0.0.2

func (x *Widget) GetId() int64

func (*Widget) GetLocation added in v0.0.2

func (x *Widget) GetLocation() *Location

func (*Widget) GetName added in v0.0.2

func (x *Widget) GetName() string

func (*Widget) GetRoot added in v0.0.11

func (x *Widget) GetRoot() *Widget_Internal

func (*Widget) GetTab added in v0.0.11

func (x *Widget) GetTab() *Widget_Standard

func (*Widget) GetTablePB added in v0.0.11

func (x *Widget) GetTablePB() []byte

func (*Widget) GetTextbox added in v0.0.11

func (x *Widget) GetTextbox() *Widget_Standard

func (*Widget) GetType added in v0.0.7

func (m *Widget) GetType() isWidget_Type

func (*Widget) GetType_ added in v0.0.11

func (x *Widget) GetType_() WidgetType

func (*Widget) GetVal added in v0.0.4

func (x *Widget) GetVal() *anypb.Any

func (*Widget) GetWindow added in v0.0.11

func (x *Widget) GetWindow() *Widget_Standard

func (*Widget) IsButton added in v0.0.11

func (x *Widget) IsButton() bool

func (*Widget) ProtoMessage added in v0.0.2

func (*Widget) ProtoMessage()

func (*Widget) ProtoReflect added in v0.0.2

func (x *Widget) ProtoReflect() protoreflect.Message

func (*Widget) Reset added in v0.0.2

func (x *Widget) Reset()

func (*Widget) String added in v0.0.2

func (x *Widget) String() string

type WidgetScanner added in v0.0.11

type WidgetScanner struct {
	sync.Mutex
	// contains filtered or unexported fields
}

func (*WidgetScanner) Next added in v0.0.11

func (it *WidgetScanner) Next() *Widget

Next() returns the next thing in the array

func (*WidgetScanner) Scan added in v0.0.11

func (it *WidgetScanner) Scan() bool

type WidgetType added in v0.0.7

type WidgetType int32
const (
	WidgetType_Root     WidgetType = 0  // the master 'root' node of the binary tree
	WidgetType_Flag     WidgetType = 1  // internal use
	WidgetType_Window   WidgetType = 2  //
	WidgetType_Tab      WidgetType = 3  // a tab like in firefox
	WidgetType_Box      WidgetType = 4  // must be either Vertical or Horizontal arrangment
	WidgetType_Group    WidgetType = 5  // think 'Appetizers' on a restaurant menu
	WidgetType_Grid     WidgetType = 6  // like drawers in a chest or post office boxes
	WidgetType_Button   WidgetType = 7  // user can click on this
	WidgetType_Checkbox WidgetType = 8  // true or false
	WidgetType_Dropdown WidgetType = 9  //
	WidgetType_Combobox WidgetType = 10 // a dropdown menu that can be edited by the user
	WidgetType_Label    WidgetType = 11 // a simple label
	WidgetType_Textbox  WidgetType = 12 // enter text
	WidgetType_TablePB  WidgetType = 13 // special case to allow the arbitrary GUI display of any other protobuf
)

func (WidgetType) Descriptor added in v0.0.7

func (WidgetType) Descriptor() protoreflect.EnumDescriptor

func (WidgetType) Enum added in v0.0.7

func (x WidgetType) Enum() *WidgetType

func (WidgetType) EnumDescriptor deprecated added in v0.0.7

func (WidgetType) EnumDescriptor() ([]byte, []int)

Deprecated: Use WidgetType.Descriptor instead.

func (WidgetType) Number added in v0.0.7

func (x WidgetType) Number() protoreflect.EnumNumber

func (WidgetType) String added in v0.0.7

func (x WidgetType) String() string

func (WidgetType) Type added in v0.0.7

type Widget_Button added in v0.0.11

type Widget_Button struct {
	Button *Widget_Standard `protobuf:"bytes,10,opt,name=button,proto3,oneof"`
}

type Widget_Checkbox added in v0.0.11

type Widget_Checkbox struct {
	Checkbox *Widget_Standard `protobuf:"bytes,13,opt,name=checkbox,proto3,oneof"`
}

type Widget_Internal added in v0.0.11

type Widget_Internal struct {
	ProgName string `protobuf:"bytes,1,opt,name=progName,proto3" json:"progName,omitempty"`
	// contains filtered or unexported fields
}

func (*Widget_Internal) Descriptor deprecated added in v0.0.11

func (*Widget_Internal) Descriptor() ([]byte, []int)

Deprecated: Use Widget_Internal.ProtoReflect.Descriptor instead.

func (*Widget_Internal) GetProgName added in v0.0.11

func (x *Widget_Internal) GetProgName() string

func (*Widget_Internal) ProtoMessage added in v0.0.11

func (*Widget_Internal) ProtoMessage()

func (*Widget_Internal) ProtoReflect added in v0.0.11

func (x *Widget_Internal) ProtoReflect() protoreflect.Message

func (*Widget_Internal) Reset added in v0.0.11

func (x *Widget_Internal) Reset()

func (*Widget_Internal) String added in v0.0.11

func (x *Widget_Internal) String() string

type Widget_Root added in v0.0.11

type Widget_Root struct {
	Root *Widget_Internal `protobuf:"bytes,9,opt,name=root,proto3,oneof"`
}

type Widget_Standard added in v0.0.11

type Widget_Standard struct {
	ProgName string `protobuf:"bytes,1,opt,name=progName,proto3" json:"progName,omitempty"`
	Name     string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	// contains filtered or unexported fields
}

func (*Widget_Standard) Descriptor deprecated added in v0.0.11

func (*Widget_Standard) Descriptor() ([]byte, []int)

Deprecated: Use Widget_Standard.ProtoReflect.Descriptor instead.

func (*Widget_Standard) GetName added in v0.0.11

func (x *Widget_Standard) GetName() string

func (*Widget_Standard) GetProgName added in v0.0.11

func (x *Widget_Standard) GetProgName() string

func (*Widget_Standard) ProtoMessage added in v0.0.11

func (*Widget_Standard) ProtoMessage()

func (*Widget_Standard) ProtoReflect added in v0.0.11

func (x *Widget_Standard) ProtoReflect() protoreflect.Message

func (*Widget_Standard) Reset added in v0.0.11

func (x *Widget_Standard) Reset()

func (*Widget_Standard) String added in v0.0.11

func (x *Widget_Standard) String() string

type Widget_Tab added in v0.0.11

type Widget_Tab struct {
	Tab *Widget_Standard `protobuf:"bytes,12,opt,name=tab,proto3,oneof"`
}

type Widget_TablePB added in v0.0.11

type Widget_TablePB struct {
	TablePB []byte `protobuf:"bytes,14,opt,name=tablePB,proto3,oneof"`
}

type Widget_Textbox added in v0.0.11

type Widget_Textbox struct {
	Textbox *Widget_Standard `protobuf:"bytes,15,opt,name=textbox,proto3,oneof"`
}

type Widget_Window added in v0.0.11

type Widget_Window struct {
	Window *Widget_Standard `protobuf:"bytes,11,opt,name=window,proto3,oneof"`
}

type Widgets added in v0.0.2

type Widgets struct {
	Uuid    string    `protobuf:"bytes,1,opt,name=uuid,proto3" json:"uuid,omitempty"`       // `autogenpb:uuid:0331fcd7-3c8c-43e4-be1b-77db6a6bc58c`
	Version string    `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"` // `autogenpb:version:v1`
	Widgets []*Widget `protobuf:"bytes,3,rep,name=Widgets,proto3" json:"Widgets,omitempty"` // this never gets used, but it's not worth violating the autogenpb standard
	Tree    *Widget   `protobuf:"bytes,4,opt,name=tree,proto3" json:"tree,omitempty"`       // everything is sent from go.wit.com/gui here
	// contains filtered or unexported fields
}

func NewWidgets added in v0.0.2

func NewWidgets() *Widgets

func (*Widgets) All added in v0.0.2

func (x *Widgets) All() *WidgetScanner

func (*Widgets) Append added in v0.0.2

func (x *Widgets) Append(y *Widget)

a Append() shortcut (that does Clone() with a mutex) notsure if it really works doesn't allow nil

func (*Widgets) Clone added in v0.0.22

func (x *Widgets) Clone(y *Widget) *Widget

a Clone() shortcut (with a mutex). notsure if it really works

func (*Widgets) Delete added in v0.0.2

func (x *Widgets) Delete(y *Widget) bool

func (*Widgets) Descriptor deprecated added in v0.0.2

func (*Widgets) Descriptor() ([]byte, []int)

Deprecated: Use Widgets.ProtoReflect.Descriptor instead.

func (*Widgets) FormatJSON added in v0.0.7

func (v *Widgets) FormatJSON() string

human readable JSON

func (*Widgets) FormatTEXT added in v0.0.7

func (v *Widgets) FormatTEXT() string

apparently this isn't stable, but it's awesomely better https://protobuf.dev/reference/go/faq/#unstable-text it's brilliant for config files!

func (*Widgets) GetTree added in v0.0.7

func (x *Widgets) GetTree() *Widget

func (*Widgets) GetUuid added in v0.0.2

func (x *Widgets) GetUuid() string

func (*Widgets) GetVersion added in v0.0.2

func (x *Widgets) GetVersion() string

func (*Widgets) GetWidgets added in v0.0.2

func (x *Widgets) GetWidgets() []*Widget

func (*Widgets) IterAll added in v0.0.10

func (x *Widgets) IterAll() iter.Seq[*Widget]

Iterate 'for x := range' syntax using the awesome golang 1.24 'iter'

func (*Widgets) Len added in v0.0.2

func (x *Widgets) Len() int

func (*Widgets) Marshal added in v0.0.7

func (v *Widgets) Marshal() ([]byte, error)

marshal to wire. This is called winning.

func (*Widgets) MarshalJSON added in v0.0.7

func (v *Widgets) MarshalJSON() ([]byte, error)

marshal json

func (*Widgets) ProtoMessage added in v0.0.2

func (*Widgets) ProtoMessage()

func (*Widgets) ProtoReflect added in v0.0.2

func (x *Widgets) ProtoReflect() protoreflect.Message

func (*Widgets) Reset added in v0.0.2

func (x *Widgets) Reset()

func (*Widgets) String added in v0.0.2

func (x *Widgets) String() string

func (*Widgets) Unmarshal added in v0.0.7

func (v *Widgets) Unmarshal(data []byte) error

unmarshal from wire. You have won.

func (*Widgets) UnmarshalJSON added in v0.0.7

func (v *Widgets) UnmarshalJSON(data []byte) error

unmarshal json

func (*Widgets) UnmarshalTEXT added in v0.0.7

func (v *Widgets) UnmarshalTEXT(data []byte) error

unmarshalTEXT. This reads the .text config file back in after the user edits it

type WidgetsScanner added in v0.0.11

type WidgetsScanner struct {
	sync.Mutex
	// contains filtered or unexported fields
}

func (*WidgetsScanner) Next added in v0.0.11

func (it *WidgetsScanner) Next() *Widgets

Next() returns the next thing in the array

func (*WidgetsScanner) Scan added in v0.0.11

func (it *WidgetsScanner) Scan() bool

Jump to

Keyboard shortcuts

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