UIPainter.st
changeset 547 930b3df19305
parent 542 11be1353d34c
child 564 df1f1e84d94a
equal deleted inserted replaced
546:aac3f3c9383f 547:930b3df19305
   501      
   501      
   502        #(#FullSpec
   502        #(#FullSpec
   503           #'window:' 
   503           #'window:' 
   504            #(#WindowSpec
   504            #(#WindowSpec
   505               #'name:' 'Tree-View'
   505               #'name:' 'Tree-View'
   506               #'layout:' #(#LayoutFrame 18 0 64 0 570 0 589 0)
   506               #'layout:' #(#LayoutFrame 6 0 406 0 558 0 931 0)
   507               #'label:' 'Tree-View'
   507               #'label:' 'Tree-View'
   508               #'min:' #(#Point 10 10)
   508               #'min:' #(#Point 10 10)
   509               #'max:' #(#Point 1160 870)
   509               #'max:' #(#Point 1160 870)
   510               #'bounds:' #(#Rectangle 18 64 571 590)
   510               #'bounds:' #(#Rectangle 6 406 559 932)
   511               #'menu:' #menu
   511               #'menu:' #menu
   512               #'usePreferredExtent:' false
   512               #'usePreferredExtent:' false
   513           )
   513           )
   514           #'component:' 
   514           #'component:' 
   515            #(#SpecCollection
   515            #(#SpecCollection
   550                                         #'name:' 'specHolderView'
   550                                         #'name:' 'specHolderView'
   551                                         #'component:' 
   551                                         #'component:' 
   552                                          #(#SpecCollection
   552                                          #(#SpecCollection
   553                                             #'collection:' 
   553                                             #'collection:' 
   554                                              #(
   554                                              #(
   555                                                #(#NoteBookViewSpec
       
   556                                                   #'name:' 'noteBook'
       
   557                                                   #'layout:' #(#LayoutFrame 0 0.0 26 0.0 0 1.0 -30 1.0)
       
   558                                                   #'enableChannel:' #enableChannel
       
   559                                                   #'tabable:' true
       
   560                                                   #'model:' #tabModel
       
   561                                                   #'menu:' #tabList
       
   562                                                   #'style:' #(#FontDescription #helvetica #medium #roman 10)
       
   563                                                   #'canvas:' #noteBookView
       
   564                                               )
       
   565                                                #(#HorizontalPanelViewSpec
       
   566                                                   #'name:' 'modifyPanel'
       
   567                                                   #'layout:' #(#LayoutFrame 0 0.0 -30 1.0 0 1.0 0 1.0)
       
   568                                                   #'component:' 
       
   569                                                    #(#SpecCollection
       
   570                                                       #'collection:' 
       
   571                                                        #(
       
   572                                                          #(#ActionButtonSpec
       
   573                                                             #'name:' 'cancelButton'
       
   574                                                             #'activeHelpKey:' #cancel
       
   575                                                             #'label:' 'Cancel'
       
   576                                                             #'tabable:' true
       
   577                                                             #'model:' #cancel
       
   578                                                             #'enableChannel:' #modifiedChannel
       
   579                                                             #'extent:' #(#Point 79 24)
       
   580                                                         )
       
   581                                                          #(#ActionButtonSpec
       
   582                                                             #'name:' 'acceptButton'
       
   583                                                             #'activeHelpKey:' #accept
       
   584                                                             #'label:' 'OK'
       
   585                                                             #'tabable:' true
       
   586                                                             #'model:' #accept
       
   587                                                             #'enableChannel:' #modifiedChannel
       
   588                                                             #'extent:' #(#Point 79 24)
       
   589                                                         )
       
   590                                                       )
       
   591                                                   )
       
   592                                                   #'horizontalLayout:' #fitSpace
       
   593                                                   #'verticalLayout:' #fitSpace
       
   594                                                   #'horizontalSpace:' 3
       
   595                                                   #'verticalSpace:' 3
       
   596                                               )
       
   597                                                #(#HorizontalPanelViewSpec
   555                                                #(#HorizontalPanelViewSpec
   598                                                   #'name:' 'panelViewButtons'
   556                                                   #'name:' 'panelViewButtons'
   599                                                   #'layout:' #(#LayoutFrame 0 0.0 0 0 0 1.0 24 0)
   557                                                   #'layout:' #(#LayoutFrame 0 0.0 0 0 0 1.0 25 0)
   600                                                   #'component:' 
   558                                                   #'component:' 
   601                                                    #(#SpecCollection
   559                                                    #(#SpecCollection
   602                                                       #'collection:' 
   560                                                       #'collection:' 
   603                                                        #(
   561                                                        #(
   604                                                          #(#ArrowButtonSpec
   562                                                          #(#ArrowButtonSpec
   636                                                             #'enableChannel:' #canMoveOrAlignSelection
   594                                                             #'enableChannel:' #canMoveOrAlignSelection
   637                                                             #'isTriggerOnDown:' true
   595                                                             #'isTriggerOnDown:' true
   638                                                             #'direction:' #up
   596                                                             #'direction:' #up
   639                                                             #'extent:' #(#Point 22 22)
   597                                                             #'extent:' #(#Point 22 22)
   640                                                         )
   598                                                         )
       
   599                                                          #(#LabelSpec
       
   600                                                             #'name:' 'label1'
       
   601                                                             #'label:' ' '
       
   602                                                             #'extent:' #(#Point 14 22)
       
   603                                                         )
       
   604                                                          #(#CheckBoxSpec
       
   605                                                             #'name:' 'checkBox1'
       
   606                                                             #'model:' #galleryShown
       
   607                                                             #'label:' 'Gallery'
       
   608                                                             #'extent:' #(#Point 82 22)
       
   609                                                         )
       
   610                                                          #(#CheckBoxSpec
       
   611                                                             #'name:' 'checkBox2'
       
   612                                                             #'model:' #painterShown
       
   613                                                             #'label:' 'Canvas'
       
   614                                                             #'extent:' #(#Point 119 22)
       
   615                                                         )
   641                                                       )
   616                                                       )
   642                                                   )
   617                                                   )
   643                                                   #'level:' 1
   618                                                   #'level:' 1
   644                                                   #'horizontalLayout:' #left
   619                                                   #'horizontalLayout:' #left
   645                                                   #'verticalLayout:' #fit
   620                                                   #'verticalLayout:' #top
   646                                                   #'horizontalSpace:' 4
   621                                                   #'horizontalSpace:' 4
   647                                                   #'verticalSpace:' 4
   622                                                   #'verticalSpace:' 4
       
   623                                               )
       
   624                                                #(#NoteBookViewSpec
       
   625                                                   #'name:' 'noteBook'
       
   626                                                   #'layout:' #(#LayoutFrame 0 0.0 26 0.0 0 1.0 -30 1.0)
       
   627                                                   #'enableChannel:' #enableChannel
       
   628                                                   #'tabable:' true
       
   629                                                   #'model:' #tabModel
       
   630                                                   #'menu:' #tabList
       
   631                                                   #'style:' #(#FontDescription #helvetica #medium #roman 10)
       
   632                                                   #'canvas:' #noteBookView
       
   633                                               )
       
   634                                                #(#HorizontalPanelViewSpec
       
   635                                                   #'name:' 'modifyPanel'
       
   636                                                   #'layout:' #(#LayoutFrame 0 0.0 -30 1.0 0 1.0 0 1.0)
       
   637                                                   #'component:' 
       
   638                                                    #(#SpecCollection
       
   639                                                       #'collection:' 
       
   640                                                        #(
       
   641                                                          #(#ActionButtonSpec
       
   642                                                             #'name:' 'cancelButton'
       
   643                                                             #'activeHelpKey:' #cancel
       
   644                                                             #'label:' 'Cancel'
       
   645                                                             #'tabable:' true
       
   646                                                             #'model:' #cancel
       
   647                                                             #'enableChannel:' #modifiedChannel
       
   648                                                             #'extent:' #(#Point 179 24)
       
   649                                                         )
       
   650                                                          #(#ActionButtonSpec
       
   651                                                             #'name:' 'acceptButton'
       
   652                                                             #'activeHelpKey:' #accept
       
   653                                                             #'label:' 'OK'
       
   654                                                             #'tabable:' true
       
   655                                                             #'model:' #accept
       
   656                                                             #'enableChannel:' #modifiedChannel
       
   657                                                             #'extent:' #(#Point 180 24)
       
   658                                                         )
       
   659                                                       )
       
   660                                                   )
       
   661                                                   #'horizontalLayout:' #fitSpace
       
   662                                                   #'verticalLayout:' #fitSpace
       
   663                                                   #'horizontalSpace:' 3
       
   664                                                   #'verticalSpace:' 3
   648                                               )
   665                                               )
   649                                             )
   666                                             )
   650                                         )
   667                                         )
   651                                         #'borderWidth:' 1
   668                                         #'borderWidth:' 1
   652                                     )
   669                                     )
   697        #(#Menu
   714        #(#Menu
   698           
   715           
   699            #(
   716            #(
   700              #(#MenuItem
   717              #(#MenuItem
   701                 #'label:' 'About'
   718                 #'label:' 'About'
   702                 #'labelImage:' #(#ResourceRetriever nil #icon)
   719                 #'labelImage:' #(#ResourceRetriever nil #menuIcon)
   703                 #'submenuChannel:' #menuAbout
   720                 #'submenuChannel:' #menuAbout
   704             )
   721             )
   705              #(#MenuItem
   722              #(#MenuItem
   706                 #'label:' 'File'
   723                 #'label:' 'File'
   707                 #'value:' #file
   724                 #'value:' #file
   848                 #'label:' 'History'
   865                 #'label:' 'History'
   849                 #'submenuChannel:' #menuHistory
   866                 #'submenuChannel:' #menuHistory
   850             )
   867             )
   851              #(#MenuItem
   868              #(#MenuItem
   852                 #'label:' 'Help'
   869                 #'label:' 'Help'
       
   870                 #'startGroup:' #right
   853                 #'submenuChannel:' #menuHelp
   871                 #'submenuChannel:' #menuHelp
   854             )
       
   855              #(#MenuItem
       
   856                 #'label:' ''
       
   857             )
       
   858              #(#MenuItem
       
   859                 #'label:' 'Gallery'
       
   860                 #'indication:' #galleryShown
       
   861             )
       
   862              #(#MenuItem
       
   863                 #'label:' 'Canvas'
       
   864                 #'indication:' #painterShown
       
   865             )
   872             )
   866           ) nil
   873           ) nil
   867           nil
   874           nil
   868       )
   875       )
   869 !
   876 !
  1552     "
  1559     "
  1553     self painter moveSelectionUp
  1560     self painter moveSelectionUp
  1554 
  1561 
  1555 ! !
  1562 ! !
  1556 
  1563 
  1557 !UIPainter methodsFor:'active help'!
       
  1558 
       
  1559 showHelp:aHelpText for:view
       
  1560     "display active help texts in my own info area."
       
  1561 
       
  1562     |txt|
       
  1563 
       
  1564     aHelpText isNil ifTrue:[
       
  1565         txt := nil
       
  1566     ] ifFalse:[
       
  1567         txt := self class 
       
  1568                 convertString:(aHelpText asString)
       
  1569                 maxLineSize:(transcript width // transcript font width)
       
  1570                skipLineFeed:true
       
  1571     ].
       
  1572     transcript hideCursor.
       
  1573     transcript contents:txt.
       
  1574     ^ true
       
  1575 
       
  1576     "Modified: / 29.10.1997 / 22:33:55 / cg"
       
  1577 ! !
       
  1578 
       
  1579 !UIPainter methodsFor:'aspects'!
  1564 !UIPainter methodsFor:'aspects'!
  1580 
  1565 
  1581 canMoveOrAlignSelection
  1566 canMoveOrAlignSelection
  1582     "returns a boolean value holder which is true in case that any selection exists
  1567     "returns a boolean value holder which is true in case that any selection exists
  1583      and all widgets in the selection can change its layout through to a move or
  1568      and all widgets in the selection can change its layout through to a move or
  1931     ].
  1916     ].
  1932     super doesNotUnderstand:aMessage
  1917     super doesNotUnderstand:aMessage
  1933 
  1918 
  1934 ! !
  1919 ! !
  1935 
  1920 
       
  1921 !UIPainter methodsFor:'help'!
       
  1922 
       
  1923 openTutorial
       
  1924 
       
  1925     self openTutorial: 'doc/online/english/tools/uipainter/TOP.html'
       
  1926 !
       
  1927 
       
  1928 showHelp:aHelpText for:view
       
  1929     "display active help texts in my own info area."
       
  1930 
       
  1931     |txt|
       
  1932 
       
  1933     aHelpText isNil ifTrue:[
       
  1934         txt := nil
       
  1935     ] ifFalse:[
       
  1936         txt := self class 
       
  1937                 convertString:(aHelpText asString)
       
  1938                 maxLineSize:(transcript width // transcript font width)
       
  1939                skipLineFeed:true
       
  1940     ].
       
  1941     transcript hideCursor.
       
  1942     transcript contents:txt.
       
  1943     ^ true
       
  1944 
       
  1945     "Modified: / 29.10.1997 / 22:33:55 / cg"
       
  1946 ! !
       
  1947 
  1936 !UIPainter methodsFor:'printing'!
  1948 !UIPainter methodsFor:'printing'!
  1937 
  1949 
  1938 show:aText
  1950 show:aText
  1939     transcript hideCursor.
  1951     transcript hideCursor.
  1940     transcript contents:aText.
  1952     transcript contents:aText.
  2334     selectionPanel window iconLabel:'GUI Painter'.
  2346     selectionPanel window iconLabel:'GUI Painter'.
  2335     selectionPanel window icon:(Image fromFile:'bitmaps/UIPainter.xbm' resolution:100).
  2347     selectionPanel window icon:(Image fromFile:'bitmaps/UIPainter.xbm' resolution:100).
  2336 
  2348 
  2337     ActiveHelp startFor:self.
  2349     ActiveHelp startFor:self.
  2338 
  2350 
  2339     "Modified: / 27.10.1997 / 00:01:12 / cg"
  2351     self valueOfHavingTutorial value: true
       
  2352                                            
  2340 !
  2353 !
  2341 
  2354 
  2342 openNewWindowCanvas
  2355 openNewWindowCanvas
  2343     "open new
  2356     "open new
  2344     "
  2357     "