39#ifndef DISTI_INCLUDED_GLS_SWITCH_H
40#define DISTI_INCLUDED_GLS_SWITCH_H
47#if( defined( GLSGEN_EXPORT_GlsSwitch ) || defined( GLSGEN_IMPORT_GlsSwitch ) || defined( GLS_EXPORT_GENERATED ) || defined( GLS_IMPORT_GENERATED ) ) \
48 && defined( _MSC_VER )
49# if defined( GLSGEN_EXPORT_GlsSwitch ) || defined( GLS_EXPORT_GENERATED )
50# define GLSGEN_GlsSwitch_EXPORT __declspec( dllexport )
52# define GLSGEN_GlsSwitch_EXPORT __declspec( dllimport )
55# define GLSGEN_GlsSwitch_EXPORT
60#define LIB_BASE_NAME "gls_switch"
68 GLS_GLSSWITCH_INITIAL_DETENT_VAL = GLS_LAST_INITIALIZER + 1,
69 GLS_GLSSWITCH_WHICH_OBJECT_BACKGROUND,
70 GLS_GLSSWITCH_FIRST_DETENT_SNAPBACK,
71 GLS_GLSSWITCH_LAST_DETENT_SNAPBACK,
72 GLS_GLSSWITCH_EMIT_DETENT_VAL_EVENT,
73 GLS_GLSSWITCH_EMIT_LIMIT_EVENT,
74 GLS_GLSSWITCH_EMIT_RELEASE_EVENT
85 friend class GlsSwitchEditor;
86 DISTI_DEPRECATED(
"This identifier is forbidden by the C++ standard. Use BaseClass instead." )
219 float scale = 1.0f );
Definition: dynamic_array.h:79
Definition: gls_glo_file.h:1241
Definition: gls_switch.h:79
int _detentVal
CurrentPosition.
Definition: gls_switch.h:90
bool _emitDetentValEvent
If true, events will be emitted whenever the detent value changes.
Definition: gls_switch.h:94
bool _firstDetentSnapback
If true, the position will snap from the first detent back to the second detent when released.
Definition: gls_switch.h:91
unsigned int _currentCursor
The current cursor used for interaction. Any other cursors are ignored while interacting.
Definition: gls_switch.h:207
GlsSwitch(bool generateInstance=false)
GlsSwitch(const GlsSwitch &that, const bool generateNames)
void SetValue(int spec, va_list &args) DISTI_METHOD_OVERRIDE
void CopyProperties(DisplayObject *src) DISTI_METHOD_OVERRIDE
void SetAvailableAttributes(unsigned int value) DISTI_METHOD_OVERRIDE
void GetCppInterfaceDescriptionFree(InterfaceListType *array) DISTI_METHOD_OVERRIDE
virtual void DetentVal(const int &val)
bool _mouseWasDown
Whether or not the mouse is down on this object.
Definition: gls_switch.h:206
DisplayObject * handle(DisplayEvent *ev) DISTI_METHOD_OVERRIDE
void PreDraw(const OpenGLMatrices &parentMatrices, Culler &culler) DISTI_METHOD_OVERRIDE
static DisplayObject * CreateInstance()
void Draw() DISTI_METHOD_OVERRIDE
bool IsVisibleInScene(const DisplayObject *obj=NULL) const DISTI_METHOD_OVERRIDE
bool _emitReleaseEvent
If true, an event will be emitted when the switch is released.
Definition: gls_switch.h:202
InputOrientationEnum InputType()
void EmitLimitEvent(const bool &value)
Vector _mouseDownOCoords
Stores the object coordinates of the last mouse down on this object.
Definition: gls_switch.h:204
DisplayObject * BackgroundGeometry() const
virtual void WhichObjectBackground(const int &val)
int _whichObjectBackground
the geometry index (plus 1) to serve as the switch background. 0 is no background object.
Definition: gls_switch.h:93
bool EmitDetentValEvent()
Definition: gls_switch.h:101
void EmitReleaseEvent(const bool &value)
virtual int WhichObjectBackground() const
DisplayObject * CloneObject(bool generateNames=false) DISTI_METHOD_OVERRIDE
bool _emitLimitEvent
If true, an event will be emitted when the switch hits its maximum or minimum state.
Definition: gls_switch.h:201
bool EmitReleaseEvent()
Definition: gls_switch.h:115
bool _lastDetentSnapback
If true, the position will snap from the last detent back to the second to last detent when released.
Definition: gls_switch.h:92
int CalcSwitchPosDCS(DisplayObject *self, DisplayEvent *ev, InputOrientationEnum inputType, int numPositions, float scale=1.0f)
bool EmitLimitEvent()
Definition: gls_switch.h:108
InterfaceListType * GetCppInterfaceDescription(InterfaceListType *addToThisList=NULL) DISTI_METHOD_OVERRIDE
DisplayObject * DetentGeometry(int detent) const
Class to contain current OpenGL view, projection and draw matrices.
Definition: util.h:540
Macros and helper code to determine what subset of C++11/14/17 is available.
#define DISTI_SPECIAL_MEM_FUN_DELETE
Macro to wrap function deletion, removed on compilers that don't support it.
Definition: gls_cpp_lang_support.h:245
#define DISTI_DEPRECATED(msg)
Defines whether this compiler supports the C++14 deprecated attribute.
Definition: gls_cpp_lang_support.h:487
#define DISTI_FINAL
Macro to wrap the final keyword, removed on compilers that don't support it.
Definition: gls_cpp_lang_support.h:223
#define DISTI_METHOD_OVERRIDE
Macro to wrap the override keyword, removed on compilers that don't support it.
Definition: gls_cpp_lang_support.h:221
#define GLSGEN_GlsSwitch_EXPORT
Provides support for creating DLLs.
Definition: gls_switch.h:55
GL Studio helper functions.
The disti::Group class. Implements groups of objects.
Definition: bmpimage.h:46
InputOrientationEnum
Enumeration for Input Operators.
Definition: glsutil.h:270