//------------------------------------------------------------- void ConeGeometry::init(DolfinGui *ui) { setPointCount(6); setRadiusCount(2); setCreated(false); setGuiWindow(ui); setPoints(new double[getPointCount()]); setPoints(new double[getRadiusCount()]); setMyType("Cone"); }
VstPluginExternalEditor::~VstPluginExternalEditor () { DBG ("VstPluginExternalEditor::~VstPluginExternalEditor"); if (isTimerRunning()) stopTimer(); #if defined(LINUX) #elif defined(_WIN32) #endif if (plugin) plugin->closeEditor (); #ifdef JUCE_MAC setGuiWindow(0); #endif // JUCE_MAC }
//============================================================================== VstPluginExternalEditor::VstPluginExternalEditor (BasePlugin* plugin_, VstPluginWindow* window_) : PluginEditorComponent (plugin_), #if defined(LINUX) eventProc (0), #endif handle (0), window (window_), editorWidth (0), editorHeight (0), offsetX (0), offsetY (0) #ifdef JUCE_MAC , vstGuiWindow(0) #endif { DBG ("VstPluginExternalEditor::VstPluginExternalEditor"); setWantsKeyboardFocus (true); setVisible (true); #if defined(LINUX) plugin->openEditor (window->getWindowHandle (), display); handle = getChildWindow ((Window) window->getWindowHandle ()); if (handle) eventProc = (EventProcPtr) obtainPropertyFromXWindow (handle, XInternAtom (display, "_XEventProc", false)); #elif defined(_WIN32) plugin->openEditor (window->getWindowHandle (), (void*) 0); handle = GetWindow ((HWND) window->getWindowHandle(), GW_CHILD); #endif if (editorWidth <= 0 || editorHeight <= 0) plugin->getEditorSize (editorWidth, editorHeight); jassert (editorWidth > 0 && editorHeight > 0); setSize (editorWidth, editorHeight); offsetX = window->getBorderThickness().getLeft (); offsetY = window->getTitleBarHeight() + window->getMenuBarHeight() + window->getBorderThickness().getTop (); if (handle) { #if defined(LINUX) XResizeWindow (display, handle, editorWidth, editorHeight); XMoveWindow (display, handle, offsetX, offsetY); #elif defined (_WIN32) MoveWindow (handle, offsetX, offsetY, editorWidth, editorHeight, true); #endif } #ifdef JUCE_MAC setGuiWindow(new MacVSTGUIPositionHelperWindow(plugin, window->getX() + offsetX, window->getY() + offsetY)); showGUI(true); #endif repaint (); startTimer (1000 / 10); }