Audacity  3.0.3
CommonTrackControls.cpp
Go to the documentation of this file.
1 /**********************************************************************
2 
3 Audacity: A Digital Audio Editor
4 
5 CommonTrackControls.cpp
6 
7 Paul Licameli split from TrackControls.cpp
8 
9 **********************************************************************/
10 
11 #include "CommonTrackControls.h"
12 
13 #include "TrackButtonHandles.h"
14 #include "TrackSelectHandle.h"
15 #include "../../AColor.h"
16 #include "../../RefreshCode.h"
17 #include "../../Project.h"
18 #include "../../ProjectHistory.h"
19 #include "../../TrackArtist.h"
20 #include "../../TrackInfo.h"
21 #include "../../TrackPanelDrawingContext.h"
22 #include "../../TrackPanelMouseEvent.h"
23 #include "../../TrackUtilities.h"
24 #include <wx/textdlg.h>
25 #include "../../commands/AudacityCommand.h"
26 #include "../../commands/CommandManager.h"
27 #include "../../ShuttleGui.h"
28 #include "../../Track.h"
29 #include "../../widgets/PopupMenuTable.h"
30 
31 #include <wx/dc.h>
32 #include <wx/frame.h>
33 
34 std::vector<UIHandlePtr> CommonTrackControls::HitTest
35 (const TrackPanelMouseState &st,
36  const AudacityProject *WXUNUSED(project))
37 {
38  // Hits are mutually exclusive, results single
39 
40  const wxMouseState &state = st.state;
41  const wxRect &rect = st.rect;
42  UIHandlePtr result;
43  std::vector<UIHandlePtr> results;
44 
45  auto sThis = shared_from_this();
46 
47  if (NULL != (result = CloseButtonHandle::HitTest(
48  mCloseHandle, state, rect, this)))
49  results.push_back(result);
50 
51  if (NULL != (result = MenuButtonHandle::HitTest(
52  mMenuHandle, state, rect, sThis)))
53  results.push_back(result);
54 
55  if (NULL != (result = MinimizeButtonHandle::HitTest(
56  mMinimizeHandle, state, rect, this)))
57  results.push_back(result);
58 
59  if (NULL != (result = SelectButtonHandle::HitTest(
60  mSelectButtonHandle, state, rect, this)))
61  results.push_back(result);
62 
63  if (results.empty()) {
64  if (NULL != (result = TrackSelectHandle::HitAnywhere(
66  results.push_back(result);
67  }
68 
69  return results;
70 }
71 
72 enum
73 {
74  OnSetNameID = 2000,
79 };
80 
82  : public PopupMenuTable
83  , private PrefsListener
84 {
86  : PopupMenuTable{ "Track" }
87  {}
89 
90 public:
91  static TrackMenuTable &Instance();
92 
93 private:
94  void OnSetName(wxCommandEvent &);
95  void OnMoveTrack(wxCommandEvent &event);
96 
97  void InitUserData(void *pUserData) override;
98 
99  void DestroyMenu() override
100  {
101  mpData = nullptr;
102  }
103 
105 
106  void UpdatePrefs() override
107  {
108  // Because labels depend on keyboard preferences
110  }
111 };
112 
114 {
115  static TrackMenuTable instance;
116  return instance;
117 }
118 
119 void TrackMenuTable::InitUserData(void *pUserData)
120 {
121  mpData = static_cast<CommonTrackControls::InitMenuData*>(pUserData);
122 }
123 
125  static const auto enableIfCanMove = [](bool up){ return
126  [up]( PopupMenuHandler &handler, wxMenu &menu, int id ){
127  auto pData = static_cast<TrackMenuTable&>( handler ).mpData;
128  const auto &tracks = TrackList::Get( pData->project );
129  Track *const pTrack = pData->pTrack;
130  menu.Enable( id,
131  up ? tracks.CanMoveUp(pTrack) : tracks.CanMoveDown(pTrack) );
132  };
133  };
134 
135  BeginSection( "Basic" );
136  AppendItem( "Name", OnSetNameID, XXO("&Name..."), POPUP_MENU_FN( OnSetName ) );
138  BeginSection( "Move" );
139  AppendItem( "Up",
140  // It is not correct to use NormalizedKeyString::Display here --
141  // wxWidgets will apply its equivalent to the key names passed to menu
142  // functions.
143  OnMoveUpID,
144  XXO("Move Track &Up").Join(
145  Verbatim(
146  CommandManager::Get( mpData->project ).
147  // using GET to compose menu item name for wxWidgets
148  GetKeyFromName(wxT("TrackMoveUp")).GET() ),
149  wxT("\t")
150  ),
151  POPUP_MENU_FN( OnMoveTrack ), enableIfCanMove(true) );
152  AppendItem( "Down",
153  OnMoveDownID,
154  XXO("Move Track &Down").Join(
155  Verbatim(
156  CommandManager::Get( mpData->project ).
157  // using GET to compose menu item name for wxWidgets
158  GetKeyFromName(wxT("TrackMoveDown")).GET() ),
159  wxT("\t")
160  ),
161  POPUP_MENU_FN( OnMoveTrack ), enableIfCanMove(false) );
162  AppendItem( "Top",
163  OnMoveTopID,
164  XXO("Move Track to &Top").Join(
165  Verbatim(
166  CommandManager::Get( mpData->project ).
167  // using GET to compose menu item name for wxWidgets
168  GetKeyFromName(wxT("TrackMoveTop")).GET() ),
169  wxT("\t")
170  ),
171  POPUP_MENU_FN( OnMoveTrack ), enableIfCanMove(true) );
172  AppendItem( "Bottom",
174  XXO("Move Track to &Bottom").Join(
175  Verbatim(
176  CommandManager::Get( mpData->project ).
177  // using GET to compose menu item name for wxWidgets
178  GetKeyFromName(wxT("TrackMoveBottom")).GET() ),
179  wxT("\t")
180  ),
181  POPUP_MENU_FN( OnMoveTrack ), enableIfCanMove(false) );
182  EndSection();
184 
185 
186 
187 
188 // An example of using an AudacityCommand simply to create a dialog.
189 // We can add additional functions later, if we want to make it
190 // available to scripting.
191 // However there is no reason to, as SetTrackStatus is already provided.
193 {
194 public:
196 
197  // ComponentInterface overrides
199  { return Symbol; }
200  //TranslatableString GetDescription() override {return XO("Sets the track name.");};
201  //bool DefineParams( ShuttleParams & S ) override;
202  void PopulateOrExchange(ShuttleGui & S) override;
203  //bool Apply(const CommandContext & context) override;
204 
205  // Provide an override, if we want the help button.
206  // ManualPageID ManualPage() override {return {};}
207 public:
208  wxString mName;
209 };
210 
212 { XO("Set Track Name") };
213 
215 {
216  S.AddSpace(0, 5);
217 
218  S.StartMultiColumn(2, wxALIGN_CENTER);
219  {
220  S.TieTextBox(XXO("Name:"),mName,60);
221  }
222  S.EndMultiColumn();
223 }
224 
225 void TrackMenuTable::OnSetName(wxCommandEvent &)
226 {
227  Track *const pTrack = mpData->pTrack;
228  if (pTrack)
229  {
230  AudacityProject *const proj = &mpData->project;
231  const wxString oldName = pTrack->GetName();
232 
234  Command.mName = oldName;
235  // Bug 1837 : We need an OK/Cancel result if we are to enter a blank string.
236  bool bResult = Command.PromptUser( &GetProjectFrame( *proj ) );
237  if (bResult)
238  {
239  wxString newName = Command.mName;
240  for (auto channel : TrackList::Channels(pTrack))
241  channel->SetName(newName);
242 
243  ProjectHistory::Get( *proj )
244  .PushState(
245  XO("Renamed '%s' to '%s'").Format( oldName, newName ),
246  XO("Name Change"));
247 
249  }
250  }
251 }
252 
253 void TrackMenuTable::OnMoveTrack(wxCommandEvent &event)
254 {
255  AudacityProject *const project = &mpData->project;
257  switch (event.GetId()) {
258  default:
259  wxASSERT(false);
260  case OnMoveUpID:
261  choice = TrackUtilities::OnMoveUpID; break;
262  case OnMoveDownID:
263  choice = TrackUtilities::OnMoveDownID; break;
264  case OnMoveTopID:
265  choice = TrackUtilities::OnMoveTopID; break;
266  case OnMoveBottomID:
267  choice = TrackUtilities::OnMoveBottomID; break;
268  }
269 
270  TrackUtilities::DoMoveTrack(*project, mpData->pTrack, choice);
271 
272  // MoveTrack already refreshed TrackPanel, which means repaint will happen.
273  // This is a harmless redundancy:
275 }
276 
278  const wxRect &rect, wxWindow *pParent, wxPoint *, AudacityProject *pProject)
279 {
280  using namespace RefreshCode;
281  wxRect buttonRect;
282  TrackInfo::GetTitleBarRect(rect, buttonRect);
283 
284  auto track = FindTrack();
285  if (!track)
286  return RefreshNone;
287 
288  InitMenuData data{ *pProject, track.get(), pParent, RefreshNone };
289 
290  const auto pTable = &TrackMenuTable::Instance();
291  auto pMenu = PopupMenuTable::BuildMenu(pParent, pTable, &data);
292 
293  PopupMenuTable *const pExtension = GetMenuExtension(track.get());
294  if (pExtension)
295  PopupMenuTable::ExtendMenu( *pMenu, *pExtension );
296 
297  pParent->PopupMenu
298  (pMenu.get(), buttonRect.x + 1, buttonRect.y + buttonRect.height + 1);
299 
300  return data.result;
301 }
302 
303 // Some old cut-and-paste legacy from TrackPanel.cpp here:
304 #if 0
305 void TrackInfo::DrawBordersWithin
306  ( wxDC* dc, const wxRect & rect, const Track &track ) const
307 {
308  AColor::Dark(dc, false); // same color as border of toolbars (ToolBar::OnPaint())
309 
310  // below close box and title bar
311  wxRect buttonRect;
312  GetTitleBarRect( rect, buttonRect );
314  (*dc, rect.x, buttonRect.y + buttonRect.height,
315  rect.width - 1, buttonRect.y + buttonRect.height);
316 
317  // between close box and title bar
319  (*dc, buttonRect.x, buttonRect.y,
320  buttonRect.x, buttonRect.y + buttonRect.height - 1);
321 
322  GetMuteSoloRect( rect, buttonRect, false, true, &track );
323 
324  bool bHasMuteSolo = dynamic_cast<const PlayableTrack*>( &track ) != NULL;
325  if( bHasMuteSolo && !TrackInfo::HideTopItem( rect, buttonRect ) )
326  {
327  // above mute/solo
329  (*dc, rect.x, buttonRect.y,
330  rect.width - 1, buttonRect.y);
331 
332  // between mute/solo
333  // Draw this little line; if there is no solo, wide mute button will
334  // overpaint it later:
336  (*dc, buttonRect.x + buttonRect.width, buttonRect.y,
337  buttonRect.x + buttonRect.width, buttonRect.y + buttonRect.height - 1);
338 
339  // below mute/solo
341  (*dc, rect.x, buttonRect.y + buttonRect.height,
342  rect.width - 1, buttonRect.y + buttonRect.height);
343  }
344 
345  // left of and above minimize button
346  wxRect minimizeRect;
347  this->GetMinimizeRect(rect, minimizeRect);
349  (*dc, minimizeRect.x - 1, minimizeRect.y,
350  minimizeRect.x - 1, minimizeRect.y + minimizeRect.height - 1);
352  (*dc, minimizeRect.x, minimizeRect.y - 1,
353  minimizeRect.x + minimizeRect.width - 1, minimizeRect.y - 1);
354 }
355 #endif
356 
358  TrackPanelDrawingContext &context,
359  const wxRect &rect_, unsigned iPass )
360 {
361  if ( iPass == TrackArtist::PassMargins ) {
362  // fill in label
363  auto dc = &context.dc;
364  const auto pTrack = FindTrack();
365  AColor::MediumTrackInfo( dc, pTrack && pTrack->GetSelected() );
366  dc->DrawRectangle( rect_ );
367  }
368 
369  if ( iPass == TrackArtist::PassControls ) {
370  // Given rectangle excludes left and right margins, and encompasses a
371  // channel group of tracks, plus the resizer area below
372  auto pTrack = FindTrack();
373  // First counteract DrawingArea() correction
374  wxRect rect{ rect_.x, rect_.y, rect_.width - 1, rect_.height };
375 
376  // Vaughan, 2010-08-24: No longer doing this.
377  // Draw sync-lock tiles in ruler area.
378  //if (t->IsSyncLockSelected()) {
379  // wxRect tileFill = rect;
380  // tileFill.x = mViewInfo->GetVRulerOffset();
381  // tileFill.width = mViewInfo->GetVRulerWidth();
382  // TrackArt::DrawSyncLockTiles(dc, tileFill);
383  //}
384 
385  if (pTrack)
386  // Draw things within the track control panel
387  TrackInfo::DrawItems( context, rect, *pTrack );
388 
389  //mTrackInfo.DrawBordersWithin( dc, rect, *t );
390  }
391 
392  // Some old cut-and-paste legacy from TrackPanel.cpp here:
393 #undef USE_BEVELS
394 #ifdef USE_BEVELS
395  // This branch is not now used
396  // PRL: todo: banish magic numbers.
397  // PRL: vrul was the x coordinate of left edge of the vertical ruler.
398  // PRL: bHasMuteSolo was true iff the track was WaveTrack.
399  if( bHasMuteSolo )
400  {
401  int ylast = rect.height-20;
402  int ybutton = wxMin(32,ylast-17);
403  int ybuttonEnd = 67;
404 
405  fill=wxRect( rect.x+1, rect.y+17, vrul-6, ybutton);
406  AColor::BevelTrackInfo( *dc, true, fill );
407 
408  if( ybuttonEnd < ylast ){
409  fill=wxRect( rect.x+1, rect.y+ybuttonEnd, fill.width, ylast - ybuttonEnd);
410  AColor::BevelTrackInfo( *dc, true, fill );
411  }
412  }
413  else
414  {
415  fill=wxRect( rect.x+1, rect.y+17, vrul-6, rect.height-37);
416  AColor::BevelTrackInfo( *dc, true, fill );
417  }
418 #endif
419 
420 }
421 
424  const wxRect &rect, const wxRect &, unsigned iPass )
425 {
426  if ( iPass == TrackArtist::PassControls )
427  // Some bevels spill out right
428  return { rect.x, rect.y, rect.width + 1, rect.height };
429  else
430  return rect;
431 }
TrackMenuTable::UpdatePrefs
void UpdatePrefs() override
Definition: CommonTrackControls.cpp:106
TrackMenuTable::TrackMenuTable
TrackMenuTable()
Definition: CommonTrackControls.cpp:85
CommonTrackControls::mMinimizeHandle
std::weak_ptr< MinimizeButtonHandle > mMinimizeHandle
Definition: CommonTrackControls.h:72
MenuButtonHandle::HitTest
static UIHandlePtr HitTest(std::weak_ptr< MenuButtonHandle > &holder, const wxMouseState &state, const wxRect &rect, const std::shared_ptr< TrackPanelCell > &pCell)
Definition: TrackButtonHandles.cpp:250
CommonTrackControls::mMenuHandle
std::weak_ptr< MenuButtonHandle > mMenuHandle
Definition: CommonTrackControls.h:71
TrackMenuTable::Instance
static TrackMenuTable & Instance()
Definition: CommonTrackControls.cpp:113
RefreshCode::RefreshAll
@ RefreshAll
Definition: RefreshCode.h:26
RefreshCode::RefreshNone
@ RefreshNone
Definition: RefreshCode.h:21
CommonTrackControls::mSelectHandle
std::weak_ptr< TrackSelectHandle > mSelectHandle
Definition: CommonTrackControls.h:74
AppendItem
AppendItem("Name", OnSetNameID, XXO("&Name..."), POPUP_MENU_FN(OnSetName))
Track::GetName
wxString GetName() const
Definition: Track.h:410
CommonTrackControls::mSelectButtonHandle
std::weak_ptr< SelectButtonHandle > mSelectButtonHandle
Definition: CommonTrackControls.h:73
PopupMenuTable
Definition: PopupMenuTable.h:104
CommonTrackPanelCell::FindTrack
std::shared_ptr< Track > FindTrack()
Definition: CommonTrackPanelCell.h:44
TrackPanelDrawingContext
Definition: TrackPanelDrawingContext.h:22
TrackList::Channels
static auto Channels(TrackType *pTrack) -> TrackIterRange< TrackType >
Definition: Track.h:1468
Format
Abstract base class used in importing a file.
AColor::Line
static void Line(wxDC &dc, wxCoord x1, wxCoord y1, wxCoord x2, wxCoord y2)
Definition: AColor.cpp:112
ShuttleGui::AddSpace
wxSizerItem * AddSpace(int width, int height, int prop=0)
Definition: ShuttleGui.cpp:2447
CommonTrackControls.h
SetTrackNameCommand::PopulateOrExchange
void PopulateOrExchange(ShuttleGui &S) override
Definition: CommonTrackControls.cpp:214
XO
#define XO(s)
Definition: Internat.h:31
TrackUtilities::OnMoveDownID
@ OnMoveDownID
Definition: TrackUtilities.h:20
BeginSection
BeginSection("Basic")
TrackPanelDrawingContext::dc
wxDC & dc
Definition: TrackPanelDrawingContext.h:23
CommonTrackControls::InitMenuData::result
unsigned result
Definition: CommonTrackControls.h:39
ShuttleGuiBase::EndMultiColumn
void EndMultiColumn()
Definition: ShuttleGui.cpp:1238
AColor::BevelTrackInfo
static void BevelTrackInfo(wxDC &dc, bool up, const wxRect &r, bool highlight=false)
Definition: AColor.cpp:251
TrackPanelMouseState::rect
const wxRect & rect
Definition: TrackPanelMouseEvent.h:39
TrackInfo::DrawItems
AUDACITY_DLL_API void DrawItems(TrackPanelDrawingContext &context, const wxRect &rect, const Track &track)
Definition: TrackInfo.cpp:217
OnSetNameID
@ OnSetNameID
Definition: CommonTrackControls.cpp:74
ComponentInterfaceSymbol
ComponentInterfaceSymbol pairs a persistent string identifier used internally with an optional,...
Definition: ComponentInterfaceSymbol.h:27
CommonTrackControls::DrawingArea
wxRect DrawingArea(TrackPanelDrawingContext &, const wxRect &rect, const wxRect &panelRect, unsigned iPass) override
Definition: CommonTrackControls.cpp:422
TrackInfo::GetTitleBarRect
AUDACITY_DLL_API void GetTitleBarRect(const wxRect &rect, wxRect &dest)
Definition: TrackInfo.cpp:479
CommonTrackControls::InitMenuData::project
AudacityProject & project
Definition: CommonTrackControls.h:36
ShuttleGuiBase::TieTextBox
wxTextCtrl * TieTextBox(const TranslatableString &Caption, wxString &Value, const int nChars=0)
Definition: ShuttleGui.cpp:1652
enableIfCanMove
static const auto enableIfCanMove
Definition: CommonTrackControls.cpp:125
PrefsListener
A listener notified of changes in preferences.
Definition: Prefs.h:389
CommonTrackControls::mCloseHandle
std::weak_ptr< CloseButtonHandle > mCloseHandle
Definition: CommonTrackControls.h:70
TrackUtilities::MoveChoice
MoveChoice
Definition: TrackUtilities.h:19
CloseButtonHandle::HitTest
static UIHandlePtr HitTest(std::weak_ptr< CloseButtonHandle > &holder, const wxMouseState &state, const wxRect &rect, TrackPanelCell *pCell)
Definition: TrackButtonHandles.cpp:190
XXO
#define XXO(s)
Definition: Internat.h:44
TrackMenuTable::InitUserData
void InitUserData(void *pUserData) override
Definition: CommonTrackControls.cpp:119
CommonTrackControls::HitTest
virtual std::vector< UIHandlePtr > HitTest(const TrackPanelMouseState &state, const AudacityProject *) override=0
Definition: CommonTrackControls.cpp:35
ShuttleGuiBase::StartMultiColumn
void StartMultiColumn(int nCols, int PositionFlags=wxALIGN_LEFT)
Definition: ShuttleGui.cpp:1229
TrackSelectHandle::HitAnywhere
static UIHandlePtr HitAnywhere(std::weak_ptr< TrackSelectHandle > &holder, const std::shared_ptr< Track > &pTrack)
Definition: TrackSelectHandle.cpp:56
GetProjectFrame
AUDACITY_DLL_API wxFrame & GetProjectFrame(AudacityProject &project)
Get the top-level window associated with the project (as a wxFrame only, when you do not need to use ...
Definition: Project.cpp:188
TrackMenuTable::DestroyMenu
void DestroyMenu() override
Definition: CommonTrackControls.cpp:99
AudacityCommand
Base class for command in Audacity.
Definition: AudacityCommand.h:41
OnMoveTopID
@ OnMoveTopID
Definition: CommonTrackControls.cpp:77
OnMoveUpID
@ OnMoveUpID
Definition: CommonTrackControls.cpp:75
UIHandlePtr
std::shared_ptr< UIHandle > UIHandlePtr
Definition: CellularPanel.h:28
TrackArtist::PassControls
@ PassControls
Definition: TrackArtist.h:78
TrackUtilities::OnMoveTopID
@ OnMoveTopID
Definition: TrackUtilities.h:20
CommonTrackControls::InitMenuData
Definition: CommonTrackControls.h:34
PlayableTrack
AudioTrack subclass that can also be audibly replayed by the program.
Definition: Track.h:838
POPUP_MENU_FN
#define POPUP_MENU_FN(memFn)
Definition: PopupMenuTable.h:313
TrackMenuTable::mpData
CommonTrackControls::InitMenuData * mpData
Definition: CommonTrackControls.cpp:104
TrackMenuTable::OnMoveTrack
void OnMoveTrack(wxCommandEvent &event)
Definition: CommonTrackControls.cpp:253
PopupMenuTable::Clear
void Clear()
Definition: PopupMenuTable.h:144
TrackMenuTable
Definition: CommonTrackControls.cpp:84
AColor::MediumTrackInfo
static void MediumTrackInfo(wxDC *dc, bool selected)
Definition: AColor.cpp:344
BEGIN_POPUP_MENU
#define BEGIN_POPUP_MENU(HandlerClass)
Definition: PopupMenuTable.h:305
id
int id
Definition: WaveTrackControls.cpp:590
ProjectHistory::PushState
void PushState(const TranslatableString &desc, const TranslatableString &shortDesc)
Definition: ProjectHistory.cpp:90
SelectButtonHandle::HitTest
static UIHandlePtr HitTest(std::weak_ptr< SelectButtonHandle > &holder, const wxMouseState &state, const wxRect &rect, TrackPanelCell *pCell)
Definition: TrackButtonHandles.cpp:124
TrackList::Get
static TrackList & Get(AudacityProject &project)
Definition: Track.cpp:495
TrackInfo::HideTopItem
AUDACITY_DLL_API bool HideTopItem(const wxRect &rect, const wxRect &subRect, int allowance=0)
Definition: TrackInfo.cpp:207
PopupMenuHandler
Definition: PopupMenuTable.h:82
TrackMenuTable::DECLARE_POPUP_MENU
DECLARE_POPUP_MENU(TrackMenuTable)
Track
Abstract base class for an object holding data associated with points on a time axis.
Definition: Track.h:239
AColor::Dark
static void Dark(wxDC *dc, bool selected, bool highlight=false)
Definition: AColor.cpp:354
MenuTable::Command
std::unique_ptr< CommandItem > Command(const CommandID &name, const TranslatableString &label_in, void(Handler::*pmf)(const CommandContext &), CommandFlag flags, const CommandManager::Options &options={}, CommandHandlerFinder finder=FinderScope::DefaultFinder())
Definition: CommandManager.h:662
AudacityProject
The top-level handle to an Audacity project. It serves as a source of events that other objects can b...
Definition: Project.h:113
TrackMenuTable::OnSetName
void OnSetName(wxCommandEvent &)
Definition: CommonTrackControls.cpp:225
SetTrackNameCommand::GetSymbol
ComponentInterfaceSymbol GetSymbol() override
Definition: CommonTrackControls.cpp:198
TrackUtilities::OnMoveBottomID
@ OnMoveBottomID
Definition: TrackUtilities.h:20
TrackInfo::GetMinimizeRect
AUDACITY_DLL_API void GetMinimizeRect(const wxRect &rect, wxRect &dest)
Definition: TrackInfo.cpp:507
TrackPanelMouseState
Definition: TrackPanelMouseEvent.h:28
TrackUtilities::OnMoveUpID
@ OnMoveUpID
Definition: TrackUtilities.h:20
Verbatim
TranslatableString Verbatim(wxString str)
Require calls to the one-argument constructor to go through this distinct global function name.
Definition: TranslatableString.h:321
TrackButtonHandles.h
MinimizeButtonHandle::HitTest
static UIHandlePtr HitTest(std::weak_ptr< MinimizeButtonHandle > &holder, const wxMouseState &state, const wxRect &rect, TrackPanelCell *pCell)
Definition: TrackButtonHandles.cpp:69
TrackArtist::PassMargins
@ PassMargins
Definition: TrackArtist.h:76
CommandManager::Get
static CommandManager & Get(AudacityProject &project)
Definition: CommandManager.cpp:203
OnMoveBottomID
@ OnMoveBottomID
Definition: CommonTrackControls.cpp:78
OnMoveDownID
@ OnMoveDownID
Definition: CommonTrackControls.cpp:76
SetTrackNameCommand::mName
wxString mName
Definition: CommonTrackControls.cpp:208
RefreshCode
Namespace containing an enum 'what to do on a refresh?'.
Definition: RefreshCode.h:16
CommonTrackControls::InitMenuData::pTrack
Track * pTrack
Definition: CommonTrackControls.h:37
TrackUtilities::DoMoveTrack
void DoMoveTrack(AudacityProject &project, Track *target, MoveChoice choice)
Move a track up, down, to top or to bottom.
Definition: TrackUtilities.cpp:199
CommonTrackControls::Draw
void Draw(TrackPanelDrawingContext &context, const wxRect &rect, unsigned iPass) override
Definition: CommonTrackControls.cpp:357
SetTrackNameCommand
Definition: CommonTrackControls.cpp:193
CommonTrackControls::GetMenuExtension
virtual PopupMenuTable * GetMenuExtension(Track *pTrack)=0
TrackSelectHandle.h
TrackPanelMouseState::state
wxMouseState & state
Definition: TrackPanelMouseEvent.h:38
ProjectHistory::Get
static ProjectHistory & Get(AudacityProject &project)
Definition: ProjectHistory.cpp:26
PopupMenuTable::ExtendMenu
static void ExtendMenu(wxMenu &menu, PopupMenuTable &otherTable)
Definition: PopupMenuTable.cpp:139
EndSection
EndSection()
SetTrackNameCommand::Symbol
static const ComponentInterfaceSymbol Symbol
Definition: CommonTrackControls.cpp:195
ShuttleGui
Derived from ShuttleGuiBase, an Audacity specific class for shuttling data to and from GUI.
Definition: ShuttleGui.h:631
CommonTrackControls::DoContextMenu
unsigned DoContextMenu(const wxRect &rect, wxWindow *pParent, wxPoint *pPosition, AudacityProject *pProject) override
Definition: CommonTrackControls.cpp:277
END_POPUP_MENU
#define END_POPUP_MENU()
Definition: PopupMenuTable.h:320
PopupMenuTable::BuildMenu
static std::unique_ptr< wxMenu > BuildMenu(wxEvtHandler *pParent, PopupMenuTable *pTable, void *pUserData=NULL)
Definition: PopupMenuTable.cpp:218