]> git.saurik.com Git - wxWidgets.git/blobdiff - src/mac/carbon/fontdlg.cpp
1. added wxEvtHandler::SafelyProcessEvent() and wxWindow::HandleWindowEvent() to...
[wxWidgets.git] / src / mac / carbon / fontdlg.cpp
index 4cde3f25bb19599991435038782f738ea3fb3f36..b6be431de3a881b3076b209e0d9b1b41e22a5dd1 100644 (file)
@@ -28,7 +28,7 @@
 
 #ifndef WX_PRECOMP
     #include "wx/intl.h"
-    #include "wx/wxchar.h"
+    #include "wx/crt.h"
     #include "wx/dcclient.h"
     #include "wx/frame.h"
     #include "wx/textctrl.h"
@@ -58,7 +58,10 @@ static const EventTypeSpec eventList[] =
 } ;
 
 
-pascal OSStatus wxMacCarbonFontPanelHandler(EventHandlerCallRef nextHandler, EventRef event, void *userData)
+pascal OSStatus
+wxMacCarbonFontPanelHandler(EventHandlerCallRef WXUNUSED(nextHandler),
+                            EventRef event,
+                            void *userData)
 {
     OSStatus result = eventNotHandledErr ;
     wxFontDialog *fontdialog = (wxFontDialog*) userData ;
@@ -125,7 +128,9 @@ pascal OSStatus wxMacCarbonFontPanelHandler(EventHandlerCallRef nextHandler, Eve
 
             RGBColor fontColor ;
             if ( cEvent.GetParameter<RGBColor>(kEventParamFontColor, &fontColor) == noErr )
-                fontdata.m_fontColour.FromRGBColor((WXCOLORREF*) &fontColor);
+            {
+                fontdata.m_fontColour = fontColor;
+            }
             else
             {
                 CFDictionaryRef dict ;
@@ -150,7 +155,7 @@ pascal OSStatus wxMacCarbonFontPanelHandler(EventHandlerCallRef nextHandler, Eve
                             {
                                 if ( tagPtr[i] == kATSUColorTag && sizePtr[i] == sizeof(RGBColor))
                                 {
-                                    fontdata.m_fontColour.FromRGBColor((WXCOLORREF*) valuesPtr);
+                                    fontdata.m_fontColour = *(RGBColor *)valuesPtr;
                                     break ;
                                 }
                                 bytePtr = (UInt32*)( (UInt8*)bytePtr + sizePtr[i]);
@@ -181,7 +186,7 @@ wxFontDialog::~wxFontDialog()
 {
 }
 
-bool wxFontDialog::Create(wxWindow *parent, const wxFontData& data)
+bool wxFontDialog::Create(wxWindow *WXUNUSED(parent), const wxFontData& data)
 {
     m_fontData = data;
     return true ;
@@ -352,7 +357,7 @@ void wxFontColourSwatchCtrl::OnMouseEvent(wxMouseEvent& event)
         Refresh();
 
         wxCommandEvent event(wxEVT_COMMAND_BUTTON_CLICKED, GetId());
-        GetEventHandler()->ProcessEvent(event);
+        HandleWindowEvent(event);
     }
 }