11#ifndef __AUDACITY_CELLULAR_PANEL__
12#define __AUDACITY_CELLULAR_PANEL__
41 long style = wxTAB_TRAVERSAL | wxNO_BORDER);
50 virtual std::shared_ptr<TrackPanelNode>
Root() = 0;
57 unsigned refreshResult) = 0;
65 virtual void VisitCell(
const wxRect &rect,
TrackPanelCell &cell );
86 std::shared_ptr< TrackPanelCell >
pCell;
90 FoundCell FindCell(
int mouseX,
int mouseY);
101 wxRect FindRect(
const std::function<
bool(
TrackPanelNode& ) > &pred);
105 std::shared_ptr<TrackPanelCell> LastCell()
const;
107 bool IsMouseCaptured();
109 wxCoord MostRecentXCoord()
const;
111 void HandleCursorForPresentMouseState(
bool doHit =
true);
121 bool CancelDragging(
bool escaping );
122 void DoContextMenu( std::shared_ptr<TrackPanelCell> pCell );
127 const wxRect &rect,
const std::shared_ptr<TrackPanelNode> &node,
131 bool ChangeTarget(
bool forward,
bool cycle);
133 void OnMouseEvent(wxMouseEvent & event);
134 void OnCaptureLost(wxMouseCaptureLostEvent & event);
135 void OnCaptureKey(wxCommandEvent & event);
136 void OnKeyDown(wxKeyEvent & event);
137 void OnChar(wxKeyEvent & event);
138 void OnKeyUp(wxKeyEvent & event);
140 void OnSetFocus(wxFocusEvent & event);
141 void OnKillFocus(wxFocusEvent & event);
144 void OnContextMenu(wxContextMenuEvent & event);
146 void HandleInterruptedDrag();
147 void Uncapture(
bool escaping, wxMouseState *pState =
nullptr );
148 bool HandleEscapeKey(
bool down);
149 void UpdateMouseState(
const wxMouseState &state);
150 void HandleModifierKey();
155 void HandleMotion( wxMouseState &state,
bool doHit =
true );
173 DECLARE_EVENT_TABLE()
std::shared_ptr< UIHandle > UIHandlePtr
The top-level handle to an Audacity project. It serves as a source of events that other objects can b...
Formerly part of TrackPanel, this abstract base class has no special knowledge of Track objects and i...
virtual std::shared_ptr< TrackPanelNode > Root()=0
virtual AudacityProject * GetProject() const =0
std::unique_ptr< State > mState
virtual std::shared_ptr< TrackPanelCell > GetFocusedCell()=0
~CellularPanel() override
virtual void UpdateStatusMessage(const TranslatableString &)=0
std::function< void(const wxRect &rect, TrackPanelCell &cell) > SimpleCellVisitor
virtual void SetFocusedCell()=0
wxMouseState mLastMouseState
std::function< void(const wxRect &rect, TrackPanelNode &node) > SimpleNodeVisitor
virtual void ProcessUIHandleResult(TrackPanelCell *pClickedCell, TrackPanelCell *pLatestCell, unsigned refreshResult)=0
The TrackPanel is built up of nodes, subtrees of the CellularPanel's area Common base class for Track...
Holds a msgid for the translation catalog; may also bind format arguments.
Short-lived drawing and event-handling object associated with a TrackPanelCell.
std::shared_ptr< TrackPanelCell > pCell