Browse Source

Fix Presentation reloading + page title. Add shortcuts and tags in HTMLCanvas

Laurent Laffont 12 years ago
parent
commit
30b3e53fd5

+ 18 - 17
examples/presentation/js/Presentation.deploy.js

@@ -226,6 +226,17 @@ return self;}
 }),
 smalltalk.Presentation);
 
+smalltalk.addMethod(
+'_style',
+smalltalk.method({
+selector: 'style',
+fn: function (){
+var self=this;
+return "";
+return self;}
+}),
+smalltalk.Presentation);
+
 smalltalk.addMethod(
 '_reload',
 smalltalk.method({
@@ -234,7 +245,8 @@ fn: function (){
 var self=this;
 smalltalk.send(smalltalk.send(unescape("%23slides"), "_asJQuery", []), "_remove", []);
 smalltalk.send(smalltalk.send(unescape("%23tools"), "_asJQuery", []), "_remove", []);
-smalltalk.send(smalltalk.send("body", "_asJQuery", []), "_append_", [self]);
+smalltalk.send(self, "_initSlides", []);
+smalltalk.send(self, "_appendToJQuery_", [smalltalk.send("body", "_asJQuery", [])]);
 smalltalk.send(self, "_checkHash", []);
 return self;}
 }),
@@ -259,7 +271,7 @@ selector: 'nextSlide',
 fn: function (){
 var self=this;
 var next=nil;
-(($receiver = smalltalk.send(self, "_currentSlide", [])) != nil && $receiver != undefined) ? (function(){next=smalltalk.send(smalltalk.send(self, "_slides", []), "_at_ifAbsent_", [(($receiver = smalltalk.send(smalltalk.send(self, "_slides", []), "_indexOf_", [smalltalk.send(self, "_currentSlide", [])])).klass === smalltalk.Number) ? $receiver +(1) : smalltalk.send($receiver, "__plus", [(1)]), (function(){return nil;})]);return (($receiver = next) != nil && $receiver != undefined) ? (function(){self['@currentSlide']=next;return smalltalk.send(next, "_show", []);})() : nil;})() : nil;
+(($receiver = smalltalk.send(self, "_currentSlide", [])) != nil && $receiver != undefined) ? (function(){next=smalltalk.send(smalltalk.send(self, "_slides", []), "_at_ifAbsent_", [((($receiver = smalltalk.send(smalltalk.send(self, "_slides", []), "_indexOf_", [smalltalk.send(self, "_currentSlide", [])])).klass === smalltalk.Number) ? $receiver +(1) : smalltalk.send($receiver, "__plus", [(1)])), (function(){return nil;})]);return (($receiver = next) != nil && $receiver != undefined) ? (function(){self['@currentSlide']=next;return smalltalk.send(next, "_show", []);})() : nil;})() : nil;
 return self;}
 }),
 smalltalk.Presentation);
@@ -270,7 +282,7 @@ smalltalk.method({
 selector: 'showCurrentSlide',
 fn: function (){
 var self=this;
-(($receiver = smalltalk.send(self, "_currentSlide", [])) != nil && $receiver != undefined) ? (function(){smalltalk.send(smalltalk.send(".slide", "_asJQuery", []), "_hide", []);return smalltalk.send(smalltalk.send(smalltalk.send(unescape("%23"), "__comma", [smalltalk.send(smalltalk.send(self, "_currentSlide", []), "_id", [])]), "_asJQuery", []), "_show", []);})() : nil;
+(($receiver = smalltalk.send(self, "_currentSlide", [])) != nil && $receiver != undefined) ? (function(){smalltalk.send(smalltalk.send(".slide", "_asJQuery", []), "_hide", []);smalltalk.send(smalltalk.send(smalltalk.send(unescape("%23"), "__comma", [smalltalk.send(smalltalk.send(self, "_currentSlide", []), "_id", [])]), "_asJQuery", []), "_show", []);return smalltalk.send(smalltalk.send("title", "_asJQuery", []), "_text_", [smalltalk.send(smalltalk.send(smalltalk.send(self, "_title", []), "__comma", [unescape("%20-%20")]), "__comma", [smalltalk.send(smalltalk.send(self, "_currentSlide", []), "_id", [])])]);})() : nil;
 return self;}
 }),
 smalltalk.Presentation);
