@@ -10,16 +10,16 @@ use vst3::{Class, ComRef, ComWrapper, Steinberg::Vst::*, Steinberg::*};
10
10
use super :: buffers:: ScratchBuffers ;
11
11
use super :: host:: Vst3Host ;
12
12
use super :: util:: { copy_wstring, utf16_from_ptr} ;
13
- use super :: view:: { PlugView , Vst3EditorHost } ;
13
+ use super :: view:: { PlugView , Vst3ViewHost } ;
14
14
use crate :: bus:: { BusDir , Format , Layout } ;
15
- use crate :: editor:: Editor ;
16
15
use crate :: engine:: { Config , Engine } ;
17
16
use crate :: events:: { Data , Event , Events } ;
18
17
use crate :: host:: Host ;
19
18
use crate :: params:: ParamId ;
20
19
use crate :: plugin:: { Plugin , PluginInfo } ;
21
20
use crate :: sync:: params:: ParamValues ;
22
21
use crate :: util:: { slice_from_raw_parts_checked, DisplayParam } ;
22
+ use crate :: view:: View ;
23
23
24
24
fn format_to_speaker_arrangement ( format : & Format ) -> SpeakerArrangement {
25
25
match format {
@@ -39,9 +39,9 @@ fn speaker_arrangement_to_format(speaker_arrangement: SpeakerArrangement) -> Opt
39
39
pub struct MainThreadState < P : Plugin > {
40
40
pub config : Config ,
41
41
pub plugin : P ,
42
- pub editor_params : Vec < f64 > ,
43
- pub editor_host : Rc < Vst3EditorHost > ,
44
- pub editor : Option < P :: Editor > ,
42
+ pub view_params : Vec < f64 > ,
43
+ pub view_host : Rc < Vst3ViewHost > ,
44
+ pub view : Option < P :: View > ,
45
45
}
46
46
47
47
struct ProcessState < P : Plugin > {
@@ -95,7 +95,7 @@ impl<P: Plugin> Component<P> {
95
95
max_buffer_size : 0 ,
96
96
} ;
97
97
98
- let editor_params = info. params . iter ( ) . map ( |p| p. default ) . collect ( ) ;
98
+ let view_params = info. params . iter ( ) . map ( |p| p. default ) . collect ( ) ;
99
99
100
100
let scratch_buffers = ScratchBuffers :: new ( input_bus_map. len ( ) , output_bus_map. len ( ) ) ;
101
101
@@ -113,9 +113,9 @@ impl<P: Plugin> Component<P> {
113
113
main_thread_state : Arc :: new ( UnsafeCell :: new ( MainThreadState {
114
114
config : config. clone ( ) ,
115
115
plugin : P :: new ( Host :: from_inner ( host) ) ,
116
- editor_params ,
117
- editor_host : Rc :: new ( Vst3EditorHost :: new ( ) ) ,
118
- editor : None ,
116
+ view_params ,
117
+ view_host : Rc :: new ( Vst3ViewHost :: new ( ) ) ,
118
+ view : None ,
119
119
} ) ) ,
120
120
process_state : UnsafeCell :: new ( ProcessState {
121
121
config,
@@ -314,10 +314,10 @@ impl<P: Plugin> IComponentTrait for Component<P> {
314
314
for ( index, param) in self . info . params . iter ( ) . enumerate ( ) {
315
315
let value = main_thread_state. plugin . get_param ( param. id ) ;
316
316
self . engine_params . set ( index, value) ;
317
- main_thread_state. editor_params [ index] = value;
317
+ main_thread_state. view_params [ index] = value;
318
318
319
- if let Some ( editor ) = & mut main_thread_state. editor {
320
- editor . param_changed ( param. id , value) ;
319
+ if let Some ( view ) = & mut main_thread_state. view {
320
+ view . param_changed ( param. id , value) ;
321
321
}
322
322
}
323
323
@@ -675,7 +675,7 @@ impl<P: Plugin> IEditControllerTrait for Component<P> {
675
675
let main_thread_state = & * self . main_thread_state . get ( ) ;
676
676
677
677
if let Some ( & index) = self . param_map . get ( & id) {
678
- return main_thread_state. editor_params [ index] ;
678
+ return main_thread_state. view_params [ index] ;
679
679
}
680
680
681
681
0.0
@@ -685,10 +685,10 @@ impl<P: Plugin> IEditControllerTrait for Component<P> {
685
685
let main_thread_state = & mut * self . main_thread_state . get ( ) ;
686
686
687
687
if let Some ( & index) = self . param_map . get ( & id) {
688
- main_thread_state. editor_params [ index] = value;
688
+ main_thread_state. view_params [ index] = value;
689
689
690
- if let Some ( editor ) = & mut main_thread_state. editor {
691
- editor . param_changed ( id, value) ;
690
+ if let Some ( view ) = & mut main_thread_state. view {
691
+ view . param_changed ( id, value) ;
692
692
}
693
693
694
694
return kResultOk;
@@ -700,7 +700,7 @@ impl<P: Plugin> IEditControllerTrait for Component<P> {
700
700
unsafe fn setComponentHandler ( & self , handler : * mut IComponentHandler ) -> tresult {
701
701
let main_thread_state = & mut * self . main_thread_state . get ( ) ;
702
702
703
- let mut current_handler = main_thread_state. editor_host . handler . borrow_mut ( ) ;
703
+ let mut current_handler = main_thread_state. view_host . handler . borrow_mut ( ) ;
704
704
if let Some ( handler) = ComRef :: from_raw ( handler) {
705
705
* current_handler = Some ( handler. to_com_ptr ( ) ) ;
706
706
} else {
@@ -711,7 +711,7 @@ impl<P: Plugin> IEditControllerTrait for Component<P> {
711
711
}
712
712
713
713
unsafe fn createView ( & self , name : FIDString ) -> * mut IPlugView {
714
- if !self . info . has_editor {
714
+ if !self . info . has_view {
715
715
return ptr:: null_mut ( ) ;
716
716
}
717
717
0 commit comments