#include "wx/colordlg.h"
#include "wx/fontdlg.h"
+#include "wx/modalhook.h"
// ============================================================================
// implementation
NSAutoreleasePool *thePool;
thePool = [[NSAutoreleasePool alloc] init];
+ [[NSColorPanel sharedColorPanel] setShowsAlpha:YES];
if(m_colourData.GetColour().IsOk())
[[NSColorPanel sharedColorPanel] setColor:
[NSColor colorWithCalibratedRed:(CGFloat) (m_colourData.GetColour().Red() / 255.0)
green:(CGFloat) (m_colourData.GetColour().Green() / 255.0)
blue:(CGFloat) (m_colourData.GetColour().Blue() / 255.0)
- alpha:(CGFloat) 1.0]
+ alpha:(CGFloat) (m_colourData.GetColour().Alpha() / 255.0)]
];
else
[[NSColorPanel sharedColorPanel] setColor:[NSColor blackColor]];
}
int wxColourDialog::ShowModal()
{
+ WX_HOOK_MODAL_DIALOG();
+
//Start the pool. Required for carbon interaction
//(For those curious, the only thing that happens
//if you don't do this is a bunch of error
m_colourData.GetColour().Set(
(unsigned char) ([theColor redComponent] * 255.0),
(unsigned char) ([theColor greenComponent] * 255.0),
- (unsigned char) ([theColor blueComponent] * 255.0)
- );
+ (unsigned char) ([theColor blueComponent] * 255.0),
+ (unsigned char) ([theColor alphaComponent] * 255.0)
+ );
//Release the pool, we're done :)
[thePool release];