39#ifndef DISTI_INCLUDED_GLS_KNOB_H
40#define DISTI_INCLUDED_GLS_KNOB_H
46#if( defined( GLSGEN_EXPORT_GlsKnob ) || defined( GLSGEN_IMPORT_GlsKnob ) || defined( GLS_EXPORT_GENERATED ) || defined( GLS_IMPORT_GENERATED ) ) \
47 && defined( _MSC_VER )
48# if defined( GLSGEN_EXPORT_GlsKnob ) || defined( GLS_EXPORT_GENERATED )
49# define GLSGEN_GlsKnob_EXPORT __declspec( dllexport )
51# define GLSGEN_GlsKnob_EXPORT __declspec( dllimport )
54# define GLSGEN_GlsKnob_EXPORT
59#define LIB_BASE_NAME "gls_knob"
67 GLS_GLSKNOB_CHANGE_CALLBACK = GLS_LAST_INITIALIZER + 1,
68 GLS_GLSKNOB_ANGLERANGE,
69 GLS_GLSKNOB_CONTINUOUS,
70 GLS_GLSKNOB_POSITIONVAL,
71 GLS_GLSKNOB_DETENTPOSITIONS,
72 GLS_GLSKNOB_WHICHOBJECT,
73 GLS_GLSKNOB_STARTANGLE,
74 GLS_GLSKNOB_EMITDETENTVALEVENT,
75 GLS_GLSKNOB_EMITPOSITIONVALEVENT,
76 GLS_GLSKNOB_EMITLIMITEVENT,
77 GLS_GLSKNOB_EMITRELEASEEVENT,
78 GLS_GLSKNOB_SHOWDETENTSONLY,
79 GLS_GLSKNOB_CLICKSELECTSDETENT
86 friend class GlsKnobEditor;
87 DISTI_DEPRECATED(
"This identifier is forbidden by the C++ standard. Use BaseClass instead." )
Definition: dynamic_array.h:79
Definition: gls_glo_file.h:1241
Definition: gls_knob.h:84
GlsKnob(bool generateInstance=false)
float _mouseDownoY
Y position of the last mouse down in logical coordinates.
Definition: gls_knob.h:218
bool _emitDetentValEvent
If true, will emit an event when snapping to a detent.
Definition: gls_knob.h:98
bool _atCcwStop
If true, the knob has reached its counter clockwise most position.
Definition: gls_knob.h:224
int _numDetents
Number of detents, snap points of the knob.
Definition: gls_knob.h:92
unsigned int _currentCursor
The current cursor used for interaction. Any other cursors are ignored while interacting.
Definition: gls_knob.h:232
void ShowDetentsOnly(const bool &value)
bool _sideMode
If true, the knob is being viewed at or almost side on.
Definition: gls_knob.h:226
float CalcRotationAngle()
void SetValue(int spec, va_list &args) DISTI_METHOD_OVERRIDE
float _startAngle
An angle offset from the begining position.
Definition: gls_knob.h:97
DynamicArray< float > _detentPositions
Range 0-100.
Definition: gls_knob.h:93
void CopyProperties(DisplayObject *src) DISTI_METHOD_OVERRIDE
bool _continuous
If true, the knob can spin all the way around.
Definition: gls_knob.h:95
bool EmitPositionValEvent()
Definition: gls_knob.h:113
bool _atCwStop
If true, the knob has reached its clockwise most position.
Definition: gls_knob.h:223
void ClickSelectsDetent(const bool &value)
Definition: gls_knob.h:172
void SetAvailableAttributes(unsigned int value) DISTI_METHOD_OVERRIDE
float _mouseDownoZ
Z position of the last mouse down in logical coordinates.
Definition: gls_knob.h:219
void GetCppInterfaceDescriptionFree(InterfaceListType *array) DISTI_METHOD_OVERRIDE
GlsKnob(const GlsKnob &that, const bool generateNames)
float _mouseDownAngle
Rotation angle of the knob when the mouse was pressed.
Definition: gls_knob.h:221
int _initialDetentVal
Stores the initial detent position based on the starting rotation.
Definition: gls_knob.h:216
bool _mouseWasDown
If true, the mouse was clicked on a previous frame.
Definition: gls_knob.h:231
virtual void PositionVal(const float &value)
bool ClickSelectsDetent()
Definition: gls_knob.h:175
bool _emitPositionValEvent
If true, will emit an event when the position is changed.
Definition: gls_knob.h:99
DisplayObject * handle(DisplayEvent *ev) DISTI_METHOD_OVERRIDE
virtual void WhichObject(const int &value)
void PreDraw(const OpenGLMatrices &parentMatrices, Culler &culler) DISTI_METHOD_OVERRIDE
static DisplayObject * CreateInstance()
virtual float PositionVal()
void Draw() DISTI_METHOD_OVERRIDE
bool _clickSelectsDetent
If true, clicking on a detent will snap the knob to that detent.
Definition: gls_knob.h:210
bool _emitReleaseEvent
If true, an event will be emitted when the knob is released (mouse up).
Definition: gls_knob.h:213
virtual void DetentVal(const int &value)
Vector _mouseDownDirectionVector
Unused, kept for backward compatibility.
Definition: gls_knob.h:220
void EmitLimitEvent(const bool &value)
float _angleRange
In degrees.
Definition: gls_knob.h:91
bool ShowDetentsOnly()
Definition: gls_knob.h:168
bool _showDetentsOnly
If true, knob will only rotate to exact detents, nothing in between.
Definition: gls_knob.h:209
bool EmitDetentValEvent()
Definition: gls_knob.h:106
void EmitReleaseEvent(const bool &value)
void EmitPositionValEvent(const bool &value)
float _positionVal
Current knob position.
Definition: gls_knob.h:94
DisplayObject * CloneObject(bool generateNames=false) DISTI_METHOD_OVERRIDE
bool _emitLimitEvent
If true, an event will be emitted when the knob reaches its upper or lower limit.
Definition: gls_knob.h:212
bool EmitReleaseEvent()
Definition: gls_knob.h:127
float _mouseDownoX
X position of the last mouse down in logical coordinates.
Definition: gls_knob.h:217
bool EmitLimitEvent()
Definition: gls_knob.h:120
InterfaceListType * GetCppInterfaceDescription(InterfaceListType *addToThisList=NULL) DISTI_METHOD_OVERRIDE
virtual int WhichObject()
int _whichObject
The object index in the group to be the knob.
Definition: gls_knob.h:96
float _mouseLastAngle
The rotation angle of the knob on the previous frame.
Definition: gls_knob.h:222
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_METHOD_OVERRIDE
Macro to wrap the override keyword, removed on compilers that don't support it.
Definition: gls_cpp_lang_support.h:221
#define GLS_EXPORT
Macro denoting which functions should be visible from the runtime library.
Definition: gls_include.h:50
#define GLSGEN_GlsKnob_EXPORT
Provides support for creating DLLs.
Definition: gls_knob.h:54
The disti::Group class. Implements groups of objects.
Definition: bmpimage.h:46