Audacity 3.2.0
Classes | Protected Member Functions | Protected Attributes | List of all members
WaveTrackVRulerMenuTable Class Reference

#include <WaveChannelVZoomHandle.h>

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

Classes

struct  InitMenuData
 

Protected Member Functions

 WaveTrackVRulerMenuTable (const Identifier &id)
 
void InitUserData (void *pUserData) override
 Called before the menu items are appended. More...
 
void OnZoom (WaveChannelViewConstants::ZoomActions iZoomCode)
 
void OnZoomFitVertical (wxCommandEvent &)
 
void OnZoomReset (wxCommandEvent &)
 
void OnZoomHalfWave (wxCommandEvent &)
 
void OnZoomInVertical (wxCommandEvent &)
 
void OnZoomOutVertical (wxCommandEvent &)
 
void UpdatePrefs () override
 
- Protected Member Functions inherited from PopupMenuTable
virtual void Populate ()=0
 
template<typename Ptr >
void Append (Ptr pItem)
 
void Append (const Identifier &stringId, PopupMenuTableEntry::Type type, int id, const TranslatableString &string, wxCommandEventFunction memFn, const PopupMenuTableEntry::InitFunction &init)
 
void AppendItem (const Identifier &stringId, int id, const TranslatableString &string, wxCommandEventFunction memFn, const PopupMenuTableEntry::InitFunction &init={})
 
void AppendRadioItem (const Identifier &stringId, int id, const TranslatableString &string, wxCommandEventFunction memFn, const PopupMenuTableEntry::InitFunction &init={})
 
void AppendCheckItem (const Identifier &stringId, int id, const TranslatableString &string, wxCommandEventFunction memFn, const PopupMenuTableEntry::InitFunction &init={})
 
void BeginSection (const Identifier &name)
 
void EndSection ()
 

Protected Attributes

InitMenuDatampData {}
 
- Protected Attributes inherited from PopupMenuTable
std::shared_ptr< PopupSubMenumTop
 
std::vector< PopupMenuGroupItem * > mStack
 
Identifier mId
 
TranslatableString mCaption
 
std::unique_ptr< PopupMenuGroupItemmRegistry
 

Additional Inherited Members

- Public Types inherited from PopupMenuTable
using Entry = PopupMenuTableEntry
 
- Public Member Functions inherited from PopupMenuTable
 PopupMenuTable (const Identifier &id, const TranslatableString &caption={})
 
const IdentifierId () const
 
const TranslatableStringCaption () const
 
const auto * GetRegistry () const
 
const auto & Get (void *pUserData)
 
void Clear ()
 
- Public Member Functions inherited from PopupMenuHandler
 PopupMenuHandler ()=default
 
 PopupMenuHandler (const PopupMenuHandler &)=delete
 
PopupMenuHandleroperator= (const PopupMenuHandler &)=delete
 
virtual void InitUserData (void *pUserData)=0
 Called before the menu items are appended. More...
 
- Static Public Member Functions inherited from PopupMenuTable
static std::unique_ptr< PopupMenuBuildMenu (PopupMenuTable *pTable, void *pUserData=NULL)
 
static void ExtendMenu (PopupMenu &menu, PopupMenuTable &otherTable)
 
template<typename Table , typename Factory >
static auto Adapt (const Factory &factory)
 
- Static Protected Member Functions inherited from PopupMenuTable
static TranslatableString MakeLabel (const TranslatableString &label, bool useExtra, const TranslatableString &extra)
 
- Private Member Functions inherited from PrefsListener
 PrefsListener ()
 
virtual ~PrefsListener ()
 
virtual void UpdatePrefs ()=0
 
virtual void UpdateSelectedPrefs (int id)
 
- Static Private Member Functions inherited from PrefsListener
static void Broadcast (int id=0)
 Call this static function to notify all PrefsListener objects. More...
 

Detailed Description

Definition at line 62 of file WaveChannelVZoomHandle.h.

Constructor & Destructor Documentation

◆ WaveTrackVRulerMenuTable()

WaveTrackVRulerMenuTable::WaveTrackVRulerMenuTable ( const Identifier id)
inlineprotected

Definition at line 79 of file WaveChannelVZoomHandle.h.

80 : PopupMenuTable{ id }
81 {}

Member Function Documentation

◆ InitUserData()

void WaveTrackVRulerMenuTable::InitUserData ( void *  pUserData)
overrideprotectedvirtual

Called before the menu items are appended.

Store context data, if needed. May be called more than once before the menu opens. Pointer remains valid for the duration of any callback, if PopupMenuTable::BuildMenu() is called and the result's Popup() is called before any other menus are built.

Implements PopupMenuHandler.

Definition at line 33 of file WaveChannelVZoomHandle.cpp.

34{
35 mpData = static_cast<InitMenuData*>(pUserData);
36}

References mpData.

◆ OnZoom()

void WaveTrackVRulerMenuTable::OnZoom ( WaveChannelViewConstants::ZoomActions  iZoomCode)
protected

◆ OnZoomFitVertical()

void WaveTrackVRulerMenuTable::OnZoomFitVertical ( wxCommandEvent &  )
inlineprotected

Definition at line 89 of file WaveChannelVZoomHandle.h.

References WaveChannelViewConstants::kZoom1to1.

◆ OnZoomHalfWave()

void WaveTrackVRulerMenuTable::OnZoomHalfWave ( wxCommandEvent &  )
inlineprotected

◆ OnZoomInVertical()

void WaveTrackVRulerMenuTable::OnZoomInVertical ( wxCommandEvent &  )
inlineprotected

◆ OnZoomOutVertical()

void WaveTrackVRulerMenuTable::OnZoomOutVertical ( wxCommandEvent &  )
inlineprotected

◆ OnZoomReset()

void WaveTrackVRulerMenuTable::OnZoomReset ( wxCommandEvent &  )
inlineprotected

◆ UpdatePrefs()

void WaveTrackVRulerMenuTable::UpdatePrefs ( )
overrideprotectedvirtual

Implements PrefsListener.

Definition at line 51 of file WaveChannelVZoomHandle.cpp.

52{
53 // Because labels depend on advanced vertical zoom setting
55}

References PopupMenuTable::Clear().

Here is the call graph for this function:

Member Data Documentation

◆ mpData

InitMenuData* WaveTrackVRulerMenuTable::mpData {}
protected

Definition at line 86 of file WaveChannelVZoomHandle.h.

Referenced by InitUserData(), and OnZoom().


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