Migration from 2.5 to 2.6
Scroll-Event
The different slots for scroll-events (DoScrollUp, DoScrollDown, DoScrollLeft, DoScrollRight) have been generalized to DoScroll with two new parameters for the scrolling delta and if modifiers have been used.
When using these slots in the application they should be altered to
virtual eC_Bool DoScroll(
const eC_Value& vAbsX,
const eC_Value& vAbsY,
const eC_Value& vDelta,
const eC_Bool& bModifierActive);
- DoScrollDown matches a call to DoScroll with positive vDelta and bModifierActive set to false
- DoScrollUp matches a call to DoScroll with negative vDelta and bModifierActive set to false
- DoScrollRight matches a call to DoScroll with positive vDelta and bModifierActive set to true
- DoScrollLeft matches a call to DoScroll with negative vDelta and bModifierActive set to true
Custom Extensions
CustomExtensions are now loaded as plugins (.dll, .so) into the editor. These are created seperately when building the application for Windows or Linux. Each CustomExtension will have its own plugin file. When building the application for the target platform no changes have been made. There have been some structural changes, but when using CMake to create a project-workspace there should not a problem.
The file CustomExtensionFuncs.cpp formerly located in Source/CustomExtension has been removed. When you want to have enumerations/repetitions used by your CustomExtensions displayed in the GSE, please put the appropriate definitions into the files of the CustomExtension which uses them.
Example for enumeration:
#include "CustomExtensionFactory.h"
#include "CustomExtensionFuncs.h"
extern "C" LINKAGE void GetCustomEnumMappings(EnumMapping** ppEnumMappings, size_t* pCount)
{
EnumMapping* map = new EnumMapping[2];
map[0] = EnumMapping("DragAction", ExampleBehaviour::DA_MOVE, "DA_MOVE");
map[1] = EnumMapping("DragAction", ExampleBehaviour::DA_SIZE, "DA_SIZE");
*ppEnumMappings = map;
*pCount = 2;
}
Example for repetition:
#include "CustomExtensionFactory.h"
#include "CustomExtensionFuncs.h"
extern "C" LINKAGE void GetCustomRepetitions(AttributeRepetitionDescriptor** ppRepetitions, size_t* pCount)
{
AttributeRepetitionDescriptor* desc = new AttributeRepetitionDescriptor[2];
*ppRepetitions = desc;
*pCount = 2;
}
@ AT_COLOR
Colors in hex notation.
Definition: GUICommonEnums.h:159
All Custom Extensions have been moved into the folders Source/CustomExtension and Include/CustomExtension.
CGUIRangeSlider
The function SetMargin() have been changed to SetBackgroundMargin() as it now uses the margin value depending on its orientation. Replace it where used.
void SetMargin(const eC_Value& vMarginX, const eC_Value& vMarginY);
void SetBackgroundMargin(const eC_Value& vBackgroundMargin);
Migration from 2.4 to 2.5
- Use of graphics-wrapper methods:
Only methods with the CGUIRect parameter can be called. Please change the calls to methods using single x- and y-coordinates to use a CGUIRect(x1, y1, x2, y2) instead.
This applies to
Example:
GETGFX.Line(eC_FromInt(12), eC_FromInt(12), eC_FromInt(100), eC_FromInt(50));
should be replaced by
GETGFX.Line(
CGUIRect(eC_FromInt(12), eC_FromInt(12), eC_FromInt(100), eC_FromInt(50)));
Helper class to supply a platform independent rectangle implementation.
Definition: GUIRect.h:63