Browse Source

tags/2021-05-28
jules 18 years ago
parent
commit
42df313efa
2 changed files with 30 additions and 4 deletions
  1. +3
    -0
      extras/audio plugins/wrapper/formats/RTAS/juce_RTASUtilities.cpp
  2. +27
    -4
      extras/audio plugins/wrapper/formats/RTAS/juce_RTASWrapper.cpp

+ 3
- 0
extras/audio plugins/wrapper/formats/RTAS/juce_RTASUtilities.cpp View File

@@ -67,6 +67,9 @@ void JUCE_CALLTYPE attachSubWindow (void* hostWindow,
DWORD val = GetWindowLong (plugWnd, GWL_STYLE);
val = (val & ~WS_POPUP) | WS_CHILD;
SetWindowLong (plugWnd, GWL_STYLE, val);
val = GetWindowLong ((HWND) hostWindow, GWL_STYLE);
SetWindowLong ((HWND) hostWindow, GWL_STYLE, val | WS_CLIPCHILDREN);
}
void JUCE_CALLTYPE resizeHostWindow (void* hostWindow,


+ 27
- 4
extras/audio plugins/wrapper/formats/RTAS/juce_RTASWrapper.cpp View File

@@ -77,6 +77,7 @@
#include "CEffectTypeRTAS.h"
#include "CPluginControl.h"
#include "CPluginControl_OnOff.h"
#include "FicProcessTokens.h"
//==============================================================================
#ifdef _MSC_VER
@@ -171,12 +172,15 @@ public:
}
//==============================================================================
class JuceCustomUIView : public CCustomView
class JuceCustomUIView : public CCustomView,
public Timer
{
public:
//==============================================================================
JuceCustomUIView (AudioProcessor* const filter_)
JuceCustomUIView (AudioProcessor* const filter_,
JucePlugInProcess* const process_)
: filter (filter_),
process (process_),
editorComp (0),
wrapper (0)
{
@@ -197,13 +201,30 @@ public:
jassert (editorComp != 0);
}
Rect oldRect;
GetRect (&oldRect);
Rect r;
r.left = 0;
r.top = 0;
r.right = editorComp->getWidth();
r.bottom = editorComp->getHeight();
SetRect (&r);
if ((oldRect.right != r.right) || (oldRect.bottom != r.bottom))
startTimer (50);
}
void timerCallback()
{
if (! JUCE_NAMESPACE::Component::isMouseButtonDownAnywhere())
{
stopTimer();
// Send a token to the host to tell it about the resize
SSetProcessWindowResizeToken token (process->fRootNameId, process->fRootNameId);
FicSDSDispatchToken (&token);
}
}
void attachToWindow (GrafPtr port)
@@ -262,6 +283,7 @@ public:
//==============================================================================
private:
AudioProcessor* const filter;
JucePlugInProcess* const process;
juce::Component* wrapper;
AudioProcessorEditor* editorComp;
@@ -450,6 +472,7 @@ public:
#if JUCE_WIN32
resizeHostWindow (hostWindow, titleW, titleH, this);
owner->updateSize();
#else
Rect r;
GetWindowBounds ((WindowRef) hostWindow, kWindowContentRgn, &r);
@@ -533,7 +556,7 @@ public:
CPlugInView* CreateCPlugInView()
{
return new JuceCustomUIView (juceFilter);
return new JuceCustomUIView (juceFilter, this);
}
void SetViewPort (GrafPtr port)


Loading…
Cancel
Save