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 ********************************************************************//********************************************************************/
18 #ifndef AUDACITY_AUCONTROL_H
19 #define AUDACITY_AUCONTROL_H
20 
21 #if !defined(_LP64)
22 #include <Carbon/Carbon.h>
23 #endif
24 
25 #include <wx/osx/private.h>
26 #include <wx/control.h>
27 
28 #include <AudioUnit/AudioComponent.h>
29 
30 class AUControlImpl final : public wxWidgetCocoaImpl
31 {
32 public :
33  AUControlImpl(wxWindowMac *peer, NSView *view);
35 };
36 
37 class AUControl final : public wxControl
38 {
39 public:
40  AUControl();
41  ~AUControl();
42 
43  void Close();
44 
45  bool Create(wxWindow *parent, AudioComponent comp, AudioUnit unit, bool custom);
46  void CreateCocoa();
47  void CreateGeneric();
48  void CocoaViewResized();
49 
50  void OnSize(wxSizeEvent & evt);
51 
52 #if !defined(_LP64)
53  void CreateCarbon();
54  void CreateCarbonOverlay();
55  void CarbonViewResized();
56  static pascal OSStatus ControlEventHandlerCallback(EventHandlerCallRef handler,
57  EventRef event,
58  void *data);
59 #endif
60 
61 private:
62  AudioComponent mComponent;
63  AudioUnit mUnit;
64 
65  NSView *mAUView;
66  NSView *mView;
67 
68  wxSize mLastMin;
70 
71 #if !defined(_LP64)
72  AudioComponentInstance mInstance;
73  WindowRef mWindowRef;
74  HIViewRef mHIView;
75 #endif
76 
77  DECLARE_EVENT_TABLE()
78 };
79 
80 #endif
AUControlImpl(wxWindowMac *peer, NSView *view)
AudioComponent mComponent
Definition: AUControl.h:62
bool Create(wxWindow *parent, AudioComponent comp, AudioUnit unit, bool custom)
wxSize mLastMin
Definition: AUControl.h:68
void CreateCocoa()
void CreateCarbon()
bool mSettingSize
Definition: AUControl.h:69
NSView * mAUView
Definition: AUControl.h:65
void CreateGeneric()
a wxWidgetCocoaImpl
Definition: AUControl.h:30
HIViewRef mHIView
Definition: AUControl.h:74
NSView * mView
Definition: AUControl.h:66
WindowRef mWindowRef
Definition: AUControl.h:73
void OnSize(wxSizeEvent &evt)
void CocoaViewResized()
AudioUnit mUnit
Definition: AUControl.h:63
void CarbonViewResized()
AudioComponentInstance mInstance
Definition: AUControl.h:72
void CreateCarbonOverlay()
void Close()
static pascal OSStatus ControlEventHandlerCallback(EventHandlerCallRef handler, EventRef event, void *data)
a wxControl with Cocoa/Carbon support
Definition: AUControl.h:37