1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-06-23 07:40:05 +02:00
audacity/src/HitTestResult.h
Paul Licameli f5b0afc2fc Rename TrackPanel::HandleCursor as HandleMotion...
Call HitTest in just one place

Can now preserve repeatedly hit UIHandle objects during pre-click motion

Fields of HitTestResult besides the handle pointer are now unused

The need to repaint a track during mouse movement can be indicated when
constructing a UIHandle or when updating it for move; HitPreview no longer
does this

And the last allows simplifications of LabelTrack glyph highlighting

Also move the temporary state for label glyph dragging out of LabelTrack
2017-07-09 07:56:47 -04:00

49 lines
858 B
C++

/**********************************************************************
Audacity: A Digital Audio Editor
HitTestResult.h
Paul Licameli
**********************************************************************/
#ifndef __AUDACITY_HIT_TEST_RESULT__
#define __AUDACITY_HIT_TEST_RESULT__
#include <wx/string.h>
#include "MemoryX.h"
class UIHandle;
class wxCursor;
using UIHandlePtr = std::shared_ptr<UIHandle>;
struct HitTestPreview
{
HitTestPreview()
{}
HitTestPreview(const wxString &message_, wxCursor *cursor_)
: message(message_), cursor(cursor_)
{}
wxString message {};
wxCursor *cursor {};
};
struct HitTestResult
{
HitTestResult()
{}
HitTestResult(HitTestPreview preview_, UIHandlePtr handle_)
: preview(preview_), handle(handle_)
{}
HitTestPreview preview {};
UIHandlePtr handle {};
};
#endif