]> Top BLOX.BArc BLOX.BArc Defined in namespace BLOXSuperclass: BLOX.BOvalCategory: Graphics-Windows I can draw arcs, pie slices (don't eat them!!), chords, and... nothing more. BLOX.BArc: accessing endAngleendAngle Answer the ending of the angular range that is occupied by the arc,expressed in degrees endAngle: endAngle: angle Set the ending of the angular range that is occupied by the arc,expressed in degrees fillChord fillChord Specify that the arc will be filled by painting an area delimitedby the arc and the chord that joins the arc's endpoints. fillSlice fillSlice Specify that the arc will be filled by painting an area delimitedby the arc and the two radii joins the center of the arc witheach of the endpoints (that is, that a pie slice will be drawn). from from Answer the starting point of the arc in cartesian coordinates from: from: aPoint Set the starting point of the arc in cartesian coordinates from:to: from: start to: end Set the two starting points of the arc in cartesian coordinates startAngle startAngle Answer the beginning of the angular range that is occupied by the arc,expressed in degrees startAngle: startAngle: angle Set the beginning of the angular range that is occupied by the arc,expressed in degrees sweepAngle sweepAngle Answer the size of the angular range that is occupied by the arc,expressed in degrees sweepAngle: sweepAngle: angle Set the size of the angular range that is occupied by the arc,expressed in degrees to to Answer the ending point of the arc in cartesian coordinates to: to: aPoint Set the ending point of the arc in cartesian coordinates BLOX.BBalloon BLOX.BBalloon Defined in namespace BLOXSuperclass: BLOX.BEventSetCategory: Graphics-Examples This event set allows a widget to show explanatory information whenthe mouse lingers over it for a while. BLOX.BBalloon class: accessing balloonDelayTimeballoonDelayTime Answer the time after which the balloon is shown (default ishalf a second). balloonDelayTime: balloonDelayTime: milliseconds Set the time after which the balloon is shown. shown shown Answer whether a balloon is displayed BLOX.BBalloon: accessing shownshown Answer whether the receiver's balloon is displayed text text Answer the text displayed in the balloon text: text: aString Set the text displayed in the balloon to aString BLOX.BBalloon: initializing initialize:initialize: aBWidget Initialize the event sets for the receiver BLOX.BBoundingBox BLOX.BBoundingBox Defined in namespace BLOXSuperclass: BLOX.BCanvasObjectCategory: Graphics-Windows I am the ultimate ancestor of all items that you can put in a BCanvas andwhich are well defined by their bounding box - i.e. everything exceptBPolylines and BSplines. BLOX.BBoundingBox: accessing boundingBoxboundingBox Answer a Rectangle enclosing all of the receiver center center Answer the center point of the receiver center:extent: create redraw center: center extent: extent Move the object so that it is centered around the center Point andits size is given by the extent Point. No changes take placeuntil you invoke the #create (if the object has not been insertedin the canvas yet) or the #redraw method. corner corner Answer the Point specifying the lower-right corner of the receiver corner: create redraw corner: pointOrArray Set the Point specifying the lower-right corner of the receiver;pointOrArray can be a Point or a two-item Array. No changes take placeuntil you invoke the #create (if the object has not been insertedin the canvas yet) or the #redraw method. extent extent Answer a Point specifying the size of the receiver extent: create redraw extent: pointOrArray Set the Point specifying the size of the receiver;pointOrArray can be a Point or a two-item Array. No changes take placeuntil you invoke the #create (if the object has not been insertedin the canvas yet) or the #redraw method. moveBy: create redraw moveBy: pointOrArray Move the object by the amount indicated by pointOrArray: that is,its whole bounding box is shifted by that amount. No changes take placeuntil you invoke the #create (if the object has not been insertedin the canvas yet) or the #redraw method. origin origin Answer the Point specifying the top-left corner of the receiver origin: create redraw origin: pointOrArray Set the Point specifying the top-left corner of the receiver;pointOrArray can be a Point or a two-item Array. No changes take placeuntil you invoke the #create (if the object has not been insertedin the canvas yet) or the #redraw method. origin:corner: create redraw origin: originPointOrArray corner: cornerPointOrArray Set the bounding box of the object, based on a Point specifying thetop-left corner of the receiver and another specifying the bottom-rightcorner; the two parameters can both be Points or two-item Arrays.No changes take place until you invoke the #create (if the object hasnot been inserted in the canvas yet) or the #redraw method. origin:extent: create redraw origin: originPointOrArray extent: extentPointOrArray Set the bounding box of the object, based on a Point specifying thetop-left corner of the receiver and another specifying its size;the two parameters can both be Points or two-item Arrays.No changes take place until you invoke the #create (if the object hasnot been inserted in the canvas yet) or the #redraw method. BLOX.BButton BLOX.BButton Defined in namespace BLOXSuperclass: BLOX.BPrimitiveCategory: Graphics-Windows I am a button that a user can click. In fact I am at the headof a small hierarchy of objects which exhibit button-like lookand behavior BLOX.BButton class: instance creation new:label:new: parent label: label Answer a new BButton widget laid inside the given parent widget,showing by default the `label' String. BLOX.BButton: accessing backgroundColorbackgroundColor Answer the value of the backgroundColor option for the widget.Specifies the normal background color to use when displaying the widget. backgroundColor: backgroundColor: value Set the value of the backgroundColor option for the widget.Specifies the normal background color to use when displaying the widget. callback callback Answer a DirectedMessage that is sent when the receiver is clicked,or nil if none has been set up. callback:message: callback: aReceiver message: aSymbol Set up so that aReceiver is sent the aSymbol message (the name ofa zero- or one-argument selector) when the receiver is clicked.If the method accepts an argument, the receiver is passed. font font Answer the value of the font option for the widget.Specifies the font to use when drawing text inside the widget. The fontcan be given as either an X font name or a Blox font description string.X font names are given as many fields, each led by a minus, and each ofwhich can be replaced by an * to indicate a default value is ok:foundry, family, weight, slant, setwidth, addstyle, pixel size, point size(the same as pixel size for historical reasons), horizontal resolution,vertical resolution, spacing, width, charset and character encoding.Blox font description strings have three fields, which must be separated bya space and of which only the first is mandatory: the font family, the fontsize in points (or in pixels if a negative value is supplied), and a numberof styles separated by a space (valid styles are normal, bold, italic,underline and overstrike). Examples of valid fonts are “Helvetica 10 Bold”,“Times -14”, “Futura Bold Underline”. You must enclose the font familyin braces if it is made of two or more words. font: font: value Set the value of the font option for the widget.Specifies the font to use when drawing text inside the widget. The fontcan be given as either an X font name or a Blox font description string.X font names are given as many fields, each led by a minus, and each ofwhich can be replaced by an * to indicate a default value is ok:foundry, family, weight, slant, setwidth, addstyle, pixel size, point size(the same as pixel size for historical reasons), horizontal resolution,vertical resolution, spacing, width, charset and character encoding.Blox font description strings have three fields, which must be separated bya space and of which only the first is mandatory: the font family, the fontsize in points (or in pixels if a negative value is supplied), and a numberof styles separated by a space (valid styles are normal, bold, italic,underline and overstrike). Examples of valid fonts are “Helvetica 10 Bold”,“Times -14”, “Futura Bold Underline”. You must enclose the font familyin braces if it is made of two or more words. foregroundColor foregroundColor Answer the value of the foregroundColor option for the widget.Specifies the normal foreground color to use when displaying the widget. foregroundColor: foregroundColor: value Set the value of the foregroundColor option for the widget.Specifies the normal foreground color to use when displaying the widget. invokeCallback invokeCallback Generate a synthetic callback label label Answer the value of the label option for the widget.Specifies a string to be displayed inside the widget. The way in which thestring is displayed depends on the particular widget and may be determinedby other options, such as anchor. For windows, this is the title of the window. label: label: value Set the value of the label option for the widget.Specifies a string to be displayed inside the widget. The way in which thestring is displayed depends on the particular widget and may be determinedby other options, such as anchor. For windows, this is the title of the window. BLOX.BButtonLike BLOX.BButtonLike Defined in namespace BLOXSuperclass: BLOX.BExtendedCategory: Graphics-Examples I am an object whose 3-D appearance resembles that of buttons. BLOX.BButtonLike: accessing callbackcallback Answer a DirectedMessage that is sent when the receiver is clicked,or nil if none has been set up. callback:message: callback: aReceiver message: aSymbol Set up so that aReceiver is sent the aSymbol message (the name ofa zero- or one-argument selector) when the receiver is clicked.If the method accepts an argument, the receiver is passed. invokeCallback invokeCallback Generate a synthetic callback pressed pressed This is the default callback for the widget; it doesnothing if you don't override it. Of course if a subclassoverriddes this you (user of the class) might desire tocall this method from your own callback. BLOX.BCanvas BLOX.BCanvas Defined in namespace BLOXSuperclass: BLOX.BViewportCategory: Graphics-Windows I am an host for whatever geometric shape you want. If you want to do somefancy graphics with Smalltalk, I'll be happy to help. My friends derivedfrom BCanvasObject ask me all sort of things to do, so I am the real worker,not they!BCanvasObject: I amBCanvas: No I amBCanvasObject: No I amBCanvas: No I amwell, you know, he always has something to object. BLOX.BCanvas: accessing backgroundColorbackgroundColor Answer the value of the backgroundColor option for the widget.Specifies the normal background color to use when displaying the widget. backgroundColor: backgroundColor: value Set the value of the backgroundColor option for the widget.Specifies the normal background color to use when displaying the widget. foregroundColor foregroundColor Answer the value of the foregroundColor option for the widget.Specifies the normal foreground color to use when displaying the widget. foregroundColor: foregroundColor: value Set the value of the foregroundColor option for the widget.Specifies the normal foreground color to use when displaying the widget. BLOX.BCanvas: geometry management addChild: basicAddChild:addChild: child The widget identified by child has been added to the receiver.This method is public not because you can call it, but becauseit can be useful to override it, not forgetting the call toeither the superclass implementation or #basicAddChild:, toperform some initialization on the children just added. Answerthe new child. child:height: child: child height: value Set the given child's height. child:heightOffset: child: child heightOffset: value Offset the given child's height by value pixels. child:width: child: child width: value Set the given child's width. child:widthOffset: child: child widthOffset: value Offset the given child's width by value pixels. child:x: child: child x: value Set the given child's top-left corner's x coordinate, in pixelsin the canvas' coordinate system. child:xOffset: child: child xOffset: value Offset the given child's top-left x by value pixels. child:y: child: child y: value Set the given child's top-left corner's y coordinate, in pixelsin the canvas' coordinate system. child:yOffset: child: child yOffset: value Offset the given child's top-left y by value pixels. heightChild: heightChild: child Answer the given child's height in pixels. widthChild: widthChild: child Answer the given child's width in pixels. xChild: xChild: child Answer the given child's top-left corner's x coordinate, in pixelsin the canvas' coordinate system. yChild: yChild: child Answer the given child's top-left corner's y coordinate, in pixelsin the canvas' coordinate system. BLOX.BCanvas: widget protocol at:at: aPoint Selects the topmost item in the canvas overlappingthe point given by aPoint. between:and:do: between: origin and: corner do: aBlock Evaluate aBlock for each item whose bounding box intersects therectangle between the two Points, origin and corner. Pass theitem to the block. boundingBox boundingBox Answer the bounding box of all the items in the canvas destroyed destroyed The widget has been destroyed. Tell all of its items about thisfact. do: do: aBlock Evaluate aBlock, passing each item to it. empty empty Remove all the items from the canvas, leaving it empty extraSpace extraSpace Answer the amount of space that is left as a border around thecanvas items. extraSpace: extraSpace: aPoint Set the amount of space that is left as a border around thecanvas items. items items Answer an Array containing all the items in the canvas mapPoint: mapPoint: aPoint Given aPoint, a point expressed in window coordinates, answer thecorresponding canvas coordinates that are displayed at that location. BLOX.BCanvasObject BLOX.BCanvasObject Defined in namespace BLOXSuperclass: BLOX.BEventTargetCategory: Graphics-Windows I am the ultimate ancestor of all items that you can put in a BCanvas.I provide some general methods to my concrete offspring. BLOX.BCanvasObject class: instance creation newnew This method should not be called for instances of this class. new: new: parentCanvas Answer a new instance of the receiver, displayed into the givenparentCanvas. BLOX.BCanvasObject: accessing bloxblox Answer the parent canvas of the receiver boundingBox boundingBox Answer a Rectangle enclosing all of the receiver color color Answer the color to be used to fill this item's area. color: color: color Set the color to be used to fill this item's area. copyInto: copyInto: newCanvas Answer a new BCanvasObject identical to this but displayedinto another canvas, newCanvas. The new instance is notcreated at the time it is returned. copyObject copy copyObject copyObject Answer a new BCanvasObject identical to this. Unlike #copy,which merely creates a new Smalltalk object with the same dataand referring to the same canvas item, the object createdwith #copyObject is physically distinct from the original.The new instance is not created at the time it is returned. createCopy copy copyObject createCopy Answer a new BCanvasObject identical to this. Unlike #copy,which merely creates a new Smalltalk object with the same dataand referring to the same canvas item, the object createdwith #copyObject is physically distinct from the original.The new instance has already been created at the time it isreturned. createCopyInto: createCopyInto: newCanvas Answer a new BCanvasObject identical to this but displayedinto another canvas, newCanvas. The new instance has alreadybeen created at the time it is returned. deepCopy deepCopy It does not make sense to make a copy, because it wouldmake data inconsistent across different objects; so answerthe receiver grayOut grayOut Apply a 50% gray stippling pattern to the object shallowCopy shallowCopy It does not make sense to make a copy, because it wouldmake data inconsistent across different objects; so answerthe receiver BLOX.BCanvasObject: widget protocol createcreate If the object has not been created yet and has been initializedcorrectly, insert it for real in the parent canvas created created Answer whether the object is just a placeholder or has alreadybeen inserted for real in the parent canvas lower lower Move the item to the lowest position in the display list.Child widgets always obscure other item types, and the stackingorder of window items is determined by sending methods to thewidget object directly. raise raise Move the item to the highest position in the display list.Child widgets always obscure other item types, and the stackingorder of window items is determined by sending methods to thewidget object directly. redraw redraw Force the object to be displayed in the parent canvas, creatingit if it has not been inserted for real in the parent, and refreshits position if it has changed. remove remove Remove the object from the canvas show show Ensure that the object is visible in the center of the canvas,scrolling it if necessary. BLOX.BCheckMenuItem BLOX.BCheckMenuItem Defined in namespace BLOXSuperclass: BLOX.BMenuItemCategory: Graphics-Windows I am a menu item which can be toggled between two states, markedand unmarked. BLOX.BCheckMenuItem class: instance creation new:new: parent This method should not be called for instances of this class. BLOX.BCheckMenuItem: accessing invokeCallbackinvokeCallback Generate a synthetic callback value value Answer whether the menu item is in a selected (checked) state. value: value: aBoolean Set whether the button is in a selected (checked) state andgenerates a callback accordingly. BLOX.BColorButton BLOX.BColorButton Defined in namespace BLOXSuperclass: BLOX.BButtonLikeCategory: Graphics-Examples I am a button that shows a color and that, unless a different callback isused, lets you choose a color when it is clicked. BLOX.BColorButton: accessing colorcolor Set the color that the receiver is painted in. color: color: aString Set the color that the receiver is painted in. pressed pressed This is the default callback; it brings up a `choose-a-color'window and, if `Ok' is pressed in the window, sets the receiverto be painted in the chosen color. BLOX.BContainer BLOX.BContainer Defined in namespace BLOXSuperclass: BLOX.BFormCategory: Graphics-Windows I am used to group many widgets together. I can perform simplemanagement by putting widgets next to each other, from left toright or from top to bottom. BLOX.BContainer: accessing setVerticalLayout:setVerticalLayout: aBoolean Answer whether the container will align the widgets vertically orhorizontally. Horizontal alignment means that widgets arepacked from left to right, while vertical alignment means thatwidgets are packed from the top to the bottom of the widget.Widgets that are set to be “stretched” will share all thespace that is not allocated to non-stretched widgets.The layout of the widget can only be set before the first childis inserted in the widget. BLOX.BDialog BLOX.BDialog Defined in namespace BLOXSuperclass: BLOX.BFormCategory: Graphics-Windows I am a facility for implementing dialogs with many possible choicesand requests. In addition I provide support for a few platform nativecommon dialog boxes, such as choose-a-file and choose-a-color. BLOX.BDialog class: instance creation new:new: parent Answer a new dialog handler (containing a label widget andsome button widgets) laid out within the given parent window.The label widget, when it is created, is empty. new:label: new: parent label: aLabel Answer a new dialog handler (containing a label widget andsome button widgets) laid out within the given parent window.The label widget, when it is created, contains aLabel. new:label:prompt: new: parent label: aLabel prompt: aString Answer a new dialog handler (containing a label widget, somebutton widgets, and an edit window showing aString by default)laid out within the given parent window.The label widget, when it is created, contains aLabel. BLOX.BDialog class: prompters chooseColor:label:default:chooseColor: parent label: aLabel default: color Prompt for a color. The dialog box is created with the givenparent window and with aLabel as its title bar text, and initiallyit selects the color given in the color parameter.If the dialog box is canceled, nil is answered, else theselected color is returned as a String with its RGB value. chooseFileToOpen:label:default:defaultExtension:types: chooseFileToOpen: parent label: aLabel default: name defaultExtension: ext types: typeList Pop up a dialog box for the user to select a file to open.Its purpose is for the user to select an existing file only.If the user enters an non-existent file, the dialog box givesthe user an error prompt and requires the user to give analternative selection or to cancel the selection. If anapplication allows the user to create new files, it shoulddo so by providing a separate New menu command.If the dialog box is canceled, nil is answered, else theselected file name is returned as a String.The dialog box is created with the given parent windowand with aLabel as its title bar text. The name parameterindicates which file is initially selected, and the defaultextension specifies a string that will be appended to thefilename if the user enters a filename without an extension.The typeList parameter is an array of arrays, like#(('Text files' '.txt' '.diz') ('Smalltalk files' '.st')),and is used to construct a listbox of file types. When the userchooses a file type in the listbox, only the files of that typeare listed. Each item in the array contains a list of strings:the first one is the name of the file type described by a particularfile pattern, and is the text string that appears in the File typeslistbox, while the other ones are the possible extensions thatbelong to this particular file type. chooseFileToSave:label:default:defaultExtension:types: chooseFileToSave: parent label: aLabel default: name defaultExtension: ext types: typeList Pop up a dialog box for the user to select a file to save;this differs from the file open dialog box in that non-existentfile names are accepted and existing file names trigger aconfirmation dialog box, asking the user whether the fileshould be overwritten or not.If the dialog box is canceled, nil is answered, else theselected file name is returned as a String.The dialog box is created with the given parent windowand with aLabel as its title bar text. The name parameterindicates which file is initially selected, and the defaultextension specifies a string that will be appended to thefilename if the user enters a filename without an extension.The typeList parameter is an array of arrays, like#(('Text files' '.txt' '.diz') ('Smalltalk files' '.st')),and is used to construct a listbox of file types. When the userchooses a file type in the listbox, only the files of that typeare listed. Each item in the array contains a list of strings:the first one is the name of the file type described by a particularfile pattern, and is the text string that appears in the File typeslistbox, while the other ones are the possible extensions thatbelong to this particular file type. BLOX.BDialog: accessing addButton:receiver:index: dispatch:addButton: aLabel receiver: anObject index: anInt Add a button to the dialog box that, when clicked, willcause the #dispatch: method to be triggered in anObject,passing anInt as the argument of the callback. Thecaption of the button is set to aLabel. addButton:receiver:message: addButton: aLabel receiver: anObject message: aSymbol Add a button to the dialog box that, when clicked, willcause the aSymbol unary selector to be sent to anObject.The caption of the button is set to aLabel. addButton:receiver:message:argument: addButton: aLabel receiver: anObject message: aSymbol argument: arg Add a button to the dialog box that, when clicked, willcause the aSymbol one-argument selector to be sent to anObject,passing arg as the argument of the callback. Thecaption of the button is set to aLabel. contents contents Answer the text that is displayed in the entry widget associatedto the dialog box. contents: contents: newText Display newText in the entry widget associated to the dialog box. BLOX.BDialog: widget protocol centercenter Center the dialog box's parent window in the screen centerIn: centerIn: view Center the dialog box's parent window in the given widget destroyed destroyed Private - The receiver has been destroyed, clear the correspondingTcl variable to avoid memory leaks. invokeCallback: invokeCallback: index Generate a synthetic callback corresponding to the index-thbutton being pressed, and destroy the parent window (triggeringits callback if one was established). loop modalMap loop Map the parent window modally. In other words, an event loopis started that ends only after the window has been destroyed.For more information on the treatment of events for modal windows,refer to BWindow>>#modalMap. BLOX.BDropDown BLOX.BDropDown Defined in namespace BLOXSuperclass: BLOX.BExtendedCategory: Graphics-Examples This class is an abstract superclass for widgets offering the abilityto pick items from a pre-built list. The list is usually hidden, buta button on the right of this widgets makes it pop up. This widgetis thus composed of three parts: an unspecified text widget (shown onthe left of the button and always visible), the button widget (shownon the right, it depicts a down arrow, and is always visible), andthe pop-up list widget. BLOX.BDropDown: accessing backgroundColorbackgroundColor Answer the value of the backgroundColor for the widget, whichin this class is only set for the list widget (that is, thepop-up widget). Subclasses should override this method so thatthe color is set properly for the text widget as well.Specifies the normal background color to use when displaying the widget. backgroundColor: backgroundColor: aColor Set the value of the backgroundColor for the widget, whichin this class is only set for the list widget (that is, thepop-up widget). Subclasses should override this method so thatthe color is set properly for the text widget as well.Specifies the normal background color to use when displaying the widget. droppedRows droppedRows Answer the number of items that are visible at any time inthe listbox. droppedRows: droppedRows: anInteger Set the number of items that are visible at any time inthe listbox. font font Answer the value of the font option for the widget, whichin this class is only set for the list widget (that is, thepop-up widget). Subclasses should override this method so thatthe color is set properly for the text widget as well.Specifies the font to use when drawing text inside the widget. The fontcan be given as either an X font name or a Blox font description string.X font names are given as many fields, each led by a minus, and each ofwhich can be replaced by an * to indicate a default value is ok:foundry, family, weight, slant, setwidth, addstyle, pixel size, point size(the same as pixel size for historical reasons), horizontal resolution,vertical resolution, spacing, width, charset and character encoding.Blox font description strings have three fields, which must be separated bya space and of which only the first is mandatory: the font family, the fontsize in points (or in pixels if a negative value is supplied), and a numberof styles separated by a space (valid styles are normal, bold, italic,underline and overstrike). Examples of valid fonts are “Helvetica 10 Bold”,“Times -14”, “Futura Bold Underline”. You must enclose the font familyin braces if it is made of two or more words. font: font: value Set the value of the font option for the widget, whichin this class is only set for the list widget (that is, thepop-up widget). Subclasses should override this method so thatthe color is set properly for the text widget as well.Specifies the font to use when drawing text inside the widget. The fontcan be given as either an X font name or a Blox font description string.X font names are given as many fields, each led by a minus, and each ofwhich can be replaced by an * to indicate a default value is ok:foundry, family, weight, slant, setwidth, addstyle, pixel size, point size(the same as pixel size for historical reasons), horizontal resolution,vertical resolution, spacing, width, charset and character encoding.Blox font description strings have three fields, which must be separated bya space and of which only the first is mandatory: the font family, the fontsize in points (or in pixels if a negative value is supplied), and a numberof styles separated by a space (valid styles are normal, bold, italic,underline and overstrike). Examples of valid fonts are “Helvetica 10 Bold”,“Times -14”, “Futura Bold Underline”. You must enclose the font familyin braces if it is made of two or more words. foregroundColor foregroundColor Answer the value of the foregroundColor for the widget, whichin this class is only set for the list widget (that is, thepop-up widget). Subclasses should override this method so thatthe color is set properly for the text widget as well.Specifies the normal foreground color to use when displaying the widget. foregroundColor: foregroundColor: aColor Set the value of the foregroundColor for the widget, whichin this class is only set for the list widget (that is, thepop-up widget). Subclasses should override this method so thatthe color is set properly for the text widget as well.Specifies the normal foreground color to use when displaying the widget. highlightBackground highlightBackground Answer the value of the highlightBackground option for the widget.Specifies the background color to use when displaying selected itemsin the list widget. highlightBackground: highlightBackground: aColor Set the value of the highlightBackground option for the widget.Specifies the background color to use when displaying selected itemsin the list widget. highlightForeground highlightForeground Answer the value of the highlightForeground option for the widget.Specifies the foreground color to use when displaying selected itemsin the list widget. highlightForeground: highlightForeground: aColor Set the value of the highlightForeground option for the widget.Specifies the foreground color to use when displaying selected itemsin the list widget. BLOX.BDropDown: callbacks callbackcallback Answer a DirectedMessage that is sent when the receiver is clicked,or nil if none has been set up. callback:message: callback: aReceiver message: aSymbol Set up so that aReceiver is sent the aSymbol message (the name ofa zero- or one-argument selector) when the receiver is clicked.If the method accepts an argument, the receiver is passed. invokeCallback invokeCallback Generate a synthetic callback BLOX.BDropDown: flexibility createListcreateList Create the popup widget to be used for the`drop-down list'. It is a BList by default, but you canuse any other widget, overriding the `list box accessing'methods if necessary. createTextWidget createTextWidget Create the widget that will hold the string chosen fromthe list box and answer it. The widget must be a child of `selfprimitive'. itemHeight font itemHeight Answer the height of an item in the drop-down list. Thedefault implementation assumes that the receiver understands#font, but you can modify it if you want. listCallback listCallback Called when an item of the listbox is highlighted. Donothing by default listSelectAt: listSelectAt: aPoint Select the item lying at the given position in the listbox. The default implementation assumes that list is a BList, butyou can modify it if you want. listText listText Answer the text currently chosen in the list box. Thedefault implementation assumes that list is a BList, but you canmodify it if you want. text text Answer the text that the user has picked from the widget and/ortyped in the control (the exact way the text is entered will beestablished by subclasses, since this is an abstract method). text: text: aString Set the text widget to aString BLOX.BDropDown: list box accessing add:afterIndex:add: anObject afterIndex: index Add an element with the given value after another element whoseindex is contained in the index parameter. The label displayedin the widget is anObject's displayString. Answer anObject. add:element:afterIndex: add: aString element: anObject afterIndex: index Add an element with the aString label after another element whoseindex is contained in the index parameter. This method allowsthe client to decide autonomously the label that the widget willdisplay.If anObject is nil, then string is used as the element as well.If aString is nil, then the element's displayString is used asthe label.Answer anObject or, if it is nil, aString. addLast: addLast: anObject Add an element with the given value at the end of the listbox.The label displayed in the widget is anObject's displayString.Answer anObject. addLast:element: addLast: aString element: anObject Add an element with the given value at the end of the listbox.This method allows the client to decide autonomously the labelthat the widget will display.If anObject is nil, then string is used as the element as well.If aString is nil, then the element's displayString is used asthe label.Answer anObject or, if it is nil, aString. associationAt: associationAt: anIndex Answer an association whose key is the item at the given positionin the listbox and whose value is the label used to display thatitem. at: at: anIndex Answer the element displayed at the given position in the listbox. contents: contents: stringCollection Set the elements displayed in the listbox, and set the labelsto be their displayStrings. contents:elements: contents: stringCollection elements: elementList Set the elements displayed in the listbox to be those in elementList,and set the labels to be the corresponding elements in stringCollection.The two collections must have the same size. do: do: aBlock Iterate over each element of the listbox and pass it to aBlock. elements: elements: elementList Set the elements displayed in the listbox, and set the labelsto be their displayStrings. index: index: newIndex Highlight the item at the given position in the listbox, andtransfer the text in the list box to the text widget. labelAt: labelAt: anIndex Answer the label displayed at the given position in the listbox. labelsDo: labelsDo: aBlock Iterate over the labels in the list widget and pass each ofthem to aBlock. numberOfStrings numberOfStrings Answer the number of items in the list box removeAtIndex: at:would removeAtIndex: index Remove the item at the given index in the list box, answeringthe object associated to the element (i.e. the value that #at:would have returned for the given index) size size Answer the number of items in the list box BLOX.BDropDown: widget protocol dropdowndropdown Force the pop-up list widget to be visible. dropRectangle dropRectangle Answer the rectangle in which the list widget will pop-up.If possible, this is situated below the drop-down widget'sbottom side, but if the screen space there is not enoughit could be above the drop-down widget's above side. Ifthere is no screen space above as well, we pick the sidewhere we can offer the greatest number of lines in thepop-up widget. isDropdownVisible isDropdownVisible Answer whether the pop-up widget is visible toggle toggle Toggle the visibility of the pop-up widget. unmapList unmapList Unmap the pop-up widget from the screen, transfer its selecteditem to the always visible text widget, and generate a callback. BLOX.BDropDownEdit BLOX.BDropDownEdit Defined in namespace BLOXSuperclass: BLOX.BDropDownCategory: Graphics-Examples This class resembles an edit widget, but it has an arrow button thatallows the user to pick an item from a pre-built list. BLOX.BDropDownEdit: accessing backgroundColor:backgroundColor: aColor Set the value of the backgroundColor option for the widget.Specifies the normal background color to use when displaying the widget. font: font: aString Set the value of the font option for the widget.Specifies the font to use when drawing text inside the widget. The fontcan be given as either an X font name or a Blox font description string.X font names are given as many fields, each led by a minus, and each ofwhich can be replaced by an * to indicate a default value is ok:foundry, family, weight, slant, setwidth, addstyle, pixel size, point size(the same as pixel size for historical reasons), horizontal resolution,vertical resolution, spacing, width, charset and character encoding.Blox font description strings have three fields, which must be separated bya space and of which only the first is mandatory: the font family, the fontsize in points (or in pixels if a negative value is supplied), and a numberof styles separated by a space (valid styles are normal, bold, italic,underline and overstrike). Examples of valid fonts are “Helvetica 10 Bold”,“Times -14”, “Futura Bold Underline”. You must enclose the font familyin braces if it is made of two or more words. foregroundColor: foregroundColor: aColor Set the value of the foregroundColor option for the widget.Specifies the normal foreground color to use when displaying the widget. highlightBackground: highlightBackground: aColor Set the value of the highlightBackground option for the widget.Specifies the background color to use when displaying selected itemsin the list widget and the selection in the text widget. highlightForeground: highlightForeground: aColor Set the value of the highlightBackground option for the widget.Specifies the background color to use when displaying selected itemsin the list widget and the selection in the text widget. BLOX.BDropDownEdit: accessing-overrides texttext Answer the text shown in the widget BLOX.BDropDownEdit: text accessing insertAtEnd:insertAtEnd: aString Clear the selection and append aString at the end of thetext widget. replaceSelection: replaceSelection: aString Insert aString in the text widget at the current insertion point,replacing the currently selected text (if any), and leavingthe text selected. selectAll selectAll Select the whole contents of the text widget selectFrom:to: selectFrom: first to: last Sets the selection of the text widget to include the charactersstarting with the one indexed by first (the very first character inthe widget having index 1) and ending with the one just beforelast. If last refers to the same character as first or an earlierone, then the text widget's selection is cleared. selection selection Answer an empty string if the text widget has no selection, else answerthe currently selected text selectionRange selectionRange Answer nil if the text widget has no selection, else answeran Interval object whose first item is the index of thefirst character in the selection, and whose last item is theindex of the character just after the last one in theselection. text: text: aString Set the contents of the text widget and select them. BLOX.BDropDownList BLOX.BDropDownList Defined in namespace BLOXSuperclass: BLOX.BDropDownCategory: Graphics-Examples This class resembles a list box widget, but its actual list shows uponly when you click the arrow button beside the currently selected item. BLOX.BDropDownList: accessing backgroundColor:backgroundColor: aColor Set the value of the backgroundColor for the widget, whichin this class is set for the list widget and, when the focus isoutside the control, for the text widget as well.Specifies the normal background color to use when displaying the widget. font: font: aString Set the value of the font option for the widget.Specifies the font to use when drawing text inside the widget. The fontcan be given as either an X font name or a Blox font description string.X font names are given as many fields, each led by a minus, and each ofwhich can be replaced by an * to indicate a default value is ok:foundry, family, weight, slant, setwidth, addstyle, pixel size, point size(the same as pixel size for historical reasons), horizontal resolution,vertical resolution, spacing, width, charset and character encoding.Blox font description strings have three fields, which must be separated bya space and of which only the first is mandatory: the font family, the fontsize in points (or in pixels if a negative value is supplied), and a numberof styles separated by a space (valid styles are normal, bold, italic,underline and overstrike). Examples of valid fonts are “Helvetica 10 Bold”,“Times -14”, “Futura Bold Underline”. You must enclose the font familyin braces if it is made of two or more words. foregroundColor: foregroundColor: aColor Set the value of the foregroundColor for the widget, whichin this class is set for the list widget and, when the focus isoutside the control, for the text widget as well.Specifies the normal foreground color to use when displaying the widget. highlightBackground: highlightBackground: aColor Answer the value of the highlightBackground option for the widget.Specifies the background color to use when displaying selected itemsin the list widget and, when the focus is inside the control, for thetext widget as well. highlightForeground: highlightForeground: aColor Answer the value of the highlightForeground option for the widget.Specifies the foreground color to use when displaying selected itemsin the list widget and, when the focus is inside the control, for thetext widget as well. text text Answer the text that the user has picked from the widget and/ortyped in the control (the exact way the text is entered will beestablished by subclasses, since this is an abstract method). BLOX.BDropDownList: callbacks callback:message:callback: aReceiver message: aSymbol Set up so that aReceiver is sent the aSymbol message (the name ofa selector with at most two arguemtnts) when the active item inthe receiver changegs. If the method accepts two arguments, thereceiver is passed as the first parameter. If the method acceptsone or two arguments, the selected index is passed as the lastparameter. invokeCallback invokeCallback Generate a synthetic callback. BLOX.BDropDownList: list box accessing indexindex Answer the value of the index option for the widget. Since it isnot possible to modify an item once it has been picked from thelist widget, this is always defined for BDropDownList widgets. BLOX.BEdit BLOX.BEdit Defined in namespace BLOXSuperclass: BLOX.BPrimitiveCategory: Graphics-Windows I am a widget showing one line of modifiable text. BLOX.BEdit class: instance creation new:contents:new: parent contents: aString Answer a new BEdit widget laid inside the given parent widget,with a default content of aString BLOX.BEdit: accessing backgroundColorbackgroundColor Answer the value of the backgroundColor option for the widget.Specifies the normal background color to use when displaying the widget. backgroundColor: backgroundColor: value Set the value of the backgroundColor option for the widget.Specifies the normal background color to use when displaying the widget. callback callback Answer a DirectedMessage that is sent when the receiver is modified,or nil if none has been set up. callback:message: callback: aReceiver message: aSymbol Set up so that aReceiver is sent the aSymbol message (the name ofa zero- or one-argument selector) when the receiver is modified.If the method accepts an argument, the receiver is passed. contents contents Return the contents of the widget contents: contents: newText Set the contents of the widget font font Answer the value of the font option for the widget.Specifies the font to use when drawing text inside the widget. The fontcan be given as either an X font name or a Blox font description string.X font names are given as many fields, each led by a minus, and each ofwhich can be replaced by an * to indicate a default value is ok:foundry, family, weight, slant, setwidth, addstyle, pixel size, point size(the same as pixel size for historical reasons), horizontal resolution,vertical resolution, spacing, width, charset and character encoding.Blox font description strings have three fields, which must be separated bya space and of which only the first is mandatory: the font family, the fontsize in points (or in pixels if a negative value is supplied), and a numberof styles separated by a space (valid styles are normal, bold, italic,underline and overstrike). Examples of valid fonts are “Helvetica 10 Bold”,“Times -14”, “Futura Bold Underline”. You must enclose the font familyin braces if it is made of two or more words. font: font: value Set the value of the font option for the widget.Specifies the font to use when drawing text inside the widget. The fontcan be given as either an X font name or a Blox font description string.X font names are given as many fields, each led by a minus, and each ofwhich can be replaced by an * to indicate a default value is ok:foundry, family, weight, slant, setwidth, addstyle, pixel size, point size(the same as pixel size for historical reasons), horizontal resolution,vertical resolution, spacing, width, charset and character encoding.Blox font description strings have three fields, which must be separated bya space and of which only the first is mandatory: the font family, the fontsize in points (or in pixels if a negative value is supplied), and a numberof styles separated by a space (valid styles are normal, bold, italic,underline and overstrike). Examples of valid fonts are “Helvetica 10 Bold”,“Times -14”, “Futura Bold Underline”. You must enclose the font familyin braces if it is made of two or more words. foregroundColor foregroundColor Answer the value of the foregroundColor option for the widget.Specifies the normal foreground color to use when displaying the widget. foregroundColor: foregroundColor: value Set the value of the foregroundColor option for the widget.Specifies the normal foreground color to use when displaying the widget. selectBackground selectBackground Answer the value of the selectBackground option for the widget.Specifies the background color to use when displaying selected partsof the widget. selectBackground: selectBackground: value Set the value of the selectBackground option for the widget.Specifies the background color to use when displaying selected partsof the widget. selectForeground selectForeground Answer the value of the selectForeground option for the widget.Specifies the foreground color to use when displaying selected partsof the widget. selectForeground: selectForeground: value Set the value of the selectForeground option for the widget.Specifies the foreground color to use when displaying selected partsof the widget. BLOX.BEdit: widget protocol destroyeddestroyed Private - The receiver has been destroyed, clear the correspondingTcl variable to avoid memory leaks. hasSelection hasSelection Answer whether there is selected text in the widget insertAtEnd: insertAtEnd: aString Clear the selection and append aString at the end of thewidget. insertText: insertText: aString Insert aString in the widget at the current insertion point,replacing the currently selected text (if any). invokeCallback invokeCallback Generate a synthetic callback. nextPut: nextPut: aCharacter Clear the selection and append aCharacter at the end of thewidget. nextPutAll: nextPutAll: aString Clear the selection and append aString at the end of thewidget. nl nl Clear the selection and append a linefeed character at theend of the widget. replaceSelection: replaceSelection: aString Insert aString in the widget at the current insertion point,replacing the currently selected text (if any), and leavingthe text selected. selectAll selectAll Select the whole contents of the widget. selectFrom:to: selectFrom: first to: last Sets the selection to include the characters starting with the oneindexed by first (the very first character in the widget havingindex 1) and ending with the one just before last. If lastrefers to the same character as first or an earlier one, then thewidget's selection is cleared. selection selection Answer an empty string if the widget has no selection, else answerthe currently selected text selectionRange selectionRange Answer nil if the widget has no selection, else answeran Interval object whose first item is the index of thefirst character in the selection, and whose last item is theindex of the character just after the last one in theselection. space space Clear the selection and append a space at the end of thewidget. BLOX.BEmbeddedImage BLOX.BEmbeddedImage Defined in namespace BLOXSuperclass: BLOX.BBoundingBoxCategory: Graphics-Windows I can draw a colorful image inside the canvas. BLOX.BEmbeddedImage: accessing copyInto:copyInto: aBlox Answer a new BCanvasObject identical to this but displayedinto another canvas, newCanvas. The new instance is notcreated at the time it is returned. data data Answer the data of the image. The result will be a String containingimage data either as Base-64 encoded GIF data, as XPM data, or as PPM data. data: data: aString Set the data of the image. aString may contain the data eitheras Base-64 encoded GIF data, as XPM data, or as PPM data. No changesare visible until you toggle a redraw using the appropriate method. redraw redraw Force the object to be displayed in the parent canvas, creatingit if it has not been inserted for real in the parent, and refreshits position and image data if it has changed. BLOX.BEmbeddedText BLOX.BEmbeddedText Defined in namespace BLOXSuperclass: BLOX.BBoundingBoxCategory: Graphics-Windows I can draw text in all sorts of colors, sizes and fonts. BLOX.BEmbeddedText: accessing fontfont Answer the value of the font option for the canvas object.Specifies the font to use when drawing text inside the widget. The fontcan be given as either an X font name or a Blox font description string.X font names are given as many fields, each led by a minus, and each ofwhich can be replaced by an * to indicate a default value is ok:foundry, family, weight, slant, setwidth, addstyle, pixel size, point size(the same as pixel size for historical reasons), horizontal resolution,vertical resolution, spacing, width, charset and character encoding.Blox font description strings have three fields, which must be separated bya space and of which only the first is mandatory: the font family, the fontsize in points (or in pixels if a negative value is supplied), and a numberof styles separated by a space (valid styles are normal, bold, italic,underline and overstrike). Examples of valid fonts are “Helvetica 10 Bold”,“Times -14”, “Futura Bold Underline”. You must enclose the font familyin braces if it is made of two or more words. font: font: font Set the value of the font option for the canvas object.Specifies the font to use when drawing text inside the widget. The fontcan be given as either an X font name or a Blox font description string.X font names are given as many fields, each led by a minus, and each ofwhich can be replaced by an * to indicate a default value is ok:foundry, family, weight, slant, setwidth, addstyle, pixel size, point size(the same as pixel size for historical reasons), horizontal resolution,vertical resolution, spacing, width, charset and character encoding.Blox font description strings have three fields, which must be separated bya space and of which only the first is mandatory: the font family, the fontsize in points (or in pixels if a negative value is supplied), and a numberof styles separated by a space (valid styles are normal, bold, italic,underline and overstrike). Examples of valid fonts are “Helvetica 10 Bold”,“Times -14”, “Futura Bold Underline”. You must enclose the font familyin braces if it is made of two or more words. justify justify Answer how to justify the text within its bounding region. justify: left right center justify: aSymbol Sets how to justify the text within its bounding region. Can be#left, #right or #center (the default). redraw redraw Force the object to be displayed in the parent canvas, creatingit if it has not been inserted for real in the parent, and refreshits position. text text Answer the text that is printed by the object text: text: aString Set the text that is printed by the object BLOX.BEventSet BLOX.BEventSet Defined in namespace BLOXSuperclass: BLOX.BEventTargetCategory: Graphics-Windows I combine event handlers and let you apply them to many objects.Basically, you derive a class from me, override the #initialize:method to establish the handlers, then use the #addEventSet: methodunderstood by every Blox class to add the event handlers specifiedby the receiver to the object. BLOX.BEventSet class: initializing newnew This method should not be called for instances of this class. new: addEventSet: new: widget Private - Create a new event set object that willattach to the given widget. Answer the object. Note: thismethod should be called by #addEventSet:, not directly BLOX.BEventSet: accessing widgetwidget Answer the widget to which the receiver is attached. BLOX.BEventSet: initializing initialize:initialize: aBWidget Initialize the receiver's event handlers to attach to aBWidget.You can override this of course, but don't forget to call thesuperclass implementation first. BLOX.BEventTarget BLOX.BEventTarget Defined in namespace BLOXSuperclass: ObjectCategory: Graphics-Windows I track all the event handling procedures that you apply to an object. BLOX.BEventTarget: intercepting events addEventSet:addEventSet: aBEventSetSublass Add to the receiver the event handlers implemented by an instance ofaBEventSetSubclass. Answer the new instance of aBEventSetSublass. onAsciiKeyEventSend:to: onAsciiKeyEventSend: aSelector to: anObject When an ASCII key is pressed and the receiver has the focus, sendthe 1-argument message identified by aSelector to anObject,passing to it a Character. onDestroySend:to: onDestroySend: aSelector to: anObject When the receiver is destroyed, send the unary message identifiedby aSelector to anObject. onFocusEnterEventSend:to: onFocusEnterEventSend: aSelector to: anObject When the focus enters the receiver, send the unary message identifiedby aSelector to anObject. onFocusLeaveEventSend:to: onFocusLeaveEventSend: aSelector to: anObject When the focus leaves the receiver, send the unary message identifiedby aSelector to anObject. onKeyEvent:send:to: onKeyEvent: key send: aSelector to: anObject When the given key is pressed and the receiver has the focus,send the unary message identified by aSelector to anObject.Examples for key are: 'Ctrl-1', 'Alt-X', 'Meta-plus', 'enter'.The last two cases include example of special key identifiers;these include: 'backslash', 'exclam', 'quotedbl', 'dollar','asterisk', 'less', 'greater', 'asciicircum' (caret), 'question','equal', 'parenleft', 'parenright', 'colon', 'semicolon', 'bar' (pipesign), 'underscore', 'percent', 'minus', 'plus', 'BackSpace', 'Delete','Insert', 'Return', 'End', 'Home', 'Prior' (Pgup), 'Next' (Pgdn),'F1'..'F24', 'Caps_Lock', 'Num_Lock', 'Tab', 'Left', 'Right', 'Up','Down'. There are in addition four special identifiers which mapto platform-specific keys: '<Cut>', '<Copy>', '<Paste>', '<Clear>'(all with the angular brackets!). onKeyEventSend:to: onKeyEvent:send:to: eventTesttest onKeyEventSend: aSelector to: anObject When a key is pressed and the receiver has the focus, send the1-argument message identified by aSelector to anObject. The pressedkey will be passed as a String parameter; some of the keys willsend special key identifiers such as those explained in thedocumentation for #onKeyEvent:send:to: Look at the #eventTesttest program in the BloxTestSuite to find out the parameterspassed to such an event procedure onKeyUpEventSend:to: onKeyEvent:send:to: eventTesttest onKeyUpEventSend: aSelector to: anObject When a key has been released and the receiver has the focus, sendthe 1-argument message identified by aSelector to anObject. Thereleased key will be passed as a String parameter; some of the keyswill send special key identifiers such as those explained in thedocumentation for #onKeyEvent:send:to: Look at the #eventTesttest program in the BloxTestSuite to find out the parameterspassed to such an event procedure onMouseDoubleEvent:send:to: onMouseDoubleEvent: button send: aSelector to: anObject When the given button is double-clicked on the mouse, send the1-argument message identified by aSelector to anObject. Themouse position will be passed as a Point. onMouseDoubleEventSend:to: onMouseDoubleEventSend: aSelector to: anObject When a button is double-clicked on the mouse, send the 2-argumentmessage identified by aSelector to anObject. The mouseposition will be passed as a Point in the first parameter,the button number will be passed as an Integer in the secondparameter. onMouseDownEvent:send:to: onMouseDownEvent: button send: aSelector to: anObject When the given button is pressed on the mouse, send the1-argument message identified by aSelector to anObject. Themouse position will be passed as a Point. onMouseDownEventSend:to: onMouseDownEventSend: aSelector to: anObject When a button is pressed on the mouse, send the 2-argumentmessage identified by aSelector to anObject. The mouseposition will be passed as a Point in the first parameter,the button number will be passed as an Integer in the secondparameter. onMouseEnterEventSend:to: onMouseEnterEventSend: aSelector to: anObject When the mouse enters the widget, send the unary messageidentified by aSelector to anObject. onMouseLeaveEventSend:to: onMouseLeaveEventSend: aSelector to: anObject When the mouse leaves the widget, send the unary messageidentified by aSelector to anObject. onMouseMoveEvent:send:to: onMouseMoveEvent: button send: aSelector to: anObject When the mouse is moved while the given button is pressedon the mouse, send the 1-argument message identified by aSelectorto anObject. The mouse position will be passed as a Point. onMouseMoveEventSend:to: onMouseMoveEventSend: aSelector to: anObject When the mouse is moved, send the 1-argument message identifiedby aSelector to anObject. The mouse position will be passed as a Point. onMouseTripleEvent:send:to: onMouseTripleEvent: button send: aSelector to: anObject When the given button is triple-clicked on the mouse, send the1-argument message identified by aSelector to anObject. Themouse position will be passed as a Point. onMouseTripleEventSend:to: onMouseTripleEventSend: aSelector to: anObject When a button is triple-clicked on the mouse, send the 2-argumentmessage identified by aSelector to anObject. The mouseposition will be passed as a Point in the first parameter,the button number will be passed as an Integer in the secondparameter. onMouseUpEvent:send:to: onMouseUpEvent: button send: aSelector to: anObject When the given button is released on the mouse, send the1-argument message identified by aSelector to anObject. Themouse position will be passed as a Point. onMouseUpEventSend:to: onMouseUpEventSend: aSelector to: anObject When a button is released on the mouse, send the 2-argumentmessage identified by aSelector to anObject. The mouseposition will be passed as a Point in the first parameter,the button number will be passed as an Integer in the secondparameter. onResizeSend:to: onResizeSend: aSelector to: anObject When the receiver is resized, send the 1-argument messageidentified by aSelector to anObject. The new size will bepassed as a Point. BLOX.BExtended BLOX.BExtended Defined in namespace BLOXSuperclass: BLOX.BWidgetCategory: Graphics-Windows Just like Gui, I serve as a base for complex objects which exposean individual protocol but internally use a Blox widget forcreating their user interface. Unlike Gui, however, theinstances of my subclasses understand the standard widget protocol.Just override my newPrimitive method to return another widget,and you'll get a class which interacts with the user like thatwidget (a list box, a text box, or even a label) but exposes adifferent protocol. BLOX.BExtended: accessing asPrimitiveWidgetasPrimitiveWidget Answer the primitive widget that implements the receiver. BLOX.BExtended: customization create newPrimitive create newPrimitivecreate After this method is called (the call is made automatically)the receiver will be attached to a `primitive' widget (whichcan be in turn another extended widget).This method is public not because you can call it, but becauseit can be useful to override it, not forgetting the call tosuper (which only calls #newPrimitive and saves the result),to perform some initialization on the primitive widgetjust created; overriding #create is in fact more generic thanoverriding #newPrimitive. For an example of this, see theimplementation of BButtonLike. newPrimitive newPrimitive Create and answer a new widget on which the implementation of thereceiver will be based. You should not call this method directly;instead you must override it in BExtended's subclasses. BLOX.BForm BLOX.BForm Defined in namespace BLOXSuperclass: BLOX.BPrimitiveCategory: Graphics-Windows I am used to group many widgets together. I leave the heavytask of managing their position to the user. BLOX.BForm: accessing backgroundColorbackgroundColor Answer the value of the backgroundColor option for the widget.Specifies the normal background color to use when displaying the widget. backgroundColor: backgroundColor: value Set the value of the backgroundColor option for the widget.Specifies the normal background color to use when displaying the widget. defaultHeight defaultHeight Answer the value of the defaultHeight option for the widget.Specifies the desired height for the form in pixels. If this optionis less than or equal to zero then the window will not request any size at all. defaultHeight: defaultHeight: value Set the value of the defaultHeight option for the widget.Specifies the desired height for the form in pixels. If this optionis less than or equal to zero then the window will not request any size at all. defaultWidth defaultWidth Answer the value of the defaultWidth option for the widget.Specifies the desired width for the form in pixels. If this optionis less than or equal to zero then the window will not request any size at all. defaultWidth: defaultWidth: value Set the value of the defaultWidth option for the widget.Specifies the desired width for the form in pixels. If this optionis less than or equal to zero then the window will not request any size at all. BLOX.BImage BLOX.BImage Defined in namespace BLOXSuperclass: BLOX.BPrimitiveCategory: Graphics-Windows I can display colorful images. BLOX.BImage class: arrows downArrowdownArrow Answer the XPM representation of a 12x12 arrow pointing downwards. leftArrow leftArrow Answer the XPM representation of a 12x12 arrow pointing leftwards. rightArrow rightArrow Answer the XPM representation of a 12x12 arrow pointing rightwards. upArrow upArrow Answer the XPM representation of a 12x12 arrow pointing upwards. BLOX.BImage class: GNU gnugnu Answer the XPM representation of a 48x48 GNU. BLOX.BImage class: icons exclaimexclaim Answer the XPM representation of a 32x32 exclamation mark icon. info info Answer the XPM representation of a 32x32 `information' icon. question question Answer the XPM representation of a 32x32 question mark icon. stop stop Answer the XPM representation of a 32x32 `critical stop' icon. BLOX.BImage class: instance creation new:data:new: parent data: aString Answer a new BImage widget laid inside the given parent widget,loading data from the given string (Base-64 encoded GIF, XPM,PPM are supported). new:image: new: parent image: aFileStream Answer a new BImage widget laid inside the given parent widget,loading data from the given file (GIF, XPM, PPM are supported). new:size: new: parent size: aPoint Answer a new BImage widget laid inside the given parent widget,showing by default a transparent image of aPoint size. BLOX.BImage class: small icons directorydirectory Answer the Base-64 GIF representation of a `directory folder' icon. file file Answer the Base-64 GIF representation of a `file' icon. BLOX.BImage: accessing backgroundColorbackgroundColor Answer the value of the backgroundColor option for the widget.Specifies the normal background color to use when displaying the widget. backgroundColor: backgroundColor: value Set the value of the backgroundColor option for the widget.Specifies the normal background color to use when displaying the widget. displayHeight displayHeight Answer the value of the displayHeight option for the widget.Specifies the height of the image in pixels. This is not the height of thewidget, but specifies the area of the widget that will be taken by the image. displayHeight: displayHeight: value Set the value of the displayHeight option for the widget.Specifies the height of the image in pixels. This is not the height of thewidget, but specifies the area of the widget that will be taken by the image. displayWidth displayWidth Answer the value of the displayWidth option for the widget.Specifies the width of the image in pixels. This is not the width of thewidget, but specifies the area of the widget that will be taken by the image. displayWidth: displayWidth: value Set the value of the displayWidth option for the widget.Specifies the width of the image in pixels. This is not the width of thewidget, but specifies the area of the widget that will be taken by the image. foregroundColor foregroundColor Answer the value of the foregroundColor option for the widget.Specifies the normal foreground color to use when displaying the widget. foregroundColor: foregroundColor: value Set the value of the foregroundColor option for the widget.Specifies the normal foreground color to use when displaying the widget. gamma gamma Answer the value of the gamma option for the widget.Specifies that the colors allocated for displaying the image widgetshould be corrected for a non-linear display with the specified gamma exponentvalue. (The intensity produced by most CRT displays is a power functionof the input value, to a good approximation; gamma is the exponent andis typically around 2). The value specified must be greater than zero. Thedefault value is one (no correction). In general, values greater than onewill make the image lighter, and values less than one will make it darker. gamma: gamma: value Set the value of the gamma option for the widget.Specifies that the colors allocated for displaying the image widgetshould be corrected for a non-linear display with the specified gamma exponentvalue. (The intensity produced by most CRT displays is a power functionof the input value, to a good approximation; gamma is the exponent andis typically around 2). The value specified must be greater than zero. Thedefault value is one (no correction). In general, values greater than onewill make the image lighter, and values less than one will make it darker. BLOX.BImage: image management blankblank Blank the corresponding image data: data: aString Set the image to be drawn to aString, which can be a GIFin Base-64 representation or an X pixelmap. dither dither Recalculate the dithered image in the window where theimage is displayed. The dithering algorithm used indisplaying images propagates quantization errors fromone pixel to its neighbors. If the image data is suppliedin pieces, the dithered image may not be exactly correct.Normally the difference is not noticeable, but if it is aproblem, this command can be used to fix it. fillFrom:extent:color: fillFrom: origin extent: extent color: color Fill a rectangle with the given origin and extent, usingthe given color. fillFrom:to:color: fillFrom: origin to: corner color: color Fill a rectangle between the given corners, usingthe given color. fillRectangle:color: fillRectangle: rectangle color: color Fill a rectangle having the given bounding box, usingthe given color. image: image: aFileStream Read a GIF or XPM image from aFileStream. The whole contentsof the file are read, not only from the file position. imageHeight imageHeight Specifies the height of the image, in pixels. This option is usefulprimarily in situations where you wish to build up the contents ofthe image piece by piece. A value of zero (the default) allows theimage to expand or shrink vertically to fit the data stored in it. imageWidth imageWidth Specifies the width of the image, in pixels. This option is usefulprimarily in situations where you wish to build up the contents ofthe image piece by piece. A value of zero (the default) allows theimage to expand or shrink horizontally to fit the data stored in it. lineFrom:extent:color: lineFrom: origin extent: extent color: color Draw a line with the given origin and extent, usingthe given color. lineFrom:to:color: lineFrom: origin to: corner color: color This method's functionality has not been implemented yet. lineFrom:toX:color: lineFrom: origin toX: endX color: color Draw an horizontal line between the given corners, usingthe given color. lineFrom:toY:color: lineFrom: origin toY: endY color: color Draw a vertical line between the given corners, usingthe given color. lineInside:color: lineInside: rectangle color: color Draw a line having the given bounding box, usingthe given color. BLOX.BImage: widget protocol destroyeddestroyed Private - The receiver has been destroyed, clear the correspondingTcl image to avoid memory leaks. BLOX.BLabel BLOX.BLabel Defined in namespace BLOXSuperclass: BLOX.BPrimitiveCategory: Graphics-Windows I am a label showing static text. BLOX.BLabel class: initialization initializeinitialize Private - Initialize the receiver's class variables. BLOX.BLabel class: instance creation new:label:new: parent label: label Answer a new BLabel widget laid inside the given parent widget,showing by default the `label' String. BLOX.BLabel: accessing alignment topLeft topCenter topRight leftCenter center rightCenter bottomLeft bottomCenter bottomRight topLeftalignment Answer the value of the anchor option for the widget.Specifies how the information in a widget (e.g. text or a bitmap) is to bedisplayed in the widget. Must be one of the symbols #topLeft, #topCenter,#topRight, #leftCenter, #center, #rightCenter, #bottomLeft, #bottomCenter,#bottomRight. For example, #topLeft means display the information such thatits top-left corner is at the top-left corner of the widget. alignment: topLeft topCenter topRight leftCenter center rightCenter bottomLeft bottomCenter bottomRight topLeft alignment: aSymbol Set the value of the anchor option for the widget.Specifies how the information in a widget (e.g. text or a bitmap) is to bedisplayed in the widget. Must be one of the symbols #topLeft, #topCenter,#topRight, #leftCenter, #center, #rightCenter, #bottomLeft, #bottomCenter,#bottomRight. For example, #topLeft means display the information such thatits top-left corner is at the top-left corner of the widget. backgroundColor backgroundColor Answer the value of the backgroundColor option for the widget.Specifies the normal background color to use when displaying the widget. backgroundColor: backgroundColor: value Set the value of the backgroundColor option for the widget.Specifies the normal background color to use when displaying the widget. font font Answer the value of the font option for the widget.Specifies the font to use when drawing text inside the widget. The fontcan be given as either an X font name or a Blox font description string.X font names are given as many fields, each led by a minus, and each ofwhich can be replaced by an * to indicate a default value is ok:foundry, family, weight, slant, setwidth, addstyle, pixel size, point size(the same as pixel size for historical reasons), horizontal resolution,vertical resolution, spacing, width, charset and character encoding.Blox font description strings have three fields, which must be separated bya space and of which only the first is mandatory: the font family, the fontsize in points (or in pixels if a negative value is supplied), and a numberof styles separated by a space (valid styles are normal, bold, italic,underline and overstrike). Examples of valid fonts are “Helvetica 10 Bold”,“Times -14”, “Futura Bold Underline”. You must enclose the font familyin braces if it is made of two or more words. font: font: value Set the value of the font option for the widget.Specifies the font to use when drawing text inside the widget. The fontcan be given as either an X font name or a Blox font description string.X font names are given as many fields, each led by a minus, and each ofwhich can be replaced by an * to indicate a default value is ok:foundry, family, weight, slant, setwidth, addstyle, pixel size, point size(the same as pixel size for historical reasons), horizontal resolution,vertical resolution, spacing, width, charset and character encoding.Blox font description strings have three fields, which must be separated bya space and of which only the first is mandatory: the font family, the fontsize in points (or in pixels if a negative value is supplied), and a numberof styles separated by a space (valid styles are normal, bold, italic,underline and overstrike). Examples of valid fonts are “Helvetica 10 Bold”,“Times -14”, “Futura Bold Underline”. You must enclose the font familyin braces if it is made of two or more words. foregroundColor foregroundColor Answer the value of the foregroundColor option for the widget.Specifies the normal foreground color to use when displaying the widget. foregroundColor: foregroundColor: value Set the value of the foregroundColor option for the widget.Specifies the normal foreground color to use when displaying the widget. label label Answer the value of the label option for the widget.Specifies a string to be displayed inside the widget. The way in which thestring is displayed depends on the particular widget and may be determinedby other options, such as anchor. For windows, this is the title of the window. label: label: value Set the value of the label option for the widget.Specifies a string to be displayed inside the widget. The way in which thestring is displayed depends on the particular widget and may be determinedby other options, such as anchor. For windows, this is the title of the window. BLOX.BLine BLOX.BLine Defined in namespace BLOXSuperclass: BLOX.BBoundingBoxCategory: Graphics-Windows I only draw straight lines but I can do that very well, even withouta ruler... BLOX.BLine: accessing cap butt projecting roundcap Answer the way in which caps are to be drawn at the endpointsof the line. The answer may be #butt (the default), #projecting, or#round). cap: butt projecting round cap: aSymbol Set the way in which caps are to be drawn at the endpointsof the line. aSymbol may be #butt (the default), #projecting, or#round). width width Answer the width with which the line is drawn. width: width: pixels Set the width with which the line is drawn. BLOX.BList BLOX.BList Defined in namespace BLOXSuperclass: BLOX.BViewportCategory: Graphics-Windows I represent a list box from which you can choose one or moreelements. BLOX.BList: accessing add:afterIndex:add: anObject afterIndex: index Add an element with the given value after another element whoseindex is contained in the index parameter. The label displayedin the widget is anObject's displayString. Answer anObject. add:element:afterIndex: add: aString element: anObject afterIndex: index Add an element with the aString label after another element whoseindex is contained in the index parameter. This method allowsthe client to decide autonomously the label that the widget willdisplay.If anObject is nil, then string is used as the element as well.If aString is nil, then the element's displayString is used asthe label.Answer anObject or, if it is nil, aString. addLast: addLast: anObject Add an element with the given value at the end of the listbox.The label displayed in the widget is anObject's displayString.Answer anObject. addLast:element: addLast: aString element: anObject Add an element with the given value at the end of the listbox.This method allows the client to decide autonomously the labelthat the widget will display.If anObject is nil, then string is used as the element as well.If aString is nil, then the element's displayString is used asthe label.Answer anObject or, if it is nil, aString. associationAt: associationAt: anIndex Answer an association whose key is the item at the given positionin the listbox and whose value is the label used to display thatitem. at: at: anIndex Answer the element displayed at the given position in the listbox. backgroundColor backgroundColor Answer the value of the backgroundColor option for the widget.Specifies the normal background color to use when displaying the widget. backgroundColor: backgroundColor: value Set the value of the backgroundColor option for the widget.Specifies the normal background color to use when displaying the widget. contents: contents: elementList Set the elements displayed in the listbox, and set the labelsto be their displayStrings. contents:elements: contents: stringCollection elements: elementList Set the elements displayed in the listbox to be those in elementList,and set the labels to be the corresponding elements in stringCollection.The two collections must have the same size. do: do: aBlock Iterate over each element of the listbox and pass it to aBlock. elements elements Answer the collection of objects that represent the elementsdisplayed by the list box. elements: elements: elementList Set the elements displayed in the listbox, and set the labelsto be their displayStrings. font font Answer the value of the font option for the widget.Specifies the font to use when drawing text inside the widget. The fontcan be given as either an X font name or a Blox font description string.X font names are given as many fields, each led by a minus, and each ofwhich can be replaced by an * to indicate a default value is ok:foundry, family, weight, slant, setwidth, addstyle, pixel size, point size(the same as pixel size for historical reasons), horizontal resolution,vertical resolution, spacing, width, charset and character encoding.Blox font description strings have three fields, which must be separated bya space and of which only the first is mandatory: the font family, the fontsize in points (or in pixels if a negative value is supplied), and a numberof styles separated by a space (valid styles are normal, bold, italic,underline and overstrike). Examples of valid fonts are “Helvetica 10 Bold”,“Times -14”, “Futura Bold Underline”. You must enclose the font familyin braces if it is made of two or more words. font: font: value Set the value of the font option for the widget.Specifies the font to use when drawing text inside the widget. The fontcan be given as either an X font name or a Blox font description string.X font names are given as many fields, each led by a minus, and each ofwhich can be replaced by an * to indicate a default value is ok:foundry, family, weight, slant, setwidth, addstyle, pixel size, point size(the same as pixel size for historical reasons), horizontal resolution,vertical resolution, spacing, width, charset and character encoding.Blox font description strings have three fields, which must be separated bya space and of which only the first is mandatory: the font family, the fontsize in points (or in pixels if a negative value is supplied), and a numberof styles separated by a space (valid styles are normal, bold, italic,underline and overstrike). Examples of valid fonts are “Helvetica 10 Bold”,“Times -14”, “Futura Bold Underline”. You must enclose the font familyin braces if it is made of two or more words. foregroundColor foregroundColor Answer the value of the foregroundColor option for the widget.Specifies the normal foreground color to use when displaying the widget. foregroundColor: foregroundColor: value Set the value of the foregroundColor option for the widget.Specifies the normal foreground color to use when displaying the widget. highlightBackground highlightBackground Answer the value of the highlightBackground option for the widget.Specifies the background color to use when displaying selected itemsin the widget. highlightBackground: highlightBackground: value Set the value of the highlightBackground option for the widget.Specifies the background color to use when displaying selected itemsin the widget. highlightForeground highlightForeground Answer the value of the highlightForeground option for the widget.Specifies the foreground color to use when displaying selected itemsin the widget. highlightForeground: highlightForeground: value Set the value of the highlightForeground option for the widget.Specifies the foreground color to use when displaying selected itemsin the widget. index index Answer the value of the index option for the widget.Indicates the element that has the location cursor. This item will bedisplayed in the highlightForeground color, and with the correspondingbackground color. indexAt: indexAt: point Answer the index of the element that covers the point in thelistbox window specified by x and y (in pixel coordinates). If noelement covers that point, then the closest element to that pointis used. isSelected: isSelected: index Answer whether the element indicated by index is currently selected. label label Return nil, it is here for Gtk+ support label: label: aString Do nothing, it is here for Gtk+ support labelAt: labelAt: anIndex Answer the label displayed at the given position in the listbox. labels labels Answer the labels displayed by the list box. labelsDo: labelsDo: aBlock Iterate over each listbox element's label and pass it to aBlock. mode mode Answer the value of the mode option for the widget.Specifies one of several styles for manipulating the selection. The valueof the option may be either single, browse, multiple, or extended.If the selection mode is single or browse, at most one element can be selected inthe listbox at once. Clicking button 1 on an unselected element selects it anddeselects any other selected item, while clicking on a selected elementhas no effect. In browse mode it is also possible to drag the selectionwith button 1. That is, moving the mouse while button 1 is pressed keepsthe item under the cursor selected.If the selection mode is multiple or extended, any number of elements may beselected at once, including discontiguous ranges. In multiple mode, clicking button1 on an element toggles its selection state without affecting any other elements.In extended mode, pressing button 1 on an element selects it, deselectseverything else, and sets the anchor to the element under the mouse; dragging themouse with button 1 down extends the selection to include all the elements betweenthe anchor and the element under the mouse, inclusive.In extended mode, the selected range can be adjusted by pressing button 1with the Shift key down: this modifies the selection to consist of the elementsbetween the anchor and the element under the mouse, inclusive. Theun-anchored end of this new selection can also be dragged with the buttondown. Also in extended mode, pressing button 1 with the Control key down starts atoggle operation: the anchor is set to the element under the mouse, and itsselection state is reversed. The selection state of other elements is notchanged. If the mouse is dragged with button 1 down, then the selectionstate of all elements between the anchor and the element under the mouse isset to match that of the anchor element; the selection state of all otherelements remains what it was before the toggle operation began.Most people will probably want to use browse mode for single selections andextended mode for multiple selections; the other modes appear to be useful only inspecial situations. mode: mode: value Set the value of the mode option for the widget.Specifies one of several styles for manipulating the selection. The valueof the option may be either single, browse, multiple, or extended.If the selection mode is single or browse, at most one element can be selected inthe listbox at once. Clicking button 1 on an unselected element selects it anddeselects any other selected item, while clicking on a selected elementhas no effect. In browse mode it is also possible to drag the selectionwith button 1. That is, moving the mouse while button 1 is pressed keepsthe item under the cursor selected.If the selection mode is multiple or extended, any number of elements may beselected at once, including discontiguous ranges. In multiple mode, clicking button1 on an element toggles its selection state without affecting any other elements.In extended mode, pressing button 1 on an element selects it, deselectseverything else, and sets the anchor to the element under the mouse; dragging themouse with button 1 down extends the selection to include all the elements betweenthe anchor and the element under the mouse, inclusive.In extended mode, the selected range can be adjusted by pressing button 1with the Shift key down: this modifies the selection to consist of the elementsbetween the anchor and the element under the mouse, inclusive. Theun-anchored end of this new selection can also be dragged with the buttondown. Also in extended mode, pressing button 1 with the Control key down starts atoggle operation: the anchor is set to the element under the mouse, and itsselection state is reversed. The selection state of other elements is notchanged. If the mouse is dragged with button 1 down, then the selectionstate of all elements between the anchor and the element under the mouse isset to match that of the anchor element; the selection state of all otherelements remains what it was before the toggle operation began.Most people will probably want to use browse mode for single selections andextended mode for multiple selections; the other modes appear to be useful only inspecial situations. numberOfStrings numberOfStrings Answer the number of items in the list box removeAtIndex: at:would removeAtIndex: index Remove the item at the given index in the list box, answeringthe object associated to the element (i.e. the value that #at:would have returned for the given index) size size Answer the number of items in the list box BLOX.BList: widget protocol callbackcallback Answer a DirectedMessage that is sent when the active item inthe receiver changes, or nil if none has been set up. callback:message: callback: aReceiver message: aSymbol Set up so that aReceiver is sent the aSymbol message (the name ofa selector with at most two arguemtnts) when the active item inthe receiver changegs. If the method accepts two arguments, thereceiver is passed as the first parameter. If the method acceptsone or two arguments, the selected index is passed as the lastparameter. highlight: highlight: index Highlight the item at the given position in the listbox. invokeCallback invokeCallback Generate a synthetic callback. select: select: index Highlight the item at the given position in the listbox,without unhighlighting other items. This is meant formultiple- or extended-mode listboxes, but can be usedwith other selection mode in particular cases. show: show: index Ensure that the item at the given position in the listbox isvisible. unhighlight unhighlight Unhighlight all the items in the listbox. unselect: unselect: index Unhighlight the item at the given position in the listbox,without affecting the state of the other items. BLOX.Blox BLOX.Blox Defined in namespace BLOXSuperclass: BLOX.BEventTargetCategory: Graphics-Windows I am the superclass for every visible user interface object (excludingcanvas items, which are pretty different). I provide common methods anda simple Tcl interface for internal use. In addition, I expose classmethods that do many interesting event-handling things.NOTE: some of the methods (notably geometry methods) may not be suitable forall Blox subclasses and may be included only for backwards compatibilitytowards 1.1.5 BLOX. You should use geometry methods only for subclasses ofBWidget. BLOX.Blox class: C call-outs evalIn:tcl:evalIn: interp tcl: cmd Not commented. idle idle Not commented. resultIn: resultIn: interp Not commented. tclInit tclInit Not commented. BLOX.Blox class: event dispatching dispatchEvents terminateMainLoopbalances dispatchEventsdispatchEvents If this is the outermost dispatching loop that is started,dispatch events until the number of calls to #terminateMainLoopbalances the number of calls to #dispatchEvents; returninstantly if this is not the outermost dispatching loop thatis started. dispatchEvents: dispatchEvents: mainWindow Dispatch some events; return upon destruction of the `mainWindow'widget (which can be any kind of BWidget, but will be typically aBWindow). terminateMainLoop terminateMainLoopbalances dispatchEvents terminateMainLoop Terminate the event dispatching loop if this call to #terminateMainLoopbalances the number of calls to #dispatchEvents. update: update: aspect Initialize the Tcl and Blox environments; executed automaticallyon startup. BLOX.Blox class: instance creation newnew This method should not be called for instances of this class. new: new: parent Create a new widget of the type identified by the receiver, insidethe given parent widget. Answer the new widget BLOX.Blox class: utility activeactive Answer the currently active Blox, or nil if the focus does notbelong to a Smalltalk window. at: at: aPoint Answer the Blox containing the given point on the screen, ornil if no Blox contains the given point (either becauseno Smalltalk window is there or because it is covered byanother window). atMouse atMouse Answer the Blox under the mouse cursor's hot spot, or nilif no Blox contains the given point (either because noSmalltalk window is there or because it is covered byanother window). beep beep Produce a bell clearClipboard clearClipboard Clear the clipboard, answer its old contents. clipboard clipboard Retrieve the text in the clipboard. clipboard: clipboard: aString Set the contents of the clipboard to aString (or empty the clipboardif aString is nil). createColor:green:blue: createColor: red green: green blue: blue Answer a color that can be passed to methods such as `backgroundColor:'.The color will have the given RGB components (range is 0~65535). createColor:magenta:yellow: createColor: cyan magenta: magenta yellow: yellow Answer a color that can be passed to methods such as `backgroundColor:'.The color will have the given CMY components (range is 0~65535). createColor:magenta:yellow:black: createColor: cyan magenta: magenta yellow: yellow black: black Answer a color that can be passed to methods such as `backgroundColor:'.The color will have the given CMYK components (range is 0~65535). createColor:saturation:value: createColor: hue saturation: sat value: value Answer a color that can be passed to methods such as `backgroundColor:'.The color will have the given HSV components (range is 0~65535). defaultFont defaultFont Answer the default font used by Blox. fonts fonts Answer the names of the font families in the system. Additionally,`Times', `Courier' and `Helvetica' are always made available. mousePointer mousePointer If the mouse pointer is on the same screen as the application's windows,returns a Point containing the pointer's x and y coordinates measuredin pixels in the screen's root window (under X, if a virtual root windowis in use on the screen, the position is computed in the whole desktop,not relative to the top-left corner of the currently shown portion).If the mouse pointer isn't on the same screen as window then answer nil. platform unix macintosh windows platform Answer the platform on which Blox is running; it can be either#unix, #macintosh or #windows. screenOrigin screenOrigin Answer a Point indicating the coordinates of the upper left point of thescreen in the virtual root window on which the application's windows aredrawn (under Windows and the Macintosh, that's always 0 @ 0) screenResolution screenResolution Answer a Point containing the resolution in dots per inch of the screen,in the x and y directions. screenSize screenSize Answer a Point containing the size of the virtual root window on which theapplication's windows are drawn (under Windows and the Macintosh, that'sthe size of the screen) BLOX.Blox: accessing statestate Answer the value of the state option for the widget.Specifies one of three states for the button: normal, active, or disabled.In normal state the button is displayed using the foreground and backgroundoptions. The active state is typically used when the pointer is over thebutton. In active state the button is displayed using the activeForegroundand activeBackground options. Disabled state means that the button shouldbe insensitive: the application will refuse to activate the widget andwill ignore mouse button presses. state: state: value Set the value of the state option for the widget.Specifies one of three states for the button: normal, active, or disabled.In normal state the button is displayed using the foreground and backgroundoptions. The active state is typically used when the pointer is over thebutton. In active state the button is displayed using the activeForegroundand activeBackground options. Disabled state means that the button shouldbe insensitive: the application will refuse to activate the widget andwill ignore mouse button presses. BLOX.Blox: basic deepCopydeepCopy It does not make sense to make a copy, because it wouldmake data inconsistent across different objects; so answerthe receiver release release Destroy the receiver if it still exists, then perform theusual task of removing the dependency links shallowCopy shallowCopy It does not make sense to make a copy, because it wouldmake data inconsistent across different objects; so answerthe receiver BLOX.Blox: creating children make: {Blox width: height: backgroundColor:make: array Create children of the receiver. Answer a Dictionary of the children.Each element of array is an Array including: a string which becomesthe Dictionary's key, a binding like #{Blox.BWindow} identifying theclass name, an array with the parameters to be set (for example#(#width: 50 #height: 30 #backgroundColor: 'blue')), and afterwardsthe children of the widget, described as arrays with this same format. make:on: make: make: array on: result Private - Create children of the receiver, adding them to result;answer result. array has the format described in the comment to #make: makeChild:on: make: makeChild: each on: result Private - Create a child of the receiver, adding them to result;each is a single element of the array described in the comment to #make: BLOX.Blox: customization addChild: basicAddChild:addChild: child The widget identified by child has been added to the receiver.This method is public not because you can call it, but becauseit can be useful to override it, not forgetting the call toeither the superclass implementation or #basicAddChild:, toperform some initialization on the children just added. Answerthe new child. basicAddChild: addChild: basicAddChild: child The widget identified by child has been added to the receiver.Add it to the children collection and answer the new child.This method is public because you can call it from #addChild:. BLOX.Blox: widget protocol asPrimitiveWidgetasPrimitiveWidget Answer the primitive widget that implements the receiver. childrenCount childrenCount Answer how many children the receiver has childrenDo: childrenDo: aBlock Evaluate aBlock once for each of the receiver's child widgets, passingthe widget to aBlock as a parameter destroy destroy Destroy the receiver drawingArea drawingArea Answer a Rectangle identifying the receiver's drawing area. Therectangle's corners specify the upper-left and lower-right cornersof the client area. Because coordinates are relative to theupper-left corner of a window's drawing area, the coordinates ofthe rectangle's corner are (0,0). enabled state enabled Answer whether the receiver is enabled to input. Although definedhere, this method is only used for widgets that define a#state method enabled: state: enabled: enabled Set whether the receiver is enabled to input (enabled is a boolean).Although defined here, this method is only used for widgets thatdefine a #state: method exists exists Answer whether the receiver has been destroyed or not (answer falsein the former case, true in the latter). fontHeight: font fontHeight: aString Answer the height of aString in pixels, when displayed in the samefont as the receiver. Although defined here, this method is onlyused for widgets that define a #font method fontWidth: font fontWidth: aString Answer the width of aString in pixels, when displayed in the samefont as the receiver. Although defined here, this method is onlyused for widgets that define a #font method isWindow isWindow Answer whether the receiver represents a window on the screen. parent parent Answer the receiver's parent (or nil for a top-level window). toplevel toplevel Answer the top-level object (typically a BWindow or BPopupWindow)connected to the receiver. window toplevel window Answer the window in which the receiver stays. Note that while#toplevel won't answer a BTransientWindow, this method will. withChildrenDo: withChildrenDo: aBlock Evaluate aBlock passing the receiver, and then once for each of thereceiver's child widgets. BLOX.BMenu BLOX.BMenu Defined in namespace BLOXSuperclass: BLOX.BMenuObjectCategory: Graphics-Windows I am a Menu that is part of a menu bar. BLOX.BMenu class: instance creation new:label:new: parent label: label Add a new menu to the parent window's menu bar, with `label' asits caption (for popup menus, parent is the widget over which themenu pops up as the right button is pressed). BLOX.BMenu: accessing labellabel Answer the value of the label option for the widget.Specifies a string to be displayed inside the widget. The way in which thestring is displayed depends on the particular widget and may be determinedby other options, such as anchor. For windows, this is the title of the window. label: label: value Set the value of the label option for the widget.Specifies a string to be displayed inside the widget. The way in which thestring is displayed depends on the particular widget and may be determinedby other options, such as anchor. For windows, this is the title of the window. BLOX.BMenu: callback registration addLineaddLine Add a separator item at the end of the menu addMenuItemFor:notifying: addMenuItemFor: anArray notifying: receiver Add a menu item described by anArray at the end of the menu.If anArray is empty, insert a separator line. If anArrayhas a single item, a menu item is created without a callback.If anArray has two or three items, the second one is used asthe selector sent to receiver, and the third one (if present)is passed to the selector. callback:using: addMenuItemFor:notifying: callback: receiver using: selectorPairs Add menu items described by anArray at the end of the menu.Each element of selectorPairs must be in the format describedin BMenu>>#addMenuItemFor:notifying:. All the callbacks willbe sent to receiver. destroy destroy Destroy the menu widget; that is, simply remove ourselves fromthe parent menu bar. empty empty Empty the menu widget; that is, remove all the children BLOX.BMenuBar BLOX.BMenuBar Defined in namespace BLOXSuperclass: BLOX.BMenuObjectCategory: Graphics-Windows I am the Menu Bar, the top widget in a full menu structure. BLOX.BMenuBar: accessing add:add: aMenu Add aMenu to the menu bar remove: remove: aMenu Remove aMenu from the menu bar BLOX.BMenuItem BLOX.BMenuItem Defined in namespace BLOXSuperclass: BLOX.BMenuObjectCategory: Graphics-Windows I am the tiny and humble Menu Item, a single command choice in themenu structure. But if it wasn't for me, nothing could be done...eh eh eh!! BLOX.BMenuItem class: instance creation new:new: parent Add a new separator item to the specified menu. new:label: new: parent label: label Add a new menu item to the specified menu (parent) , with `label'as its caption. BLOX.BMenuItem: accessing labellabel Answer the value of the label option for the widget.Specifies a string to be displayed inside the widget. The way in which thestring is displayed depends on the particular widget and may be determinedby other options, such as anchor. For windows, this is the title of the window. label: label: value Set the value of the label option for the widget.Specifies a string to be displayed inside the widget. The way in which thestring is displayed depends on the particular widget and may be determinedby other options, such as anchor. For windows, this is the title of the window. BLOX.BMenuObject BLOX.BMenuObject Defined in namespace BLOXSuperclass: BLOX.BloxCategory: Graphics-Windows I am an abstract superclass for widgets which make up a menu structure. BLOX.BMenuObject: accessing activeBackgroundactiveBackground Answer the value of the activeBackground option for the widget.Specifies background color to use when drawing active elements. An element(a widget or portion of a widget) is active if the mouse cursor is positionedover the element and pressing a mouse button will cause some actionto occur. For some elements on Windows and Macintosh systems, the activecolor will only be used while mouse button 1 is pressed over the element. activeBackground: activeBackground: value Set the value of the activeBackground option for the widget.Specifies background color to use when drawing active elements. An element(a widget or portion of a widget) is active if the mouse cursor is positionedover the element and pressing a mouse button will cause some actionto occur. For some elements on Windows and Macintosh systems, the activecolor will only be used while mouse button 1 is pressed over the element. activeForeground activeForeground Answer the value of the activeForeground option for the widget.Specifies foreground color to use when drawing active elements. See abovefor definition of active elements. activeForeground: activeForeground: value Set the value of the activeForeground option for the widget.Specifies foreground color to use when drawing active elements. See abovefor definition of active elements. asPrimitiveWidget asPrimitiveWidget Answer the primitive widget that implements the receiver. backgroundColor backgroundColor Answer the value of the backgroundColor option for the widget.Specifies the normal background color to use when displaying the widget. backgroundColor: backgroundColor: value Set the value of the backgroundColor option for the widget.Specifies the normal background color to use when displaying the widget. foregroundColor foregroundColor Answer the value of the foregroundColor option for the widget.Specifies the normal foreground color to use when displaying the widget. foregroundColor: foregroundColor: value Set the value of the foregroundColor option for the widget.Specifies the normal foreground color to use when displaying the widget. BLOX.BMenuObject: callback callbackcallback Answer a DirectedMessage that is sent when the receiver is modified,or nil if none has been set up. callback:message: callback: aReceiver message: aSymbol Set up so that aReceiver is sent the aSymbol message (the name ofa zero- or one-argument selector) when the receiver is clicked.If the method accepts an argument, the receiver is passed. callback:message:argument: callback: aReceiver message: aSymbol argument: anObject Set up so that aReceiver is sent the aSymbol message (the name ofa one- or two-argument selector) when the receiver is clicked.If the method accepts two argument, the receiver is passedtogether with anObject; if it accepts a single one, instead,only anObject is passed. invokeCallback invokeCallback Generate a synthetic callback BLOX.BOval BLOX.BOval Defined in namespace BLOXSuperclass: BLOX.BRectangleCategory: Graphics-Windows I can draw ovals (ok, if you're a mathematic, they're really ellipses),or even circles. BLOX.BPolyline BLOX.BPolyline Defined in namespace BLOXSuperclass: BLOX.BCanvasObjectCategory: Graphics-Windows I can draw closed or open polylines, and even fill them! BLOX.BPolyline: accessing boundingBoxboundingBox Answer `boundingBox'. cap cap Answer the way in which caps are to be drawn at the endpointsof the line.This option is only available for open polylines. If you want toset it for a closed polylines, draw an open one on top of it. cap: butt projecting round cap: aSymbol Set the way in which caps are to be drawn at the endpointsof the line. aSymbol may be #butt (the default), #projecting, or#round).This option is only available for open polylines. If you want toset it for a closed polylines, draw an open one on top of it. closed closed Answer whether the polyline is an open or a closed one. closed: closed: aBoolean Set whether the polyline is an open or a closed one. This optionmay be set only once. join join Answer the way in which joints are to be drawn at the vertices of theline.This option is only available for open polylines. If you want toset it for a closed polylines, draw an open one on top of it. join: bevel miter round join: aSymbol Answer the way in which joints are to be drawn at the vertices of theline. aSymbol can be #bevel, #miter (the default) or #round.This option is only available for open polylines. If you want toset it for a closed polylines, draw an open one on top of it. outlineColor outlineColor Answer the color with which the outline of the polyline is drawn.This option is only available for closed polylines. outlineColor: outlineColor: color Set the color with which the outline of the polyline is drawn.This option is only available for closed polylines. points points Answer the points that are vertices of the polyline. points: create redrawmethod points: arrayOfPointsOrArrays Set the points that are vertices of the polyline. Each of the itemsof arrayOfPointsOrArrays can be a Point or a two-element Array.Note that no changes take place until you invoke the #create (ifthe object has not been inserted in the canvas yet) or the #redrawmethod. width width Answer the width with which the polyline (or its outlineif it is a closed one) is drawn. width: width: pixels Set the width with which the polyline (or its outlineif it is a closed one) is drawn. BLOX.BPopupMenu BLOX.BPopupMenu Defined in namespace BLOXSuperclass: BLOX.BMenuCategory: Graphics-Windows I am a class that provides the ability to show popup menus when theright button (Button 3) is clicked on another window. BLOX.BPopupMenu: widget protocol popuppopup Generate a synthetic menu popup event BLOX.BPopupWindow BLOX.BPopupWindow Defined in namespace BLOXSuperclass: BLOX.BWindowCategory: Graphics-Windows I am a pseudo-window that has no decorations and no ability to interactwith the user. My main usage, as my name says, is to provide pop-upfunctionality for other widgets. Actually there should be no need todirectly use me - always rely on the #new and #popup: class methods. BLOX.BPopupWindow: geometry management addChild: basicAddChild:addChild: w Private - The widget identified by child has been added to thereceiver. This method is public not because you can call it,but because it can be useful to override it, not forgetting thecall to either the superclass implementation or #basicAddChild:,to perform some initialization on the children just added. Answerthe new child. child:height: child: child height: value Set the given child's height. This is done by settingits parent window's (that is, our) height. child:heightOffset: child: child heightOffset: value This method should not be called for instances of this class. child:width: child: child width: value Set the given child's width. This is done by settingits parent window's (that is, our) width. child:widthOffset: child: child widthOffset: value This method should not be called for instances of this class. child:x: child: child x: value Set the x coordinate of the given child's top-left corner.This is done by setting its parent window's (that is, our) x. child:xOffset: child: child xOffset: value This method should not be called for instances of this class. child:y: child: child y: value Set the y coordinate of the given child's top-left corner.This is done by setting its parent window's (that is, our) y. child:yOffset: child: child yOffset: value This method should not be called for instances of this class. heightChild: heightChild: child Answer the given child's height, which is the height thatwas imposed on the popup window. widthChild: widthChild: child Answer the given child's width in pixels, which is the width thatwas imposed on the popup window. xChild: xChild: child Answer the x coordinate of the given child's top-left corner,which is desumed by the position of the popup window. yChild: yChild: child Answer the y coordinate of the given child's top-left corner,which is desumed by the position of the popup window. BLOX.BPrimitive BLOX.BPrimitive Defined in namespace BLOXSuperclass: BLOX.BWidgetCategory: Graphics-Windows I am the superclass for every widget (except menus) directlyprovided by the underlying GUI system. BLOX.BPrimitive: accessing asPrimitiveWidgetasPrimitiveWidget Answer the primitive widget that implements the receiver. BLOX.BProgress BLOX.BProgress Defined in namespace BLOXSuperclass: BLOX.BExtendedCategory: Graphics-Examples I show how much of a task has been completed. BLOX.BProgress: accessing backgroundColorbackgroundColor Answer the background color of the widget. This is used forthe background of the non-filled part, as well as for theforeground of the filled part. backgroundColor: backgroundColor: aColor Set the background color of the widget. This is used forthe background of the non-filled part, as well as for theforeground of the filled part. filledColor filledColor Answer the background color of the widget's filled part. filledColor: filledColor: aColor Set the background color of the widget's filled part. foregroundColor foregroundColor Set the foreground color of the widget. This is used forthe non-filled part, while the background color also worksas the foreground of the filled part. foregroundColor: foregroundColor: aColor Set the foreground color of the widget. This is used forthe non-filled part, while the background color also worksas the foreground of the filled part. value value Answer the filled percentage of the receiver (0..1) value: value: newValue Set the filled percentage of the receiver and update the appearance.newValue must be between 0 and 1. BLOX.BRadioButton BLOX.BRadioButton Defined in namespace BLOXSuperclass: BLOX.BButtonCategory: Graphics-Windows I am just one in a group of mutually exclusive buttons. BLOX.BRadioButton: accessing callback:message:callback: aReceiver message: aSymbol Set up so that aReceiver is sent the aSymbol message (the name ofa selector accepting at most two arguments) when the receiver isclicked. If the method accepts two arguments, the receiver ispassed as the first parameter. If the method accepts one or twoarguments, true is passed as the last parameter for interoperabilitywith BToggle widgets. value value Answer whether this widget is the selected one in its radiobutton group. value: value: aBoolean Answer whether this widget is the selected one in its radiobutton group. Setting this property to false for a group'scurrently selected button unhighlights all the buttons in thatgroup. BLOX.BRadioGroup BLOX.BRadioGroup Defined in namespace BLOXSuperclass: BLOX.BContainerCategory: Graphics-Windows I am used to group many mutually-exclusive radio buttons together.In addition, just like every BContainer I can perform simple managementby putting widgets next to each other, from left to right or (which ismore useful in this particular case...) from top to bottom. BLOX.BRadioGroup: accessing valuevalue Answer the index of the button that is currently selected,1 being the first button added to the radio button group.0 means that no button is selected value: value: value Force the value-th button added to the radio button groupto be the selected one. BLOX.BRadioGroup: widget protocol destroyeddestroyed Private - The receiver has been destroyed, clear the correspondingTcl variable to avoid memory leaks. BLOX.BRectangle BLOX.BRectangle Defined in namespace BLOXSuperclass: BLOX.BBoundingBoxCategory: Graphics-Windows I only draw rectangles but I can do that very well. BLOX.BRectangle: accessing outlineColoroutlineColor Answer the color with which the outline of the rectangle is drawn. outlineColor: outlineColor: color Set the color with which the outline of the rectangle is drawn. width width Answer the width with which the outline of the rectangle is drawn. width: width: pixels Set the width with which the outline of the rectangle is drawn. BLOX.BScrolledCanvas BLOX.BScrolledCanvas Defined in namespace BLOXSuperclass: BLOX.BCanvasCategory: Graphics-Windows I am much similar to BCanvas, but I sport, in addition, two fancy scrollbars. This is just a convenience, since it could be easily done whencreating the canvas... BLOX.BSpline BLOX.BSpline Defined in namespace BLOXSuperclass: BLOX.BPolylineCategory: Graphics-Windows Unlike my father BPolyline, I am more smooth at doing my job. BLOX.BSpline: accessing smoothnesssmoothness Answer the degree of smoothness desired for curves. Each splinewill be approximated with this number of line segments. smoothness: smoothness: anInteger Set the degree of smoothness desired for curves. Each splinewill be approximated with this number of line segments. BLOX.BText BLOX.BText Defined in namespace BLOXSuperclass: BLOX.BViewportCategory: Graphics-Windows I represent a text viewer with pretty good formatting options. BLOX.BText class: accessing emacsLikeemacsLike Answer whether we are using Emacs or Motif key bindings. emacsLike: emacsLike: aBoolean Set whether we are using Emacs or Motif key bindings. BLOX.BText class: instance creation newReadOnly:newReadOnly: parent Answer a new read-only text widget (read-only is achieved simplyby setting its state to be disabled) BLOX.BText: accessing backgroundColorbackgroundColor Answer the value of the backgroundColor option for the widget.Specifies the normal background color to use when displaying the widget. backgroundColor: backgroundColor: value Set the value of the backgroundColor option for the widget.Specifies the normal background color to use when displaying the widget. callback callback Answer a DirectedMessage that is sent when the receiver is modified,or nil if none has been set up. callback:message: callback: aReceiver message: aSymbol Set up so that aReceiver is sent the aSymbol message (the name ofa zero- or one-argument selector) when the receiver is modified.If the method accepts an argument, the receiver is passed. contents contents Return the contents of the widget contents: contents: aString Set the contents of the widget font font Answer the value of the font option for the widget.Specifies the font to use when drawing text inside the widget. The fontcan be given as either an X font name or a Blox font description string.X font names are given as many fields, each led by a minus, and each ofwhich can be replaced by an * to indicate a default value is ok:foundry, family, weight, slant, setwidth, addstyle, pixel size, point size(the same as pixel size for historical reasons), horizontal resolution,vertical resolution, spacing, width, charset and character encoding.Blox font description strings have three fields, which must be separated bya space and of which only the first is mandatory: the font family, the fontsize in points (or in pixels if a negative value is supplied), and a numberof styles separated by a space (valid styles are normal, bold, italic,underline and overstrike). Examples of valid fonts are “Helvetica 10 Bold”,“Times -14”, “Futura Bold Underline”. You must enclose the font familyin braces if it is made of two or more words. font: font: value Set the value of the font option for the widget.Specifies the font to use when drawing text inside the widget. The fontcan be given as either an X font name or a Blox font description string.X font names are given as many fields, each led by a minus, and each ofwhich can be replaced by an * to indicate a default value is ok:foundry, family, weight, slant, setwidth, addstyle, pixel size, point size(the same as pixel size for historical reasons), horizontal resolution,vertical resolution, spacing, width, charset and character encoding.Blox font description strings have three fields, which must be separated bya space and of which only the first is mandatory: the font family, the fontsize in points (or in pixels if a negative value is supplied), and a numberof styles separated by a space (valid styles are normal, bold, italic,underline and overstrike). Examples of valid fonts are “Helvetica 10 Bold”,“Times -14”, “Futura Bold Underline”. You must enclose the font familyin braces if it is made of two or more words. foregroundColor foregroundColor Answer the value of the foregroundColor option for the widget.Specifies the normal foreground color to use when displaying the widget. foregroundColor: foregroundColor: value Set the value of the foregroundColor option for the widget.Specifies the normal foreground color to use when displaying the widget. getSelection getSelection Answer an empty string if the widget has no selection, else answerthe currently selected text selectBackground selectBackground Answer the value of the selectBackground option for the widget.Specifies the background color to use when displaying selected partsof the widget. selectBackground: selectBackground: value Set the value of the selectBackground option for the widget.Specifies the background color to use when displaying selected partsof the widget. selectForeground selectForeground Answer the value of the selectForeground option for the widget.Specifies the foreground color to use when displaying selected partsof the widget. selectForeground: selectForeground: value Set the value of the selectForeground option for the widget.Specifies the foreground color to use when displaying selected partsof the widget. wrap none char word wrap Answer the value of the wrap option for the widget.Specifies how to handle lines in the text that are too long to be displayedin a single line of the text's window. The value must be #none or #char or#word. A wrap mode of none means that each line of text appears as exactlyone line on the screen; extra characters that do not fit on the screen arenot displayed. In the other modes each line of text will be broken up intoseveral screen lines if necessary to keep all the characters visible. Inchar mode a screen line break may occur after any character; in word mode aline break will only be made at word boundaries. wrap: none char word wrap: value Set the value of the wrap option for the widget.Specifies how to handle lines in the text that are too long to be displayedin a single line of the text's window. The value must be #none or #char or#word. A wrap mode of none means that each line of text appears as exactlyone line on the screen; extra characters that do not fit on the screen arenot displayed. In the other modes each line of text will be broken up intoseveral screen lines if necessary to keep all the characters visible. Inchar mode a screen line break may occur after any character; in word mode aline break will only be made at word boundaries. BLOX.BText: attributes insertAtEnd:attribute:insertAtEnd: aString attribute: attr Clear the selection and append aString at the end of thewidget. Use the given attributes to format the text. insertText:attribute: insertText: aString attribute: attr Insert aString in the widget at the current insertion point,replacing the currently selected text (if any). Use thegiven attributes to format the text. removeAttributes removeAttributes Remove any kind of formatting from the text in the widget removeAttributesFrom:to: removeAttributesFrom: aPoint to: endPoint Remove any kind of formatting from the text in the widgetbetween the given endpoints. The two endpoints are Pointobjects in which both coordinates are 1-based: the firstline is line 1, and the first character in the first lineis character 1. setAttributes:from:to: setAttributes: attr from: aPoint to: endPoint Add the formatting given by attr to the text in the widgetbetween the given endpoints. The two endpoints are Pointobjects in which both coordinates are 1-based: the firstline is line 1, and the first character in the first lineis character 1. BLOX.BText: geometry management child:height:child: child height: value Set the height of the given child to be `value' pixels. child:heightOffset: child: child heightOffset: value Adjust the height of the given child to be given by `value'more pixels. child:width: child: child width: value Set the width of the given child to be `value' pixels. child:widthOffset: child: child widthOffset: value Adjust the width of the given child to be given by `value'more pixels. child:x: child: child x: value Never fail and do nothing, the children stay wherethe text ended at the time each child was added inthe widget child:xOffset: child: child xOffset: value This method should not be called for instances of this class. child:y: child: child y: value Never fail and do nothing, the children stay wherethe text ended at the time each child was added inthe widget child:yOffset: child: child yOffset: value This method should not be called for instances of this class. heightChild: heightChild: child Answer the given child's height in pixels. widthChild: widthChild: child Answer the given child's width in pixels. xChild: xChild: child Answer the given child's top-left border's x coordinate.We always answer 0 since the children actually move whenthe text widget scrolls yChild: yChild: child Answer the given child's top-left border's y coordinate.We always answer 0 since the children actually move whenthe text widget scrolls BLOX.BText: images insertImage: registerImage:insertImage: anObject Insert an image where the insertion point currently lies in the widget.anObject can be a String containing image data (either Base-64 encodedGIF data, XPM data, or PPM data), or the result or registering an imagewith #registerImage: insertImage:at: registerImage: insertImage: anObject at: position Insert an image at the given position in the widget. Theposition is a Point object in which both coordinates are 1-based:the first line is line 1, and the first character in the firstline is character 1.anObject can be a String containing image data (either Base-64 encodedGIF data, XPM data, or PPM data), or the result or registering an imagewith #registerImage: insertImageAtEnd: registerImage: insertImageAtEnd: anObject Insert an image at the end of the widgets text.anObject can be a String containing image data (either Base-64 encodedGIF data, XPM data, or PPM data), or the result or registering an imagewith #registerImage: registerImage: registerImage: registerImage: anObject Register an image (whose data is in anObject, a String includingBase-64 encoded GIF data, XPM data, or PPM data) to be usedin the widget. If the same image must be used a lot of times,it is better to register it once and then pass the result of#registerImage: to the image insertion methods.Registered image are private within each BText widget. Registeringan image with a widget and using it with another could giveunpredictable results. BLOX.BText: inserting text insertAtEnd:insertAtEnd: aString Clear the selection and append aString at the end of thewidget. insertSelectedText: insertSelectedText: aString Insert aString in the widget at the current insertion point,leaving the currently selected text (if any) in place, andselecting the text. insertText: insertText: aString Insert aString in the widget at the current insertion point,replacing the currently selected text (if any). insertText:at: insertText: aString at: position Insert aString in the widget at the given position,replacing the currently selected text (if any). Theposition is a Point object in which both coordinates are 1-based:the first line is line 1, and the first character in the firstline is character 1. insertTextSelection: insertTextSelection: aString Insert aString in the widget after the current selection,leaving the currently selected text (if any) intact. invokeCallback invokeCallback Generate a synthetic callback. nextPut: nextPut: aCharacter Clear the selection and append aCharacter at the end of thewidget. nextPutAll: nextPutAll: aString Clear the selection and append aString at the end of thewidget. nl nl Clear the selection and append a linefeed character at theend of the widget. refuseTabs refuseTabs Arrange so that Tab characters, instead of being insertedin the widget, traverse the widgets in the parent window. replaceSelection: replaceSelection: aString Insert aString in the widget at the current insertion point,replacing the currently selected text (if any), and leavingthe text selected. searchString: searchString: aString Search aString in the widget. If it is not found,answer zero, else answer the 1-based line numberand move the insertion point to the place wherethe string was found. space space Clear the selection and append a space at the end of thewidget. BLOX.BText: position & lines charsInLine:charsInLine: number Answer how many characters are there in the number-th line currentColumn currentColumn Answer the 1-based column number where the insertion pointcurrently lies. currentLine currentLine Answer the 1-based line number where the insertion pointcurrently lies. currentPosition currentPosition Answer a Point representing where the insertion pointcurrently lies. Both coordinates in the answer are 1-based:the first line is line 1, and the first character in the firstline is character 1. currentPosition: currentPosition: aPoint Move the insertion point to the position given by aPoint.Both coordinates in aPoint are interpreted as 1-based:the first line is line 1, and the first character in the firstline is character 1. gotoLine:end: gotoLine: line end: aBoolean If aBoolean is true, move the insertion point to the lastcharacter of the line-th line (1 being the first linein the widget); if aBoolean is false, move it to the startof the line-th line. indexAt: indexAt: point Answer the position of the character that covers thepixel whose coordinates within the text's window aregiven by the supplied Point object. lineAt: lineAt: number Answer the number-th line of text in the widget numberOfLines numberOfLines Answer the number of lines in the widget selectFrom:to: selectFrom: first to: last Select the text between the given endpoints. The two endpointsare Point objects in which both coordinates are 1-based: thefirst line is line 1, and the first character in the first lineis character 1. setToEnd setToEnd Move the insertion point to the end of the widget BLOX.BTextAttributes BLOX.BTextAttributes Defined in namespace BLOXSuperclass: ObjectCategory: Graphics-Windows I help you creating wonderful, colorful BTexts. BLOX.BTextAttributes class: instance-creation shortcuts backgroundColor:backgroundColor: color Create a new BTextAttributes object resulting in textwith the given background color. black black Create a new BTextAttributes object resulting in black text. blue blue Create a new BTextAttributes object resulting in blue text. center center Create a new BTextAttributes object resulting in centeredparagraphs. cyan cyan Create a new BTextAttributes object resulting in cyan text. darkCyan darkCyan Create a new BTextAttributes object resulting in dark cyan text. darkGreen darkGreen Create a new BTextAttributes object resulting in dark green text. darkMagenta darkMagenta Create a new BTextAttributes object resulting in dark purple text. events: events: aBTextBindings Create a new BTextAttributes object for text that responds toevents according to the callbacks established in aBTextBindings. font: font: font Create a new BTextAttributes object resulting in text with the given font.The font can be given as either an X font name or a Blox font descriptionstring.X font names are given as many fields, each led by a minus, and each ofwhich can be replaced by an * to indicate a default value is ok:foundry, family, weight, slant, setwidth, addstyle, pixel size, point size(the same as pixel size for historical reasons), horizontal resolution,vertical resolution, spacing, width, charset and character encoding.Blox font description strings have three fields, which must be separated bya space and of which only the first is mandatory: the font family, the fontsize in points (or in pixels if a negative value is supplied), and a numberof styles separated by a space (valid styles are normal, bold, italic,underline and overstrike). Examples of valid fonts are “Helvetica 10 Bold”,“Times -14”, “Futura Bold Underline”. You must enclose the font familyin braces if it is made of two or more words. foregroundColor: foregroundColor: color Create a new BTextAttributes object resulting in textwith the given foreground color. green green Create a new BTextAttributes object resulting in green text. magenta magenta Create a new BTextAttributes object resulting in magenta text. red red Create a new BTextAttributes object resulting in red text. strikeout strikeout Create a new BTextAttributes object resulting in struck-out text. underline underline Create a new BTextAttributes object resulting in underlined text. white white Create a new BTextAttributes object resulting in white text. yellow yellow Create a new BTextAttributes object resulting in yellow text. BLOX.BTextAttributes: colors blackblack Set the receiver so that applying it results in black text. blue blue Set the receiver so that applying it results in blue text. cyan cyan Set the receiver so that applying it results in cyan text. darkCyan darkCyan Set the receiver so that applying it results in dark cyan text. darkGreen darkGreen Set the receiver so that applying it results in dark green text. darkMagenta darkMagenta Set the receiver so that applying it results in dark magenta text. green green Set the receiver so that applying it results in green text. magenta magenta Set the receiver so that applying it results in magenta text. red red Set the receiver so that applying it results in red text. white white Set the receiver so that applying it results in white text. yellow yellow Set the receiver so that applying it results in black text. BLOX.BTextAttributes: setting attributes backgroundColorbackgroundColor Answer the value of the backgroundColor option for the text.Specifies the background color to use when displaying text withthese attributes. nil indicates that the default value is notoverridden. backgroundColor: backgroundColor: color Set the value of the backgroundColor option for the text.Specifies the background color to use when displaying text withthese attributes. nil indicates that the default value is notoverridden. center center Center the text to which these attributes are applied events events Answer the event bindings which apply to text subject to theseattributes events: events: aBTextBindings Set the event bindings which apply to text subject to theseattributes font font Answer the value of the font option for the text.The font can be given as either an X font name or a Blox font descriptionstring, or nil if you want the widget's default font to apply.X font names are given as many fields, each led by a minus, and each ofwhich can be replaced by an * to indicate a default value is ok:foundry, family, weight, slant, setwidth, addstyle, pixel size, point size(the same as pixel size for historical reasons), horizontal resolution,vertical resolution, spacing, width, charset and character encoding.Blox font description strings have three fields, which must be separated bya space and of which only the first is mandatory: the font family, the fontsize in points (or in pixels if a negative value is supplied), and a numberof styles separated by a space (valid styles are normal, bold, italic,underline and overstrike). Examples of valid fonts are “Helvetica 10 Bold”,“Times -14”, “Futura Bold Underline”. You must enclose the font familyin braces if it is made of two or more words. font: font: fontName Set the value of the font option for the text.The font can be given as either an X font name or a Blox font descriptionstring, or nil if you want the widget's default font to apply.X font names are given as many fields, each led by a minus, and each ofwhich can be replaced by an * to indicate a default value is ok:foundry, family, weight, slant, setwidth, addstyle, pixel size, point size(the same as pixel size for historical reasons), horizontal resolution,vertical resolution, spacing, width, charset and character encoding.Blox font description strings have three fields, which must be separated bya space and of which only the first is mandatory: the font family, the fontsize in points (or in pixels if a negative value is supplied), and a numberof styles separated by a space (valid styles are normal, bold, italic,underline and overstrike). Examples of valid fonts are “Helvetica 10 Bold”,“Times -14”, “Futura Bold Underline”. You must enclose the font familyin braces if it is made of two or more words. foregroundColor foregroundColor Answer the value of the foregroundColor option for the text.Specifies the foreground color to use when displaying text withthese attributes. nil indicates that the default value is notoverridden. foregroundColor: foregroundColor: color Set the value of the foregroundColor option for the text.Specifies the foreground color to use when displaying text withthese attributes. nil indicates that the default value is notoverridden. isCentered isCentered Answer whether the text to which these attributes are appliedis centered isStruckout isStruckout Answer whether the text to which these attributes are appliedis struckout isUnderlined isUnderlined Answer whether the text to which these attributes are appliedis underlined strikeout strikeout Strike out the text to which these attributes are applied underline underline Underline the text to which these attributes are applied BLOX.BTextBindings BLOX.BTextBindings Defined in namespace BLOXSuperclass: BLOX.BEventTargetCategory: Graphics-Windows This object is used to assign event handlers to particular sections oftext in a BText widget. To use it, you simply have to add event handlersto it, and then create a BTextAttributes object that refers to it. BLOX.BTextBindings class: instance creation newnew Create a new instance of the receiver. BLOX.BTextTags BLOX.BTextTags Defined in namespace BLOXSuperclass: ObjectCategory: Graphics-Windows I am a private class. I sit between a BText and BTextAttributes, helpingthe latter in telling the former which attributes to use. BLOX.BToggle BLOX.BToggle Defined in namespace BLOXSuperclass: BLOX.BButtonCategory: Graphics-Windows I represent a button whose choice can be included (by checkingme) or excluded (by leaving me unchecked). BLOX.BToggle: accessing callback:message:callback: aReceiver message: aSymbol Set up so that aReceiver is sent the aSymbol message (the name ofa selector accepting at most two arguments) when the receiver isclicked. If the method accepts two arguments, the receiver ispassed as the first parameter. If the method accepts one or twoarguments, the state of the widget (true if it is selected, falseif it is not) is passed as the last parameter. invokeCallback invokeCallback Generate a synthetic callback. value value Answer whether the button is in a selected (checked) state. value: value: aBoolean Set whether the button is in a selected (checked) state andgenerates a callback accordingly. variable: variable: value Set the value of Tk's variable option for the widget. BLOX.BTransientWindow BLOX.BTransientWindow Defined in namespace BLOXSuperclass: BLOX.BWindowCategory: Graphics-Windows I am almost a boss. I represent a window which is logically linkedto another which sits higher in the widget hierarchy, e.g. a dialogbox BLOX.BTransientWindow class: instance creation newnew This method should not be called for instances of this class. new: new: parentWindow Answer a new transient window attached to the givenparent window and with nothing in its title bar caption. new:in: new: label in: parentWindow Answer a new transient window attached to the givenparent window and with `label' as its title bar caption. BLOX.BTransientWindow: widget protocol mapmap Map the window and inform the windows manager that thereceiver is a transient window working on behalf of itsparent. The window is also put in its parent window'swindow group: the window manager might use this information,for example, to unmap all of the windows in a group when thegroup's leader is iconified. BLOX.BViewport BLOX.BViewport Defined in namespace BLOXSuperclass: BLOX.BPrimitiveCategory: Graphics-Windows I represent an interface which is common to widgets that can bescrolled, like list boxes or text widgets. BLOX.BViewport: accessing connectedconnected Private - Answer the name of Tk widget for the connected widget. BLOX.BViewport: scrollbars horizontalhorizontal Answer whether an horizontal scrollbar is drawn in the widgetif needed. horizontal: horizontal: aBoolean Set whether an horizontal scrollbar is drawn in the widget ifneeded. horizontalNeeded horizontalNeeded Answer whether an horizontal scrollbar is needed to show all theinformation in the widget. horizontalShown horizontalShown Answer whether an horizontal scrollbar is drawn in the widget. vertical vertical Answer whether a vertical scrollbar is drawn in the widgetif needed. vertical: vertical: aBoolean Set whether a vertical scrollbar is drawn in the widget ifneeded. verticalNeeded verticalNeeded Answer whether a vertical scrollbar is needed to show all theinformation in the widget. verticalShown verticalShown Answer whether a vertical scrollbar is drawn in the widget. BLOX.BWidget BLOX.BWidget Defined in namespace BLOXSuperclass: BLOX.BloxCategory: Graphics-Windows I am the superclass for every widget except those related tomenus. I provide more common methods and geometry management BLOX.BWidget class: popups new destroynew Create an instance of the receiver inside a BPopupWindow; donot map the window, answer the new widget. The created widgetwill become a child of the window and be completely attachedto it (e.g. the geometry methods will modify the window's geometry).Note that while the widget *seems* to be directly painted onthe root window, it actually belongs to the BPopupWindow; sodon't send #destroy to the widget to remove it, but ratherto the window. popup: destroy popup: initializationBlock Create an instance of the receiver inside a BPopupWindow; beforereturning, pass the widget to the supplied initializationBlock,then map the window. Answer the new widget. The created widgetwill become a child of the window and be completely attachedto it (e.g. the geometry methods will modify the window's geometry).Note that while the widget *seems* to be directly painted onthe root window, it actually belongs to the BPopupWindow; sodon't send #destroy to the widget to remove it, but ratherto the window. BLOX.BWidget: accessing borderWidthborderWidth Answer the value of the borderWidth option for the widget.Specifies a non-negative value indicating the width of the 3-D border todraw around the outside of the widget (if such a border is being drawn; theeffect option typically determines this). The value may also be used whendrawing 3-D effects in the interior of the widget. The value is measured inpixels. borderWidth: borderWidth: value Set the value of the borderWidth option for the widget.Specifies a non-negative value indicating the width of the 3-D border todraw around the outside of the widget (if such a border is being drawn; theeffect option typically determines this). The value may also be used whendrawing 3-D effects in the interior of the widget. The value is measured inpixels. cursor cursor Answer the value of the cursor option for the widget.Specifies the mouse cursor to be used for the widget. The value of theoption is given by the standard X cursor cursor, i.e., any ofthe names defined in cursorcursor.h, without the leading XC_. cursor: cursor: value Set the value of the cursor option for the widget.Specifies the mouse cursor to be used for the widget. The value of theoption is given by the standard X cursor cursor, i.e., any ofthe names defined in cursorcursor.h, without the leading XC_. effect effect Answer the value of the effect option for the widget.Specifies the effect desired for the widget's border. Acceptable values areraised, sunken, flat, ridge, solid, and groove. The value indicates how theinterior of the widget should appear relative to its exterior; for example,raised means the interior of the widget should appear to protrude from thescreen, relative to the exterior of the widget. Raised and sunken give thetraditional 3-D appearance (for example, that of Xaw3D), while ridge and groovegive a “chiseled” appearance like that of Swing or GTK+'s Metal theme. Flatand solid are not 3-D. effect: effect: value Set the value of the effect option for the widget.Specifies the effect desired for the widget's border. Acceptable values areraised, sunken, flat, ridge, solid, and groove. The value indicates how theinterior of the widget should appear relative to its exterior; for example,raised means the interior of the widget should appear to protrude from thescreen, relative to the exterior of the widget. Raised and sunken give thetraditional 3-D appearance (for example, that of Xaw3D), while ridge and groovegive a “chiseled” appearance like that of Swing or GTK+'s Metal theme. Flatand solid are not 3-D. tabStop tabStop Answer the value of the tabStop option for the widget.Determines whether the window accepts the focus during keyboard traversal(e.g., Tab and Shift-Tab). Before setting the focus to a window, Bloxconsults the value of the tabStop option. A value of falsemeans that the window should be skipped entirely during keyboard traversal.true means that the window should receive the input focus as long as it isviewable (it and all of its ancestors are mapped). If you do not set thisoption, Blox makes the decision about whether ornot to focus on the window: the current algorithm is to skip the window ifit is disabled, it has no key bindings, or if it is not viewable. Of thestandard widgets, BForm, BContainer, BLabel and BImage have no key bindingsby default. tabStop: tabStop: value Set the value of the tabStop option for the widget.Determines whether the window accepts the focus during keyboard traversal(e.g., Tab and Shift-Tab). Before setting the focus to a window, Bloxconsults the value of the tabStop option. A value of falsemeans that the window should be skipped entirely during keyboard traversal.true means that the window should receive the input focus as long as it isviewable (it and all of its ancestors are mapped). If you do not set thisoption, Blox makes the decision about whether ornot to focus on the window: the current algorithm is to skip the window ifit is disabled, it has no key bindings, or if it is not viewable. Of thestandard widgets, BForm, BContainer, BLabel and BImage have no key bindingsby default. BLOX.BWidget: customization addChild:addChild: child The widget identified by child has been added to the receiver.This method is public not because you can call it, but becauseit can be useful to override it, not forgetting the call tobasicAddChild, to perform some initialization on the childrenjust added. Answer the new child. create create Make the receiver able to respond to its widget protocol.This method is public not because you can call it, but becauseit can be useful to override it, not forgetting the call tosuper, to perform some initialization on the primitivewidget just created; for an example of this, see theimplementation of BButtonLike. initialize: new: initialize: parentWidget This is called by #new: to initialize the widget (as the namesays...). The default implementation calls all the othermethods in the `customization' protocol and some privateones that take care of making the receiver's status consistent,so you should usually call it instead of doing everything byhand. This method is public not because you can call it, butbecause it might be useful to override it. Always answer thereceiver. setInitialSize initialize: setInitialSize This is called by #initialize: to set the widget's initial size.The whole area is occupied by default. This method is publicnot because you can call it, but because it can be useful tooverride it. BLOX.BWidget: geometry management boundingBoxboundingBox Answer a Rectangle containing the bounding box of the receiver boundingBox: boundingBox: rect Set the bounding box of the receiver to rect (a Rectangle). child:height: height height: child: child height: value Set the given child's height to value. The default implementation ofthis method uses `rubber-sheet' geometry management as explained inthe comment to BWidget's #height method. You should not use thismethod, which is automatically called by the child's #height: method,but you might want to override it. The child's property slots whosename ends with `Geom' are reserved for this method. This methodshould never fail – if it doesn't apply to the kind of geometrymanagement that the receiver does, just do nothing. child:heightOffset: height heightOffset: heightOffset: child: child heightOffset: value Adjust the given child's height by a fixed amount of value pixel. Thisis meaningful for the default implementation, using `rubber-sheet'geometry management as explained in the comment to BWidget's #height and#heightOffset: methods. You should not use this method, which isautomatically called by the child's #heightOffset: method, but youmight want to override it. if it doesn't apply to the kind ofgeometry management that the receiver does, just add value to thecurrent height of the widget. child:stretch: child: child stretch: aBoolean This method is only used when on the path from the receiverto its toplevel there is a BContainer. It decides whether child isamong the widgets that are stretched to fill the entire width ofthe BContainer; if this has not been set for this widget, itis propagated along the widget hierarchy. child:width: width width: child: child width: value Set the given child's width to value. The default implementation ofthis method uses `rubber-sheet' geometry management as explained inthe comment to BWidget's #width method. You should not use thismethod, which is automatically called by the child's #width: method,but you might want to override it. The child's property slots whosename ends with `Geom' are reserved for this method. This methodshould never fail – if it doesn't apply to the kind of geometrymanagement that the receiver does, just do nothing. child:widthOffset: width widthOffset: widthOffset: child: child widthOffset: value Adjust the given child's width by a fixed amount of value pixel. Thisis meaningful for the default implementation, using `rubber-sheet'geometry management as explained in the comment to BWidget's #width and#widthOffset: methods. You should not use this method, which isautomatically called by the child's #widthOffset: method, but youmight want to override it. if it doesn't apply to the kind ofgeometry management that the receiver does, just add value to thecurrent width of the widget. child:x: x x: child: child x: value Set the given child's x to value. The default implementation ofthis method uses `rubber-sheet' geometry management as explained inthe comment to BWidget's #x method. You should not use thismethod, which is automatically called by the child's #x: method,but you might want to override it. The child's property slots whosename ends with `Geom' are reserved for this method. This methodshould never fail – if it doesn't apply to the kind of geometrymanagement that the receiver does, just do nothing. child:xOffset: x xOffset: xOffset: child: child xOffset: value Adjust the given child's x by a fixed amount of value pixel. Thisis meaningful for the default implementation, using `rubber-sheet'geometry management as explained in the comment to BWidget's #x and#xOffset: methods. You should not use this method, which isautomatically called by the child's #xOffset: method, but youmight want to override it. if it doesn't apply to the kind ofgeometry management that the receiver does, just add value to thecurrent x of the widget. child:y: y y: child: child y: value Set the given child's y to value. The default implementation ofthis method uses `rubber-sheet' geometry management as explained inthe comment to BWidget's #y method. You should not use thismethod, which is automatically called by the child's #y: method,but you might want to override it. The child's property slots whosename ends with `Geom' are reserved for this method. This methodshould never fail – if it doesn't apply to the kind of geometrymanagement that the receiver does, just do nothing. child:yOffset: y yOffset: yOffset: child: child yOffset: value Adjust the given child's y by a fixed amount of value pixel. Thisis meaningful for the default implementation, using `rubber-sheet'geometry management as explained in the comment to BWidget's #y and#yOffset: methods. You should not use this method, which isautomatically called by the child's #yOffset: method, but youmight want to override it. if it doesn't apply to the kind ofgeometry management that the receiver does, just add value to thecurrent y of the widget. extent extent Answer a Point containing the receiver's size extent: extent: extent Set the receiver's size to the width and height contained in extent(a Point). height heightOffset: height Answer the `variable' part of the receiver's height within the parentwidget. The value returned does not include any fixed amount ofpixels indicated by #heightOffset: and must be interpreted in a relativefashion: the ratio of the returned value to the current size of theparent will be preserved upon resize. This apparently complicatedmethod is known as `rubber sheet' geometry management. Behaviorif the left or right edges are not within the client area of theparent is not defined – the window might be clamped or might bepositioned according to the specification. height: height: value Set to `value' the height of the widget within the parent widget. Thevalue is specified in a relative fashion as an integer, so that theratio of `value' to the current size of the parent will bepreserved upon resize. This apparently complicated method is knownas `rubber sheet' geometry management. heightAbsolute heightAbsolute Force a recalculation of the layout of widgets in the receiver'sparent, then answer the current height of the receiver in pixels. heightChild: height height heightChild: child Answer the given child's height. The default implementation of thismethod uses `rubber-sheet' geometry management as explained inthe comment to BWidget's #height method. You should not use thismethod, which is automatically called by the child's #height method,but you might want to override. The child's property slots whosename ends with `Geom' are reserved for this method. This methodshould never fail – if it doesn't apply to the kind of geometrymanagement that the receiver does, just return 0. heightOffset height: heightOffset Private - Answer the pixels to be added or subtracted to the heightof the receiver, with respect to the value set in a relative fashionthrough the #height: method. heightOffset: height: inset:and heightOffset: value Add or subtract to the height of the receiver a fixed amount of `value'pixels, with respect to the value set in a relative fashion throughthe #height: method. Usage of this method is deprecated; use #inset:and BContainers instead. heightPixels: height height height: heightPixels: value Set the current height of the receiver to `value' pixels. Note that,after calling this method, #height will answer 0, which is logicalconsidering that there is no `variable' part of the size (referto #height and #height: for more explanations). inset: inset: pixels Inset the receiver's bounding box by the specified amount. left:top:right:bottom: left: left top: top right: right bottom: bottom Set the bounding box of the receiver through its components. pos: pos: position Set the receiver's origin to the width and height contained in position(a Point). posHoriz: posHoriz: aBlox Position the receiver immediately to the right of aBlox. posVert: posVert: aBlox Position the receiver just below aBlox. stretch: stretch: aBoolean This method is only considered when on the path from the receiverto its toplevel there is a BContainer. It decides whether we areamong the widgets that are stretched to fill the entire width ofthe BContainer. width widthOffset: width Answer the `variable' part of the receiver's width within the parentwidget. The value returned does not include any fixed amount ofpixels indicated by #widthOffset: and must be interpreted in a relativefashion: the ratio of the returned value to the current size of theparent will be preserved upon resize. This apparently complicatedmethod is known as `rubber sheet' geometry management. Behaviorif the left or right edges are not within the client area of theparent is not defined – the window might be clamped or might bepositioned according to the specification. width: width: value Set to `value' the width of the widget within the parent widget. Thevalue is specified in a relative fashion as an integer, so that theratio of `value' to the current size of the parent will bepreserved upon resize. This apparently complicated method is knownas `rubber sheet' geometry management. width:height: width: xSize height: ySize Set the size of the receiver through its components xSize and ySize. widthAbsolute widthAbsolute Force a recalculation of the layout of widgets in the receiver'sparent, then answer the current width of the receiver in pixels. widthChild: width width widthChild: child Answer the given child's width. The default implementation of thismethod uses `rubber-sheet' geometry management as explained inthe comment to BWidget's #width method. You should not use thismethod, which is automatically called by the child's #width method,but you might want to override. The child's property slots whosename ends with `Geom' are reserved for this method. This methodshould never fail – if it doesn't apply to the kind of geometrymanagement that the receiver does, just return 0. widthOffset width: widthOffset Private - Answer the pixels to be added or subtracted to the widthof the receiver, with respect to the value set in a relative fashionthrough the #width: method. widthOffset: width: inset:and widthOffset: value Add or subtract to the width of the receiver a fixed amount of `value'pixels, with respect to the value set in a relative fashion throughthe #width: method. Usage of this method is deprecated; use #inset:and BContainers instead. widthPixels: width width width: widthPixels: value Set the current width of the receiver to `value' pixels. Note that,after calling this method, #width will answer 0, which is logicalconsidering that there is no `variable' part of the size (referto #width and #width: for more explanations). x xOffset: x Answer the `variable' part of the receiver's x within the parentwidget. The value returned does not include any fixed amount ofpixels indicated by #xOffset: and must be interpreted in a relativefashion: the ratio of the returned value to the current size of theparent will be preserved upon resize. This apparently complicatedmethod is known as `rubber sheet' geometry management. Behaviorif the left or right edges are not within the client area of theparent is not defined – the window might be clamped or might bepositioned according to the specification. x: x: value Set to `value' the x of the widget within the parent widget. Thevalue is specified in a relative fashion as an integer, so that theratio of `value' to the current size of the parent will bepreserved upon resize. This apparently complicated method is knownas `rubber sheet' geometry management. x:y: x: xPos y: yPos Set the origin of the receiver through its components xPos and yPos. x:y:width:height: x: xPos y: yPos width: xSize height: ySize Set the bounding box of the receiver through its origin andsize. xAbsolute xAbsolute Force a recalculation of the layout of widgets in the receiver'sparent, then answer the current x of the receiver in pixels. xChild: x x xChild: child Answer the given child's x. The default implementation of thismethod uses `rubber-sheet' geometry management as explained inthe comment to BWidget's #x method. You should not use thismethod, which is automatically called by the child's #x method,but you might want to override. The child's property slots whosename ends with `Geom' are reserved for this method. This methodshould never fail – if it doesn't apply to the kind of geometrymanagement that the receiver does, just return 0. xOffset x: xOffset Private - Answer the pixels to be added or subtracted to the xof the receiver, with respect to the value set in a relative fashionthrough the #x: method. xOffset: x: inset:and xOffset: value Add or subtract to the x of the receiver a fixed amount of `value'pixels, with respect to the value set in a relative fashion throughthe #x: method. Usage of this method is deprecated; use #inset:and BContainers instead. xPixels: x x x: xPixels: value Set the current x of the receiver to `value' pixels. Note that,after calling this method, #x will answer 0, which is logicalconsidering that there is no `variable' part of the size (referto #x and #x: for more explanations). xRoot xRoot Answer the x position of the receiver with respect to thetop-left corner of the desktop (including the offset of thevirtual root window under X). y yOffset: y Answer the `variable' part of the receiver's y within the parentwidget. The value returned does not include any fixed amount ofpixels indicated by #yOffset: and must be interpreted in a relativefashion: the ratio of the returned value to the current size of theparent will be preserved upon resize. This apparently complicatedmethod is known as `rubber sheet' geometry management. Behaviorif the left or right edges are not within the client area of theparent is not defined – the window might be clamped or might bepositioned according to the specification. y: y: value Set to `value' the y of the widget within the parent widget. Thevalue is specified in a relative fashion as an integer, so that theratio of `value' to the current size of the parent will bepreserved upon resize. This apparently complicated method is knownas `rubber sheet' geometry management. yAbsolute yAbsolute Force a recalculation of the layout of widgets in the receiver'sparent, then answer the current y of the receiver in pixels. yChild: y y yChild: child Answer the given child's y. The default implementation of thismethod uses `rubber-sheet' geometry management as explained inthe comment to BWidget's #y method. You should not use thismethod, which is automatically called by the child's #y method,but you might want to override. The child's property slots whosename ends with `Geom' are reserved for this method. This methodshould never fail – if it doesn't apply to the kind of geometrymanagement that the receiver does, just return 0. yOffset y: yOffset Private - Answer the pixels to be added or subtracted to the yof the receiver, with respect to the value set in a relative fashionthrough the #y: method. yOffset: y: inset:and yOffset: value Add or subtract to the y of the receiver a fixed amount of `value'pixels, with respect to the value set in a relative fashion throughthe #y: method. Usage of this method is deprecated; use #inset:and BContainers instead. yPixels: y y y: yPixels: value Set the current y of the receiver to `value' pixels. Note that,after calling this method, #y will answer 0, which is logicalconsidering that there is no `variable' part of the size (referto #y and #y: for more explanations). yRoot yRoot Answer the y position of the receiver with respect to thetop-left corner of the desktop (including the offset of thevirtual root window under X). BLOX.BWidget: widget protocol activateactivate At any given time, one window on each display is designatedas the focus window; any key press or key release events forthe display are sent to that window. This method allows oneto choose which window will have the focus in the receiver'sdisplayIf the application currently has the input focus on the receiver'sdisplay, this method resets the input focus for the receiver'sdisplay to the receiver. If the application doesn't currently have theinput focus on the receiver's display, Blox will remember the receiveras the focus for its top-level; the next time the focus arrives at thetop-level, it will be redirected to the receiver (this is becausemost window managers will set the focus only to top-level windows,leaving it up to the application to redirect the focus among thechildren of the top-level). activateNext tabStop: activateNext Activate the next widget in the focus `tabbing' order. The focusorder depends on the widget creation order; you can set which widgetsare in the order with the #tabStop: method. activatePrevious tabStop: activatePrevious Activate the previous widget in the focus `tabbing' order. The focusorder depends on the widget creation order; you can set which widgetsare in the order with the #tabStop: method. bringToTop bringToTop Raise the receiver so that it is above all of its siblings in thewidgets' z-order; the receiver will not be obscured by any siblings andwill obscure any siblings that overlap it. isActive isActive Return whether the receiver is the window that currently owns the focuson its display. sendToBack sendToBack Lower the receiver so that it is below all of its siblings in thewidgets' z-order; the receiver will be obscured by any siblings thatoverlap it and will not obscure any siblings. BLOX.BWindow BLOX.BWindow Defined in namespace BLOXSuperclass: BLOX.BFormCategory: Graphics-Windows I am the boss. Nothing else could be viewed or interacted with ifit wasn't for me... )):-> BLOX.BWindow class: instance creation newnew Answer a new top-level window. new: new: label Answer a new top-level window with `label' as its title bar caption. popup: popup: initializationBlock This method should not be called for instances of this class. BLOX.BWindow: accessing callbackcallback Answer a DirectedMessage that is sent to verify whether thereceiver must be destroyed when the user asks to unmap it. callback:message: callback: aReceiver message: aSymbol Set up so that aReceiver is sent the aSymbol message (the name ofa zero- or one-argument selector) when the user asks to unmap thereceiver. If the method accepts an argument, the receiver is passed.If the method returns true, the window and its children aredestroyed (which is the default action, taken if no callback isset up). If the method returns false, the window is left inplace. invokeCallback invokeCallback Generate a synthetic callback, destroying the window if nocallback was set up or if the callback method answers true. label label Answer the value of the label option for the widget.Specifies a string to be displayed inside the widget. The way in which thestring is displayed depends on the particular widget and may be determinedby other options, such as anchor. For windows, this is the title of the window. label: label: value Set the value of the label option for the widget.Specifies a string to be displayed inside the widget. The way in which thestring is displayed depends on the particular widget and may be determinedby other options, such as anchor. For windows, this is the title of the window. menu: menu: value Set the value of the menu option for the widget.Specifies a menu widget to be used as a menubar. On the Macintosh, themenubar will be displayed accross the top of the main monitor. On MicrosoftWindows and all UNIX platforms, the menu will appear accross the toplevelwindow as part of the window dressing maintained by the window manager. resizable resizable Answer the value of the resizable option for the widget.Answer whether the user can be resize the window or not. If resizing isdisabled, then the window's size will be the size from the most recentinteractive resize or geometry-setting method. If there has been no suchoperation then the window's natural size will be used. resizable: resizable: value Set the value of the resizable option for the widget.Answer whether the user can be resize the window or not. If resizing isdisabled, then the window's size will be the size from the most recentinteractive resize or geometry-setting method. If there has been no suchoperation then the window's natural size will be used. BLOX.BWindow: widget protocol centercenter Center the window in the screen centerIn: centerIn: view Center the window in the given widget height height Answer the height of the window, as deduced from the geometrythat the window manager imposed on the window. height: height: anInteger Ask the window manager to give the given height to the window. heightAbsolute heightAbsolute Answer the height of the window, as deduced from the geometrythat the window manager imposed on the window. heightOffset: heightOffset: value This method should not be called for instances of this class. iconify iconify Map a window and in iconified state. If a window has not beenmapped yet, this is achieved by mapping the window in withdrawnstate first, and then iconifying it. isMapped isMapped Answer whether the window is mapped isWindow isWindow Answer `true'. map map Map the window and bring it to the topmost position in the Z-order. modalMap modalMap Map the window while establishing an application-local grab for it.An event loop is started that ends only after the window has beendestroyed.When a grab is set for a particular window, all pointer events arerestructed to the grab window and its descendants in Blox's windowhierarchy. Whenever the pointer is within the grab window's subtree,the pointer will behave exactly the same as if there had been no grabgrab at all and all events will be reported in the normal fashion.When the pointer is outside the window's tree, button presses andreleases and mouse motion events are reported to the grabbing window,and window entry and window exit events are ignored. In other words,windows outside the grab subtree will be visible on the screen butthey will be insensitive until the grab is released. Thetree of windows underneath the grab window can include top-level windows,in which case all of those top-level windows and their descendants willcontinue to receive mouse events during the grab. Keyboard events (keypresses and key releases) are delivered as usual: the window managercontrols which application receives keyboard events, andif they are sent to any window in the grabbing application thenthey are redirected to the window owning the focus. state state Set the value of the state option for the window.Specifies one of four states for the window: either normal, iconic,withdrawn, or (Windows only) zoomed. state: map unmap state: aSymbol Raise an error. To set a BWindow's state, use #map and #unmap. unmap unmap Unmap a window, causing it to be forgotten about by the window manager width width Answer the width of the window, as deduced from the geometrythat the window manager imposed on the window. width: width: anInteger Ask the window manager to give the given width to the window. width:height: width: xSize height: ySize Ask the window manager to give the given width and height tothe window. widthAbsolute widthAbsolute Answer the width of the window, as deduced from the geometrythat the window manager imposed on the window. widthOffset: widthOffset: value This method should not be called for instances of this class. window window Answer the receiver. x x Answer the x coordinate of the window's top-left corner, asdeduced from the geometry that the window manager imposed onthe window. x: x: anInteger Ask the window manager to move the window's left borderto the given x coordinate, keeping the size unchanged x:y: x: xPos y: yPos Ask the window manager to move the window's top-left cornerto the given coordinates, keeping the size unchanged x:y:width:height: x: xPos y: yPos width: xSize height: ySize Ask the window manager to give the requested geometryto the window. xAbsolute xAbsolute Answer the x coordinate of the window's top-left corner, asdeduced from the geometry that the window manager imposed onthe window. xOffset: xOffset: value This method should not be called for instances of this class. y y Answer the y coordinate of the window's top-left corner, asdeduced from the geometry that the window manager imposed onthe window. y: y: anInteger Ask the window manager to move the window's left borderto the given y coordinate, keeping the size unchanged yAbsolute yAbsolute Answer the y coordinate of the window's top-left corner, asdeduced from the geometry that the window manager imposed onthe window. yOffset: yOffset: value This method should not be called for instances of this class. BLOX.Gui BLOX.Gui Defined in namespace BLOXSuperclass: ObjectCategory: Graphics-Windows I am a small class which serves as a base for complex objects whichexpose an individual protocol but internally use a Blox widget forcreating their user interface. BLOX.Gui: accessing bloxblox Return instance of blox subclass which implements window blox: blox: aBlox Set instance of blox subclass which implements window