14 #ifndef __OP3D_InputSelectorBase_h__
15 #define __OP3D_InputSelectorBase_h__
44 class DM_HeldHotkeyCache;
103 {
return *myFinishedValue; }
105 {
return *myFinishedValue; }
110 { myPreferredSelectMode = selmode; }
112 {
return myPreferredSelectMode; }
118 {
return myAllowDragging; }
120 { myAllowDragging = on; }
125 {
return myAllowFinishingFlag; }
127 { myAllowFinishingFlag = allow_finishing;}
130 bool allowFinishWithExistingSelection()
const;
131 void setAllowFinishWithExistingSelection(
bool allow);
136 {
return myAllowQuickSelect; }
138 { myAllowQuickSelect = on; }
141 {
return myAllowEmptyQuickSelect; }
143 { myAllowEmptyQuickSelect = on; }
159 {
return myJustDisplayedOpFlag; }
161 { myJustDisplayedOpFlag = on; }
169 int hotkey_id)
override;
171 const char *
cursor()
const override;
179 {
return theAllowUseExistingSelection; }
181 { theAllowUseExistingSelection =
val; }
183 {
return theSelectFullLoops; }
185 { theSelectFullLoops =
val; }
193 static const SIM_Data *getSimModifierFromPath(
const char *
path);
197 static const char *getFloodFillSelectionHotkeyStringRef(
201 static const char *getLoopSelectionHotkeyStringRef(
207 static bool isTransitoryLoopSelectionHotkey(
213 static bool isTransitoryLoopSelectionHotkeyPressed(
214 DM_Viewport *viewport,
219 static void showLoopSelectionMessage(
220 DM_Workbench &workbench);
222 static void showSelectionHintsMessage(
223 DM_Workbench &workbench);
227 const char* prefix =
nullptr)
override;
243 void enableDrawableSelection(
bool select_drawables);
251 const DM_Workbench &
workbench()
const {
return *myWorkbench; }
254 { myFinishedValue = new_value; }
256 {
return myFinishedValue; }
259 { myLocatedValue = new_value; }
261 {
return myLocatedValue; }
264 { mySelectionStyle = new_value; }
266 {
return mySelectionStyle; }
269 if (mySelectionStyle)
271 (
int)*mySelectionStyle;
276 { myVisiblePickValue = new_value; }
278 {
return myVisiblePickValue; }
281 if(myVisiblePickValue)
282 return (
bool) *myVisiblePickValue;
287 { myContainedPickValue = new_value; }
289 {
return myContainedPickValue; }
292 if(myContainedPickValue)
293 return (
bool) *myContainedPickValue;
298 { mySelectionRule = new_value; }
300 {
return mySelectionRule; }
305 (
int)*mySelectionRule;
312 *mySelectionRule = (
int)srule;
321 bool isDragSelectActive()
const;
325 virtual bool needObjectPick()
const;
329 bool selectModeMatchesTemplateType();
334 bool *changed =
nullptr);
347 bool *changed =
nullptr);
350 virtual void saveForUndo();
355 virtual bool getPickName(
const OP3D_PickId &pickid,
357 bool descriptivename)
const = 0;
362 void disablePicker();
376 const char *echo_hotkey);
378 const char *echo_hotkey);
405 unsigned drawablePickMask(
unsigned pick_mask)
const;
406 bool filterDrawable(
const char* drawable_name)
const;
410 DM_Workbench *myWorkbench;
419 SI_RubberBox *myPickBox;
420 SI_Lasso *myPickLasso;
421 SI_Brush *myPickBrush;
422 SI_Brush *myPickLaser;
425 bool myAllowDragging;
426 bool myAllowFinishingFlag;
427 bool myAllowFinishWithExistingSelection;
428 bool myAllowQuickSelect;
429 bool myAllowEmptyQuickSelect;
430 bool myJustDisplayedOpFlag;
431 bool myActivePicking;
434 bool myCreatedPriorSelections;
436 static bool thePickingMenuOn;
437 static bool theAllowUseExistingSelection;
438 static bool theSelectFullLoops;
441 bool myDrawableSelectableFlag;
454 {
return mySelector != NULL; }
458 inline void intrusive_ptr_add_ref()
const { incref(); }
485 intrusive_ptr_add_ref(
const OP3D_InputSelectorBase::Proxy *proxy)
487 proxy->intrusive_ptr_add_ref();
493 proxy->intrusive_ptr_release();
typedef int(APIENTRYP RE_PFNGLXSWAPINTERVALSGIPROC)(int)
static int compare(const OP3D_PickId *id1, const OP3D_PickId *id2)
GLsizei const GLchar *const * path
std::unique_ptr< T, Deleter > UT_UniquePtr
A smart pointer for unique ownership of dynamically allocated objects.
IMATH_HOSTDEVICE constexpr int cmp(T a, T b) IMATH_NOEXCEPT
Wrapper around hboost::intrusive_ptr.
GLuint const GLchar * name
bool operator==(const OP3D_PickId &cmp) const
bool operator!=(const OP3D_PickId &cmp) const