-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCarbonView.cpp
52 lines (40 loc) · 1.32 KB
/
CarbonView.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
/*
* CarbonView.cpp
* Convolvotron
*
* Created by Seth Nickell on 8/23/09.
* Copyright 2009 Meatscience. All rights reserved.
*
*/
#include "CarbonView.h"
OSStatus CarbonView::CreateUI(Float32 xoffset, Float32 yoffset)
{
#if _CARBON_UI_WRAPPER_DEBUG
cout << "AUCarbonViewCocoaWrapper::CreateUI(" << xoffset << ", " << yoffset << ")" << endl;
#endif
#if 0
OSStatus result;
IBNibRef nibRef;
// Create a Nib reference passing the name of the nib file (without the .nib extension)
// CreateNibReference only searches into the application bundle.
result = CreateNibReference( CFSTR( "MeatscienceConvolvotron_CarbonView" ), &nibRef );
require_noerr( err, CantGetNibRef );
err = CreateWindowFromNib( nibRef, CFSTR( "MainWindow" ), &window );
require_noerr( err, CantCreateWindow );
err = GetControlByID( window, &kDialControl, &view );
require_noerr( err, CantGetControlByID );
/*
NSView *cocoaView = this->loadCocoaView();
assert(cocoaView);
NSSize cocoaViewSize = [cocoaView frame].size;
HIViewRef hiView;
result = HICocoaViewCreate(cocoaView, 0, &hiView);
assert(result == noErr);
SizeControl(hiView, cocoaViewSize.width, cocoaViewSize.height);
HIViewSetVisible(hiView, true);
*/
/* Add it to the AudioUnitCarbonView */
verify_noerr(EmbedControl(hiView));
#endif
return noErr;
}