@@ -282,7 +294,7 @@ selector: 'previousSlide',
 fn: function (){
 var self=this;
 var next=nil;
-(($receiver = smalltalk.send(self, "_currentSlide", [])) != nil && $receiver != undefined) ? (function(){next=smalltalk.send(smalltalk.send(self, "_slides", []), "_at_ifAbsent_", [(($receiver = smalltalk.send(smalltalk.send(self, "_slides", []), "_indexOf_", [smalltalk.send(self, "_currentSlide", [])])).klass === smalltalk.Number) ? $receiver -(1) : smalltalk.send($receiver, "__minus", [(1)]), (function(){return nil;})]);return (($receiver = next) != nil && $receiver != undefined) ? (function(){self['@currentSlide']=next;return smalltalk.send(next, "_show", []);})() : nil;})() : nil;
+(($receiver = smalltalk.send(self, "_currentSlide", [])) != nil && $receiver != undefined) ? (function(){next=smalltalk.send(smalltalk.send(self, "_slides", []), "_at_ifAbsent_", [((($receiver = smalltalk.send(smalltalk.send(self, "_slides", []), "_indexOf_", [smalltalk.send(self, "_currentSlide", [])])).klass === smalltalk.Number) ? $receiver -(1) : smalltalk.send($receiver, "__minus", [(1)])), (function(){return nil;})]);return (($receiver = next) != nil && $receiver != undefined) ? (function(){self['@currentSlide']=next;return smalltalk.send(next, "_show", []);})() : nil;})() : nil;
 return self;}
 }),
 smalltalk.Presentation);
@@ -320,7 +332,7 @@ var hash=nil;
 var slide=nil;
 hash=smalltalk.send(smalltalk.send(smalltalk.send((typeof document == 'undefined' ? nil : document), "_location", []), "_hash", []), "_replace_with_", [unescape("%5E%23"), ""]);
 slide=smalltalk.send(smalltalk.send(self, "_slides", []), "_detect_ifNone_", [(function(each){return smalltalk.send(smalltalk.send(each, "_id", []), "__eq", [hash]);}), (function(){return nil;})]);
-(($receiver = slide) != nil && $receiver != undefined) ? (function(){return (($receiver = smalltalk.send(smalltalk.send(self, "_currentSlide", []), "__eq", [slide])).klass === smalltalk.Boolean) ? (! $receiver ? (function(){smalltalk.send(self, "_currentSlide_", [slide]);return smalltalk.send(slide, "_show", []);})() : nil) : smalltalk.send($receiver, "_ifFalse_", [(function(){smalltalk.send(self, "_currentSlide_", [slide]);return smalltalk.send(slide, "_show", []);})]);})() : nil;
+(($receiver = slide) != nil && $receiver != undefined) ? (function(){return ((($receiver = smalltalk.send(smalltalk.send(self, "_currentSlide", []), "__eq", [slide])).klass === smalltalk.Boolean) ? (! $receiver ? (function(){smalltalk.send(self, "_currentSlide_", [slide]);return smalltalk.send(slide, "_show", []);})() : nil) : smalltalk.send($receiver, "_ifFalse_", [(function(){smalltalk.send(self, "_currentSlide_", [slide]);return smalltalk.send(slide, "_show", []);})]));})() : nil;
 return self;}
 }),
 smalltalk.Presentation);
@@ -376,17 +388,6 @@ return self;}
 }),
 smalltalk.Presentation);
 
-smalltalk.addMethod(
-'_style',
-smalltalk.method({
-selector: 'style',
-fn: function (){
-var self=this;
-return "";
-return self;}
-}),
-smalltalk.Presentation);
-
 
 smalltalk.Presentation.klass.iVarNames = ['current'];
 smalltalk.addMethod(
@@ -395,7 +396,7 @@ smalltalk.method({
 selector: 'initialize',
 fn: function (){
 var self=this;
-(($receiver = smalltalk.send(self, "_isConcrete", [])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send(self, "_setup", []);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return smalltalk.send(self, "_setup", []);})]);
+((($receiver = smalltalk.send(self, "_isConcrete", [])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send(self, "_setup", []);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return smalltalk.send(self, "_setup", []);})]));
 return self;}
 }),
 smalltalk.Presentation.klass);

+ 27 - 26
examples/presentation/js/Presentation.js

@@ -326,6 +326,22 @@ referencedClasses: []
 }),
 smalltalk.Presentation);
 
