Audacity  3.0.3
Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes | List of all members
TimeToolBar Class Referencefinal

#include <TimeToolBar.h>

Inheritance diagram for TimeToolBar:
[legend]
Collaboration diagram for TimeToolBar:
[legend]

Public Member Functions

 TimeToolBar (AudacityProject &project)
 
virtual ~TimeToolBar ()
 
void Populate () override
 
void Repaint (wxDC *WXUNUSED(dc)) override
 
void EnableDisableButtons () override
 
void UpdatePrefs () override
 
void RegenerateTooltips () override
 
int GetInitialWidth () override
 Resizable toolbars should implement these. More...
 
int GetMinToolbarWidth () override
 
void SetToDefaultSize () override
 
wxSize GetDockedSize () override
 
void SetDocked (ToolDock *dock, bool pushed) override
 
void SetListener (TimeToolBarListener *l)
 
void SetAudioTimeFormat (const NumericFormatSymbol &format)
 
void ResizingDone () override
 
- Public Member Functions inherited from ToolBar
 ToolBar (AudacityProject &project, int type, const TranslatableString &label, const wxString &section, bool resizable=false)
 
virtual ~ToolBar ()
 
bool AcceptsFocus () const override
 
virtual void Create (wxWindow *parent)
 
virtual void ReCreateButtons ()
 
void UpdatePrefs () override
 
int GetType ()
 
TranslatableString GetTitle ()
 
TranslatableString GetLabel ()
 
wxString GetSection ()
 
ToolDockGetDock ()
 
void SetLabel (const TranslatableString &label)
 
virtual bool Expose (bool show=true)
 
bool IsResizable () const
 
bool IsVisible () const
 
bool IsDocked () const
 
bool IsPositioned ()
 
void SetVisible (bool bVisible)
 
void SetPositioned ()
 
wxSize GetSmartDockedSize ()
 
- Public Member Functions inherited from wxPanelWrapper
 wxPanelWrapper ()
 
 wxPanelWrapper (wxWindow *parent, wxWindowID winid=wxID_ANY, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxTAB_TRAVERSAL|wxNO_BORDER, const TranslatableString &name=XO("Panel"))
 
bool Create (wxWindow *parent, wxWindowID winid=wxID_ANY, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxTAB_TRAVERSAL|wxNO_BORDER, const TranslatableString &name=XO("Panel"))
 
void SetLabel (const TranslatableString &label)
 
void SetName (const TranslatableString &name)
 
void SetToolTip (const TranslatableString &toolTip)
 
void SetName ()
 
- Public Member Functions inherited from wxTabTraversalWrapper< wxPanel >
 wxTabTraversalWrapper (Args &&... args)
 
 wxTabTraversalWrapper (const wxTabTraversalWrapper &)=delete
 
 wxTabTraversalWrapper (wxTabTraversalWrapper &&)=delete
 
wxTabTraversalWrapperoperator= (const wxTabTraversalWrapper &)=delete
 
wxTabTraversalWrapperoperator= (wxTabTraversalWrapper &&)=delete
 

Static Public Member Functions

static TimeToolBarGet (AudacityProject &project)
 
static const TimeToolBarGet (const AudacityProject &project)
 
- Static Public Member Functions inherited from ToolBar
static AButtonMakeButton (wxWindow *parent, teBmps eUp, teBmps eDown, teBmps eHilite, teBmps eDownHi, teBmps eStandardUp, teBmps eStandardDown, teBmps eDisabled, wxWindowID id, wxPoint placement, bool processdownevents, wxSize size)
 
static void MakeAlternateImages (AButton &button, int idx, teBmps eUp, teBmps eDown, teBmps eHilite, teBmps eDownHi, teBmps eStandardUp, teBmps eStandardDown, teBmps eDisabled, wxSize size)
 
static void SetButtonToolTip (AudacityProject &project, AButton &button, const ComponentInterfaceSymbol commands[], size_t nCommands)
 
