mirror of
https://github.com/cookiengineer/audacity
synced 2025-06-23 07:40:05 +02:00
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
49 lines
858 B
C++
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
|