+smalltalk.addMethod(
+unescape('_style'),
+smalltalk.method({
+selector: unescape('style'),
+category: 'accessing',
+fn: function (){
+var self=this;
+return "";
+return self;},
+args: [],
+source: unescape('style%0A%09%22Should%20return%20a%20CSS%20style%22%0A%09%5E%20%27%27'),
+messageSends: [],
+referencedClasses: []
+}),
+smalltalk.Presentation);
+
 smalltalk.addMethod(
 unescape('_reload'),
 smalltalk.method({
@@ -335,12 +351,13 @@ fn: function (){
 var self=this;
 smalltalk.send(smalltalk.send(unescape("%23slides"), "_asJQuery", []), "_remove", []);
 smalltalk.send(smalltalk.send(unescape("%23tools"), "_asJQuery", []), "_remove", []);
-smalltalk.send(smalltalk.send("body", "_asJQuery", []), "_append_", [self]);
+smalltalk.send(self, "_initSlides", []);
+smalltalk.send(self, "_appendToJQuery_", [smalltalk.send("body", "_asJQuery", [])]);
 smalltalk.send(self, "_checkHash", []);
 return self;},
 args: [],
-source: unescape('reload%0A%09%27%23slides%27%20asJQuery%20remove.%0A%09%27%23tools%27%20asJQuery%20remove.%0A%09%27body%27%20asJQuery%20append%3A%20self.%0A%09self%20checkHash'),
-messageSends: ["remove", "asJQuery", "append:", "checkHash"],
+source: unescape('reload%0A%09%27%23slides%27%20asJQuery%20remove.%0A%09%27%23tools%27%20asJQuery%20remove.%0A%09self%20initSlides.%0A%09self%20appendToJQuery%3A%20%27body%27%20asJQuery.%0A%09self%20checkHash'),
+messageSends: ["remove", "asJQuery", "initSlides", "appendToJQuery:", "checkHash"],
 referencedClasses: []
 }),
 smalltalk.Presentation);
@@ -370,7 +387,7 @@ category: 'actions',
 fn: function (){
 var self=this;
 var next=nil;
-(($receiver = smalltalk.send(self, "_currentSlide", [])) != nil && $receiver != undefined) ? (function(){next=smalltalk.send(smalltalk.send(self, "_slides", []), "_at_ifAbsent_", [(($receiver = smalltalk.send(smalltalk.send(self, "_slides", []), "_indexOf_", [smalltalk.send(self, "_currentSlide", [])])).klass === smalltalk.Number) ? $receiver +(1) : smalltalk.send($receiver, "__plus", [(1)]), (function(){return nil;})]);return (($receiver = next) != nil && $receiver != undefined) ? (function(){self['@currentSlide']=next;return smalltalk.send(next, "_show", []);})() : nil;})() : nil;
+(($receiver = smalltalk.send(self, "_currentSlide", [])) != nil && $receiver != undefined) ? (function(){next=smalltalk.send(smalltalk.send(self, "_slides", []), "_at_ifAbsent_", [((($receiver = smalltalk.send(smalltalk.send(self, "_slides", []), "_indexOf_", [smalltalk.send(self, "_currentSlide", [])])).klass === smalltalk.Number) ? $receiver +(1) : smalltalk.send($receiver, "__plus", [(1)])), (function(){return nil;})]);return (($receiver = next) != nil && $receiver != undefined) ? (function(){self['@currentSlide']=next;return smalltalk.send(next, "_show", []);})() : nil;})() : nil;
 return self;},
 args: [],
 source: unescape('nextSlide%0A%09%7C%20next%20%7C%0A%09self%20currentSlide%20ifNotNil%3A%20%5B%0A%09%09next%20%3A%3D%20self%20slides%20%0A%09%09%09at%3A%20%28self%20slides%20indexOf%3A%20self%20currentSlide%29%20+%201%0A%09%09%09ifAbsent%3A%20%5Bnil%5D.%0A%09%09next%20ifNotNil%3A%20%5BcurrentSlide%20%3A%3D%20next.%20next%20show%5D%5D'),
@@ -386,11 +403,11 @@ selector: unescape('showCurrentSlide'),
 category: 'actions',
 fn: function (){
 var self=this;
-(($receiver = smalltalk.send(self, "_currentSlide", [])) != nil && $receiver != undefined) ? (function(){smalltalk.send(smalltalk.send(".slide", "_asJQuery", []), "_hide", []);return smalltalk.send(smalltalk.send(smalltalk.send(unescape("%23"), "__comma", [smalltalk.send(smalltalk.send(self, "_currentSlide", []), "_id", [])]), "_asJQuery", []), "_show", []);})() : nil;
+(($receiver = smalltalk.send(self, "_currentSlide", [])) != nil && $receiver != undefined) ? (function(){smalltalk.send(smalltalk.send(".slide", "_asJQuery", []), "_hide", []);smalltalk.send(smalltalk.send(smalltalk.send(unescape("%23"), "__comma", [smalltalk.send(smalltalk.send(self, "_currentSlide", []), "_id", [])]), "_asJQuery", []), "_show", []);return smalltalk.send(smalltalk.send("title", "_asJQuery", []), "_text_", [smalltalk.send(smalltalk.send(smalltalk.send(self, "_title", []), "__comma", [unescape("%20-%20")]), "__comma", [smalltalk.send(smalltalk.send(self, "_currentSlide", []), "_id", [])])]);})() : nil;
 return self;},
 args: [],
