All graphical widgets inherit from the Widget base class. Widget defines most of the behaviour needed: Widgets are created by the user with a particular parent, and then "pack"ed in order to draw them on the screen. All widgets have three essential things: a widget name used when running Tcl code, an Objective C name when sending messages from Tcl to those objects, and a parent.
- setWidgetNameFromParentName: (const char *)parentWidgetName Set the widget name using a hypothetical parent name.
- setWidgetNameFromParent: (id <Widget>)parent Set the widget name using the parent as context.
- (const char *)makeWidgetNameFor:widget Compute the widget name for a component widget.
- setParent:parent Set the containing window of the widget.
+ createParent:parent When a widget is created it needs to be given a parent. The parent widget will be the widget's containing window. If no parent is given (ie, a parent of nil), then a toplevel Frame will be allocated automatically
Phase: Using
- (BOOL)getDestroyedFlag
- (void)disableDestroyNotification Prevent calling the destroy notification method.
- (void)enableDestroyNotification:notificationTargetnotificationMethod: (SEL)destroyNotificationMethod Call a method if we are destroyed.
- (void)setWindowGeometry: (const char *)s
- (const char *)getWindowGeometry
- (int)getY Get the Y position of the widget.
- (int)getX Get the X position of the widget.
- (unsigned)getWidth Get the widget the widget.
- (unsigned)getHeight Get the height of the widget.
- (const char *)getWidgetName Get the widget name.
- getTopLevel Get top level frame
- getParent Get the containing window of the widget.
- (void)setWindowTitle: (const char *)title Set the title on the widget.
- setX: (int)xY: (int)y Set the position of the widget.
- setWidth: (unsigned)widthHeight: (unsigned)height Set the width and height of the widget.
- setHeight: (unsigned)height Set the height of the widget.
- setWidth: (unsigned)width Set the width of the widget.
- (void)setActiveFlag: (BOOL)activeFlag Enable or disable the widget.
- (void)pack Roughly, packing a widget makes it draw on the screen. The Tk packer allows complicated options to control widget layout. See documentation on Tk to learn more about packing details.