1 <?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="chrome://global/skin/" type="text/css"?><?xml-stylesheet href="takahashi.css" type="text/css"?><page xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" id="presentation" xmlns:html="http:/www.w3.org/1999/xhtml" orient="vertical" onkeypress="Presentation.onKeyPress(event);">
\r
2 <html:textarea id="builtinCode" style="visibility: collapse"><![CDATA[
\r
78 select((select(FOO),$|++)[0])
88 select((select(FOO),$|++)[0])
116 perl -MMoose -e'print ~~keys %INC'
134 loc("_[0] bar", $foo)
142 /bar/ and return do {
151 my ($self, $str) = @_;
153 /match1/gc and return
154 $self->_subparse_1($_)
173 *{"${package}::${name}"}
184 local (@ARGV, $/) = $file;
198 sub strict_and_warnings::import {
203 use strict_and_warnings;
210 = bless($foo, 'My::Foo');
212 sub My::Foo::DESTROY {
214 delete ${$package}{myimport}
268 sub (GET + /) { ... },
269 sub (GET + /user/*) { ... }
272 foreach my $sub (@$dispatch) {
273 my $proto = prototype $sub;
274 $parser->parse($proto);
278 push @match, $self->_parse_spec_section($spec)
279 or $self->_blam("Unable to work out what the next section is");
280 last PARSE if (pos == length);
281 /\G\+/gc or $self->_blam('Spec sections must be separated by +');
282 } until (pos == length) };
285 my ($self, $error) = @_;
286 my $hat = (' ' x pos).'^';
287 die "Error parsing dispatch specification: ${error}\n
296 sub (GET + /user/*) {
297 my ($self, $user) = @_;
304 = \${"${app}::self"};
309 my ($self, $run, @args) = @_;
310 my $class = ref($self);
312 local *{"${class}::self"} = \$self;
332 tie *{"${app}::${name}"},
333 'XML::Tags::TIEHANDLE',
336 sub TIEHANDLE { my $str = $_[1]; bless \$str, $_[0] }
337 sub READLINE { ${$_[0]} }
340 my ($into, @names) = @$_[0];
354 ${CORE::GLOBAL::}{glob};
357 use XML::Tags qw(div);
358 <div>, "foo!", </div>;
364 my $stuff = 'foo"bar';
371 glob('a href="'.$stuff.'"');
374 bless(\'a href="', 'MagicTag')
376 .bless(\'"', 'MagicTag')
389 $self->render_html($_[1])
395 'Web::Simple::ResponseFilter'
398 if ($self->_is_response_filter($result)) {
399 return $self->_run_with_self(
401 $self->_run_dispatch_for($new_env, \@disp)
413 ]]></html:textarea>
\r
425 <deck flex="1" id="deck">
\r
428 onmousemove="Presentation.onMouseMoveOnCanvas(event);">
\r
429 <toolbox id="canvasToolbar">
\r
431 <toolbarbutton oncommand="Presentation.home()" label="|<<"
\r
432 observes="canBack"/>
\r
433 <toolbarbutton oncommand="Presentation.back()" label="<"
\r
434 observes="canBack"/>
\r
435 <toolbarbutton oncommand="Presentation.forward()" label=">"
\r
436 observes="canForward"/>
\r
437 <toolbarbutton oncommand="Presentation.end()" label=">>|"
\r
438 observes="canForward"/>
\r
439 <toolbarseparator/>
\r
440 <hbox align="center">
\r
441 <textbox id="current_page" size="4"
\r
442 oninput="if (this.value) Presentation.showPage(parseInt(this.value)-1);"/>
\r
443 <description value="/"/>
\r
444 <description id="max_page"/>
\r
446 <toolbarseparator/>
\r
449 <scrollbar id="scroller"
\r
450 align="center" orient="horizontal"
\r
451 oncommand="Presentation.showPage(parseInt(event.target.getAttribute('curpos')));"
\r
452 onclick="Presentation.showPage(parseInt(event.target.getAttribute('curpos')));"
\r
453 onmousedown="Presentation.onScrollerDragStart();"
\r
454 onmousemove="Presentation.onScrollerDragMove();"
\r
455 onmouseup="Presentation.onScrollerDragDrop();"/>
\r
458 <toolbarseparator/>
\r
460 <toolbarseparator/>
\r
461 <toolbarbutton id="toggleEva" label="Eva"
\r
464 oncommand="Presentation.toggleEvaMode();"/>
\r
465 <toolbarseparator/>
\r
466 <toolbarbutton label="Edit"
\r
467 oncommand="Presentation.toggleEditMode();"/>
\r
468 <toolbarbutton oncommand="Presentation.reload();" label="Reload"/>
\r
471 <vbox flex="1" id="canvas"
\r
472 onclick="Presentation.onPresentationClick(event);">
\r
476 <vbox id="content"/>
\r
484 <vbox flex="1" id="edit">
\r
487 <toolbarbutton label="New Page"
\r
488 oncommand="Presentation.addPage()"/>
\r
490 <toolbarseparator/>
\r
491 <toolbarbutton label="View"
\r
492 oncommand="Presentation.toggleEditMode();"/>
\r
493 <toolbarbutton oncommand="Presentation.reload();" label="Reload"/>
\r
496 <textbox id="textField" flex="1" multiline="true"
\r
497 oninput="Presentation.onEdit()"/>
\r
498 <hbox collapsed="true">
\r
499 <iframe id="dataLoader" onload="if (window.Presentation) Presentation.onDataLoad();"/>
\r
507 <broadcaster id="canBack"/>
\r
508 <broadcaster id="canForward"/>
\r
512 <command id="cmd_forward"
\r
513 oncommand="if (Presentation.isPresentationMode) Presentation.forward();"/>
\r
514 <command id="cmd_back"
\r
515 oncommand="if (Presentation.isPresentationMode) Presentation.back();"/>
\r
516 <command id="cmd_home"
\r
517 oncommand="if (Presentation.isPresentationMode) Presentation.home();"/>
\r
518 <command id="cmd_end"
\r
519 oncommand="if (Presentation.isPresentationMode) Presentation.end();"/>
\r
522 <key keycode="VK_ENTER" command="cmd_forward"/>
\r
523 <key keycode="VK_RETURN" command="cmd_forward"/>
\r
524 <key keycode="VK_PAGE_DOWN" command="cmd_forward"/>
\r
525 <key keycode="VK_RIGHT" command="cmd_forward"/>
\r
526 <key keycode="VK_DOWN" command="cmd_forward"/>
\r
527 <!-- key keycode="VK_BACK_SPACE" command="cmd_back"/-->
\r
528 <key keycode="VK_PAGE_UP" command="cmd_back"/>
\r
529 <!-- <key keycode="VK_BACK_UP" command="cmd_back"/>-->
\r
530 <!-- <key keycode="VK_BACK_LEFT" command="cmd_back"/>-->
\r
531 <key keycode="VK_HOME" command="cmd_home"/>
\r
532 <key keycode="VK_END" command="cmd_end"/>
\r
533 <key key="n" modifiers="accel" oncommand="Presentation.addPage();"/>
\r
534 <key key="r" modifiers="accel" oncommand="window.location.reload();"/>
\r
535 <key key="e" modifiers="accel" oncommand="Presentation.toggleEditMode();"/>
\r
536 <key key="a" modifiers="accel" oncommand="Presentation.toggleEvaMode();"/>
\r
540 <script src="takahashi.js" type="application/x-javascript" />
\r
542 <!-- ***** BEGIN LICENSE BLOCK *****
\r
545 - The contents of this file are subject to the Mozilla Public License Version
\r
546 - 1.1 (the "License"); you may not use this file except in compliance with
\r
547 - the License. You may obtain a copy of the License at
\r
548 - http://www.mozilla.org/MPL/
\r
550 - Software distributed under the License is distributed on an "AS IS" basis,
\r
551 - WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
\r
552 - for the specific language governing rights and limitations under the
\r
555 - The Original Code is the Takahashi-Method-based Presentation Tool in XUL.
\r
557 - The Initial Developer of the Original Code is SHIMODA Hiroshi.
\r
558 - Portions created by the Initial Developer are Copyright (C) 2005
\r
559 - the Initial Developer. All Rights Reserved.
\r
561 - Contributor(s): SHIMODA Hiroshi <piro@p.club.ne.jp>
\r
563 - ***** END LICENSE BLOCK ***** -->
\r