UILayoutTool.st
changeset 741 c94606aecebf
parent 714 61d4a7df2574
child 751 b182b42defd0
equal deleted inserted replaced
740:e7362f3ab5e5 741:c94606aecebf
   104 ! !
   104 ! !
   105 
   105 
   106 !UILayoutTool class methodsFor:'help specs'!
   106 !UILayoutTool class methodsFor:'help specs'!
   107 
   107 
   108 helpSpec
   108 helpSpec
   109     "return a dictionary filled with helpKey -> helptext associations.
   109     "This resource specification was automatically generated
   110      These are used by the activeHelp tool."
   110      by the UIHelpTool of ST/X."
   111 
   111 
   112     "
   112     "Do not manually edit this!! If it is corrupted,
   113     UIHelpTool openOnClass:UILayoutTool    
   113      the UIHelpTool may not be able to read the specification."
   114     "
   114 
   115 
   115     "
   116   ^ super helpSpec addPairsFrom:#(
   116      UIHelpTool openOnClass:UILayoutTool    
       
   117     "
       
   118 
       
   119     <resource: #help>
       
   120 
       
   121     ^super helpSpec addPairsFrom:#(
       
   122 
       
   123 #cornerX
       
   124 'Absolute corner x of the selected widget.'
       
   125 
       
   126 #cornerY
       
   127 'Absolute corner y of the selected widget.'
       
   128 
       
   129 #layoutTool
       
   130 'Tool to set the layout of the selected widget.'
   117 
   131 
   118 #leftAbsolute
   132 #leftAbsolute
   119 'Offset of the left edge; positive is to the right, negative to the left.'
   133 'Offset of the left edge; positive is to the right, negative to the left.'
   120 
   134 
       
   135 #leftRelative
       
   136 'Relative origin x of the selected widget.'
       
   137 
       
   138 #makeLeftAbsolute
       
   139 'Computes current left offset and relative origin x to an absolute origin x.'
       
   140 
       
   141 #makeLeftRelative
       
   142 'Compute current relative origin x and offset of the left edge to a relative origin x.'
       
   143 
       
   144 #makeTopAbsolute
       
   145 'Computes current top offset and relative origin y to an absolute origin y.'
       
   146 
       
   147 #makeTopRelative
       
   148 'Computes current relative origin y and offset of the top edge to a relative origin y.'
       
   149 
       
   150 #originX
       
   151 'Absolute origin x of the selected widget.'
       
   152 
   121 #originY
   153 #originY
   122 'Absolute origin y of the selected widget.'
   154 'Absolute origin y of the selected widget.'
   123 
   155 
   124 #cornerY
       
   125 'Absolute corner y of the selected widget.'
       
   126 
       
   127 #makeLeftAbsolute
       
   128 'Computes current left offset and relative origin x to an absolute origin x.'
       
   129 
       
   130 #topAbsolute
   156 #topAbsolute
   131 'Offset of the top edge; positive is to the bottom, negative to the top.'
   157 'Offset of the top edge; positive is to the bottom, negative to the top.'
   132 
   158 
   133 #makeTopRelative
       
   134 'Computes current relative origin y and offset of the top edge to a relative origin y.'
       
   135 
       
   136 #leftRelative
       
   137 'Relative origin x of the selected widget.'
       
   138 
       
   139 #makeLeftRelative
       
   140 'Compute current relative origin x and offset of the left edge to a relative origin x.'
       
   141 
       
   142 #topRelative
   159 #topRelative
   143 'Relative origin y of the selected widget.'
   160 'Relative origin y of the selected widget.'
   144 
   161 
   145 #originX
       
   146 'Absolute origin x of the selected widget.'
       
   147 
       
   148 #cornerX
       
   149 'Absolute corner x of the selected widget.'
       
   150 
       
   151 #layoutTool
       
   152 'Tool to set the layout of the selected widget.'
       
   153 
       
   154 #makeTopAbsolute
       
   155 'Computes current top offset and relative origin y to an absolute origin y.'
       
   156 
       
   157 )
   162 )
   158 ! !
   163 ! !
   159 
   164 
   160 !UILayoutTool class methodsFor:'interface specs'!
   165 !UILayoutTool class methodsFor:'interface specs'!
   161 
   166 
   162 layoutOriginSpec
   167 layoutOriginSpec
   163     "this window spec was automatically generated by the ST/X UIPainter"
   168     "This resource specification was automatically generated
   164 
   169      by the UIPainter of ST/X."
   165     "do not manually edit this - the painter/builder may not be able to
   170 
   166      handle the specification if its corrupted."
   171     "Do not manually edit this!! If it is corrupted,
       
   172      the UIPainter may not be able to read the specification."
   167 
   173 
   168     "
   174     "
   169      UIPainter new openOnClass:UILayoutTool andSelector:#layoutOriginSpec
   175      UIPainter new openOnClass:UILayoutTool andSelector:#layoutOriginSpec
   170      UILayoutTool new openInterface:#layoutOriginSpec
   176      UILayoutTool new openInterface:#layoutOriginSpec
   171     "
   177     "
   175     ^
   181     ^
   176      
   182      
   177        #(#FullSpec
   183        #(#FullSpec
   178           #window: 
   184           #window: 
   179            #(#WindowSpec
   185            #(#WindowSpec
   180               #name: 'uIPainterView'
   186               #name: 'UILayoutTool'
   181               #layout: #(#LayoutFrame 31 0 423 0 293 0 525 0)
   187               #layout: #(#LayoutFrame 509 0 293 0 771 0 395 0)
   182               #label: 'unnamed'
   188               #label: 'UILayoutTool'
   183               #min: #(#Point 10 10)
   189               #min: #(#Point 10 10)
   184               #max: #(#Point 1152 900)
   190               #max: #(#Point 1152 900)
   185               #bounds: #(#Rectangle 31 423 294 526)
   191               #bounds: #(#Rectangle 509 293 772 396)
   186               #usePreferredExtent: false
   192               #usePreferredExtent: false
   187           )
   193           )
   188           #component: 
   194           #component: 
   189            #(#SpecCollection
   195            #(#SpecCollection
   190               #collection: 
   196               #collection: 
   269           )
   275           )
   270       )
   276       )
   271 !
   277 !
   272 
   278 
   273 layoutPointSpec
   279 layoutPointSpec
   274     "this window spec was automatically generated by the ST/X UIPainter"
   280     "This resource specification was automatically generated
   275 
   281      by the UIPainter of ST/X."
   276     "do not manually edit this - the painter/builder may not be able to
   282 
   277      handle the specification if its corrupted."
   283     "Do not manually edit this!! If it is corrupted,
       
   284      the UIPainter may not be able to read the specification."
   278 
   285 
   279     "
   286     "
   280      UIPainter new openOnClass:UILayoutTool andSelector:#layoutPointSpec
   287      UIPainter new openOnClass:UILayoutTool andSelector:#layoutPointSpec
   281      UILayoutTool new openInterface:#layoutPointSpec
   288      UILayoutTool new openInterface:#layoutPointSpec
   282     "
   289     "
   286     ^
   293     ^
   287      
   294      
   288        #(#FullSpec
   295        #(#FullSpec
   289           #window: 
   296           #window: 
   290            #(#WindowSpec
   297            #(#WindowSpec
   291               #name: 'uIPainterView'
   298               #name: 'UILayoutTool'
   292               #layout: #(#LayoutFrame 31 0 423 0 220 0 499 0)
   299               #layout: #(#LayoutFrame 565 0 276 0 754 0 352 0)
   293               #label: 'unnamed'
   300               #label: 'UILayoutTool'
   294               #min: #(#Point 10 10)
   301               #min: #(#Point 10 10)
   295               #max: #(#Point 1152 900)
   302               #max: #(#Point 1152 900)
   296               #bounds: #(#Rectangle 31 423 221 500)
   303               #bounds: #(#Rectangle 565 276 755 353)
   297               #usePreferredExtent: false
   304               #usePreferredExtent: false
   298           )
   305           )
   299           #component: 
   306           #component: 
   300            #(#SpecCollection
   307            #(#SpecCollection
   301               #collection: 
   308               #collection: 
   342        ) 
   349        ) 
   343 
   350 
   344 !
   351 !
   345 
   352 
   346 windowSpec
   353 windowSpec
   347     "this window spec was automatically generated by the ST/X UIPainter"
   354     "This resource specification was automatically generated
   348 
   355      by the UIPainter of ST/X."
   349     "do not manually edit this - the painter/builder may not be able to
   356 
   350      handle the specification if its corrupted."
   357     "Do not manually edit this!! If it is corrupted,
       
   358      the UIPainter may not be able to read the specification."
   351 
   359 
   352     "
   360     "
   353      UIPainter new openOnClass:UILayoutTool andSelector:#windowSpec
   361      UIPainter new openOnClass:UILayoutTool andSelector:#windowSpec
   354      UILayoutTool new openInterface:#windowSpec
   362      UILayoutTool new openInterface:#windowSpec
   355     "
   363      UILayoutTool open
   356     "UILayoutTool open"
   364     "
   357 
   365 
   358     <resource: #canvas>
   366     <resource: #canvas>
   359 
   367 
   360     ^
   368     ^
   361      
   369      
   362        #(#FullSpec
   370        #(#FullSpec
   363           #'window:' 
   371           #window: 
   364            #(#WindowSpec
   372            #(#WindowSpec
   365               #'name:' 'uIPainterView'
   373               #name: 'UILayoutTool'
   366               #'layout:' #(#LayoutFrame 0 0.0 0 0.0 0 1.0 0 1.0)
   374               #layout: #(#LayoutFrame 571 0 290 0 870 0 589 0)
   367               #'label:' 'unnamed canvas'
   375               #label: 'UILayoutTool'
   368               #'bounds:' #(#Rectangle 0 0 300 300)
   376               #min: #(#Point 10 10)
   369           )
   377               #max: #(#Point 1152 900)
   370           #'component:' 
   378               #bounds: #(#Rectangle 571 290 871 590)
       
   379               #usePreferredExtent: false
       
   380           )
       
   381           #component: 
   371            #(#SpecCollection
   382            #(#SpecCollection
   372               #'collection:' 
   383               #collection: 
   373                #(
   384                #(
   374                  #(#NoteBookViewSpec
   385                  #(#NoteBookViewSpec
   375                     #'name:' 'NoteBook'
   386                     #name: 'NoteBook'
   376                     #'layout:' #(#LayoutFrame 0 0.0 0 0.0 0 1.0 0 1.0)
   387                     #layout: #(#LayoutFrame 0 0.0 0 0.0 0 1.0 0 1.0)
   377                     #'activeHelpKey:' #layoutTool
   388                     #activeHelpKey: #layoutTool
   378                     #'enableChannel:' #enableChannel
   389                     #enableChannel: #enableChannel
   379                     #'tabable:' true
   390                     #tabable: true
   380                     #'menu:' #noteBookList
   391                     #model: #noteBookModel
   381                     #'style:' 
   392                     #menu: #noteBookList
   382                      #(#FontDescription
   393                     #style: #(#FontDescription #helvetica #medium #roman #'10')
   383                         #helvetica #medium
   394                     #direction: #bottom
   384                         #roman #'10'
   395                     #canvas: #noteBookView
   385                     )
       
   386                     #'model:' #noteBookModel
       
   387                     #'tabWidget:' #Window
       
   388                     #'direction:' #bottom
       
   389                     #'canvas:' #noteBookView
       
   390                 )
   396                 )
   391               )
   397               )
   392           )
   398           )
   393       )
   399       )
   394 ! !
   400 ! !
   706         noteBook := self noteBookView.
   712         noteBook := self noteBookView.
   707         noteBook client:appl.
   713         noteBook client:appl.
   708 
   714 
   709         appl notNil ifTrue:[
   715         appl notNil ifTrue:[
   710             noteBook scrolledView allViewBackground:(noteBook viewBackground).
   716             noteBook scrolledView allViewBackground:(noteBook viewBackground).
       
   717             masterApplication updateFonts
   711         ]
   718         ]
   712     ].
   719     ].
   713     self update
   720     self update
   714 
   721 
   715 ! !
   722 ! !
   716 
   723 
   717 !UILayoutTool::AlignmentOrigin class methodsFor:'help specs'!
   724 !UILayoutTool::AlignmentOrigin class methodsFor:'help specs'!
   718 
   725 
   719 helpSpec
   726 helpSpec
   720     "return a dictionary filled with helpKey -> helptext associations.
   727     "This resource specification was automatically generated
   721      These are used by the activeHelp tool."
   728      by the UIHelpTool of ST/X."
   722 
   729 
   723     "
   730     "Do not manually edit this!! If it is corrupted,
   724     UIHelpTool openOnClass:UILayoutTool::AlignmentOrigin    
   731      the UIHelpTool may not be able to read the specification."
   725     "
   732 
   726 
   733     "
   727   ^ super helpSpec addPairsFrom:#(
   734      UIHelpTool openOnClass:UILayoutTool::AlignmentOrigin    
       
   735     "
       
   736 
       
   737     <resource: #help>
       
   738 
       
   739     ^super helpSpec addPairsFrom:#(
       
   740 
       
   741 #alignBottomCenter
       
   742 'Aligns the selected widget bottomCenter to location.'
       
   743 
       
   744 #alignBottomLeft
       
   745 'Aligns the selected widget bottomLeft to location.'
       
   746 
       
   747 #alignBottomRight
       
   748 'Aligns the selected widget bottomRight to location.'
       
   749 
       
   750 #alignCenter
       
   751 'Aligns the selected widget center to location.'
       
   752 
       
   753 #alignHorizontal
       
   754 'Horizontal inset to the location point of the selected widget.'
   728 
   755 
   729 #alignLeftCenter
   756 #alignLeftCenter
   730 'Aligns the selected widget leftCenter to location.'
   757 'Aligns the selected widget leftCenter to location.'
   731 
   758 
   732 #alignBottomCenter
   759 #alignRightCenter
   733 'Aligns the selected widget bottomCenter to location.'
   760 'Aligns the selected widget rightCenter to location.'
   734 
       
   735 #alignHorizontal
       
   736 'Horizontal inset to the location point of the selected widget.'
       
   737 
       
   738 #alignBottomRight
       
   739 'Aligns the selected widget bottomRight to location.'
       
   740 
   761 
   741 #alignTopCenter
   762 #alignTopCenter
   742 'Aligns the selected widget topCenter to location.'
   763 'Aligns the selected widget topCenter to location.'
   743 
   764 
   744 #alignTopLeft
   765 #alignTopLeft
   745 'Aligns the selected widget topLeft to location.'
   766 'Aligns the selected widget topLeft to location.'
   746 
   767 
   747 #alignTopRight
   768 #alignTopRight
   748 'Aligns the selected widget topRight to location.'
   769 'Aligns the selected widget topRight to location.'
   749 
   770 
   750 #alignCenter
       
   751 'Aligns the selected widget center to location.'
       
   752 
       
   753 #alignVertical
   771 #alignVertical
   754 'Vertical inset to the location point of the widget.'
   772 'Vertical inset to the location point of the widget.'
   755 
   773 
   756 #alignBottomLeft
       
   757 'Aligns the selected widget bottomLeft to location.'
       
   758 
       
   759 #alignRightCenter
       
   760 'Aligns the selected widget rightCenter to location.'
       
   761 
       
   762 )
   774 )
   763 ! !
   775 ! !
   764 
   776 
   765 !UILayoutTool::AlignmentOrigin class methodsFor:'interface specs'!
   777 !UILayoutTool::AlignmentOrigin class methodsFor:'interface specs'!
   766 
   778 
   767 windowSpec
   779 windowSpec
   768     "this window spec was automatically generated by the ST/X UIPainter"
   780     "This resource specification was automatically generated
   769 
   781      by the UIPainter of ST/X."
   770     "do not manually edit this - the painter/builder may not be able to
   782 
   771      handle the specification if its corrupted."
   783     "Do not manually edit this!! If it is corrupted,
       
   784      the UIPainter may not be able to read the specification."
   772 
   785 
   773     "
   786     "
   774      UIPainter new openOnClass:UILayoutTool::AlignmentOrigin andSelector:#windowSpec
   787      UIPainter new openOnClass:UILayoutTool::AlignmentOrigin andSelector:#windowSpec
   775      UILayoutTool::AlignmentOrigin new openInterface:#windowSpec
   788      UILayoutTool::AlignmentOrigin new openInterface:#windowSpec
   776     "
   789      UILayoutTool::AlignmentOrigin open
   777     "UILayoutTool::AlignmentOrigin open"
   790     "
   778 
   791 
   779     <resource: #canvas>
   792     <resource: #canvas>
   780 
   793 
   781     ^
   794     ^
   782      
   795      
   783        #(#FullSpec
   796        #(#FullSpec
   784           #window: 
   797           #window: 
   785            #(#WindowSpec
   798            #(#WindowSpec
   786               #name: 'uIPainterView'
   799               #name: 'UILayoutTool-AlignmentOrigin'
   787               #layout: #(#LayoutFrame 31 0 423 0 298 0 627 0)
   800               #layout: #(#LayoutFrame 206 0 285 0 473 0 489 0)
   788               #label: 'AlignmentOrigin'
   801               #label: 'UILayoutTool-AlignmentOrigin'
   789               #min: #(#Point 10 10)
   802               #min: #(#Point 10 10)
   790               #max: #(#Point 1152 900)
   803               #max: #(#Point 1152 900)
   791               #bounds: #(#Rectangle 31 423 299 628)
   804               #bounds: #(#Rectangle 206 285 474 490)
   792               #usePreferredExtent: false
   805               #usePreferredExtent: false
   793           )
   806           )
   794           #component: 
   807           #component: 
   795            #(#SpecCollection
   808            #(#SpecCollection
   796               #collection: 
   809               #collection: 
   797                #(
   810                #(
   798                  #(#UISubSpecification
   811                  #(#UISubSpecification
   799                     #name: 'subSpecification'
   812                     #name: 'subSpec'
   800                     #layout: #(#LayoutOrigin 0 0 0 0)
   813                     #layout: #(#LayoutOrigin 0 0 0 0)
   801                     #majorKey: #UILayoutTool
   814                     #majorKey: #UILayoutTool
   802                     #minorKey: #layoutOriginSpec
   815                     #minorKey: #layoutOriginSpec
   803                 )
   816                 )
   804                  #(#LabelSpec
   817                  #(#LabelSpec
   805                     #name: 'label5'
   818                     #name: 'alignHLabel'
   806                     #layout: #(#AlignmentOrigin 78 0 102 0 1 0)
   819                     #layout: #(#AlignmentOrigin 78 0 102 0 1 0)
   807                     #label: 'Align H:'
   820                     #label: 'Align H:'
   808                     #adjust: #right
   821                     #adjust: #right
   809                 )
   822                 )
   810                  #(#LabelSpec
   823                  #(#LabelSpec
   811                     #name: 'label6'
   824                     #name: 'alignVLabel'
   812                     #layout: #(#AlignmentOrigin 78 0 128 0 1 0)
   825                     #layout: #(#AlignmentOrigin 78 0 128 0 1 0)
   813                     #label: 'Align V:'
   826                     #label: 'Align V:'
   814                     #adjust: #right
   827                     #adjust: #right
   815                 )
   828                 )
   816                  #(#InputFieldSpec
   829                  #(#InputFieldSpec
   817                     #name: 'editField5'
   830                     #name: 'leftAlignmentFractionField'
   818                     #layout: #(#LayoutFrame 80 0 99 0 137 0 121 0)
   831                     #layout: #(#LayoutFrame 80 0 99 0 137 0 121 0)
   819                     #activeHelpKey: #alignHorizontal
   832                     #activeHelpKey: #alignHorizontal
   820                     #tabable: true
   833                     #tabable: true
   821                     #model: #leftAlignmentFraction
   834                     #model: #leftAlignmentFraction
   822                     #type: #numberOrNil
   835                     #type: #numberOrNil
   823                 )
   836                 )
   824                  #(#InputFieldSpec
   837                  #(#InputFieldSpec
   825                     #name: 'editField6'
   838                     #name: 'topAlignmentFractionField'
   826                     #layout: #(#LayoutFrame 80 0 125 0 137 0 147 0)
   839                     #layout: #(#LayoutFrame 80 0 125 0 137 0 147 0)
   827                     #activeHelpKey: #alignVertical
   840                     #activeHelpKey: #alignVertical
   828                     #tabable: true
   841                     #tabable: true
   829                     #model: #topAlignmentFraction
   842                     #model: #topAlignmentFraction
   830                     #type: #numberOrNil
   843                     #type: #numberOrNil
  1045 ! !
  1058 ! !
  1046 
  1059 
  1047 !UILayoutTool::Extent class methodsFor:'help specs'!
  1060 !UILayoutTool::Extent class methodsFor:'help specs'!
  1048 
  1061 
  1049 helpSpec
  1062 helpSpec
  1050     "return a dictionary filled with helpKey -> helptext associations.
  1063     "This resource specification was automatically generated
  1051      These are used by the activeHelp tool."
  1064      by the UIHelpTool of ST/X."
  1052 
  1065 
  1053     "
  1066     "Do not manually edit this!! If it is corrupted,
  1054     UIHelpTool openOnClass:UILayoutTool::Extent    
  1067      the UIHelpTool may not be able to read the specification."
  1055     "
  1068 
  1056 
  1069     "
  1057   ^ super helpSpec addPairsFrom:#(
  1070      UIHelpTool openOnClass:UILayoutTool::Extent    
       
  1071     "
       
  1072 
       
  1073     <resource: #help>
       
  1074 
       
  1075     ^super helpSpec addPairsFrom:#(
       
  1076 
       
  1077 #hrzExtent
       
  1078 'Horizontal extent of the selected widget.'
  1058 
  1079 
  1059 #vrtExtent
  1080 #vrtExtent
  1060 'Vertical extent of the selected widget.'
  1081 'Vertical extent of the selected widget.'
  1061 
       
  1062 #hrzExtent
       
  1063 'Horizontal extent of the selected widget.'
       
  1064 
  1082 
  1065 )
  1083 )
  1066 ! !
  1084 ! !
  1067 
  1085 
  1068 !UILayoutTool::Extent class methodsFor:'interface specs'!
  1086 !UILayoutTool::Extent class methodsFor:'interface specs'!
  1084     ^
  1102     ^
  1085      
  1103      
  1086        #(#FullSpec
  1104        #(#FullSpec
  1087           #window: 
  1105           #window: 
  1088            #(#WindowSpec
  1106            #(#WindowSpec
  1089               #name: 'uIPainterView'
  1107               #name: 'UILayoutTool-Extent'
  1090               #layout: #(#LayoutFrame 31 0 423 0 256 0 508 0)
  1108               #layout: #(#LayoutFrame 31 0 423 0 256 0 508 0)
  1091               #label: 'unnamed'
  1109               #label: 'UILayoutTool-Extent'
  1092               #min: #(#Point 10 10)
  1110               #min: #(#Point 10 10)
  1093               #max: #(#Point 1152 900)
  1111               #max: #(#Point 1152 900)
  1094               #bounds: #(#Rectangle 31 423 257 509)
  1112               #bounds: #(#Rectangle 31 423 257 509)
  1095               #usePreferredExtent: false
  1113               #usePreferredExtent: false
  1096           )
  1114           )
  1155 ! !
  1173 ! !
  1156 
  1174 
  1157 !UILayoutTool::LayoutFrame class methodsFor:'help specs'!
  1175 !UILayoutTool::LayoutFrame class methodsFor:'help specs'!
  1158 
  1176 
  1159 helpSpec
  1177 helpSpec
  1160     "return a dictionary filled with helpKey -> helptext associations.
  1178     "This resource specification was automatically generated
  1161      These are used by the activeHelp tool."
  1179      by the UIHelpTool of ST/X."
  1162 
  1180 
  1163     "
  1181     "Do not manually edit this!! If it is corrupted,
  1164     UIHelpTool openOnClass:UILayoutTool::LayoutFrame    
  1182      the UIHelpTool may not be able to read the specification."
  1165     "
  1183 
  1166 
  1184     "
  1167   ^ super helpSpec addPairsFrom:#(
  1185      UIHelpTool openOnClass:UILayoutTool::LayoutFrame    
       
  1186     "
       
  1187 
       
  1188     <resource: #help>
       
  1189 
       
  1190     ^super helpSpec addPairsFrom:#(
       
  1191 
       
  1192 #bottomAbsolute
       
  1193 'Offset of the bottom edge; positive is to the bottom, negative to the top.'
       
  1194 
       
  1195 #bottomRelative
       
  1196 'Relative corner y of the selected widget.'
       
  1197 
       
  1198 #makeBottomAbsolute
       
  1199 'Computes current bottom offset and relative corner y to an absolute corner y.'
       
  1200 
       
  1201 #makeBottomRelative
       
  1202 'Computes current relative corner y and offset of the bottom edge to a relative corner y.'
       
  1203 
       
  1204 #makeRightAbsolute
       
  1205 'Computes current right offset and relative corner x to an absolute corner x.'
  1168 
  1206 
  1169 #makeRightRelative
  1207 #makeRightRelative
  1170 'Computes current relative corner x and offset of the right edge to a relative corner x.'
  1208 'Computes current relative corner x and offset of the right edge to a relative corner x.'
  1171 
  1209 
  1172 #makeBottomAbsolute
  1210 #rightAbsolute
  1173 'Computes current bottom offset and relative corner y to an absolute corner y.'
  1211 'Offset of the right edge; positive is to the right, negative to the left.'
  1174 
       
  1175 #bottomAbsolute
       
  1176 'Offset of the bottom edge; positive is to the bottom, negative to the top.'
       
  1177 
  1212 
  1178 #rightRelative
  1213 #rightRelative
  1179 'Relative corner x of the selected widget.'
  1214 'Relative corner x of the selected widget.'
  1180 
       
  1181 #makeBottomRelative
       
  1182 'Computes current relative corner y and offset of the bottom edge to a relative corner y.'
       
  1183 
       
  1184 #makeRightAbsolute
       
  1185 'Computes current right offset and relative corner x to an absolute corner x.'
       
  1186 
       
  1187 #bottomRelative
       
  1188 'Relative corner y of the selected widget.'
       
  1189 
       
  1190 #rightAbsolute
       
  1191 'Offset of the right edge; positive is to the right, negative to the left.'
       
  1192 
  1215 
  1193 )
  1216 )
  1194 ! !
  1217 ! !
  1195 
  1218 
  1196 !UILayoutTool::LayoutFrame class methodsFor:'interface specs'!
  1219 !UILayoutTool::LayoutFrame class methodsFor:'interface specs'!
  1212     ^
  1235     ^
  1213      
  1236      
  1214        #(#FullSpec
  1237        #(#FullSpec
  1215           #window: 
  1238           #window: 
  1216            #(#WindowSpec
  1239            #(#WindowSpec
  1217               #name: 'uIPainterView'
  1240               #name: 'UILayoutTool-LayoutFrame'
  1218               #layout: #(#LayoutFrame 31 0 423 0 280 0 615 0)
  1241               #layout: #(#LayoutFrame 31 0 423 0 280 0 615 0)
  1219               #label: 'unnamed'
  1242               #label: 'UILayoutTool-LayoutFrame'
  1220               #min: #(#Point 10 10)
  1243               #min: #(#Point 10 10)
  1221               #max: #(#Point 1152 900)
  1244               #max: #(#Point 1152 900)
  1222               #bounds: #(#Rectangle 31 423 281 616)
  1245               #bounds: #(#Rectangle 31 423 281 616)
  1223               #usePreferredExtent: false
  1246               #usePreferredExtent: false
  1224           )
  1247           )
  1338 ! !
  1361 ! !
  1339 
  1362 
  1340 !UILayoutTool::LayoutOrigin class methodsFor:'interface specs'!
  1363 !UILayoutTool::LayoutOrigin class methodsFor:'interface specs'!
  1341 
  1364 
  1342 windowSpec
  1365 windowSpec
  1343     "this window spec was automatically generated by the ST/X UIPainter"
  1366     "This resource specification was automatically generated
  1344 
  1367      by the UIPainter of ST/X."
  1345     "do not manually edit this - the painter/builder may not be able to
  1368 
  1346      handle the specification if its corrupted."
  1369     "Do not manually edit this!! If it is corrupted,
       
  1370      the UIPainter may not be able to read the specification."
  1347 
  1371 
  1348     "
  1372     "
  1349      UIPainter new openOnClass:UILayoutTool::LayoutOrigin andSelector:#windowSpec
  1373      UIPainter new openOnClass:UILayoutTool::LayoutOrigin andSelector:#windowSpec
  1350      UILayoutTool::LayoutOrigin new openInterface:#windowSpec
  1374      UILayoutTool::LayoutOrigin new openInterface:#windowSpec
  1351     "
  1375      UILayoutTool::LayoutOrigin open
  1352     "UILayoutTool::LayoutOrigin open"
  1376     "
  1353 
       
  1354     <resource: #canvas>
       
  1355 
       
  1356     ^
       
  1357      
       
  1358        #(#FullSpec
       
  1359           #'window:' 
       
  1360            #(#WindowSpec
       
  1361               #'name:' 'uIPainterView'
       
  1362               #'layout:' #(#LayoutFrame 0 0.0 0 0.0 0 1.0 0 1.0)
       
  1363               #'label:' 'unnamed'
       
  1364               #'bounds:' #(#Rectangle 0 0 258 93)
       
  1365           )
       
  1366           #'component:' 
       
  1367            #(#SpecCollection
       
  1368               #'collection:' 
       
  1369                #(
       
  1370                  #(#UISubSpecification
       
  1371                     #'name:' 'subSpecification'
       
  1372                     #'layout:' #(#LayoutOrigin 0 0 0 0)
       
  1373                     #'majorKey:' #UILayoutTool
       
  1374                     #'minorKey:' #layoutOriginSpec
       
  1375                 )
       
  1376               )
       
  1377           )
       
  1378       )
       
  1379 ! !
       
  1380 
       
  1381 !UILayoutTool::LayoutOrigin methodsFor:'accessing'!
       
  1382 
       
  1383 fetch:aView
       
  1384     "fetch layoutOrigin
       
  1385     "
       
  1386     |layout|
       
  1387 
       
  1388     layout  := UIPainterView asLayoutFrameFromView:aView.
       
  1389 
       
  1390     (self aspectFor:#leftOffset)   value:(layout leftOffset).
       
  1391     (self aspectFor:#leftFraction) value:(layout leftFraction).
       
  1392     (self aspectFor:#topOffset)    value:(layout topOffset).
       
  1393     (self aspectFor:#topFraction)  value:(layout topFraction).
       
  1394 
       
  1395 
       
  1396 !
       
  1397 
       
  1398 layout
       
  1399     "returns current layout as layoutOrigin
       
  1400     "
       
  1401     |layout|
       
  1402 
       
  1403     layout  := Smalltalk::LayoutOrigin new.
       
  1404 
       
  1405     layout   leftOffset:((self aspectFor:#leftOffset)   value) ? 0.
       
  1406     layout    topOffset:((self aspectFor:#topOffset)    value) ? 0.
       
  1407     layout leftFraction:((self aspectFor:#leftFraction) value) ? 0.
       
  1408     layout  topFraction:((self aspectFor:#topFraction)  value) ? 0.
       
  1409 
       
  1410   ^ layout
       
  1411 
       
  1412 ! !
       
  1413 
       
  1414 !UILayoutTool::Point class methodsFor:'interface specs'!
       
  1415 
       
  1416 windowSpec
       
  1417     "this window spec was automatically generated by the ST/X UIPainter"
       
  1418 
       
  1419     "do not manually edit this - the painter/builder may not be able to
       
  1420      handle the specification if its corrupted."
       
  1421 
       
  1422     "
       
  1423      UIPainter new openOnClass:UILayoutTool::Point andSelector:#windowSpec
       
  1424      UILayoutTool::Point new openInterface:#windowSpec
       
  1425     "
       
  1426     "UILayoutTool::Point open"
       
  1427 
       
  1428     <resource: #canvas>
       
  1429 
       
  1430     ^
       
  1431      
       
  1432        #(#FullSpec
       
  1433           #'window:' 
       
  1434            #(#WindowSpec
       
  1435               #'name:' 'uIPainterView'
       
  1436               #'layout:' #(#LayoutFrame 0 0.0 0 0.0 0 1.0 0 1.0)
       
  1437               #'label:' 'unnamed'
       
  1438               #'bounds:' #(#Rectangle 0 0 194 66)
       
  1439           )
       
  1440           #'component:' 
       
  1441            #(#SpecCollection
       
  1442               #'collection:' 
       
  1443                #(
       
  1444                  #(#UISubSpecification
       
  1445                     #'name:' 'subSpecification'
       
  1446                     #'layout:' #(#LayoutOrigin 0 0 0 0)
       
  1447                     #'majorKey:' #UILayoutTool
       
  1448                     #'minorKey:' #layoutPointSpec
       
  1449                 )
       
  1450               )
       
  1451           )
       
  1452       )
       
  1453 ! !
       
  1454 
       
  1455 !UILayoutTool::Point methodsFor:'accessing'!
       
  1456 
       
  1457 fetch:aView
       
  1458     "fetch point
       
  1459     "
       
  1460     |origin|
       
  1461 
       
  1462     origin  := aView computeOrigin.
       
  1463 
       
  1464     (self aspectFor:#leftOffset) value:(origin x).
       
  1465     (self aspectFor:#topOffset)  value:(origin y).
       
  1466 
       
  1467 
       
  1468 !
       
  1469 
       
  1470 layout
       
  1471     "returns current layout as point
       
  1472     "
       
  1473   ^ Smalltalk::Point x:(((self aspectFor:#leftOffset) value) ? 0)
       
  1474                      y:(((self aspectFor:#topOffset)  value) ? 0)
       
  1475 
       
  1476 ! !
       
  1477 
       
  1478 !UILayoutTool::Rectangle class methodsFor:'interface specs'!
       
  1479 
       
  1480 windowSpec
       
  1481     "this window spec was automatically generated by the ST/X UIPainter"
       
  1482 
       
  1483     "do not manually edit this - the painter/builder may not be able to
       
  1484      handle the specification if its corrupted."
       
  1485 
       
  1486     "
       
  1487      UIPainter new openOnClass:UILayoutTool::Rectangle andSelector:#windowSpec
       
  1488      UILayoutTool::Rectangle new openInterface:#windowSpec
       
  1489     "
       
  1490     "UILayoutTool::Rectangle open"
       
  1491 
  1377 
  1492     <resource: #canvas>
  1378     <resource: #canvas>
  1493 
  1379 
  1494     ^
  1380     ^
  1495      
  1381      
  1496        #(#FullSpec
  1382        #(#FullSpec
  1497           #window: 
  1383           #window: 
  1498            #(#WindowSpec
  1384            #(#WindowSpec
  1499               #name: 'uIPainterView'
  1385               #name: 'UILayoutTool-LayoutOrigin'
  1500               #layout: #(#LayoutFrame 31 0 423 0 254 0 568 0)
  1386               #layout: #(#LayoutFrame 417 0 298 0 674 0 390 0)
  1501               #label: 'unnamed'
  1387               #label: 'UILayoutTool-LayoutOrigin'
  1502               #min: #(#Point 10 10)
  1388               #min: #(#Point 10 10)
  1503               #max: #(#Point 1152 900)
  1389               #max: #(#Point 1152 900)
  1504               #bounds: #(#Rectangle 31 423 255 569)
  1390               #bounds: #(#Rectangle 417 298 675 391)
       
  1391               #usePreferredExtent: false
       
  1392           )
       
  1393           #component: 
       
  1394            #(#SpecCollection
       
  1395               #collection: 
       
  1396                #(
       
  1397                  #(#UISubSpecification
       
  1398                     #name: 'subSpec'
       
  1399                     #layout: #(#LayoutOrigin 0 0 0 0)
       
  1400                     #majorKey: #UILayoutTool
       
  1401                     #minorKey: #layoutOriginSpec
       
  1402                 )
       
  1403               )
       
  1404           )
       
  1405       )
       
  1406 ! !
       
  1407 
       
  1408 !UILayoutTool::LayoutOrigin methodsFor:'accessing'!
       
  1409 
       
  1410 fetch:aView
       
  1411     "fetch layoutOrigin
       
  1412     "
       
  1413     |layout|
       
  1414 
       
  1415     layout  := UIPainterView asLayoutFrameFromView:aView.
       
  1416 
       
  1417     (self aspectFor:#leftOffset)   value:(layout leftOffset).
       
  1418     (self aspectFor:#leftFraction) value:(layout leftFraction).
       
  1419     (self aspectFor:#topOffset)    value:(layout topOffset).
       
  1420     (self aspectFor:#topFraction)  value:(layout topFraction).
       
  1421 
       
  1422 
       
  1423 !
       
  1424 
       
  1425 layout
       
  1426     "returns current layout as layoutOrigin
       
  1427     "
       
  1428     |layout|
       
  1429 
       
  1430     layout  := Smalltalk::LayoutOrigin new.
       
  1431 
       
  1432     layout   leftOffset:((self aspectFor:#leftOffset)   value) ? 0.
       
  1433     layout    topOffset:((self aspectFor:#topOffset)    value) ? 0.
       
  1434     layout leftFraction:((self aspectFor:#leftFraction) value) ? 0.
       
  1435     layout  topFraction:((self aspectFor:#topFraction)  value) ? 0.
       
  1436 
       
  1437   ^ layout
       
  1438 
       
  1439 ! !
       
  1440 
       
  1441 !UILayoutTool::Point class methodsFor:'interface specs'!
       
  1442 
       
  1443 windowSpec
       
  1444     "This resource specification was automatically generated
       
  1445      by the UIPainter of ST/X."
       
  1446 
       
  1447     "Do not manually edit this!! If it is corrupted,
       
  1448      the UIPainter may not be able to read the specification."
       
  1449 
       
  1450     "
       
  1451      UIPainter new openOnClass:UILayoutTool::Point andSelector:#windowSpec
       
  1452      UILayoutTool::Point new openInterface:#windowSpec
       
  1453      UILayoutTool::Point open
       
  1454     "
       
  1455 
       
  1456     <resource: #canvas>
       
  1457 
       
  1458     ^
       
  1459      
       
  1460        #(#FullSpec
       
  1461           #window: 
       
  1462            #(#WindowSpec
       
  1463               #name: 'UILayoutTool-Point'
       
  1464               #layout: #(#LayoutFrame 427 0 336 0 635 0 423 0)
       
  1465               #label: 'UILayoutTool-Point'
       
  1466               #min: #(#Point 10 10)
       
  1467               #max: #(#Point 1152 900)
       
  1468               #bounds: #(#Rectangle 427 336 636 424)
       
  1469               #usePreferredExtent: false
       
  1470           )
       
  1471           #component: 
       
  1472            #(#SpecCollection
       
  1473               #collection: 
       
  1474                #(
       
  1475                  #(#UISubSpecification
       
  1476                     #name: 'subSpec'
       
  1477                     #layout: #(#LayoutOrigin 0 0 0 0)
       
  1478                     #majorKey: #UILayoutTool
       
  1479                     #minorKey: #layoutPointSpec
       
  1480                 )
       
  1481               )
       
  1482           )
       
  1483       )
       
  1484 ! !
       
  1485 
       
  1486 !UILayoutTool::Point methodsFor:'accessing'!
       
  1487 
       
  1488 fetch:aView
       
  1489     "fetch point
       
  1490     "
       
  1491     |origin|
       
  1492 
       
  1493     origin  := aView computeOrigin.
       
  1494 
       
  1495     (self aspectFor:#leftOffset) value:(origin x).
       
  1496     (self aspectFor:#topOffset)  value:(origin y).
       
  1497 
       
  1498 
       
  1499 !
       
  1500 
       
  1501 layout
       
  1502     "returns current layout as point
       
  1503     "
       
  1504   ^ Smalltalk::Point x:(((self aspectFor:#leftOffset) value) ? 0)
       
  1505                      y:(((self aspectFor:#topOffset)  value) ? 0)
       
  1506 
       
  1507 ! !
       
  1508 
       
  1509 !UILayoutTool::Rectangle class methodsFor:'interface specs'!
       
  1510 
       
  1511 windowSpec
       
  1512     "This resource specification was automatically generated
       
  1513      by the UIPainter of ST/X."
       
  1514 
       
  1515     "Do not manually edit this!! If it is corrupted,
       
  1516      the UIPainter may not be able to read the specification."
       
  1517 
       
  1518     "
       
  1519      UIPainter new openOnClass:UILayoutTool::Rectangle andSelector:#windowSpec
       
  1520      UILayoutTool::Rectangle new openInterface:#windowSpec
       
  1521      UILayoutTool::Rectangle open
       
  1522     "
       
  1523 
       
  1524     <resource: #canvas>
       
  1525 
       
  1526     ^
       
  1527      
       
  1528        #(#FullSpec
       
  1529           #window: 
       
  1530            #(#WindowSpec
       
  1531               #name: 'UILayoutTool-Rectangle'
       
  1532               #layout: #(#LayoutFrame 357 0 349 0 580 0 494 0)
       
  1533               #label: 'UILayoutTool-Rectangle'
       
  1534               #min: #(#Point 10 10)
       
  1535               #max: #(#Point 1152 900)
       
  1536               #bounds: #(#Rectangle 357 349 581 495)
  1505               #usePreferredExtent: false
  1537               #usePreferredExtent: false
  1506           )
  1538           )
  1507           #component: 
  1539           #component: 
  1508            #(#SpecCollection
  1540            #(#SpecCollection
  1509               #collection: 
  1541               #collection: