key

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: May 13, 2026 License: BSD-3-Clause Imports: 0 Imported by: 0

Documentation

Index

Constants

View Source
const (
	INVALID_FIELDNAME = 255
	INVALID_FKEY      = ""
)
View Source
const INVALID_INDEX = -1

Variables

This section is empty.

Functions

func FieldnameFor

func FieldnameFor(fkey FKey) string

Types

type FKey

type FKey uint8
const (

	// ADD NEW FIELDS TO THIS BLOCK - ALPHABETICAL ORDER PLEASE!
	FKey_Checked FKey = iota
	FKey_Choice
	FKey_Choices
	FKey_ChoiceLabels
	FKey_CommandIssued
	FKey_Content
	FKey_Data
	FKey_Embodiment
	FKey_Expanded
	FKey_Exported
	FKey_FrameItems
	FKey_GroupItems
	FKey_HeaderRow
	FKey_Icon
	FKey_IconID
	FKey_ID
	FKey_Image
	FKey_Imported
	FKey_Issued
	FKey_Item
	FKey_Label
	FKey_LabelItem
	FKey_LeadingItem
	FKey_Level
	FKey_ListItems
	FKey_MainItem
	FKey_ModelFolder
	FKey_ModelItem
	FKey_ModelRow
	FKey_Name
	FKey_NumericEntry
	FKey_PeriodMs
	FKey_Ref
	FKey_Rows
	FKey_SelectedItems
	FKey_SelectedRows
	FKey_SelectionChanged
	FKey_SelectionMode
	FKey_Showing
	FKey_State
	FKey_Status
	FKey_SubItem
	FKey_Tag
	FKey_TextEntry
	FKey_TimerFired
	FKey_Title
	FKey_TrailingItem
	FKey_ValidExtensions

	// RESERVED CONSTANT
	FKey_MAXIMUMKEYS
)

func FKeyFor

func FKeyFor(fieldname string) FKey

type OnSetFunction

type OnSetFunction func(PKey, FKey, bool)

type PKey

type PKey []int

func EmptyPKey added in v0.0.27

func EmptyPKey() PKey

func NewPKey added in v0.0.14

func NewPKey(indices ...int) PKey

Create a PKey from the supplied indices.

func NewPKeyFromAny added in v0.0.14

func NewPKeyFromAny(indices ...any) PKey

Create a new PKey from a list of indices represented as any type.

func (PKey) AddLevel

func (pk PKey) AddLevel(index int) PKey

Returns a new PKey with the supplied index added to the end.

func (PKey) DescendsFrom

func (pk PKey) DescendsFrom(frompkey PKey) bool

Returns true if this PKey descends from the other PKey.

func (PKey) EqualTo added in v0.0.14

func (pk PKey) EqualTo(topk PKey) bool

Return true if this PKey is equal to the other PKey.

func (PKey) IndexAtLevel

func (pk PKey) IndexAtLevel(level int) int

Returns the index at supplied level.

func (PKey) Len added in v0.0.40

func (pk PKey) Len() int

Returns the number of levels in the PKey.

type PKeyLocator added in v0.0.27

type PKeyLocator struct {
	// The PKey being located.
	PKey PKey

	// The current level of the locator.
	LocationLevel int
}

A helper class to locate a Primitive in the model.

func NewPKeyLocator added in v0.0.27

func NewPKeyLocator(pkey PKey) *PKeyLocator

A helper object to locate a Primitive in the model.

func (*PKeyLocator) Located added in v0.0.27

func (loc *PKeyLocator) Located() bool

Return true if the locator is at the last level and therefore primitive has been located.

func (*PKeyLocator) NextIndex added in v0.0.27

func (loc *PKeyLocator) NextIndex() int

Advance the level and return the index at that level.

Jump to

Keyboard shortcuts

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