mirror of
https://github.com/cookiengineer/audacity
synced 2026-04-06 14:27:36 +02:00
Adds a class that allows keyboard accessible links in the text.
ShuttleGUI::AddWindow has a new argument now: positionFlags. This argument does not change the default behavior. StartWrapLay/EndWrapLay are added, so wxWrapSizer can be used from the ShuttleGUI.
This commit is contained in:
committed by
Panagiotis Vasilopoulos
parent
82802f7781
commit
73e9b4dcfe
@@ -113,6 +113,8 @@ for registering for changes.
|
||||
#include <wx/spinctrl.h>
|
||||
#include <wx/stattext.h>
|
||||
#include <wx/bmpbuttn.h>
|
||||
#include <wx/wrapsizer.h>
|
||||
|
||||
#include "../include/audacity/ComponentInterface.h"
|
||||
#include "widgets/ReadOnlyText.h"
|
||||
#include "widgets/wxPanelWrapper.h"
|
||||
@@ -191,6 +193,11 @@ void ShuttleGuiBase::ResetId()
|
||||
}
|
||||
|
||||
|
||||
int ShuttleGuiBase::GetBorder() const noexcept
|
||||
{
|
||||
return miBorder;
|
||||
}
|
||||
|
||||
/// Used to modify an already placed FlexGridSizer to make a column stretchy.
|
||||
void ShuttleGuiBase::SetStretchyCol( int i )
|
||||
{
|
||||
@@ -289,13 +296,13 @@ void ShuttleGuiBase::AddTitle(const TranslatableString &Prompt, int wrapWidth)
|
||||
|
||||
/// Very generic 'Add' function. We can add anything we like.
|
||||
/// Useful for unique controls
|
||||
wxWindow * ShuttleGuiBase::AddWindow(wxWindow * pWindow)
|
||||
wxWindow* ShuttleGuiBase::AddWindow(wxWindow* pWindow, int PositionFlags)
|
||||
{
|
||||
if( mShuttleMode != eIsCreating )
|
||||
return pWindow;
|
||||
mpWind = pWindow;
|
||||
SetProportions( 0 );
|
||||
UpdateSizersCore(false, wxALIGN_CENTRE | wxALL);
|
||||
UpdateSizersCore(false, PositionFlags | wxALL);
|
||||
return pWindow;
|
||||
}
|
||||
|
||||
@@ -1200,6 +1207,25 @@ void ShuttleGuiBase::EndVerticalLay()
|
||||
PopSizer();
|
||||
}
|
||||
|
||||
void ShuttleGuiBase::StartWrapLay(int PositionFlags, int iProp)
|
||||
{
|
||||
if (mShuttleMode != eIsCreating)
|
||||
return;
|
||||
|
||||
miSizerProp = iProp;
|
||||
mpSubSizer = std::make_unique<wxWrapSizer>(wxHORIZONTAL, 0);
|
||||
|
||||
UpdateSizersCore(false, PositionFlags | wxALL);
|
||||
}
|
||||
|
||||
void ShuttleGuiBase::EndWrapLay()
|
||||
{
|
||||
if (mShuttleMode != eIsCreating)
|
||||
return;
|
||||
|
||||
PopSizer();
|
||||
}
|
||||
|
||||
void ShuttleGuiBase::StartMultiColumn(int nCols, int PositionFlags)
|
||||
{
|
||||
if( mShuttleMode != eIsCreating )
|
||||
|
||||
Reference in New Issue
Block a user