Behaviour for repeating clicks on object Additional phases can be defined where the start-time of the phase is measured from the beginning of the previous phase.
More...
#include <GUIAutoRepeatBehaviour.h>
|
| CGUIAutoRepeatBehaviour () |
| Default constructor.
|
|
| CGUIAutoRepeatBehaviour (const eC_Bool &bUseLongClick, const eC_UInt &uiInitialDelay, const eC_UInt &uiInterval) |
|
void | AddAdditionalPhase (const eC_UInt &uiStartTime, const eC_UInt &uiInterval) |
|
eC_UInt | GetNumberOfAdditionalPhases () const |
|
virtual void | ReadFromStream () |
|
virtual void | WriteToStream (const eC_Bool bWriteClassID=false) |
|
virtual | ~CGUIBehaviourDecorator () |
|
virtual CGUIBehaviourDecorator * | Clone () const |
|
virtual eC_Bool | IsCompositeBehaviour () const |
|
virtual eC_Bool | DoUserEvent (CGUIEvent *const pEvent) |
|
virtual void | OnCreate () |
|
virtual void | OnDelete () |
|
virtual void | OnHide () |
|
virtual void | OnShow () |
|
virtual eC_Bool | DoDoubleClick (const eC_Value &vAbsX=eC_FromInt(-1), const eC_Value &vAbsY=eC_FromInt(-1)) |
|
virtual eC_Bool | DoDrag (const eC_Value &vDeltaX=eC_FromInt(-1), const eC_Value &vDeltaY=eC_FromInt(-1), const eC_Value &vAbsX=eC_FromInt(-1), const eC_Value &vAbsY=eC_FromInt(-1)) |
|
virtual eC_Bool | DoMouseEnter (const eC_Value &vAbsX=eC_FromInt(-1), const eC_Value &vAbsY=eC_FromInt(-1)) |
|
virtual eC_Bool | DoMouseLeave (const eC_Value &vAbsX=eC_FromInt(-1), const eC_Value &vAbsY=eC_FromInt(-1)) |
|
virtual eC_Bool | DoMouseMove (const eC_Value &vAbsX=eC_FromInt(-1), const eC_Value &vAbsY=eC_FromInt(-1)) |
|
virtual eC_Bool | FocusPrevious (CGUIObject *const pRefObj=NULL, const eC_Bool &bSubTreeOfRefObjDone=false) |
|
virtual eC_Bool | FocusNext (CGUIObject *const pRefObj=NULL, const eC_Bool &bSubTreeOfRefObjDone=false) |
|
virtual void | GetFocus () |
|
virtual void | LoseFocus () |
|
virtual eC_Bool | Decrease () |
|
virtual eC_Bool | Increase () |
|
virtual eC_Bool | DoKeyDown (const GUIKeyIdentifier_t &eKeyIdentifier, const eC_UInt &uiModifiers) |
|
virtual eC_Bool | DoKeyUp (const GUIKeyIdentifier_t &eKeyIdentifier, const eC_UInt &uiModifiers) |
|
virtual eC_Bool | DoChar (const eC_UInt &uiKey, const GUIKeyIdentifier_t &eKeyIdentifier, const eC_UInt &uiModifiers) |
|
virtual eC_Bool | DoScrollUp (const eC_Value &vAbsX, const eC_Value &vAbsY) |
|
virtual eC_Bool | DoScrollDown (const eC_Value &vAbsX, const eC_Value &vAbsY) |
|
virtual eC_Bool | DoScrollLeft (const eC_Value &vAbsX, const eC_Value &vAbsY) |
|
virtual eC_Bool | DoScrollRight (const eC_Value &vAbsX, const eC_Value &vAbsY) |
|
const eC_String & | GetXMLTag () const |
|
virtual void | ReadFromStream () |
|
void | SetXMLTag (const eC_String &kXMLTag) |
|
virtual void | WriteToStream (const eC_Bool bWriteClassID=false) |
|
virtual | ~CGUIAnimatable () |
| Destructor. Removes all existing animation callbacks.
|
|
virtual void | DoAnimate (const eC_Value &vTimes=eC_FromInt(1)) |
|
virtual eC_Bool | IsAnimating () const |
|
virtual void | StartAnimation () |
|
virtual void | StopAnimation () |
|
|
static const eC_Char | XMLTAG_BEHAVIOURCLASSID [] |
| XML tag to be used when writing a behaviour class ID into a stream.
|
|
static const eC_Char | XMLTAG_CLASSVERSION [] |
|
Behaviour for repeating clicks on object Additional phases can be defined where the start-time of the phase is measured from the beginning of the previous phase.
◆ CGUIAutoRepeatBehaviour()
CGUIAutoRepeatBehaviour::CGUIAutoRepeatBehaviour |
( |
const eC_Bool & |
bUseLongClick, |
|
|
const eC_UInt & |
uiInitialDelay, |
|
|
const eC_UInt & |
uiInterval |
|
) |
| |
Constructor
- Parameters
-
bUseLongClick | |
uiInitialDelay | |
uiInterval | |
◆ AddAdditionalPhase()
void CGUIAutoRepeatBehaviour::AddAdditionalPhase |
( |
const eC_UInt & |
uiStartTime, |
|
|
const eC_UInt & |
uiInterval |
|
) |
| |
Add an additional autorepeat-phase
- Parameters
-
uiStartTime | the start-time of the new phase calculated from the beginning of the previous phase |
uiInterval | the interval of the new phase |
◆ DoAnimate()
virtual void CGUIAutoRepeatBehaviour::DoAnimate |
( |
const eC_Value & |
vTimes = eC_FromInt(1) | ) |
|
|
protectedvirtual |
Called when the timer of an animation callback belonging to this animatable has expired.
- Parameters
-
vTimes | The factor of the registered callback time in relation to the actually elapsed time. For example, the elapsed time is 80ms, and the standard time is 50ms, then vTimes is 1.6. If the given time in GETTIMER.AddAnimationCallback is 0, It will be set to -1. |
Reimplemented from CGUIAnimatable.
◆ DoButtonDown()
virtual eC_Bool CGUIAutoRepeatBehaviour::DoButtonDown |
( |
const eC_Value & |
vAbsX, |
|
|
const eC_Value & |
vAbsY |
|
) |
| |
|
protectedvirtual |
Called when the mouse button or finger is pressed down over an object.
- Note
- DoButtonDown() should work on the absolute positions of this object, that were set at the time of the passed redraw, as the user expects to click on what he sees and not to click on the object in a newer and probably intermediate state that he currently does not see in this state. Thus, to calculate the relative position (where the object was pressed relative to the origin of this object) from the vAbsY argument you must do it like this: vMyRelYPos = vAbsY - GetAbsYPos().
- Parameters
-
vAbsX | X-position in screen coordinates where the click occurred |
vAbsY | Y-position in screen coordinates where the click occurred |
- Returns
- True The event has been handled.
False The event has not been handled. In this base implementation always returns False.
Reimplemented from CGUIBehaviour.
◆ DoButtonUp()
virtual eC_Bool CGUIAutoRepeatBehaviour::DoButtonUp |
( |
const eC_Value & |
vAbsX, |
|
|
const eC_Value & |
vAbsY |
|
) |
| |
|
protectedvirtual |
Called when the mouse button or finger is released. The object under the mouse at the time of releasing will receive this event.
- Note
- DoButtonUp() should work on the absolute positions of this object, that were set at the time of the passed redraw, as the user expects to click on what he sees and not to click on an object in a newer and probably intermediate state that he currently does not see in this state. Thus, to calculate the relative position (where the button was released relative to the origin of this object) from the vAbsY argument you must do it like this: vMyRelYPos = vAbsY - GetAbsYPos().
- Parameters
-
vAbsX | X-position in screen coordinates where the mouse was released. |
vAbsY | Y-position in screen coordinates where the mouse was released. |
- Returns
- True The event has been handled.
False The event has not been handled. In this base implementation always returns False.
Reimplemented from CGUIBehaviour.
◆ DoClick()
virtual eC_Bool CGUIAutoRepeatBehaviour::DoClick |
( |
const eC_Value & |
vAbsX, |
|
|
const eC_Value & |
vAbsY |
|
) |
| |
|
protectedvirtual |
Called when the object receives a click event. A click can e.g., be the result of a mouse click, a finger press/release sequence on touchscreens, or be triggered by a GK_ACTION keyboard event.
- Note
- DoClick() should work on the absolute positions of this object, that were set at the time of the passed redraw, as the user expects to click on what he sees and not to click on an object in a newer and probably intermediate state that he currently does not see. Thus, to calculate the relative position (where the mouse button was pressed and released at the same position for in a certain time span, relative to the origin of this object) from the vAbsY argument you must do it like this: vMyRelYPos = vAbsY - GetAbsYPos().
- Parameters
-
vAbsX | X-position in screen coordinates where the click occurred |
vAbsY | Y-position in screen coordinates where the click occurred |
- Returns
- True The event has been handled.
False The event has not been handled. In this base implementation it always returns False.
Reimplemented from CGUIBehaviour.
◆ DoDragEnd()
virtual eC_Bool CGUIAutoRepeatBehaviour::DoDragEnd |
( |
const eC_Value & |
vAbsX, |
|
|
const eC_Value & |
vAbsY |
|
) |
| |
|
protectedvirtual |
Called on the dragged object (=the object on which the initial ButtonDown-event occurred) when the mouse button is released after a drag event.
- Parameters
-
vAbsX | current X-position in screen coordinates of the mouse |
vAbsY | current Y-position in screen coordinates of the mouse |
- Returns
- True If the event has been handled.
false Else.
Reimplemented from CGUIBehaviour.
◆ DoLongClick()
virtual eC_Bool CGUIAutoRepeatBehaviour::DoLongClick |
( |
const eC_Value & |
vAbsX, |
|
|
const eC_Value & |
vAbsY |
|
) |
| |
|
protectedvirtual |
Called when an object is pressed for a longer period of time.
- See also
- CGUIEventHandler::SetLongClickTime()
- Note
- DoLongClick() should work on the absolute positions of this object, that were set at the time of the passed redraw, as the user expects to click on what he sees and not to click on an object in a newer and probably intermediate state that he currently does not see. Thus, to calculate the relative position (where the mouse button was pressed and held down at the same position for a certain amount of time, relative to the origin of this object) from the vAbsY argument you must do it like this: vMyRelYPos = vAbsY - GetAbsYPos().
- Parameters
-
vAbsX | X-position in screen coordinates where the click occurred |
vAbsY | Y-position in screen coordinates where the click occurred |
- Returns
- True The event has been handled.
False The event has not been handled. In this base implementation it always returns False.
Reimplemented from CGUIBehaviour.
◆ GetNumberOfAdditionalPhases()
eC_UInt CGUIAutoRepeatBehaviour::GetNumberOfAdditionalPhases |
( |
| ) |
const |
Get number of defined additional phases
- Returns
- number of additional phases
◆ ReadFromStream()
virtual void CGUIAutoRepeatBehaviour::ReadFromStream |
( |
| ) |
|
|
virtual |
Reads all attributes from streaming file. This method is called by CGUIFactoryManager after one of the registered factories has created an instance of this class.
Reimplemented from CGUIStreamableObject.
◆ WriteToStream()
virtual void CGUIAutoRepeatBehaviour::WriteToStream |
( |
const eC_Bool |
bWriteClassID = false | ) |
|
|
virtual |
Writes all attributes to the streaming file. A CGUIStreamWriter has to be initialized first.
- Parameters
-
bWriteClassID | This flag is used to select if writing of command class ID, leading and trailing tags is performed. |
Reimplemented from CGUIStreamableObject.
The documentation for this class was generated from the following file: