MyGUI::ControllerPosition Class Reference

`#include <MyGUI_ControllerPosition.h>`

Inheritance diagram for MyGUI::ControllerPosition:
[legend]

## Public Types

typedef RTTIBase | Base
typedef ControllerPosition | RTTIBase
using | FrameAction = delegates::Delegate<const IntCoord&, const IntCoord&, IntCoord&, float>
Public Types inherited from MyGUI::ControllerItem
typedef RTTIBase | Base
typedef ControllerItem | RTTIBase
Public Types inherited from MyGUI::IObject
typedef IObject | RTTIBase

## Public Member Functions

virtual std::string_view | getTypeName () const override
virtual bool | isType (const std::type_info &_type) const override
template<typename Type>
bool | isType () const
| ControllerPosition ()
void | setCoord (const IntCoord &_destCoord)
void | setSize (const IntSize &_destSize)
void | setPosition (const IntPoint &_destPoint)
void | setFunction (std::string_view _value)
void | setTime (float _value)
void | setAction (FrameAction::IDelegate *_value)
bool | addTime (Widget *_widget, float _time) override
void | prepareItem (Widget *_widget) override
void | setProperty (std::string_view _key, std::string_view _value) override
Public Member Functions inherited from MyGUI::ControllerItem
template<typename Type>
bool | isType () const
Public Member Functions inherited from MyGUI::IObject
template<typename Type>
bool | isType () const
template<typename Type>
Type * | castType (bool _throw=true)
template<typename Type>
const Type * | castType (bool _throw=true) const
virtual | ~IObject ()=default

## Static Public Member Functions

static std::string_view | getClassTypeName ()
Static Public Member Functions inherited from MyGUI::ControllerItem
static std::string_view | getClassTypeName ()
Static Public Member Functions inherited from MyGUI::IObject
static std::string_view | getClassTypeName ()

## Additional Inherited Members

Data Fields inherited from MyGUI::ControllerItem
EventPairAddParameter< EventHandle_WidgetPtr, EventHandle_WidgetPtrControllerItemPtr > | eventPreAction
EventPairAddParameter< EventHandle_WidgetPtr, EventHandle_WidgetPtrControllerItemPtr > | eventUpdateAction
EventPairAddParameter< EventHandle_WidgetPtr, EventHandle_WidgetPtrControllerItemPtr > | eventPostAction

## Detailed Description

This controller used for smooth changing position of widget in time

Definition at line 20 of file MyGUI_ControllerPosition.h.

## Member Typedef Documentation

## Base

typedef RTTIBase MyGUI::ControllerPosition::Base

Definition at line 22 of file MyGUI_ControllerPosition.h.

## FrameAction

using MyGUI::ControllerPosition::FrameAction = delegates::Delegate<const IntCoord&, const IntCoord&, IntCoord&, float>

Definition at line 25 of file MyGUI_ControllerPosition.h.

## RTTIBase

typedef ControllerPosition MyGUI::ControllerPosition::RTTIBase

Definition at line 22 of file MyGUI_ControllerPosition.h.

## Constructor & Destructor Documentation

## ControllerPosition()

MyGUI::ControllerPosition::ControllerPosition | ( |  | ) |

Definition at line 18 of file MyGUI_ControllerPosition.cpp.

## Member Function Documentation

## addTime()

bool MyGUI::ControllerPosition::addTime | ( | Widget * | _widget,
|  | float | _time )

override virtual

Implements MyGUI::ControllerItem.

Definition at line 56 of file MyGUI_ControllerPosition.cpp.

## getClassTypeName()

std::string_view MyGUI::ControllerPosition::getClassTypeName | ( |  | ) |

inline static

Definition at line 22 of file MyGUI_ControllerPosition.h.

## getTypeName()

virtual std::string_view MyGUI::ControllerPosition::getTypeName | ( |  | ) | const

inline override virtual

Get type name as string

Reimplemented from MyGUI::ControllerItem.

Definition at line 22 of file MyGUI_ControllerPosition.h.

## isType() [1/2]

template<typename Type>

bool MyGUI::ControllerPosition::isType | ( |  | ) | const

inline

Compare with selected type

Definition at line 22 of file MyGUI_ControllerPosition.h.

## isType() [2/2]

virtual bool MyGUI::ControllerPosition::isType | ( | const std::type_info & | _type | ) | const

inline override virtual

Compare with selected type

Reimplemented from MyGUI::ControllerItem.

Definition at line 22 of file MyGUI_ControllerPosition.h.

## prepareItem()

void MyGUI::ControllerPosition::prepareItem | ( | Widget * | _widget | ) |

override virtual

Implements MyGUI::ControllerItem.

Definition at line 46 of file MyGUI_ControllerPosition.cpp.

## setAction()

void MyGUI::ControllerPosition::setAction | ( | FrameAction::IDelegate * | _value | ) |

Parameters

  _value | Delegate applied to widget every frame (see ControllerPosition::eventFrameAction)

Definition at line 135 of file MyGUI_ControllerPosition.cpp.

## setCoord()

void MyGUI::ControllerPosition::setCoord | ( | const IntCoord & | _destCoord | ) |

Definition at line 23 of file MyGUI_ControllerPosition.cpp.

## setFunction()

void MyGUI::ControllerPosition::setFunction | ( | std::string_view | _value | ) |

Set acceleration behavior, same as calling controller->setAction(MyGUI::newDelegate(chosen by value))

Parameters

  _value | could be one of "Linear" (default)

See also
  action::linearMoveFunction "Inertional"
  action::inertionalMoveFunction "Accelerated"
  action::acceleratedMoveFunction<30> "Slowed"
  action::acceleratedMoveFunction<4> "Jump"
  action::jumpMoveFunction<5>

Definition at line 116 of file MyGUI_ControllerPosition.cpp.

## setPosition()

void MyGUI::ControllerPosition::setPosition | ( | const IntPoint & | _destPoint | ) |

Definition at line 38 of file MyGUI_ControllerPosition.cpp.

## setProperty()

void MyGUI::ControllerPosition::setProperty | ( | std::string_view | _key,
|  | std::string_view | _value )

override virtual

Reimplemented from MyGUI::ControllerItem.

Definition at line 102 of file MyGUI_ControllerPosition.cpp.

## setSize()

void MyGUI::ControllerPosition::setSize | ( | const IntSize & | _destSize | ) |

Definition at line 30 of file MyGUI_ControllerPosition.cpp.

## setTime()

void MyGUI::ControllerPosition::setTime | ( | float | _value | ) |

Parameters

  _value | seconds in which widget planned to reach destination coordinate

Definition at line 130 of file MyGUI_ControllerPosition.cpp.

The documentation for this class was generated from the following files:

- MyGUI_ControllerPosition.h
- MyGUI_ControllerPosition.cpp