static void MakeButtonBackgroundsSmall ()
 
static void MakeButtonBackgroundsLarge ()
 

Private Member Functions

void SetResizingLimits ()
 
wxSize ComputeSizing (int digitH)
 
void OnRateChanged (wxEvent &evt)
 
void OnUpdate (wxCommandEvent &evt)
 
void OnSize (wxSizeEvent &evt)
 
void OnIdle (wxIdleEvent &evt)
 

Private Attributes

TimeToolBarListenermListener
 
NumericTextCtrlmAudioTime
 
float mDigitRatio
 
bool mSettingInitialSize
 

Static Private Attributes

static const int minDigitH = 17
 
static const int maxDigitH = 100
 

Additional Inherited Members

- Public Types inherited from ToolBar
using Holder = wxWindowPtr< ToolBar >
 
- Protected Member Functions inherited from ToolBar
void SetButton (bool down, AButton *button)
 
wxBoxSizer * GetSizer ()
 
void Add (wxWindow *window, int proportion=0, int flag=wxALIGN_TOP, int border=0, wxObject *userData=NULL)
 
void Add (wxSizer *sizer, int proportion=0, int flag=0, int border=0, wxObject *userData=NULL)
 
void Add (int width, int height, int proportion=0, int flag=0, int border=0, wxObject *userData=NULL)
 
void AddSpacer (int size=14)
 
void AddStretchSpacer (int prop=1)
 
void Detach (wxWindow *window)
 
void Detach (wxSizer *sizer)
 
void Updated ()
 
int GetResizeGrabberWidth ()
 Returns the width in pixels of the resizer element. More...
 
virtual void Repaint (wxDC *dc)=0
 
void OnErase (wxEraseEvent &event)
 
void OnPaint (wxPaintEvent &event)
 
void OnMouseEvents (wxMouseEvent &event)
 
- Protected Member Functions inherited from PrefsListener
virtual void UpdateSelectedPrefs (int id)
 
 PrefsListener ()
 
virtual ~PrefsListener ()
 
- Static Protected Member Functions inherited from ToolBar
static void MakeMacRecoloredImage (teBmps eBmpOut, teBmps eBmpIn)
 
static void MakeRecoloredImage (teBmps eBmpOut, teBmps eBmpIn)
 
- Static Protected Member Functions inherited from PrefsListener
static void Broadcast (int id=0)
 Call this static function to notify all PrefsListener objects. More...
 
- Protected Attributes inherited from ToolBar
AudacityProjectmProject
 
TranslatableString mLabel
 
wxString mSection
 
int mType
 

Detailed Description

Definition at line 22 of file TimeToolBar.h.

Constructor & Destructor Documentation

◆ TimeToolBar()

TimeToolBar::TimeToolBar ( AudacityProject project)

Definition at line 52 of file TimeToolBar.cpp.

53 : ToolBar(project, TimeBarID, XO("Time"), wxT("Time"), true),
54  mListener(NULL),
55  mAudioTime(NULL)
56 {
57  project.Bind(EVT_PROJECT_RATE_CHANGE, &TimeToolBar::OnRateChanged, this);
58 }

References OnRateChanged().

Here is the call graph for this function:

◆ ~TimeToolBar()

TimeToolBar::~TimeToolBar ( )
virtual

Definition at line 60 of file TimeToolBar.cpp.

61 {
62 }

Member Function Documentation

◆ ComputeSizing()

wxSize TimeToolBar::ComputeSizing ( int  digitH)
inlineprivate

Definition at line 68 of file TimeToolBar.h.

69 {
70  return mAudioTime->ComputeSizing(false, digitH * mDigitRatio, digitH);
71 }

References NumericTextCtrl::ComputeSizing(), mAudioTime, and mDigitRatio.

Referenced by OnSize(), and SetResizingLimits().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ EnableDisableButtons()

void TimeToolBar::EnableDisableButtons ( )
inlineoverridevirtual

Implements ToolBar.

