Audacity  2.2.0
ToolManager Class Referencefinal

class ToolManager More...

#include <ToolManager.h>

Inheritance diagram for ToolManager:

Public Member Functions

 ToolManager (AudacityProject *parent, wxWindow *topDockParent)
 Methods for ToolManager. More...
 
 ~ToolManager ()
 
void LayoutToolBars ()
 
void UpdatePrefs ()
 
bool IsDocked (int type)
 
bool IsVisible (int type)
 
void ShowHide (int type)
 
void Expose (int type, bool show)
 
ToolBarGetToolBar (int type) const
 
ToolDockGetTopDock ()
 
ToolDockGetBotDock ()
 
void Reset ()
 
void RegenerateTooltips ()
 
int FilterEvent (wxEvent &event) override
 
bool RestoreFocus ()
 

Private Types

using FramePtr = Destroy_ptr< wxFrame >
 

Private Member Functions

ToolBarFloat (ToolBar *t, wxPoint &pos)
 
void OnTimer (wxTimerEvent &event)
 
void OnMouse (wxMouseEvent &event)
 
void OnCaptureLost (wxMouseCaptureLostEvent &event)
 
void UndockBar (wxPoint mp)
 
void OnGrabber (GrabberEvent &event)
 
void HandleEscapeKey ()
 
void DoneDragging ()
 
void OnIndicatorCreate (wxWindowCreateEvent &event)
 
void OnIndicatorPaint (wxPaintEvent &event)
 
void ReadConfig ()
 
void WriteConfig ()
 
void Updated ()
 

Private Attributes

AudacityProjectmParent
 
wxWindow * mLastFocus {}
 
ToolFramemDragWindow
 
ToolDockmDragDock
 
ToolBarmDragBar {}
 
wxPoint mDragOffset
 
ToolBarConfiguration::Position mDragBefore {}
 
wxPoint mLastPos
 
wxRect mBarPos
 
FramePtr mIndicator
 
std::unique_ptr< wxRegion > mLeft
 
std::unique_ptr< wxRegion > mDown
 
wxRegion * mCurrent
 
wxTimer mTimer
 
bool mLastState
 
ToolDockmTopDock
 
ToolDockmBotDock
 
ToolBar::Holder mBars [ToolBarCount]
 
wxPoint mPrevPosition {}
 
ToolDockmPrevDock {}
 
ToolBarConfiguration::Position mPrevSlot { ToolBarConfiguration::UnspecifiedPosition }
 
ToolBarConfiguration mPrevConfiguration
 
bool mDidDrag {}
 
bool mClicked {}
 

Detailed Description

class ToolManager

Manages the ToolDocks and handles the dragging, floating, and docking of ToolBars.

Member Typedef Documentation

using ToolManager::FramePtr = Destroy_ptr<wxFrame>
private

Constructor & Destructor Documentation

Member Function Documentation

void ToolManager::Expose ( int  type,
bool  show 
)
int ToolManager::FilterEvent ( wxEvent &  event)
override

References mLastFocus, and mParent.

ToolBar* ToolManager::Float ( ToolBar t,
wxPoint &  pos 
)
private
ToolDock * ToolManager::GetBotDock ( )

References mBotDock.

ToolDock * ToolManager::GetTopDock ( )

References mTopDock.

Referenced by ScreenshotCommand::Apply().

bool ToolManager::IsDocked ( int  type)

References mBars.

bool ToolManager::IsVisible ( int  type)
void ToolManager::LayoutToolBars ( )

References ToolDock::LayoutToolBars(), mBotDock, and mTopDock.

Referenced by Reset().

void ToolManager::OnCaptureLost ( wxMouseCaptureLostEvent &  event)
private

References mDragWindow, mParent, and OnMouse().

Referenced by ToolManager(), and ~ToolManager().

void ToolManager::OnIndicatorCreate ( wxWindowCreateEvent &  event)
private

References mCurrent, and mIndicator.

Referenced by ToolManager(), and ~ToolManager().

void ToolManager::OnIndicatorPaint ( wxPaintEvent &  event)
private

References ThemeBase::Colour(), and theTheme.

Referenced by ToolManager(), and ~ToolManager().

void ToolManager::OnTimer ( wxTimerEvent &  event)
private

References mDragWindow, mIndicator, and mLastState.

void ToolManager::RegenerateTooltips ( )
void ToolManager::ShowHide ( int  type)
void ToolManager::Updated ( )
private

References mParent.

Referenced by Reset(), and UndockBar().

void ToolManager::UpdatePrefs ( )

Member Data Documentation

wxRect ToolManager::mBarPos
private

Referenced by DoneDragging(), and OnMouse().

ToolDock* ToolManager::mBotDock
private
bool ToolManager::mClicked {}
private

Referenced by DoneDragging(), OnGrabber(), and OnMouse().

wxRegion* ToolManager::mCurrent
private

Referenced by OnIndicatorCreate(), and OnMouse().

bool ToolManager::mDidDrag {}
private

Referenced by DoneDragging(), and OnMouse().

std::unique_ptr<wxRegion> ToolManager::mDown
private

Referenced by OnMouse().

ToolBar* ToolManager::mDragBar {}
private
ToolBarConfiguration::Position ToolManager::mDragBefore {}
private

Referenced by OnMouse().

ToolDock* ToolManager::mDragDock
private

Referenced by DoneDragging(), and OnMouse().

wxPoint ToolManager::mDragOffset
private

Referenced by OnGrabber(), OnMouse(), and UndockBar().

ToolFrame* ToolManager::mDragWindow
private
FramePtr ToolManager::mIndicator
private
wxWindow* ToolManager::mLastFocus {}
private

Referenced by FilterEvent(), and RestoreFocus().

wxPoint ToolManager::mLastPos
private

Referenced by DoneDragging(), and OnMouse().

bool ToolManager::mLastState
private

Referenced by OnGrabber(), and OnTimer().

std::unique_ptr<wxRegion> ToolManager::mLeft
private

Referenced by OnMouse().

ToolBarConfiguration ToolManager::mPrevConfiguration
private

Referenced by DoneDragging(), and HandleEscapeKey().

ToolDock* ToolManager::mPrevDock {}
private
wxPoint ToolManager::mPrevPosition {}
private

Referenced by HandleEscapeKey(), and OnGrabber().

wxTimer ToolManager::mTimer
private

Referenced by DoneDragging(), and OnGrabber().

ToolDock* ToolManager::mTopDock
private

The documentation for this class was generated from the following files: