WebKitRenderer.st
changeset 26 35e0080c5e32
parent 25 3afbf7f43e42
child 30 39fbc84d4033
equal deleted inserted replaced
25:3afbf7f43e42 26:35e0080c5e32
   103 
   103 
   104     "Created: / 07-06-2011 / 11:36:43 / Jan Vrany <jan.vrany@fit.cvut.cz>"
   104     "Created: / 07-06-2011 / 11:36:43 / Jan Vrany <jan.vrany@fit.cvut.cz>"
   105     "Modified: / 07-06-2011 / 19:29:24 / Jan Vrany <jan.vrany@fit.cvut.cz>"
   105     "Modified: / 07-06-2011 / 19:29:24 / Jan Vrany <jan.vrany@fit.cvut.cz>"
   106 !
   106 !
   107 
   107 
       
   108 PTR_MOVE: event
       
   109 
       
   110     view buttonMotion: 0 x: event second y: event third
       
   111 
       
   112     "Created: / 18-02-2012 / 14:31:16 / Jan Vrany <jan.vrany@fit.cvut.cz>"
       
   113 !
       
   114 
   108 TITLE_CHANGED: event
   115 TITLE_CHANGED: event
   109 
   116 
   110     event second = '(no title)' ifFalse:
   117     event second = '(no title)' ifFalse:
   111         [view title value: event second].
   118         [view title value: event second].
   112 
   119 
   115 
   122 
   116 !WebKitRenderer methodsFor:'event loop'!
   123 !WebKitRenderer methodsFor:'event loop'!
   117 
   124 
   118 dispatchEvent
   125 dispatchEvent
   119 
   126 
   120     | ev sym |
   127     view sensor pushUserEvent: #dispatchEvent: for:self withArgument: channel nextEvent.
   121     ev := channel nextEvent.
   128 
       
   129     "Created: / 06-06-2011 / 18:13:10 / Jan Vrany <jan.vrany@fit.cvut.cz>"
       
   130     "Modified: / 18-02-2012 / 14:36:07 / Jan Vrany <jan.vrany@fit.cvut.cz>"
       
   131 !
       
   132 
       
   133 dispatchEvent: ev
       
   134 
       
   135     | sym |
   122 
   136 
   123     (self respondsTo: (sym := (ev first , ':') asSymbol)) ifTrue: [
   137     (self respondsTo: (sym := (ev first , ':') asSymbol)) ifTrue: [
   124         self perform: sym with: ev
   138         self perform: sym with: ev
   125     ] ifFalse: [
   139     ] ifFalse: [
   126         Debug ifTrue:[
   140         Debug ifTrue:[
   127             Transcript showCR: 'UNKNOWN EVENT: ', ev asArray printString
   141             Transcript showCR: 'UNKNOWN EVENT: ', ev asArray printString
   128         ]
   142         ]
   129     ].
   143     ].
   130 
   144 
   131     "Created: / 06-06-2011 / 18:13:10 / Jan Vrany <jan.vrany@fit.cvut.cz>"
       
   132     "Modified: / 10-06-2011 / 18:40:30 / Jan Vrany <jan.vrany@fit.cvut.cz>"
   145     "Modified: / 10-06-2011 / 18:40:30 / Jan Vrany <jan.vrany@fit.cvut.cz>"
       
   146     "Created: / 18-02-2012 / 14:32:28 / Jan Vrany <jan.vrany@fit.cvut.cz>"
   133 !
   147 !
   134 
   148 
   135 eventLoop
   149 eventLoop
   136 
   150 
   137     [ channel atEnd ] whileFalse: [
   151     [ channel atEnd ] whileFalse: [