GUIKit Example: CellularGroup
GUIKit Example: CellularGroup
The functionality provided by GUIKit has been superseded by the interface construction and controls functions native to the built-in Wolfram Language.
Needs["GUIKit`"]CellularGroupDialog[] := GUIRunModal["Wolfram/Example/CellularGroup"];def = Block[{$Path = $GUIPath},
Get["Wolfram/Example/CellularGroup.m"]]Example
This example demonstrates how to create a reusable GUIKit` widget for a cellular automaton.
CellularGroupDialog[]You can easily treat the CellularGroup example as a single reusable user interface element within other panels, as well as expose widgets within the definition uniquely.
Here we expose the canvas widget with unique names and create a modal result expression extracting the current graphics.
GUIRunModal[
Widget["Panel", {
Widget["Label", {"text" -> "Multiple
Cellular sessions"}],
{Widget["Wolfram/Example/CellularGroup", ExposeWidgetReferences -> {"canvas" -> "canvas1"}],
Widget["Wolfram/Example/CellularGroup", ExposeWidgetReferences -> {"canvas" -> "canvas2"}]},
{Widget["Wolfram/Example/CellularGroup", ExposeWidgetReferences -> {"canvas" -> "canvas3"}],
Widget["Wolfram/Example/CellularGroup", ExposeWidgetReferences -> {"canvas" -> "canvas4"}]},
BindEvent["endModal",
Script[ Show[ GraphicsArray[
Partition[
ToExpression[PropertyValue[{#, "mathCommand"}]]& /@
Select[ "WidgetNames" /. GUIInformation[], StringMatchQ[#, "canvas*"]&],
2]]] ]]
}]
]