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