-source: unescape('showCurrentSlide%0A%09self%20currentSlide%20ifNotNil%3A%20%5B%0A%09%09%27.slide%27%20asJQuery%20hide.%0A%09%09%28%27%23%27%2C%20self%20currentSlide%20id%29%20asJQuery%20show%5D'),
-messageSends: ["ifNotNil:", "currentSlide", "hide", "asJQuery", "show", unescape("%2C"), "id"],
+source: unescape('showCurrentSlide%0A%09self%20currentSlide%20ifNotNil%3A%20%5B%0A%09%09%27.slide%27%20asJQuery%20hide.%0A%09%09%28%27%23%27%2C%20self%20currentSlide%20id%29%20asJQuery%20show.%0A%20%20%20%20%20%20%20%20%20%20%09%27title%27%20asJQuery%20text%3A%20self%20title%2C%20%27%20-%20%27%2C%20self%20currentSlide%20id.%0A%20%20%20%20%20%20%20%20%5D'),
+messageSends: ["ifNotNil:", "currentSlide", "hide", "asJQuery", "show", unescape("%2C"), "id", "text:", "title"],
 referencedClasses: []
 }),
 smalltalk.Presentation);
@@ -403,7 +420,7 @@ category: 'actions',
 fn: function (){
 var self=this;
 var next=nil;
-(($receiver = smalltalk.send(self, "_currentSlide", [])) != nil && $receiver != undefined) ? (function(){next=smalltalk.send(smalltalk.send(self, "_slides", []), "_at_ifAbsent_", [(($receiver = smalltalk.send(smalltalk.send(self, "_slides", []), "_indexOf_", [smalltalk.send(self, "_currentSlide", [])])).klass === smalltalk.Number) ? $receiver -(1) : smalltalk.send($receiver, "__minus", [(1)]), (function(){return nil;})]);return (($receiver = next) != nil && $receiver != undefined) ? (function(){self['@currentSlide']=next;return smalltalk.send(next, "_show", []);})() : nil;})() : nil;
+(($receiver = smalltalk.send(self, "_currentSlide", [])) != nil && $receiver != undefined) ? (function(){next=smalltalk.send(smalltalk.send(self, "_slides", []), "_at_ifAbsent_", [((($receiver = smalltalk.send(smalltalk.send(self, "_slides", []), "_indexOf_", [smalltalk.send(self, "_currentSlide", [])])).klass === smalltalk.Number) ? $receiver -(1) : smalltalk.send($receiver, "__minus", [(1)])), (function(){return nil;})]);return (($receiver = next) != nil && $receiver != undefined) ? (function(){self['@currentSlide']=next;return smalltalk.send(next, "_show", []);})() : nil;})() : nil;
 return self;},
 args: [],
 source: unescape('previousSlide%0A%09%7C%20next%20%7C%0A%09self%20currentSlide%20ifNotNil%3A%20%5B%0A%09%09next%20%3A%3D%20self%20slides%20%0A%09%09%09at%3A%20%28self%20slides%20indexOf%3A%20self%20currentSlide%29%20-%201%0A%09%09%09ifAbsent%3A%20%5Bnil%5D.%0A%09%09next%20ifNotNil%3A%20%5BcurrentSlide%20%3A%3D%20next.%20next%20show%5D%5D'),
@@ -456,7 +473,7 @@ var hash=nil;
 var slide=nil;
 hash=smalltalk.send(smalltalk.send(smalltalk.send((typeof document == 'undefined' ? nil : document), "_location", []), "_hash", []), "_replace_with_", [unescape("%5E%23"), ""]);
 slide=smalltalk.send(smalltalk.send(self, "_slides", []), "_detect_ifNone_", [(function(each){return smalltalk.send(smalltalk.send(each, "_id", []), "__eq", [hash]);}), (function(){return nil;})]);
