Audacity 3.2.0
Public Member Functions | Protected Attributes | List of all members
ToolBarDialog Class Referencefinal

A dialog based container for ExpandingToolBars providing modal based operations. More...

#include <ExpandingToolBar.h>

Inheritance diagram for ToolBarDialog:
[legend]
Collaboration diagram for ToolBarDialog:
[legend]

Public Member Functions

 ToolBarDialog (wxWindow *parent, wxWindowID id, const TranslatableString &name={}, const wxPoint &pos=wxDefaultPosition)
 
 ~ToolBarDialog ()
 
void Fit () override
 
void SetChild (ExpandingToolBar *child)
 
- Public Member Functions inherited from wxDialogWrapper
 wxDialogWrapper ()
 
 wxDialogWrapper (wxWindow *parent, wxWindowID id, const TranslatableString &title, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxDEFAULT_DIALOG_STYLE, const TranslatableString &name=XO("Dialog"))
 
bool Create (wxWindow *parent, wxWindowID id, const TranslatableString &title, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxDEFAULT_DIALOG_STYLE, const TranslatableString &name=XO("Dialog"))
 
void SetTitle (const TranslatableString &title)
 
void SetLabel (const TranslatableString &title)
 
void SetName (const TranslatableString &title)
 
void SetName ()
 
- Public Member Functions inherited from wxTabTraversalWrapper< wxDialog >
 wxTabTraversalWrapper (Args &&... args)
 
 wxTabTraversalWrapper (const wxTabTraversalWrapper &)=delete
 
 wxTabTraversalWrapper (wxTabTraversalWrapper &&)=delete
 
wxTabTraversalWrapperoperator= (const wxTabTraversalWrapper &)=delete
 
wxTabTraversalWrapperoperator= (wxTabTraversalWrapper &&)=delete
 

Protected Attributes

ExpandingToolBarmChild
 

Detailed Description

A dialog based container for ExpandingToolBars providing modal based operations.

Definition at line 147 of file ExpandingToolBar.h.

Constructor & Destructor Documentation

◆ ToolBarDialog()

ToolBarDialog::ToolBarDialog ( wxWindow *  parent,
wxWindowID  id,
const TranslatableString name = {},
const wxPoint &  pos = wxDefaultPosition 
)

Definition at line 737 of file ExpandingToolBar.cpp.

740 :
741 wxDialogWrapper(parent, id, name, pos, wxSize(1, 1),
742// Workaround for bug in __WXMSW__. No close box on a wxDialog unless wxSYSTEM_MENU is used.
743#ifdef __WXMSW__
744 wxSYSTEM_MENU |
745#endif
746 wxCAPTION|wxCLOSE_BOX),
747 mChild(NULL)
748{
749}
wxString name
Definition: TagsEditor.cpp:166
ExpandingToolBar * mChild

◆ ~ToolBarDialog()

ToolBarDialog::~ToolBarDialog ( )

Definition at line 751 of file ExpandingToolBar.cpp.

752{
753}

Member Function Documentation

◆ Fit()

void ToolBarDialog::Fit ( )
override

Definition at line 764 of file ExpandingToolBar.cpp.

765{
766 if (mChild) {
767 wxSize childSize = mChild->GetBestSize();
768
769 // Take into account the difference between the content
770 // size and the frame size
771 wxSize curContentSize = GetClientSize();
772 wxSize curFrameSize = GetSize();
773 wxSize newFrameSize = childSize + (curFrameSize - curContentSize);
774
775 SetSizeHints(newFrameSize, newFrameSize);
776 SetSize(newFrameSize);
777 }
778}

References mChild.

Referenced by SetChild().

Here is the caller graph for this function:

◆ SetChild()

void ToolBarDialog::SetChild ( ExpandingToolBar child)

Definition at line 755 of file ExpandingToolBar.cpp.

756{
757 mChild = child;
758 if (mChild && mChild->GetParent() != this)
759 mChild->Reparent(this);
760
761 Fit();
762}
void Fit() override

References Fit(), and mChild.

Referenced by ExpandingToolBar::OnSize().

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ mChild

ExpandingToolBar* ToolBarDialog::mChild
protected

Definition at line 164 of file ExpandingToolBar.h.

Referenced by Fit(), and SetChild().


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