Audacity 3.2.0
Public Member Functions | Public Attributes | List of all members
MusicalInstrument Class Reference

#include <MixerBoard.h>

Collaboration diagram for MusicalInstrument:
[legend]

Public Member Functions

 MusicalInstrument (std::unique_ptr< wxBitmap > &&pBitmap, const wxString &strXPMfilename)
 
virtual ~MusicalInstrument ()
 

Public Attributes

std::unique_ptr< wxBitmap > mBitmap
 
wxArrayString mKeywords
 

Detailed Description

Definition at line 158 of file MixerBoard.h.

Constructor & Destructor Documentation

◆ MusicalInstrument()

MusicalInstrument::MusicalInstrument ( std::unique_ptr< wxBitmap > &&  pBitmap,
const wxString &  strXPMfilename 
)

Definition at line 812 of file MixerBoard.cpp.

813{
814 mBitmap = std::move(pBitmap);
815
816 int nUnderscoreIndex;
817 wxString strFilename = strXPMfilename;
818 strFilename.MakeLower(); // Make sure, so we don't have to do case insensitive comparison.
819 wxString strKeyword;
820 while ((nUnderscoreIndex = strFilename.Find(wxT('_'))) != -1)
821 {
822 strKeyword = strFilename.Left(nUnderscoreIndex);
823 mKeywords.push_back(strKeyword);
824 strFilename = strFilename.Mid(nUnderscoreIndex + 1);
825 }
826 if (!strFilename.empty()) // Skip trailing underscores.
827 mKeywords.push_back(strFilename); // Add the last one.
828}
wxT("CloseDown"))
std::unique_ptr< wxBitmap > mBitmap
Definition: MixerBoard.h:164
wxArrayString mKeywords
Definition: MixerBoard.h:165

References mBitmap, mKeywords, and wxT().

Here is the call graph for this function:

◆ ~MusicalInstrument()

MusicalInstrument::~MusicalInstrument ( )
virtual

Definition at line 830 of file MixerBoard.cpp.

831{
832 mKeywords.clear();
833}

References mKeywords.

Member Data Documentation

◆ mBitmap

std::unique_ptr<wxBitmap> MusicalInstrument::mBitmap

Definition at line 164 of file MixerBoard.h.

Referenced by MusicalInstrument().

◆ mKeywords

wxArrayString MusicalInstrument::mKeywords

Definition at line 165 of file MixerBoard.h.

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


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