| @@ -124,9 +124,7 @@ public: | |||||
| : itemInfo (itemInfo_), | : itemInfo (itemInfo_), | ||||
| isHighlighted (false) | isHighlighted (false) | ||||
| { | { | ||||
| if (itemInfo.customComp != nullptr) | |||||
| addAndMakeVisible (itemInfo.customComp); | |||||
| addAndMakeVisible (itemInfo.customComp); | |||||
| parent->addAndMakeVisible (this); | parent->addAndMakeVisible (this); | ||||
| int itemW = 80; | int itemW = 80; | ||||
| @@ -139,8 +137,7 @@ public: | |||||
| ~ItemComponent() | ~ItemComponent() | ||||
| { | { | ||||
| if (itemInfo.customComp != nullptr) | |||||
| removeChildComponent (itemInfo.customComp); | |||||
| removeChildComponent (itemInfo.customComp); | |||||
| } | } | ||||
| void getIdealSize (int& idealWidth, int& idealHeight, const int standardItemHeight) | void getIdealSize (int& idealWidth, int& idealHeight, const int standardItemHeight) | ||||
| @@ -77,6 +77,9 @@ | |||||
| */ | */ | ||||
| class JUCE_API PopupMenu | class JUCE_API PopupMenu | ||||
| { | { | ||||
| private: | |||||
| class Window; | |||||
| public: | public: | ||||
| //============================================================================== | //============================================================================== | ||||
| /** Creates an empty popup menu. */ | /** Creates an empty popup menu. */ | ||||
| @@ -232,6 +235,7 @@ public: | |||||
| private: | private: | ||||
| friend class PopupMenu; | friend class PopupMenu; | ||||
| friend class PopupMenu::Window; | |||||
| Rectangle<int> targetArea; | Rectangle<int> targetArea; | ||||
| Component* targetComponent; | Component* targetComponent; | ||||
| int visibleItemID, minWidth, maxColumns, standardHeight; | int visibleItemID, minWidth, maxColumns, standardHeight; | ||||
| @@ -474,7 +478,6 @@ private: | |||||
| //============================================================================== | //============================================================================== | ||||
| class Item; | class Item; | ||||
| class ItemComponent; | class ItemComponent; | ||||
| class Window; | |||||
| friend class MenuItemIterator; | friend class MenuItemIterator; | ||||
| friend class ItemComponent; | friend class ItemComponent; | ||||
| @@ -275,6 +275,7 @@ protected: | |||||
| */ | */ | ||||
| virtual void setLastDocumentOpened (const File& file) = 0; | virtual void setLastDocumentOpened (const File& file) = 0; | ||||
| #if JUCE_MODAL_LOOPS_PERMITTED | |||||
| /** This is called by saveAsInteractive() to allow you to optionally customise the | /** This is called by saveAsInteractive() to allow you to optionally customise the | ||||
| filename that the user is presented with in the save dialog. | filename that the user is presented with in the save dialog. | ||||
| The defaultFile parameter is an initial suggestion based on what the class knows | The defaultFile parameter is an initial suggestion based on what the class knows | ||||
| @@ -282,6 +283,7 @@ protected: | |||||
| extension, etc, or just return something completely different. | extension, etc, or just return something completely different. | ||||
| */ | */ | ||||
| virtual File getSuggestedSaveAsFile (const File& defaultFile); | virtual File getSuggestedSaveAsFile (const File& defaultFile); | ||||
| #endif | |||||
| private: | private: | ||||
| //============================================================================== | //============================================================================== | ||||
| @@ -113,41 +113,23 @@ public: | |||||
| int atts[64]; | int atts[64]; | ||||
| int n = 0; | int n = 0; | ||||
| atts[n++] = WGL_DRAW_TO_WINDOW_ARB; | |||||
| atts[n++] = GL_TRUE; | |||||
| atts[n++] = WGL_SUPPORT_OPENGL_ARB; | |||||
| atts[n++] = GL_TRUE; | |||||
| atts[n++] = WGL_ACCELERATION_ARB; | |||||
| atts[n++] = WGL_FULL_ACCELERATION_ARB; | |||||
| atts[n++] = WGL_DOUBLE_BUFFER_ARB; | |||||
| atts[n++] = GL_TRUE; | |||||
| atts[n++] = WGL_PIXEL_TYPE_ARB; | |||||
| atts[n++] = WGL_TYPE_RGBA_ARB; | |||||
| atts[n++] = WGL_COLOR_BITS_ARB; | |||||
| atts[n++] = pfd.cColorBits; | |||||
| atts[n++] = WGL_RED_BITS_ARB; | |||||
| atts[n++] = pixelFormat.redBits; | |||||
| atts[n++] = WGL_GREEN_BITS_ARB; | |||||
| atts[n++] = pixelFormat.greenBits; | |||||
| atts[n++] = WGL_BLUE_BITS_ARB; | |||||
| atts[n++] = pixelFormat.blueBits; | |||||
| atts[n++] = WGL_ALPHA_BITS_ARB; | |||||
| atts[n++] = pixelFormat.alphaBits; | |||||
| atts[n++] = WGL_DEPTH_BITS_ARB; | |||||
| atts[n++] = pixelFormat.depthBufferBits; | |||||
| atts[n++] = WGL_STENCIL_BITS_ARB; | |||||
| atts[n++] = pixelFormat.stencilBufferBits; | |||||
| atts[n++] = WGL_ACCUM_RED_BITS_ARB; | |||||
| atts[n++] = pixelFormat.accumulationBufferRedBits; | |||||
| atts[n++] = WGL_ACCUM_GREEN_BITS_ARB; | |||||
| atts[n++] = pixelFormat.accumulationBufferGreenBits; | |||||
| atts[n++] = WGL_ACCUM_BLUE_BITS_ARB; | |||||
| atts[n++] = pixelFormat.accumulationBufferBlueBits; | |||||
| atts[n++] = WGL_ACCUM_ALPHA_BITS_ARB; | |||||
| atts[n++] = pixelFormat.accumulationBufferAlphaBits; | |||||
| atts[n++] = WGL_DRAW_TO_WINDOW_ARB; atts[n++] = GL_TRUE; | |||||
| atts[n++] = WGL_SUPPORT_OPENGL_ARB; atts[n++] = GL_TRUE; | |||||
| atts[n++] = WGL_DOUBLE_BUFFER_ARB; atts[n++] = GL_TRUE; | |||||
| atts[n++] = WGL_PIXEL_TYPE_ARB; atts[n++] = WGL_TYPE_RGBA_ARB; | |||||
| atts[n++] = WGL_COLOR_BITS_ARB; atts[n++] = pfd.cColorBits; | |||||
| atts[n++] = WGL_RED_BITS_ARB; atts[n++] = pixelFormat.redBits; | |||||
| atts[n++] = WGL_GREEN_BITS_ARB; atts[n++] = pixelFormat.greenBits; | |||||
| atts[n++] = WGL_BLUE_BITS_ARB; atts[n++] = pixelFormat.blueBits; | |||||
| atts[n++] = WGL_ALPHA_BITS_ARB; atts[n++] = pixelFormat.alphaBits; | |||||
| atts[n++] = WGL_DEPTH_BITS_ARB; atts[n++] = pixelFormat.depthBufferBits; | |||||
| atts[n++] = WGL_STENCIL_BITS_ARB; atts[n++] = pixelFormat.stencilBufferBits; | |||||
| atts[n++] = WGL_ACCUM_RED_BITS_ARB; atts[n++] = pixelFormat.accumulationBufferRedBits; | |||||
| atts[n++] = WGL_ACCUM_GREEN_BITS_ARB; atts[n++] = pixelFormat.accumulationBufferGreenBits; | |||||
| atts[n++] = WGL_ACCUM_BLUE_BITS_ARB; atts[n++] = pixelFormat.accumulationBufferBlueBits; | |||||
| atts[n++] = WGL_ACCUM_ALPHA_BITS_ARB; atts[n++] = pixelFormat.accumulationBufferAlphaBits; | |||||
| if (pixelFormat.multisamplingLevel > 0 | if (pixelFormat.multisamplingLevel > 0 | ||||
| && OpenGLHelpers::isExtensionSupported ("GL_ARB_multisample")) | && OpenGLHelpers::isExtensionSupported ("GL_ARB_multisample")) | ||||