Audacity 3.2.0
auStaticText.h
Go to the documentation of this file.
1/*!********************************************************************
2
3 Audacity: A Digital Audio Editor
4
5 @file auStaticText.h
6
7 Paul Licameli split from Theme.h
8
9**********************************************************************/
10
11#ifndef __AUDACITY_AU_STATIC_TEXT__
12#define __AUDACITY_AU_STATIC_TEXT__
13
14#include <wx/window.h> // to inherit
15
16class wxString;
17class wxPaintEvent;
18
19class AUDACITY_DLL_API auStaticText : public wxWindow
20{
21public:
22 auStaticText(wxWindow* parent, wxString text);
23 void OnPaint(wxPaintEvent & evt);
24 bool AcceptsFocus() const override { return false; }
25 void OnErase(wxEraseEvent& event) {
26 static_cast<void>(event);
27 };
28
30 void ScaleFont(double scale);
31
32 void SetSelected(bool selected);
33 bool GetSelected() const noexcept;
34
35private:
36 bool mIsSelected { false };
38};
39
40#endif
is like wxStaticText, except it can be themed. wxStaticText can't be.
Definition: auStaticText.h:20
void OnErase(wxEraseEvent &event)
Definition: auStaticText.h:25
bool AcceptsFocus() const override
Definition: auStaticText.h:24