5 #ifndef CNOID_BASE_POSITION_DRAGGER_H
6 #define CNOID_BASE_POSITION_DRAGGER_H
9 #include "exportdecl.h"
17 TX = 1 << 0, TY = 1 << 1, TZ = 1 << 2,
18 TranslationAxes = (TX | TY | TZ),
19 RX = 1 << 3, RY = 1 << 4, RZ = 1 << 5,
20 RotationAxes = (RX | RY | RZ),
21 AllAxes = (TX | TY | TZ | RX | RY | RZ),
24 TRANSLATION_AXES = TranslationAxes,
25 ROTATION_AXES = RotationAxes,
30 PositiveOnlyHandle = 0,
33 StandardHandle = PositiveOnlyHandle,
42 void setDraggableAxes(
int axisBitSet,
SgUpdateRef update);
43 int draggableAxes()
const;
44 SignalProxy<void(
int axisBitSet)> sigDraggableAxesChanged();
46 double handleSize()
const;
47 void setHandleSize(
double s);
48 void setHandleWidthRatio(
double w);
50 double rotationHandleSizeRatio()
const;
51 void setRotationHandleSizeRatio(
double r);
53 [[deprecated(
"Use setHandleSize and setRotationHandlerSizeRatio")]]
54 void setRadius(
double r,
double translationAxisRatio = 2.0f);
55 [[deprecated(
"Use handleSize")]]
56 double radius()
const;
61 void setPixelSize(
int length,
int width);
70 bool isScreenFixedSizeMode()
const;
73 [[deprecated(
"Use setPixelSize")]]
74 void setFixedPixelSizeMode(
bool on,
double pixelSizeRatio = 1.0);
77 [[deprecated(
"Use isScreenFixedSizeMode")]]
78 bool isFixedPixelSizeMode()
const;
80 void setTransparency(
float t);
81 float transparency()
const;
83 void setOverlayMode(
bool on);
84 bool isOverlayMode()
const;
86 bool isContainerMode()
const;
87 void setContainerMode(
bool on);
89 void setContentsDragEnabled(
bool on);
90 bool isContentsDragEnabled()
const;
92 enum DisplayMode { DisplayAlways, DisplayInEditMode, DisplayInFocus, DisplayNever };
93 DisplayMode displayMode()
const;
94 void setDisplayMode(DisplayMode mode,
SgUpdateRef update =
nullptr);
97 [[deprecated(
"This function does nothing.")]]
98 void setUndoEnabled(
bool on);
100 [[deprecated(
"This function always returns false.")]]
101 bool isUndoEnabled()
const;
103 [[deprecated(
"This function does nothing.")]]
104 void storeCurrentPositionToHistory();
106 bool isDragEnabled()
const;
107 void setDragEnabled(
bool on);
108 bool isDragging()
const;
111 [[deprecated(
"Use globalDraggingPosition to get the global coordinate, or "
112 "draggingPosition to get the local position in the parent node coordinate.")]]
116 Isometry3 globalDraggingPosition()
const;
130 [[deprecated(
"Use setDisplayMode.")]]
131 void setDraggerAlwaysShown(
bool on,
SgUpdateRef update);
133 [[deprecated(
"Use displayMode.")]]
134 bool isDraggerAlwaysShown()
const;
136 [[deprecated(
"Use setDisplayMode.")]]
137 void setDraggerAlwaysHidden(
bool on,
SgUpdateRef update);
139 [[deprecated(
"Use displayMode.")]]
140 bool isDraggerAlwaysHidden()
const;