Definition at line 33 of file TimeToolBar.h.

33 {};

◆ Get() [1/2]

TimeToolBar & TimeToolBar::Get ( AudacityProject project)
static

Definition at line 64 of file TimeToolBar.cpp.

65 {
66  auto &toolManager = ToolManager::Get(project);
67  return *static_cast<TimeToolBar*>(toolManager.GetToolBar(TimeBarID));
68 }

References ToolManager::Get(), and TimeBarID.

Referenced by Get(), ProjectManager::New(), and ProjectSelectionManager::TT_SetAudioTimeFormat().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Get() [2/2]

const TimeToolBar & TimeToolBar::Get ( const AudacityProject project)
static

Definition at line 70 of file TimeToolBar.cpp.

71 {
72  return Get(const_cast<AudacityProject&>(project)) ;
73 }

References Get().

Here is the call graph for this function:

◆ GetDockedSize()

wxSize TimeToolBar::GetDockedSize ( )
overridevirtual

Reimplemented from ToolBar.

Definition at line 137 of file TimeToolBar.cpp.

138 {
139  wxSize sz = GetSize();
140 
141  // Anything less than a single height bar becomes single height
142  if (sz.y <= toolbarSingle) {
143  sz.y = toolbarSingle;
144  }
145  // Otherwise it will be a double height bar
146  else {
147  sz.y = 2 * toolbarSingle + toolbarGap;
148  }
149 
150  return sz;
151 }

References toolbarGap, and toolbarSingle.

◆ GetInitialWidth()

int TimeToolBar::GetInitialWidth ( )
inlineoverridevirtual

Resizable toolbars should implement these.

Reimplemented from ToolBar.

Definition at line 36 of file TimeToolBar.h.

36 {return 250;}

Referenced by SetToDefaultSize().

Here is the caller graph for this function:

◆ GetMinToolbarWidth()

int TimeToolBar::GetMinToolbarWidth ( )
inlineoverridevirtual

Reimplemented from ToolBar.

Definition at line 37 of file TimeToolBar.h.

37 {return 50;}

◆ OnIdle()

void TimeToolBar::OnIdle ( wxIdleEvent &  evt)
private

Definition at line 356 of file TimeToolBar.cpp.

357 {
358  evt.Skip();
359 
360  double audioTime;
361 
362  auto &projectAudioIO = ProjectAudioIO::Get(mProject);
363  if (projectAudioIO.IsAudioActive()) {
364  auto gAudioIO = AudioIO::Get();
365  audioTime = gAudioIO->GetStreamTime();
366  }
367  else {
368  const auto &playRegion = ViewInfo::Get(mProject).playRegion;
369  audioTime = playRegion.GetStart();
370  }
371 
372  mAudioTime->SetValue(wxMax(0.0, audioTime));
373 }

References AudioIO::Get(), ViewInfo::Get(), ProjectAudioIO::Get(), PlayRegion::GetStart(), mAudioTime, ToolBar::mProject, ViewInfo::playRegion, and NumericTextCtrl::SetValue().

Here is the call graph for this function:

◆ OnRateChanged()

void TimeToolBar::OnRateChanged ( wxEvent &  evt)
private

Definition at line 266 of file TimeToolBar.cpp.

267 {
268  evt.Skip();
269 
270  if (mAudioTime) {
272  }
273 }

References ProjectRate::Get(), anonymous_namespace{TimeTrack.cpp}::GetRate(), mAudioTime, ToolBar::mProject, and NumericTextCtrl::SetSampleRate().

Referenced by TimeToolBar().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ OnSize()

void TimeToolBar::OnSize ( wxSizeEvent &  evt)
private

Definition at line 310 of file TimeToolBar.cpp.