-(($receiver = slide) != nil && $receiver != undefined) ? (function(){return (($receiver = smalltalk.send(smalltalk.send(self, "_currentSlide", []), "__eq", [slide])).klass === smalltalk.Boolean) ? (! $receiver ? (function(){smalltalk.send(self, "_currentSlide_", [slide]);return smalltalk.send(slide, "_show", []);})() : nil) : smalltalk.send($receiver, "_ifFalse_", [(function(){smalltalk.send(self, "_currentSlide_", [slide]);return smalltalk.send(slide, "_show", []);})]);})() : nil;
+(($receiver = slide) != nil && $receiver != undefined) ? (function(){return ((($receiver = smalltalk.send(smalltalk.send(self, "_currentSlide", []), "__eq", [slide])).klass === smalltalk.Boolean) ? (! $receiver ? (function(){smalltalk.send(self, "_currentSlide_", [slide]);return smalltalk.send(slide, "_show", []);})() : nil) : smalltalk.send($receiver, "_ifFalse_", [(function(){smalltalk.send(self, "_currentSlide_", [slide]);return smalltalk.send(slide, "_show", []);})]));})() : nil;
 return self;},
 args: [],
 source: unescape('checkHash%0A%09%7C%20hash%20slide%20%7C%0A%09hash%20%3A%3D%20document%20location%20hash%20%20replace%3A%20%27%5E%23%27%20with%3A%20%27%27.%0A%09slide%20%3A%3D%20self%20slides%20detect%3A%20%20%5B%3Aeach%20%7C%20each%20id%20%3D%20hash%5D%20ifNone%3A%20%5Bnil%5D.%0A%09slide%20ifNotNil%3A%20%5B%0A%09%09self%20currentSlide%20%3D%20slide%20ifFalse%3A%20%5B%0A%09%09%09self%20currentSlide%3A%20slide.%0A%09%09%09slide%20show%5D%5D'),
@@ -536,22 +553,6 @@ referencedClasses: []
 }),
 smalltalk.Presentation);
 
-smalltalk.addMethod(
-unescape('_style'),
-smalltalk.method({
-selector: unescape('style'),
-category: 'accessing',
-fn: function (){
-var self=this;
-return "";
-return self;},
-args: [],
-source: unescape('style%0A%09%22Should%20return%20a%20CSS%20style%22%0A%09%5E%20%27%27'),
-messageSends: [],
-referencedClasses: []
-}),
-smalltalk.Presentation);
-
 
 smalltalk.Presentation.klass.iVarNames = ['current'];
 smalltalk.addMethod(
@@ -561,7 +562,7 @@ selector: unescape('initialize'),
 category: 'initialization',
 fn: function (){
 var self=this;
-(($receiver = smalltalk.send(self, "_isConcrete", [])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send(self, "_setup", []);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return smalltalk.send(self, "_setup", []);})]);
+((($receiver = smalltalk.send(self, "_isConcrete", [])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send(self, "_setup", []);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return smalltalk.send(self, "_setup", []);})]));
 return self;},
 args: [],
 source: unescape('initialize%0A%09self%20isConcrete%20ifTrue%3A%20%5Bself%20setup%5D'),

+ 5 - 2
examples/presentation/st/Presentation.st

@@ -120,7 +120,8 @@ style
 reload
 	'#slides' asJQuery remove.
 	'#tools' asJQuery remove.
-	'body' asJQuery append: self.
+	self initSlides.
+	self appendToJQuery: 'body' asJQuery.
 	self checkHash
 !
 
@@ -146,7 +147,9 @@ nextSlide
 showCurrentSlide
 	self currentSlide ifNotNil: [
 		'.slide' asJQuery hide.
-		('#', self currentSlide id) asJQuery show]
+		('#', self currentSlide id) asJQuery show.
+          	'title' asJQuery text: self title, ' - ', self currentSlide id.
+        ]
 !
 
 previousSlide

+ 165 - 0
js/Canvas.deploy.js

@@ -418,6 +418,149 @@ return self;}
 }),
 smalltalk.HTMLCanvas);
 
