This class can be used to display video files, video streams, and animations. More...
#include <MultiWidgets/VideoWidget.hpp>
Valuable Attributes | |
| float | audio-buffer-length = 3.F |
| Preferred audio buffer size for decoding in seconds. More... | |
| QString | audio-filters = QString () |
| Audio filtering options. More... | |
| float | audio-gain = 1.F |
| Controls the gain (volume) of the video sound-track. More... | |
| QMap< QString, QString > | audio-options = QMap<QString, QString>() |
| Audio options of stream. More... | |
| int | audio-stream-index = -1 |
| Selects audio stream from multiple streams. More... | |
| bool | auto-start = false |
| If enabled video playback will be started as soon as the decoder is ready. More... | |
| bool | auto-start-on-visual-focus = true |
| Controls whether the video should be started or paused when visual-focus-change event is triggered. More... | |
| QString | channel-layout = "downmix" |
| This attribute controls up- or down-mixing of audio channels. More... | |
| float | contrast = 1.F |
| Video rendering contrast value. More... | |
| QMap< QString, QString > | demuxer-options = QMap<QString, QString>() |
| Demuxer options of stream. More... | |
| bool | display-controls = true |
| Controls whether associated VideoControlWidget is shown. More... | |
| bool | enable-audio = true |
| Enables/disables audio. More... | |
| bool | enable-video = true |
| Enables/disables video. More... | |
| QString | format = QString() |
| One can set the video format manually using this attribute. More... | |
| float | initial-position = 0.F |
| More... | |
| bool | loop = false |
| Control whether the video playback should loop. More... | |
| bool | preload = true |
| Should we start the decoded immediately or wait for explicit play/pause commands. More... | |
| QString | preview-image = QString () |
| Video preview image. More... | |
| bool | preview-on-pause = false |
| Control whether a preview image should be displayed when the video is paused. More... | |
| bool | preview-on-stop = false |
| Control whether a preview image should be displayed when the video is stopped. More... | |
| float | preview-pos = 0.0500000007F |
| More... | |
| bool | sample-shading = false |
| Use multisampling in video rendering. More... | |
| bool | single-tap-toggles-playback = true |
| This controls whether the single-tap gesture toggles playback. More... | |
| QString | source = "" |
| Source for the video (eg. More... | |
| bool | streaming-mode = false |
| Enables streaming mode. More... | |
| bool | use-shared-decoder = false |
| Share the decoder instance with other VideoWidgets using exactly the same set of options. More... | |
| int | video-buffer-frames = 10 |
| Preferred video buffer size for decoding in frames. More... | |
| int | video-decoding-threads = 2 |
| Number of video decoding threads. Corresponds to VideoDisplay::AVDecoder::Options::videoDecodingThreads. More... | |
| QString | video-filters = QString () |
| Video filtering options. More... | |
| QMap< QString, QString > | video-options = QMap<QString, QString>() |
| Video options of stream. More... | |
| int | video-stream-index = -1 |
| Selects video stream from multiple streams. More... | |
Node Events | |
| [OUT] | eof |
| Sent when the video reaches end. | |
| [IN] | pause |
Pause video playback.
| |
| [IN] | play |
Start video playback.
| |
| [OUT] | playback-pause |
Sent when the video playback is paused
| |
| [OUT] | playback-play |
Sent when the video playback is started
| |
| [OUT] | playback-stop |
Sent when the video playback is stopped
| |
| [IN] | seek-to (float seconds) |
Seek to the given location in the video.
| |
| [IN] | stop |
Stop video playback.
| |
| [IN] | toggle |
Toggle playback state.
| |
Public Member Functions | |
| float | audioBufferSeconds () const |
| Preferred audio buffer size for decoding in seconds. More... | |
| bool | audioEnabled () const |
| Enables/disables audio. More... | |
| const QString & | audioFilters () const |
| Audio filtering options. More... | |
| float | audioGain () const |
| Controls the gain (volume) of the video sound-track. More... | |
| QMap< QString, QString > | audioOptions () const |
| Audio options of stream. More... | |
| int | audioStreamIndex () const |
| Selects audio stream from multiple streams. More... | |
| bool | autoStart () const |
| If enabled video playback will be started as soon as the decoder is ready. More... | |
| bool | autoStartOnVisualFocus () const |
| Controls whether the video should be started or paused when visual-focus-change event is triggered. More... | |
| QString | channelLayout () const |
| This attribute controls up- or down-mixing of audio channels. More... | |
| float | contrast () const |
| Video rendering contrast value. More... | |
| MultiWidgets::VideoControlWidgetPtr | controlWidget () const |
| Get the VideoControlWidget associated with this video (if any). More... | |
| virtual VideoDisplay::AVDecoderPtr | decoder () const |
| QMap< QString, QString > | demuxerOptions () const |
| Demuxer options of stream. More... | |
| void | displayControls (bool display) |
| Setter for attribute display-controls. More... | |
| float | duration () const |
| Get video duration. More... | |
| virtual void | eventProcess (const QByteArray &type, Radiant::BinaryData &data) |
| Entry point for incoming events Class specific behaviour to events is implemented in this function. More... | |
| QString | format () const |
| One can set the video format manually using this attribute. More... | |
| const QString & | generatedPreviewImage () const |
| float | initialPosition (bool *inSeconds=nullptr) const |
| Controls the initial position of the video playback. More... | |
| virtual Nimble::SizeF | intrinsicSize () const |
| Returns the pixel dimensions of the video. More... | |
| bool | isDisplayingControls () const |
| Controls whether associated VideoControlWidget is shown. More... | |
| bool | isLooping () const |
| Control whether the video playback should loop. More... | |
| bool | isPlaying () const |
| Check if the video is playing. More... | |
| Radiant::FutureBool | load (const QString &src) |
| Load a video. More... | |
| virtual void | parentChanged (WidgetPtr oldParent) |
| This is called after the parent has changed. More... | |
| void | pause () |
| Pause video playback. More... | |
| void | play () |
| Start video playback. More... | |
| float | position () const |
| Get current playback position. More... | |
| bool | preloadEnabled () const |
| Should we start the decoded immediately or wait for explicit play/pause commands. More... | |
| const QString & | previewImage () const |
| Video preview image. More... | |
| bool | previewOnPause () const |
| Control whether a preview image should be displayed when the video is paused. More... | |
| bool | previewOnStop () const |
| Control whether a preview image should be displayed when the video is stopped. More... | |
| float | previewPos (bool *inSeconds=nullptr) const |
| Determines the playback position from where to generate the preview image. More... | |
| float | relativePosition () const |
| Get relative video playback position, i.e. More... | |
| virtual void | renderContent (Luminous::RenderContext &r) const |
| Render the content of the Widget. More... | |
| void | resizeToFit (Nimble::SizeF size) |
| Resizes the video to fit the given size while maintaining aspect ratio. More... | |
| bool | sampleShading () const |
| Use multisampling in video rendering. More... | |
| void | seek (const VideoDisplay::AVDecoder::SeekRequest &req) |
| void | seek (double seconds) |
| Seek the video to given position. More... | |
| void | seekRelative (double pos) |
| Seek the video to given position. More... | |
| void | setAudioBufferSeconds (float seconds) |
| Setter for attribute audio-buffer-length. More... | |
| void | setAudioEnabled (bool enabled) |
| Setter for attribute enable-audio. More... | |
| void | setAudioFilters (const QString &filters) |
| Setter for attribute audio-filters. More... | |
| void | setAudioGain (float gain) |
| Setter for attribute audio-gain. More... | |
| void | setAudioOptions (const QMap< QString, QString > &options) |
| Setter for attribute audio-options. More... | |
| void | setAudioStreamIndex (int index) |
| Setter for attribute audio-stream-index. More... | |
| void | setAutoStart (bool enabled) |
| Setter for attribute auto-start. More... | |
| void | setAutoStartOnVisualFocus (bool autostart) |
| Setter for attribute auto-start-on-visual-focus. More... | |
| void | setChannelLayout (const QString &channelLayout) |
| Setter for attribute channel-layout. More... | |
| void | setContrast (float contrast) |
| Setter for attribute contrast. More... | |
| void | setDemuxerOptions (const QMap< QString, QString > &options) |
| Setter for attribute demuxer-options. More... | |
| void | setFormat (const QString &format) |
| Setter for attribute format. More... | |
| void | setInitialPosition (float value, bool inSeconds=true) |
| void | setLooping (bool l) |
| Setter for attribute loop. More... | |
| void | setPreload (bool enabled) |
| Setter for attribute preload. More... | |
| void | setPreviewImage (const QString &filename) |
| Setter for attribute preview-image. More... | |
| void | setPreviewOnPause (bool previewEnabled) |
| Setter for attribute preview-on-pause. More... | |
| void | setPreviewOnStop (bool previewEnabled) |
| Setter for attribute preview-on-stop. More... | |
| void | setPreviewPos (float value, bool inSeconds=true) |
| void | setPreviewPosRelative (float relative) |
| This is shortcut for "setPreviewPos"(relative, false) More... | |
| void | setSampleShading (bool sampleShadingEnabled) |
| Setter for attribute sample-shading. More... | |
| void | setSingleTapControlsPlayback (bool s) |
| Setter for attribute single-tap-toggles-playback. More... | |
| void | setSource (const QString &src) |
| Setter for attribute source. More... | |
| void | setStreamingMode (bool s) |
| Setter for attribute streaming-mode. More... | |
| void | setUseSharedDecoder (bool v) |
| Setter for attribute use-shared-decoder. More... | |
| void | setVideoBufferFrames (int frames) |
| Setter for attribute video-buffer-frames. More... | |
| void | setVideoDecodingThreads (int threads) |
| Setter for attribute video-decoding-threads. More... | |
| void | setVideoEnabled (bool enabled) |
| Setter for attribute enable-video. More... | |
| void | setVideoFilters (const QString &filters) |
| Setter for attribute video-filters. More... | |
| void | setVideoOptions (const QMap< QString, QString > &options) |
| Setter for attribute video-options. More... | |
| void | setVideoStreamIndex (int index) |
| Setter for attribute video-stream-index. More... | |
| virtual void | singleTap (MultiWidgets::GrabManager &gm, const MultiWidgets::TrackedObjectArray &objs) |
| This virtual function is called when widget receives a single-tap event. More... | |
| bool | singleTapControlsPlayback () const |
| This controls whether the single-tap gesture toggles playback. More... | |
| const QString & | source () const |
| Source for the video (eg. More... | |
| void | stop () |
| Stop video playback. More... | |
| bool | streamingMode () const |
| Enables streaming mode. More... | |
| void | togglePlayback () |
| Change between play and pause modes. | |
| virtual void | update (const MultiWidgets::FrameInfo &frameInfo) |
| Update widget state. More... | |
| bool | useSharedDecoder () const |
| Share the decoder instance with other VideoWidgets using exactly the same set of options. More... | |
| int | videoBufferFrames () const |
| Preferred video buffer size for decoding in frames. More... | |
| int | videoDecodingThreads () const |
| Number of video decoding threads. Corresponds to VideoDisplay::AVDecoder::Options::videoDecodingThreads. More... | |
| bool | videoEnabled () const |
| Enables/disables video. More... | |
| const QString & | videoFilters () const |
| Video filtering options. More... | |
| QMap< QString, QString > | videoOptions () const |
| Video options of stream. More... | |
| int | videoStreamIndex () const |
| Selects video stream from multiple streams. More... | |
| VideoWidget (WidgetPtr parent=nullptr) | |
| Constructor. More... | |
| virtual void | visualFocusChange (bool gotFocus) |
| React to changes in visual focus. More... | |
| virtual | ~VideoWidget () |
| Destructor. | |
Public Member Functions inherited from MultiWidgets::BaseMediaWidget | |
| BaseMediaWidget (WidgetPtr parent=nullptr) | |
| Construct a new Widget, set the widget state to Valuable::STATE_NEW. More... | |
| bool | isHeaderReady () const |
| Checks if the Widget has already scanned its resource file. More... | |
| virtual bool | isReady () const |
| Checks if the Widget is ready for rendering. More... | |
| bool | isValid () const |
| Checks if there are any errors with the widget. More... | |
| long | onError (std::function< void()> callback, bool once=true, Node::ListenerType type=Node::AFTER_UPDATE) |
| This function can be used to define a callback function to be executed when the state mask changes to Valuable::STATE_ERROR. More... | |
| template<typename T > | |
| long | onError (std::function< void(T *)> callback, bool once=true, Node::ListenerType type=Node::AFTER_UPDATE) |
| This function can be used to define a callback function to be executed when the state mask changes to Valuable::STATE_ERROR. More... | |
| template<typename T , template< typename > class Ptr> | |
| long | onError (std::function< void(Ptr< T >)> callback, bool once=true, Node::ListenerType type=Node::AFTER_UPDATE) |
| This function can be used to define a callback function to be executed when the state mask changes to Valuable::STATE_ERROR. More... | |
| long | onHeaderReady (std::function< void()> callback, bool once=true, Node::ListenerType type=Node::AFTER_UPDATE) |
| This function can be used to define a callback function to be executed when the state mask changes to Valuable::STATE_HEADER_READY. More... | |
| template<typename T > | |
| long | onHeaderReady (std::function< void(T *)> callback, bool once=true, Node::ListenerType type=Node::AFTER_UPDATE) |
| This function can be used to define a callback function to be executed when the state mask changes to Valuable::STATE_HEADER_READY. More... | |
| template<typename T , template< typename > class Ptr> | |
| long | onHeaderReady (std::function< void(Ptr< T >)> callback, bool once=true, Node::ListenerType type=Node::AFTER_UPDATE) |
| This function can be used to define a callback function to be executed when the state mask changes to Valuable::STATE_HEADER_READY. More... | |
| long | onReady (std::function< void()> callback, bool once=true, Node::ListenerType type=Node::AFTER_UPDATE) |
| This function can be used to define a callback function to be executed when the state mask changes to Valuable::STATE_READY. More... | |
| template<typename T > | |
| long | onReady (std::function< void(T *)> callback, bool once=true, Node::ListenerType type=Node::AFTER_UPDATE) |
| This function can be used to define a callback function to be executed when the state mask changes to Valuable::STATE_READY. More... | |
| template<typename T , template< typename > class Ptr> | |
| long | onReady (std::function< void(Ptr< T >)> callback, bool once=true, Node::ListenerType type=Node::AFTER_UPDATE) |
| This function can be used to define a callback function to be executed when the state mask changes to Valuable::STATE_READY. More... | |
| long | onStateChange (std::function< void(Valuable::LoadingEnum)> readyCallback, Node::ListenerType type=Node::AFTER_UPDATE) |
| Adds a monitor to the state. More... | |
| long | onStateMask (int stateMask, std::function< void(Valuable::LoadingEnum)> readyCallback, bool once=true, Node::ListenerType type=Node::AFTER_UPDATE) |
| Adds a monitor to the state with given stateMask. More... | |
| bool | removeStateListener (long id) |
| Removes a listener from the state. More... | |
| void | setState (Valuable::LoadingEnum state) |
| Sets the widget state. More... | |
| const Valuable::LoadingState & | state () const |
| Read the current state of the widget. More... | |
| Valuable::LoadingState & | state () |
| Get reference to the wrapped Valuable::State instance. More... | |
| virtual | ~BaseMediaWidget ()=0 |
| Destroys the widget, this is pure virtual to make this class abstract. | |
Public Member Functions inherited from MultiWidgets::Widget | |
| virtual void | addChild (const WidgetPtr &w) |
| Add a child to this widget. More... | |
| void | addOperator (OperatorPtr op) |
| Add an operator to the Widget. More... | |
| bool | allowRotation () const |
| Check whether the widget can be rotated. More... | |
| float | angularDamping () const |
| Set the angular damping of the widget, which controls how fast the the angular velocity (omega) will slow down when thrown. More... | |
| float | angularVelocity () const |
| Angular velocity of the widget in radians per second. More... | |
| Animation & | animation () |
| Get the animation controller for this widget. More... | |
| const Animation & | animation () const |
| Get the animation controller for this widget. More... | |
| bool | autoRaiseToTop () const |
| Returns whether the widget is automatically raised to top. More... | |
| virtual Nimble::Rect | boundingRect () const |
| This function defines the outer bounds of the item as a rectangle in widget coordinates. More... | |
| bool | checkFlags (Radiant::FlagsT< Flags > flags) const |
| Checks the given flags from flags -attribute. More... | |
| bool | checkInputFlags (Radiant::FlagsT< InputFlags > flags) const |
| Checks the given input flags from input-flags -attribute. More... | |
| WidgetPtr | child (size_t i) |
| Return the ith child widget. More... | |
| ChildIterator | childBegin () |
| Returns an iterator to the first child. More... | |
| ConstChildIterator | childBegin () const |
| Returns an iterator to the first child. More... | |
| ChildIterator | childEnd () |
| Returns an iterator to the end of the children. More... | |
| ConstChildIterator | childEnd () const |
| Returns an iterator to the end of the children. More... | |
| Nimble::Rect | childrenRect () const |
| Returns the bounding box of this widget's children in widget coordinates. More... | |
| ChildReverseIterator | childReverseBegin () |
| Returns an iterator addressing the first child element in reverse order. More... | |
| ConstChildReverseIterator | childReverseBegin () const |
| Returns an iterator addressing the first child element in reverse order. More... | |
| ChildReverseIterator | childReverseEnd () |
| Returns an iterator addressing the next item past the last child in a reversed order. More... | |
| ConstChildReverseIterator | childReverseEnd () const |
| Returns an iterator addressing the next item past the last child in a reversed order. More... | |
| void | clearFlags (Radiant::FlagsT< Flags > flags) |
| Sets the given widget flags to zero in flags. More... | |
| void | clearInputFlags (Radiant::FlagsT< InputFlags > flags) |
| Sets the given widget input flags to zero in input-flags. More... | |
| WidgetPtr | clone () const |
| Create a clone of the widget. More... | |
| bool | contains (const Widget &w) const |
| Checks whether the given widget is fully inside the area of this widget. More... | |
| float | damping () const |
| The damping of the Widget controls how quickly the Widget will slow down and stop when thrown. More... | |
| float | depth () const |
| Depth of the widget. More... | |
| virtual bool | deserialize (const Valuable::ArchiveElement &element) |
| Deserializes the widget's attributes and its descendants from given archive element. More... | |
| DisplayMode | display () const |
| Controls widget visibility. More... | |
| void | dropAllGrabs (GrabManager &input) |
| Drops all the grabs that this Widget has. More... | |
| virtual void | dumpInfo (FILE *f=nullptr, int indent=0) |
| Dump information about this widget to the given file. More... | |
| float | extraInputCaptureRadius () const |
| Extra radius (in widget coordinates) used when input is processed. More... | |
| template<typename W = Widget> | |
| QList< Radiant::IntrusivePtr< W > > | find (const QString &cssSelector) |
| Find all descendant widgets that match the given CSS selector and can be casted to given type. More... | |
| template<> | |
| QList< WidgetPtr > | find (const QString &cssSelector) |
| virtual void | fingerDown (MultiTouch::Finger f, MultiWidgets::GrabManager &gm) |
| Called when a new finger is grabbed by the widget. More... | |
| virtual void | fingerUp (MultiTouch::Finger f, MultiWidgets::GrabManager &gm) |
| Called when a finger is ungrabbed by the widget When this function is called the finger is already ubgrabbed by the widget and it does not lie anymore in array returned by grabbedFingers This function is meant to be overriden: the default implementation is empty. More... | |
| Radiant::FlagsT< Flags > | flags () const |
| Widget flags define common behaviour of widget. More... | |
| bool | forceRendering () const |
| See whether forced rendering is enabled. More... | |
| OperatorPtr | getOperator (size_t i) |
| Returns the ith operator. More... | |
| template<class T > | |
| QList< std::shared_ptr< T > > | getOperatorsOfType () |
| Returns all the operator pointers that contain operator of the given type. More... | |
| FingerIds | grabbedFingers () const |
| Returns all grabbed fingers. More... | |
| HandIds | grabbedHands () const |
| Returns a list of hand ids that are grabbed by this widget. More... | |
| MarkerIds | grabbedMarkers () const |
| Returns a list of marker ids that are grabbed by this widget. More... | |
| PenIds | grabbedPens () const |
| Returns a list of pen ids that are grabbed by this widget. More... | |
| TrackedObjectIds | grabbedTrackedObjects () const |
| Shortcut for InputGrabber::grabbedObjects. More... | |
| virtual void | handDown (MultiTouch::Hand h, MultiWidgets::GrabManager &gm) |
| Called when a hand is grabbed by the widget This function is meant to be overriden: the default implementation is empty. More... | |
| virtual void | handUp (MultiTouch::Hand h, MultiWidgets::GrabManager &gm) |
| Called when a hand is ungrabbed by the widget This function is meant to be overriden: the default implementation is empty. More... | |
| virtual bool | hasActiveOperators (bool recursive) |
| Returns true if the Widget currently has active operators. More... | |
| bool | hasChild (const WidgetPtr &w, bool recursive=false) |
| Returns true if the widget has w as a child or descendant. More... | |
| virtual bool | hasInteraction (Radiant::FlagsT< MultiTouch::TrackedObjectType > types=MultiTouch::TYPE_ALL, bool recursive=false) const |
| Check if the widget is currently being interacted with. More... | |
| bool | hasOperator (OperatorPtr op) const |
| Checks if the given operator is attached to the widget. More... | |
| template<typename T > | |
| bool | hasOperatorType () const |
| Checks if the given operator type is present in the operators. More... | |
| virtual float | heightForWidth (float width) const |
| Returns the height of the widget for the given width while maintaining aspect ratio. More... | |
| virtual void | hide () |
| Hide the widget. More... | |
| virtual void | input (MultiWidgets::GrabManager &gm, float dt) final |
| Send input to a Widget. More... | |
| Radiant::FlagsT< InputFlags > | inputFlags () const |
| Current input processing parameters which determine how this widget will react to input. More... | |
| InputGrabber & | inputGrabber () |
| Get the input grabber for the widget. More... | |
| const InputGrabber & | inputGrabber () const |
| Get the input grabber for the widget. More... | |
| bool | inputMotion () const |
| Check if this widget has any input motion flag enabled. More... | |
| bool | inputTaps () const |
| Check if widget listens single-tap events. More... | |
| Radiant::TimeStamp | interactionBegan () const |
| Returns the time when the last interaction started on the widget. More... | |
| Nimble::Vector2 | interactionCenter () const |
| Current or previous interaction center in widget coordinates. More... | |
| bool | intersects (const Widget &w) const |
| Check if this widget intersects referenced widget. More... | |
| bool | isDisplayed () const |
| Checks whether the value of display is not none. More... | |
| bool | isFixed () const |
| Returns true if the widget has been set to immovable. More... | |
| bool | isGrabbed (MultiTouch::TrackedObject::Id id) const |
| Checks if a given object is grabbed by this widget. More... | |
| bool | isInOrphanTree () const |
| Is this widget a part of a subtree that is not connected to non-orphan widget. | |
| virtual bool | isInside (Nimble::Vector2f v) const |
| Test if the given point is inside the Widget. More... | |
| virtual bool | isReady (bool recursive) const final |
| Recursive version of isReady. More... | |
| bool | isVisible () const |
| Checks whether the value of display is not none. More... | |
| virtual Radiant::TimeStamp | lastInteractionTime (bool recursive=false) const |
| Timestamp of the last interaction on this Widget. More... | |
| void | lower (int levels, bool force=false) |
| Lower the widget below its siblings. More... | |
| void | lowerToBottom (bool recursive=false) |
| Brings this Widget behind its siblings and its parent If the lock-depth flag has been raised, then this widget will not change its depth and only the recursive functionality will take effect. More... | |
| Nimble::Vector2f | mapFromParent (const Nimble::Vector2f &p) const |
| Transform a point from parent coordinates to Widget coordinates. More... | |
| Nimble::Vector2f | mapFromScene (const Nimble::Vector2f &p) const |
| Transform a point from scene coordinates to Widget coordinates. More... | |
| Nimble::Vector2f | mapToParent (const Nimble::Vector2f &p) const |
| Transform a point from Widget coordinates to parent coordinates. More... | |
| Nimble::Vector2f | mapToParent (Widget &w, const Nimble::Vector2f &p) const |
| Transform a point from Widget coordinates to its ancestor coordinates. More... | |
| Nimble::Vector2f | mapToScene (const Nimble::Vector2f &p) const |
| Transform a point from Widget coordinates to scene coordinates. More... | |
| virtual void | markerDown (MultiTouch::Marker m, MultiWidgets::GrabManager &gm) |
| Called when a new marker is grabbed by the widget. More... | |
| virtual void | markerUp (MultiTouch::Marker m, MultiWidgets::GrabManager &gm) |
| Called when a marker is ungrabbed by the widget. More... | |
| float | maximumTapMotion () const |
| Adjusts the limit for recognizing taps within this Widget. More... | |
| float | maximumTapTime () const |
| Adjusts the time limit for recognizing taps. More... | |
| size_t | numChildren () const |
| Returns the number of child Widgets. More... | |
| float | opacity () const |
| Transparency factor that gets recursively applied to any child widgets this widget has. More... | |
| size_t | operatorCount () const |
| Returns the number of operators applied to this Widget. More... | |
| const Operators & | operators () const |
| Nimble::Vector2 | origin () const |
| Relative origin of the widget coordinates. More... | |
| WidgetPtr | parent () const |
| Get a pointer to the Widget's parent. More... | |
| virtual void | penDown (MultiTouch::Pen p, MultiWidgets::GrabManager &gm) |
| Called when a pen is grabbed by the widget. More... | |
| virtual void | penUp (MultiTouch::Pen p, MultiWidgets::GrabManager &gm) |
| Called when a pen is ungrabbed by the widget This function is meant to be overriden: the default implementation is empty. More... | |
| virtual void | processInput (MultiWidgets::GrabManager &gm, float dt) |
| Do extra input processing. More... | |
| void | raise (int levels, bool force=false) |
| Raise the widget above its sibings. More... | |
| void | raiseFlags (Radiant::FlagsT< Flags > flags) |
| Raises the given widget flags. More... | |
| void | raiseInputFlags (Radiant::FlagsT< InputFlags > flags) |
| Raises the given widget input flags. More... | |
| void | raiseToTop (bool recursive=false) |
| Brings this Widget to the front of its siblings and its parent. More... | |
| virtual void | removeChild (const WidgetPtr &w) |
| Removes the child from this widget's child list if present. More... | |
| void | removeChildren () |
| Remove all child widgets from the widget. | |
| virtual void | removeFromParent () |
| Removes this widget from its parent (if any). | |
| bool | removeOperator (OperatorPtr op) |
| Removes the given operator from the widget. More... | |
| template<class T > | |
| void | removeOperatorType () |
| Removes all operators of given type. More... | |
| virtual void | render (Luminous::RenderContext &r) const final |
| Render the Widget and recursively its children This function calls the rest of the rendering functions that can be overridden to specialize parts of the Widget rendering. More... | |
| void | reparent (WidgetPtr newParent) |
| Change the widget parent to a new one while maintaining the position of widget in the scene coordinates. More... | |
| float | rotation () const |
| Clockwise rotation of the Widget in radians, relative to the parent. More... | |
| float | rotationTo (const Widget &ancestor) const |
| Returns the rotation relative to the given ancestor of widget. More... | |
| float | scale () const |
| Scale of the Widget. More... | |
| float | scaleDamping () const |
| Set the scale damping of the widget. More... | |
| Nimble::Rectangle | sceneGeometry () const |
| Return the Widget rectangle in scene coordinates. More... | |
| float | sceneRotation () const |
| Return the rotation of the Widget relative to the scene. More... | |
| float | sceneScale () const |
| Return the scale of the widget relative to the scene. More... | |
| Nimble::Matrix3 | sceneTransform () const |
| Returns the Widget's scene transformation matrix. More... | |
| void | setAllowRotation (bool allowRotation) |
| If allowed, the Widget can be rotated. More... | |
| void | setAngularDamping (float angularDamping) |
| Setter for attribute angular-damping. More... | |
| void | setAngularVelocity (float angularVelocity) |
| Setter for attribute omega. More... | |
| void | setAutoRaiseToTop (bool v) |
| Set automatic raise-to-top behaviour. More... | |
| virtual void | setCenterLocation (Nimble::Vector2 location) |
| Sets the location of the widget center in parent coordinates The same effect is achieved by setting origin to (0.5, 0.5) and then modifying the value of location. More... | |
| void | setDamping (float damping) |
| Setter for attribute damping. More... | |
| void | setDepth (float z) |
| void | setDisplay (DisplayMode mode) |
| Setter for attribute display. More... | |
| void | setExtraInputCaptureRadius (float radius) |
| Setter for attribute extra-input-capture-radius. More... | |
| void | setFixed () |
| If set to fixed, the widget can not be moved but it will still get input. More... | |
| void | setFlags (Radiant::FlagsT< Flags > flags) |
| Setter for attribute flags. More... | |
| void | setForceRendering (bool v) |
| Shortcut for raising or lowering force-rendering-flag in widget's flags. More... | |
| void | setInOrphanTree (bool value) |
| Sets this widget and all its descendants to orphan tree. | |
| void | setInputFlags (Radiant::FlagsT< InputFlags > flags) |
| Setter for attribute input-flags. More... | |
| void | setInputTransparent () |
| This function makes the widget pass all the input data to its children and operators if input-operators flag has been raised in input-flags. More... | |
| void | setMaximumTapMotion (float maxMotionPixels) |
| Setter for attribute maximum-tap-motion. More... | |
| void | setMaximumTapTime (float maxTapTimeSeconds) |
| Setter for attribute maximum-tap-time. More... | |
| void | setOpacity (float opacity) |
| Setter for attribute opacity. More... | |
| void | setOrigin (const Nimble::Vector2 &origin) |
| Setter for attribute origin. More... | |
| void | setPointLocation (Nimble::Vector2 location, Nimble::Vector2 pointOnWidget) |
| Sets the location of a point on the widget widget center in parent coordinates of location. More... | |
| void | setRelativePointLocation (Nimble::Vector2 location, Nimble::Vector2 pointOnWidgetRelative) |
| Sets the location of a point on the widget widget center in parent coordinates of location. More... | |
| void | setRotation (float r) |
| Setter for attribute rotation. More... | |
| void | setRotationAboutCenter (float r) |
| Set the rotation of the widget about its center. More... | |
| void | setRotationAboutPivot (float r, Nimble::Vector2 pivot) |
| Set the rotation of the widget about a point relative to the widget size Will modify the values of rotation and location. More... | |
| void | setRotationAboutPivotAbsolute (float r, Nimble::Vector2 pivot) |
| Set the rotation of the widget about an arbitrary point in widget coordinates. More... | |
| void | setRotationAboutScenePoint (float r, Nimble::Vector2 scenePt) |
| Set the rotation of the widget about an arbitrary point in scene coordinates. More... | |
| virtual void | setScale (float s) |
| Setter for attribute scale. More... | |
| void | setScaleAboutCenter (float s) |
| Set the scale of the widget about its center. More... | |
| void | setScaleAboutPivotAbsolute (float s, Nimble::Vector2 pivot) |
| Set the scale of the widget about an arbitrary point in widget coordinates. More... | |
| void | setScaleDamping (float scaleDamping) |
| Setter for attribute scale-damping. More... | |
| virtual bool | setStyle (const Stylish::Style &style) |
| Sets given style for the widget. More... | |
| void | setTouchArea (TouchArea area) |
| Setter for attribute touch-area. More... | |
| void | setVelocity (const Nimble::Vector2f &v) |
| Set the velocity of the Widget in pixels per second. More... | |
| void | setVelocity (float xvel, float yvel) |
| Set the velocity of the Widget in pixels per second. More... | |
| void | setVisible (bool v) |
| Hides or shows the widget. More... | |
| virtual bool | shouldGrab (GrabManager &gm, MultiTouch::TrackedObject obj) const |
| Should this widget grab the given object during the input. More... | |
| virtual void | show () |
| Show the widget. More... | |
| void | stopMotion () |
| Stops all motion of the widget. More... | |
| const MultiWidgets::TrackedObjectIds & | tapIds () const |
| Returns a set of ids of fingers possibly tapping the widget. More... | |
| bool | tapIsPossible () const |
| Check if the currently ongoing gesture (if any) is possibly a tap. More... | |
| unsigned | tapObjectCount () const |
| Query the number of possible tap objects. More... | |
| WidgetPtr | topParent () const |
| Return a pointer to the Widget's top-level parent. More... | |
| void | touch () |
| Set the last interaction time to current time. More... | |
| TouchArea | touchArea () const |
| Controls the default touchable area of the widget. More... | |
| virtual void | trackedObjectDown (MultiTouch::TrackedObject o, MultiWidgets::GrabManager &gm) |
| Called when a new tracked object is grabbed by the widget. More... | |
| virtual void | trackedObjectUp (MultiTouch::TrackedObject o, MultiWidgets::GrabManager &gm) |
| Called when a new tracked object is ungrabbed by the widget This function is meant to be overriden: the default implementation is empty. More... | |
| size_t | transferGrabs (WidgetPtr target, GrabManager &gm, Radiant::FlagsT< MultiTouch::TrackedObjectType > types, bool recursive=false) |
| Transfer grabs from this widget to another. More... | |
| const Nimble::Matrix3 & | transform () const |
| Return this Widget's transformation matrix relative to its parent. More... | |
| const Nimble::Matrix4f & | transform3D () const |
| Return this Widget's 3D transformation matrix relative to its parent. More... | |
| virtual QByteArray | type () const |
| This returns the plugin name of this Widget. More... | |
| const Nimble::Vector2 & | velocity () const |
| Return the current velocity of the Widget. More... | |
| Widget (WidgetPtr parent=nullptr) | |
| Construct a new Widget. More... | |
| virtual | ~Widget () |
| Destroys this Widget and frees references to all its children. More... | |
Public Member Functions inherited from Stylish::CSSBoxModel | |
| AttributeBackground & | background () |
| const AttributeBackground & | background () const |
| More... | |
| Nimble::Rectf | backgroundBox () const |
| Background painting area, depends on background-clip value. More... | |
| Radiant::Color | backgroundColor () const |
| AttributeBorder & | border () |
| const AttributeBorder & | border () const |
| More... | |
| Stylish::Border | borderBottom () const |
| Gets the bottom border that contains the width, style and color. More... | |
| Nimble::Rectf | borderBox () const |
| Border box, rectangle that includes content, padding and border. More... | |
| Nimble::Frame4f | borderFrame () const |
| Size of the border. More... | |
| Stylish::Border | borderLeft () const |
| Gets the left border that contains the width, style and color. More... | |
| Stylish::Border | borderRight () const |
| Gets the right border that contains the width, style and color. More... | |
| Stylish::Border | borderTop () const |
| Gets the top border that contains the width, style and color. More... | |
| float | bottom () const |
| Get the y coordinate of the bottom of the box. | |
| Nimble::SizeF | boxSize () const |
| Calculates total amount of screen estate taken by the box by adding size, padding, border and margin together. More... | |
| Nimble::Rectf | contentBox () const |
| Content box, rectangle that includes only the content area. More... | |
| float | height () const |
| Height of this box in pixels. | |
| Nimble::Vector2 | location () const |
| The location of this object in pixels in its parent's coordinate system. More... | |
| Nimble::Frame4f | margin () const |
| Size of the margin. More... | |
| Nimble::Rectf | marginBox () const |
| Margin box, rectangle that includes content, padding, border and margin. More... | |
| Nimble::Frame4f | padding () const |
| Size of the padding. More... | |
| Nimble::Rectf | paddingBox () const |
| Padding box, rectangle that includes content and padding but excludes border area. More... | |
| void | setBackgroundColor (Radiant::Color color) |
| void | setBackgroundColor (float red, float green, float blue, float alpha) |
| virtual void | setBorderColor (const Radiant::Color &c) |
| Sets the color for all borders. | |
| void | setBorderColor (float r, float g, float b, float a) |
| virtual void | setBorderFrame (const Nimble::Frame4f &border) |
| Sets the width for all borders. More... | |
| void | setBorderStyle (Border::Style style) |
| Sets the style for all borders. | |
| void | setBorderWidth (float width) |
| Sets the width for all borders. | |
| void | setHeight (float height, ValueUnit unit=VU_PXS) |
| Set the height of the box. | |
| void | setLocation (Nimble::Vector2 location) |
| Setter for attribute location. More... | |
| void | setLocation (Nimble::Vector2 location, ValueUnit unit) |
| Set the location of this object. More... | |
| void | setLocation (float x, float y) |
| Set the location of this object. More... | |
| void | setLocation (float x, float y, ValueUnit unit) |
| Set the location of this object. More... | |
| void | setMargin (const Nimble::Frame4f &margin) |
| Setter for attribute margin. More... | |
| void | setMargin (float one_side_margin) |
| Set the size of the margin for all sides to be equal. | |
| virtual void | setPadding (const Nimble::Frame4f &padding) |
| Setter for attribute padding. More... | |
| void | setPadding (float oneSidePadding) |
| Set the size of the padding for all sides to be equal. More... | |
| void | setSize (Nimble::SizeF size) |
| Setter for attribute size. More... | |
| void | setSize (float width, float height, ValueUnit unit=VU_PXS) |
| Set box size. More... | |
| void | setSize (Nimble::SizeF size, ValueUnit widthUnit, ValueUnit heightUnit) |
| Set box size. More... | |
| void | setWidth (float width, ValueUnit unit=VU_PXS) |
| Set the width of the box. | |
| void | setX (float x, ValueUnit unit=VU_PXS) |
| Set the x component of the location of this box. | |
| void | setY (float y, ValueUnit unit=VU_PXS) |
| Set the y component of the location of this box. | |
| Nimble::SizeF | size () const |
| Box size in pixels. More... | |
| float | width () const |
| Width of this box in pixels. | |
| float | x () const |
| Get the x component of the location of this box in pixels. | |
| float | y () const |
| Get the y component of the location of this box in pixels. | |
Public Member Functions inherited from Stylish::Styleable | |
| void | addCSSClass (const QString &s) |
| Adds the Styleable to CSS class s. More... | |
| void | addCSSClasses (const QStringList &classes) |
| Adds the Styleable to given CSS classes. More... | |
| QString | attributeSource (const QByteArray &name) const |
| Gets CSS declaration source location based on the attribute name For example if this object has "size" attribute that is set from a CSS file, attributeSource("size") would return "filename.css:line". More... | |
| const Style & | childStyle () const |
| Cached style that should be applied to all children of this object. | |
|
const Radiant::ArraySet < QByteArray > & | cssClasses () const |
| Get the CSS classes of the Styleable in lowercase. | |
| const QString & | cssClassStr () const |
| Get the CSS classes of the Styleable as a space separated string. More... | |
| QString | cssId () const |
| Get the CSS id of the Styleable. More... | |
| const QByteArray & | cssType () const |
| Get the CSS type of the Styleable. | |
| bool | hasCSSClass (const QByteArray &s) const |
| Does the Styleable belong to given CSS class. More... | |
| bool | match (const SimpleSelector &ss, int *specificityOut=nullptr) const |
| Checks if SimpleSelector matches this object. More... | |
| bool | pseudoClass (const QByteArray &name) const |
| Query if the Styleable has pseudo class called name. | |
| void | removeCSSClass (const QString &s) |
| Remove the Styleable from CSS class s. More... | |
| void | setCSSClasses (const QString &s) |
| Set the CSS classes as a space separated list You almost always want to use addCSSClass instead of this one. More... | |
| void | setCSSId (const QString &s) |
| Set the CSS id of the Styleable. More... | |
| void | setCSSType (const QByteArray &s) |
| Set the CSS type of the Styleable. | |
| virtual bool | setProperty (Valuable::Attribute &var, const Valuable::StyleValue &value, Layer layer) |
| Converts the given Stylish::Value to Valuable::Attribute. | |
| void | setPseudoClass (const QByteArray &name, bool state) |
| Disable or enable pseudo class. | |
| virtual bool | setStyle (const Style &style) |
| Applies a style to the object. More... | |
| QString | simpleSelector (bool includePseudoClasses=true) const |
| Returns a CSS simple selector that matches this Styleable. | |
| const Style & | style () const |
| Returns the style for this object. | |
| Styleable (const QByteArray &name="Styleable") | |
| Constructor for Styleable. More... | |
Public Member Functions inherited from Valuable::Node | |
| bool | acceptsEvent (const QByteArray &messageId) const |
| Returns true if this object accepts event 'id' in eventProcess. | |
| bool | addAttribute (Attribute *const attribute) |
| Adds a new Attribute to the list of attribute objects. More... | |
| bool | addAttribute (const QByteArray &name, Attribute *const attribute) |
| Adds a new Attribute to the list of attribute objects. | |
| template<typename Widget > | |
| bool | addAttribute (const QByteArray &name, const Radiant::IntrusivePtr< Widget > &attribute) |
| Adds a new Attribute to the list of attribute objects. More... | |
| long | addListener (const QByteArray &attribute, v8::Persistent< v8::Function > func, int role=Attribute::CHANGE_ROLE) |
| Add a JavaScript attribute listener to attribute belonging this Node. More... | |
| virtual Attribute * | attribute (const QByteArray &name) const |
| Gets an Attribute with the given name. More... | |
| template<typename T > | |
| AttributeT< T > * | attribute (const QByteArray &name) const |
| Gets an Attribute with the given name. More... | |
| const container & | attributes () const |
| void | clearValues (Layer layer) |
| Clears all Attribute values of the given layer. More... | |
| void | debugDump () |
| Prints the contents of this Attribute to the terminal. | |
| void | eventAddDeprecated (const QByteArray &deprecatedId, const QByteArray &newId) |
| Register a deprecated event that is automatically converted to new event id and a warning is issued when it is used. More... | |
| void | eventAddIn (const QByteArray &messageId) |
| Registers a new event that this class handles in eventProcess. | |
| template<typename Widget > | |
| long | eventAddListener (const QByteArray &eventId, const QByteArray &messageId, Radiant::IntrusivePtr< Widget > &listener, ListenerType listenerType=DIRECT, const Radiant::BinaryData *defaultData=0) |
| Add an event listener to this object. More... | |
| long | eventAddListener (const QByteArray &eventId, const QByteArray &messageId, Valuable::Node *listener, ListenerType listenerType=DIRECT, const Radiant::BinaryData *defaultData=0) |
| Add an event listener to this object. More... | |
| long | eventAddListener (const QByteArray &eventId, ListenerFuncVoid func, ListenerType listenerType=DIRECT) |
| Add an event listener to this object. More... | |
| long | eventAddListener (const QByteArray &eventId, Node *dstNode, ListenerFuncVoid func, ListenerType listenerType=DIRECT) |
| long | eventAddListenerBd (const QByteArray &eventId, Node *dstNode, ListenerFuncBd func, ListenerType listenerType=DIRECT) |
| long | eventAddListenerBd (const QByteArray &eventId, ListenerFuncBd func, ListenerType listenerType=DIRECT) |
| Add an event listener to this object. More... | |
| void | eventAddOut (const QByteArray &eventId) |
| Registers a new event this class can send with eventSend. | |
| const QSet< QByteArray > & | eventInNames () const |
| Returns set of all registered IN events. | |
| unsigned | eventListenerCount () const |
| Returns the number of event listeners. | |
| const QSet< QByteArray > & | eventOutNames () const |
| Returns set of all registered OUT events. | |
| void | eventPassingEnable (bool enable) |
| Control whether events are passed. | |
| template<typename Widget > | |
| int | eventRemoveListener (Radiant::IntrusivePtr< Widget > &listener) |
| Removes all events from this object to given listener. More... | |
| template<typename Widget > | |
| int | eventRemoveListener (const QByteArray &eventId=QByteArray(), const QByteArray &messageId=QByteArray(), Radiant::IntrusivePtr< Widget > &listener=Radiant::IntrusivePtr< Widget >()) |
| Removes events from this object that match the parameters. More... | |
| int | eventRemoveListener (const QByteArray &eventId=QByteArray(), const QByteArray &messageId=QByteArray(), Valuable::Node *listener=0) |
| Removes event listeners from this object. More... | |
| int | eventRemoveListener (Valuable::Node *listener) |
| Removes all events from this object to given listener. More... | |
| bool | eventRemoveListener (long listenerId) |
| Removes event listener with given id. More... | |
| void | eventSend (const QByteArray &eventId, Radiant::BinaryData &bd) |
| Sends an event and bd to all listeners on this eventId. | |
| void | eventSend (const QByteArray &eventId) |
| Sends an event to all listeners on this eventId. | |
| template<typename P1 > | |
| void | eventSend (const QByteArray &eventId, const P1 &p1) |
| Sends an event to all listeners on this eventId. More... | |
| template<typename P1 , typename P2 > | |
| void | eventSend (const QByteArray &eventId, const P1 &p1, const P2 &p2) |
| Sends an event to all listeners on this eventId. More... | |
| template<typename P1 , typename P2 , typename P3 > | |
| void | eventSend (const QByteArray &eventId, const P1 &p1, const P2 &p2, const P3 &p3) |
| Sends an event to all listeners on this eventId. More... | |
| template<typename P1 , typename P2 , typename P3 , typename P4 > | |
| void | eventSend (const QByteArray &eventId, const P1 &p1, const P2 &p2, const P3 &p3, const P4 &p4) |
| Sends an event to all listeners on this eventId. More... | |
| template<typename P1 , typename P2 , typename P3 , typename P4 , typename P5 > | |
| void | eventSend (const QByteArray &eventId, const P1 &p1, const P2 &p2, const P3 &p3, const P4 &p4, const P5 &p5) |
| Sends an event to all listeners on this eventId. More... | |
| unsigned | eventSourceCount () const |
| Returns the number of event sources. | |
| Uuid | id () const |
| Returns the unique id. | |
| bool | isBeingDestroyed () const |
| Returns true if we are about to delete this object. More... | |
| bool | loadFromFileXML (const QString &filename) |
| Reads this object (and its children) from an XML file. | |
| bool | loadFromMemoryXML (const QByteArray &buffer) |
| Reads this object (and its children) from a memory buffer. | |
| Node (Node *host, const QByteArray &name="", bool transit=false) | |
| Constructs a new Node and adds it under the given host. More... | |
| Node (Node &&node) | |
| Moves a node, including all its attributes, events etc. More... | |
| Node & | operator= (Node &&node) |
| Moves a node, replacing this. More... | |
| virtual bool | readElement (const ArchiveElement &element) |
| Handles a serialization element that lacks automatic handlers. More... | |
| void | removeAttribute (Attribute *const attribute) |
| Removes an Attribute from the list of attribute objects. | |
| bool | saveToFileXML (const QString &filename, unsigned int opts=SerializationOptions::DEFAULTS) const |
| Saves this object (and its children) to an XML file. | |
| bool | saveToMemoryXML (QByteArray &buffer, unsigned int opts=SerializationOptions::DEFAULTS) const |
| Saves this object (and its children) to binary data buffer. | |
| virtual ArchiveElement | serialize (Archive &doc) const |
| Serializes this object (and its children) to a DOM node. | |
| virtual void | setAsDefaults () |
| Sets the current USER attribute value as the default value and clears the USER value. More... | |
| void | setId (Uuid newId) |
| Sets the unique id. More... | |
| template<class T > | |
| bool | setValue (const QByteArray &name, const T &v) |
| Uses a query string to find a Attribute, and sets a new value to that if found. More... | |
| bool | setValue (const QByteArray &name, v8::Handle< v8::Value > v) |
| Set attribute value from JavaScript. More... | |
Public Member Functions inherited from Valuable::Attribute | |
| long | addListener (ListenerFunc func, int role=CHANGE_ROLE) |
| Adds a listener that is invoked whenever the value is changed. More... | |
| long | addListener (Node *listener, ListenerFunc func, int role=CHANGE_ROLE) |
| Adds a listener that is invoked whenever the value is changed. More... | |
| long | addListener (v8::Persistent< v8::Function > func, int role=CHANGE_ROLE) |
| Adds a JavaScript listener that is invoked whenever the value is changed. More... | |
| virtual float | asFloat (bool *const ok=0, Layer layer=LAYER_CURRENT) const |
| Converts the value object in a floating point number. More... | |
| virtual int | asInt (bool *const ok=0, Layer layer=LAYER_CURRENT) const |
| Converts the value object in an integer. More... | |
| virtual QString | asString (bool *const ok=0, Layer layer=LAYER_CURRENT) const |
| Converts the value object to a string. More... | |
| Attribute (const Attribute &o) | |
| Create a copy of the given Attribute WITHOUT the link to host, listeners, or the attribute name. More... | |
| Attribute (Node *host, const QByteArray &name, bool transit=false) | |
| Constructs a new value object and attaches it to its host. More... | |
| virtual void | clearValue (Layer layer) |
| Unsets the value from a specific layer. More... | |
| virtual void | emitChange () |
| Invokes the change valueChanged function of all listeners. | |
| void | eventProcessFloat (const char *id, float v) |
| Utility function for sending a float message to the object. | |
| void | eventProcessInt (const char *id, int v) |
| Utility function for sending an int message to the object. | |
| void | eventProcessString (const char *id, const QString &str) |
| Utility function for sending string message to the object. | |
| void | eventProcessString (const char *id, const char *str) |
| Utility function for sending string message to the object. | |
| void | eventProcessVector2 (const char *id, Nimble::Vector2) |
| Utility function for sending a Nimble::Vector2f message to the object. | |
| void | eventProcessVector3 (const char *id, Nimble::Vector3) |
| Utility function for sending a Vector3 message to the object. | |
| void | eventProcessVector4 (const char *id, Nimble::Vector4) |
| Utility function for sending a Vector4 message to the object. | |
| virtual bool | handleShorthand (const Valuable::StyleValue &value, Radiant::ArrayMap< Valuable::Attribute *, Valuable::StyleValue > &expanded) |
| If attribute supports shorthand properties, this should be used to parse those. More... | |
| Node * | host () const |
| The host object of the value object (is any). More... | |
| virtual bool | isChanged () const |
| virtual bool | isValueDefinedOnLayer (Layer layer) const |
| Check if the given layer defines a value. More... | |
| bool | layerForSerialization (SerializationOptions flags, Layer &layer) const |
| const QByteArray & | name () const |
| Returns the name of the object. | |
| const Attribute & | operator= (const Attribute &) |
| Create a copy of the given Attribute WITHOUT the link to host, listeners, or the attribute name. More... | |
| Attribute * | ownerShorthand () const |
| QByteArray | path () const |
| Returns the path (separated by '/'s) from the root. | |
| void | removeHost () |
| Sets the host pointer to zero and removes this object from the host. More... | |
| bool | removeListener (Node *listener, int role=ALL_ROLES) |
| Removes a listener from the listener list. More... | |
| bool | removeListener (long id) |
| Removes a listener from the listener list. More... | |
| void | removeListeners (int role=ALL_ROLES) |
| Removes listeners from the listener list. | |
| virtual bool | set (float v, Layer layer=USER, ValueUnit unit=VU_UNKNOWN) |
| Sets the value of the object. | |
| virtual bool | set (int v, Layer layer=USER, ValueUnit unit=VU_UNKNOWN) |
| Sets the value of the object. | |
| virtual bool | set (const QString &v, Layer layer=USER, ValueUnit unit=VU_UNKNOWN) |
| Sets the value of the object. | |
| virtual bool | set (const Nimble::Vector2f &v, Layer layer=USER, QList< ValueUnit > units=QList< ValueUnit >()) |
| Sets the value of the object. | |
| virtual bool | set (const Nimble::Vector3f &v, Layer layer=USER, QList< ValueUnit > units=QList< ValueUnit >()) |
| Sets the value of the object. | |
| virtual bool | set (const Nimble::Vector4f &v, Layer layer=USER, QList< ValueUnit > units=QList< ValueUnit >()) |
| Sets the value of the object. | |
| virtual bool | set (const StyleValue &value, Layer layer=USER) |
| Sets the value of the object. | |
| void | setName (const QByteArray &s) |
| Sets the name of the object. | |
| void | setOwnerShorthand (Attribute *owner) |
Public Member Functions inherited from Valuable::Serializable | |
| virtual bool | deserializeXML (const DOMElement &element) |
| Deserializes (reads) this object from an XML element. More... | |
| bool | isSerializable () const |
| void | setSerializable (bool v) |
Additional Inherited Members | |
Public Types inherited from MultiWidgets::Widget | |
| typedef ChildIteratorT < Children::iterator, Widget > | ChildIterator |
| Iterator for children. More... | |
|
typedef Valuable::AttributeContainer < std::multimap< float, ChildItem, std::greater< float > > > | Children |
| Container for child widgets. | |
| typedef ChildIteratorT < Children::reverse_iterator, Widget > | ChildReverseIterator |
| Reverse iterator for children. More... | |
| typedef ChildIteratorT < Children::const_iterator, Widget > | ConstChildIterator |
| Iterator for children. More... | |
| typedef ChildIteratorT < Children::const_reverse_iterator, Widget > | ConstChildReverseIterator |
| Reverse iterator for children. More... | |
| enum | DisplayMode { DISPLAY_NONE, DISPLAY_BLOCK, DISPLAY_FLEX } |
| Determines how Widget is displayed,. More... | |
| typedef TrackedObjectIds | FingerIds |
| Finger id container. | |
| enum | Flags { FLAGS_NONE = 0, DEPTH_CHANGED = (1 << 0), RENDER_CULL_CHILDREN = (1 << 2), AUTO_RAISE_TO_TOP = (1 << 3), FORCE_RENDERING = (1 << 4), LOCK_DEPTH = (1 << 5), FLAGS_DEFAULT = AUTO_RAISE_TO_TOP } |
| Standard flags for the Widget. More... | |
| typedef TrackedObjectIds | HandIds |
| Hand id container. | |
| enum | InputFlags { INPUT_NONE = 0, INPUT_TRANSLATE_X = (1 << 1), INPUT_TRANSLATE_Y = (1 << 2), INPUT_TRANSLATE_XY = INPUT_TRANSLATE_X | INPUT_TRANSLATE_Y, INPUT_TRANSLATE = INPUT_TRANSLATE_XY, INPUT_ROTATION = (1 << 3), INPUT_SCALE = (1 << 4), INPUT_MOTION = INPUT_TRANSLATE_XY | INPUT_ROTATION | INPUT_SCALE, INPUT_SINGLE_TAPS = (1 << 5), INPUT_PASS_TO_CHILDREN = (1 << 6), INPUT_KEEP_GRABS = (1 << 7), INPUT_ROTATE_ABOUT_INTERACTION_CENTER = (1 << 8), INPUT_OPERATORS = (1<<9), INPUT_INCLUDE_EVERYTHING_INSIDE = (1 << 10), INPUT_DEFAULT = INPUT_MOTION | INPUT_SINGLE_TAPS | INPUT_PASS_TO_CHILDREN | INPUT_OPERATORS | INPUT_KEEP_GRABS } |
| Flags that control input processing. More... | |
| typedef TrackedObjectIds | MarkerIds |
| Marker id container. | |
|
typedef Valuable::AttributeContainer < std::list< OperatorPtr > > | Operators |
| Container for operators. | |
| typedef TrackedObjectIds | PenIds |
| Pen id container. | |
| enum | TouchArea { TOUCH_CONTENT_BOX, TOUCH_PADDING_BOX, TOUCH_BORDER_BOX } |
| Different areas in Widget that can be interacted with. More... | |
Static Public Member Functions inherited from MultiWidgets::Widget | |
| static std::vector< WidgetPtr > | allWidgets () |
| static void | calculateMotion (const FingerArray &fingers, Nimble::Vector2f &translate, float &scale, float &rotate, Nimble::Vector2f &prevCenter) |
| Computes the translation, rotation, and scale to apply to widget based on the interacting fingers. More... | |
| static void | checkOrphanTrees () |
| static WidgetPtr | create (const Valuable::ArchiveElement &element) |
| Creates and deserializes a widget from the given archive. More... | |
| static WidgetPtr | findById (Uuid id) |
| Search Widget by its id. More... | |
| static void | listExistingWidgetsToTerminal () |
| List existing widgets to terminal, for debugging. | |
| static std::size_t | widgetCount () |
| Returns the number of widget instances in the application. More... | |
Protected Member Functions inherited from MultiWidgets::Widget | |
| virtual void | inputChildrenBack (MultiWidgets::GrabManager &gm, float dt, MultiWidgets::Widget::ChildIterator it) |
| Sends the input to children in front-to-back order. More... | |
| virtual ChildIterator | inputChildrenFront (MultiWidgets::GrabManager &gm, float dt) |
| Sends the input to children in front-to-back order. More... | |
| virtual void | interactionBegin (MultiWidgets::GrabManager &gm) |
| This function gets called when the widget gets any interaction on it when it previously didn't have one. More... | |
| virtual void | interactionEnd (MultiWidgets::GrabManager &gm) |
| This function gets called when the widget stops having any interaction on it while it previously had some. More... | |
| virtual void | postConstruct () |
| Called just after widget is fully created and normal constructors have been called, but before MultiWidgets::create returns. More... | |
| virtual void | preDestroy () |
| Called just before the widget is deleted and before destructor is called. More... | |
| virtual void | processFingers (MultiWidgets::GrabManager &gm, const MultiWidgets::FingerArray &fingers, float dt) |
| Processes the fingers that the Widget has grabbed. More... | |
| virtual void | processHands (MultiWidgets::GrabManager &gm, const MultiWidgets::HandArray &hands, float dt) |
| Processes the grabbed hands. More... | |
| virtual void | processMarkers (MultiWidgets::GrabManager &gm, const MultiWidgets::MarkerArray &markers, float dt) |
| Processes the grabbed markers. More... | |
| virtual void | processPens (MultiWidgets::GrabManager &gm, const MultiWidgets::PenArray &pens, float dt) |
| Processes the grabbed pens Is meant to be overriden: the default implementation does nothing. More... | |
| virtual void | processTrackedObjects (MultiWidgets::GrabManager &gm, const MultiWidgets::TrackedObjects &grabbed, float dt) |
| Processes all of the grabbed objects (hands, fingers, pens, markers). More... | |
| virtual void | renderBackground (Luminous::RenderContext &r) const |
| Render the Widget background as specified in CSS3 Backgrounds and Border Module. More... | |
| virtual void | renderBorder (Luminous::RenderContext &r) const |
| Render the border of the Widget. More... | |
| virtual ConstChildReverseIterator | renderChildrenBack (Luminous::RenderContext &r) const |
| Render child widgets behind (depth < 0) this widget. More... | |
| virtual void | renderChildrenFront (Luminous::RenderContext &r, MultiWidgets::Widget::ConstChildReverseIterator start) const |
| Render child widgets starting from given child. More... | |
| void | setTapIsPossible (bool possible) |
| Notifies the widget if a tap gesture is still possible. More... | |
| virtual void | updateMotion (const MultiWidgets::FrameInfo &frameInfo) |
| Simulate the attributes that affect widget motion. More... | |
| virtual void | updateStyle () |
| Updates style to this widget. More... | |
Protected Attributes inherited from Stylish::CSSBoxModel | |
| AttributeBackground | m_background |
| Background for this box. | |
| AttributeBorder | m_cssBorder |
| Borders for this box. | |
| Valuable::AttributeFrame | m_cssMargin |
| Size of the margin for this box (top, right, bottom, left) | |
| Valuable::AttributeFrame | m_cssPadding |
| Size of the padding (top, right, bottom, left) | |
| Valuable::AttributeLocation2f | m_location |
| Location of the upper-left corner. | |
| Valuable::AttributeSizeF | m_size |
| Size of the content-box of the widget. | |
This class can be used to display video files, video streams, and animations.
|
explicit |
Constructor.
| parent | Parent widget |
| float MultiWidgets::VideoWidget::audioBufferSeconds | ( | ) | const |
Preferred audio buffer size for decoding in seconds.
Corresponds to VideoDisplay::AVDecoder::Options::audioBufferSeconds
| bool MultiWidgets::VideoWidget::audioEnabled | ( | ) | const |
Enables/disables audio.
Corresponds to VideoDisplay::AVDecoder::Options::isAudioEnabled
| const QString & MultiWidgets::VideoWidget::audioFilters | ( | ) | const |
Audio filtering options.
Corresponds to VideoDisplay::AVDecoder::Options::audioFilters.
| float MultiWidgets::VideoWidget::audioGain | ( | ) | const |
Controls the gain (volume) of the video sound-track.
Typical range is 0-1, although larger values can be used as well. Default value is 1.
| QMap< QString, QString > MultiWidgets::VideoWidget::audioOptions | ( | ) | const |
Audio options of stream.
Corresponds to VideoDisplay::AVDecoder::Options::audioOptions
| int MultiWidgets::VideoWidget::audioStreamIndex | ( | ) | const |
Selects audio stream from multiple streams.
Corresponds to VideoDisplay::AVDecoder::Options::audioStreamIndex
| bool MultiWidgets::VideoWidget::autoStart | ( | ) | const |
If enabled video playback will be started as soon as the decoder is ready.
| bool MultiWidgets::VideoWidget::autoStartOnVisualFocus | ( | ) | const |
Controls whether the video should be started or paused when visual-focus-change event is triggered.
| QString MultiWidgets::VideoWidget::channelLayout | ( | ) | const |
This attribute controls up- or down-mixing of audio channels.
See corresponding AVDecorder-option for further information.
| float MultiWidgets::VideoWidget::contrast | ( | ) | const |
Video rendering contrast value.
One means no change to the source image. Values greater than one increase the contrast, values lesser than one decreases the contrast.
| MultiWidgets::VideoControlWidgetPtr MultiWidgets::VideoWidget::controlWidget | ( | ) | const |
Get the VideoControlWidget associated with this video (if any).
| QMap< QString, QString > MultiWidgets::VideoWidget::demuxerOptions | ( | ) | const |
Demuxer options of stream.
Corresponds to VideoDisplay::AVDecoder::Options::demuxerOptions
| void MultiWidgets::VideoWidget::displayControls | ( | bool | display | ) |
Setter for attribute display-controls.
| display | new attribute value |
| float MultiWidgets::VideoWidget::duration | ( | ) | const |
Get video duration.
|
virtual |
Entry point for incoming events Class specific behaviour to events is implemented in this function.
See Event System -section in Developer Guide for in-depth discussion about events in Cornerstone.
Overriding: Inherited classes can override this function for implementing custom behaviour for events. When overriding this function one needs to remember to call base-class implementation for discarded events. Otherwise large portion of the inherited behaviour gets incomplete.
See example about overriding below:
| id | Name of the incoming event. |
| data | Data associated to the incoming event. |
Reimplemented from MultiWidgets::Widget.
| QString MultiWidgets::VideoWidget::format | ( | ) | const |
One can set the video format manually using this attribute.
By default the format is recognized automatically. See corresponding AVDecorder-option for further information.
| float MultiWidgets::VideoWidget::initialPosition | ( | bool * | inSeconds = nullptr | ) | const |
Controls the initial position of the video playback.
Can be given as relative value (as percentage) or absolute value (in seconds).
| inSeconds | Returns whether the unit of the value is in seconds. If false the value is relative to the length of the video. |
|
virtual |
Returns the pixel dimensions of the video.
The video dimensions are taken from the first frame of the video. For some videos this gives wrong values, as the frame size may change inside one video track (which is very rare).
Reimplemented from MultiWidgets::Widget.
| bool MultiWidgets::VideoWidget::isDisplayingControls | ( | ) | const |
Controls whether associated VideoControlWidget is shown.
| bool MultiWidgets::VideoWidget::isLooping | ( | ) | const |
Control whether the video playback should loop.
| bool MultiWidgets::VideoWidget::isPlaying | ( | ) | const |
Check if the video is playing.
| Radiant::FutureBool MultiWidgets::VideoWidget::load | ( | const QString & | src | ) |
Load a video.
This function will load a video from the given source. The loading will happen in a background thread. The call to load will block until one frame of the video has been decoded if the return value is accessed. If the return value is not accessed, the call will be asynchronous. This function ensures that the widget is kept alive until all onHeaderReady/onReady/onError callbacks are triggered, even if the widget doesn't have any outside references.
| src | video source to load (e.g. filename) |
|
virtual |
This is called after the parent has changed.
This function is meant for overriding. By default the implementation is empty.
| oldParent | The previous parent. |
Reimplemented from MultiWidgets::Widget.
| void MultiWidgets::VideoWidget::pause | ( | ) |
Pause video playback.
| float MultiWidgets::VideoWidget::position | ( | ) | const |
Get current playback position.
| bool MultiWidgets::VideoWidget::preloadEnabled | ( | ) | const |
Should we start the decoded immediately or wait for explicit play/pause commands.
| const QString & MultiWidgets::VideoWidget::previewImage | ( | ) | const |
Video preview image.
This attribute can be used to specify a preview image manually instead of generating it by decoding a video frame. If set, this manual preview will override the automatic preview defined by "preview-pos".
| bool MultiWidgets::VideoWidget::previewOnPause | ( | ) | const |
Control whether a preview image should be displayed when the video is paused.
| bool MultiWidgets::VideoWidget::previewOnStop | ( | ) | const |
Control whether a preview image should be displayed when the video is stopped.
| float MultiWidgets::VideoWidget::previewPos | ( | bool * | inSeconds = nullptr | ) | const |
Determines the playback position from where to generate the preview image.
If the video is paused or stopped the VideoWidget can display a preview frame decoded somewhere from the video. This attribute controls from what position that preview is generated from. The value unit can be given in seconds or as a percentage.
| inSeconds | Returns whether the unit of the value is in seconds. If false the value is relative to the length of the video. |
| float MultiWidgets::VideoWidget::relativePosition | ( | ) | const |
Get relative video playback position, i.e.
|
virtual |
Render the content of the Widget.
This function is called from the main render function. Does nothing by default.
Overriding: Usually custom rendering of the widget should go here. This is empty by default so there is no need to call the implementation of the base class.
| r | Render context of the rendering thread |
Reimplemented from MultiWidgets::Widget.
| void MultiWidgets::VideoWidget::resizeToFit | ( | Nimble::SizeF | size | ) |
Resizes the video to fit the given size while maintaining aspect ratio.
| size | size to fit to |
| bool MultiWidgets::VideoWidget::sampleShading | ( | ) | const |
Use multisampling in video rendering.
Video looks better when it's scaled or rotated when sample shading is enabled. This is not supported in OS X Mountain Lion.
|
inline |
Seek the video to given position.
| seconds | playback position in seconds to seek to |
|
inline |
Seek the video to given position.
| pos | relative playback position from zero to one |
| void MultiWidgets::VideoWidget::setAudioBufferSeconds | ( | float | seconds | ) |
Setter for attribute audio-buffer-length.
| seconds | new attribute value |
| void MultiWidgets::VideoWidget::setAudioEnabled | ( | bool | enabled | ) |
| void MultiWidgets::VideoWidget::setAudioFilters | ( | const QString & | filters | ) |
| void MultiWidgets::VideoWidget::setAudioGain | ( | float | gain | ) |
| void MultiWidgets::VideoWidget::setAudioOptions | ( | const QMap< QString, QString > & | options | ) |
| void MultiWidgets::VideoWidget::setAudioStreamIndex | ( | int | index | ) |
Setter for attribute audio-stream-index.
| index | new attribute value |
| void MultiWidgets::VideoWidget::setAutoStart | ( | bool | enabled | ) |
| void MultiWidgets::VideoWidget::setAutoStartOnVisualFocus | ( | bool | autostart | ) |
Setter for attribute auto-start-on-visual-focus.
| autostart | new attribute value |
| void MultiWidgets::VideoWidget::setChannelLayout | ( | const QString & | channelLayout | ) |
Setter for attribute channel-layout.
| channelLayout | new attribute value |
| void MultiWidgets::VideoWidget::setContrast | ( | float | contrast | ) |
| void MultiWidgets::VideoWidget::setDemuxerOptions | ( | const QMap< QString, QString > & | options | ) |
| void MultiWidgets::VideoWidget::setFormat | ( | const QString & | format | ) |
| void MultiWidgets::VideoWidget::setInitialPosition | ( | float | value, |
| bool | inSeconds = true |
||
| ) |
| value | Initial playback position (in seconds if the latter parameter is true) |
| inSeconds | True if the unit of the value is in seconds, false if it's relative |
| void MultiWidgets::VideoWidget::setLooping | ( | bool | l | ) |
| void MultiWidgets::VideoWidget::setPreload | ( | bool | enabled | ) |
| void MultiWidgets::VideoWidget::setPreviewImage | ( | const QString & | filename | ) |
Setter for attribute preview-image.
| filename | new attribute value |
| void MultiWidgets::VideoWidget::setPreviewOnPause | ( | bool | previewEnabled | ) |
Setter for attribute preview-on-pause.
| previewEnabled | new attribute value |
| void MultiWidgets::VideoWidget::setPreviewOnStop | ( | bool | previewEnabled | ) |
Setter for attribute preview-on-stop.
| previewEnabled | new attribute value |
| void MultiWidgets::VideoWidget::setPreviewPos | ( | float | value, |
| bool | inSeconds = true |
||
| ) |
| value | Preview frame playback position (in seconds if the latter parameter is true) |
| inSeconds | True if the unit of the value is in seconds, false if it's relative |
|
inline |
This is shortcut for "setPreviewPos"(relative, false)
| relative | Relative position for the preview image |
| void MultiWidgets::VideoWidget::setSampleShading | ( | bool | sampleShadingEnabled | ) |
Setter for attribute sample-shading.
| sampleShadingEnabled | new attribute value |
| void MultiWidgets::VideoWidget::setSingleTapControlsPlayback | ( | bool | s | ) |
Setter for attribute single-tap-toggles-playback.
| s | new attribute value |
| void MultiWidgets::VideoWidget::setSource | ( | const QString & | src | ) |
| void MultiWidgets::VideoWidget::setStreamingMode | ( | bool | s | ) |
| void MultiWidgets::VideoWidget::setUseSharedDecoder | ( | bool | v | ) |
Setter for attribute use-shared-decoder.
| v | new attribute value |
| void MultiWidgets::VideoWidget::setVideoBufferFrames | ( | int | frames | ) |
Setter for attribute video-buffer-frames.
| frames | new attribute value |
| void MultiWidgets::VideoWidget::setVideoDecodingThreads | ( | int | threads | ) |
Setter for attribute video-decoding-threads.
| threads | new attribute value |
| void MultiWidgets::VideoWidget::setVideoEnabled | ( | bool | enabled | ) |
| void MultiWidgets::VideoWidget::setVideoFilters | ( | const QString & | filters | ) |
| void MultiWidgets::VideoWidget::setVideoOptions | ( | const QMap< QString, QString > & | options | ) |
| void MultiWidgets::VideoWidget::setVideoStreamIndex | ( | int | index | ) |
Setter for attribute video-stream-index.
| index | new attribute value |
|
virtual |
This virtual function is called when widget receives a single-tap event.
Is meant to be overriden: the default implementation does nothing.
| gm | GrabManager used in input handling. |
| objs | Tracked objects that caused the tap gesture. |
Reimplemented from MultiWidgets::Widget.
| bool MultiWidgets::VideoWidget::singleTapControlsPlayback | ( | ) | const |
This controls whether the single-tap gesture toggles playback.
| const QString& MultiWidgets::VideoWidget::source | ( | ) | const |
Source for the video (eg.
filename or source of stream). See VideoDisplay::AVDecoder::Options::source for further documentation and examples.
| void MultiWidgets::VideoWidget::stop | ( | ) |
Stop video playback.
Difference between pause and stop is that stop will release the video decoder object and it will need to be reallocated when playback resumes.
| bool MultiWidgets::VideoWidget::streamingMode | ( | ) | const |
Enables streaming mode.
When enabled the newest frame decoded by VideoDisplay::AVDecoder will always be shown. Is used for example when streaming live video feed.
|
virtual |
Update widget state.
This function is called by the application during its update step. This function may be called several times per rendered frame. This function is always called after input() and before render(). If you need to know if this call is the last update for this rendered frame, use the FrameInfo::isLastUpdate(). The default implementation is empty.
| frameInfo | Frame information since last update call |
Reimplemented from MultiWidgets::Widget.
| bool MultiWidgets::VideoWidget::useSharedDecoder | ( | ) | const |
Share the decoder instance with other VideoWidgets using exactly the same set of options.
Some sources, like V4L2 devices, might require exclusive access. Opening multiple VideoWidgets to those sources require this to be true.
| int MultiWidgets::VideoWidget::videoBufferFrames | ( | ) | const |
Preferred video buffer size for decoding in frames.
Corresponds to VideoDisplay::AVDecoder::Options::videoBufferFrames
| int MultiWidgets::VideoWidget::videoDecodingThreads | ( | ) | const |
Number of video decoding threads. Corresponds to VideoDisplay::AVDecoder::Options::videoDecodingThreads.
| bool MultiWidgets::VideoWidget::videoEnabled | ( | ) | const |
Enables/disables video.
Corresponds to VideoDisplay::AVDecoder::Options::isVideoEnabled
| const QString & MultiWidgets::VideoWidget::videoFilters | ( | ) | const |
Video filtering options.
Corresponds to VideoDisplay::AVDecoder::Options::videoFilters.
| QMap< QString, QString > MultiWidgets::VideoWidget::videoOptions | ( | ) | const |
Video options of stream.
Corresponds to VideoDisplay::AVDecoder::Options::videoOptions
| int MultiWidgets::VideoWidget::videoStreamIndex | ( | ) | const |
Selects video stream from multiple streams.
Corresponds to VideoDisplay::AVDecoder::Options::videoStreamIndex
|
virtual |
React to changes in visual focus.
Can be enabled by setting the attribute "auto-start-on-visual-focus". If enabled starts playing video when received focus and stops it when didn't receive focus.
| gotFocus | If true, the video received focus |
Reimplemented from MultiWidgets::Widget.