#include <customgui_unitscale.h>
Unit scale custom data type (CUSTOMDATATYPE_UNITSCALE) for UnitScaleCustomGui.
- Note
- Has to be created with Alloc() and destroyed with Free(). Use AutoAlloc to automate the allocation and destruction based on scope.
◆ UnitScaleData()
◆ ~UnitScaleData()
◆ Alloc()
Allocates a unit scale data. Destroy the allocated unit scale data with Free(). Use AutoAlloc to automate the allocation and destruction based on scope.
- Returns
- The allocated unit scale data, or nullptr if the allocation failed.
◆ Free()
Destructs unit scale data allocated with Alloc(). Use AutoAlloc to automate the allocation and destruction based on scope.
- Parameters
-
[in,out] | data | The unit scale data to destruct. If the pointer is nullptr nothing happens. The pointer is assigned nullptr afterwards. |
◆ SetUnitScale()
Sets the values for the unit scale data.
- Parameters
-
[in] | scale | The unit scale. |
[in] | unit | The unit. |
- Returns
- true if successful, otherwise false.
◆ GetUnitScale()
Gets the values of the unit scale data.
- Parameters
-
[out] | scale | Assigned the unit scale. |
[out] | unit | Assigned the unit. |
- Returns
- true if successful, otherwise false.
◆ operator==()
Equality operator. Checks if the unit scale data are equal.
- Parameters
-
- Returns
- true if the unit scale data are equal, otherwise false.
◆ operator!=()
Inequality operator. Checks if the unit scale data are different.
- Parameters
-
- Returns
- true if the unit scale data are different, otherwise false.