+smalltalk.addMethod(
+'_p_',
+smalltalk.method({
+selector: 'p:',
+fn: function (anObject){
+var self=this;
+return smalltalk.send(smalltalk.send(self, "_p", []), "_with_", [anObject]);
+return self;}
+}),
+smalltalk.HTMLCanvas);
+
+smalltalk.addMethod(
+'_h1_',
+smalltalk.method({
+selector: 'h1:',
+fn: function (anObject){
+var self=this;
+return smalltalk.send(smalltalk.send(self, "_h1", []), "_with_", [anObject]);
+return self;}
+}),
+smalltalk.HTMLCanvas);
+
+smalltalk.addMethod(
+'_iframe',
+smalltalk.method({
+selector: 'iframe',
+fn: function (){
+var self=this;
+return smalltalk.send(self, "_tag_", ["iframe"]);
+return self;}
+}),
+smalltalk.HTMLCanvas);
+
+smalltalk.addMethod(
+'_iframe_',
+smalltalk.method({
+selector: 'iframe:',
+fn: function (aString){
+var self=this;
+return smalltalk.send(smalltalk.send(self, "_iframe", []), "_src_", [aString]);
+return self;}
+}),
+smalltalk.HTMLCanvas);
+
+smalltalk.addMethod(
+'_h2_',
+smalltalk.method({
+selector: 'h2:',
+fn: function (anObject){
+var self=this;
+return smalltalk.send(smalltalk.send(self, "_h2", []), "_with_", [anObject]);
+return self;}
+}),
+smalltalk.HTMLCanvas);
+
+smalltalk.addMethod(
+'_h3_',
+smalltalk.method({
+selector: 'h3:',
+fn: function (anObject){
+var self=this;
+return smalltalk.send(smalltalk.send(self, "_h3", []), "_with_", [anObject]);
+return self;}
+}),
+smalltalk.HTMLCanvas);
+
+smalltalk.addMethod(
+'_h4_',
+smalltalk.method({
+selector: 'h4:',
+fn: function (anObject){
+var self=this;
+return smalltalk.send(smalltalk.send(self, "_h4", []), "_with_", [anObject]);
+return self;}
+}),
+smalltalk.HTMLCanvas);
+
+smalltalk.addMethod(
+'_h5_',
+smalltalk.method({
+selector: 'h5:',
+fn: function (anObject){
+var self=this;
+return smalltalk.send(smalltalk.send(self, "_h5", []), "_with_", [anObject]);
+return self;}
+}),
+smalltalk.HTMLCanvas);
+
+smalltalk.addMethod(
+'_h6_',
+smalltalk.method({
+selector: 'h6:',
+fn: function (anObject){
+var self=this;
+return smalltalk.send(smalltalk.send(self, "_h6", []), "_with_", [anObject]);
+return self;}
+}),
+smalltalk.HTMLCanvas);
+
+smalltalk.addMethod(
+'_img_',
+smalltalk.method({
+selector: 'img:',
+fn: function (aString){
+var self=this;
+return smalltalk.send(smalltalk.send(self, "_img", []), "_src_", [aString]);
+return self;}
+}),
+smalltalk.HTMLCanvas);
+
+smalltalk.addMethod(
+'_ol_',
+smalltalk.method({
+selector: 'ol:',
+fn: function (anObject){
+var self=this;
+return smalltalk.send(smalltalk.send(self, "_ol", []), "_with_", [anObject]);
+return self;}
+}),
+smalltalk.HTMLCanvas);
+
+smalltalk.addMethod(
+'_li_',
+smalltalk.method({
+selector: 'li:',
+fn: function (anObject){
+var self=this;
+return smalltalk.send(smalltalk.send(self, "_li", []), "_with_", [anObject]);
+return self;}
+}),
+smalltalk.HTMLCanvas);
+
+smalltalk.addMethod(
+'_ul_',
+smalltalk.method({
+selector: 'ul:',
+fn: function (anObject){
+var self=this;
+return smalltalk.send(smalltalk.send(self, "_ul", []), "_with_", [anObject]);
+return self;}
+}),
+smalltalk.HTMLCanvas);
+
 
 smalltalk.addMethod(
 '_onJQuery_',
@@ -807,6 +950,28 @@ return self;}
 }),
 smalltalk.TagBrush);
 
+smalltalk.addMethod(
+'_width_',
+smalltalk.method({
+selector: 'width:',
+fn: function (aString){
+var self=this;
+smalltalk.send(self, "_at_put_", ["width", aString]);
+return self;}
+}),
+smalltalk.TagBrush);
+
+smalltalk.addMethod(
+'_height_',
+smalltalk.method({
+selector: 'height:',
+fn: function (aString){
+var self=this;
+smalltalk.send(self, "_at_put_", ["height", aString]);
+return self;}
+}),
+smalltalk.TagBrush);
+
 
 smalltalk.addMethod(
 '_fromString_canvas_',

+ 240 - 0
js/Canvas.js

@@ -608,6 +608,214 @@ referencedClasses: []
 }),
 smalltalk.HTMLCanvas);
 
