Audacity 3.2.0
|
A dynamic panel where a ToolBar can be docked. More...
#include <ToolDock.h>
Classes | |
class | LayoutVisitor |
Public Member Functions | |
ToolDock (wxEvtHandler *manager, wxWindow *parent, int dockid) | |
Methods for ToolDock. More... | |
~ToolDock () | |
bool | AcceptsFocus () const override |
void | LoadConfig () |
void | LayoutToolBars () |
void | Expose (Identifier type, bool show) |
int | GetOrder (ToolBar *bar) |
void | Dock (ToolBar *bar, bool deflate, ToolBarConfiguration::Position ndx=ToolBarConfiguration::UnspecifiedPosition) |
void | Undock (ToolBar *bar) |
ToolBarConfiguration::Position | PositionBar (ToolBar *t, const wxPoint &pos, wxRect &rect) |
ToolBarConfiguration & | GetConfiguration () |
void | WrapConfiguration (ToolBarConfiguration &backup) |
void | RestoreConfiguration (ToolBarConfiguration &backup) |
void | Updated () |
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 | |
wxTabTraversalWrapper & | operator= (const wxTabTraversalWrapper &)=delete |
wxTabTraversalWrapper & | operator= (wxTabTraversalWrapper &&)=delete |
Protected Member Functions | |
void | OnErase (wxEraseEvent &event) |
void | OnSize (wxSizeEvent &event) |
void | OnPaint (wxPaintEvent &event) |
void | OnGrabber (GrabberEvent &event) |
void | OnMouseEvents (wxMouseEvent &event) |
Private Member Functions | |
void | VisitLayout (LayoutVisitor &visitor, ToolBarConfiguration *pWrappedConfiguration=nullptr) |
Private Attributes | |
wxEvtHandler * | mManager |
ToolBarConfiguration | mConfiguration |
ToolBarConfiguration | mWrappedConfiguration |
std::map< Identifier, ToolBar * > | mBars |
A dynamic panel where a ToolBar can be docked.
Definition at line 291 of file ToolDock.h.
ToolDock::ToolDock | ( | wxEvtHandler * | manager, |
wxWindow * | parent, | ||
int | dockid | ||
) |
Methods for ToolDock.
Definition at line 402 of file ToolDock.cpp.
References ThemeBase::Colour(), manager, theTheme, and XO().
ToolDock::~ToolDock | ( | ) |
Definition at line 419 of file ToolDock.cpp.
|
inlineoverride |
Definition at line 298 of file ToolDock.h.
void ToolDock::Dock | ( | ToolBar * | bar, |
bool | deflate, | ||
ToolBarConfiguration::Position | ndx = ToolBarConfiguration::UnspecifiedPosition |
||
) |
Definition at line 438 of file ToolDock.cpp.
References ToolBarConfiguration::Contains(), ToolBar::GetDockedSize(), ToolBar::GetSection(), ToolBarConfiguration::Insert(), ToolBar::IsVisible(), mBars, mConfiguration, ToolBar::SetDocked(), and ToolBarFloatMargin.
Referenced by ToolManager::HandleEscapeKey(), LoadConfig(), ToolManager::OnMouse(), ToolManager::ReadConfig(), and ToolManager::Reset().
void ToolDock::Expose | ( | Identifier | type, |
bool | show | ||
) |
Definition at line 858 of file ToolDock.cpp.
References ToolBar::Expose(), ToolBarConfiguration::Hide(), mBars, mConfiguration, ToolBarConfiguration::Show(), and ToolBarConfiguration::Shows().
Referenced by ToolManager::Expose(), and LoadConfig().
|
inline |
Definition at line 311 of file ToolDock.h.
References mConfiguration.
Referenced by ToolManager::Destroy(), LayoutToolBars(), LoadConfig(), ToolManager::OnGrabber(), ToolManager::OnMouse(), OnPaint(), ToolManager::ReadConfig(), VisitLayout(), and ToolManager::WriteConfig().
int ToolDock::GetOrder | ( | ToolBar * | bar | ) |
void ToolDock::LayoutToolBars | ( | ) |
Definition at line 687 of file ToolDock.cpp.
References GetConfiguration(), mWrappedConfiguration, MenuRegistry::Visit(), and VisitLayout().
Referenced by ToolManager::LayoutToolBars().
void ToolDock::LoadConfig | ( | ) |
Definition at line 466 of file ToolDock.cpp.
References Dock(), Expose(), GetConfiguration(), and Updated().
Referenced by ToolManager::ReadConfig().
|
protected |
Definition at line 907 of file ToolDock.cpp.
|
protected |
Definition at line 887 of file ToolDock.cpp.
References GrabberEvent::IsEscaping(), and mManager.
|
protected |
Definition at line 954 of file ToolDock.cpp.
|
protected |
Definition at line 915 of file ToolDock.cpp.
References ThemeBase::Colour(), AColor::Dark(), GetConfiguration(), AColor::Line(), and theTheme.
|
protected |
Definition at line 899 of file ToolDock.cpp.
ToolBarConfiguration::Position ToolDock::PositionBar | ( | ToolBar * | t, |
const wxPoint & | pos, | ||
wxRect & | rect | ||
) |
Definition at line 744 of file ToolDock.cpp.
References ToolBarConfiguration::Position::adopt, ToolBarConfiguration::UnspecifiedPosition, MenuRegistry::Visit(), and VisitLayout().
Referenced by ToolManager::OnMouse().
void ToolDock::RestoreConfiguration | ( | ToolBarConfiguration & | backup | ) |
Definition at line 848 of file ToolDock.cpp.
References ToolBarConfiguration::Clear(), mConfiguration, mWrappedConfiguration, and ToolBarConfiguration::Swap().
Referenced by ToolManager::HandleEscapeKey(), and ToolManager::OnMouse().
void ToolDock::Undock | ( | ToolBar * | bar | ) |
Definition at line 426 of file ToolDock.cpp.
References ToolBarConfiguration::Contains(), ToolBar::GetSection(), mBars, mConfiguration, and ToolBarConfiguration::Remove().
Referenced by ToolManager::Reset().
void ToolDock::Updated | ( | ) |
Definition at line 877 of file ToolDock.cpp.
Referenced by LoadConfig(), and ToolBar::Updated().
|
private |
Definition at line 505 of file ToolDock.cpp.
References ToolBarConfiguration::Clear(), ToolDock::LayoutVisitor::FinalRect(), GetConfiguration(), ToolBar::GetSection(), ToolBarConfiguration::Insert(), main(), mBars, ToolDock::LayoutVisitor::ModifySize(), ToolDock::LayoutVisitor::ShouldVisitSpaces(), toolbarGap, and ToolDock::LayoutVisitor::Visit().
Referenced by LayoutToolBars(), and PositionBar().
void ToolDock::WrapConfiguration | ( | ToolBarConfiguration & | backup | ) |
Definition at line 841 of file ToolDock.cpp.
References ToolBarConfiguration::Clear(), mConfiguration, mWrappedConfiguration, and ToolBarConfiguration::Swap().
Referenced by ToolManager::OnGrabber().
|
private |
Definition at line 345 of file ToolDock.h.
Referenced by Dock(), Expose(), Undock(), and VisitLayout().
|
private |
Definition at line 340 of file ToolDock.h.
Referenced by Dock(), Expose(), GetConfiguration(), RestoreConfiguration(), Undock(), and WrapConfiguration().
|
private |
Definition at line 337 of file ToolDock.h.
Referenced by OnGrabber().
|
private |
Definition at line 343 of file ToolDock.h.
Referenced by LayoutToolBars(), RestoreConfiguration(), and WrapConfiguration().