]> err.no Git - sope/blob - sope-appserver/NGObjWeb/DynamicElements/WOQuickTime.m
started TAL element builder
[sope] / sope-appserver / NGObjWeb / DynamicElements / WOQuickTime.m
1 /*
2   Copyright (C) 2000-2005 SKYRIX Software AG
3
4   This file is part of SOPE.
5
6   SOPE is free software; you can redistribute it and/or modify it under
7   the terms of the GNU Lesser General Public License as published by the
8   Free Software Foundation; either version 2, or (at your option) any
9   later version.
10
11   SOPE is distributed in the hope that it will be useful, but WITHOUT ANY
12   WARRANTY; without even the implied warranty of MERCHANTABILITY or
13   FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public
14   License for more details.
15
16   You should have received a copy of the GNU Lesser General Public
17   License along with SOPE; see the file COPYING.  If not, write to the
18   Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
19   02111-1307, USA.
20 */
21
22 #include "WOHTMLDynamicElement.h"
23 #include "WOElement+private.h"
24 #include <NGObjWeb/WOApplication.h>
25 #include <NGObjWeb/WOResourceManager.h>
26 #include "decommon.h"
27
28 /*
29   A QuickTime movie, picture, ...
30   
31   The HTML tag attributes are described at:
32     http://www.apple.com/quicktime/authoring/embed2.html
33 */
34
35 @interface WOQuickTime : WOHTMLDynamicElement
36 {
37   // WODynamicElement: extraAttributes
38   // WODynamicElement: otherTagString
39 @protected
40   WOElement     *template;
41   WOAssociation *filename;
42   WOAssociation *framework;
43   WOAssociation *src;
44
45   WOAssociation *action;
46   WOAssociation *href;
47   WOAssociation *pageName;
48   WOAssociation *prefixHost;
49   
50   WOAssociation *width;
51   WOAssociation *height;
52   WOAssociation *pluginsPage;
53   WOAssociation *hotspotList;
54   WOAssociation *selection;
55   WOAssociation *bgcolor;
56   WOAssociation *target;
57   WOAssociation *volume;
58   WOAssociation *pan;
59   WOAssociation *tilt;
60   WOAssociation *fov;
61   WOAssociation *node;
62   WOAssociation *correction;
63   WOAssociation *cache;
64   WOAssociation *autoplay;
65   WOAssociation *hidden;
66   WOAssociation *playEveryFrame;
67   WOAssociation *controller;
68 }
69
70 @end /* WOQuickTime */
71
72 @interface WODynamicElement(UsedPrivates)
73 - (id)_initWithName:(NSString *)_name
74   associations:(NSDictionary *)_config
75   template:(WOElement *)_t;
76 @end
77
78 @implementation WOQuickTime
79
80 - (id)initWithName:(NSString *)_name
81   associations:(NSDictionary *)_config
82   template:(WOElement *)_t
83 {
84   if ((self = [super _initWithName:_name associations:_config template:_t])) {
85     self->template = [_t retain];
86     
87     self->filename       = OWGetProperty(_config, @"filename");
88     self->framework      = OWGetProperty(_config, @"framework");
89     self->src            = OWGetProperty(_config, @"src");
90
91     self->action         = OWGetProperty(_config, @"action");
92     self->href           = OWGetProperty(_config, @"href");
93     self->pageName       = OWGetProperty(_config, @"pageName");
94     self->prefixHost     = OWGetProperty(_config, @"prefixHost");
95   
96     self->width          = OWGetProperty(_config, @"width");
97     self->height         = OWGetProperty(_config, @"height");
98     self->pluginsPage    = OWGetProperty(_config, @"pluginsPage");
99     self->hotspotList    = OWGetProperty(_config, @"hotspotList");
100     self->selection      = OWGetProperty(_config, @"selection");
101     self->bgcolor        = OWGetProperty(_config, @"bgcolor");
102     self->target         = OWGetProperty(_config, @"target");
103     self->volume         = OWGetProperty(_config, @"volume");
104     self->pan            = OWGetProperty(_config, @"pan");
105     self->tilt           = OWGetProperty(_config, @"tilt");
106     self->fov            = OWGetProperty(_config, @"fov");
107     self->node           = OWGetProperty(_config, @"node");
108     self->correction     = OWGetProperty(_config, @"correction");
109     self->cache          = OWGetProperty(_config, @"cache");
110     self->autoplay       = OWGetProperty(_config, @"autoplay");
111     self->hidden         = OWGetProperty(_config, @"hidden");
112     self->playEveryFrame = OWGetProperty(_config, @"playEveryFrame");
113     self->controller     = OWGetProperty(_config, @"controller");
114   }
115   return self;
116 }
117
118 - (void)dealloc {
119   RELEASE(self->template);
120   RELEASE(self->filename);
121   RELEASE(self->framework);
122   RELEASE(self->src);
123   RELEASE(self->action);
124   RELEASE(self->href);
125   RELEASE(self->pageName);
126   RELEASE(self->prefixHost);
127   RELEASE(self->width);
128   RELEASE(self->height);
129   RELEASE(self->pluginsPage);
130   RELEASE(self->hotspotList);
131   RELEASE(self->selection);
132   RELEASE(self->bgcolor);
133   RELEASE(self->target);
134   RELEASE(self->volume);
135   RELEASE(self->pan);
136   RELEASE(self->tilt);
137   RELEASE(self->fov);
138   RELEASE(self->node);
139   RELEASE(self->correction);
140   RELEASE(self->cache);
141   RELEASE(self->autoplay);
142   RELEASE(self->hidden);
143   RELEASE(self->playEveryFrame);
144   RELEASE(self->controller);
145   [super dealloc];
146 }
147
148 /* event handling */
149
150 /* HTML generation */
151
152 /* description */
153
154 @end