311 {
312  evt.Skip();
313 
314  // Can fire before we're ready
315  if (!mAudioTime) {
316  return;
317  }
318 
319  // Make sure everything is where it's supposed to be
320  Layout();
321 
322  // Get the sizer's size and remove any borders the time control might have.
323  wxSize sizerBR = GetSizer()->GetSize() - (mAudioTime->GetSize() - mAudioTime->GetClientSize());
324 
325  // Get the content size of the time control. This can be different than the
326  // control itself due to borders and sizer enduced changes.
327  wxSize timeBR = mAudioTime->GetDimensions();
328 
329  // Get the current digit box height
330  int h = mAudioTime->GetDigitSize().y;
331 
332  // Increase current size to find the best fit within the new size
333  if (sizerBR.x >= timeBR.x && sizerBR.y >= timeBR.y) {
334  do {
335  h++;
336  timeBR = ComputeSizing(h);
337  } while (h < maxDigitH && sizerBR.x >= timeBR.x && sizerBR.y >= timeBR.y);
338  h--;
339  }
340  // In all other cases, we need to decrease current size to fit within new size
341  else if (sizerBR.x < timeBR.x || sizerBR.y < timeBR.y) {
342  do {
343  h--;
344  timeBR = ComputeSizing(h);
345  } while (h >= minDigitH && (sizerBR.x < timeBR.x || sizerBR.y < timeBR.y));
346  }
347 
348  if (h != mAudioTime->GetDigitSize().y) {
350  }
351 
352  // Redraw the display immediately to smooth out resizing
353  Update();
354 }

References ComputeSizing(), NumericTextCtrl::GetDigitSize(), NumericTextCtrl::GetDimensions(), ToolBar::GetSizer(), mAudioTime, mDigitRatio, minDigitH, and NumericTextCtrl::SetDigitSize().

Here is the call graph for this function:

◆ OnUpdate()

void TimeToolBar::OnUpdate ( wxCommandEvent &  evt)
private

Definition at line 277 of file TimeToolBar.cpp.

278 {
279  evt.Skip(false);
280 
281  // Reset to allow resizing to work
282  SetMinSize(wxDefaultSize);
283  SetMaxSize(wxDefaultSize);
284 
285  // Save format name before recreating the controls so they resize properly
286  if (mListener) {
288  }
289 
290  // During initialization, the desired size will have already been set at this point
291  // and the "best" size" would override it, so we simply send a size event to force
292  // the content to fit inside the toolbar.
293  if (mSettingInitialSize) {
294  mSettingInitialSize = false;
295  SendSizeEvent();
296  }
297  // Otherwise we want the toolbar to resize to fit around the content
298  else {
299  // Fit() while retaining height
300  SetSize(GetBestSize().x, GetSize().y);
301  }
302 
303  // Go set the new size limits
305 
306  // Inform others the toobar has changed
307  Updated();
308 }

References NumericConverter::GetBuiltinName(), mAudioTime, mListener, mSettingInitialSize, SetResizingLimits(), TimeToolBarListener::TT_SetAudioTimeFormat(), and ToolBar::Updated().

Referenced by SetAudioTimeFormat(), SetListener(), and UpdatePrefs().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Populate()

void TimeToolBar::Populate ( )
overridevirtual

Implements ToolBar.

Definition at line 75 of file TimeToolBar.cpp.

76 {
77  const auto &settings = ProjectSettings::Get(mProject);
78 
79  // Get the default sample rate
80  auto rate = ProjectRate::Get(mProject).GetRate();
81 
82  // Get the default time format
83  auto format = settings.GetAudioTimeFormat();
84 
85  // Create the read-only time control
87  mAudioTime->SetName(XO("Audio Position"));
88  mAudioTime->SetReadOnly(true);
89 
90  // Add it to the toolbar
91  Add(mAudioTime, 0, wxALIGN_CENTER, 0);
92 
93  // Calculate the width to height ratio
94  wxSize digitSize = mAudioTime->GetDigitSize();
95  mDigitRatio = (float)digitSize.x / digitSize.y;
96 
97  // During initialization, we need to bypass some resizing to prevent the "best size"
98  // from being used as we want to ensure the saved size is used instead. See SetDocked()
99  // and OnUpdate() for more info.
100  mSettingInitialSize = true;
101 
102  // Establish initial resizing limits
103 // SetResizingLimits();
104 }

