X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/2bda0e173844e8e0f8acf4e8ad8b5c26e5c6fe5d..8162b8489765fbc579b9f60f229265ca1bfd8ab0:/src/msw/colordlg.cpp diff --git a/src/msw/colordlg.cpp b/src/msw/colordlg.cpp index e18bb2af6b..78a01e7dde 100644 --- a/src/msw/colordlg.cpp +++ b/src/msw/colordlg.cpp @@ -23,8 +23,10 @@ #ifndef WX_PRECOMP #include #include "wx/defs.h" +#include "wx/bitmap.h" #include "wx/pen.h" #include "wx/brush.h" +#include "wx/colour.h" #include "wx/gdicmn.h" #include "wx/utils.h" #include "wx/frame.h" @@ -34,7 +36,7 @@ #include -#ifndef __WIN32__ +#if !defined(__WIN32__) || defined(__SALFORDC__) #include #endif @@ -59,7 +61,7 @@ IMPLEMENT_DYNAMIC_CLASS(wxColourDialog, wxDialog) wxColourDialog::wxColourDialog(void) { - dialogParent = NULL; + m_dialogParent = NULL; } wxColourDialog::wxColourDialog(wxWindow *parent, wxColourData *data) @@ -69,10 +71,10 @@ wxColourDialog::wxColourDialog(wxWindow *parent, wxColourData *data) bool wxColourDialog::Create(wxWindow *parent, wxColourData *data) { - dialogParent = parent; - + m_dialogParent = parent; + if (data) - colourData = *data; + m_colourData = *data; return TRUE; } @@ -84,16 +86,16 @@ int wxColourDialog::ShowModal(void) int i; for (i = 0; i < 16; i++) - custColours[i] = RGB(colourData.custColours[i].Red(), colourData.custColours[i].Green(), colourData.custColours[i].Blue()); + custColours[i] = RGB(m_colourData.custColours[i].Red(), m_colourData.custColours[i].Green(), m_colourData.custColours[i].Blue()); chooseColorStruct.lStructSize = sizeof(CHOOSECOLOR); - chooseColorStruct.hwndOwner = (HWND) (dialogParent ? (HWND) dialogParent->GetHWND() : NULL); - chooseColorStruct.rgbResult = RGB(colourData.dataColour.Red(), colourData.dataColour.Green(), colourData.dataColour.Blue()); + chooseColorStruct.hwndOwner = (HWND) (m_dialogParent ? (HWND) m_dialogParent->GetHWND() : (HWND) NULL); + chooseColorStruct.rgbResult = RGB(m_colourData.dataColour.Red(), m_colourData.dataColour.Green(), m_colourData.dataColour.Blue()); chooseColorStruct.lpCustColors = custColours; chooseColorStruct.Flags = CC_RGBINIT; - if (!colourData.GetChooseFull()) + if (!m_colourData.GetChooseFull()) chooseColorStruct.Flags |= CC_PREVENTFULLOPEN; // Do the modal dialog @@ -112,11 +114,11 @@ int wxColourDialog::ShowModal(void) // Restore values for (i = 0; i < 16; i++) { - colourData.custColours[i].Set(GetRValue(custColours[i]), GetGValue(custColours[i]), + m_colourData.custColours[i].Set(GetRValue(custColours[i]), GetGValue(custColours[i]), GetBValue(custColours[i])); } - colourData.dataColour.Set(GetRValue(chooseColorStruct.rgbResult), GetGValue(chooseColorStruct.rgbResult), + m_colourData.dataColour.Set(GetRValue(chooseColorStruct.rgbResult), GetGValue(chooseColorStruct.rgbResult), GetBValue(chooseColorStruct.rgbResult)); return success ? wxID_OK : wxID_CANCEL;