Documentation
¶
Index ¶
- type Command
- func (m *Command) CloneMessageVT() protobuf_go_lite.CloneMessage
- func (m *Command) CloneVT() *Command
- func (this *Command) EqualMessageVT(thatMsg any) bool
- func (this *Command) EqualVT(that *Command) bool
- func (x *Command) GetCommandId() string
- func (x *Command) GetDescription() string
- func (x *Command) GetHasSubItems() bool
- func (x *Command) GetIcon() string
- func (x *Command) GetKeybinding() string
- func (x *Command) GetLabel() string
- func (x *Command) GetMenuGroup() uint32
- func (x *Command) GetMenuOrder() uint32
- func (x *Command) GetMenuPath() string
- func (x *Command) MarshalJSON() ([]byte, error)
- func (x *Command) MarshalProtoJSON(s *json.MarshalState)
- func (x *Command) MarshalProtoText() string
- func (m *Command) MarshalToSizedBufferVT(dAtA []byte) (int, error)
- func (m *Command) MarshalToVT(dAtA []byte) (int, error)
- func (m *Command) MarshalVT() (dAtA []byte, err error)
- func (*Command) ProtoMessage()
- func (x *Command) Reset()
- func (m *Command) SizeVT() (n int)
- func (x *Command) String() string
- func (x *Command) UnmarshalJSON(b []byte) error
- func (x *Command) UnmarshalProtoJSON(s *json.UnmarshalState)
- func (m *Command) UnmarshalVT(dAtA []byte) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Command ¶
type Command struct {
// CommandId is the unique reverse-domain command identifier.
// e.g. "spacewave.file.save", "notes.new-note"
CommandId string `protobuf:"bytes,1,opt,name=command_id,json=commandId,proto3" json:"commandId,omitempty"`
// Label is the human-readable display name.
Label string `protobuf:"bytes,2,opt,name=label,proto3" json:"label,omitempty"`
// Keybinding is the default key combination.
// Format: "CmdOrCtrl+S", "CmdOrCtrl+Shift+P", "Alt+F4"
// CmdOrCtrl resolves to Cmd on macOS, Ctrl elsewhere.
Keybinding string `protobuf:"bytes,3,opt,name=keybinding,proto3" json:"keybinding,omitempty"`
// MenuPath is the menu placement path.
// Format: "File/Save", "File/Export/PDF", "View/Toggle Sidebar"
// Empty means the command is not in any menu.
MenuPath string `protobuf:"bytes,4,opt,name=menu_path,json=menuPath,proto3" json:"menuPath,omitempty"`
// MenuGroup controls separator placement within a menu level.
// Commands with the same group are visually grouped together.
MenuGroup uint32 `protobuf:"varint,5,opt,name=menu_group,json=menuGroup,proto3" json:"menuGroup,omitempty"`
// MenuOrder controls ordering within a group.
MenuOrder uint32 `protobuf:"varint,6,opt,name=menu_order,json=menuOrder,proto3" json:"menuOrder,omitempty"`
// Icon is an optional icon identifier.
Icon string `protobuf:"bytes,7,opt,name=icon,proto3" json:"icon,omitempty"`
// Description is an optional longer description for the palette.
Description string `protobuf:"bytes,8,opt,name=description,proto3" json:"description,omitempty"`
// HasSubItems indicates the command has a sub-item list in the palette.
// When selected, the palette replaces the command list with sub-items.
HasSubItems bool `protobuf:"varint,9,opt,name=has_sub_items,json=hasSubItems,proto3" json:"hasSubItems,omitempty"`
// contains filtered or unexported fields
}
Command is the metadata for a registered command.
func (*Command) CloneMessageVT ¶
func (m *Command) CloneMessageVT() protobuf_go_lite.CloneMessage
func (*Command) EqualMessageVT ¶
func (*Command) GetCommandId ¶
func (*Command) GetDescription ¶
func (*Command) GetHasSubItems ¶
func (*Command) GetKeybinding ¶
func (*Command) GetMenuGroup ¶
func (*Command) GetMenuOrder ¶
func (*Command) GetMenuPath ¶
func (*Command) MarshalJSON ¶
MarshalJSON marshals the Command to JSON.
func (*Command) MarshalProtoJSON ¶
func (x *Command) MarshalProtoJSON(s *json.MarshalState)
MarshalProtoJSON marshals the Command message to JSON.
func (*Command) MarshalProtoText ¶
func (*Command) MarshalToSizedBufferVT ¶
func (*Command) ProtoMessage ¶
func (*Command) ProtoMessage()
func (*Command) UnmarshalJSON ¶
UnmarshalJSON unmarshals the Command from JSON.
func (*Command) UnmarshalProtoJSON ¶
func (x *Command) UnmarshalProtoJSON(s *json.UnmarshalState)
UnmarshalProtoJSON unmarshals the Command message from JSON.
func (*Command) UnmarshalVT ¶
Click to show internal directories.
Click to hide internal directories.