HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
HOM_playbar.h
Go to the documentation of this file.
1 /*
2  * PROPRIETARY INFORMATION. This software is proprietary to
3  * Side Effects Software Inc., and is not to be reproduced,
4  * transmitted, or disclosed in any way without written permission.
5  *
6  * COMMENTS:
7  */
8 
9 #ifndef __HOM_playbar_h__
10 #define __HOM_playbar_h__
11 
12 #include "HOM_API.h"
13 #include "HOM_Defines.h"
14 
15 #include <map>
16 #include <string>
17 #include <vector>
18 
19 class HOM_BaseKeyframe;
20 class HOM_ChannelList;
21 template <typename T> class HOM_ElemPtr;
22 class HOM_EnumValue;
23 class HOM_Node;
24 class HOM_Pane;
25 class HOM_Parm;
26 class HOM_ParmTuple;
27 class HOM_Vector2;
28 
29 
30 SWIGOUT(%rename(playbar) HOM_playbar;)
32 {
33 public:
34  virtual ~HOM_playbar()
35  {}
36 
37  virtual std::string __repr__() = 0;
38 
39  virtual bool isPlaying() = 0;
40  virtual void play() = 0;
41  virtual void stop() = 0;
42  virtual void reverse() = 0;
43 
44  virtual void jumpToNextKeyframe() = 0;
45  virtual void jumpToPreviousKeyframe() = 0;
46 
47  virtual HOM_EnumValue &playMode() = 0;
48  virtual void setPlayMode(HOM_EnumValue &mode) = 0;
49 
50  virtual double frameIncrement() = 0;
51  virtual void setFrameIncrement(double increment) = 0;
52 
53  SWIGOUT(%newobject playbackRange;)
54  virtual HOM_Vector2 *playbackRange() = 0;
55  virtual void setPlaybackRange(double start, double end) = 0;
56 
57  virtual bool isRangeRestricted() = 0;
58  virtual void setRestrictRange(bool on) = 0;
59 
60  virtual bool usesIntegerFrames() = 0;
61  virtual void setUseIntegerFrames(bool on) = 0;
62 
63  virtual bool isRealTime() = 0;
64  virtual void setRealTime(bool on) = 0;
65 
66  virtual double realTimeFactor() = 0;
67  virtual void setRealTimeFactor(double factor) = 0;
68 
69  virtual bool isRealTimeSkipping() = 0;
70  virtual void setRealTimeSkipping(bool on) = 0;
71 
72  virtual bool isAudioShown() = 0;
73  virtual void showAudio(bool on) = 0;
74  virtual bool areKeysShown() = 0;
75  virtual void showKeys(bool on) = 0;
76  virtual bool isSimCacheShown() = 0;
77  virtual void showSimCache(bool on) = 0;
78  virtual bool isRangeSliderShown() = 0;
79  virtual void showRangeSlider(bool on) = 0;
80  virtual bool areTicksShown() = 0;
81  virtual void showTicks(bool on) = 0;
82 
83  virtual void moveToBottom() = 0;
84  virtual void moveToPane(HOM_Pane &pane) = 0;
85 
86  SWIGOUT(%ignore addOpaqueEventCallback;)
87  virtual void addOpaqueEventCallback(void *callback) = 0;
88  SWIGOUT(%ignore removeOpaqueEventCallback;)
89  virtual void removeOpaqueEventCallback(void *callback) = 0;
90  SWIGOUT(%ignore opaqueEventCallbacks;)
91  virtual std::vector<void *> opaqueEventCallbacks() = 0;
92  SWIGOUT(%ignore clearOpaqueEventCallbacks;)
93  virtual void clearOpaqueEventCallbacks() = 0;
94 
95 #ifdef SWIG
96 %extend
97 {
98  void addEventCallback(InterpreterObject callback)
99  { self->addOpaqueEventCallback(callback); }
100 
101  void removeEventCallback(InterpreterObject callback)
102  { self->removeOpaqueEventCallback(callback); }
103 
104  void clearEventCallbacks()
105  { self->clearOpaqueEventCallbacks(); }
106 
107  // Note that we return a vector of borrowed references because swig
108  // will increment the reference counts.
109  std::vector<InterpreterObject> eventCallbacks()
110  {
111  std::vector<void *> opaque_callbacks(self->opaqueEventCallbacks());
112 
113  std::vector<InterpreterObject> callbacks;
114  for (int i=0; i< opaque_callbacks.size(); ++i)
115  callbacks.push_back((InterpreterObject)opaque_callbacks[i]);
116  return callbacks;
117  }
118 }
119 #endif
120 
121  virtual std::map<
123  std::vector< HOM_ElemPtr<HOM_BaseKeyframe> >
124  > selectedKeyframes() = 0;
125 
126  SWIGOUT(%newobject selectionRange;)
127  virtual HOM_Vector2 *selectionRange() = 0;
128 
129  virtual std::vector<HOM_ElemPtr<HOM_Vector2> > selectionRanges() = 0;
130 
131  SWIGOUT(%newobject timelineRange;)
132  virtual HOM_Vector2 *timelineRange() = 0;
133 
134  SWIGOUT(%newobject timeRange;)
135  virtual HOM_Vector2 *timeRange() = 0;
136  virtual void setTimeRange(double start, double end) = 0;
137 
138  SWIGOUT(%newobject frameRange;)
139  virtual HOM_Vector2 *frameRange() = 0;
140  virtual void setFrameRange(double start, double end) = 0;
141 
142  virtual HOM_ChannelList *channelList() = 0;
143  virtual void setChannelList( HOM_ChannelList *l ) = 0;
144 
145  virtual HOM_ChannelList *channelListFromSelection() = 0;
146  virtual HOM_ChannelList *channelListFromNodes(
147  const std::vector<HOM_Node*> &nodes) = 0;
148  virtual HOM_ChannelList *channelListFromParms(
149  const std::vector<HOM_Parm*> &parms) = 0;
150  virtual HOM_ChannelList *channelListFromParmTuples(
151  const std::vector<HOM_ParmTuple*> &parms) = 0;
152 };
153 
154 #endif
GLuint start
Definition: glcorearb.h:474
OIIO_API bool rename(string_view from, string_view to, std::string &err)
#define SWIGOUT(x)
Definition: HOM_Defines.h:24
void reverse(I begin, I end)
Definition: pugixml.cpp:7190
string __repr__(VtArray< T > const &self)
Definition: wrapArray.h:353
GLdouble l
Definition: glew.h:9164
#define HOM_API
Definition: HOM_API.h:13
GLuint GLuint end
Definition: glcorearb.h:474
GLsizei const GLchar *const * string
Definition: glcorearb.h:813
virtual ~HOM_playbar()
Definition: HOM_playbar.h:34
GLenum mode
Definition: glcorearb.h:98