Code

Mnemonics in "Fill and stroke", "Align and distribute", and "Transform" dialogs ...
[inkscape.git] / src / dom / smil.h
1 #ifndef __SMIL_H__
2 #define __SMIL_H__
3 /**
4  * Phoebe DOM Implementation.
5  *
6  * This is a C++ approximation of the W3C DOM model, which follows
7  * fairly closely the specifications in the various .idl files, copies of
8  * which are provided for reference.  Most important is this one:
9  *
10  * http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/idl-definitions.html
11  *
12  * Authors:
13  *   Bob Jamison
14  *
15  * Copyright (C) 2005-2008 Bob Jamison
16  *
17  *  This library is free software; you can redistribute it and/or
18  *  modify it under the terms of the GNU Lesser General Public
19  *  License as published by the Free Software Foundation; either
20  *  version 2.1 of the License, or (at your option) any later version.
21  *
22  *  This library is distributed in the hope that it will be useful,
23  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
24  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
25  *  Lesser General Public License for more details.
26  *
27  *  You should have received a copy of the GNU Lesser General Public
28  *  License along with this library; if not, write to the Free Software
29  *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
30  *  
31  * ===========================================================================
32  * NOTES
33  * 
34  * This API and many of the comments come from this document: 
35  * http://www.w3.org/TR/smil-boston-dom     
36  * 
37  * ...which is a DRAFT.  But it's the best we can find.  Can someone
38  * find a more finished, complete SMIL DOM document for us?  Thanks.   
39  */
42 #include "dom.h"
43 #include "views.h"
44 #include "events.h"
46 #include <vector>
48 namespace org
49 {
50 namespace w3c
51 {
52 namespace dom
53 {
54 namespace smil
55 {
60 //Local definitions
61 typedef dom::DOMString DOMString;
62 typedef dom::Element Element;
63 typedef dom::NodeList NodeList;
64 typedef dom::Document Document;
66 //forward declarations
67 //SMIL (non-DOM) types
68 class ElementExclusiveTimeContainer;
69 class ElementLayout;
70 class ElementParallelTimeContainer;
71 class ElementSequentialTimeContainer;
72 class ElementSyncBehavior;
73 class ElementTargetAttributes;
74 class ElementTest;
75 class ElementTime;
76 class ElementTimeContainer;
77 class ElementTimeControl;
78 class ElementTimeManipulation;
79 class Time;
80 class TimeEvent;
81 class TimeList;
83 //SMIL Elements
84 class SMILAnimateColorElement;
85 typedef Ptr<SMILAnimateColorElement> SMILAnimateColorElementPtr;
86 class SMILAnimateElement;
87 typedef Ptr<SMILAnimateElement> SMILAnimateElementPtr;
88 class SMILAnimateMotionElement;
89 typedef Ptr<SMILAnimateMotionElement> SMILAnimateMotionElementPtr;
90 class SMILAnimation;
91 typedef Ptr<SMILAnimation> SMILAnimationPtr;
92 class SMILDocument;
93 typedef Ptr<SMILDocument> SMILDocumentPtr;
94 class SMILElement;
95 typedef Ptr<SMILElement> SMILElementPtr;
96 class SMILLayoutElement;
97 typedef Ptr<SMILLayoutElement> SMILLayoutElementPtr;
98 class SMILMediaElement;
99 typedef Ptr<SMILMediaElement> SMILMediaElementPtr;
100 class SMILRefElement;
101 typedef Ptr<SMILRefElement> SMILRefElementPtr;
102 class SMILRegionElement;
103 typedef Ptr<SMILRegionElement> SMILRegionElementPtr;
104 class SMILRegionInterface;
105 typedef Ptr<SMILRegionInterface> SMILRegionInterfacePtr;
106 class SMILRootLayoutElement;
107 typedef Ptr<SMILRootLayoutElement> SMILRootLayoutElementPtr;
108 class SMILSetElement;
109 typedef Ptr<SMILSetElement> SMILSetElementPtr;
110 class SMILSwitchElement;
111 typedef Ptr<SMILSwitchElement> SMILSwitchElementPtr;
112 class SMILTopLayoutElement;
113 typedef Ptr<SMILTopLayoutElement> SMILTopLayoutElementPtr;
117 /*#########################################################################
118 ###########################################################################
119 ##  D A T A    T Y P E S
120 ###########################################################################
121 #########################################################################*/
125 /*#########################################################################
126 ## ElementLayout
127 #########################################################################*/
129 /**
130  * This interface is used by SMIL elements root-layout, top-layout and region. 
131  */
132 class ElementLayout
134 public:
137     /**
138      * Return the title of an item implementing this interface
139      */
140     virtual DOMString getTitle()
141         { return title; }
143     /**
144      * Set the title of an item implementing this interface
145      */
146     virtual void setTitle(const DOMString &val) throw(dom::DOMException)
147         { title = val; }
149     /**
150      * Return the background color of an item implementing this interface
151      */
152     virtual DOMString getBackgroundColor()
153         { return backgroundColor; }
155     /**
156      * Set the background color of an item implementing this interface
157      */
158     virtual void setBackgroundColor(const DOMString &val) throw(dom::DOMException)
159         { backgroundColor = val; }
161     /**
162      * Return the height of an item implementing this interface
163      */
164     virtual long getHeight()
165         { return height; }
167     /**
168      * Set the height of an item implementing this interface
169      */
170     virtual void setHeight(long val) throw(dom::DOMException)
171         { height = val; }
173     /**
174      * Return the width of an item implementing this interface
175      */
176     virtual long getWidth()
177         { return width; }
179     /**
180      * Set the width of an item implementing this interface
181      */
182     virtual void setWidth(long val) throw(dom::DOMException)
183         { width = val; }
187     //##################
188     //# Non-API methods
189     //##################
191     /**
192      *
193      */
194     ElementLayout() {}
196     /**
197      *
198      */
199     ElementLayout(const ElementLayout &other)
200         {
201         assign(other);
202         }
204     /**
205      *
206      */
207     ElementLayout &operator=(const ElementLayout &other)
208         {
209         assign(other);
210         return *this;
211         }
213     /**
214      *
215      */
216     void assign(const ElementLayout &other)
217         {
218         title           = other.title;
219         backgroundColor = other.backgroundColor;
220         height          = other.height;
221         width           = other.width;
222         }
224     /**
225      *
226      */
227     virtual ~ElementLayout() {}
229 protected:
231     DOMString title;
232     DOMString backgroundColor;
233     long height;
234     long width;
236 };
239 /*#########################################################################
240 ## SMILRegionInterface
241 #########################################################################*/
243 /**
244  * Declares rendering surface for an element. See the region attribute definition. 
245  */
246 class SMILRegionInterface
248 public:
250     /**
251      * Gets an associated region element
252      */
253     virtual SMILRegionElementPtr getRegion()
254         { return regionElement; }
255         
256     /**
257      * Sets an associated region element
258      */
259     virtual void setRegion(const SMILRegionElementPtr val)
260         { regionElement = val; }
262     //##################
263     //# Non-API methods
264     //##################
266     /**
267      *
268      */
269     SMILRegionInterface()
270         {  }
272     /**
273      *
274      */
275     SMILRegionInterface(const SMILRegionInterface &other)
276        { regionElement = other.regionElement; }
278     /**
279      *
280      */
281     SMILRegionInterface& operator=(const SMILRegionInterface &other)
282        {
283            regionElement = other.regionElement;
284            return *this;
285            }
287     /**
288      *
289      */
290     virtual ~SMILRegionInterface() {}
292 protected:
294     SMILRegionElementPtr regionElement;
296 };
299 /*#########################################################################
300 ## Time
301 #########################################################################*/
303 /**
304  * The Time interface is a datatype that represents times within the timegraph.
305  * A Time has a type, key values to describe the time, and a boolean to
306  * indicate whether the values are currently unresolved. 
307  */
308 class Time
310 public:
313     /**
314      * A boolean indicating whether the current Time has been fully resolved to the 
315      * document schedule. Note that for this to be true, the current Time must be 
316      * defined (not indefinite), the syncbase and all Time's that the syncbase 
317      * depends on must be defined (not indefinite), and the begin Time of all 
318      * ascendent time containers of this element and all Time elements that this 
319      * depends upon must be defined (not indefinite). If this Time is based upon an 
320      * event, this Time will only be resolved once the specified event has happened, 
321      * subject to the constraints of the time container. Note that this may change 
322      * from true to false when the parent time container ends its simple duration 
323      * (including when it repeats or restarts).
324      */
325     virtual bool getResolved()
326         { return resolved; }
328     /**
329      * The clock value in seconds relative to the parent time container begin. This 
330      * indicates the resolved time relationship to the parent time container. This is 
331      * only valid if resolved is true.
332      */
333     virtual double getResolvedOffset()
334         { return resolvedOffset; }
336     /**
337      * An integer indicating the type of this time value. 
338      */      
339     typedef enum
340         {
341         SMIL_TIME_INDEFINITE           = 0,
342         SMIL_TIME_OFFSET               = 1,
343         SMIL_TIME_SYNC_BASED           = 2,
344         SMIL_TIME_EVENT_BASED          = 3,
345         SMIL_TIME_WALLCLOCK            = 4,
346         SMIL_TIME_MEDIA_MARKER         = 5
347         } TimeType;
351     /**
352      * A code representing the type of the underlying object, as defined above. 
353      */
354     virtual unsigned short getTimeType()
355         { return timeType; }
358     /**
359      * The clock value in seconds relative to the syncbase or eventbase.
360      * Default value is 0. 
361      */
362     virtual double getOffset()
363         { return offset; }
365     /**
366      * Set the value above
367      */
368     virtual void setOffset(double val) throw (dom::DOMException)
369         { offset = val; }
371     /**
372      * Get the base element for a sync-based or event-based time. 
373      */
374     virtual ElementPtr getBaseElement()
375         { return baseElement; }
377     /**
378      * Set the base element for a sync-based or event-based time. 
379      */
380     virtual void setBaseElement(const ElementPtr val) throw (dom::DOMException)
381         { baseElement = val; }
383     /**
384      * If true, indicates that a sync-based time is relative to the begin of the 
385      * baseElement. If false, indicates that a sync-based time is relative to the 
386      * active end of the baseElement.
387      */
388     virtual bool getBaseBegin()
389         { return baseBegin; }
391     /**
392      *  Set the value above.
393      */
394     virtual void setBaseBegin(bool val) throw (dom::DOMException)
395         { baseBegin = val; }
397     /**
398      * Get the name of the event for an event-based time. Default value is null. 
399      */
400     virtual DOMString getEvent()
401         { return eventStr; }
403     /**
404      * Set the name of the event for an event-based time. Default value is null. 
405      */
406     virtual void setEvent(const DOMString &val) throw (dom::DOMException)
407         { eventStr = val; }
409     /**
410      * Get the name of the marker from the media element, for media marker
411      * times. Default value is null. 
412      */
413     virtual DOMString getMarker()
414         { return marker; }
416     /**
417      * Set the name of the marker from the media element, for media marker
418      * times. Default value is null. 
419      */
420     virtual void setMarker(const DOMString &val) throw (dom::DOMException)
421         { marker = val; }
425     //##################
426     //# Non-API methods
427     //##################
429     /**
430      *
431      */
432     Time()
433         {
434         resolved       = false;
435         resolvedOffset = 0.0;
436         timeType       = SMIL_TIME_INDEFINITE;
437         offset         = 0.0;
438         //baseElement    = NULL; //not necessary
439         baseBegin      = false;
440         eventStr       = "";
441         marker         = "";
442         }
444     /**
445      *
446      */
447     Time(const Time &other)
448         {
449         assign(other);
450         }
451        
452     /**
453      *
454      */
455     Time &operator=(const Time &other)
456         {
457         assign(other);
458         return *this;
459         }
460        
461     void assign(const Time &other)
462         {
463         resolved       = other.resolved;
464         resolvedOffset = other.resolvedOffset;
465         timeType       = other.timeType;
466         offset         = other.offset;
467         baseElement    = other.baseElement;
468         baseBegin      = other.baseBegin;
469         eventStr       = other.eventStr;
470         marker         = other.marker;
471         }
473     /**
474      *
475      */
476     virtual ~Time() {}
478 protected:
480     bool           resolved;
481     double         resolvedOffset;
482     unsigned short timeType;
483     double         offset;
484     ElementPtr     baseElement;
485     bool           baseBegin;
486     DOMString      eventStr;
487     DOMString      marker;
489 };
492 /*#########################################################################
493 ## TimeList
494 #########################################################################*/
496 /**
497  * The TimeList interface provides the abstraction of an ordered collection of 
498  * times, without defining or constraining how this collection is implemented.
499  * 
500  * The items in the TimeList are accessible via an integral index, starting from 0.
501  */
502 class TimeList
504 public:
506     /**
507      * Returns the indexth item in the collection. If index is greater than or equal 
508      * to the number of times in the list, this returns null.
509      */
510     virtual Time item(unsigned long index)
511         {
512         if (index >=items.size())
513             {
514             Time tim;
515             return tim;
516             }
517         return items[index];
518         }
520     /**
521      * The number of times in the list. The range of valid child time
522      * indices is 0 to length-1 inclusive. 
523      */
524     virtual unsigned long getLength()
525         {
526         return items.size();
527         }
531     //##################
532     //# Non-API methods
533     //##################
535     /**
536      *
537      */
538     TimeList() {}
540     /**
541      *
542      */
543     TimeList(const TimeList &other)
544         {
545         items = other.items;
546         }
548     /**
549      *
550      */
551     TimeList &operator=(const TimeList &other)
552         {
553         items = other.items;
554         return *this;
555         }
557     /**
558      *
559      */
560     virtual ~TimeList() {}
562 protected:
564     std::vector<Time>items;
567 };
570 /*#########################################################################
571 ## ElementTime
572 #########################################################################*/
574 /**
575  * This interface defines the set of timing attributes that are common to
576  * all timed elements. 
577  */
578 class ElementTime
580 public:
583     /**
584      * Get the desired value (as a list of times) of the begin instant of this node. 
585      */
586     virtual TimeList &getBegin()
587         { return beginTime; }
589     /**
590      * Set the desired value (as a list of times) of the begin instant of this node. 
591      */
592     virtual void setBegin(const TimeList &val) throw(dom::DOMException)
593         { beginTime = val; }
595     /**
596      * Set the list of active ends for this node. 
597      */
598     virtual TimeList &getEnd()
599         { return endTime; }
601     /**
602      * Set the list of active ends for this node. 
603      */
604     virtual void setEnd(const TimeList &val) throw(dom::DOMException)
605         { endTime = val; }
607     /**
608      * Get the desired simple duration  value of this node in seconds.
609      * Negative value means "indefinite". 
610      */
611     virtual double getDur()
612         { return dur; }
614     /**
615      * Set the desired simple duration  value of this node in seconds.
616      * Negative value means "indefinite". 
617      */
618     virtual void setDur(double val) throw(dom::DOMException)
619         { dur = val; }
621     /**
622      * An integer indicating the value of the restart attribute. 
623      */      
624     typedef enum
625         {
626         RESTART_ALWAYS                 = 0,
627         RESTART_NEVER                  = 1,
628         RESTART_WHEN_NOT_ACTIVE        = 2
629         } RestartType;
631     /**
632      *  Get code representing the value of the restart  attribute,
633      *  as defined above. Default value is RESTART_ALWAYS. 
634      */
635     virtual unsigned short getRestart()
636         { return restart; }
638     /**
639      *  Set code representing the value of the restart  attribute,
640      *  as defined above. Default value is RESTART_ALWAYS. 
641      */
642     virtual void setRestart(unsigned short val) throw (dom::DOMException)
643         { restart = val; }
646     /**
647      * An integer indicating the value of the fill attribute. 
648      */      
649     typedef enum
650         {
651         FILL_REMOVE                    = 0,
652         FILL_FREEZE                    = 1
653         } FillType;
656     /**
657      * Get code representing the value of the fill attribute, as defined above.
658      * Default value is FILL_REMOVE. 
659      */
660     virtual unsigned short getFill()
661         { return fill; }
663     /**
664      * Set code representing the value of the fill attribute, as defined above.
665      */
666     virtual void setFill(unsigned short val) throw (dom::DOMException)
667         { fill = val; }
669     /**
670      * The repeatCount attribute causes the element to play repeatedly (loop) for the 
671      * specified number of times. A negative value repeat the element indefinitely. 
672      * Default value is 0 (unspecified).
673      */
674     virtual double getRepeatCount()
675         { return repeatCount; }
677     /**
678      * Set the value above.
679      */
680     virtual void setRepeatCount(double val) throw (dom::DOMException)
681         { repeatCount = val; }
683     /**
684      * The repeatDur causes the element to play repeatedly (loop) for the specified 
685      * duration in milliseconds. Negative means "indefinite".
686      */
687     virtual double getRepeatDur()
688         { return repeatDur; }
690     /**
691      * Set the value above.
692      */
693     virtual void setRepeatDur(double val) throw (dom::DOMException)
694         { repeatDur = val; }
696     /**
697      * Causes this element to begin the local timeline (subject to sync constraints). 
698      */
699     virtual bool beginElement()
700         {
701         return true;
702         }
704     /**
705      * Causes this element to end the local timeline (subject to sync constraints). 
706      */
707     virtual bool endElement()
708         {
709         return true;
710         }
712     /**
713      * Causes this element to pause the local timeline (subject to sync constraints). 
714      */
715     virtual void pauseElement()
716         {
717         }
719     /**
720      * Causes this element to resume a paused local timeline. 
721      */
722     virtual void resumeElement()
723         {
724         }
726     /**
727      * Seeks this element to the specified point on the local timeline (subject to 
728      * sync constraints). If this is a timeline, this must seek the entire timeline 
729      * (i.e. propagate to all timeChildren).
730      */
731     virtual void seekElement(double &/*seekTo*/)
732         {
733         }
736     //##################
737     //# Non-API methods
738     //##################
740     /**
741      *
742      */
743     ElementTime()
744         {
745         dur         = 0.0;
746         restart     = RESTART_ALWAYS;
747         fill        = FILL_REMOVE;
748         repeatCount = 0.0;
749         repeatDur   = 0.0;
750         }
752     /**
753      *
754      */
755     ElementTime(const ElementTime &other)
756        {
757        assign(other);
758        }
760     /**
761      *
762      */
763     ElementTime &operator=(const ElementTime &other)
764        {
765        assign(other);
766        return *this;
767        }
769     /**
770      *
771      */
772     void assign(const ElementTime &other)
773        {
774        beginTime   = other.beginTime;
775        endTime     = other.endTime;
776        dur         = other.dur;
777        restart     = other.restart;
778        fill        = other.fill;
779        repeatCount = other.repeatCount;
780        repeatDur   = other.repeatDur;
781        }
782        
783     /**
784      *
785      */
786     virtual ~ElementTime() {}
789 protected:
791     TimeList       beginTime;
792     TimeList       endTime;
793     double         dur;
794     unsigned short restart;
795     unsigned short fill;
796     double         repeatCount;
797     double         repeatDur;
800 };
803 /*#########################################################################
804 ## ElementTimeManipulation
805 #########################################################################*/
807 /**
808  * This interface support use-cases commonly associated with animation. 
809  */
810 class ElementTimeManipulation
812 public:
814     /**
815      * Defines the playback speed of element time. The value is specified as a 
816      * multiple of normal (parent time container) play speed. Legal values are signed 
817      * floating point values. Zero values are not allowed. The default is 1.0 (no 
818      * modification of speed).
819      */
820     virtual double getSpeed()
821         { return speed; }
822         
823     /**
824      * Sets the value above.
825      */
826     virtual void setSpeed(double val) throw (dom::DOMException)
827         { speed = val; }
829     /**
830      * The percentage value of the simple acceleration of time for the element. 
831      * Allowed values are from 0 to 100. Default value is 0 (no acceleration). The 
832      * sum of the values for accelerate and decelerate must not exceed 100. If it 
833      * does, the deceleration value will be reduced to make the sum legal.
834      */
835     virtual double getAccelerate()
836         { return accelerate; }
838     /**
839      * Sets the value above.
840      */
841     virtual void setAccelerate(double val) throw (dom::DOMException)
842         { accelerate = val; }
844     /**
845      * The percentage value of the simple decelerate of time for the element. Allowed 
846      * values are from 0 to 100. Default value is 0 (no deceleration). The sum of the 
847      * values for accelerate and decelerate must not exceed 100. If it does, the 
848      * deceleration value will be reduced to make the sum legal.
849      */
850     virtual double getDecelerate()
851         { return decelerate; }
853     /**
854      * Sets the value above.
855      */
856     virtual void setDecelerate(double val) throw (dom::DOMException)
857         { decelerate = val; }
859     /**
860      * The autoReverse attribute controls the "play forwards then backwards" 
861      * functionality. Default value is false.
862      */
863     virtual bool getAutoReverse()
864         { return autoReverse; }
866     /**
867      * Sets the value above.
868      */
869     virtual void setAutoReverse(bool val) throw (dom::DOMException)
870         { autoReverse = val; }
873     //##################
874     //# Non-API methods
875     //##################
877     /**
878      *
879      */
880     ElementTimeManipulation()
881         {
882         speed       = 0.0;
883         accelerate  = 0.0;
884         decelerate  = 0.0;
885         autoReverse = false;
886         }
888     /**
889      *
890      */
891     ElementTimeManipulation(const ElementTimeManipulation &other)
892         {
893         assign(other);
894         }
896     /**
897      *
898      */
899     ElementTimeManipulation &operator=(const ElementTimeManipulation &other)
900         {
901         assign(other);
902         return *this;
903         }
905     /**
906      *
907      */
908     void assign(const ElementTimeManipulation &other)
909         {
910         speed       = other.speed;
911         accelerate  = other.accelerate;
912         decelerate  = other.decelerate;
913         autoReverse = other.autoReverse;
914         }
916     /**
917      *
918      */
919     virtual ~ElementTimeManipulation() {}
922 protected:
924     double speed;
925     double accelerate;
926     double decelerate;
927     bool   autoReverse;
929 };
932 /*#########################################################################
933 ## ElementTimeContainer
934 #########################################################################*/
936 /**
937  * This is a placeholder - subject to change. This represents generic timelines. 
938  */
939 class ElementTimeContainer : public ElementTime
941 public:
944     /**
945      * A NodeList that contains all timed childrens of this node. If there
946      * are no timed children, the Nodelist is empty. 
947      */
948     virtual NodeList getTimeChildren()
949         {
950         NodeList list;
951         return list;
952         }
954     /**
955      * Returns a list of child elements active at the specified invocation. 
956      */
957     virtual NodeList getActiveChildrenAt(double /*instant_in_millis*/)
958         {
959         NodeList list;
960         return list;
961         }
963     //##################
964     //# Non-API methods
965     //##################
967     /**
968      *
969      */
970     ElementTimeContainer() {}
972     /**
973      *
974      */
975     ElementTimeContainer(const ElementTimeContainer &other) : ElementTime(other)
976         {
977         }
979     /**
980      *
981      */
982     ElementTimeContainer &operator=(const ElementTimeContainer &/*other*/)
983         {
984         return *this;
985         }
987     /**
988      *
989      */
990     virtual ~ElementTimeContainer() {}
992 protected:
995 };
998 /*#########################################################################
999 ## ElementSyncBehavior
1000 #########################################################################*/
1002 /**
1003  * The synchronization behavior extension. 
1004  */
1005 class ElementSyncBehavior
1007 public:
1009     /**
1010      * The runtime synchronization behavior for an element. 
1011      */
1012     virtual DOMString getSyncBehavior()
1013         { return syncBehavior; }
1015     /**
1016      * The sync tolerance for the associated element. It has an effect only
1017      * if the element has syncBehavior="locked". 
1018      */
1019     virtual double getSyncTolerance()
1020         { return syncTolerance; }
1022     /**
1023      * Defines the default value for the runtime synchronization behavior
1024      * for an element, and all descendents. 
1025      */
1026     virtual DOMString getDefaultSyncBehavior()
1027         { return defaultSyncBehavior; }
1029     /**
1030      * Defines the default value for the sync tolerance for an element,
1031      *   and all descendents. 
1032      */
1033     virtual double getDefaultSyncTolerance()
1034         { return defaultSyncTolerance; }
1036     /**
1037      * If set to true, forces the time container playback to sync to this element. 
1038      */
1039     virtual bool getSyncMaster()
1040         { return syncMaster; }
1043     //##################
1044     //# Non-API methods
1045     //##################
1047     /**
1048      *
1049      */
1050     ElementSyncBehavior()
1051         {
1052         syncBehavior         = "";
1053         syncTolerance        = 0.0;
1054         defaultSyncBehavior  = "";
1055         defaultSyncTolerance = 0.0;
1056         syncMaster           = false;
1057         }
1059     /**
1060      *
1061      */
1062     ElementSyncBehavior(const ElementSyncBehavior &other)
1063         {
1064         assign(other);
1065         }
1067     /**
1068      *
1069      */
1070     ElementSyncBehavior &operator=(const ElementSyncBehavior &other)
1071         {
1072         assign(other);
1073         return *this;
1074         }
1076     /**
1077      *
1078      */
1079     void assign(const ElementSyncBehavior &other)
1080         {
1081         syncBehavior         = other.syncBehavior;
1082         syncTolerance        = other.syncTolerance;
1083         defaultSyncBehavior  = other.defaultSyncBehavior;
1084         defaultSyncTolerance = other.defaultSyncTolerance;
1085         syncMaster           = other.syncMaster;
1086         }
1088     /**
1089      *
1090      */
1091     virtual ~ElementSyncBehavior() {}
1093 protected:
1095     DOMString syncBehavior;
1096     double    syncTolerance;
1097     DOMString defaultSyncBehavior;
1098     double    defaultSyncTolerance;
1099     bool      syncMaster;
1101 };
1104 /*#########################################################################
1105 ## ElementParallelTimeContainer
1106 #########################################################################*/
1108 /**
1109  * A parallel container defines a simple parallel time grouping in which multiple 
1110  * elements can play back at the same time.
1111  */
1112 class ElementParallelTimeContainer : public ElementTimeContainer
1114 public:
1116     /**
1117      * Controls the end of the container. 
1118      */
1119     virtual DOMString getEndSync()
1120         { return endSync; }
1122     /**
1123      * Controls the end of the container. 
1124      */
1125     virtual void setEndSync(const DOMString &val) throw (dom::DOMException)
1126         { endSync = val; }
1128     /**
1129      * This method returns the implicit duration in seconds. 
1130      */
1131     virtual double getImplicitDuration()
1132         { return implicitDuration; }
1134     //##################
1135     //# Non-API methods
1136     //##################
1138     /**
1139      *
1140      */
1141     ElementParallelTimeContainer()
1142         {
1143         endSync          = "";
1144         implicitDuration = 0.0;
1145         }
1147     /**
1148      *
1149      */
1150     ElementParallelTimeContainer(const ElementParallelTimeContainer &other)
1151                                 : ElementTimeContainer(other)
1152         {
1153         assign(other);
1154         }
1156     /**
1157      *
1158      */
1159     ElementParallelTimeContainer &operator=(const ElementParallelTimeContainer &other)
1160         {
1161         assign(other);
1162         return *this;
1163         }
1165     /**
1166      *
1167      */
1168     void assign(const ElementParallelTimeContainer &other)
1169         {
1170         endSync          = other.endSync;
1171         implicitDuration = other.implicitDuration;
1172         }
1174     /**
1175      *
1176      */
1177     virtual ~ElementParallelTimeContainer() {}
1179 protected:
1181     DOMString endSync;
1182     double implicitDuration;
1184 };
1187 /*#########################################################################
1188 ## ElementSequentialTimeContainer
1189 #########################################################################*/
1191 /**
1192  * A seq container defines a sequence of elements in which elements play
1193  * one after the other. 
1194  */
1195 class ElementSequentialTimeContainer : public ElementTimeContainer
1197 public:
1200     //##################
1201     //# Non-API methods
1202     //##################
1204     /**
1205      *
1206      */
1207     ElementSequentialTimeContainer() {}
1209     /**
1210      *
1211      */
1212     ElementSequentialTimeContainer(const ElementSequentialTimeContainer &other)
1213                              : ElementTimeContainer(other)
1214         {
1215         }
1217     /**
1218      *
1219      */
1220     virtual ~ElementSequentialTimeContainer() {}
1223 };
1226 /*#########################################################################
1227 ## ElementExclusiveTimeContainer
1228 #########################################################################*/
1230 /**
1231  * This interface defines a time container with semantics based upon par, but 
1232  * with the additional constraint that only one child element may play at a time.
1233  */
1234 class ElementExclusiveTimeContainer : public ElementTimeContainer
1236 public:
1238     /**
1239      * Controls the end of the container. 
1240      */
1241     virtual DOMString getEndSync()
1242         { return endSync; }
1244     /**
1245      * Controls the end of the container. 
1246      */
1247     virtual void setEndSync(const DOMString &val) throw (dom::DOMException)
1248         { endSync = val; }
1250     /**
1251      * This should support another method to get the ordered collection of paused 
1252      * elements (the paused stack) at a given point in time.
1253      */
1254     virtual NodeList getPausedElements()
1255         { return pausedElements; }
1257     //##################
1258     //# Non-API methods
1259     //##################
1261     /**
1262      *
1263      */
1264     ElementExclusiveTimeContainer() {}
1266     /**
1267      *
1268      */
1269     ElementExclusiveTimeContainer(const ElementExclusiveTimeContainer &other)
1270                     : ElementTimeContainer(other)
1271         {
1272         assign(other);
1273         }
1275     /**
1276      *
1277      */
1278     ElementExclusiveTimeContainer &operator=(const ElementExclusiveTimeContainer &other)
1279         {
1280         assign(other);
1281         return *this;
1282         }
1284     /**
1285      *
1286      */
1287     void assign(const ElementExclusiveTimeContainer &other)
1288         {
1289         endSync        = other.endSync;
1290         pausedElements = other.pausedElements;
1291         }
1293     /**
1294      *
1295      */
1296     virtual ~ElementExclusiveTimeContainer() {}
1298 protected:
1300     DOMString endSync;
1301     NodeList pausedElements;
1304 };
1307 /*#########################################################################
1308 ## ElementTimeControl
1309 #########################################################################*/
1311 /**
1312  * NOTE:  need more info
1313  */
1314 class ElementTimeControl
1316 public:
1318     /**
1319      * Causes this element to begin the local timeline (subject to sync constraints). 
1320      */
1321     virtual bool beginElement() throw(dom::DOMException)
1322         {
1323         return true;
1324         }
1326     /**
1327      * Causes this element to begin the local timeline (subject to sync constraints), 
1328      * at the passed offset from the current time when the method is called. If the 
1329      * offset is >= 0, the semantics are equivalent to an event-base begin with the 
1330      * specified offset. If the offset is < 0, the semantics are equivalent to 
1331      * beginElement(), but the element active duration is evaluated as though the 
1332      * element had begun at the passed (negative) offset from the current time when 
1333      * the method is called.
1334      */
1335     virtual bool beginElementAt(double /*offset*/) throw(dom::DOMException)
1336         {
1337         return true;
1338         }
1340     /**
1341      * Causes this element to end the local timeline (subject to sync constraints). 
1342      */
1343     virtual bool endElement() throw(dom::DOMException)
1344         {
1345         return true;
1346         }
1348     /**
1349      * Causes this element to end the local timeline (subject to sync constraints) at 
1350      * the specified offset from the current time when the method is called.
1351      */
1352     virtual bool endElementAt(double /*offset*/) throw(dom::DOMException)
1353         {
1354         return true;
1355         }
1357     //##################
1358     //# Non-API methods
1359     //##################
1361     /**
1362      *
1363      */
1364     ElementTimeControl() {}
1366     /**
1367      *
1368      */
1369     ElementTimeControl(const ElementTimeControl &/*other*/)
1370         {
1371         }
1373     /**
1374      *
1375      */
1376     ElementTimeControl &operator=(const ElementTimeControl &/*other*/)
1377         {
1378         return *this;
1379         }
1381     /**
1382      *
1383      */
1384     virtual ~ElementTimeControl() {}
1387 };
1390 /*#########################################################################
1391 ## ElementTargetAttributes
1392 #########################################################################*/
1394 /**
1395  * This interface define the set of animation target extensions. 
1396  */
1397 class ElementTargetAttributes
1399 public:
1402     /**
1403      * Get the name of the target attribute. 
1404      */
1405     virtual DOMString getAttributeName()
1406         { return attributeName; }
1408     /**
1409      * Set the name of the target attribute. 
1410      */
1411     virtual void setAttributeName(const DOMString &val)
1412         { attributeName = val; }
1414     /**
1415      * A code representing the value of the attributeType attribute
1416      */      
1417     typedef enum
1418         {
1419         ATTRIBUTE_TYPE_AUTO            = 0,
1420         ATTRIBUTE_TYPE_CSS             = 1,
1421         ATTRIBUTE_TYPE_XML             = 2
1422         } AttributeType;
1424     /**
1425      * Get the attribute type, as defined above.
1426      */
1427     virtual unsigned short getAttributeType()
1428         { return attributeType; }
1430     /**
1431      * Set the attribute type, as defined above.
1432      */
1433     virtual void setAttributeType(unsigned short val)
1434         { attributeType = val; }
1437     //##################
1438     //# Non-API methods
1439     //##################
1441     /**
1442      *
1443      */
1444     ElementTargetAttributes()
1445         {
1446         attributeName = "";
1447         attributeType = ATTRIBUTE_TYPE_AUTO;
1448         }
1450     /**
1451      *
1452      */
1453     ElementTargetAttributes(const ElementTargetAttributes &other)
1454        {
1455        assign(other);
1456        }
1458     /**
1459      *
1460      */
1461     ElementTargetAttributes &operator=(const ElementTargetAttributes &other)
1462        {
1463        assign(other);
1464        return *this;
1465        }
1467     /**
1468      *
1469      */
1470     void assign(const ElementTargetAttributes &other)
1471        {
1472        attributeName = other.attributeName;
1473        attributeType = other.attributeType;
1474        }
1476     /**
1477      *
1478      */
1479     virtual ~ElementTargetAttributes() {}
1481 protected:
1483     DOMString      attributeName;
1484     unsigned short attributeType;
1486 };
1489 /*#########################################################################
1490 ## ElementTest
1491 #########################################################################*/
1493 /**
1494  * Defines the test attributes interface. See the Test attributes definition. 
1495  */
1496 class ElementTest
1498 public:
1501     /**
1502      * Get the systemBitrate value. 
1503      */
1504     virtual long getSystemBitrate()
1505         { return systemBitrate; }
1507     /**
1508      * Set the systemBitrate value. 
1509      */
1510     virtual void setSystemBitrate(long val) throw (dom::DOMException)
1511         { systemBitrate = val; }
1513     /**
1514      *  Get the systemCaptions value. 
1515      */
1516     virtual bool getSystemCaptions()
1517         { return systemCaptions; }
1519     /**
1520      * Set the systemCaptions value. 
1521      */
1522     virtual void setSystemCaptions(bool val) throw (dom::DOMException)
1523         { systemCaptions = val; }
1525     /**
1526      * Get the systemLanguage value. 
1527      */
1528     virtual DOMString getSystemLanguage()
1529         { return systemLanguage; }
1531     /**
1532      * Set the systemLanguage value. 
1533      */
1534     virtual void setSystemLanguage(const DOMString &val) throw (dom::DOMException)
1535         { systemLanguage = val; }
1537     /**
1538      * Get the systemRequired value. 
1539      */
1540     virtual bool getSystemRequired()
1541         { return systemRequired; }
1543     /**
1544      * Get the systemScreenSize value. 
1545      */
1546     virtual bool getSystemScreenSize()
1547         { return systemScreenSize; }
1549     /**
1550      * Get the systemScreenDepth value. 
1551      */
1552     virtual bool getSystemScreenDepth()
1553         { return systemScreenDepth; }
1555     /**
1556      * Get the systemOverdubOrSubtitle value. 
1557      */
1558     virtual DOMString getSystemOverdubOrSubtitle()
1559         { return systemOverdubOrSubtitle; }
1561     /**
1562      * Set the systemOverdubOrSubtitle value. 
1563      */
1564     virtual void setSystemOverdubOrSubtitle(const DOMString &val) throw (dom::DOMException)
1565         { systemOverdubOrSubtitle = val; }
1567     /**
1568      * Get the systemAudioDesc value. 
1569      */
1570     virtual bool getSystemAudioDesc()
1571         { return systemAudioDesc; }
1573     /**
1574      * Set the systemOverdubOrSubtitle value. 
1575      */
1576     virtual void setSystemAudioDesc(bool val)  throw (dom::DOMException)
1577         { systemAudioDesc = val; }
1580     //##################
1581     //# Non-API methods
1582     //##################
1584     /**
1585      *
1586      */
1587     ElementTest()
1588         {
1589         }
1591     /**
1592      *
1593      */
1594     ElementTest(const ElementTest &other)
1595         {
1596         assign(other);
1597         }
1599     /**
1600      *
1601      */
1602     ElementTest &operator=(const ElementTest &other)
1603         {
1604         assign(other);
1605         return *this;
1606         }
1608     /**
1609      *
1610      */
1611     void assign(const ElementTest &other)
1612         {
1613         systemBitrate           = other.systemBitrate;
1614         systemCaptions          = other.systemCaptions;
1615         systemLanguage          = other.systemLanguage;
1616         systemRequired          = other.systemRequired;
1617         systemScreenSize        = other.systemScreenSize;
1618         systemScreenDepth       = other.systemScreenDepth;
1619         systemOverdubOrSubtitle = other.systemOverdubOrSubtitle;
1620         systemAudioDesc         = other.systemAudioDesc;
1621         }
1623     /**
1624      *
1625      */
1626     virtual ~ElementTest() {}
1629 protected:
1632     long      systemBitrate;
1633     bool      systemCaptions;
1634     DOMString systemLanguage;
1635     bool      systemRequired;
1636     bool      systemScreenSize;
1637     bool      systemScreenDepth;
1638     DOMString systemOverdubOrSubtitle;
1639     bool      systemAudioDesc;
1640 };
1643 /*#########################################################################
1644 ## TimeEvent
1645 #########################################################################*/
1647 /**
1648  * The TimeEvent interface provides specific contextual information associated
1649  * with Time events. 
1650  */
1651 class TimeEvent : public events::Event
1653 public:
1655     /**
1656      * The view attribute identifies the AbstractView from which the event
1657      * was generated. 
1658      */
1659     virtual views::AbstractView &getView()
1660         { return view; }
1662     /**
1663      * Specifies some detail information about the Event, depending on
1664      *   the type of event. 
1665      */
1666     virtual long getDetail()
1667         { return detail; }
1669     /**
1670      * The initTimeEvent method is used to initialize the value of a TimeEvent 
1671      * created through the DocumentEvent interface. This method may only be called 
1672      * before the TimeEvent has been dispatched via the dispatchEvent method, though 
1673      * it may be called multiple times during that phase if necessary. If called 
1674      * multiple times, the final invocation takes precedence.
1675      */
1676     virtual void initTimeEvent(const DOMString &/*typeArg*/,
1677                                const views::AbstractView */*viewArg*/,
1678                                long /*detailArg*/)
1679         {
1680         }
1682     //##################
1683     //# Non-API methods
1684     //##################
1686     /**
1687      *
1688      */
1689     TimeEvent()
1690         {
1691         detail = 0;
1692         }
1694     /**
1695      *
1696      */
1697     TimeEvent(const TimeEvent &other) : events::Event(other)
1698         {
1699         assign(other);
1700         }
1702     /**
1703      *
1704      */
1705     TimeEvent &operator=(const TimeEvent &other)
1706         {
1707         assign(other);
1708         return *this;
1709         }
1711     /**
1712      *
1713      */
1714     void assign(const TimeEvent &other)
1715         {
1716         view   = other.view;
1717         detail = other.detail;
1718         }
1720     /**
1721      *
1722      */
1723     virtual ~TimeEvent() {}
1726 protected:
1728     views::AbstractView view;
1729     long detail;
1732 };
1737 /*#########################################################################
1738 ###########################################################################
1739 ##  I N T E R F A C E    T Y P E S
1740 ###########################################################################
1741 #########################################################################*/
1746 /*#########################################################################
1747 ## SMILDocument
1748 #########################################################################*/
1750 /**
1751  * A SMIL document is the root of the SMIL Hierarchy and holds the entire 
1752  * content. Beside providing access to the hierarchy, it also provides some 
1753  * convenience methods for accessing certain sets of information from the document.
1754  */
1755 class SMILDocument : virtual public Document,
1756                      public ElementSequentialTimeContainer
1758 public:
1761     //##################
1762     //# Non-API methods
1763     //##################
1765     /**
1766      *
1767      */
1768     virtual ~SMILDocument() {}
1771 };
1774 /*#########################################################################
1775 ## SMILElement
1776 #########################################################################*/
1778 /**
1779  * The SMILElement interface is the base for all SMIL element types. It follows 
1780  * the model of the HTMLElement in the HTML DOM, extending the base Element class 
1781  * to denote SMIL-specific elements.
1782  */
1783 class SMILElement : virtual public Element
1785 public:
1787     /**
1788      * Get the unique ID
1789      */
1790     virtual DOMString getId() =0;
1792     /**
1793      * Set the unique ID
1794      */
1795     virtual void setId(const DOMString &val) throw (dom::DOMException) =0;
1798     //##################
1799     //# Non-API methods
1800     //##################
1802     /**
1803      *
1804      */
1805     virtual ~SMILElement() {}
1808 };
1811 /*#########################################################################
1812 ## SMILLayoutElement
1813 #########################################################################*/
1815 /**
1816  * Declares layout type for the document. See:
1817  * http://www.w3.org/TR/2000/WD-smil-boston-20000225/layout.html#LayoutModuleNS-TheLayoutElement 
1818  */
1819 class SMILLayoutElement : virtual public SMILElement
1821 public:
1823     /**
1824      * The mime type of the layout langage used in this layout element.The default 
1825      * value of the type attribute is "text/smil-basic-layout".
1826      */
1827     virtual DOMString getType() =0;
1829     /**
1830      * true if the player can understand the mime type, false otherwise. 
1831      */
1832     virtual bool getResolved() =0;
1834     //##################
1835     //# Non-API methods
1836     //##################
1838     /**
1839      *
1840      */
1841     virtual ~SMILLayoutElement() {}
1844 };
1847 /*#########################################################################
1848 ## SMILTopLayoutElement
1849 #########################################################################*/
1851 /**
1852  * Declares layout properties for the top-layout element. See:
1853  * http://www.w3.org/TR/2000/WD-smil-boston-20000225/layout.html#LayoutModuleNS-TheTopLayoutElement 
1854  */
1855 class SMILTopLayoutElement : virtual public SMILElement,
1856                              virtual public ElementLayout
1858 public:
1861     //##################
1862     //# Non-API methods
1863     //##################
1865     /**
1866      *
1867      */
1868     virtual ~SMILTopLayoutElement() {}
1871 };
1874 /*#########################################################################
1875 ## SMILRootLayoutElement
1876 #########################################################################*/
1878 /**
1879  * Declares layout properties for the root-layout element. See:
1880  * http://www.w3.org/TR/2000/WD-smil-boston-20000225/layout.html#LayoutModuleNS-TheRootLayoutElement 
1881  */
1882 class SMILRootLayoutElement : virtual public SMILElement,
1883                               virtual public ElementLayout
1885 public:
1888     //##################
1889     //# Non-API methods
1890     //##################
1892     /**
1893      *
1894      */
1895     virtual ~SMILRootLayoutElement() {}
1898 };
1901 /*#########################################################################
1902 ## SMILRegionElement
1903 #########################################################################*/
1905 /**
1906  * Controls the position, size and scaling of media object elements. See:
1907  * http://www.w3.org/TR/2000/WD-smil-boston-20000225/layout.html#LayoutModuleNS-TheRegionElement
1908  */
1909 class SMILRegionElement : virtual public SMILElement,
1910                           virtual public ElementLayout
1912 public:
1915     /**
1916      * Get the fit value
1917      */
1918     virtual DOMString getFit() =0;
1920     /**
1921      * Set the fit value
1922      */
1923     virtual void setFit(const DOMString &val) throw (dom::DOMException) =0;
1925     /**
1926      * Get the top value
1927      */
1928     virtual DOMString getTop() =0;
1930     /**
1931      * Set the top value
1932      */
1933     virtual void setTop(const DOMString &val) throw (dom::DOMException) =0;
1935     /**
1936      * Get the ZIndex value
1937      */
1938     virtual long getZIndex() =0;
1940     /**
1941      * Set the ZIndex value
1942      */
1943     virtual void setZIndex(long val) throw (dom::DOMException) =0;
1946     //##################
1947     //# Non-API methods
1948     //##################
1950     /**
1951      *
1952      */
1953     virtual ~SMILRegionElement() {}
1956 };
1960 /*#########################################################################
1961 ## SMILMediaElement
1962 #########################################################################*/
1964 /**
1965  * Declares media content. 
1966  */
1967 class SMILMediaElement : virtual public ElementTime,
1968                          virtual public SMILElement
1970 public:
1973     /**
1974      * Get the "abstractAttr" value
1975      */
1976     virtual DOMString getAbstractAttr() =0;
1978     /**
1979      * Set the "abstractAttr" value
1980      */
1981     virtual void setAbstractAttr(const DOMString &val) throw (dom::DOMException) =0;
1983     /**
1984      * Get the "alt" value
1985      */
1986     virtual DOMString getAlt() =0;
1988     /**
1989      * Set the "alt" value
1990      */
1991     virtual void setAlt(const DOMString &val) throw (dom::DOMException) =0;
1993     /**
1994      * Get the "author" value
1995      */
1996     virtual DOMString getAuthor() =0;
1998     /**
1999      * Set the "author" value
2000      */
2001     virtual void setAuthor(const DOMString &val) throw (dom::DOMException) =0;
2003     /**
2004      * Get the "clipBegin" value
2005      */
2006     virtual DOMString getClipBegin() =0;
2008     /**
2009      * Set the "clipBegin" value
2010      */
2011     virtual void setClipBegin(const DOMString &val) throw (dom::DOMException) =0;
2013     /**
2014      * Get the "clipEnd" value
2015      */
2016     virtual DOMString getClipEnd() =0;
2018     /**
2019      * Set the "clipEnd" value
2020      */
2021     virtual void setClipEnd(const DOMString &val) throw (dom::DOMException) =0;
2023     /**
2024      * Get the "copyright" value
2025      */
2026     virtual DOMString getCopyright() =0;
2028     /**
2029      * Set the "copyright" value
2030      */
2031     virtual void setCopyright(const DOMString &val) throw (dom::DOMException) =0;
2033     /**
2034      * Get the "longdesc" value
2035      */
2036     virtual DOMString getLongdesc() =0;
2038     /**
2039      * Set the "longdesc" value
2040      */
2041     virtual void setLongdesc(const DOMString &val) throw (dom::DOMException) =0;
2043     /**
2044      * Get the "port" value
2045      */
2046     virtual DOMString getPort() =0;
2048     /**
2049      * Set the "port" value
2050      */
2051     virtual void setPort(const DOMString &val) throw (dom::DOMException) =0;
2053     /**
2054      * Get the "readIndex" value
2055      */
2056     virtual DOMString getReadIndex() =0;
2058     /**
2059      * Set the "readIndex" value
2060      */
2061     virtual void setReadIndex(const DOMString &val) throw (dom::DOMException) =0;
2063     /**
2064      * Get the "rtpFormat" value
2065      */
2066     virtual DOMString getRtpformat() =0;
2068     /**
2069      * Set the "readIndex" value
2070      */
2071     virtual void setRtpformat(const DOMString &val) throw (dom::DOMException) =0;
2073     /**
2074      * Get the "src" value
2075      */
2076     virtual DOMString getSrc() =0;
2078     /**
2079      * Set the "src" value
2080      */
2081     virtual void setSrc(const DOMString &val) throw (dom::DOMException) =0;
2083     /**
2084      * Get the "stripRepeat" value
2085      */
2086     virtual DOMString getStripRepeat() =0;
2088     /**
2089      * Set the "stripRepeat" value
2090      */
2091     virtual void setStripRepeat(const DOMString &val) throw (dom::DOMException) =0;
2093     /**
2094      * Get the "title" value
2095      */
2096     virtual DOMString getTitle() =0;
2098     /**
2099      * Set the "title" value
2100      */
2101     virtual void setTitle(const DOMString &val) throw (dom::DOMException) =0;
2103     /**
2104      * Get the "transport" value
2105      */
2106     virtual DOMString getTransport() =0;
2108     /**
2109      * Set the "transport" value
2110      */
2111     virtual void setTransport(const DOMString &val) throw (dom::DOMException) =0;
2113     /**
2114      * Get the "type" value
2115      */
2116     virtual DOMString getType() =0;
2118     /**
2119      * Set the "type" value
2120      */
2121     virtual void setType(const DOMString &val) throw (dom::DOMException) =0;
2125     //##################
2126     //# Non-API methods
2127     //##################
2129     /**
2130      *
2131      */
2132     virtual ~SMILMediaElement() {}
2135 };
2138 /*#########################################################################
2139 ## SMILRefElement
2140 #########################################################################*/
2142 /**
2143  * Audio, video,  etc
2144  * NOTE: need more info 
2145  */
2146 class SMILRefElement : virtual public SMILMediaElement
2148 public:
2151     //##################
2152     //# Non-API methods
2153     //##################
2155     /**
2156      *
2157      */
2158     virtual ~SMILRefElement() {}
2161 };
2164 /*#########################################################################
2165 ## SMILAnimation
2166 #########################################################################*/
2168 /**
2169  * This interface defines the set of animation extensions for SMIL. 
2170  */
2171 class SMILAnimation : virtual public SMILElement,
2172                       virtual public ElementTargetAttributes,
2173                       virtual public ElementTime,
2174                       virtual public ElementTimeControl
2176 public:
2178     /**
2179      * Codes for the "additive" attribute
2180      */      
2181     typedef enum
2182         {
2183         ADDITIVE_REPLACE               = 0,
2184         ADDITIVE_SUM                   = 1
2185         } AdditiveType;
2188     /**
2189      * A code representing the value of the additive  attribute, as defined above.
2190      * Default value is ADDITIVE_REPLACE. 
2191      */
2192     virtual unsigned short getAdditive() =0;
2194     /**
2195      * Set the value above.
2196      */
2197     virtual void setAdditive(unsigned short val) throw (dom::DOMException)=0;
2199     /**
2200      * Codes for the 'accumulate' attribute
2201      */      
2202     typedef enum
2203         {
2204         ACCUMULATE_NONE                = 0,
2205         ACCUMULATE_SUM                 = 1
2206         } AccumulateType;
2209     /**
2210      * A code representing the value of the accumulate  attribute, as defined above.
2211      * Default value is ACCUMULATE_NONE. 
2212      */
2213     virtual unsigned short getAccumulate() =0;
2215     /**
2216      * Set the value above
2217      */
2218     virtual void setAccumulate(unsigned short val) throw (dom::DOMException)=0;
2220     /**
2221      * Codes for the "calcmode" attribute
2222      */      
2223     typedef enum
2224         {
2225         CALCMODE_DISCRETE              = 0,
2226         CALCMODE_LINEAR                = 1,
2227         CALCMODE_PACED                 = 2,
2228         CALCMODE_SPLINE                = 3
2229         } CalcModeType;
2232     /**
2233      * A code representing the value of the calcMode  attribute, as defined above. 
2234      */
2235     virtual unsigned short getCalcMode() =0;
2237     /**
2238      *  Set the value above.
2239      */
2240     virtual void setCalcMode(unsigned short val) throw (dom::DOMException)=0;
2242     /**
2243      * A DOMString representing the value of the keySplines  attribute. 
2244      */
2245     virtual DOMString getKeySplines() =0;
2247     /**
2248      *  Set the value above.
2249      */
2250     virtual void setKeySplines(const DOMString &val) throw (dom::DOMException)=0;
2252     /**
2253      * Get a list of the time values of the keyTimes attribute. 
2254      */
2255     virtual TimeList getKeyTimes() =0;
2257     /**
2258      * Set the list of the time value of the keyTimes  attribute. 
2259      */
2260     virtual void setKeyTimes(const TimeList &val) throw (dom::DOMException)=0;
2262     /**
2263      * Get a DOMString representing the value of the values attribute. 
2264      */
2265     virtual DOMString getValues() =0;
2267     /**
2268      * Set the DOMString representing the value of the values attribute. 
2269      */
2270     virtual void setValues(const DOMString &val) throw (dom::DOMException)=0;
2272     /**
2273      * Get a DOMString representing the value of the from attribute. 
2274      */
2275     virtual DOMString getFrom() =0;
2277     /**
2278      * Set the DOMString representing the value of the from attribute. 
2279      */
2280     virtual void setFrom(const DOMString &val) throw (dom::DOMException)=0;
2282     /**
2283      * Get a DOMString representing the value of the to attribute. 
2284      */
2285     virtual DOMString getTo() =0;
2287     /**
2288      * Set the DOMString representing the value of the to attribute. 
2289      */
2290     virtual void setTo(const DOMString &val) throw (dom::DOMException)=0;
2292     /**
2293      * Get a DOMString representing the value of the by attribute. 
2294      */
2295     virtual DOMString getBy() =0;
2297     /**
2298      * Set the DOMString representing the value of the by attribute. 
2299      */
2300     virtual void setBy(const DOMString &val) throw (dom::DOMException)=0;
2302     //##################
2303     //# Non-API methods
2304     //##################
2306     /**
2307      *
2308      */
2309     virtual ~SMILAnimation() {}
2312 };
2315 /*#########################################################################
2316 ## SMILAnimateElement
2317 #########################################################################*/
2319 /**
2320  * This interface represents the SMIL animate element. 
2321  */
2322 class SMILAnimateElement : virtual public SMILAnimation
2324 public:
2327     //##################
2328     //# Non-API methods
2329     //##################
2331     /**
2332      *
2333      */
2334     virtual ~SMILAnimateElement() {}
2337 };
2340 /*#########################################################################
2341 ## SMILSetElement
2342 #########################################################################*/
2344 /**
2345  * This interface represents the set element. 
2346  */
2347 class SMILSetElement : virtual public ElementTimeControl,
2348                        virtual public ElementTime,
2349                        virtual public ElementTargetAttributes,
2350                        virtual public SMILElement
2352 public:
2354     /**
2355      * Specifies the value for the attribute during the duration of this element. 
2356      */
2357     virtual DOMString getTo() =0;
2359     /**
2360      * Set the value above.
2361      */
2362     virtual void setTo(const DOMString &val) =0;
2364     //##################
2365     //# Non-API methods
2366     //##################
2368     /**
2369      *
2370      */
2371     virtual ~SMILSetElement() {}
2374 };
2377 /*#########################################################################
2378 ## SMILAnimateMotionElement
2379 #########################################################################*/
2381 /**
2382  * This interface present the animationMotion element in SMIL. 
2383  */
2384 class SMILAnimateMotionElement : virtual public SMILAnimateElement
2386 public:
2388     /**
2389      * Specifies the curve that describes the attribute value as a function of time. 
2390      */
2391     virtual DOMString getPath() =0;
2393     /**
2394      * Specifies the curve that describes the attribute value as a function of time. 
2395      */
2396     virtual void setPath(const DOMString &val) throw(dom::DOMException) =0;
2398     /**
2399      * Specifies the origin of motion for the animation. 
2400      */
2401     virtual DOMString getOrigin() =0;
2403     /**
2404      * Specifies the origin of motion for the animation. 
2405      */
2406     virtual void setOrigin(const DOMString &val) throw(dom::DOMException) =0;
2409     //##################
2410     //# Non-API methods
2411     //##################
2413     /**
2414      *
2415      */
2416     virtual ~SMILAnimateMotionElement() {}
2419 };
2422 /*#########################################################################
2423 ## SMILAnimateColorElement
2424 #########################################################################*/
2426 /**
2427  * This interface represents the SMIL animateColor element. 
2428  */
2429 class SMILAnimateColorElement : virtual public SMILAnimation
2431 public:
2434     //##################
2435     //# Non-API methods
2436     //##################
2438     /**
2439      *
2440      */
2441     virtual ~SMILAnimateColorElement() {}
2444 };
2450 /*#########################################################################
2451 ## SMILSwitchElement
2452 #########################################################################*/
2454 /**
2455  * Defines a block of content control. See:
2456  * http://www.w3.org/TR/2000/WD-smil-boston-20000225/content.html#ContentControlNS-SwitchElement
2457  */
2458 class SMILSwitchElement : virtual public SMILElement
2460 public:
2462     /**
2463      * Returns the slected element at runtime. null if the selected element
2464      * is not yet available. 
2465      */
2466     virtual ElementPtr getSelectedElement() =0;
2468     //##################
2469     //# Non-API methods
2470     //##################
2472     /**
2473      *
2474      */
2475     virtual ~SMILSwitchElement() {}
2478 };
2484 }  //namespace smil
2485 }  //namespace dom
2486 }  //namespace w3c
2487 }  //namespace org
2489 #endif   /* __SMIL_H__ */
2491 /*#########################################################################
2492 ## E N D    O F    F I L E
2493 #########################################################################*/