References ToolBar::Add(), AudioPositionID, format, ProjectRate::Get(), ProjectSettings::Get(), NumericTextCtrl::GetDigitSize(), ProjectRate::GetRate(), mAudioTime, mDigitRatio, ToolBar::mProject, mSettingInitialSize, safenew, NumericTextCtrl::SetName(), NumericTextCtrl::SetReadOnly(), settings(), NumericConverter::TIME, and XO.

Here is the call graph for this function:

◆ RegenerateTooltips()

void TimeToolBar::RegenerateTooltips ( )
inlineoverridevirtual

Implements ToolBar.

Definition at line 35 of file TimeToolBar.h.

35 {};

◆ Repaint()

void TimeToolBar::Repaint ( wxDC *  WXUNUSEDdc)
inlineoverride

Definition at line 32 of file TimeToolBar.h.

32 {};

◆ ResizingDone()

void TimeToolBar::ResizingDone ( )
overridevirtual

Reimplemented from ToolBar.

Definition at line 208 of file TimeToolBar.cpp.

209 {
210  // Fit() while retaining height
211  SetSize(GetBestSize().x, GetSize().y);
212 
213  // Inform others the toobar has changed
214  Updated();
215 }

References ToolBar::Updated().

Here is the call graph for this function:

◆ SetAudioTimeFormat()

void TimeToolBar::SetAudioTimeFormat ( const NumericFormatSymbol format)

Definition at line 195 of file TimeToolBar.cpp.

196 {
197  // Set the format if it's different from previous
199  // Simulate an update since the format has changed.
200  wxCommandEvent e;
201  e.SetInt(mAudioTime->GetFormatIndex());
202  OnUpdate(e);
203  }
204 }

References format, NumericConverter::GetBuiltinFormat(), NumericConverter::GetFormatIndex(), mAudioTime, OnUpdate(), and NumericTextCtrl::SetFormatString().

Referenced by SetListener(), SetToDefaultSize(), and ProjectSelectionManager::TT_SetAudioTimeFormat().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ SetDocked()

void TimeToolBar::SetDocked ( ToolDock dock,
bool  pushed 
)
overridevirtual

Reimplemented from ToolBar.

Definition at line 153 of file TimeToolBar.cpp.

154 {
155  // It's important to call this FIRST since it unhides the resizer control.
156  // Not doing so causes the calculated best size to be off by the width
157  // of the resizer.
158  ToolBar::SetDocked(dock, pushed);
159 
160  // Recalculate the min and max limits
162 
163  // When moving from floater to dock, fit to toolbar since the resizer will
164  // be mispositioned
165  if (dock) {
166  // During initialization, the desired size is already set, so do not
167  // override it with the "best size". See OnUpdate for further info.
168  if (!mSettingInitialSize) {
169  // Fit() while retaining height
170  SetSize(GetBestSize().x, GetSize().y);
171 
172  // Inform others the toolbar has changed
173  Updated();
174  }
175  }
176 }

References mSettingInitialSize, ToolBar::SetDocked(), SetResizingLimits(), and ToolBar::Updated().

Here is the call graph for this function:

◆ SetListener()

void TimeToolBar::SetListener ( TimeToolBarListener l)

Definition at line 178 of file TimeToolBar.cpp.

179 {
180  // Remember the listener
181  mListener = l;
182 
183  // Get (and set) the saved time format
185 
186  // During initialization, if the saved format is the same as the default,
187  // OnUpdate() will not be called and need it to set the initial size.
188  if (mSettingInitialSize) {
189  wxCommandEvent e;
190  e.SetInt(mAudioTime->GetFormatIndex());
191  OnUpdate(e);
192  }
193 }

References NumericConverter::GetFormatIndex(), mAudioTime, mListener, mSettingInitialSize, OnUpdate(), SetAudioTimeFormat(), and TimeToolBarListener::TT_GetAudioTimeFormat().

