MCPcopy Create free account
hub / github.com/MeshInspector/MeshLib / preMouseDown_

Method preMouseDown_

source/MRViewer/MRMouseController.cpp:165–185  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

163}
164
165bool MouseController::preMouseDown_( MouseButton btn, int mod )
166{
167 resetAllIfNeeded_();
168 if ( !downState_.any() )
169 downMousePos_ = currentMousePos_;
170
171 // Click behavior is enabled only if it has listeners
172 if ( getViewerInstance().signals().mouseClickSignal.num_slots() > 0 )
173 {
174 clickButton_ = btn; // Support click by one button only
175 // No pending button yet - so that camera operation starts only if mouseDown had not been handled by other tool
176 clickPendingDown_ = MouseButton::NoButton;
177 clickModifiers_ = mod;
178 clickTime_ = std::chrono::system_clock::now();
179 }
180 if ( !dragActive_ && dragButton_ == MouseButton::NoButton )
181 dragButton_ = btn;
182
183 downState_.set( int( btn ) );
184 return false;
185}
186
187bool MouseController::mouseDown_( MouseButton btn, int mod )
188{

Callers

nothing calls this directly

Calls 2

anyMethod · 0.45
setMethod · 0.45

Tested by

no test coverage detected