KiCad PCB EDA Suite
Loading...
Searching...
No Matches
pl_selection_tool.cpp
Go to the documentation of this file.
1/*
2 * This program source code file is part of KiCad, a free EDA CAD application.
3 *
4 * Copyright (C) 2019 CERN
5 * Copyright The KiCad Developers, see AUTHORS.txt for contributors.
6 *
7 * This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License
9 * as published by the Free Software Foundation; either version 2
10 * of the License, or (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program. If not, see <https://www.gnu.org/licenses/>.
19 */
20
21#include <advanced_config.h>
22#include <view/view.h>
23#include <view/view_controls.h>
25#include <tool/tool_event.h>
26#include <tool/tool_manager.h>
27#include <tool/selection.h>
30#include <tools/pl_actions.h>
34#include <collector.h>
35#include <math/util.h> // for KiROUND
36
37#include "pl_editor_frame.h"
38
39
40#define HITTEST_THRESHOLD_PIXELS 3
41
42
44 SELECTION_TOOL( "common.InteractiveSelection" ),
45 m_frame( nullptr )
46{
47}
48
49
51{
53
54 auto& menu = m_menu->GetMenu();
55
56 menu.AddSeparator( 200 );
61
62 menu.AddSeparator( 1000 );
63 m_frame->AddStandardSubMenus( *m_menu.get() );
64
65 m_disambiguateTimer.SetOwner( this );
66 Connect( m_disambiguateTimer.GetId(), wxEVT_TIMER,
67 wxTimerEventHandler( PL_SELECTION_TOOL::onDisambiguationExpire ), nullptr, this );
68
69 return true;
70}
71
72
78
79
81{
82 // Main loop: keep receiving events
83 while( TOOL_EVENT* evt = Wait() )
84 {
85 // on left click, a selection is made, depending on modifiers ALT, SHIFT, CTRL:
86 setModifiersState( evt->Modifier( MD_SHIFT ), evt->Modifier( MD_CTRL ),
87 evt->Modifier( MD_ALT ) );
88
89 if( evt->IsMouseDown( BUT_LEFT ) )
90 {
91 // Avoid triggering when running under other tools
92 PL_POINT_EDITOR *pt_tool = m_toolMgr->GetTool<PL_POINT_EDITOR>();
93
94 if( m_frame->ToolStackIsEmpty() && pt_tool && !pt_tool->HasPoint() )
95 {
96 m_originalCursor = m_toolMgr->GetMousePosition();
97 m_disambiguateTimer.StartOnce( ADVANCED_CFG::GetCfg().m_DisambiguationMenuDelay );
98 }
99 }
100 // Single click? Select single object
101 else if( evt->IsClick( BUT_LEFT ) )
102 {
103 // If the timer has stopped, then we have already run the disambiguate routine
104 // and we don't want to register an extra click here
105 if( !m_disambiguateTimer.IsRunning() )
106 {
107 evt->SetPassEvent();
108 continue;
109 }
110
111 m_disambiguateTimer.Stop();
112 SelectPoint( evt->Position() );
113 }
114
115 // right click? if there is any object - show the context menu
116 else if( evt->IsClick( BUT_RIGHT ) )
117 {
118 m_disambiguateTimer.Stop();
119 bool selectionCancelled = false;
120
121 if( m_selection.Empty() )
122 {
123 SelectPoint( evt->Position(), &selectionCancelled );
124 m_selection.SetIsHover( true );
125 }
126
127 // Show selection before opening menu
128 m_frame->GetCanvas()->ForceRefresh();
129
130 if( !selectionCancelled )
131 m_menu->ShowContextMenu( m_selection );
132 }
133
134 // double click? Display the properties window
135 else if( evt->IsDblClick( BUT_LEFT ) )
136 {
137 // No double-click actions currently defined
138 }
139
140 // drag with LMB? Select multiple objects (or at least draw a selection box) or drag them
141 else if( evt->IsDrag( BUT_LEFT ) )
142 {
143 m_disambiguateTimer.Stop();
144
145 if( hasModifier() || m_selection.Empty() )
146 {
148 }
149 else
150 {
151 // Check if dragging has started within any of selected items bounding box
152 if( selectionContains( evt->Position() ) )
153 {
154 // Yes -> run the move tool and wait till it finishes
155 m_toolMgr->RunAction( "plEditor.InteractiveMove.move" );
156 }
157 else
158 {
159 // No -> clear the selection list
161 }
162 }
163 }
164
165 // Middle double click? Do zoom to fit or zoom to objects
166 else if( evt->IsDblClick( BUT_MIDDLE ) )
167 {
168 m_toolMgr->RunAction( ACTIONS::zoomFitScreen );
169 }
170
171 else if( evt->IsCancelInteractive() )
172 {
173 m_disambiguateTimer.Stop();
175 }
176
177 else if( evt->Action() == TA_UNDO_REDO_PRE )
178 {
180 }
181
182 else
183 evt->SetPassEvent();
184
185
186 if( m_frame->ToolStackIsEmpty() )
187 {
188 if( !hasModifier()
189 && !m_selection.Empty()
190 && m_frame->GetDragAction() == MOUSE_DRAG_ACTION::DRAG_SELECTED
191 && evt->HasPosition()
192 && selectionContains( evt->Position() ) )
193 {
194 m_frame->GetCanvas()->SetCurrentCursor( KICURSOR::MOVING );
195 }
196 else
197 {
198 if( m_additive )
199 m_frame->GetCanvas()->SetCurrentCursor( KICURSOR::ADD );
200 else if( m_subtractive )
201 m_frame->GetCanvas()->SetCurrentCursor( KICURSOR::SUBTRACT );
202 else if( m_exclusive_or )
203 m_frame->GetCanvas()->SetCurrentCursor( KICURSOR::XOR );
204 else
205 m_frame->GetCanvas()->SetCurrentCursor( KICURSOR::ARROW );
206 }
207 }
208 }
209
210 return 0;
211}
212
213
215{
216 wxMouseState keyboardState = wxGetMouseState();
217
218 setModifiersState( keyboardState.ShiftDown(), keyboardState.ControlDown(),
219 keyboardState.AltDown() );
220
221 m_skip_heuristics = true;
223 m_skip_heuristics = false;
224
225 return 0;
226}
227
228
233
234
235void PL_SELECTION_TOOL::SelectPoint( const VECTOR2I& aWhere, bool* aSelectionCancelledFlag )
236{
237 int threshold = KiROUND( getView()->ToWorld( HITTEST_THRESHOLD_PIXELS ) );
238
239 // locate items.
240 COLLECTOR collector;
241
242 for( DS_DATA_ITEM* dataItem : DS_DATA_MODEL::GetTheInstance().GetItems() )
243 {
244 for( DS_DRAW_ITEM_BASE* drawItem : dataItem->GetDrawItems() )
245 {
246 if( drawItem->HitTest( aWhere, threshold ) )
247 collector.Append( drawItem );
248 }
249 }
250
251 m_selection.ClearReferencePoint();
252
253 // Apply some ugly heuristics to avoid disambiguation menus whenever possible
254 if( collector.GetCount() > 1 && !m_skip_heuristics )
255 guessSelectionCandidates( collector, aWhere );
256
257 // If still more than one item we're going to have to ask the user.
258 if( collector.GetCount() > 1 )
259 {
260 doSelectionMenu( &collector );
261
262 if( collector.m_MenuCancelled )
263 {
264 if( aSelectionCancelledFlag )
265 *aSelectionCancelledFlag = true;
266
267 return;
268 }
269 }
270
271 bool anyAdded = false;
272 bool anySubtracted = false;
273
274
276 {
277 if( collector.GetCount() == 0 )
278 anySubtracted = true;
279
281 }
282
283 if( collector.GetCount() > 0 )
284 {
285 for( int i = 0; i < collector.GetCount(); ++i )
286 {
287 if( m_subtractive || ( m_exclusive_or && collector[i]->IsSelected() ) )
288 {
289 unselect( collector[i] );
290 anySubtracted = true;
291 }
292 else
293 {
294 select( collector[i] );
295 anyAdded = true;
296 }
297 }
298 }
299
300 if( anyAdded )
301 m_toolMgr->ProcessEvent( EVENTS::SelectedEvent );
302
303 if( anySubtracted )
304 m_toolMgr->ProcessEvent( EVENTS::UnselectedEvent );
305}
306
307
309{
310 // There are certain conditions that can be handled automatically.
311
312 // Prefer an exact hit to a sloppy one
313 for( int i = 0; collector.GetCount() == 2 && i < 2; ++i )
314 {
315 EDA_ITEM* item = collector[ i ];
316 EDA_ITEM* other = collector[ ( i + 1 ) % 2 ];
317
318 if( item->HitTest( aPos, 0 ) && !other->HitTest( aPos, 0 ) )
319 collector.Transfer( other );
320 }
321}
322
323
325{
326 // If nothing is selected do a hover selection
327 if( m_selection.Empty() )
328 {
329 VECTOR2D cursorPos = getViewControls()->GetCursorPosition( true );
330
332 SelectPoint( cursorPos );
333 m_selection.SetIsHover( true );
334 }
335
336 return m_selection;
337}
338
339
341{
342 bool cancelled = false; // Was the tool cancelled while it was running?
343 m_multiple = true; // Multiple selection mode is active
344 KIGFX::VIEW* view = getView();
345
347 view->Add( &area );
348
349 while( TOOL_EVENT* evt = Wait() )
350 {
351 /* Selection mode depends on direction of drag-selection:
352 * Left > Right : Select objects that are fully enclosed by selection
353 * Right > Left : Select objects that are crossed by selection
354 */
355 bool windowSelection = area.GetEnd().x > area.GetOrigin().x;
356
357 m_frame->GetCanvas()->SetCurrentCursor( windowSelection ? KICURSOR::SELECT_WINDOW
359
360 if( evt->IsCancelInteractive() || evt->IsActivate() )
361 {
362 cancelled = true;
363 break;
364 }
365
366 if( evt->IsDrag( BUT_LEFT ) )
367 {
370
371 // Start drawing a selection box
372 area.SetOrigin( evt->DragOrigin() );
373 area.SetEnd( evt->Position() );
376 area.SetExclusiveOr( false );
377 area.SetMode( windowSelection ? SELECTION_MODE::INSIDE_RECTANGLE
379
380 view->SetVisible( &area, true );
381 view->Update( &area );
382 getViewControls()->SetAutoPan( true );
383 }
384
385 if( evt->IsMouseUp( BUT_LEFT ) )
386 {
387 getViewControls()->SetAutoPan( false );
388
389 // End drawing the selection box
390 view->SetVisible( &area, false );
391
392 bool anyAdded = false;
393 bool anySubtracted = false;
394
395 // Construct a BOX2I to determine EDA_ITEM selection
396 BOX2I selectionRect( area.ViewBBox() );
397
398 selectionRect.Normalize();
399
400 for( DS_DATA_ITEM* dataItem : DS_DATA_MODEL::GetTheInstance().GetItems() )
401 {
402 for( DS_DRAW_ITEM_BASE* item : dataItem->GetDrawItems() )
403 {
404 if( item->HitTest( selectionRect, windowSelection ) )
405 {
406 if( m_subtractive || ( m_exclusive_or && item->IsSelected() ) )
407 {
408 unselect( item );
409 anySubtracted = true;
410 }
411 else
412 {
413 select( item );
414 anyAdded = true;
415 }
416 }
417 }
418 }
419
420 // Inform other potentially interested tools
421 if( anyAdded )
422 m_toolMgr->ProcessEvent( EVENTS::SelectedEvent );
423
424 if( anySubtracted )
425 m_toolMgr->ProcessEvent( EVENTS::UnselectedEvent );
426
427 break; // Stop waiting for events
428 }
429 }
430
431 getViewControls()->SetAutoPan( false );
432
433 // Stop drawing the selection box
434 view->Remove( &area );
435 m_multiple = false; // Multiple selection mode is inactive
436
437 if( !cancelled )
438 m_selection.ClearReferencePoint();
439
440 return cancelled;
441}
442
443
445{
447 return 0;
448}
449
450
452{
453 m_selection.Clear();
454
455 for( DS_DATA_ITEM* dataItem : DS_DATA_MODEL::GetTheInstance().GetItems() )
456 {
457 for( DS_DRAW_ITEM_BASE* item : dataItem->GetDrawItems() )
458 {
459 if( item->IsSelected() )
460 select( item );
461 }
462 }
463}
464
465
467{
468 if( m_selection.Empty() )
469 return;
470
471 while( m_selection.GetSize() )
473
475
476 m_selection.SetIsHover( false );
477 m_selection.ClearReferencePoint();
478
479 // Inform other potentially interested tools
480 m_toolMgr->ProcessEvent( EVENTS::ClearedEvent );
481}
482
483
485{
486 highlight( aItem, SELECTED, &m_selection );
487}
488
489
491{
492 unhighlight( aItem, SELECTED, &m_selection );
493}
494
495
496void PL_SELECTION_TOOL::highlight( EDA_ITEM* aItem, int aMode, SELECTION* aGroup )
497{
498 if( aMode == SELECTED )
499 aItem->SetSelected();
500 else if( aMode == BRIGHTENED )
501 aItem->SetBrightened();
502
503 if( aGroup )
504 aGroup->Add( aItem );
505
506 getView()->Update( aItem );
507}
508
509
510void PL_SELECTION_TOOL::unhighlight( EDA_ITEM* aItem, int aMode, SELECTION* aGroup )
511{
512 if( aMode == SELECTED )
513 aItem->ClearSelected();
514 else if( aMode == BRIGHTENED )
515 aItem->ClearBrightened();
516
517 if( aGroup )
518 aGroup->Remove( aItem );
519
520 getView()->Update( aItem );
521}
522
523
525{
526 const unsigned GRIP_MARGIN = 20;
527 VECTOR2I margin = getView()->ToWorld( VECTOR2I( GRIP_MARGIN, GRIP_MARGIN ), false );
528
529 // Check if the point is located within any of the currently selected items bounding boxes
530 for( EDA_ITEM* item : m_selection )
531 {
532 BOX2I itemBox = item->ViewBBox();
533 itemBox.Inflate( margin.x, margin.y ); // Give some margin for gripping an item
534
535 if( itemBox.Contains( aPoint ) )
536 return true;
537 }
538
539 return false;
540}
541
542
BOX2< VECTOR2I > BOX2I
Definition box2.h:918
constexpr BOX2I KiROUND(const BOX2D &aBoxD)
Definition box2.h:986
static TOOL_ACTION selectItem
Select an item (specified as the event parameter).
Definition actions.h:223
static TOOL_ACTION unselectItem
Definition actions.h:224
static TOOL_ACTION selectionActivate
Activation of the selection tool.
Definition actions.h:210
static TOOL_ACTION selectionMenu
Run a selection menu to select from a list of items.
Definition actions.h:232
static TOOL_ACTION updateMenu
Definition actions.h:266
static TOOL_ACTION zoomFitScreen
Definition actions.h:138
static TOOL_ACTION selectionClear
Clear the current selection.
Definition actions.h:220
static TOOL_ACTION unselectItems
Definition actions.h:229
static TOOL_ACTION selectItems
Select a list of items (specified as the event parameter)
Definition actions.h:228
static const ADVANCED_CFG & GetCfg()
Get the singleton instance's config, which is shared by all consumers.
constexpr BOX2< Vec > & Inflate(coord_type dx, coord_type dy)
Inflates the rectangle horizontally by dx and vertically by dy.
Definition box2.h:554
constexpr BOX2< Vec > & Normalize()
Ensure that the height and width are positive.
Definition box2.h:142
constexpr bool Contains(const Vec &aPoint) const
Definition box2.h:164
An abstract class that will find and hold all the objects according to an inspection done by the Insp...
Definition collector.h:45
void Transfer(int aIndex)
Move the item at aIndex (first position is 0) to the backup list.
Definition collector.h:149
bool m_MenuCancelled
Definition collector.h:235
int GetCount() const
Return the number of objects in the list.
Definition collector.h:79
void Append(EDA_ITEM *item)
Add an item to the end of the list.
Definition collector.h:97
Drawing sheet structure type definitions.
static DS_DATA_MODEL & GetTheInstance()
Return the instance of DS_DATA_MODEL used in the application.
Base class to handle basic graphic items.
A base class for most all the KiCad significant classes used in schematics and boards.
Definition eda_item.h:96
void ClearSelected()
Definition eda_item.h:147
void SetSelected()
Definition eda_item.h:144
void ClearBrightened()
Definition eda_item.h:148
void SetBrightened()
Definition eda_item.h:145
virtual bool HitTest(const VECTOR2I &aPosition, int aAccuracy=0) const
Test if aPosition is inside or on the boundary of this item.
Definition eda_item.h:243
static const TOOL_EVENT DisambiguatePoint
Used for hotkey feedback.
Definition actions.h:358
static const TOOL_EVENT ClearedEvent
Definition actions.h:343
static const TOOL_EVENT SelectedEvent
Definition actions.h:341
static const TOOL_EVENT UnselectedEvent
Definition actions.h:342
Represent a selection area (currently a rectangle) in a VIEW, drawn corner-to-corner between two poin...
void SetMode(SELECTION_MODE aMode)
void SetSubtractive(bool aSubtractive)
void SetAdditive(bool aAdditive)
void SetOrigin(const VECTOR2I &aOrigin)
const BOX2I ViewBBox() const override
Set the origin of the rectangle (the fixed corner)
void SetExclusiveOr(bool aExclusiveOr)
void SetEnd(const VECTOR2I &aEnd)
Set the current end of the rectangle (the corner that moves with the cursor.
VECTOR2D GetCursorPosition() const
Return the current cursor position in world coordinates.
virtual void SetAutoPan(bool aEnabled)
Turn on/off auto panning (this feature is used when there is a tool active (eg.
Hold a (potentially large) number of VIEW_ITEMs and renders them on a graphics device provided by the...
Definition view.h:63
virtual void Add(VIEW_ITEM *aItem, int aDrawPriority=-1)
Add a VIEW_ITEM to the view.
Definition view.cpp:300
virtual void Remove(VIEW_ITEM *aItem)
Remove a VIEW_ITEM from the view.
Definition view.cpp:404
virtual void Update(const VIEW_ITEM *aItem, int aUpdateFlags) const
For dynamic VIEWs, inform the associated VIEW that the graphical representation of this item has chan...
Definition view.cpp:1835
VECTOR2D ToWorld(const VECTOR2D &aCoord, bool aAbsolute=true) const
Converts a screen space point/vector to a point/vector in world space coordinates.
Definition view.cpp:534
void SetVisible(VIEW_ITEM *aItem, bool aIsVisible=true)
Set the item visibility.
Definition view.cpp:1756
static TOOL_ACTION placeImage
Definition pl_actions.h:37
static TOOL_ACTION drawRectangle
Definition pl_actions.h:38
static TOOL_ACTION placeText
Definition pl_actions.h:36
static TOOL_ACTION drawLine
Definition pl_actions.h:39
Tool that displays edit points allowing to modify items by dragging the points.
bool HasPoint()
Indicate the cursor is over an edit point.
void select(EDA_ITEM *aItem) override
Takes necessary action mark an item as selected.
void setTransitions() override
This method is meant to be overridden in order to specify handlers for events.
bool Init() override
Init() is called once upon a registration of the tool.
int disambiguateCursor(const TOOL_EVENT &aEvent)
Handle disambiguation actions including displaying the menu.
int ClearSelection(const TOOL_EVENT &aEvent)
void SelectPoint(const VECTOR2I &aWhere, bool *aSelectionCancelledFlag=nullptr)
Select an item pointed by the parameter aWhere.
void guessSelectionCandidates(COLLECTOR &collector, const VECTOR2I &aWhere)
Apply heuristics to try and determine a single object when multiple are found under the cursor.
bool selectionContains(const VECTOR2I &aPoint) const
Set up handlers for various events.
void unselect(EDA_ITEM *aItem) override
Take necessary action mark an item as unselected.
bool selectMultiple()
Handle drawing a selection box that allows one to select many items at the same time.
PL_SELECTION & GetSelection()
Return the set of currently selected items.
PL_SELECTION & RequestSelection()
Return either an existing selection (filtered), or the selection at the current cursor if the existin...
void highlight(EDA_ITEM *aItem, int aHighlightMode, SELECTION *aGroup=nullptr) override
Highlight the item visually.
void unhighlight(EDA_ITEM *aItem, int aHighlightMode, SELECTION *aGroup=nullptr) override
Unhighlight the item visually.
PL_EDITOR_FRAME * m_frame
int Main(const TOOL_EVENT &aEvent)
The main loop.
void RebuildSelection()
Rebuild the selection from the flags in the view items.
void Reset(RESET_REASON aReason) override
Bring the tool to a known, initial state.
static bool Empty(const SELECTION &aSelection)
Test if there are no items selected.
bool m_multiple
Multiple selection mode is active.
int RemoveItemFromSel(const TOOL_EVENT &aEvent)
bool doSelectionMenu(COLLECTOR *aCollector)
wxTimer m_disambiguateTimer
Timer to show the disambiguate menu.
bool m_drag_additive
Add multiple items to selection.
bool m_exclusive_or
Items' selection state should be toggled.
int AddItemsToSel(const TOOL_EVENT &aEvent)
int AddItemToSel(const TOOL_EVENT &aEvent)
int UpdateMenu(const TOOL_EVENT &aEvent)
Update a menu's state based on the current selection.
void setModifiersState(bool aShiftState, bool aCtrlState, bool aAltState)
Set the configuration of m_additive, m_subtractive, m_exclusive_or, m_skip_heuristics from the state ...
VECTOR2I m_originalCursor
Location of original cursor when starting click.
int SelectionMenu(const TOOL_EVENT &aEvent)
Show a popup menu to trim the COLLECTOR passed as aEvent's parameter down to a single item.
int RemoveItemsFromSel(const TOOL_EVENT &aEvent)
bool m_subtractive
Items should be removed from selection.
SELECTION_TOOL(const std::string &aName)
bool m_skip_heuristics
Show disambiguation menu for all items under the cursor rather than trying to narrow them down first ...
bool m_drag_subtractive
Remove multiple from selection.
bool m_additive
Items should be added to sel (instead of replacing).
bool hasModifier()
True if a selection modifier is enabled, false otherwise.
bool m_canceledMenu
Sets to true if the disambiguation menu was canceled.
void onDisambiguationExpire(wxTimerEvent &aEvent)
Start the process to show our disambiguation menu once the user has kept the mouse down for the minim...
virtual void Add(EDA_ITEM *aItem)
Definition selection.cpp:38
virtual void Remove(EDA_ITEM *aItem)
Definition selection.cpp:56
T * getEditFrame() const
Return the application window object, casted to requested user type.
Definition tool_base.h:182
KIGFX::VIEW_CONTROLS * getViewControls() const
Return the instance of VIEW_CONTROLS object used in the application.
Definition tool_base.cpp:40
TOOL_MANAGER * m_toolMgr
Definition tool_base.h:220
KIGFX::VIEW * getView() const
Returns the instance of #VIEW object used in the application.
Definition tool_base.cpp:34
RESET_REASON
Determine the reason of reset for a tool.
Definition tool_base.h:74
@ MODEL_RELOAD
Model changes (the sheet for a schematic)
Definition tool_base.h:76
Generic, UI-independent tool event.
Definition tool_event.h:167
void Go(int(T::*aStateFunc)(const TOOL_EVENT &), const TOOL_EVENT_LIST &aConditions=TOOL_EVENT(TC_ANY, TA_ANY))
Define which state (aStateFunc) to go when a certain event arrives (aConditions).
std::unique_ptr< TOOL_MENU > m_menu
The functions below are not yet implemented - their interface may change.
TOOL_EVENT * Wait(const TOOL_EVENT_LIST &aEventList=TOOL_EVENT(TC_ANY, TA_ANY))
Suspend execution of the tool until an event specified in aEventList arrives.
@ SUBTRACT
Definition cursors.h:68
@ SELECT_WINDOW
Definition cursors.h:82
@ SELECT_LASSO
Definition cursors.h:84
@ MOVING
Definition cursors.h:44
@ ARROW
Definition cursors.h:42
#define BRIGHTENED
item is drawn with a bright contour
#define SELECTED
Item was manually selected by the user.
#define HITTEST_THRESHOLD_PIXELS
@ TA_UNDO_REDO_PRE
This event is sent before undo/redo command is performed.
Definition tool_event.h:102
@ MD_ALT
Definition tool_event.h:141
@ MD_CTRL
Definition tool_event.h:140
@ MD_SHIFT
Definition tool_event.h:139
@ BUT_MIDDLE
Definition tool_event.h:130
@ BUT_LEFT
Definition tool_event.h:128
@ BUT_RIGHT
Definition tool_event.h:129
VECTOR2< int32_t > VECTOR2I
Definition vector2d.h:683
VECTOR2< double > VECTOR2D
Definition vector2d.h:682