ContextResultBuilder
Builds an organized set of context actions for use by a context handler. This is typically built in an upstream direction; that is to say a parent will request context with an empty builder, and then building will start with the most downstream ContextProvider child, with intermediate layers then building on that result before ending up with a completely built-up builder back at the call site.
Context builders organize context actions in two layers
group: a string id used to cluster like actions together. In most context menus, these can be seen by the "divider lines" present between context action categories (think of the copy/cut/paste section for example)
type: a ContextType key that marks which type of context this action is handling. This is mostly used for access to specific builders later, as the actual context event will simply be selecting an option from a context menu list.
NOTE: this builder uses linked maps, so the entry order of groups and types will define their visual ordering.
Author
fzzyhmstrs
Since
0.6.0
Parameters
Position position context. This should start as the general parent context as applicable, often the screen position and dimensions. Children may update this position with more scoped context.
Types
Functions
Adds a context action builder to this builder
Adds a collection of context action builders to this builder
Applies changes to an existing group of ContextAction.Builder if any in the given group exist in this builder. Does nothing if they do not exist.
Applies changes to an existing ContextAction.Builder if it exists in this builder. Does nothing if it does not exist.
Modifies this builders Position context. Generally this would be done to "scope in" position, say to a parent elements position and dimensions.