ACF $AcfVersion:0$
ISceneController.h
Go to the documentation of this file.
1// SPDX-License-Identifier: LGPL-2.1-or-later OR GPL-2.0-or-later OR GPL-3.0-or-later OR LicenseRef-ACF-Commercial
2#pragma once
3
4
5#include <istd/IPolymorphic.h>
6
7#include <i2d/i2d.h>
8
9
10namespace i2d
11{
12
13
18{
19public:
21 {
25 SR_NONE = 0x0,
26
30 SR_ROTATE = 0x1,
31
35 SR_SHIFT = 0x2,
36
40 SR_SCALE = 0x4,
41
45 SR_ALL = 0xff
46 };
47
69
108
112 virtual int GetSceneRestrictionFlags() const = 0;
113
117 virtual FitMode GetFitMode() const = 0;
123 virtual bool SetFitMode(FitMode fitMode) = 0;
124
129 virtual bool IsFullScreenMode() const = 0;
136 virtual bool SetFullScreenMode(bool isFullScreen) = 0;
137
141 virtual double GetScale() const = 0;
146 virtual bool SetScale(int scaleMode = SM_SET, double value = 1.0) = 0;
147};
148
149
150} // namespace i2d
151
152
153
154
Interface for scene manipulation and query the restrictions.
ScaleMode
Describe mode for setting of scale value.
@ SM_RESET
Zoom will be reset, parameter value will be ignored.
@ SM_ZOOM_OUT
Zoom out will be done, parameter value will be ignored.
@ SM_SET
Simple set, old scale will be replaced with the new value.
@ SM_FIT_ISOTROPIC_REDUCTION
Isotropic scale will be done, but only scale reduction is allowed.
@ SM_COMBINE
Old scale will be mutliplied by the new value.
@ SM_ZOOM_IN
Zoom in will be done, parameter value will be ignored.
@ SM_FIT_ANISOTROPIC
Anisotropic scale will be done to fit whole viewport area.
@ SM_FIT_ISOTROPIC
Complete isotropic scale will be done.
virtual bool SetFitMode(FitMode fitMode)=0
Set vieport scale fitting mode.
virtual double GetScale() const =0
Get actual scale factor.
virtual bool IsFullScreenMode() const =0
Check if full screen mode is enabled.
virtual bool SetFullScreenMode(bool isFullScreen)=0
Set full screen mode on/off.
FitMode
Vieport scale fitting mode.
@ FM_ANISOTROPIC
Anisotropic scale will be done to fit whole viewport area.
@ FM_ISOTROPIC
Complete isotropic scale will be done.
@ FM_NONE
No fitting will be done.
@ FM_ISOTROPIC_REDUCTION
Isotropic scale will be done, but only scale reduction is allowed.
virtual int GetSceneRestrictionFlags() const =0
Get the restriction flags, to tell the scene manipulator, what can be changed on the scene.
virtual FitMode GetFitMode() const =0
Get vieport scale fitting mode.
@ SR_SCALE
Translation operaration is prohibited.
@ SR_ROTATE
Rotation operaration is prohibited.
@ SR_ALL
All operations on scene object are prohibited.
@ SR_NONE
All operations on scene object are allowed.
@ SR_SHIFT
Translation operaration is prohibited.
virtual bool SetScale(int scaleMode=SM_SET, double value=1.0)=0
Set or modify scale factor.
Base interface for all used interfaces and implementations.
Contains the 2D objects.
Definition CAffine2d.h:11