diff options
author | Thomas Grill <xovo@users.sourceforge.net> | 2005-03-16 04:59:36 +0000 |
---|---|---|
committer | Thomas Grill <xovo@users.sourceforge.net> | 2005-03-16 04:59:36 +0000 |
commit | 4fe8863a1176f7fe4057d82b2844dd7127b13bca (patch) | |
tree | d46f9bb330d4686f797a426304cd58092908aff1 /externals/grill/vst/src/vstedit.cpp | |
parent | 4d4f8d07f3341e8309c1b066263a40227664bc3d (diff) |
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
Diffstat (limited to 'externals/grill/vst/src/vstedit.cpp')
-rw-r--r-- | externals/grill/vst/src/vstedit.cpp | 52 |
1 files changed, 29 insertions, 23 deletions
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);
}
}
|