1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-12-22 16:41:18 +01:00

Define and use the UIHandle and TrackPanelCell protocols, but...

...no actions reimplemented to them yet.

Later commits will move special cases one at a time from TrackPanel, preserving
all click and drag capabilities at each step.  With a few exceptions, but those
lost abilities are restored in yet later commits.  (Ctrl+Click on the Label
track being one.)
This commit is contained in:
Paul Licameli
2015-07-06 23:12:16 -04:00
committed by Paul Licameli
parent 07b53b4e83
commit 14d45eda33
48 changed files with 2144 additions and 161 deletions

50
src/HitTestResult.h Normal file
View File

@@ -0,0 +1,50 @@
/**********************************************************************
Audacity: A Digital Audio Editor
HitTestResult.h
Paul Licameli
**********************************************************************/
#ifndef __AUDACITY_HIT_TEST_RESULT__
#define __AUDACITY_HIT_TEST_RESULT__
#include <wx/string.h>
class UIHandle;
class wxCursor;
struct HitTestPreview
{
HitTestPreview()
{}
HitTestPreview(const wxString &message_, wxCursor *cursor_
, unsigned refreshCode_ = 0)
: message(message_), cursor(cursor_), refreshCode(refreshCode_)
{}
wxString message {};
wxCursor *cursor {};
// Making this non-zero allows mouse-over highlighting
// See RefreshCode.h for bit flags:
unsigned refreshCode {};
};
struct HitTestResult
{
HitTestResult()
{}
HitTestResult(HitTestPreview preview_, UIHandle *handle_)
: preview(preview_), handle(handle_)
{}
HitTestPreview preview {};
UIHandle *handle {};
};
#endif