|
143 | 143 | :inherit-from (thundersnow-common-help-command-table) |
144 | 144 | :inherit-menu t) |
145 | 145 |
|
146 | | -(define-presentation-action select (pattern nil thundersnow |
147 | | - :gesture :select |
148 | | - :pointer-documentation "Select pattern") |
149 | | - (pattern) |
150 | | - (with-room-for-graphics () |
151 | | - (format t "~&Select pattern: ~s~%" pattern)) |
| 146 | +(define-command (com-select :name t :menu t :command-table thundersnow-edit-command-table) |
| 147 | + ((pattern 'pattern)) |
| 148 | + (format t "~&Select pattern: ~S~%" pattern) |
152 | 149 | (let ((pattern-pane (pattern-pane *application-frame*))) |
153 | | - (setf (pane-pattern pattern-pane) pattern) |
154 | | - (redisplay-frame-pane *application-frame* pattern-pane :force-p t)) |
155 | | - nil) |
156 | | - |
157 | | -(define-presentation-action play (pattern nil thundersnow |
158 | | - :gesture nil |
159 | | - :tester ((object) |
160 | | - (and (pattern-p object) |
161 | | - (eql (clp::pattern-status object) :stopped))) |
162 | | - :pointer-documentation "Play pattern") |
163 | | - (pattern) |
164 | | - (play pattern) |
165 | | - (redisplay-frame-pane *application-frame* (patterns-pane *application-frame*) :force-p t) |
166 | | - nil) |
167 | | - |
168 | | -(define-presentation-action end (pattern nil thundersnow |
169 | | - :gesture nil |
170 | | - :tester ((object) |
171 | | - (and (pattern-p object) |
172 | | - (eql (clp::pattern-status object) :playing))) |
173 | | - :pointer-documentation "End pattern") |
174 | | - (pattern) |
175 | | - (end pattern) |
176 | | - (redisplay-frame-pane *application-frame* (patterns-pane *application-frame*) :force-p t) |
177 | | - nil) |
178 | | - |
179 | | -(define-presentation-action stop (pattern nil thundersnow |
180 | | - :gesture nil |
181 | | - :tester ((object) |
182 | | - (and (pattern-p object) |
183 | | - (eql (clp::pattern-status object) :playing))) |
184 | | - :pointer-documentation "Stop pattern") |
185 | | - (pattern) |
186 | | - (stop pattern) |
187 | | - (redisplay-frame-pane *application-frame* (patterns-pane *application-frame*) :force-p t) |
188 | | - nil) |
| 150 | + (setf (pane-pattern pattern-pane) pattern))) |
| 151 | + |
| 152 | +(define-presentation-to-command-translator select (pattern com-select thundersnow) (pattern) |
| 153 | + (list pattern)) |
| 154 | + |
| 155 | +(define-command (com-play :name t :menu t :command-table thundersnow-edit-command-table) |
| 156 | + ((pattern 'pattern)) |
| 157 | + (play pattern)) |
| 158 | + |
| 159 | +(define-presentation-to-command-translator play (pattern com-play thundersnow |
| 160 | + :gesture nil |
| 161 | + :tester ((object) |
| 162 | + (and (pattern-p object) |
| 163 | + (eql (clp::pattern-status object) :stopped))) |
| 164 | + :pointer-documentation "Play pattern") |
| 165 | + (pattern) |
| 166 | + (list pattern)) |
| 167 | + |
| 168 | + |
| 169 | +(define-command (com-end :name t :menu t :command-table thundersnow-edit-command-table) |
| 170 | + ((pattern 'pattern)) |
| 171 | + (end pattern)) |
| 172 | + |
| 173 | +(define-presentation-to-command-translator end (pattern com-end thundersnow |
| 174 | + :gesture nil |
| 175 | + :tester ((object) |
| 176 | + (and (pattern-p object) |
| 177 | + (eql (clp::pattern-status object) :playing))) |
| 178 | + :pointer-documentation "End pattern") |
| 179 | + (pattern) |
| 180 | + (list pattern)) |
| 181 | + |
| 182 | +(define-command (com-stop :name t :menu t :command-table thundersnow-edit-command-table) |
| 183 | + ((pattern 'pattern)) |
| 184 | + (stop pattern)) |
| 185 | + |
| 186 | +(define-presentation-to-command-translator stop (pattern com-stop thundersnow |
| 187 | + :gesture nil |
| 188 | + :tester ((object) |
| 189 | + (and (pattern-p object) |
| 190 | + (eql (clp::pattern-status object) :playing))) |
| 191 | + :pointer-documentation "Stop pattern") |
| 192 | + (pattern) |
| 193 | + (list pattern)) |
189 | 194 |
|
190 | 195 | (defmethod frame-standard-output ((frame thundersnow)) |
191 | 196 | (find-pane-named frame 'interactor)) |
|
0 commit comments