Audacity 3.2.0
|
ASlider is a custom slider, allowing for a slicker look and feel. More...
#include <ASlider.h>
Classes | |
struct | Options |
struct | Resetter |
Public Member Functions | |
ASlider (wxWindow *parent, wxWindowID id, const TranslatableString &name, const wxPoint &pos, const wxSize &size, const Options &options=Options{}) | |
virtual | ~ASlider () |
bool | AcceptsFocus () const override |
bool | AcceptsFocusFromKeyboard () const override |
void | SetFocusFromKbd () override |
bool | SetBackgroundColour (const wxColour &colour) override |
void | GetScroll (float &line, float &page) |
void | SetScroll (float line, float page) |
void | SetToolTipTemplate (const TranslatableString &tip) |
float | Get (bool convert=true) |
void | Set (float value) |
void | Increase (float steps) |
void | Decrease (float steps) |
bool | ShowDialog (wxPoint pos=wxPoint(-1, -1)) |
void | SetSpeed (float speed) |
void | OnErase (wxEraseEvent &event) |
void | OnPaint (wxPaintEvent &event) |
void | OnSize (wxSizeEvent &event) |
void | OnMouseEvent (wxMouseEvent &event) |
void | OnCaptureLost (wxMouseCaptureLostEvent &event) |
void | OnKeyDown (wxKeyEvent &event) |
void | OnSlider (wxCommandEvent &event) |
void | OnSetFocus (wxFocusEvent &event) |
void | OnKillFocus (wxFocusEvent &event) |
void | OnTimer (wxTimerEvent &event) |
bool | Enable (bool enable=true) override |
bool | IsEnabled () const |
Static Public Member Functions | |
static TempAllowFocus | TemporarilyAllowFocus () |
Protected Attributes | |
int | mStyle |
Private Types | |
using | TempAllowFocus = std::unique_ptr< bool, Resetter > |
Private Attributes | |
std::unique_ptr< LWSlider > | mLWSlider |
bool | mSliderIsFocused |
wxTimer | mTimer |
Static Private Attributes | |
static bool | s_AcceptsFocus { false } |
Friends | |
class | ASliderAx |
ASlider is a custom slider, allowing for a slicker look and feel.
It allows you to use images for the slider background and the thumb.
|
private |
ASlider::ASlider | ( | wxWindow * | parent, |
wxWindowID | id, | ||
const TranslatableString & | name, | ||
const wxPoint & | pos, | ||
const wxSize & | size, | ||
const Options & | options = Options{} |
||
) |
Definition at line 1697 of file ASlider.cpp.
References ThemeBase::Colour(), name, safenew, size, and theTheme.
|
virtual |
Definition at line 1737 of file ASlider.cpp.
|
inlineoverride |
void ASlider::Decrease | ( | float | steps | ) |
Definition at line 1874 of file ASlider.cpp.
References mLWSlider.
Referenced by TranscriptionToolBar::AdjustPlaySpeed().
|
override |
Definition at line 1889 of file ASlider.cpp.
References mLWSlider.
float ASlider::Get | ( | bool | convert = true | ) |
Definition at line 1859 of file ASlider.cpp.
References mLWSlider.
Referenced by TranscriptionToolBar::Create(), SliderDialog::Get(), MixerTrackCluster::HandleSliderGain(), MixerTrackCluster::HandleSliderPan(), MixerTrackCluster::HandleSliderVelocity(), TranscriptionToolBar::OnSpeedSlider(), and SliderDialog::TransferDataToWindow().
void ASlider::GetScroll | ( | float & | line, |
float & | page | ||
) |
Definition at line 1844 of file ASlider.cpp.
References mLWSlider.
void ASlider::Increase | ( | float | steps | ) |
Definition at line 1869 of file ASlider.cpp.
References mLWSlider.
Referenced by TranscriptionToolBar::AdjustPlaySpeed().
bool ASlider::IsEnabled | ( | ) | const |
Definition at line 1901 of file ASlider.cpp.
References mLWSlider.
void ASlider::OnCaptureLost | ( | wxMouseCaptureLostEvent & | event | ) |
Definition at line 1815 of file ASlider.cpp.
References mLWSlider.
void ASlider::OnErase | ( | wxEraseEvent & | event | ) |
Definition at line 1776 of file ASlider.cpp.
void ASlider::OnKeyDown | ( | wxKeyEvent & | event | ) |
Definition at line 1821 of file ASlider.cpp.
References mLWSlider.
void ASlider::OnKillFocus | ( | wxFocusEvent & | event | ) |
Definition at line 1832 of file ASlider.cpp.
References mLWSlider, and mSliderIsFocused.
void ASlider::OnMouseEvent | ( | wxMouseEvent & | event | ) |
Definition at line 1801 of file ASlider.cpp.
References mLWSlider, and mTimer.
Referenced by MixerTrackSlider::OnMouseEvent().
void ASlider::OnPaint | ( | wxPaintEvent & | event | ) |
Definition at line 1781 of file ASlider.cpp.
References AColor::DrawFocus(), mLWSlider, and mSliderIsFocused.
void ASlider::OnSetFocus | ( | wxFocusEvent & | event | ) |
Definition at line 1826 of file ASlider.cpp.
References mSliderIsFocused.
void ASlider::OnSize | ( | wxSizeEvent & | event | ) |
Definition at line 1771 of file ASlider.cpp.
References mLWSlider.
void ASlider::OnSlider | ( | wxCommandEvent & | event | ) |
Definition at line 1755 of file ASlider.cpp.
References mLWSlider.
void ASlider::OnTimer | ( | wxTimerEvent & | event | ) |
Definition at line 1839 of file ASlider.cpp.
References mLWSlider.
void ASlider::Set | ( | float | value | ) |
Definition at line 1864 of file ASlider.cpp.
References mLWSlider.
Referenced by TranscriptionToolBar::Populate(), SliderDialog::TransferDataFromWindow(), and MixerTrackCluster::UpdateForStateChange().
|
override |
Definition at line 1743 of file ASlider.cpp.
References mLWSlider.
Referenced by MixerTrackCluster::OnPaint().
|
override |
Definition at line 1916 of file ASlider.cpp.
References BasicUI::SetFocus(), and TemporarilyAllowFocus().
void ASlider::SetScroll | ( | float | line, |
float | page | ||
) |
Definition at line 1849 of file ASlider.cpp.
References mLWSlider.
void ASlider::SetSpeed | ( | float | speed | ) |
Definition at line 1884 of file ASlider.cpp.
References mLWSlider.
void ASlider::SetToolTipTemplate | ( | const TranslatableString & | tip | ) |
Definition at line 1854 of file ASlider.cpp.
References mLWSlider.
bool ASlider::ShowDialog | ( | wxPoint | pos = wxPoint(-1, -1) | ) |
Definition at line 1879 of file ASlider.cpp.
References mLWSlider.
Referenced by TranscriptionToolBar::ShowPlaySpeedDialog().
|
static |
Definition at line 1908 of file ASlider.cpp.
Referenced by anonymous_namespace{NavigationMenus.cpp}::NextOrPrevFrame(), ToolManager::RestoreFocus(), and SetFocusFromKbd().
|
private |
Definition at line 348 of file ASlider.h.
Referenced by Decrease(), Enable(), Get(), GetScroll(), Increase(), IsEnabled(), OnCaptureLost(), OnKeyDown(), OnKillFocus(), OnMouseEvent(), OnPaint(), OnSize(), OnSlider(), OnTimer(), Set(), SetBackgroundColour(), SetScroll(), SetSpeed(), SetToolTipTemplate(), and ShowDialog().
|
private |
Definition at line 349 of file ASlider.h.
Referenced by OnKillFocus(), OnPaint(), and OnSetFocus().
|
protected |
Definition at line 353 of file ASlider.h.
Referenced by MixerTrackSlider::OnMouseEvent().
|
private |
Definition at line 350 of file ASlider.h.
Referenced by OnMouseEvent().