+smalltalk.addMethod(
+unescape('_p_'),
+smalltalk.method({
+selector: unescape('p%3A'),
+category: 'tags',
+fn: function (anObject){
+var self=this;
+return smalltalk.send(smalltalk.send(self, "_p", []), "_with_", [anObject]);
+return self;},
+args: ["anObject"],
+source: unescape('p%3A%20anObject%0A%20%20%20%20%5Eself%20p%20with%3A%20anObject'),
+messageSends: ["with:", "p"],
+referencedClasses: []
+}),
+smalltalk.HTMLCanvas);
+
+smalltalk.addMethod(
+unescape('_h1_'),
+smalltalk.method({
+selector: unescape('h1%3A'),
+category: 'tags',
+fn: function (anObject){
+var self=this;
+return smalltalk.send(smalltalk.send(self, "_h1", []), "_with_", [anObject]);
+return self;},
+args: ["anObject"],
+source: unescape('h1%3A%20anObject%0A%20%20%20%20%5Eself%20h1%20with%3A%20anObject'),
+messageSends: ["with:", "h1"],
+referencedClasses: []
+}),
+smalltalk.HTMLCanvas);
+
+smalltalk.addMethod(
+unescape('_iframe'),
+smalltalk.method({
+selector: unescape('iframe'),
+category: 'tags',
+fn: function (){
+var self=this;
+return smalltalk.send(self, "_tag_", ["iframe"]);
+return self;},
+args: [],
+source: unescape('iframe%0A%20%20%20%20%5Eself%20tag%3A%20%27iframe%27'),
+messageSends: ["tag:"],
+referencedClasses: []
+}),
+smalltalk.HTMLCanvas);
+
+smalltalk.addMethod(
+unescape('_iframe_'),
+smalltalk.method({
+selector: unescape('iframe%3A'),
+category: 'tags',
+fn: function (aString){
+var self=this;
+return smalltalk.send(smalltalk.send(self, "_iframe", []), "_src_", [aString]);
+return self;},
+args: ["aString"],
+source: unescape('iframe%3A%20aString%0A%20%20%20%20%5Eself%20iframe%20src%3A%20aString'),
+messageSends: ["src:", "iframe"],
+referencedClasses: []
+}),
+smalltalk.HTMLCanvas);
+
+smalltalk.addMethod(
+unescape('_h2_'),
+smalltalk.method({
+selector: unescape('h2%3A'),
+category: 'tags',
+fn: function (anObject){
+var self=this;
+return smalltalk.send(smalltalk.send(self, "_h2", []), "_with_", [anObject]);
+return self;},
+args: ["anObject"],
+source: unescape('h2%3A%20anObject%0A%20%20%20%20%5E%20self%20h2%20with%3A%20anObject'),
+messageSends: ["with:", "h2"],
+referencedClasses: []
+}),
+smalltalk.HTMLCanvas);
+
+smalltalk.addMethod(
+unescape('_h3_'),
+smalltalk.method({
+selector: unescape('h3%3A'),
+category: 'tags',
+fn: function (anObject){
+var self=this;
+return smalltalk.send(smalltalk.send(self, "_h3", []), "_with_", [anObject]);
+return self;},
+args: ["anObject"],
+source: unescape('h3%3A%20anObject%0A%20%20%20%20%5Eself%20h3%20with%3A%20anObject'),
+messageSends: ["with:", "h3"],
+referencedClasses: []
+}),
+smalltalk.HTMLCanvas);
+
+smalltalk.addMethod(
+unescape('_h4_'),
+smalltalk.method({
+selector: unescape('h4%3A'),
+category: 'tags',
+fn: function (anObject){
+var self=this;
+return smalltalk.send(smalltalk.send(self, "_h4", []), "_with_", [anObject]);
+return self;},
+args: ["anObject"],
+source: unescape('h4%3A%20anObject%0A%20%20%20%20%5Eself%20h4%20with%3A%20anObject'),
+messageSends: ["with:", "h4"],
+referencedClasses: []
+}),
+smalltalk.HTMLCanvas);
+
+smalltalk.addMethod(
+unescape('_h5_'),
+smalltalk.method({
+selector: unescape('h5%3A'),
+category: 'tags',
+fn: function (anObject){
+var self=this;
+return smalltalk.send(smalltalk.send(self, "_h5", []), "_with_", [anObject]);
+return self;},
+args: ["anObject"],
+source: unescape('h5%3A%20anObject%0A%20%20%20%20%5Eself%20h5%20with%3A%20anObject'),
+messageSends: ["with:", "h5"],
+referencedClasses: []
+}),
+smalltalk.HTMLCanvas);
+
+smalltalk.addMethod(
+unescape('_h6_'),
+smalltalk.method({
+selector: unescape('h6%3A'),
+category: 'tags',
+fn: function (anObject){
+var self=this;
+return smalltalk.send(smalltalk.send(self, "_h6", []), "_with_", [anObject]);
+return self;},
+args: ["anObject"],
+source: unescape('h6%3A%20anObject%0A%20%20%20%20%5Eself%20h6%20with%3A%20anObject'),
+messageSends: ["with:", "h6"],
+referencedClasses: []
+}),
+smalltalk.HTMLCanvas);
+
+smalltalk.addMethod(
+unescape('_img_'),
+smalltalk.method({
+selector: unescape('img%3A'),
+category: 'tags',
+fn: function (aString){
+var self=this;
+return smalltalk.send(smalltalk.send(self, "_img", []), "_src_", [aString]);
+return self;},
+args: ["aString"],
+source: unescape('img%3A%20aString%0A%20%20%20%20%5Eself%20img%20src%3A%20aString'),
+messageSends: ["src:", "img"],
+referencedClasses: []
+}),
+smalltalk.HTMLCanvas);
+
+smalltalk.addMethod(
+unescape('_ol_'),
+smalltalk.method({
+selector: unescape('ol%3A'),
+category: 'tags',
+fn: function (anObject){
+var self=this;
+return smalltalk.send(smalltalk.send(self, "_ol", []), "_with_", [anObject]);
+return self;},
+args: ["anObject"],
+source: unescape('ol%3A%20anObject%0A%20%20%20%20%5Eself%20ol%20with%3A%20anObject'),
+messageSends: ["with:", "ol"],
+referencedClasses: []
+}),
+smalltalk.HTMLCanvas);
+
+smalltalk.addMethod(
+unescape('_li_'),
+smalltalk.method({
+selector: unescape('li%3A'),
+category: 'tags',
+fn: function (anObject){
+var self=this;
+return smalltalk.send(smalltalk.send(self, "_li", []), "_with_", [anObject]);
+return self;},
+args: ["anObject"],
+source: unescape('li%3A%20anObject%0A%20%20%20%20%5Eself%20li%20with%3A%20anObject'),
+messageSends: ["with:", "li"],
+referencedClasses: []
+}),
+smalltalk.HTMLCanvas);
+
+smalltalk.addMethod(
+unescape('_ul_'),
+smalltalk.method({
+selector: unescape('ul%3A'),
+category: 'tags',
+fn: function (anObject){
+var self=this;
+return smalltalk.send(smalltalk.send(self, "_ul", []), "_with_", [anObject]);
+return self;},
+args: ["anObject"],
+source: unescape('ul%3A%20anObject%0A%20%20%20%20%5Eself%20ul%20with%3A%20anObject'),
+messageSends: ["with:", "ul"],
+referencedClasses: []
+}),
+smalltalk.HTMLCanvas);
+
 
 smalltalk.addMethod(
 unescape('_onJQuery_'),
@@ -1167,6 +1375,38 @@ referencedClasses: []
 }),
 smalltalk.TagBrush);
 
