Audacity  2.2.0
AUControl.h
Go to the documentation of this file.
1 /**********************************************************************
2 
3  Audacity: A Digital Audio Editor
4 
5  AUControl.h
6 
7  Leland Lucius
8 
9 **********************************************************************/
10 
11 #ifndef AUDACITY_AUCONTROL_H
12 #define AUDACITY_AUCONTROL_H
13 
14 #if !defined(_LP64)
15 #include <Carbon/Carbon.h>
16 #endif
17 
18 #include <wx/osx/private.h>
19 #include <wx/control.h>
20 
21 #include <AudioUnit/AudioComponent.h>
22 
23 class AUControlImpl final : public wxWidgetCocoaImpl
24 {
25 public :
26  AUControlImpl(wxWindowMac *peer, NSView *view);
28 };
29 
30 class AUControl final : public wxControl
31 {
32 public:
33  AUControl();
34  ~AUControl();
35 
36  void Close();
37 
38  bool Create(wxWindow *parent, AudioComponent comp, AudioUnit unit, bool custom);
39  void CreateCocoa();
40  void CreateGeneric();
41  void CocoaViewResized();
42 
43  void OnSize(wxSizeEvent & evt);
44 
45 #if !defined(_LP64)
46  void CreateCarbon();
47  void CreateCarbonOverlay();
48  void CarbonViewResized();
49  static pascal OSStatus ControlEventHandlerCallback(EventHandlerCallRef handler,
50  EventRef event,
51  void *data);
52 #endif
53 
54 private:
55  AudioComponent mComponent;
56  AudioUnit mUnit;
57 
58  NSView *mAUView;
59  NSView *mView;
60 
61  wxSize mLastMin;
63 
64 #if !defined(_LP64)
65  AudioComponentInstance mInstance;
66  WindowRef mWindowRef;
67  HIViewRef mHIView;
68 #endif
69 
70  DECLARE_EVENT_TABLE()
71 };
72 
73 #endif
AUControlImpl(wxWindowMac *peer, NSView *view)
AudioComponent mComponent
Definition: AUControl.h:55
bool Create(wxWindow *parent, AudioComponent comp, AudioUnit unit, bool custom)
wxSize mLastMin
Definition: AUControl.h:61
void CreateCocoa()
void CreateCarbon()
bool mSettingSize
Definition: AUControl.h:62
NSView * mAUView
Definition: AUControl.h:58
void CreateGeneric()
Definition: AUControl.h:23
HIViewRef mHIView
Definition: AUControl.h:67
NSView * mView
Definition: AUControl.h:59
WindowRef mWindowRef
Definition: AUControl.h:66
void OnSize(wxSizeEvent &evt)
void CocoaViewResized()
AudioUnit mUnit
Definition: AUControl.h:56
void CarbonViewResized()
AudioComponentInstance mInstance
Definition: AUControl.h:65
void CreateCarbonOverlay()
void Close()
static pascal OSStatus ControlEventHandlerCallback(EventHandlerCallRef handler, EventRef event, void *data)
Definition: AUControl.h:30