mirror of
https://github.com/cookiengineer/audacity
synced 2025-06-16 16:10:06 +02:00
Various preliminaries for use of ShuttleGui in more places
This commit is contained in:
commit
9d05fc0c7d
@ -292,7 +292,7 @@ FrequencyPlotDialog::FrequencyPlotDialog(wxWindow * parent, wxWindowID id,
|
|||||||
S.StartVerticalLay(2);
|
S.StartVerticalLay(2);
|
||||||
{
|
{
|
||||||
vRuler = safenew RulerPanel(
|
vRuler = safenew RulerPanel(
|
||||||
this, wxID_ANY, wxVERTICAL,
|
S.GetParent(), wxID_ANY, wxVERTICAL,
|
||||||
wxSize{ 100, 100 }, // Ruler can't handle small sizes
|
wxSize{ 100, 100 }, // Ruler can't handle small sizes
|
||||||
RulerPanel::Range{ 0.0, -dBRange },
|
RulerPanel::Range{ 0.0, -dBRange },
|
||||||
Ruler::LinearDBFormat,
|
Ruler::LinearDBFormat,
|
||||||
@ -310,7 +310,7 @@ FrequencyPlotDialog::FrequencyPlotDialog(wxWindow * parent, wxWindowID id,
|
|||||||
}
|
}
|
||||||
S.EndVerticalLay();
|
S.EndVerticalLay();
|
||||||
|
|
||||||
mFreqPlot = safenew FreqPlot(this, wxID_ANY);
|
mFreqPlot = safenew FreqPlot(S.GetParent(), wxID_ANY);
|
||||||
S.Prop(1)
|
S.Prop(1)
|
||||||
.Position(wxEXPAND)
|
.Position(wxEXPAND)
|
||||||
.MinSize( { wxDefaultCoord, FREQ_WINDOW_HEIGHT } )
|
.MinSize( { wxDefaultCoord, FREQ_WINDOW_HEIGHT } )
|
||||||
@ -320,7 +320,7 @@ FrequencyPlotDialog::FrequencyPlotDialog(wxWindow * parent, wxWindowID id,
|
|||||||
{
|
{
|
||||||
S.StartVerticalLay();
|
S.StartVerticalLay();
|
||||||
{
|
{
|
||||||
mPanScroller = safenew wxScrollBar(this, FreqPanScrollerID,
|
mPanScroller = safenew wxScrollBar(S.GetParent(), FreqPanScrollerID,
|
||||||
wxDefaultPosition, wxDefaultSize, wxSB_VERTICAL);
|
wxDefaultPosition, wxDefaultSize, wxSB_VERTICAL);
|
||||||
#if wxUSE_ACCESSIBILITY
|
#if wxUSE_ACCESSIBILITY
|
||||||
// so that name can be set on a standard control
|
// so that name can be set on a standard control
|
||||||
@ -336,13 +336,13 @@ FrequencyPlotDialog::FrequencyPlotDialog(wxWindow * parent, wxWindowID id,
|
|||||||
|
|
||||||
S.StartVerticalLay();
|
S.StartVerticalLay();
|
||||||
{
|
{
|
||||||
wxStaticBitmap *zi = safenew wxStaticBitmap(this, wxID_ANY, wxBitmap(ZoomIn));
|
wxStaticBitmap *zi = safenew wxStaticBitmap(S.GetParent(), wxID_ANY, wxBitmap(ZoomIn));
|
||||||
S.Position(wxALIGN_CENTER)
|
S.Position(wxALIGN_CENTER)
|
||||||
.AddWindow(zi);
|
.AddWindow(zi);
|
||||||
|
|
||||||
S.AddSpace(5);
|
S.AddSpace(5);
|
||||||
|
|
||||||
mZoomSlider = safenew wxSliderWrapper(this, FreqZoomSliderID, 100, 1, 100,
|
mZoomSlider = safenew wxSliderWrapper(S.GetParent(), FreqZoomSliderID, 100, 1, 100,
|
||||||
wxDefaultPosition, wxDefaultSize, wxSL_VERTICAL);
|
wxDefaultPosition, wxDefaultSize, wxSL_VERTICAL);
|
||||||
S.Prop(1);
|
S.Prop(1);
|
||||||
S
|
S
|
||||||
@ -356,7 +356,7 @@ FrequencyPlotDialog::FrequencyPlotDialog(wxWindow * parent, wxWindowID id,
|
|||||||
|
|
||||||
S.AddSpace(5);
|
S.AddSpace(5);
|
||||||
|
|
||||||
wxStaticBitmap *zo = safenew wxStaticBitmap(this, wxID_ANY, wxBitmap(ZoomOut));
|
wxStaticBitmap *zo = safenew wxStaticBitmap(S.GetParent(), wxID_ANY, wxBitmap(ZoomOut));
|
||||||
S.Position(wxALIGN_CENTER)
|
S.Position(wxALIGN_CENTER)
|
||||||
.AddWindow(zo);
|
.AddWindow(zo);
|
||||||
}
|
}
|
||||||
@ -375,7 +375,7 @@ FrequencyPlotDialog::FrequencyPlotDialog(wxWindow * parent, wxWindowID id,
|
|||||||
S.StartHorizontalLay(wxEXPAND, 0);
|
S.StartHorizontalLay(wxEXPAND, 0);
|
||||||
{
|
{
|
||||||
hRuler = safenew RulerPanel(
|
hRuler = safenew RulerPanel(
|
||||||
this, wxID_ANY, wxHORIZONTAL,
|
S.GetParent(), wxID_ANY, wxHORIZONTAL,
|
||||||
wxSize{ 100, 100 }, // Ruler can't handle small sizes
|
wxSize{ 100, 100 }, // Ruler can't handle small sizes
|
||||||
RulerPanel::Range{ 10, 20000 },
|
RulerPanel::Range{ 10, 20000 },
|
||||||
Ruler::RealFormat,
|
Ruler::RealFormat,
|
||||||
@ -508,7 +508,7 @@ FrequencyPlotDialog::FrequencyPlotDialog(wxWindow * parent, wxWindowID id,
|
|||||||
|
|
||||||
S.AddSpace(5);
|
S.AddSpace(5);
|
||||||
|
|
||||||
mProgress = safenew FreqGauge(this, wxID_ANY); //, wxST_SIZEGRIP);
|
mProgress = safenew FreqGauge(S.GetParent(), wxID_ANY); //, wxST_SIZEGRIP);
|
||||||
S.Position(wxEXPAND)
|
S.Position(wxEXPAND)
|
||||||
.AddWindow(mProgress);
|
.AddWindow(mProgress);
|
||||||
|
|
||||||
|
@ -255,7 +255,7 @@ void LabelDialog::PopulateOrExchange( ShuttleGui & S )
|
|||||||
{
|
{
|
||||||
S.StartVerticalLay(wxEXPAND,1);
|
S.StartVerticalLay(wxEXPAND,1);
|
||||||
{
|
{
|
||||||
mGrid = safenew Grid(this, wxID_ANY);
|
mGrid = safenew Grid(S.GetParent(), wxID_ANY);
|
||||||
S.Prop(1).AddWindow( mGrid );
|
S.Prop(1).AddWindow( mGrid );
|
||||||
}
|
}
|
||||||
S.EndVerticalLay();
|
S.EndVerticalLay();
|
||||||
|
@ -107,6 +107,7 @@ for registering for changes.
|
|||||||
#include <wx/grid.h>
|
#include <wx/grid.h>
|
||||||
#include <wx/listctrl.h>
|
#include <wx/listctrl.h>
|
||||||
#include <wx/notebook.h>
|
#include <wx/notebook.h>
|
||||||
|
#include <wx/simplebook.h>
|
||||||
#include <wx/treectrl.h>
|
#include <wx/treectrl.h>
|
||||||
#include <wx/spinctrl.h>
|
#include <wx/spinctrl.h>
|
||||||
#include <wx/stattext.h>
|
#include <wx/stattext.h>
|
||||||
@ -119,21 +120,22 @@ for registering for changes.
|
|||||||
#include "widgets/WindowAccessible.h"
|
#include "widgets/WindowAccessible.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
ShuttleGuiBase::ShuttleGuiBase(wxWindow * pParent, teShuttleMode ShuttleMode )
|
ShuttleGuiBase::ShuttleGuiBase(
|
||||||
|
wxWindow * pParent, teShuttleMode ShuttleMode, bool vertical, wxSize minSize )
|
||||||
: mpDlg{ pParent }
|
: mpDlg{ pParent }
|
||||||
{
|
{
|
||||||
wxASSERT( (pParent != NULL ) || ( ShuttleMode != eIsCreating));
|
wxASSERT( (pParent != NULL ) || ( ShuttleMode != eIsCreating));
|
||||||
mpbOptionalFlag = nullptr;
|
mpbOptionalFlag = nullptr;
|
||||||
mpParent = pParent;
|
mpParent = pParent;
|
||||||
mShuttleMode = ShuttleMode;
|
mShuttleMode = ShuttleMode;
|
||||||
Init();
|
Init( vertical, minSize );
|
||||||
}
|
}
|
||||||
|
|
||||||
ShuttleGuiBase::~ShuttleGuiBase()
|
ShuttleGuiBase::~ShuttleGuiBase()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
void ShuttleGuiBase::Init()
|
void ShuttleGuiBase::Init(bool vertical, wxSize minSize)
|
||||||
{
|
{
|
||||||
mpShuttle = NULL;
|
mpShuttle = NULL;
|
||||||
mpSizer = NULL;
|
mpSizer = NULL;
|
||||||
@ -171,10 +173,11 @@ void ShuttleGuiBase::Init()
|
|||||||
|
|
||||||
if( !mpSizer )
|
if( !mpSizer )
|
||||||
{
|
{
|
||||||
mpParent->SetSizer(mpSizer = safenew wxBoxSizer(wxVERTICAL));
|
mpParent->SetSizer(
|
||||||
|
mpSizer = safenew wxBoxSizer(vertical ? wxVERTICAL : wxHORIZONTAL));
|
||||||
}
|
}
|
||||||
PushSizer();
|
PushSizer();
|
||||||
mpSizer->SetMinSize(250,100);
|
mpSizer->SetMinSize(minSize);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ShuttleGuiBase::ResetId()
|
void ShuttleGuiBase::ResetId()
|
||||||
@ -977,12 +980,33 @@ void ShuttleGuiBase::EndNotebook()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
wxSimplebook * ShuttleGuiBase::StartSimplebook()
|
||||||
|
{
|
||||||
|
UseUpId();
|
||||||
|
if( mShuttleMode != eIsCreating )
|
||||||
|
return wxDynamicCast(wxWindow::FindWindowById( miId, mpDlg), wxSimplebook);
|
||||||
|
wxSimplebook * pNotebook;
|
||||||
|
mpWind = pNotebook = safenew wxSimplebook(GetParent(),
|
||||||
|
miId, wxDefaultPosition, wxDefaultSize, GetStyle( 0 ));
|
||||||
|
SetProportions( 1 );
|
||||||
|
UpdateSizers();
|
||||||
|
mpParent = pNotebook;
|
||||||
|
return pNotebook;
|
||||||
|
}
|
||||||
|
|
||||||
|
void ShuttleGuiBase::EndSimplebook()
|
||||||
|
{
|
||||||
|
//PopSizer();
|
||||||
|
mpParent = mpParent->GetParent();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
wxNotebookPage * ShuttleGuiBase::StartNotebookPage( const wxString & Name )
|
wxNotebookPage * ShuttleGuiBase::StartNotebookPage( const wxString & Name )
|
||||||
{
|
{
|
||||||
if( mShuttleMode != eIsCreating )
|
if( mShuttleMode != eIsCreating )
|
||||||
return NULL;
|
return NULL;
|
||||||
// return wxDynamicCast(wxWindow::FindWindowById( miId, mpDlg), wx);
|
// return wxDynamicCast(wxWindow::FindWindowById( miId, mpDlg), wx);
|
||||||
wxNotebook * pNotebook = (wxNotebook*)mpParent;
|
auto pNotebook = static_cast< wxBookCtrlBase* >( mpParent );
|
||||||
wxNotebookPage * pPage = safenew wxPanelWrapper(GetParent());
|
wxNotebookPage * pPage = safenew wxPanelWrapper(GetParent());
|
||||||
pPage->SetName(Name);
|
pPage->SetName(Name);
|
||||||
|
|
||||||
@ -994,7 +1018,6 @@ wxNotebookPage * ShuttleGuiBase::StartNotebookPage( const wxString & Name )
|
|||||||
mpParent = pPage;
|
mpParent = pPage;
|
||||||
pPage->SetSizer(mpSizer = safenew wxBoxSizer(wxVERTICAL));
|
pPage->SetSizer(mpSizer = safenew wxBoxSizer(wxVERTICAL));
|
||||||
PushSizer();
|
PushSizer();
|
||||||
mpSizer->SetMinSize(250, 500);
|
|
||||||
// UpdateSizers();
|
// UpdateSizers();
|
||||||
return pPage;
|
return pPage;
|
||||||
}
|
}
|
||||||
@ -1004,7 +1027,7 @@ void ShuttleGuiBase::StartNotebookPage( const wxString & Name, wxNotebookPage *
|
|||||||
if( mShuttleMode != eIsCreating )
|
if( mShuttleMode != eIsCreating )
|
||||||
return;
|
return;
|
||||||
// return wxDynamicCast(wxWindow::FindWindowById( miId, mpDlg), wx);
|
// return wxDynamicCast(wxWindow::FindWindowById( miId, mpDlg), wx);
|
||||||
wxNotebook * pNotebook = (wxNotebook*)mpParent;
|
auto pNotebook = static_cast< wxBookCtrlBase* >( mpParent );
|
||||||
// wxNotebookPage * pPage = safenew wxPanelWrapper(GetParent());
|
// wxNotebookPage * pPage = safenew wxPanelWrapper(GetParent());
|
||||||
pPage->Create( mpParent, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL, wxT("panel"));
|
pPage->Create( mpParent, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL, wxT("panel"));
|
||||||
pPage->SetName(Name);
|
pPage->SetName(Name);
|
||||||
@ -1017,7 +1040,6 @@ void ShuttleGuiBase::StartNotebookPage( const wxString & Name, wxNotebookPage *
|
|||||||
mpParent = pPage;
|
mpParent = pPage;
|
||||||
pPage->SetSizer(mpSizer = safenew wxBoxSizer(wxVERTICAL));
|
pPage->SetSizer(mpSizer = safenew wxBoxSizer(wxVERTICAL));
|
||||||
PushSizer();
|
PushSizer();
|
||||||
mpSizer->SetMinSize(250, 500);
|
|
||||||
// UpdateSizers();
|
// UpdateSizers();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2178,13 +2200,14 @@ void SetIfCreated( wxStaticText *&Var, wxStaticText * Val )
|
|||||||
#include "../extnpanel-src/GuiWaveTrack.h"
|
#include "../extnpanel-src/GuiWaveTrack.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
ShuttleGui::ShuttleGui(wxWindow * pParent, teShuttleMode ShuttleMode) :
|
ShuttleGui::ShuttleGui(
|
||||||
ShuttleGuiBase( pParent, ShuttleMode )
|
wxWindow * pParent, teShuttleMode ShuttleMode, bool vertical, wxSize minSize)
|
||||||
|
: ShuttleGuiBase( pParent, ShuttleMode, vertical, minSize )
|
||||||
{
|
{
|
||||||
if( ShuttleMode == eIsCreatingFromPrefs )
|
if( ShuttleMode == eIsCreatingFromPrefs )
|
||||||
{
|
{
|
||||||
mShuttleMode = eIsCreating;
|
mShuttleMode = eIsCreating;
|
||||||
Init(); // Wasn't fully done in base constructor because it is only done when eIsCreating is set.
|
Init( vertical, minSize ); // Wasn't fully done in base constructor because it is only done when eIsCreating is set.
|
||||||
}
|
}
|
||||||
else if( ShuttleMode == eIsSavingToPrefs )
|
else if( ShuttleMode == eIsSavingToPrefs )
|
||||||
{
|
{
|
||||||
@ -2381,7 +2404,7 @@ std::unique_ptr<wxSizer> CreateStdButtonSizer(wxWindow *parent, long buttons, wx
|
|||||||
return std::unique_ptr<wxSizer>{ s.release() };
|
return std::unique_ptr<wxSizer>{ s.release() };
|
||||||
}
|
}
|
||||||
|
|
||||||
void ShuttleGui::AddStandardButtons(long buttons, wxButton *extra)
|
void ShuttleGui::AddStandardButtons(long buttons, wxWindow *extra)
|
||||||
{
|
{
|
||||||
if( mShuttleMode != eIsCreating )
|
if( mShuttleMode != eIsCreating )
|
||||||
return;
|
return;
|
||||||
@ -2396,12 +2419,15 @@ void ShuttleGui::AddStandardButtons(long buttons, wxButton *extra)
|
|||||||
EndVerticalLay();
|
EndVerticalLay();
|
||||||
}
|
}
|
||||||
|
|
||||||
wxSizerItem * ShuttleGui::AddSpace( int width, int height )
|
wxSizerItem * ShuttleGui::AddSpace( int width, int height, int prop )
|
||||||
{
|
{
|
||||||
if( mShuttleMode != eIsCreating )
|
if( mShuttleMode != eIsCreating )
|
||||||
return NULL;
|
return NULL;
|
||||||
SetProportions(0);
|
|
||||||
return mpSizer->Add( width, height, miProp);
|
// SetProportions(0);
|
||||||
|
// return mpSizer->Add( width, height, miProp);
|
||||||
|
|
||||||
|
return mpSizer->Add( width, height, prop );
|
||||||
}
|
}
|
||||||
|
|
||||||
void ShuttleGui::SetMinSize( wxWindow *window, const wxArrayStringEx & items )
|
void ShuttleGui::SetMinSize( wxWindow *window, const wxArrayStringEx & items )
|
||||||
|
@ -58,6 +58,7 @@ class wxTreeCtrl;
|
|||||||
class wxTextCtrl;
|
class wxTextCtrl;
|
||||||
class wxSlider;
|
class wxSlider;
|
||||||
class wxNotebook;
|
class wxNotebook;
|
||||||
|
class wxSimplebook;
|
||||||
typedef wxWindow wxNotebookPage; // so far, any window can be a page
|
typedef wxWindow wxNotebookPage; // so far, any window can be a page
|
||||||
class wxButton;
|
class wxButton;
|
||||||
class wxBitmapButton;
|
class wxBitmapButton;
|
||||||
@ -255,9 +256,14 @@ struct Item {
|
|||||||
class AUDACITY_DLL_API ShuttleGuiBase /* not final */
|
class AUDACITY_DLL_API ShuttleGuiBase /* not final */
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
ShuttleGuiBase(wxWindow * pParent,teShuttleMode ShuttleMode);
|
ShuttleGuiBase(
|
||||||
|
wxWindow * pParent,
|
||||||
|
teShuttleMode ShuttleMode,
|
||||||
|
bool vertical, // Choose layout direction of topmost level sizer
|
||||||
|
wxSize minSize
|
||||||
|
);
|
||||||
virtual ~ShuttleGuiBase();
|
virtual ~ShuttleGuiBase();
|
||||||
void Init();
|
void Init( bool vertical, wxSize minSize );
|
||||||
void ResetId();
|
void ResetId();
|
||||||
|
|
||||||
//-- Add functions. These only add a widget or 2.
|
//-- Add functions. These only add a widget or 2.
|
||||||
@ -360,11 +366,16 @@ public:
|
|||||||
wxNotebook * StartNotebook();
|
wxNotebook * StartNotebook();
|
||||||
void EndNotebook();
|
void EndNotebook();
|
||||||
|
|
||||||
|
wxSimplebook * StartSimplebook();
|
||||||
|
void EndSimplebook();
|
||||||
|
|
||||||
|
// Use within any kind of book control:
|
||||||
// IDs of notebook pages cannot be chosen by the caller
|
// IDs of notebook pages cannot be chosen by the caller
|
||||||
wxNotebookPage * StartNotebookPage( const wxString & Name );
|
wxNotebookPage * StartNotebookPage( const wxString & Name );
|
||||||
void StartNotebookPage( const wxString & Name, wxNotebookPage * pPage );
|
void StartNotebookPage( const wxString & Name, wxNotebookPage * pPage );
|
||||||
|
|
||||||
void EndNotebookPage();
|
void EndNotebookPage();
|
||||||
|
|
||||||
wxPanel * StartInvisiblePanel();
|
wxPanel * StartInvisiblePanel();
|
||||||
void EndInvisiblePanel();
|
void EndInvisiblePanel();
|
||||||
|
|
||||||
@ -590,7 +601,11 @@ AUDACITY_DLL_API std::unique_ptr<wxSizer> CreateStdButtonSizer( wxWindow *parent
|
|||||||
class AUDACITY_DLL_API ShuttleGui /* not final */ : public ShuttleGuiBase
|
class AUDACITY_DLL_API ShuttleGui /* not final */ : public ShuttleGuiBase
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
ShuttleGui(wxWindow * pParent,teShuttleMode ShuttleMode);
|
ShuttleGui(
|
||||||
|
wxWindow * pParent, teShuttleMode ShuttleMode,
|
||||||
|
bool vertical = true, // Choose layout direction of topmost level sizer
|
||||||
|
wxSize minSize = { 250, 100 }
|
||||||
|
);
|
||||||
~ShuttleGui(void);
|
~ShuttleGui(void);
|
||||||
public:
|
public:
|
||||||
ShuttleGui & Optional( bool & bVar );
|
ShuttleGui & Optional( bool & bVar );
|
||||||
@ -697,9 +712,9 @@ public:
|
|||||||
// The first of these buttons, if any, that is included will be default:
|
// The first of these buttons, if any, that is included will be default:
|
||||||
// Apply, Yes, OK
|
// Apply, Yes, OK
|
||||||
void AddStandardButtons(
|
void AddStandardButtons(
|
||||||
long buttons = eOkButton | eCancelButton, wxButton *extra = NULL );
|
long buttons = eOkButton | eCancelButton, wxWindow *extra = NULL );
|
||||||
|
|
||||||
wxSizerItem * AddSpace( int width, int height );
|
wxSizerItem * AddSpace( int width, int height, int prop = 0 );
|
||||||
wxSizerItem * AddSpace( int size ) { return AddSpace( size, size ); };
|
wxSizerItem * AddSpace( int size ) { return AddSpace( size, size ); };
|
||||||
|
|
||||||
// Calculate width of a choice control adequate for the items, maybe after
|
// Calculate width of a choice control adequate for the items, maybe after
|
||||||
|
@ -725,8 +725,6 @@ bool EffectEqualization::CloseUI()
|
|||||||
|
|
||||||
void EffectEqualization::PopulateOrExchange(ShuttleGui & S)
|
void EffectEqualization::PopulateOrExchange(ShuttleGui & S)
|
||||||
{
|
{
|
||||||
wxWindow *const parent = S.GetParent();
|
|
||||||
|
|
||||||
//LoadCurves();
|
//LoadCurves();
|
||||||
|
|
||||||
auto trackList = inputTracks();
|
auto trackList = inputTracks();
|
||||||
@ -770,7 +768,7 @@ void EffectEqualization::PopulateOrExchange(ShuttleGui & S)
|
|||||||
S.StartVerticalLay(wxEXPAND, 1);
|
S.StartVerticalLay(wxEXPAND, 1);
|
||||||
{
|
{
|
||||||
mdBRuler = safenew RulerPanel(
|
mdBRuler = safenew RulerPanel(
|
||||||
parent, wxID_ANY, wxVERTICAL,
|
S.GetParent(), wxID_ANY, wxVERTICAL,
|
||||||
wxSize{ 100, 100 }, // Ruler can't handle small sizes
|
wxSize{ 100, 100 }, // Ruler can't handle small sizes
|
||||||
RulerPanel::Range{ 60.0, -120.0 },
|
RulerPanel::Range{ 60.0, -120.0 },
|
||||||
Ruler::LinearDBFormat,
|
Ruler::LinearDBFormat,
|
||||||
@ -789,7 +787,7 @@ void EffectEqualization::PopulateOrExchange(ShuttleGui & S)
|
|||||||
}
|
}
|
||||||
S.EndVerticalLay();
|
S.EndVerticalLay();
|
||||||
|
|
||||||
mPanel = safenew EqualizationPanel(parent, wxID_ANY, this);
|
mPanel = safenew EqualizationPanel(S.GetParent(), wxID_ANY, this);
|
||||||
S.Prop(1)
|
S.Prop(1)
|
||||||
.Position(wxEXPAND)
|
.Position(wxEXPAND)
|
||||||
.MinSize( { wxDefaultCoord, wxDefaultCoord } )
|
.MinSize( { wxDefaultCoord, wxDefaultCoord } )
|
||||||
@ -827,7 +825,7 @@ void EffectEqualization::PopulateOrExchange(ShuttleGui & S)
|
|||||||
S.AddSpace(1, 1);
|
S.AddSpace(1, 1);
|
||||||
|
|
||||||
mFreqRuler = safenew RulerPanel(
|
mFreqRuler = safenew RulerPanel(
|
||||||
parent, wxID_ANY, wxHORIZONTAL,
|
S.GetParent(), wxID_ANY, wxHORIZONTAL,
|
||||||
wxSize{ 100, 100 }, // Ruler can't handle small sizes
|
wxSize{ 100, 100 }, // Ruler can't handle small sizes
|
||||||
RulerPanel::Range{ mLoFreq, mHiFreq },
|
RulerPanel::Range{ mLoFreq, mHiFreq },
|
||||||
Ruler::IntFormat,
|
Ruler::IntFormat,
|
||||||
|
@ -263,7 +263,7 @@ private:
|
|||||||
wxSizerItem *mLeftSpacer;
|
wxSizerItem *mLeftSpacer;
|
||||||
|
|
||||||
EqualizationPanel *mPanel;
|
EqualizationPanel *mPanel;
|
||||||
wxPanel *mGraphicPanel;
|
//wxPanel *mGraphicPanel;
|
||||||
wxRadioButton *mDraw;
|
wxRadioButton *mDraw;
|
||||||
wxRadioButton *mGraphic;
|
wxRadioButton *mGraphic;
|
||||||
wxCheckBox *mLinFreq;
|
wxCheckBox *mLinFreq;
|
||||||
|
@ -359,8 +359,6 @@ bool EffectScienFilter::Init()
|
|||||||
|
|
||||||
void EffectScienFilter::PopulateOrExchange(ShuttleGui & S)
|
void EffectScienFilter::PopulateOrExchange(ShuttleGui & S)
|
||||||
{
|
{
|
||||||
wxWindow *const parent = S.GetParent();
|
|
||||||
|
|
||||||
S.AddSpace(5);
|
S.AddSpace(5);
|
||||||
S.SetSizerProportion(1);
|
S.SetSizerProportion(1);
|
||||||
S.StartMultiColumn(3, wxEXPAND);
|
S.StartMultiColumn(3, wxEXPAND);
|
||||||
@ -375,7 +373,7 @@ void EffectScienFilter::PopulateOrExchange(ShuttleGui & S)
|
|||||||
S.StartVerticalLay();
|
S.StartVerticalLay();
|
||||||
{
|
{
|
||||||
mdBRuler = safenew RulerPanel(
|
mdBRuler = safenew RulerPanel(
|
||||||
parent, wxID_ANY, wxVERTICAL,
|
S.GetParent(), wxID_ANY, wxVERTICAL,
|
||||||
wxSize{ 100, 100 }, // Ruler can't handle small sizes
|
wxSize{ 100, 100 }, // Ruler can't handle small sizes
|
||||||
RulerPanel::Range{ 30.0, -120.0 },
|
RulerPanel::Range{ 30.0, -120.0 },
|
||||||
Ruler::LinearDBFormat,
|
Ruler::LinearDBFormat,
|
||||||
@ -394,7 +392,7 @@ void EffectScienFilter::PopulateOrExchange(ShuttleGui & S)
|
|||||||
S.EndVerticalLay();
|
S.EndVerticalLay();
|
||||||
|
|
||||||
mPanel = safenew EffectScienFilterPanel(
|
mPanel = safenew EffectScienFilterPanel(
|
||||||
parent, wxID_ANY,
|
S.GetParent(), wxID_ANY,
|
||||||
this, mLoFreq, mNyquist
|
this, mLoFreq, mNyquist
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -432,8 +430,8 @@ void EffectScienFilter::PopulateOrExchange(ShuttleGui & S)
|
|||||||
|
|
||||||
S.AddSpace(1, 1);
|
S.AddSpace(1, 1);
|
||||||
|
|
||||||
mfreqRuler = safenew RulerPanel(
|
mfreqRuler = safenew RulerPanel(
|
||||||
parent, wxID_ANY, wxHORIZONTAL,
|
S.GetParent(), wxID_ANY, wxHORIZONTAL,
|
||||||
wxSize{ 100, 100 }, // Ruler can't handle small sizes
|
wxSize{ 100, 100 }, // Ruler can't handle small sizes
|
||||||
RulerPanel::Range{ mLoFreq, mNyquist },
|
RulerPanel::Range{ mLoFreq, mNyquist },
|
||||||
Ruler::IntFormat,
|
Ruler::IntFormat,
|
||||||
|
@ -551,7 +551,7 @@ PrefsDialog::PrefsDialog
|
|||||||
{
|
{
|
||||||
wxASSERT(factories.size() > 0);
|
wxASSERT(factories.size() > 0);
|
||||||
if (!uniquePage) {
|
if (!uniquePage) {
|
||||||
mCategories = safenew wxTreebookExt(this, wxID_ANY, mTitlePrefix);
|
mCategories = safenew wxTreebookExt(S.GetParent(), wxID_ANY, mTitlePrefix);
|
||||||
#if wxUSE_ACCESSIBILITY
|
#if wxUSE_ACCESSIBILITY
|
||||||
// so that name can be set on a standard control
|
// so that name can be set on a standard control
|
||||||
mCategories->GetTreeCtrl()->SetAccessible(
|
mCategories->GetTreeCtrl()->SetAccessible(
|
||||||
@ -602,7 +602,7 @@ PrefsDialog::PrefsDialog
|
|||||||
// Unique page, don't show the factory
|
// Unique page, don't show the factory
|
||||||
const PrefsNode &node = factories[0];
|
const PrefsNode &node = factories[0];
|
||||||
const PrefsPanel::Factory &factory = node.factory;
|
const PrefsPanel::Factory &factory = node.factory;
|
||||||
mUniquePage = factory(this, wxID_ANY);
|
mUniquePage = factory(S.GetParent(), wxID_ANY);
|
||||||
wxWindow * uniquePageWindow = S.Prop(1)
|
wxWindow * uniquePageWindow = S.Prop(1)
|
||||||
.Position(wxEXPAND)
|
.Position(wxEXPAND)
|
||||||
.AddWindow(mUniquePage);
|
.AddWindow(mUniquePage);
|
||||||
|
@ -125,7 +125,7 @@ void LabelTrackMenuTable::OnSetFont(wxCommandEvent &)
|
|||||||
|
|
||||||
/* i18n-hint: (noun) The name of the typeface*/
|
/* i18n-hint: (noun) The name of the typeface*/
|
||||||
S.AddPrompt(_("Face name"));
|
S.AddPrompt(_("Face name"));
|
||||||
lb = safenew wxListBox(&dlg, wxID_ANY,
|
lb = safenew wxListBox(S.GetParent(), wxID_ANY,
|
||||||
wxDefaultPosition,
|
wxDefaultPosition,
|
||||||
wxDefaultSize,
|
wxDefaultSize,
|
||||||
facenames,
|
facenames,
|
||||||
@ -139,7 +139,7 @@ void LabelTrackMenuTable::OnSetFont(wxCommandEvent &)
|
|||||||
|
|
||||||
/* i18n-hint: (noun) The size of the typeface*/
|
/* i18n-hint: (noun) The size of the typeface*/
|
||||||
S.AddPrompt(_("Face size"));
|
S.AddPrompt(_("Face size"));
|
||||||
sc = safenew wxSpinCtrl(&dlg, wxID_ANY,
|
sc = safenew wxSpinCtrl(S.GetParent(), wxID_ANY,
|
||||||
wxString::Format(wxT("%ld"), fontsize),
|
wxString::Format(wxT("%ld"), fontsize),
|
||||||
wxDefaultPosition,
|
wxDefaultPosition,
|
||||||
wxDefaultSize,
|
wxDefaultSize,
|
||||||
|
@ -283,7 +283,7 @@ SliderDialog::SliderDialog(wxWindow * parent, wxWindowID id,
|
|||||||
mTextCtrl = S.Validator<wxTextValidator>(wxFILTER_NUMERIC)
|
mTextCtrl = S.Validator<wxTextValidator>(wxFILTER_NUMERIC)
|
||||||
.AddTextBox( {}, wxEmptyString, 15);
|
.AddTextBox( {}, wxEmptyString, 15);
|
||||||
|
|
||||||
mSlider = safenew ASlider(this,
|
mSlider = safenew ASlider(S.GetParent(),
|
||||||
wxID_ANY,
|
wxID_ANY,
|
||||||
title,
|
title,
|
||||||
wxDefaultPosition,
|
wxDefaultPosition,
|
||||||
|
@ -160,7 +160,7 @@ void HelpSystem::ShowHtmlText(wxWindow *pParent,
|
|||||||
pFrame->SetTransparent(0);
|
pFrame->SetTransparent(0);
|
||||||
ShuttleGui S( pWnd, eIsCreating );
|
ShuttleGui S( pWnd, eIsCreating );
|
||||||
|
|
||||||
wxPanel *pPan = S.Style( wxNO_BORDER | wxTAB_TRAVERSAL )
|
S.Style( wxNO_BORDER | wxTAB_TRAVERSAL )
|
||||||
.Prop(true)
|
.Prop(true)
|
||||||
.StartPanel();
|
.StartPanel();
|
||||||
{
|
{
|
||||||
@ -181,7 +181,7 @@ void HelpSystem::ShowHtmlText(wxWindow *pParent,
|
|||||||
}
|
}
|
||||||
S.EndHorizontalLay();
|
S.EndHorizontalLay();
|
||||||
|
|
||||||
html = safenew LinkingHtmlWindow(pPan, wxID_ANY,
|
html = safenew LinkingHtmlWindow(S.GetParent(), wxID_ANY,
|
||||||
wxDefaultPosition,
|
wxDefaultPosition,
|
||||||
bIsFile ? wxSize(500, 400) : wxSize(480, 240),
|
bIsFile ? wxSize(500, 400) : wxSize(480, 240),
|
||||||
wxHW_SCROLLBAR_AUTO | wxSUNKEN_BORDER);
|
wxHW_SCROLLBAR_AUTO | wxSUNKEN_BORDER);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user