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_AnimBar;
20 class HOM_BaseKeyframe;
21 class HOM_Bookmark;
22 class HOM_ChannelList;
23 template <typename T> class HOM_ElemPtr;
24 class HOM_EnumValue;
25 class HOM_Node;
26 class HOM_Pane;
27 class HOM_Parm;
28 class HOM_ParmTuple;
29 class HOM_Vector2;
30 
31 
32 SWIGOUT(%rename(playbar) HOM_playbar;)
34 {
35 public:
36  virtual ~HOM_playbar()
37  {}
38 
39  virtual std::string __repr__() = 0;
40 
41  virtual bool isPlaying() = 0;
42  virtual void play() = 0;
43  virtual void stop() = 0;
44  virtual void reverse() = 0;
45 
46  virtual void jumpToNextKeyframe() = 0;
47  virtual void jumpToPreviousKeyframe() = 0;
48 
49  virtual HOM_EnumValue &playMode() = 0;
50  virtual void setPlayMode(HOM_EnumValue &mode) = 0;
51 
52  virtual double frameIncrement() = 0;
53  virtual void setFrameIncrement(double increment) = 0;
54 
55  SWIGOUT(%newobject playbackRange;)
56  virtual HOM_Vector2 *playbackRange() = 0;
57  virtual void setPlaybackRange(double start, double end) = 0;
58 
59  virtual bool isRangeRestricted() = 0;
60  virtual void setRestrictRange(bool on) = 0;
61 
62  virtual bool usesIntegerFrames() = 0;
63  virtual void setUseIntegerFrames(bool on) = 0;
64 
65  virtual bool isRealTime() = 0;
66  virtual void setRealTime(bool on) = 0;
67 
68  virtual double realTimeFactor() = 0;
69  virtual void setRealTimeFactor(double factor) = 0;
70 
71  virtual bool isRealTimeSkipping() = 0;
72  virtual void setRealTimeSkipping(bool on) = 0;
73 
74  virtual bool isAudioShown() = 0;
75  virtual void showAudio(bool on) = 0;
76  virtual bool areKeysShown() = 0;
77  virtual void showKeys(bool on) = 0;
78  virtual bool isSimCacheShown() = 0;
79  virtual void showSimCache(bool on) = 0;
80  virtual bool isRangeSliderShown() = 0;
81  virtual void showRangeSlider(bool on) = 0;
82  virtual bool areTicksShown() = 0;
83  virtual void showTicks(bool on) = 0;
84 
85  virtual void moveToBottom() = 0;
86  virtual void moveToPane(HOM_Pane &pane) = 0;
87 
88  SWIGOUT(%ignore addOpaqueEventCallback;)
89  virtual void addOpaqueEventCallback(void *callback) = 0;
90  SWIGOUT(%ignore removeOpaqueEventCallback;)
91  virtual void removeOpaqueEventCallback(void *callback) = 0;
92  SWIGOUT(%ignore opaqueEventCallbacks;)
93  virtual std::vector<void *> opaqueEventCallbacks() = 0;
94  SWIGOUT(%ignore clearOpaqueEventCallbacks;)
95  virtual void clearOpaqueEventCallbacks() = 0;
96 
97 #ifdef SWIG
98 %extend
99 {
100  void addEventCallback(InterpreterObject callback)
101  { self->addOpaqueEventCallback(callback); }
102 
103  void removeEventCallback(InterpreterObject callback)
104  { self->removeOpaqueEventCallback(callback); }
105 
106  void clearEventCallbacks()
107  { self->clearOpaqueEventCallbacks(); }
108 
109  // Note that we return a vector of borrowed references because swig
110  // will increment the reference counts.
111  std::vector<InterpreterObject> eventCallbacks()
112  {
113  std::vector<void *> opaque_callbacks(self->opaqueEventCallbacks());
114 
115  std::vector<InterpreterObject> callbacks;
116  for (int i=0; i< opaque_callbacks.size(); ++i)
117  callbacks.push_back((InterpreterObject)opaque_callbacks[i]);
118  return callbacks;
119  }
120 }
121 #endif
122 
123  virtual std::map<
125  std::vector< HOM_ElemPtr<HOM_BaseKeyframe> >
126  > selectedKeyframes() = 0;
127 
128  SWIGOUT(%newobject selectionRange;)
129  virtual HOM_Vector2 *selectionRange() = 0;
130 
131  virtual std::vector<HOM_ElemPtr<HOM_Vector2> > selectionRanges() = 0;
132 
133  SWIGOUT(%newobject timelineRange;)
134  virtual HOM_Vector2 *timelineRange() = 0;
135 
136  SWIGOUT(%newobject timeRange;)
137  virtual HOM_Vector2 *timeRange() = 0;
138  virtual void setTimeRange(double start, double end) = 0;
139 
140  SWIGOUT(%newobject frameRange;)
141  virtual HOM_Vector2 *frameRange() = 0;
142  virtual void setFrameRange(double start, double end) = 0;
143 
144  virtual void frameBookmark(HOM_Bookmark *bookmark) = 0;
145 
146  virtual HOM_ChannelList *channelList() = 0;
147  virtual void setChannelList( HOM_ChannelList *l ) = 0;
148 
149  virtual HOM_ChannelList *channelListFromSelection() = 0;
150  virtual HOM_ChannelList *channelListFromNodes(
151  const std::vector<HOM_Node*> &nodes) = 0;
152  virtual HOM_ChannelList *channelListFromParms(
153  const std::vector<HOM_Parm*> &parms) = 0;
154  virtual HOM_ChannelList *channelListFromParmTuples(
155  const std::vector<HOM_ParmTuple*> &parms) = 0;
156 
157  virtual bool isAnimBarShown() = 0;
158  virtual void showAnimBar(bool show) = 0;
159  virtual HOM_AnimBar *animBar() = 0;
160 };
161 
162 #endif
GLuint start
Definition: glcorearb.h:475
GLsizei const GLchar *const * string
Definition: glcorearb.h:814
#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:349
#define HOM_API
Definition: HOM_API.h:13
void ignore(T const &) VULKAN_HPP_NOEXCEPT
Definition: vulkan.hpp:6508
GLuint GLuint end
Definition: glcorearb.h:475
virtual ~HOM_playbar()
Definition: HOM_playbar.h:36
GLenum mode
Definition: glcorearb.h:99
OIIO_UTIL_API bool rename(string_view from, string_view to, std::string &err)