Scrolling


As the module description say: this class provide a good way to control scrolling events.



Class Details



Variables (Members):


Name

Type

Default Value

Description

percent

Integer

0

Percent of the position of the scroll

maximum

Integer

0

Height of the body that define the maximum scrolling


Functions:


Name

Arguments

Return

Description

AddCallback

  • Function: Func  - Callback function to add.

None

Add a callback function to the callbackList.


The Callback function will received as arguments a class with:

  • String: scrollWay - Inform the direction of the scrolling. Can be "up" and "Down".
  • Float: percent - send the actual percent of the scrolling.
  • Integer: scrollPos - send the page position in px

ScrollTo

  • Integer: pos  - Define the position on the window you want to go.

None

Move the page with an EaseInOut animation to the designated position.

Reset

  • None

None

Will reset all data if there is re-dimension and/or if a moving is not coming from the class


Private Details



All private details are usable but its recommended to not use any of those. It might modify the proper functioning of the class.


Variables (Members):


Name

Type

Default Value

Description

callbackList

  • Function
  • None

Define a list of called back function that are called when the user scroll.

Functions:


Name

Arguments

Return

Description

Init

  • None

None

Setup the scrolling class by Initiating the main event which is basically a scrolling event on windows.


The callback of this event will modify all data and information of the class and also it will call the callback functions of the callbackList.

UpdateMaximum

  • None

None

Update the maximum value called by the Reset function.

callbackFunctions

  • String: direction - Define which way the scrolling was. Can be "up" or "Down"

None

Call all the callback function from the callbackList. This function is called the event function initialized in the Init function.

Scrolling (Animation Function)

  • Integer: Percent - Advancement of the animation
  • Integer: X - X based on the advancement
  • Class: data - Data that the function need

None

Move the page.



Compatibility



LANGUAGE CLASS:  Not compatible.

Created with the Personal Edition of HelpNDoc: Qt Help documentation made easy