From 4fe8863a1176f7fe4057d82b2844dd7127b13bca Mon Sep 17 00:00:00 2001 From: Thomas Grill Date: Wed, 16 Mar 2005 04:59:36 +0000 Subject: much cleaner Window GUI code fixed bug with param method updated build system minimal feedback attribute for parameter reporting clean handling of plugin deletion (potentially open editor window etc.) updated for new flext function naming names containing spaces are now correctly dumped added event processing (like Midi in) more consistent MIDI functionality trying to catch crashing plugins svn path=/trunk/; revision=2630 --- externals/grill/vst/src/vstedit.cpp | 52 +++++++++++++++++++++---------------- 1 file changed, 29 insertions(+), 23 deletions(-) (limited to 'externals/grill/vst/src/vstedit.cpp') diff --git a/externals/grill/vst/src/vstedit.cpp b/externals/grill/vst/src/vstedit.cpp index 804e83ca..1536b9d3 100644 --- a/externals/grill/vst/src/vstedit.cpp +++ b/externals/grill/vst/src/vstedit.cpp @@ -27,50 +27,56 @@ void VSTPlugin::StartEditing(WHandle h) { FLEXT_ASSERT(h != NULL); Dispatch(effEditOpen,0,0,hwnd = h); -// Dispatch(effEditTop); TitleEditor(this,title.c_str()); } void VSTPlugin::StopEditing() { - if(Is()) { - Dispatch(effEditClose); - hwnd = NULL; - } + if(Is() && IsEdited()) + Dispatch(effEditClose); } -void VSTPlugin::Visible(bool vis) +void VSTPlugin::Visible(bool vis,bool upd) { - if(Is() && IsEdited()) ShowEditor(this,vis); + visible = vis; + if(upd && Is() && IsEdited()) ShowEditor(this,vis); } -bool VSTPlugin::IsVisible() const -{ - return Is() && IsEdited() && IsEditorShown(this); +void VSTPlugin::SetPos(int x,int y,bool upd) +{ + posx = x; posy = y; + if(upd && Is() && IsEdited()) MoveEditor(this,posx,posy); } - -void VSTPlugin::SetPos(int x,int y,bool upd) +void VSTPlugin::SetSize(int x,int y,bool upd) { - if(Is()) { - posx = x; posy = y; - if(upd && IsEdited()) MoveEditor(this,posx,posy); - } + sizex = x; sizey = y; + if(upd && Is() && IsEdited()) SizeEditor(this,sizex,sizey); } void VSTPlugin::SetCaption(bool c) { - if(Is()) { - caption = c; - if(IsEdited()) CaptionEditor(this,c); - } + caption = c; + if(Is() && IsEdited()) CaptionEditor(this,c); +} + +void VSTPlugin::SetHandle(bool h) +{ + handle = h; + if(Is() && IsEdited()) HandleEditor(this,h); } void VSTPlugin::SetTitle(const char *t) { - if(Is()) { - title = t; - if(IsEdited()) TitleEditor(this,t); + title = t; + if(Is() && IsEdited()) TitleEditor(this,t); +} + +void VSTPlugin::ToFront() +{ + if(Is() && IsEdited()) { + FrontEditor(this); + Dispatch(effEditTop,0,0,vendorname); } } -- cgit v1.2.1