JUCE-7.0.12-0-g4f43011b96
JUCE-7.0.12-0-g4f43011b96
JUCE — C++ application framework with suport for VST, VST3, LV2 audio plug-ins
« « « Anklang Documentation
Loading...
Searching...
No Matches
juce_audio_processors
format_types
VST3_SDK
public.sdk
source
common
pluginview.cpp
Go to the documentation of this file.
1
//-----------------------------------------------------------------------------
2
// Project : SDK Core
3
//
4
// Category : Common Base Classes
5
// Filename : public.sdk/source/common/pluginview.cpp
6
// Created by : Steinberg, 01/2004
7
// Description : Plug-In View Implementation
8
//
9
//-----------------------------------------------------------------------------
10
// LICENSE
11
// (c) 2023, Steinberg Media Technologies GmbH, All Rights Reserved
12
//-----------------------------------------------------------------------------
13
// Redistribution and use in source and binary forms, with or without modification,
14
// are permitted provided that the following conditions are met:
15
//
16
// * Redistributions of source code must retain the above copyright notice,
17
// this list of conditions and the following disclaimer.
18
// * Redistributions in binary form must reproduce the above copyright notice,
19
// this list of conditions and the following disclaimer in the documentation
20
// and/or other materials provided with the distribution.
21
// * Neither the name of the Steinberg Media Technologies nor the names of its
22
// contributors may be used to endorse or promote products derived from this
23
// software without specific prior written permission.
24
//
25
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
26
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
27
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
28
// IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
29
// INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
30
// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
31
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
32
// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
33
// OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
34
// OF THE POSSIBILITY OF SUCH DAMAGE.
35
//-----------------------------------------------------------------------------
36
37
#include "
pluginview.h
"
38
39
namespace
Steinberg {
40
41
//------------------------------------------------------------------------
42
// CPluginView implementation
43
//------------------------------------------------------------------------
44
CPluginView::CPluginView (
const
ViewRect* _rect)
45
: rect (0, 0, 0, 0)
46
{
47
if
(_rect)
48
rect = *_rect;
49
}
50
51
//------------------------------------------------------------------------
52
CPluginView::~CPluginView ()
53
{
54
// NOLINTNEXTLINE(clang-analyzer-optin.cplusplus.VirtualCall)
55
setFrame (
nullptr
);
56
}
57
58
//------------------------------------------------------------------------
59
tresult PLUGIN_API CPluginView::isPlatformTypeSupported (FIDString
/*type*/
)
60
{
61
return
kNotImplemented;
62
}
63
64
//------------------------------------------------------------------------
65
tresult PLUGIN_API CPluginView::attached (
void
* parent, FIDString
/*type*/
)
66
{
67
systemWindow = parent;
68
69
attachedToParent ();
70
return
kResultOk;
71
}
72
73
//------------------------------------------------------------------------
74
tresult PLUGIN_API CPluginView::removed ()
75
{
76
systemWindow =
nullptr
;
77
78
removedFromParent ();
79
return
kResultOk;
80
}
81
82
//------------------------------------------------------------------------
83
tresult PLUGIN_API CPluginView::onSize (
ViewRect
* newSize)
84
{
85
if
(newSize)
86
rect = *newSize;
87
return
kResultTrue;
88
}
89
90
//------------------------------------------------------------------------
91
tresult PLUGIN_API CPluginView::getSize (
ViewRect
* size)
92
{
93
if
(size)
94
{
95
*size = rect;
96
return
kResultTrue;
97
}
98
return
kInvalidArgument;
99
}
100
101
}
// end of namespace
pluginview.h
Steinberg::ViewRect
Graphical rectangle structure.
Definition
iplugview.h:35
« « « Anklang Documentation