DgnTool.h
Go to the documentation of this file.
1 /*--------------------------------------------------------------------------------------+
2 |
3 | Supplied under applicable software license agreement.
4 |
5 | Copyright (c) 2018 Bentley Systems, Incorporated. All rights reserved.
6 |
7 +---------------------------------------------------------------------------------------*/
8 #pragma once
9 
10 #include <DgnView/IViewManager.h>
13 #include <DgnView/DgnDisplay.h>
14 
18 typedef struct mdlDesc MdlDesc;
19 
21 DGNPLATFORM_TYPEDEFS (DgnTool)
22 
24 
26  {
30  };
31 
33  {
37  OVERRIDE_COORDINATE_LOCK_Grid = (1<<2), // also overrides unit lock
39  };
40 
41 /*=================================================================================**/
62 /*=================================================================================**/
71 {
72 public:
73 /*=================================================================================**/
78  {
79  FROM_User = 0,
80  FROM_Precision = 1,
81  FROM_TentativePoint = 2,
82  FROM_ElemSnap = 3,
83  };
84 
85 protected:
90  CoordSource m_coordsFrom; // how were the coordinate values in m_point generated?
93 
94 public:
95  bool IsValid() const {return NULL != m_viewport;}
96  void Invalidate() {m_viewport = NULL;}
97 
99  void SetPoint (DPoint3dCP pt) {m_point = *pt;}
101  DPoint3dCP GetPoint() const {return &m_point;}
103  DPoint3dCP GetRawPoint() const {return &m_rawPoint;}
105  DPoint3dCP GetViewPoint() const {return &m_viewPoint;}
107  void SetViewport (IndexedViewportP viewport) { m_viewport = viewport; }
109  IndexedViewportP GetViewport() const {return m_viewport;}
111  DGNVIEW_EXPORT int GetViewNum() const;
113  CoordSource GetCoordSource() const {return m_coordsFrom;}
115  int GetButtonSource() const {return m_inputSource;}
117  DGNVIEW_EXPORT bool IsControlKey () const;
119  DGNVIEW_EXPORT bool IsShiftKey () const;
121  DGNVIEW_EXPORT bool IsAltKey () const;
123  UInt32 GetKeyModifiers () const {return m_keyModifiers;}
124 };
125 
126 //=======================================================================================
127 // @bsiclass Bentley Systems
128 //=======================================================================================
130 {
131 public:
133  {
134  TOUCHFLAGS_Move = 0x0001,
135  TOUCHFLAGS_Down = 0x0002,
136  TOUCHFLAGS_Up = 0x0004,
137  TOUCHFLAGS_InRange = 0x0008,
138  TOUCHFLAGS_Primary = 0x0010,
139  TOUCHFLAGS_NoCoalesce = 0x0020,
140  TOUCHFLAGS_Pen = 0x0040,
141  TOUCHFLAGS_Palm = 0x0080,
142  };
143 
144  //=======================================================================================
145  // Note, this structure is identical to the Windows structure TOUCHINPUT. See Windows documentation for meaning of members.
146  // @bsiclass Bentley Systems
147  //=======================================================================================
148  struct TouchInput
149  {
150  long m_x;
151  long m_y;
152  void* m_hSource;
160 
161  DGNVIEW_EXPORT DPoint3d GetViewPoint(IndexedViewportR) const;
162  bool IsUp () const {return TO_BOOL(m_dwFlags & TOUCHFLAGS_Up);}
163  bool IsDown() const {return TO_BOOL(m_dwFlags & TOUCHFLAGS_Down);}
164  bool IsMove ()const {return TO_BOOL(m_dwFlags & TOUCHFLAGS_Move);}
165  bool IsPrimary ()const {return TO_BOOL(m_dwFlags & TOUCHFLAGS_Primary);}
166  };
167 
168 protected:
170  TouchInput m_touches[5];
171 
172 public:
173 
174  size_t GetNumTouches() const {return m_numTouches;}
175  TouchInput const* GetTouches() const {return m_touches;}
176 };
177 
178 //=======================================================================================
179 // @bsiclass Bentley Systems
180 //=======================================================================================
182 {
184  {
185  GESTUREID_Begin = 1,
186  GESTUREID_End = 2,
187  GESTUREID_Zoom = 3,
188  GESTUREID_Pan = 4,
189  GESTUREID_Rotate = 5,
190  GESTUREID_TwoFingerTap = 6,
191  GESTUREID_PressAndTap = 7,
192  GESTUREID_Rollover = GESTUREID_PressAndTap,
193  };
194 
195  //=======================================================================================
196  // Note, this structure is identical to the Windows structure GESTUREINFO. See Windows documentation for meaning of members.
197  // @remark Required library : DgnView<ApiNumber>.lib i.e. DgnView2.lib
198  // @bsiclass Bentley Systems
199  //=======================================================================================
200  struct GestureInfo
201  {
212 
213  DGNVIEW_EXPORT DPoint3d GetViewPoint (IndexedViewportR) const;
214  DGNVIEW_EXPORT double GetDistance () const;
215  };
216 
217  //=======================================================================================
218  // Note, this structure is identical to the Windows structure GESTURECONFIG. See Windows documentation for meaning of members.
219  // @bsiclass Bentley Systems
220  //=======================================================================================
222  {
226  };
227 
228 protected:
230 
231 public:
232  GestureInfo const& GetInfo() const {return m_info;}
233 };
234 
235 //=======================================================================================
236 // @bsiclass Bentley Systems
237 //=======================================================================================
239 {
241  {
242  FLICKDIRECTION_Right = 0,
243  FLICKDIRECTION_UpRight = 1,
244  FLICKDIRECTION_Up = 2,
245  FLICKDIRECTION_UpLeft = 3,
246  FLICKDIRECTION_Left = 4,
247  FLICKDIRECTION_DownLeft = 5,
248  FLICKDIRECTION_Down = 6,
249  FLICKDIRECTION_DownRight = 7,
250  };
251 
252 protected:
254 
255 public:
256  FlickDirection GetFlickDirection () const {return m_direction;}
257 };
258 
259 /*=================================================================================**/
264  {
265 private:
266  long m_wheelDelta;
267 
268 public:
270  long GetWheelDelta () const {return m_wheelDelta;}
271 };
272 
273 /*=================================================================================**/
278  {
279 private:
280  UInt32 m_time;
281  DVec3d m_rotDirection;
282  double m_rotMagnitude;
283  DVec3d m_translation;
284 
285 public:
286  UInt32 GetTime() const {return m_time;}
287  DVec3dCR GetRotation() const {return m_rotDirection;}
288  double GetRotMagnitude() const {return m_rotMagnitude;}
289  DVec3dCR GetTranslation() const {return m_translation;}
290 };
291 
292 struct DgnPrimitiveTool;
293 struct DgnViewTool;
294 struct ToolAdmin;
295 struct MstnToolAdmin;
296 
297 /*=================================================================================**/
304 {
305 protected:
306  int m_toolId;
312  int m_resrved[8];
313 
314 public:
316 
317 
320 void SetToolId (int id) {m_toolId = id;}
321 
324 void SetToolPrompt (int prompt) {m_toolPrompt = prompt;}
325 
327 int GetToolId () {return m_toolId;}
328 
330 int GetToolPrompt () {return m_toolPrompt;}
331 
332 protected:
333 
335 void SetCmdName (int id, int prompt) {SetToolId (id); SetToolPrompt (prompt);}
336 
340 virtual void _GetToolName (WStringR name) {name = NULL;}
341 
344 virtual bool _PopulateToolSettings () {return false;}
345 
347 /*---------------------------------------------------------------------------------**/
353 virtual StatusInt _InstallToolImplementation () = 0;
355 
360 virtual bool _OnInstall () {return true;}
361 
362 /*---------------------------------------------------------------------------------**/
367 virtual void _OnPostInstall () {}
368 
369 /*---------------------------------------------------------------------------------**/
373 virtual void _ExitTool () = 0;
374 
375 /*---------------------------------------------------------------------------------**/
380 virtual void _OnReinitialize () {}
381 
382 /*---------------------------------------------------------------------------------**/
386 virtual void _OnCleanup () {}
387 
389 
391 
392 /*---------------------------------------------------------------------------------**/
398 virtual void _DecorateScreen (ViewportR vp) {}
400 
402 
403 /*---------------------------------------------------------------------------------**/
409 virtual bool _OnResetButton (DgnButtonEventCR ev) = 0;
410 virtual bool _OnResetButtonUp (DgnButtonEventCR ev) {return false;}
411 
412 /*---------------------------------------------------------------------------------**/
418 virtual bool _OnDataButton (DgnButtonEventCR ev) = 0;
419 virtual bool _OnDataButtonUp (DgnButtonEventCR ev) {return false;}
420 
421 /*---------------------------------------------------------------------------------**/
427 virtual bool _OnModelMotion (DgnButtonEventCR ev) {return false;}
428 
429 /*---------------------------------------------------------------------------------**/
435 virtual bool _OnModelNoMotion (DgnButtonEventCR ev) {return false;}
436 
437 /*---------------------------------------------------------------------------------**/
443 virtual bool _OnModelMotionStopped (DgnButtonEventCR ev) {return false;}
444 
445 /*---------------------------------------------------------------------------------**/
451 virtual bool _OnModelStartDrag (DgnButtonEventCR ev) {return false;}
452 
453 /*---------------------------------------------------------------------------------**/
459 virtual bool _OnModelEndDrag (DgnButtonEventCR ev) {return _OnDataButton (ev);}
461 
463 
464 /*---------------------------------------------------------------------------------**/
470 virtual bool _OnMouseWheel (DgnMouseWheelEvent const* ev) {return false;}
471 
472 /*---------------------------------------------------------------------------------**/
479 virtual bool _OnModifierKeyTransition (bool wentDown, int key) {return false;}
480 
481 /*---------------------------------------------------------------------------------**/
490 virtual bool _OnKeyTransition (bool wentDown, int key, bool shiftIsDown, bool ctrlIsDown) { return false; }
491 
492 virtual bool _On3DInputEvent (Dgn3DInputEvent const&) {return false;}
494 
496 
497 /*---------------------------------------------------------------------------------**/
502 virtual bool _DisableEditAction () {return false;}
503 
504 /*---------------------------------------------------------------------------------**/
510 virtual StatusInt _PerformEditAction (int index) {return ERROR;}
511 
514 
516 
517 virtual bool _OnPreFilterButtonEvent (ViewportP, bool& testDefault) {return false;}
518 virtual DgnDisplay::CursorP _GetCursorForInactiveView (bool& allowDynamics, ViewportP) {return NULL;}
519 virtual bool _OnTouch (DgnTouchEventCR ev) {return false;}
520 virtual bool _OnGestureNotify (IndexedViewportR, intptr_t) {return false;}
521 virtual bool _OnGesture (DgnGestureEventCR ev) {return false;}
522 virtual bool _OnFlick (DgnFlickEventCR ev) {return false;}
523 virtual long _OnTabletQuerySystemGestureStatus (DgnButtonEventCR ev) {return NULL;}
524 virtual bool CDECL_ATTRIBUTE DummyDgnTool1() {return false;}
525 virtual bool CDECL_ATTRIBUTE DummyDgnTool2() {return false;}
526 virtual bool CDECL_ATTRIBUTE DummyDgnTool3() {return false;}
527 virtual bool CDECL_ATTRIBUTE DummyDgnTool4() {return false;}
528 virtual bool CDECL_ATTRIBUTE DummyDgnTool5() {return false;}
530 
531 public:
532 
533 DGNVIEW_EXPORT DgnTool (int toolId, int toolPrompt);
534 
535 /*---------------------------------------------------------------------------------**/
541 StatusInt InstallTool () {return _InstallToolImplementation ();}
542 
543 /*---------------------------------------------------------------------------------**/
548 MdlDesc* GetMdlDesc () {return m_mdlDesc;}
549 
550 /*---------------------------------------------------------------------------------**/
555 DGNVIEW_EXPORT void GetCurrentDgnButtonEvent (DgnButtonEventR ev);
556 
557 /*---------------------------------------------------------------------------------**/
563 DGNVIEW_EXPORT void SetAdjustedDataPoint (DgnButtonEventCR ev);
564 
566 /*---------------------------------------------------------------------------------**/
571 void ResetCurrentQualifierMask (UInt32 mask) {m_currentQualifierMask = mask; m_modifierKeyWentDown = false; m_modifierKey = 0;}
572 
573 /*---------------------------------------------------------------------------------**/
578 DGNVIEW_EXPORT void GetModifierKeyTransitionState (int* modifierKeyP, bool* modifierKeyWentDownP, UInt32* currentQualifierMaskP);
579 
580 /*---------------------------------------------------------------------------------**/
585 DGNVIEW_EXPORT void SetModifierKeyTransitionState (int* modifierKeyP, bool* modifierKeyWentDownP, UInt32* currentQualifierMaskP);
587 
588 /*---------------------------------------------------------------------------------**/
593 DGNVIEW_EXPORT static DgnViewTool* GetActiveViewTool ();
594 
595 /*---------------------------------------------------------------------------------**/
602 DGNVIEW_EXPORT static DgnPrimitiveTool* GetActivePrimitiveTool ();
603 
604 }; // DgnTool
605 
606 /*=================================================================================**/
614 struct DgnViewTool : public DgnTool
615 {
616 
617 protected:
618 
620 
621 /*---------------------------------------------------------------------------------**/
628 DGNVIEW_EXPORT virtual StatusInt _InstallToolImplementation () override;
630 
631 /*---------------------------------------------------------------------------------**/
635 DGNVIEW_EXPORT virtual void _ExitTool() override;
637 
639 
640 /*---------------------------------------------------------------------------------**/
646 DGNVIEW_EXPORT virtual bool _OnResetButton (DgnButtonEventCR ev) override;
648 
649 /*---------------------------------------------------------------------------------**/
655 virtual void _OnSelectedViewChange (int oldViewIndex, int newViewIndex) {}
656 virtual bool _OnPreFilterButtonEvent (ViewportP, bool& testDefault) override {testDefault=false; return false;}
657 
658 public:
659 
660 DgnViewTool (int toolName, int toolPrompt) : DgnTool (toolName, toolPrompt) {}
661 
662 /*=================================================================================**/
667  {
668  PREFERRED_VIEW_None = (0),
669  PREFERRED_VIEW_Unparsed = (1<<0),
670  PREFERRED_VIEW_Selected = (1<<1),
671  PREFERRED_VIEW_Single = (1<<2),
672  };
673 
674 /*---------------------------------------------------------------------------------**/
687 DGNVIEW_EXPORT static IndexedViewportP GetPreferredViewport (PreferredView* sourceFoundP, WCharCP unparsedP, PreferredView sourceToSearch);
688 
689 }; // DgnViewTool
690 
691 /*=================================================================================**/
698 struct DgnPrimitiveTool : public DgnTool
699 {
700 
701 private:
702 
703 bool m_dynamicsStarted;
704 int m_resrved1[8];
705 
706 protected:
707 
709 /*---------------------------------------------------------------------------------**/
715 DGNVIEW_EXPORT virtual StatusInt _InstallToolImplementation () override;
717 
718 /*---------------------------------------------------------------------------------**/
722 DGNVIEW_EXPORT virtual void _ExitTool() override;
723 
724 /*---------------------------------------------------------------------------------**/
733 virtual void _OnReinitialize () override {if (!_CheckSingleShot ()) CallOnRestartTool ();}
734 
735 /*---------------------------------------------------------------------------------**/
745 virtual void _OnRestartTool () = 0;
746 
747 /*---------------------------------------------------------------------------------**/
752 DGNVIEW_EXPORT virtual bool _IsSingleShot ();
753 
754 /*---------------------------------------------------------------------------------**/
760 DGNVIEW_EXPORT virtual bool _CheckSingleShot (); // start default command if tool started in single shot mode...
761 
762 /*---------------------------------------------------------------------------------**/
766 virtual void _OnUndoPreviousStep () {}
767 
768 /*---------------------------------------------------------------------------------**/
772 DGNVIEW_EXPORT void EnableUndoPreviousStep ();
773 
775 
777 
778 /*---------------------------------------------------------------------------------**/
783 DGNVIEW_EXPORT bool GetDynamicsStarted ();
784 
785 /*---------------------------------------------------------------------------------**/
790 DGNVIEW_EXPORT virtual void _BeginDynamics ();
791 
792 /*---------------------------------------------------------------------------------**/
797 DGNVIEW_EXPORT virtual void _EndDynamics ();
798 
799 /*---------------------------------------------------------------------------------**/
804 virtual void _OnDynamicFrame (DgnButtonEventCR ev) {}
805 
806 /*---------------------------------------------------------------------------------**/
812 
814 
815 public:
816 
817 DGNVIEW_EXPORT DgnPrimitiveTool (int toolId, int toolPrompt);
818 
819 /*---------------------------------------------------------------------------------**/
824 DGNVIEW_EXPORT void CallOnRestartTool ();
825 
826 }; // DgnPrimitiveTool
827 
829 
FlickDirection
Definition: DgnTool.h:240
virtual void _OnUndoPreviousStep()
Called to revert to a previous tool state (ex.
Definition: DgnTool.h:766
virtual bool _OnModelStartDrag(DgnButtonEventCR ev)
Called when a drag event is initiated.
Definition: DgnTool.h:451
virtual bool _OnPreFilterButtonEvent(ViewportP, bool &testDefault) override
Definition: DgnTool.h:656
virtual bool _OnModelMotionStopped(DgnButtonEventCR ev)
Called when cursor stops moving in a view.
Definition: DgnTool.h:443
Definition: msinputq.h:329
void * m_hwndTarget
Definition: DgnTool.h:205
virtual void _OnSelectedViewChange(int oldViewIndex, int newViewIndex)
Called when active view changes.
Definition: DgnTool.h:655
short m_ptsLocationX
Definition: DgnTool.h:206
void SetPoint(DPoint3dCP pt)
Set the adjusted point location for this event (sometimes useful in DgnTools).
Definition: DgnTool.h:99
void SetToolPrompt(int prompt)
Set the prompt number for this tool.
Definition: DgnTool.h:324
UInt32 GetTime() const
Definition: DgnTool.h:286
ULong m_dwTime
Definition: DgnTool.h:156
MdlDesc * GetMdlDesc()
Call to get the MDL descriptor of the application that started this tool.
Definition: DgnTool.h:548
size_t GetNumTouches() const
Definition: DgnTool.h:174
MdlDesc * m_mdlDesc
Definition: DgnTool.h:308
Definition: Bentley.h:212
#define END_BENTLEY_DGNPLATFORM_NAMESPACE
Definition: DgnPlatformBaseType.r.h:69
bool IsDown() const
Definition: DgnTool.h:163
struct DPoint3d const * DPoint3dCP
Definition: msgeomstructs_typedefs.h:79
ULong * m_dwExtraInfo
Definition: DgnTool.h:157
virtual bool _OnResetButtonUp(DgnButtonEventCR ev)
Definition: DgnTool.h:410
CoordSource m_coordsFrom
Definition: DgnTool.h:90
#define CDECL_ATTRIBUTE
Definition: Bentley.h:68
The DgnTool class encapsulates the MDL "state" functions and helps simplify the process of writing to...
Definition: DgnTool.h:70
unsigned int UInt
Definition: Bentley.r.h:140
long GetWheelDelta() const
Get the "delta" movement of the mouse wheel (see Microsoft documentation on mouse wheel events for un...
Definition: DgnTool.h:270
int GetToolId()
Get the Id for this tool.
Definition: DgnTool.h:327
void Invalidate()
Definition: DgnTool.h:96
bool IsMove() const
Definition: DgnTool.h:164
bool IsValid() const
Definition: DgnTool.h:95
void SetCmdName(int id, int prompt)
Call to setup the current tool name and initial prompt.
Definition: DgnTool.h:335
Input event with translation and rotation data.
Definition: DgnTool.h:277
DPoint3d m_point
Definition: DgnTool.h:86
Base MicroStation Tool Class.
Definition: DgnTool.h:303
int GetButtonSource() const
Get the "input source" for this event. See Inputq_element::hdr.source (msinputq.h) ...
Definition: DgnTool.h:115
GestureInfo m_info
Definition: DgnTool.h:229
CoordSource
The "source" that generated this event.
Definition: DgnTool.h:77
void SetViewport(IndexedViewportP viewport)
Set the viewport.
Definition: DgnTool.h:107
ULong m_cxContact
Definition: DgnTool.h:158
virtual void _OverrideViewCursors(ViewportR, DgnDisplay::CursorP &active, DgnDisplay::CursorP &inactive)
Definition: DgnTool.h:512
int m_inputSource
Definition: DgnTool.h:91
Interface for an agent that can display elements.
Definition: ElementAgenda.h:443
ULong m_dwMask
Definition: DgnTool.h:155
virtual bool _OnModelNoMotion(DgnButtonEventCR ev)
Called when cursor is stationary in a view.
Definition: DgnTool.h:435
FlickDirection GetFlickDirection() const
Definition: DgnTool.h:256
UInt m_numTouches
Definition: DgnTool.h:169
struct DgnPlatform::DgnTouchEvent const & DgnTouchEventCR
Definition: DgnPlatform.h:233
int m_modifierKey
Definition: DgnTool.h:311
UInt32 GetKeyModifiers() const
Definition: DgnTool.h:123
FlickDirection m_direction
Definition: DgnTool.h:253
DPoint3d m_viewPoint
Definition: DgnTool.h:88
virtual IDrawElementAgenda * _GetDrawDynamicsTxnChanges()
Query if the tool wants to control how to draw changes made in the nested transaction during a dynami...
Definition: DgnTool.h:811
virtual bool _OnMouseWheel(DgnMouseWheelEvent const *ev)
Called when mouse wheel event is detected.
Definition: DgnTool.h:470
short m_ptsLocationY
Definition: DgnTool.h:207
wchar_t const * WCharCP
Definition: Bentley.h:224
UInt32 m_currentQualifierMask
Definition: DgnTool.h:309
virtual bool _OnModelMotion(DgnButtonEventCR ev)
Called when cursor is moving in a view.
Definition: DgnTool.h:427
struct DgnPlatform::DgnGestureEvent const & DgnGestureEventCR
Definition: DgnPlatform.h:216
StatusInt InstallTool()
Call to make this tool instance the current active command.
Definition: DgnTool.h:541
void SetToolId(int id)
Set the Id for this tool.
Definition: DgnTool.h:320
DPoint3dCP GetPoint() const
Get the location of the cursor for this event in active coordinates. The point has already been adjus...
Definition: DgnTool.h:101
uint32_t UInt32
Definition: Bentley.r.h:128
#define NULL
Definition: Bentley.h:157
virtual void _OnReinitialize() override
Call to reset tool to initial state or exit command in single shot mode.
Definition: DgnTool.h:733
DPoint3dCP GetViewPoint() const
Get the location of the cursor in view coordinates.
Definition: DgnTool.h:105
virtual void _GetToolName(WStringR name)
Called to get the current tool name.
Definition: DgnTool.h:340
TouchFlags
Definition: DgnTool.h:132
struct DgnPlatform::DgnButtonEvent const & DgnButtonEventCR
Definition: DgnPlatform.h:191
bool IsPrimary() const
Definition: DgnTool.h:165
virtual void _OnReinitialize()
Call to reset tool to initial state.
Definition: DgnTool.h:380
A sub-class of Viewport that represents one of the 8 numbered views.
Definition: IViewManager.h:185
ULong m_cyContact
Definition: DgnTool.h:159
DPoint3d m_rawPoint
Definition: DgnTool.h:87
struct DgnPlatform::IndexedViewport & IndexedViewportR
Definition: DgnPlatform.h:352
Definition: DgnTool.h:129
bool IsUp() const
Definition: DgnTool.h:162
virtual bool _OnInstall()
Called by InstallTool BEFORE the tool instance becomes the current command.
Definition: DgnTool.h:360
double GetRotMagnitude() const
Definition: DgnTool.h:288
virtual bool _DisableEditAction()
Called so tool can prevent reset pop-up menu from opening.
Definition: DgnTool.h:502
DPoint3dCP GetRawPoint() const
Get the 'raw' (before adjustment for locks and snaps) location of the cursor for this event in active...
Definition: DgnTool.h:103
3d point coordinates.
Definition: dpoint3d.h:19
ULong m_dwSequenceID
Definition: DgnTool.h:209
IndexedViewportP m_viewport
Definition: DgnTool.h:89
virtual void _OnPostInstall()
Called by InstallTool AFTER the tool instance becomes the current command.
Definition: DgnTool.h:367
The DgnPrimitiveTool class can be used to implement a primitive command.
Definition: DgnTool.h:698
Definition: DgnTool.h:238
bool m_modifierKeyWentDown
Definition: DgnTool.h:310
#define DGNPLATFORM_TYPEDEFS(_name_)
Definition: DgnPlatform.h:73
ULong m_dwID
Definition: DgnTool.h:153
virtual void _OnCleanup()
Called when current command is being terminated.
Definition: DgnTool.h:386
TouchInput const * GetTouches() const
Definition: DgnTool.h:175
UInt64 m_ullArguments
Definition: DgnTool.h:210
int m_toolPrompt
Definition: DgnTool.h:307
Definition: DgnTool.h:181
unsigned long ULong
Definition: Bentley.r.h:134
UInt32 m_keyModifiers
Definition: DgnTool.h:92
#define TO_BOOL(x)
Definition: DgnPlatform.h:1707
GestureInfo const & GetInfo() const
Definition: DgnTool.h:232
PreferredView
The default view for the tool to use.
Definition: DgnTool.h:666
The DgnViewTool class can be used to implement a viewing command.
Definition: DgnTool.h:614
ULong m_dwFlags
Definition: DgnTool.h:154
Platform-specific cursor.
Definition: DgnDisplay.h:18
uint64_t UInt64
Definition: Bentley.r.h:131
#define BEGIN_BENTLEY_DGNPLATFORM_NAMESPACE
Definition: DgnPlatformBaseType.r.h:68
virtual bool _OnKeyTransition(bool wentDown, int key, bool shiftIsDown, bool ctrlIsDown)
Called when certain keys are pressed or released.
Definition: DgnTool.h:490
GestureIds
Definition: DgnTool.h:183
struct DgnPlatform::DgnFlickEvent const & DgnFlickEventCR
Definition: DgnPlatform.h:209
int StatusInt
Definition: Bentley.h:222
Concrete class that can be used to implement the reference-counting pattern.
Definition: RefCounted.h:109
int m_toolId
Definition: DgnTool.h:306
DVec3dCR GetRotation() const
Definition: DgnTool.h:287
virtual bool _OnModelEndDrag(DgnButtonEventCR ev)
Called when a drag event completes.
Definition: DgnTool.h:459
virtual bool _PopulateToolSettings()
Called to populate the tool tool settings for this tool.
Definition: DgnTool.h:344
void * m_hSource
Definition: DgnTool.h:152
ULong m_dwInstanceID
Definition: DgnTool.h:208
int GetToolPrompt()
Get the prompt number for this tool.
Definition: DgnTool.h:330
CoordSource GetCoordSource() const
Get the source of this event.
Definition: DgnTool.h:113
IndexedViewportP GetViewport() const
Get the viewport in which the cursor resided for this event.
Definition: DgnTool.h:109
DgnViewTool(int toolName, int toolPrompt)
Definition: DgnTool.h:660
virtual bool _On3DInputEvent(Dgn3DInputEvent const &)
Definition: DgnTool.h:492
DVec3dCR GetTranslation() const
Definition: DgnTool.h:289
virtual bool _OnModifierKeyTransition(bool wentDown, int key)
Called when Control, Shift, or Alt qualifier keys are pressed or released.
Definition: DgnTool.h:479
struct DVec3d const & DVec3dCR
Definition: msgeomstructs_typedefs.h:89
struct mdlDesc MdlDesc
Definition: DgnTool.h:18
virtual StatusInt _PerformEditAction(int index)
Called so tool can override default reset pop-up menu.
Definition: DgnTool.h:510
KeyModifierMasks
Definition: DgnTool.h:25
virtual bool _OnDataButtonUp(DgnButtonEventCR ev)
Definition: DgnTool.h:419
virtual void _DecorateScreen(ViewportR vp)
Called to allow tool to display non-element decorations in overlay mode.
Definition: DgnTool.h:398
Vector with x,y,z components.
Definition: dvec3d.h:110
virtual void _OnDynamicFrame(DgnButtonEventCR ev)
Called to display dynamic elements.
Definition: DgnTool.h:804
Information about movement of the "wheel" on the mouse.
Definition: DgnTool.h:263
CoordinateLockOverrides
Definition: DgnTool.h:32
A string class that has many of the same capabilities as std::string, plus additional functions such ...
Definition: WString.h:51
Definition: DgnViewport.h:186

Copyright © 2017 Bentley Systems, Incorporated. All rights reserved.