UIPainterView.st
changeset 137 335faeed1663
parent 134 d5ab85ec27fd
child 141 d06c04391233
equal deleted inserted replaced
136:42a2a4494281 137:335faeed1663
   596 
   596 
   597         aProp spec aspectSelectors do:[:aSel|
   597         aProp spec aspectSelectors do:[:aSel|
   598             (cls implements:aSel asSymbol) ifFalse:[
   598             (cls implements:aSel asSymbol) ifFalse:[
   599                 "/ kludge ..
   599                 "/ kludge ..
   600                 thisCode := (self generateAspectMethodFor:aSel spec:protoSpec inClass:cls).
   600                 thisCode := (self generateAspectMethodFor:aSel spec:protoSpec inClass:cls).
       
   601                 code := code , thisCode
       
   602             ]
       
   603         ].
       
   604         aProp spec actionSelectors do:[:aSel|
       
   605             (cls implements:aSel asSymbol) ifFalse:[
       
   606                 "/ kludge ..
       
   607                 thisCode := (self generateActionMethodFor:aSel spec:protoSpec inClass:cls).
   601                 code := code , thisCode
   608                 code := code , thisCode
   602             ]
   609             ]
   603         ].
   610         ].
   604 
   611 
   605     ].
   612     ].
   968     "Modified: 5.9.1995 / 16:06:15 / claus"
   975     "Modified: 5.9.1995 / 16:06:15 / claus"
   969 ! !
   976 ! !
   970 
   977 
   971 !UIPainterView methodsFor:'initialization'!
   978 !UIPainterView methodsFor:'initialization'!
   972 
   979 
       
   980 destroy
       
   981     "remove dependencies
       
   982     "
       
   983     listHolder notNil ifTrue:[
       
   984         listHolder removeDependent:self.
       
   985     ].
       
   986     super destroy.
       
   987 !
       
   988 
   973 initialize
   989 initialize
   974     "setup attributes
   990     "setup attributes
   975     "
   991     "
   976     super initialize.
   992     super initialize.
   977 
   993 
  1020         inputView raise.
  1036         inputView raise.
  1021     ]
  1037     ]
  1022 ! !
  1038 ! !
  1023 
  1039 
  1024 !UIPainterView methodsFor:'menus'!
  1040 !UIPainterView methodsFor:'menus'!
  1025 
       
  1026 showFontPanel
       
  1027     |action theFont fontPanel|
       
  1028 
       
  1029     self hasSelection ifTrue:[
       
  1030         fontPanel := FontPanel new. 
       
  1031         action := [:aFontDescription | theFont := aFontDescription].
       
  1032         fontPanel action:action.
       
  1033         fontPanel showAtPointer.
       
  1034         fontPanel destroy.
       
  1035         theFont notNil ifTrue:[
       
  1036             self changeFont:theFont
       
  1037         ]
       
  1038     ]
       
  1039 !
       
  1040 
  1041 
  1041 showMiddleButtonMenu
  1042 showMiddleButtonMenu
  1042     "show the middle button menu; this returns nil
  1043     "show the middle button menu; this returns nil
  1043     "
  1044     "
  1044     |menu canPaste|
  1045     |menu canPaste|
  2050     "
  2051     "
  2051     |selection|
  2052     |selection|
  2052     selection := self selectionIndex.
  2053     selection := self selectionIndex.
  2053 
  2054 
  2054     selection size == 1 ifTrue:[
  2055     selection size == 1 ifTrue:[
  2055         ^ propertyList at:(selection at:1)
  2056         propertyList size ~~ 0 ifTrue:[
       
  2057             ^ propertyList at:(selection first)
       
  2058         ]
  2056     ].
  2059     ].
  2057     ^ nil
  2060     ^ nil
  2058 !
  2061 !
  2059 
  2062 
  2060 selectionIndex:aList
  2063 selectionIndex:aList