Documentation ¶
Index ¶
- Constants
- func Merge(dst, src Dict, key string, defaultValue interface{})
- func Scope(str ...string) string
- func VisitStack(in Input, cb func(b Shape) (keepGoing bool)) (exhausted bool)
- type Args
- type Connection
- type Dict
- type Flag
- type Flags
- type Input
- type Inputs
- type Limits
- type Mutator
- type OnDelete
- type Option
- type Project
- type Shape
- type Workspace
Constants ¶
View Source
const ( StatementInput = "input_statement" ValueInput = "input_value" DummyInput = "input_dummy" AngleField = "field_angle" CheckboxField = "field_checkbox" ColourField = "field_colour" DateField = "field_date" DropdownField = "field_dropdown" ImageField = "field_image" LabelField = "field_label" NumberField = "field_number" //options['value'], options['min'], options['max'], options['precision'] TextField = "field_input" // text input options['spellcheck”], VariableField = "field_variable" NextStatement = "NextStatement" PreviousStatement = "PreviousStatement" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Args ¶
type Args struct {
// contains filtered or unexported fields
}
Args - accumulate the inputs and fields of blocks.
type Connection ¶
type Connection interface { SourceBlock() Shape TargetBlock() Shape TargetConnection() Connection IsConnected() bool Connect(Connection) Disconnect() }
type Input ¶
type Input interface { InputName() string InputType() string SetInvisible() Connection() Connection }
type Inputs ¶
type Inputs interface { NumInputs() int Input(int) Input InputByName(string) (Input, int) RemoveInput(string) SetInput(int, Input) Interpolate(msg string, args []Dict) }
input access
type Limits ¶
lists types permitted to linking statements or terms becomes the "check" field in blockly block and item descriptions.
func MakeLimits ¶
list of type names allowed for a connection
func MakeUnlimited ¶
func MakeUnlimited() Limits
func (*Limits) Check ¶
func (l *Limits) Check() (ret interface{})
return the types in a blockly friendly format: a nil pointer, a string, or an array of strings.
func (*Limits) IsUnlimited ¶
type Mutator ¶
type Mutator interface { // list of block names to appear in the mui palette Quarks() []string // callback after a block instance containing a mutator has been created PostMixin(main Shape) error // MutationToDom(main Shape) (dom string, err error) DomToMutation(main Shape, dom string) error Decompose(main Shape, popup Workspace) (mui Shape, err error) Compose(main, mui Shape) error SaveConnections(main, mui Shape) error }
type Option ¶
type Option struct{}
for use with golang descriptions; to provide block options ex. Msg block.Option `msg:"The description of %1 is"` ex. Colour block.Option `colour:"160"`
type Shape ¶
type Shape interface { // unique only within the workspace BlockId() string BlockType() string // indicates if the block has been disposed ( deleted by the user. ) HasWorkspace() bool BlockWorkspace() Workspace InitSvg() // wish this happened on demand Dispose() // note: blockly puts all "fields" ( editable and non-editable items ) inside of inputs. Inputs Flags // for statement blocks, the following block in a stack of blocks PreviousConnection() Connection NextConnection() Connection }
an instance of a block
Click to show internal directories.
Click to hide internal directories.