Referenced by ProjectManager::New().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ SetResizingLimits()

void TimeToolBar::SetResizingLimits ( )
private

Definition at line 217 of file TimeToolBar.cpp.

218 {
219  // Reset limits
220  SetMinSize(wxDefaultSize);
221  SetMaxSize(wxDefaultSize);
222 
223  // If docked we use the current bar height since it's always a single or double height
224  // toolbar. For floaters, single height toolbar is the minimum height.
225  int minH = IsDocked() ? GetSize().y : toolbarSingle;
226 
227  // Get the content size given the smallest digit height we allow
228  wxSize minSize = ComputeSizing(minDigitH);
229 
230  // Account for any borders added by the window manager
231  minSize.x += (mAudioTime->GetSize().x - mAudioTime->GetClientSize().x);
232 
233  // Calculate the space used by other controls and sizer borders with this toolbar
234  wxSize outer = (GetSize() - GetSizer()->GetSize());
235 
236  // And account for them in the width
237  minSize.x += outer.x;
238 
239  // Override the height
240  minSize.y = minH;
241 
242  // Get the maximum digit height we can use. This is restricted to the toolbar's
243  // current height minus any control borders
244  int digH = minH - (mAudioTime->GetSize().y - mAudioTime->GetClientSize().y);
245 
246  // Get the content size using the digit height, if docked. Otherwise use the
247  // maximum digit height we allow.
248  wxSize maxSize = ComputeSizing(IsDocked() ? digH : maxDigitH);
249 
250  // Account for the other controls and sizer borders within this toolbar
251  maxSize.x += outer.x;
252 
253  // Account for any borders added by the window manager and +1 to keep toolbar
254  // from dropping to next smaller size when grabbing the resizer.
255  maxSize.x += (mAudioTime->GetSize().x - mAudioTime->GetClientSize().x) + 1;
256 
257  // Override the height
258  maxSize.y = IsDocked() ? minH : wxDefaultCoord;
259 
260  // And finally set them both
261  SetMinSize(minSize);
262  SetMaxSize(maxSize);
263 }

References ComputeSizing(), ToolBar::GetSizer(), ToolBar::IsDocked(), mAudioTime, maxDigitH, minDigitH, outer, and toolbarSingle.

Referenced by OnUpdate(), and SetDocked().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ SetToDefaultSize()

void TimeToolBar::SetToDefaultSize ( )
overridevirtual

Reimplemented from ToolBar.

Definition at line 121 of file TimeToolBar.cpp.

122 {
123  // Reset
124  SetMaxSize(wxDefaultSize);
125  SetMinSize(wxDefaultSize);
126 
127  // Set the default time format
129 
130  // Set the default size
131  SetSize(GetInitialWidth(), 48);
132 
133  // Inform others the toobar has changed
134  Updated();
135 }

References GetInitialWidth(), NumericConverter::HoursMinsSecondsFormat(), SetAudioTimeFormat(), and ToolBar::Updated().

Here is the call graph for this function:

◆ UpdatePrefs()

void TimeToolBar::UpdatePrefs ( )
overridevirtual

Implements PrefsListener.

Definition at line 106 of file TimeToolBar.cpp.

107 {
108  // Since the language may have changed, we need to force an update to accommodate
109  // different length text
110  wxCommandEvent e;
111  e.SetInt(mAudioTime->GetFormatIndex());
112  OnUpdate(e);
113 
114  // Language may have changed so reset label
115  SetLabel(XO("Time"));
116 
117  // Give the toolbar a chance
119 }

References NumericConverter::GetFormatIndex(), mAudioTime, OnUpdate(), ToolBar::SetLabel(), ToolBar::UpdatePrefs(), and XO.

Here is the call graph for this function:

Member Data Documentation

◆ mAudioTime

NumericTextCtrl* TimeToolBar::mAudioTime
private

