Browse Source

Couple of minor compilation fixes.

tags/2021-05-28
jules 13 years ago
parent
commit
ca17d3dd82
4 changed files with 25 additions and 41 deletions
  1. +2
    -5
      modules/juce_gui_basics/menus/juce_PopupMenu.cpp
  2. +4
    -1
      modules/juce_gui_basics/menus/juce_PopupMenu.h
  3. +2
    -0
      modules/juce_gui_extra/documents/juce_FileBasedDocument.h
  4. +17
    -35
      modules/juce_opengl/native/juce_win32_OpenGLComponent.cpp

+ 2
- 5
modules/juce_gui_basics/menus/juce_PopupMenu.cpp View File

@@ -124,9 +124,7 @@ public:
: itemInfo (itemInfo_),
isHighlighted (false)
{
if (itemInfo.customComp != nullptr)
addAndMakeVisible (itemInfo.customComp);
addAndMakeVisible (itemInfo.customComp);
parent->addAndMakeVisible (this);
int itemW = 80;
@@ -139,8 +137,7 @@ public:
~ItemComponent()
{
if (itemInfo.customComp != nullptr)
removeChildComponent (itemInfo.customComp);
removeChildComponent (itemInfo.customComp);
}
void getIdealSize (int& idealWidth, int& idealHeight, const int standardItemHeight)


+ 4
- 1
modules/juce_gui_basics/menus/juce_PopupMenu.h View File

@@ -77,6 +77,9 @@
*/
class JUCE_API PopupMenu
{
private:
class Window;
public:
//==============================================================================
/** Creates an empty popup menu. */
@@ -232,6 +235,7 @@ public:
private:
friend class PopupMenu;
friend class PopupMenu::Window;
Rectangle<int> targetArea;
Component* targetComponent;
int visibleItemID, minWidth, maxColumns, standardHeight;
@@ -474,7 +478,6 @@ private:
//==============================================================================
class Item;
class ItemComponent;
class Window;
friend class MenuItemIterator;
friend class ItemComponent;


+ 2
- 0
modules/juce_gui_extra/documents/juce_FileBasedDocument.h View File

@@ -275,6 +275,7 @@ protected:
*/
virtual void setLastDocumentOpened (const File& file) = 0;
#if JUCE_MODAL_LOOPS_PERMITTED
/** This is called by saveAsInteractive() to allow you to optionally customise the
filename that the user is presented with in the save dialog.
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.
*/
virtual File getSuggestedSaveAsFile (const File& defaultFile);
#endif
private:
//==============================================================================


+ 17
- 35
modules/juce_opengl/native/juce_win32_OpenGLComponent.cpp View File

@@ -113,41 +113,23 @@ public:
int atts[64];
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
&& OpenGLHelpers::isExtensionSupported ("GL_ARB_multisample"))


Loading…
Cancel
Save