UIPainter.st
changeset 1782 8108839cc262
parent 1775 695f10f213d1
child 1790 51711e3c7046
equal deleted inserted replaced
1781:d67090b1ad57 1782:8108839cc262
   743      UIPainter new openInterface:#dialogSpecForDefiningGridParameters
   743      UIPainter new openInterface:#dialogSpecForDefiningGridParameters
   744     "
   744     "
   745 
   745 
   746     <resource: #canvas>
   746     <resource: #canvas>
   747 
   747 
   748     ^
   748     ^ 
   749      
   749      #(FullSpec
   750        #(#FullSpec
   750         name: dialogSpecForDefiningGridParameters
   751 	  #window: 
   751         window: 
   752 	   #(#WindowSpec
   752        (WindowSpec
   753 	      #name: 'GUI Painter'
   753           label: 'GUI Painter'
   754 	      #layout: #(#LayoutFrame 291 0 130 0 572 0 327 0)
   754           name: 'GUI Painter'
   755 	      #label: 'GUI Painter'
   755           min: (Point 300 200)
   756 	      #min: #(#Point 300 200)
   756           max: (Point 300 200)
   757 	      #max: #(#Point 300 200)
   757           bounds: (Rectangle 16 46 298 244)
   758 	      #bounds: #(#Rectangle 291 130 573 328)
   758         )
   759 	      #usePreferredExtent: false
   759         component: 
   760 	  )
   760        (SpecCollection
   761 	  #component: 
   761           collection: (
   762 	   #(#SpecCollection
   762            (FramedBoxSpec
   763 	      #collection: 
   763               label: 'Grid Parameter'
   764 	       #(
   764               name: 'FramedBox'
   765 		 #(#FramedBoxSpec
   765               layout: (LayoutFrame 0 0.0 3 0.0 0 1.0 -35 1.0)
   766 		    #name: 'FramedBox'
   766               labelPosition: topLeft
   767 		    #layout: #(#LayoutFrame 0 0.0 3 0.0 0 1.0 -35 1.0)
   767               translateLabel: true
   768 		    #component: 
   768               component: 
   769 		     #(#SpecCollection
   769              (SpecCollection
   770 			#collection: 
   770                 collection: (
   771 			 #(
   771                  (CheckBoxSpec
   772 			   #(#CheckBoxSpec
   772                     label: 'Show Grid'
   773 			      #name: 'ShowGridCheckBox'
   773                     name: 'ShowGridCheckBox'
   774 			      #layout: #(#Point 13 14)
   774                     layout: (Point 13 14)
   775 			      #model: #showGrid
   775                     model: showGrid
   776 			      #label: 'Show Grid'
   776                     translateLabel: true
   777 			  )
   777                   )
   778 			   #(#CheckBoxSpec
   778                  (CheckBoxSpec
   779 			      #name: 'AlignCheckBox'
   779                     label: 'Align To Grid'
   780 			      #layout: #(#Point 13 42)
   780                     name: 'AlignCheckBox'
   781 			      #model: #alignToGrid
   781                     layout: (Point 13 42)
   782 			      #label: 'Align To Grid'
   782                     model: alignToGrid
   783 			  )
   783                     translateLabel: true
   784 			   #(#LabelSpec
   784                   )
   785 			      #name: 'HorizontalPixelsLabel'
   785                  (LabelSpec
   786 			      #layout: #(#AlignmentOrigin 138 0 89 0 1 0.5)
   786                     label: 'Horizontal Pixels:'
   787 			      #label: 'Horizontal Pixels:'
   787                     name: 'HorizontalPixelsLabel'
   788 			      #translateLabel: true
   788                     layout: (AlignmentOrigin 138 0 89 0 1 0.5)
   789 			      #adjust: #right
   789                     translateLabel: true
   790 			      #resizeForLabel: true
   790                     resizeForLabel: true
   791 			  )
   791                     adjust: right
   792 			   #(#InputFieldSpec
   792                   )
   793 			      #name: 'HorizontalPixelsField'
   793                  (InputFieldSpec
   794 			      #layout: #(#LayoutFrame 144 0 77 0 197 0 99 0)
   794                     name: 'HorizontalPixelsField'
   795 			      #model: #hspace
   795                     layout: (LayoutFrame 144 0 77 0 197 0 99 0)
   796 			      #group: #inputGroup
   796                     model: hspace
   797 			      #type: #numberOrNil
   797                     group: inputGroup
   798 			  )
   798                     type: numberOrNil
   799 			   #(#LabelSpec
   799                     acceptOnPointerLeave: false
   800 			      #name: 'VerticalPixelsLabel'
   800                   )
   801 			      #layout: #(#AlignmentOrigin 139 0 114 0 1 0.5)
   801                  (LabelSpec
   802 			      #label: 'Vertical Pixels:'
   802                     label: 'Vertical Pixels:'
   803 			      #translateLabel: true
   803                     name: 'VerticalPixelsLabel'
   804 			      #adjust: #right
   804                     layout: (AlignmentOrigin 139 0 114 0 1 0.5)
   805 			      #resizeForLabel: true
   805                     translateLabel: true
   806 			  )
   806                     resizeForLabel: true
   807 			   #(#InputFieldSpec
   807                     adjust: right
   808 			      #name: 'VerticalPixelsField'
   808                   )
   809 			      #layout: #(#LayoutFrame 144 0 102 0 197 0 124 0)
   809                  (InputFieldSpec
   810 			      #model: #vspace
   810                     name: 'VerticalPixelsField'
   811 			      #group: #inputGroup
   811                     layout: (LayoutFrame 144 0 102 0 197 0 124 0)
   812 			      #type: #numberOrNil
   812                     model: vspace
   813 			  )
   813                     group: inputGroup
   814 			)
   814                     type: numberOrNil
   815 		    )
   815                     acceptOnPointerLeave: false
   816 		    #label: 'Grid Parameter'
   816                   )
   817 		    #labelPosition: #topLeft
   817                  )
   818 		    #translateLabel: true
   818                
   819 		)
   819               )
   820 		 #(#UISubSpecification
   820             )
   821 		    #name: 'subSpec'
   821            (UISubSpecification
   822 		    #layout: #(#LayoutFrame 0 0.0 -29 1 0 1.0 -5 1)
   822               name: 'subSpec'
   823 		    #majorKey: #ToolApplicationModel
   823               layout: (LayoutFrame 0 0.0 -29 1 0 1.0 -5 1)
   824 		    #minorKey: #windowSpecForCommitWithoutChannels
   824               majorKey: ToolApplicationModel
   825 		)
   825               minorKey: windowSpecForCommitWithoutChannels
   826 	      )
   826             )
   827 	  )
   827            )
       
   828          
       
   829         )
   828       )
   830       )
   829 
       
   830     "Modified: / 13.8.1998 / 20:00:00 / cg"
       
   831 !
   831 !
   832 
   832 
   833 windowSpec
   833 windowSpec
   834     "This resource specification was automatically generated
   834     "This resource specification was automatically generated
   835      by the UIPainter of ST/X."
   835      by the UIPainter of ST/X."
   851         window: 
   851         window: 
   852        (WindowSpec
   852        (WindowSpec
   853           label: 'GUI Painter'
   853           label: 'GUI Painter'
   854           name: 'GUI Painter'
   854           name: 'GUI Painter'
   855           min: (Point 560 460)
   855           min: (Point 560 460)
   856           bounds: (Rectangle 14 46 622 569)
   856           bounds: (Rectangle 16 46 624 569)
   857           menu: menu
   857           menu: menu
   858         )
   858         )
   859         component: 
   859         component: 
   860        (SpecCollection
   860        (SpecCollection
   861           collection: (
   861           collection: (
   920                             collection: (
   920                             collection: (
   921                              (ActionButtonSpec
   921                              (ActionButtonSpec
   922                                 label: 'Cancel'
   922                                 label: 'Cancel'
   923                                 name: 'cancelButton'
   923                                 name: 'cancelButton'
   924                                 activeHelpKey: commitCancel
   924                                 activeHelpKey: commitCancel
       
   925                                 translateLabel: true
   925                                 tabable: true
   926                                 tabable: true
   926                                 model: cancel
   927                                 model: cancel
   927                                 enableChannel: modifiedChannel
   928                                 enableChannel: modifiedChannel
   928                                 extent: (Point 201 24)
   929                                 extent: (Point 201 24)
   929                               )
   930                               )
   930                              (ActionButtonSpec
   931                              (ActionButtonSpec
   931                                 label: 'OK'
   932                                 label: 'OK'
   932                                 name: 'acceptButton'
   933                                 name: 'acceptButton'
   933                                 activeHelpKey: commitOK
   934                                 activeHelpKey: commitOK
       
   935                                 translateLabel: true
   934                                 tabable: true
   936                                 tabable: true
   935                                 model: accept
   937                                 model: accept
   936                                 enableChannel: modifiedChannel
   938                                 enableChannel: modifiedChannel
   937                                 extent: (Point 201 24)
   939                                 extent: (Point 201 24)
   938                               )
   940                               )
  2123 !
  2125 !
  2124 
  2126 
  2125 tabList
  2127 tabList
  2126     "returns a value holder which keeps a list of the section labels in the notebook"
  2128     "returns a value holder which keeps a list of the section labels in the notebook"
  2127 
  2129 
  2128     |holder|
  2130     |tabs holder|
  2129 
  2131 
  2130     (holder := builder bindingAt:#tabList) isNil ifTrue:[
  2132     (holder := builder bindingAt:#tabList) isNil ifTrue:[
  2131 	builder aspectAt:#tabList put:(holder :=  #(Basics Details Layout) asValue).
  2133         tabs := #(Basics Details Layout).
       
  2134         builder aspectAt:#tabList put:(holder :=  (resources array:tabs) asValue).
  2132     ].
  2135     ].
  2133     ^ holder
  2136     ^ holder
  2134 !
  2137 !
  2135 
  2138 
  2136 tabModel
  2139 tabModel