# HG changeset patch # User ca # Date 878226685 -3600 # Node ID c90e57ac04a5b9bfb12596e1c02d3cbe1fea2a03 # Parent 9d34f1ff4d2906d22ec390ac9d34fbaf1c16357b add help text and support of label is image diff -r 9d34f1ff4d29 -r c90e57ac04a5 DataSetBuilder.st --- a/DataSetBuilder.st Thu Oct 30 16:49:16 1997 +0100 +++ b/DataSetBuilder.st Thu Oct 30 16:51:25 1997 +0100 @@ -79,11 +79,12 @@ #'window:' #(#WindowSpec #'name:' 'DataSet Basic' - #'layout:' #(#LayoutFrame 197 0 172 0 485 0 427 0) + #'layout:' #(#LayoutFrame 350 0 22 0 638 0 277 0) #'label:' 'DataSet Basic' #'min:' #(#Point 10 10) #'max:' #(#Point 1280 1024) - #'bounds:' #(#Rectangle 197 172 486 428) + #'bounds:' #(#Rectangle 350 22 639 278) + #'usePreferredExtent:' false ) #'component:' #(#SpecCollection @@ -91,20 +92,20 @@ #( #(#LabelSpec #'name:' 'labelLabel' - #'layout:' #(#AlignmentOrigin 84 0 29 0 1 0.5) + #'layout:' #(#AlignmentOrigin 70 0 30 0 1 0.5) #'label:' 'Label:' #'adjust:' #right #'resizeForLabel:' true ) #(#InputFieldSpec #'name:' 'labelField' - #'layout:' #(#LayoutFrame 86 0 20 0 -12 1.0 40 0) + #'layout:' #(#LayoutFrame 74 0 22 0 -12 1.0 40 0) #'activeHelpKey:' #label #'model:' #label ) #(#FramedBoxSpec #'name:' 'typesFrame' - #'layout:' #(#LayoutFrame 0 0.0 51 0 0 1.0 131 0) + #'layout:' #(#LayoutFrame 8 0.0 51 0 0 1.0 131 0) #'component:' #(#SpecCollection #'collection:' @@ -143,74 +144,34 @@ #'label:' 'Types:' #'labelPosition:' #topLeft ) - #(#FramedBoxSpec - #'name:' 'selectorsFrame' - #'layout:' #(#LayoutFrame 0 0.0 143 0 0 1.0 245 0) - #'component:' - #(#SpecCollection - #'collection:' - #( - #(#LabelSpec - #'name:' 'readLabel' - #'layout:' #(#AlignmentOrigin 84 0 25 0 1 0.5) - #'label:' 'Read:' - #'adjust:' #right - #'resizeForLabel:' true - ) - #(#InputFieldSpec - #'name:' 'readSelector' - #'layout:' #(#LayoutFrame 86 0 16 0 17 1.0 36 0) - #'activeHelpKey:' #readSelector - #'model:' #readSelector - #'type:' #symbolOrNil - ) - #(#LabelSpec - #'name:' 'menuLabel' - #'layout:' #(#AlignmentOrigin 84 0 51 0 1 0.5) - #'label:' 'Menu:' - #'adjust:' #right - #'resizeForLabel:' true - ) - #(#InputFieldSpec - #'name:' 'menuField' - #'layout:' #(#LayoutFrame 86 0 41 0 17 1.0 61 0) - #'activeHelpKey:' #menuSelector - #'model:' #menu - #'type:' #symbolOrNil - ) - #(#LabelSpec - #'name:' 'printLabel' - #'layout:' #(#AlignmentOrigin 84 0 75 0 1 0.5) - #'label:' 'Print:' - #'adjust:' #right - #'resizeForLabel:' true - ) - #(#InputFieldSpec - #'name:' 'printSelector' - #'layout:' #(#LayoutFrame 86 0 66 0 17 1.0 86 0) - #'activeHelpKey:' #printSelector - #'model:' #printSelector - #'type:' #symbolOrNil - ) - ) - ) - #'label:' 'Selectors:' - #'labelPosition:' #topLeft + #(#CheckBoxSpec + #'name:' 'canSelect' + #'layout:' #(#LayoutOrigin 9 0 145 0) + #'activeHelpKey:' #canSelect + #'model:' #canSelect + #'label:' 'Is Selectable' + ) + #(#CheckBoxSpec + #'name:' 'labelIsImage' + #'layout:' #(#LayoutOrigin 9 0 169 0) + #'activeHelpKey:' #labelIsImage + #'model:' #labelIsImage + #'label:' 'Label Is Image' ) ) ) ) ! -detailsEditSpec +colorEditSpec "this window spec was automatically generated by the ST/X UIPainter" "do not manually edit this - the painter/builder may not be able to handle the specification if its corrupted." " - UIPainter new openOnClass:DataSetBuilder andSelector:#detailsEditSpec - DataSetBuilder new openInterface:#detailsEditSpec + UIPainter new openOnClass:DataSetBuilder andSelector:#colorEditSpec + DataSetBuilder new openInterface:#colorEditSpec " @@ -220,86 +181,81 @@ #(#FullSpec #'window:' #(#WindowSpec - #'name:' 'DataSet Details' - #'layout:' #(#LayoutFrame 327 0 282 0 617 0 495 0) - #'label:' 'DataSet Details' + #'name:' 'DataSet Misc' + #'layout:' #(#LayoutFrame 219 0 193 0 496 0 423 0) + #'label:' 'DataSet Misc' #'min:' #(#Point 10 10) #'max:' #(#Point 1280 1024) - #'bounds:' #(#Rectangle 327 282 618 496) + #'bounds:' #(#Rectangle 219 193 497 424) + #'usePreferredExtent:' false ) #'component:' #(#SpecCollection #'collection:' #( - #(#LabelSpec - #'name:' 'textDescription' - #'layout:' #(#Point 10 15) - #'label:' 'Text Description:' - #'resizeForLabel:' true - ) - #(#LabelSpec - #'name:' 'formatLabel' - #'layout:' #(#AlignmentOrigin 83 0 47 0 1 0.5) - #'label:' 'Format:' - #'resizeForLabel:' true - ) - #(#InputFieldSpec - #'name:' 'formatField' - #'layout:' #(#LayoutFrame 87 0 37 0 -19 1.0 59 0) - #'activeHelpKey:' #formatString - #'model:' #formatString - ) - #(#LabelSpec - #'name:' 'inpFieldDescription' - #'layout:' #(#Point 10 80) - #'label:' 'InputField Description:' - #'resizeForLabel:' true - ) - #(#LabelSpec - #'name:' 'typeLabel' - #'layout:' #(#AlignmentOrigin 83 0 111 0 1 0.5) - #'label:' 'Type:' - #'resizeForLabel:' true + #(#FramedBoxSpec + #'name:' 'colorsBox' + #'layout:' #(#LayoutFrame 0 0.0 24 0 0 1.0 121 0) + #'component:' + #(#SpecCollection + #'collection:' + #( + #(#ColorMenuSpec + #'name:' 'fgMenu' + #'layout:' #(#LayoutFrame 101 0 17 0 10 1.0 45 0) + #'activeHelpKey:' #foregroundColor + #'model:' #foregroundColor + ) + #(#LabelSpec + #'name:' 'fgLabel' + #'layout:' #(#AlignmentOrigin 100 0 32 0 1 0.5) + #'label:' 'FG-Color:' + #'adjust:' #right + #'resizeForLabel:' true + ) + #(#LabelSpec + #'name:' 'bgLabel' + #'layout:' #(#AlignmentOrigin 100 0 66 0 1 0.5) + #'label:' 'BG-Color:' + #'adjust:' #right + #'resizeForLabel:' true + ) + #(#ColorMenuSpec + #'name:' 'bgMenu' + #'layout:' #(#LayoutFrame 101 0 52 0 10 1.0 80 0) + #'activeHelpKey:' #backgroundColor + #'model:' #backgroundColor + ) + ) + ) + #'label:' 'Colors:' + #'labelPosition:' #topLeft ) - #(#ComboListSpec - #'name:' 'typeCombo' - #'layout:' #(#LayoutFrame 87 0 102 0 289 0 122 0) - #'activeHelpKey:' #type - #'model:' #type - #'comboList:' #typeList - #'useIndex:' false - ) - #(#LabelSpec - #'name:' 'sizeLabel' - #'layout:' #(#AlignmentOrigin 83 0 136 0 1 0.5) - #'label:' 'Size:' - #'resizeForLabel:' true - ) - #(#InputFieldSpec - #'name:' 'sizeField' - #'layout:' #(#LayoutFrame 87 0 126 0 -19 1.0 148 0) - #'activeHelpKey:' #size - #'model:' #size - #'type:' #numberOrNil - ) - #(#LabelSpec - #'name:' 'choicesLabel' - #'layout:' #(#Point 10 165) - #'label:' 'Choices:' - #'resizeForLabel:' true - ) - #(#LabelSpec - #'name:' 'selectorLabel' - #'layout:' #(#AlignmentOrigin 83 0 198 0 1 0.5) - #'label:' 'Selector:' - #'resizeForLabel:' true - ) - #(#InputFieldSpec - #'name:' 'choiceField' - #'layout:' #(#LayoutFrame 87 0 188 0 -19 1.0 210 0) - #'activeHelpKey:' #choices - #'model:' #choices - #'type:' #symbolOrNil + #(#FramedBoxSpec + #'name:' 'separatorBox' + #'layout:' #(#LayoutFrame 0 0.0 131 0 0 1.0 217 0) + #'component:' + #(#SpecCollection + #'collection:' + #( + #(#CheckBoxSpec + #'name:' 'showRowSeparator' + #'layout:' #(#AlignmentOrigin 39 0 30 0 0 0.5) + #'activeHelpKey:' #showRowSeparator + #'model:' #showRowSeparator + #'label:' 'Show Row-Separator' + ) + #(#CheckBoxSpec + #'name:' 'showColSeparator' + #'layout:' #(#AlignmentOrigin 39 0 56 0 0 0.5) + #'activeHelpKey:' #showColumnSeparator + #'model:' #showColSeparator + #'label:' 'Show Column-Separator' + ) + ) + ) + #'label:' 'Separators' + #'labelPosition:' #topLeft ) ) ) @@ -403,15 +359,100 @@ ) ! -miscEditSpec +formatEditSpec "this window spec was automatically generated by the ST/X UIPainter" "do not manually edit this - the painter/builder may not be able to handle the specification if its corrupted." " - UIPainter new openOnClass:DataSetBuilder andSelector:#miscEditSpec - DataSetBuilder new openInterface:#miscEditSpec + UIPainter new openOnClass:DataSetBuilder andSelector:#formatEditSpec + DataSetBuilder new openInterface:#formatEditSpec + " + + + + ^ + + #(#FullSpec + #'window:' + #(#WindowSpec + #'name:' 'DataSet Details' + #'layout:' #(#LayoutFrame 327 0 282 0 617 0 495 0) + #'label:' 'DataSet Details' + #'min:' #(#Point 10 10) + #'max:' #(#Point 1280 1024) + #'bounds:' #(#Rectangle 327 282 618 496) + ) + #'component:' + #(#SpecCollection + #'collection:' + #( + #(#LabelSpec + #'name:' 'textDescription' + #'layout:' #(#Point 10 15) + #'label:' 'Text Description:' + #'resizeForLabel:' true + ) + #(#LabelSpec + #'name:' 'formatLabel' + #'layout:' #(#AlignmentOrigin 83 0 47 0 1 0.5) + #'label:' 'Format:' + #'resizeForLabel:' true + ) + #(#InputFieldSpec + #'name:' 'formatField' + #'layout:' #(#LayoutFrame 87 0 37 0 -19 1.0 59 0) + #'activeHelpKey:' #formatString + #'model:' #formatString + ) + #(#LabelSpec + #'name:' 'inpFieldDescription' + #'layout:' #(#Point 10 80) + #'label:' 'InputField Description:' + #'resizeForLabel:' true + ) + #(#LabelSpec + #'name:' 'typeLabel' + #'layout:' #(#AlignmentOrigin 83 0 111 0 1 0.5) + #'label:' 'Type:' + #'resizeForLabel:' true + ) + #(#ComboListSpec + #'name:' 'typeCombo' + #'layout:' #(#LayoutFrame 87 0 102 0 289 0 122 0) + #'activeHelpKey:' #type + #'model:' #type + #'comboList:' #typeList + #'useIndex:' false + ) + #(#LabelSpec + #'name:' 'sizeLabel' + #'layout:' #(#AlignmentOrigin 83 0 136 0 1 0.5) + #'label:' 'Size:' + #'resizeForLabel:' true + ) + #(#InputFieldSpec + #'name:' 'sizeField' + #'layout:' #(#LayoutFrame 87 0 126 0 -19 1.0 148 0) + #'activeHelpKey:' #size + #'model:' #size + #'type:' #numberOrNil + ) + ) + ) + ) +! + +selectorsEditSpec + "this window spec was automatically generated by the ST/X UIPainter" + + "do not manually edit this - the painter/builder may not be able to + handle the specification if its corrupted." + + " + UIPainter new openOnClass:DataSetBuilder andSelector:#selectorsEditSpec + DataSetBuilder new openInterface:#selectorsEditSpec " @@ -421,69 +462,110 @@ #(#FullSpec #'window:' #(#WindowSpec - #'name:' 'DataSet Misc' - #'layout:' #(#LayoutFrame 219 0 193 0 509 0 406 0) - #'label:' 'DataSet Misc' + #'name:' 'DataSet Basic' + #'layout:' #(#LayoutFrame 219 0 193 0 507 0 448 0) + #'label:' 'DataSet Basic' #'min:' #(#Point 10 10) #'max:' #(#Point 1280 1024) - #'bounds:' #(#Rectangle 219 193 510 407) + #'bounds:' #(#Rectangle 219 193 508 449) + #'usePreferredExtent:' false ) #'component:' #(#SpecCollection #'collection:' #( #(#LabelSpec - #'name:' 'foregroundLabel' - #'layout:' #(#AlignmentOrigin 100 0 40 0 1 0.5) - #'label:' 'foreground:' - #'adjust:' #right - #'resizeForLabel:' true - ) - #(#ColorMenuSpec - #'name:' 'colorMenuFG' - #'layout:' #(#LayoutFrame 101 0 25 0 0 1.0 53 0) - #'activeHelpKey:' #foregroundColor - #'model:' #foregroundColor - ) - #(#LabelSpec - #'name:' 'backgroundLabel' - #'layout:' #(#AlignmentOrigin 100 0 74 0 1 0.5) - #'label:' 'background:' + #'name:' 'labelLabel' + #'layout:' #(#AlignmentOrigin 84 0 29 0 1 0.5) + #'label:' 'Label:' #'adjust:' #right #'resizeForLabel:' true ) - #(#ColorMenuSpec - #'name:' 'colorMenuBG' - #'layout:' #(#LayoutFrame 101 0 60 0 0 1.0 88 0) - #'activeHelpKey:' #backgroundColor - #'model:' #backgroundColor - ) - #(#CheckBoxSpec - #'name:' 'canSelect' - #'layout:' #(#Point 17 102) - #'activeHelpKey:' #canSelect - #'model:' #canSelect - #'label:' 'Is Selectable' + #(#InputFieldSpec + #'name:' 'labelField' + #'layout:' #(#LayoutFrame 86 0 20 0 -12 1.0 40 0) + #'activeHelpKey:' #label + #'model:' #label ) - #(#LabelSpec - #'name:' 'separatorsLabel' - #'layout:' #(#AlignmentOrigin 84 0 154 0 1 0.5) - #'label:' 'Separators:' - #'resizeForLabel:' true + #(#FramedBoxSpec + #'name:' 'valuesBox' + #'layout:' #(#LayoutFrame 0 0.0 20 0 0 1.0 101 0) + #'component:' + #(#SpecCollection + #'collection:' + #( + #(#LabelSpec + #'name:' 'readLabel' + #'layout:' #(#AlignmentOrigin 84 0 25 0 1 0.5) + #'label:' 'Read:' + #'adjust:' #right + #'resizeForLabel:' true + ) + #(#InputFieldSpec + #'name:' 'readSelector' + #'layout:' #(#LayoutFrame 86 0 16 0 17 1.0 36 0) + #'activeHelpKey:' #readSelector + #'model:' #readSelector + #'type:' #symbolOrNil + ) + #(#LabelSpec + #'name:' 'printLabel' + #'layout:' #(#AlignmentOrigin 84 0 51 0 1 0.5) + #'label:' 'Print:' + #'adjust:' #right + #'resizeForLabel:' true + ) + #(#InputFieldSpec + #'name:' 'printSelector' + #'layout:' #(#LayoutFrame 86 0 42 0 17 1.0 62 0) + #'activeHelpKey:' #printSelector + #'model:' #printSelector + #'type:' #symbolOrNil + ) + ) + ) + #'label:' 'Values:' + #'labelPosition:' #topLeft ) - #(#CheckBoxSpec - #'name:' 'showRowSeparator' - #'layout:' #(#AlignmentOrigin 86 0 156 0 0 0.5) - #'activeHelpKey:' #showRowSeparator - #'model:' #showRowSeparator - #'label:' 'Show Row-Separator' - ) - #(#CheckBoxSpec - #'name:' 'showColSeparator' - #'layout:' #(#AlignmentOrigin 86 0 182 0 0 0.5) - #'activeHelpKey:' #showColumnSeparator - #'model:' #showColSeparator - #'label:' 'Show Column-Separator' + #(#FramedBoxSpec + #'name:' 'menusBox' + #'layout:' #(#LayoutFrame 0 0.0 115 0 0 1.0 195 0) + #'component:' + #(#SpecCollection + #'collection:' + #( + #(#LabelSpec + #'name:' 'menuLabel' + #'layout:' #(#AlignmentOrigin 84 0 25 0 1 0.5) + #'label:' 'Menu:' + #'adjust:' #right + #'resizeForLabel:' true + ) + #(#InputFieldSpec + #'name:' 'menuSelector' + #'layout:' #(#LayoutFrame 86 0 16 0 17 1.0 36 0) + #'activeHelpKey:' #menuSelector + #'model:' #menu + #'type:' #symbolOrNil + ) + #(#LabelSpec + #'name:' 'choicesLabel' + #'layout:' #(#AlignmentOrigin 84 0 51 0 1 0.5) + #'label:' 'Choices:' + #'adjust:' #right + #'resizeForLabel:' true + ) + #(#InputFieldSpec + #'name:' 'choicesSelector' + #'layout:' #(#LayoutFrame 86 0 42 0 17 1.0 62 0) + #'activeHelpKey:' #choices + #'model:' #choices + #'type:' #symbolOrNil + ) + ) + ) + #'label:' 'Menus:' + #'labelPosition:' #topLeft ) ) ) @@ -502,54 +584,63 @@ ^ super helpSpec addPairsFrom:#( -#menuSelector -'a selector to access the middleButton menu or nil' +#backgroundColor +'set the background color of the column if the color-checkBox is turned on. Otherwise, the column uses its default background color (which is specified in the styleSheet).' #canSelect -'are cells in column selectable' +'if true, each cell in the column can be selected. In case of having a menu, the menu can be opened by selecting the cell and pressing down the right or middle button of the mouse. if false, the whole line is selected. The menu opened derives from the DataSetView, which is specified in the window specification (Basics).' + +#choices +'selector to get the collection of choices for a column which is selectable and its editor is kind of a ComboBox or ComboList. If a cell in the column is selected, the visual editor is opened and in case of having choices, the choices are assigned to the widget.' + +#editorField +'type of visual editor (using default editors) or a selector, which will return an visual editor. If the cell is selected, a visual editor is opened in in the cell. In case of an unsupported selector (user defined editor), the row object is asked for the visual editor by performing the selector on the row. A widget instance must be returned which is opened in the cell.' + +#foregroundColor +'set the foreground color of the column if the color-checkBox is turned on. Otherwise, the column uses its default foreground color (which is specified in the styleSheet).' #formatString -'string describing special formatting for an input field { #InputField #ComboBox #ComboList }.' +'format string, which specifies the output format of a text in a cell. \ At the moment only numbers are supported. \ \ for example: 0.0000' + +#height +'preferred height (optional)' + +#label +'the label of the column. If ''label is image'' is off, this is the label string. Otherwise, it specifies the applications selector, which returns the label - either a string or a bitmap image.' + +#labelIsImage +'if ''label is image'' is off (the default), the columns label is the string as entered in the label aspect. Otherwise, its the name of the message sent to the application - this should return a string or bitmap image, which is used as logo in the column.' + +#menuSelector +'a selector to access the middleButton menu or nil. If a cell is selected. The menu will be opened by selecting the cell and pressing down the right or middle button of the mouse.' + +#minWidth +'makes sense if the width is set to 0 or nil. This is the minimum size required; no computation dependent on the contents. When resizing the view the column may grow or shrink to the minimum width.' + +#printSelector +'a selector with one argument, the DataSetView. Used to access a drawable display object. In case of nil, the value derived from the readSelector is shown in the unselected cell.\ \ Using bitmaps, the DataSetView offers three important methods:\ \ #registerImage:anImage key:aSymbol\ register an image with an unique symbol. This symbol can be used by the row object to access the image, using #registeredImageAt:. The image will be associated to the device.\ \ #registeredImageAt:aSymbol\ returns an image assigned to the symbol or nil. The image returned is associated to the device.\ \ #releaseAllRegisteredImages\ relaese all registered images' + +#readSelector +'a selector, which is used to get or set the value of a cell. The value returned by the method can be a string object or a bitmap. The set operation only is performed if the column is selectable.' + +#rendererType +'This type specifies, how the text of an unselected cell should be shown. As Text, CheckToggle, ComboBox, ComboList or as a RowSelector.' + +#showColumnSeparator +'show or hide the column separator (right vertical separator).' + +#showRowSeparator +'show or hide the row separator (bottom horizontal separator)' #size 'max size of an InputField, ComboBox or ComboList. 0 or nil means unlimited.' -#rendererType -'text description type: how the text should be shown in the cell' - -#minWidth -'makes sense if the width is set to 0 or nil. This is the minimum size required; no computation dependent on the contents. When resizing the view the column may grow or shrink to the minimum width.' - #type 'a type converter symbol used by the input field' -#label -'the label of the column' - -#choices -'selector to get the collection of choices for a #ComboBox or #ComboList (optional).' - -#showRowSeparator -'show or hide row separator (bottom horizontal separator)' - #width 'the width of a fixed column; in case of nil or 0 the column width will be computed dependent on the contents.' -#printSelector -'a selector with one argument the gc. Used to access a drawable display object (optional). In case of nil, the value derived from the readSelector is shown in the unselected cell.' - -#showColumnSeparator -'show or hide column separator (right vertical separator).' - -#height -'preferred height (optional)' - -#editorField -'type of visual editor (using default editors) or a selector, which will return an visual editor' - -#readSelector -'selector used to get and set a value' - ) ! ! @@ -661,8 +752,9 @@ slices ^ #( (Basics basicsEditSpec) - (Details detailsEditSpec) - (Misc miscEditSpec) + (Selectors selectorsEditSpec) + (Format formatEditSpec) + (Colors colorEditSpec) (Dimension dimensionEditSpec) ) ! @@ -687,11 +779,12 @@ #'window:' #(#WindowSpec #'name:' 'unnamed canvas' - #'layout:' #(#LayoutFrame 197 0 172 0 668 0 512 0) + #'layout:' #(#LayoutFrame 219 0 193 0 690 0 533 0) #'label:' 'unnamed canvas' #'min:' #(#Point 10 10) #'max:' #(#Point 1152 900) - #'bounds:' #(#Rectangle 197 172 669 513) + #'bounds:' #(#Rectangle 219 193 691 534) + #'usePreferredExtent:' false ) #'component:' #(#SpecCollection @@ -723,9 +816,12 @@ #(#SequenceViewSpec #'name:' 'columnView' #'layout:' #(#LayoutFrame 0 0.0 35 0.0 0 1.0 0 1.0) + #'enableChannel:' #isNotModified #'model:' #selectedColumnModel #'menu:' #columnMenu + #'hasHorizontalScrollBar:' true #'hasVerticalScrollBar:' true + #'miniScrollerHorizontal:' true #'useIndex:' true #'sequenceList:' #seqList ) @@ -928,7 +1024,7 @@ #(#MenuItem #'label:' 'stepDown' #'value:' #'doMoveColumn:' - #'enabled:' #notModified + #'enabled:' #isNotModified #'argument:' #down #'labelImage:' #(#ResourceRetriever #UIPainter #iconStepDown) ) @@ -1213,7 +1309,7 @@ ]. aspects keysAndValuesDo:[:aKey :aModel| - column perform:(aKey , ':') asSymbol with:(aModel value) + column perform:(aKey , ':') asSymbol with:(aModel value). ]. self seqList at:selectedColumnIndex put:((aspects at:#label) value). self updateColumnView. @@ -1528,6 +1624,7 @@ choices editorType formatString + labelIsImage size type width