GH_Stack

References
public class GH_Stack
Represents a manager for animating asynchronous box movements. This is a useful feature for GUIs that want to mimic physical behaviour or continuous UI changes.
Remarks: This class is ABSOLUTELY NOT Thread-safe.

Constructors

GH_Stack

#
public GH_Stack()

GH_Stack

#
public GH_Stack(
update_interval,
animation_length,
GH_Interpolation
animation_interpolation
)

GH_Stack

#
public GH_Stack(
update_interval,
animation_length
)

GH_Stack

#
public GH_Stack(
update_interval
)

Properties

Count

#
Gets the number of items in the stack.
public int Count { get; }

Duration

#
Gets or sets the duration (in milliseconds) of individual frame animations. This change is only applied to new animations. Existing animations will keep the duration set at construction.
public int Duration { get; set; }

Element_Final

#
Gets or sets the target dimenions of the stack element at the given index. If you overwrite the existing value with a different value, a new animation will be initiated for this stack element. If you wish to retrieve the current (based on system time) stack element dimensions, you should use the Intermediate readonly property.
public Rectangle Element_Final[int index] { get; }
index (int)Index of stack element.
IndexOutOfRangeExceptionThrown if index does not represent a valid index in the stack.

Element_Initial

#
Gets the starting dimensions of the stack element at the given index.
public Rectangle Element_Initial[int index] { get; }
index (int)Index of stack element.
IndexOutOfRangeExceptionThrown if index does not represent a valid index in the stack.

Element_Intermediate

#
Gets the intermediate dimensions for the specified physical stack element as determined by the current system time.
public Rectangle Element_Intermediate[int index] { get; }
index (int)Index of stack element.

InMotion

#
Gets a value that indicates whether or not any element in this stack is currently in motion.
public bool InMotion { get; }
True if the stack is still (partly) in motion.

InMotion

#
Gets a value that indicates whether or not the element at the given index is currently in motion.
public bool InMotion[int index] { get; }
index (int)Index of element.
True if the element hasn't yet reached its final location.

Interpolation

#
Gets or sets the interpolation mode for stack animations. Cubic results in a more natural motion. Although you can change the interpolation during animation, it might result in a discontinuous motion. You should set the desired interpolation algorithm during or directly after construction of this stack.
public GH_Interpolation Interpolation { get; set; }

UpdateInterval

#
Gets or sets the interval (in milliseconds) for update events.
public int UpdateInterval { get; set; }
The number of milliseconds between update intervals.
InvalidConstraintExceptionThrown when the interval is set to less than 5 milliseconds.

Methods

AddElement

#
Add a new animated element to the stack.
public void AddElement(
Rectangle
rec_0,
Initial dimensions of element.
Rectangle
rec_1,
Final dimensions of element.
duration_override
Duration of animation in milliseconds.
)

AddElement

#
Add a new animated element to the stack.
public void AddElement(
Rectangle
rec_0,
Initial dimensions of element.
Rectangle
rec_1
Final dimensions of element.
)

AddElement

#
Add a new static element to the stack.
public void AddElement(
Rectangle
rec
Dimensions of new element.
)

Clear

#
Remove all boxes, timestamps and animators.
public void Clear()

Destroy

#
Call this function when you are certain you will no longer need the stack. It will disable any current update events and clear animation instances.
public void Destroy()

Finalize

#
protected override void Finalize()
Object.Finalize

InsertElement

#
Add a new animated element to the stack.
public void InsertElement(
index,
Insertion index.
Rectangle
rec_0,
Initial dimensions of element.
Rectangle
rec_1,
Final dimensions of element.
duration_override
Duration of animation in milliseconds.
)

InsertElement

#
Add a new animated element to the stack.
public void InsertElement(
index,
Insertion index.
Rectangle
rec_0,
Initial dimensions of element.
Rectangle
rec_1
Final dimensions of element.
)

InsertElement

#
Add a new static element to the stack.
public void InsertElement(
index,
Insertion index.
Rectangle
rec
Dimensions of new element.
)

RemoveElement

#
Remove the stack element at the specified index.
public void RemoveElement(
index
Index of element to remove.
)

ResizeContainer

#
Call this function to override the width or height of all elements without interfering with the animation.
public void ResizeContainer(
Rectangle
region,
New region.
fit_horizontal,
If True, all the elements will be fit to the region horizontally.
fit_vertical
If True, all the elements will be fit to the region vertically.
)

SetNewTarget

#
Set new target dimenions for the given object.
public void SetNewTarget(
index,
Index of element to set.
Rectangle
element,
New dimensions.
bAnimate
True if the change should animated.
)

SetNewTarget

#
Set new target dimenions for the given object.
public void SetNewTarget(
index,
Index of element to set.
Rectangle
element
New dimenions.
)

SetOwner

#
public void SetOwner(
Control
ui_thread_owner,
ui_thread_update,
ui_thread_complete
)

SetOwner

#
public void SetOwner(
Control
ui_thread_owner,
ui_thread_update
)