◆ maxDigitH

const int TimeToolBar::maxDigitH = 100
staticprivate

Definition at line 60 of file TimeToolBar.h.

Referenced by SetResizingLimits().

◆ mDigitRatio

float TimeToolBar::mDigitRatio
private

Definition at line 56 of file TimeToolBar.h.

Referenced by ComputeSizing(), OnSize(), and Populate().

◆ minDigitH

const int TimeToolBar::minDigitH = 17
staticprivate

Definition at line 59 of file TimeToolBar.h.

Referenced by OnSize(), and SetResizingLimits().

◆ mListener

TimeToolBarListener* TimeToolBar::mListener
private

Definition at line 54 of file TimeToolBar.h.

Referenced by OnUpdate(), and SetListener().

◆ mSettingInitialSize

bool TimeToolBar::mSettingInitialSize
private

Definition at line 57 of file TimeToolBar.h.

Referenced by OnUpdate(), Populate(), SetDocked(), and SetListener().


The documentation for this class was generated from the following files:
toolbarGap
#define toolbarGap
Definition: ToolBar.h:64
TimeBarID
@ TimeBarID
Definition: ToolBar.h:86
ViewInfo::Get
static ViewInfo & Get(AudacityProject &project)
Definition: ViewInfo.cpp:241
TimeToolBar::mSettingInitialSize
bool mSettingInitialSize
Definition: TimeToolBar.h:57
TimeToolBar::mDigitRatio
float mDigitRatio
Definition: TimeToolBar.h:56
outer
static const wxPoint2DDouble outer[]
Definition: ASlider.cpp:395
TimeToolBar::mListener
TimeToolBarListener * mListener
Definition: TimeToolBar.h:54
ViewInfo::playRegion
PlayRegion playRegion
Definition: ViewInfo.h:230
ProjectRate::Get
static ProjectRate & Get(AudacityProject &project)
Definition: ProjectRate.cpp:42
NumericTextCtrl::SetFormatString
bool SetFormatString(const FormatStrings &formatString)
Definition: NumericTextCtrl.cpp:1451
ToolBar::mProject
AudacityProject & mProject
Definition: ToolBar.h:235
ToolBar::SetLabel
void SetLabel(const wxString &label) override
Definition: ToolBar.cpp:398
ToolManager::Get
static ToolManager & Get(AudacityProject &project)
Definition: ToolManager.cpp:356
PlayRegion::GetStart
double GetStart() const
Definition: ViewInfo.h:149
TimeToolBar::OnRateChanged
void OnRateChanged(wxEvent &evt)
Definition: TimeToolBar.cpp:266
NumericTextCtrl::SetName
void SetName(const TranslatableString &name)
Definition: NumericTextCtrl.cpp:1422
NumericTextCtrl::GetDigitSize
wxSize GetDigitSize()
Definition: NumericTextCtrl.h:232
XO
#define XO(s)
Definition: Internat.h:31
ToolBar::GetSizer
wxBoxSizer * GetSizer()
Definition: ToolBar.cpp:678
ProjectSettings::Get
static ProjectSettings & Get(AudacityProject &project)
Definition: ProjectSettings.cpp:44
NumericTextCtrl::SetDigitSize
void SetDigitSize(int width, int height)
Definition: NumericTextCtrl.cpp:1481
NumericTextCtrl::ComputeSizing
wxSize ComputeSizing(bool update=true, wxCoord digitW=0, wxCoord digitH=0)
Definition: NumericTextCtrl.cpp:1521
ProjectAudioIO::Get
static ProjectAudioIO & Get(AudacityProject &project)
Definition: ProjectAudioIO.cpp:22
NumericConverter::GetFormatIndex
int GetFormatIndex()
Definition: NumericTextCtrl.cpp:1180
NumericTextCtrl
Definition: NumericTextCtrl.h:172
NumericTextCtrl::SetValue
void SetValue(double newValue)
Definition: NumericTextCtrl.cpp:1474
TimeToolBar::ComputeSizing
wxSize ComputeSizing(int digitH)
Definition: TimeToolBar.h:68
NumericTextCtrl::SetSampleRate
void SetSampleRate(double sampleRate)
Definition: NumericTextCtrl.cpp:1465
NumericConverter::GetBuiltinFormat
FormatStrings GetBuiltinFormat(const int index)
Definition: NumericTextCtrl.cpp:1209
TimeToolBar::GetInitialWidth
int GetInitialWidth() override
Resizable toolbars should implement these.
Definition: TimeToolBar.h:36
ToolBar::ToolBar
ToolBar(AudacityProject &project, int type, const TranslatableString &label, const wxString &section, bool resizable=false)
Definition: ToolBar.cpp:330
anonymous_namespace{TimeTrack.cpp}::GetRate
double GetRate()
Definition: TimeTrack.cpp:175
ToolBar::UpdatePrefs
void UpdatePrefs() override
Definition: ToolBar.cpp:605
NumericConverter::TIME
@ TIME
Definition: NumericTextCtrl.h:52
format
int format
Definition: ExportPCM.cpp:56
NumericTextCtrl::SetReadOnly
void SetReadOnly(bool readOnly=true)
Definition: NumericTextCtrl.cpp:1489
ProjectRate::GetRate
double GetRate() const
Definition: ProjectRate.cpp:68
TimeToolBarListener::TT_SetAudioTimeFormat
virtual void TT_SetAudioTimeFormat(const NumericFormatSymbol &format)=0
NumericConverter::HoursMinsSecondsFormat
static NumericFormatSymbol HoursMinsSecondsFormat()
Definition: NumericTextCtrl.cpp:696
TimeToolBar::Get
static TimeToolBar & Get(AudacityProject &project)
Definition: TimeToolBar.cpp:64
ToolBar::IsDocked
bool IsDocked() const
Definition: ToolBar.cpp:423
TimeToolBar::mAudioTime
NumericTextCtrl * mAudioTime
Definition: TimeToolBar.h:55
NumericTextCtrl::GetDimensions
wxSize GetDimensions()
Definition: NumericTextCtrl.h:231
TimeToolBar::SetAudioTimeFormat
void SetAudioTimeFormat(const NumericFormatSymbol &format)
Definition: TimeToolBar.cpp:195
TimeToolBar::minDigitH
static const int minDigitH
Definition: TimeToolBar.h:59
NumericConverter::GetBuiltinName
NumericFormatSymbol GetBuiltinName(const int index)
Definition: NumericTextCtrl.cpp:1201
AudioPositionID
@ AudioPositionID
Definition: TimeToolBar.cpp:43
TimeToolBar
Definition: TimeToolBar.h:23
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
TimeToolBar::OnUpdate
void OnUpdate(wxCommandEvent &evt)
Definition: TimeToolBar.cpp:277
TimeToolBar::maxDigitH
static const int maxDigitH
Definition: TimeToolBar.h:60
ToolBar::SetDocked
virtual void SetDocked(ToolDock *dock, bool pushed)
Definition: ToolBar.cpp:638
ToolBar::Updated
void Updated()
Definition: ToolBar.cpp:661
AudioIO::Get
static AudioIO * Get()
Definition: AudioIO.cpp:141
TimeToolBar::SetResizingLimits
void SetResizingLimits()
Definition: TimeToolBar.cpp:217
safenew
#define safenew
Definition: MemoryX.h:10
settings
static Settings & settings()
Definition: TrackInfo.cpp:86
toolbarSingle
#define toolbarSingle
Definition: ToolBar.h:59
ToolBar::Add
void Add(wxWindow *window, int proportion=0, int flag=wxALIGN_TOP, int border=0, wxObject *userData=NULL)
Definition: ToolBar.cpp:686
TimeToolBarListener::TT_GetAudioTimeFormat
virtual const NumericFormatSymbol & TT_GetAudioTimeFormat()=0