+smalltalk.addMethod(
+unescape('_width_'),
+smalltalk.method({
+selector: unescape('width%3A'),
+category: 'attributes',
+fn: function (aString){
+var self=this;
+smalltalk.send(self, "_at_put_", ["width", aString]);
+return self;},
+args: ["aString"],
+source: unescape('width%3A%20aString%0A%20%20%20%20self%20%20at%3A%20%27width%27%20put%3A%20aString'),
+messageSends: ["at:put:"],
+referencedClasses: []
+}),
+smalltalk.TagBrush);
+
+smalltalk.addMethod(
+unescape('_height_'),
+smalltalk.method({
+selector: unescape('height%3A'),
+category: 'attributes',
+fn: function (aString){
+var self=this;
+smalltalk.send(self, "_at_put_", ["height", aString]);
+return self;},
+args: ["aString"],
+source: unescape('height%3A%20aString%0A%20%20%20%20self%20%20at%3A%20%27height%27%20put%3A%20aString'),
+messageSends: ["at:put:"],
+referencedClasses: []
+}),
+smalltalk.TagBrush);
+
 
 smalltalk.addMethod(
 unescape('_fromString_canvas_'),

+ 61 - 0
st/Canvas.st

@@ -161,6 +161,58 @@ link
 
 style
 	^self tag: 'style'
+!
+
+p: anObject
+    ^self p with: anObject
+!
+
+h1: anObject
+    ^self h1 with: anObject
+!
+
+iframe
+    ^self tag: 'iframe'
+!
+
+iframe: aString
+    ^self iframe src: aString
+!
+
+h2: anObject
+    ^ self h2 with: anObject
+!
+
+h3: anObject
+    ^self h3 with: anObject
+!
+
+h4: anObject
+    ^self h4 with: anObject
+!
+
+h5: anObject
+    ^self h5 with: anObject
+!
+
+h6: anObject
+    ^self h6 with: anObject
+!
+
+img: aString
+    ^self img src: aString
+!
+
+ol: anObject
+    ^self ol with: anObject
+!
+
+li: anObject
+    ^self li with: anObject
+!
+
+ul: anObject
+    ^self ul with: anObject
 ! !
 
 !HTMLCanvas class methodsFor: 'instance creation'!
@@ -277,6 +329,14 @@ media: aString
 
 rel: aString
     self  at: 'rel' put: aString
+!
+
+width: aString
+    self  at: 'width' put: aString
+!
+
+height: aString
+    self  at: 'height' put: aString
 ! !
 
 !TagBrush methodsFor: 'converting'!
@@ -422,3 +482,4 @@ appendToJQuery: aJQuery
 appendToBrush: aTagBrush
     aTagBrush appendString: self
 ! !
+