Added m_ prefix to wxColourData and wxFontData members for consistency.

Fixed some typos in comments.
Fixed wizard constructor doc.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@21425 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart
2003-06-26 13:15:12 +00:00
parent 22c2307c2b
commit ae500232a4
18 changed files with 124 additions and 120 deletions

View File

@@ -87,7 +87,10 @@ All GUI ports:
- Implemented wxNotebook::DoGetBestSize so Fit now works - Implemented wxNotebook::DoGetBestSize so Fit now works
- Added FindItemByPosition to wxMenu - Added FindItemByPosition to wxMenu
- wxTimer now derives from wxEvtHandler and is its own owner object by default - wxTimer now derives from wxEvtHandler and is its own owner object by default
- Extended wxTextAttr and added wxTextCtrl::GetStyle stub
to allow better rich text support.
- implemented wxFlexGridSizer::Show() (Wade Brainerd) - implemented wxFlexGridSizer::Show() (Wade Brainerd)
- Added m_ prefix to wxColourData and wxFontData members
Unix: Unix:

View File

@@ -138,7 +138,8 @@ instead.
\membersection{wxWizardPageSimple::wxWizardPageSimple}\label{wxwizardpagesimplewxwizardpagesimple} \membersection{wxWizardPageSimple::wxWizardPageSimple}\label{wxwizardpagesimplewxwizardpagesimple}
\func{}{wxWizardPageSimple}{\param{wxWizard* }{parent = NULL}, \param{wxWizardPage* }{prev = NULL}, \param{wxWizardPage* }{next = NULL}} \func{}{wxWizardPageSimple}{\param{wxWizard* }{parent = NULL}, \param{wxWizardPage* }{prev = NULL}, \param{wxWizardPage* }{next = NULL},
\param{const wxBitmap& }{bitmap = wxNullBitmap}}
Constructor takes the previous and next pages. They may be modified later by Constructor takes the previous and next pages. They may be modified later by
\helpref{SetPrev()}{wxwizardpagesimplesetprev} or \helpref{SetPrev()}{wxwizardpagesimplesetprev} or

View File

@@ -214,3 +214,12 @@ new revision: 1.381; previous revision: 1.380
done done
TODO for 2.4 (items that are not backports)
===========================================
1. Add uxtheme.cpp to CW for Windows project file.
2. Test Mac port with configure and CW.
3. Test popup window and border issues.

View File

@@ -48,8 +48,6 @@ private:
wxString m_data; wxString m_data;
}; };
// This class is a mixin that provides storage and management of "client // This class is a mixin that provides storage and management of "client
// data." The client data stored can either be a pointer to a wxClientData // data." The client data stored can either be a pointer to a wxClientData
// object in which case it is managed by the container (i.e. it will delete // object in which case it is managed by the container (i.e. it will delete
@@ -57,7 +55,7 @@ private:
// by the container - but not both of them // by the container - but not both of them
// //
// NOTE: This functionality is currently duplicated in wxEvtHandler in order // NOTE: This functionality is currently duplicated in wxEvtHandler in order
// to avoid having more than one vtable in that class heirachy. // to avoid having more than one vtable in that class hierarchy.
class WXDLLEXPORT wxClientDataContainer class WXDLLEXPORT wxClientDataContainer
{ {
@@ -73,10 +71,10 @@ public:
protected: protected:
// The user data: either an object which will be deleted by the container // The user data: either an object which will be deleted by the container
// when it's deleted or some raw pointer which we do nothing with - only // when it's deleted or some raw pointer which we do nothing with. Only
// one type of data can be used with the given window (i.e. you cannot set // one type of data can be used with the given window, i.e. you cannot set
// the void data and then associate the container with wxClientData or vice // the void data and then associate the container with wxClientData or vice
// versa) // versa.
union union
{ {
wxClientData *m_clientObject; wxClientData *m_clientObject;
@@ -112,8 +110,8 @@ WX_DECLARE_VECTOR(wxClientDataDictionaryPair,wxClientDataDictionaryPairVector);
// this class is used internally to maintain the association between items // this class is used internally to maintain the association between items
// of (some subclasses of) wxControlWithItems and their client data // of (some subclasses of) wxControlWithItems and their client data
// NOTE: this class does not keep track if it contains // NOTE: this class does not keep track of whether it contains
// wxClientData or void*, the client must ensure that // wxClientData or void*. The client must ensure that
// it does not contain a mix of the two, and that // it does not contain a mix of the two, and that
// DestroyData is called if it contains wxClientData // DestroyData is called if it contains wxClientData
class WXDLLEXPORT wxClientDataDictionary class WXDLLEXPORT wxClientDataDictionary

View File

@@ -28,11 +28,11 @@ public:
wxColourData(const wxColourData& data); wxColourData(const wxColourData& data);
~wxColourData(); ~wxColourData();
void SetChooseFull(bool flag) { chooseFull = flag; } void SetChooseFull(bool flag) { m_chooseFull = flag; }
bool GetChooseFull() const { return chooseFull; } bool GetChooseFull() const { return m_chooseFull; }
void SetColour(const wxColour& colour) { dataColour = colour; } void SetColour(const wxColour& colour) { m_dataColour = colour; }
const wxColour& GetColour() const { return dataColour; } const wxColour& GetColour() const { return m_dataColour; }
wxColour& GetColour() { return dataColour; } wxColour& GetColour() { return m_dataColour; }
// Array of 16 custom colours // Array of 16 custom colours
void SetCustomColour(int i, const wxColour& colour); void SetCustomColour(int i, const wxColour& colour);
@@ -41,9 +41,9 @@ public:
void operator=(const wxColourData& data); void operator=(const wxColourData& data);
public: public:
wxColour dataColour; wxColour m_dataColour;
wxColour custColours[16]; wxColour m_custColours[16];
bool chooseFull; bool m_chooseFull;
private: private:
DECLARE_DYNAMIC_CLASS(wxColourData) DECLARE_DYNAMIC_CLASS(wxColourData)
@@ -57,14 +57,14 @@ public:
wxFontData(const wxFontData& data) wxFontData(const wxFontData& data)
: wxObject() : wxObject()
, fontColour(data.fontColour) , m_fontColour(data.m_fontColour)
, showHelp(data.showHelp) , m_showHelp(data.m_showHelp)
, allowSymbols(data.allowSymbols) , m_allowSymbols(data.m_allowSymbols)
, enableEffects(data.enableEffects) , m_enableEffects(data.m_enableEffects)
, initialFont(data.initialFont) , m_initialFont(data.m_initialFont)
, chosenFont(data.chosenFont) , m_chosenFont(data.m_chosenFont)
, minSize(data.minSize) , m_minSize(data.m_minSize)
, maxSize(data.maxSize) , m_maxSize(data.m_maxSize)
, m_encoding(data.m_encoding) , m_encoding(data.m_encoding)
, m_encodingInfo(data.m_encodingInfo) , m_encodingInfo(data.m_encodingInfo)
{ {
@@ -73,38 +73,38 @@ public:
wxFontData& operator=(const wxFontData& data) wxFontData& operator=(const wxFontData& data)
{ {
wxObject::operator=(data); wxObject::operator=(data);
fontColour = data.fontColour; m_fontColour = data.m_fontColour;
showHelp = data.showHelp; m_showHelp = data.m_showHelp;
allowSymbols = data.allowSymbols; m_allowSymbols = data.m_allowSymbols;
enableEffects = data.enableEffects; m_enableEffects = data.m_enableEffects;
initialFont = data.initialFont; m_initialFont = data.m_initialFont;
chosenFont = data.chosenFont; m_chosenFont = data.m_chosenFont;
minSize = data.minSize; m_minSize = data.m_minSize;
maxSize = data.maxSize; m_maxSize = data.m_maxSize;
m_encoding = data.m_encoding; m_encoding = data.m_encoding;
m_encodingInfo = data.m_encodingInfo; m_encodingInfo = data.m_encodingInfo;
return *this; return *this;
} }
void SetAllowSymbols(bool flag) { allowSymbols = flag; } void SetAllowSymbols(bool flag) { m_allowSymbols = flag; }
bool GetAllowSymbols() const { return allowSymbols; } bool GetAllowSymbols() const { return m_allowSymbols; }
void SetColour(const wxColour& colour) { fontColour = colour; } void SetColour(const wxColour& colour) { m_fontColour = colour; }
wxColour &GetColour() { return fontColour; } wxColour &GetColour() { return m_fontColour; }
void SetShowHelp(bool flag) { showHelp = flag; } void SetShowHelp(bool flag) { m_showHelp = flag; }
bool GetShowHelp() const { return showHelp; } bool GetShowHelp() const { return m_showHelp; }
void EnableEffects(bool flag) { enableEffects = flag; } void EnableEffects(bool flag) { m_enableEffects = flag; }
bool GetEnableEffects() const { return enableEffects; } bool GetEnableEffects() const { return m_enableEffects; }
void SetInitialFont(const wxFont& font) { initialFont = font; } void SetInitialFont(const wxFont& font) { m_initialFont = font; }
wxFont GetInitialFont() const { return initialFont; } wxFont GetInitialFont() const { return m_initialFont; }
void SetChosenFont(const wxFont& font) { chosenFont = font; } void SetChosenFont(const wxFont& font) { m_chosenFont = font; }
wxFont GetChosenFont() const { return chosenFont; } wxFont GetChosenFont() const { return m_chosenFont; }
void SetRange(int minRange, int maxRange) { minSize = minRange; maxSize = maxRange; } void SetRange(int minRange, int maxRange) { m_minSize = minRange; m_maxSize = maxRange; }
// encoding info is split into 2 parts: the logical wxWin encoding // encoding info is split into 2 parts: the logical wxWin encoding
// (wxFontEncoding) and a structure containing the native parameters for // (wxFontEncoding) and a structure containing the native parameters for
@@ -115,14 +115,14 @@ public:
wxNativeEncodingInfo& EncodingInfo() { return m_encodingInfo; } wxNativeEncodingInfo& EncodingInfo() { return m_encodingInfo; }
public: public:
wxColour fontColour; wxColour m_fontColour;
bool showHelp; bool m_showHelp;
bool allowSymbols; bool m_allowSymbols;
bool enableEffects; bool m_enableEffects;
wxFont initialFont; wxFont m_initialFont;
wxFont chosenFont; wxFont m_chosenFont;
int minSize; int m_minSize;
int maxSize; int m_maxSize;
private: private:
wxFontEncoding m_encoding; wxFontEncoding m_encoding;

View File

@@ -21,7 +21,10 @@
#if wxUSE_HELP #if wxUSE_HELP
#include "wx/help.h" #include "wx/help.h"
#if wxUSE_BMPBUTTON
#include "wx/bmpbuttn.h" #include "wx/bmpbuttn.h"
#endif
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// classes used to implement context help UI // classes used to implement context help UI
@@ -56,6 +59,7 @@ private:
DECLARE_DYNAMIC_CLASS(wxContextHelp) DECLARE_DYNAMIC_CLASS(wxContextHelp)
}; };
#if wxUSE_BMPBUTTON
/* /*
* wxContextHelpButton * wxContextHelpButton
* You can add this to your dialogs (especially on non-Windows platforms) * You can add this to your dialogs (especially on non-Windows platforms)
@@ -78,6 +82,8 @@ private:
DECLARE_EVENT_TABLE() DECLARE_EVENT_TABLE()
}; };
#endif
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// classes used to implement context help support // classes used to implement context help support
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------

View File

@@ -342,10 +342,15 @@ public:
{ DoGetClippingBox(x, y, w, h); } { DoGetClippingBox(x, y, w, h); }
void GetClippingBox(wxRect& rect) const void GetClippingBox(wxRect& rect) const
{ {
#if 1
DoGetClippingBox(&rect.x, &rect.y, &rect.width, &rect.height);
#else
// Necessary to use intermediate variables for 16-bit compilation // Necessary to use intermediate variables for 16-bit compilation
// REMOVE ME if the above is OK for all current platforms
wxCoord x, y, w, h; wxCoord x, y, w, h;
DoGetClippingBox(&x, &y, &w, &h); DoGetClippingBox(&x, &y, &w, &h);
rect.x = x; rect.y = y; rect.width = w; rect.height = h; rect.x = x; rect.y = y; rect.width = w; rect.height = h;
#endif
} }
// text extent // text extent
@@ -492,16 +497,6 @@ public:
virtual void SetOptimization(bool WXUNUSED(opt)) { } virtual void SetOptimization(bool WXUNUSED(opt)) { }
virtual bool GetOptimization() { return FALSE; } virtual bool GetOptimization() { return FALSE; }
// Some platforms have a DC cache, which should be cleared
// at appropriate points such as after a series of DC operations.
// Put ClearCache in the wxDC implementation class, since it has to be
// static.
// static void ClearCache() ;
#if 0 // wxUSE_DC_CACHEING
static void EnableCache(bool cacheing) { sm_cacheing = cacheing; }
static bool CacheEnabled() { return sm_cacheing ; }
#endif
// bounding box // bounding box
// ------------ // ------------
@@ -595,10 +590,6 @@ public:
#if WXWIN_COMPATIBILITY #if WXWIN_COMPATIBILITY
#if wxUSE_PALETTE
virtual void SetColourMap(const wxPalette& palette) { SetPalette(palette); }
#endif // wxUSE_PALETTE
void GetTextExtent(const wxString& string, float *x, float *y, void GetTextExtent(const wxString& string, float *x, float *y,
float *descent = NULL, float *externalLeading = NULL, float *descent = NULL, float *externalLeading = NULL,
wxFont *theFont = NULL, bool use16bit = FALSE) const ; wxFont *theFont = NULL, bool use16bit = FALSE) const ;
@@ -709,9 +700,6 @@ protected:
bool m_clipping:1; bool m_clipping:1;
bool m_isInteractive:1; bool m_isInteractive:1;
bool m_isBBoxValid:1; bool m_isBBoxValid:1;
#if wxUSE_DC_CACHEING
// static bool sm_cacheing;
#endif
// coordinate system variables // coordinate system variables

View File

@@ -102,4 +102,3 @@ public:
#endif // _WX_DCBUFFER_H_ #endif // _WX_DCBUFFER_H_
// vi:sts=4:sw=4:et

View File

@@ -55,11 +55,11 @@
// (popping up a message box in your favourite GUI, sending you e-mail or // (popping up a message box in your favourite GUI, sending you e-mail or
// whatever) it will affect all ASSERTs, FAILs and CHECKs in your code. // whatever) it will affect all ASSERTs, FAILs and CHECKs in your code.
// //
// Warning: if you don't like advices on programming style, don't read // Warning: if you don't like advice on programming style, don't read
// further! ;-) // further! ;-)
// //
// Extensive use of these macros is recommended! Remember that ASSERTs are // Extensive use of these macros is recommended! Remember that ASSERTs are
// disabled in final (without __WXDEBUG__ defined) build, so they add strictly // disabled in final build (without __WXDEBUG__ defined), so they add strictly
// nothing to your program's code. On the other hand, CHECK macros do stay // nothing to your program's code. On the other hand, CHECK macros do stay
// even in release builds, but in general are not much of a burden, while // even in release builds, but in general are not much of a burden, while
// a judicious use of them might increase your program's stability. // a judicious use of them might increase your program's stability.
@@ -83,7 +83,7 @@
const wxChar *szCond, const wxChar *szCond,
const wxChar *szMsg = NULL); const wxChar *szMsg = NULL);
// call this function to break into the debugger uncodnitionally (assuming // call this function to break into the debugger unconditionally (assuming
// the program is running under debugger, of course) // the program is running under debugger, of course)
extern void WXDLLEXPORT wxTrap(); extern void WXDLLEXPORT wxTrap();

View File

@@ -569,7 +569,7 @@ public:
virtual wxString GetHistoryFile(size_t i) const; virtual wxString GetHistoryFile(size_t i) const;
virtual size_t GetCount() const { return m_fileHistoryN; } virtual size_t GetCount() const { return m_fileHistoryN; }
wxList& GetMenus() const { return (wxList&) m_fileMenus; } const wxList& GetMenus() const { return m_fileMenus; }
// deprecated, use GetCount() instead // deprecated, use GetCount() instead
wxDEPRECATED( size_t GetNoHistoryFiles() const ); wxDEPRECATED( size_t GetNoHistoryFiles() const );

View File

@@ -64,7 +64,7 @@ public:
virtual ~wxFSFile() { if (m_Stream) delete m_Stream; } virtual ~wxFSFile() { if (m_Stream) delete m_Stream; }
// returns stream. This doesn't _create_ stream, it only returns // returns stream. This doesn't _create_ stream, it only returns
// pointer to it!! // pointer to it.
wxInputStream *GetStream() const {return m_Stream;} wxInputStream *GetStream() const {return m_Stream;}
// returns file's mime type // returns file's mime type

View File

@@ -91,10 +91,10 @@ wxColourData::wxColourData()
{ {
int i; int i;
for (i = 0; i < 16; i++) for (i = 0; i < 16; i++)
custColours[i].Set(255, 255, 255); m_custColours[i].Set(255, 255, 255);
chooseFull = FALSE; m_chooseFull = FALSE;
dataColour.Set(0,0,0); m_dataColour.Set(0,0,0);
} }
wxColourData::wxColourData(const wxColourData& data) wxColourData::wxColourData(const wxColourData& data)
@@ -112,7 +112,7 @@ void wxColourData::SetCustomColour(int i, const wxColour& colour)
if (i > 15 || i < 0) if (i > 15 || i < 0)
return; return;
custColours[i] = colour; m_custColours[i] = colour;
} }
wxColour wxColourData::GetCustomColour(int i) wxColour wxColourData::GetCustomColour(int i)
@@ -120,17 +120,17 @@ wxColour wxColourData::GetCustomColour(int i)
if (i > 15 || i < 0) if (i > 15 || i < 0)
return wxColour(0,0,0); return wxColour(0,0,0);
return custColours[i]; return m_custColours[i];
} }
void wxColourData::operator=(const wxColourData& data) void wxColourData::operator=(const wxColourData& data)
{ {
int i; int i;
for (i = 0; i < 16; i++) for (i = 0; i < 16; i++)
custColours[i] = data.custColours[i]; m_custColours[i] = data.m_custColours[i];
dataColour = (wxColour&)data.dataColour; m_dataColour = (wxColour&)data.m_dataColour;
chooseFull = data.chooseFull; m_chooseFull = data.m_chooseFull;
} }
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
@@ -140,13 +140,13 @@ void wxColourData::operator=(const wxColourData& data)
wxFontData::wxFontData() wxFontData::wxFontData()
{ {
// Intialize colour to black. // Intialize colour to black.
fontColour = wxNullColour; m_fontColour = wxNullColour;
showHelp = FALSE; m_showHelp = FALSE;
allowSymbols = TRUE; m_allowSymbols = TRUE;
enableEffects = TRUE; m_enableEffects = TRUE;
minSize = 0; m_minSize = 0;
maxSize = 0; m_maxSize = 0;
m_encoding = wxFONTENCODING_SYSTEM; m_encoding = wxFONTENCODING_SYSTEM;
} }

View File

@@ -204,7 +204,7 @@ int wxGenericFontDialog::ShowModal()
if (ret != wxID_CANCEL) if (ret != wxID_CANCEL)
{ {
m_fontData.chosenFont = dialogFont; m_fontData.m_chosenFont = dialogFont;
} }
return ret; return ret;
@@ -257,7 +257,7 @@ void wxGenericFontDialog::CreateWidgets()
familyChoice->SetStringSelection( wxFontFamilyIntToString(dialogFont.GetFamily()) ); familyChoice->SetStringSelection( wxFontFamilyIntToString(dialogFont.GetFamily()) );
styleChoice->SetStringSelection(wxFontStyleIntToString(dialogFont.GetStyle())); styleChoice->SetStringSelection(wxFontStyleIntToString(dialogFont.GetStyle()));
weightChoice->SetStringSelection(wxFontWeightIntToString(dialogFont.GetWeight())); weightChoice->SetStringSelection(wxFontWeightIntToString(dialogFont.GetWeight()));
wxString name(wxTheColourDatabase->FindName(m_fontData.fontColour)); wxString name(wxTheColourDatabase->FindName(m_fontData.GetColour()));
colourChoice->SetStringSelection(name); colourChoice->SetStringSelection(name);
underLineCheckBox->SetValue(dialogFont.GetUnderlined()); underLineCheckBox->SetValue(dialogFont.GetUnderlined());
@@ -310,13 +310,13 @@ void wxGenericFontDialog::InitializeFont()
int fontSize = 12; int fontSize = 12;
int fontUnderline = FALSE; int fontUnderline = FALSE;
if (m_fontData.initialFont.Ok()) if (m_fontData.m_initialFont.Ok())
{ {
fontFamily = m_fontData.initialFont.GetFamily(); fontFamily = m_fontData.m_initialFont.GetFamily();
fontWeight = m_fontData.initialFont.GetWeight(); fontWeight = m_fontData.m_initialFont.GetWeight();
fontStyle = m_fontData.initialFont.GetStyle(); fontStyle = m_fontData.m_initialFont.GetStyle();
fontSize = m_fontData.initialFont.GetPointSize(); fontSize = m_fontData.m_initialFont.GetPointSize();
fontUnderline = m_fontData.initialFont.GetUnderlined(); fontUnderline = m_fontData.m_initialFont.GetUnderlined();
} }
dialogFont = wxFont(fontSize, fontFamily, fontStyle, fontWeight, (fontUnderline != 0)); dialogFont = wxFont(fontSize, fontFamily, fontStyle, fontWeight, (fontUnderline != 0));
@@ -346,7 +346,7 @@ void wxGenericFontDialog::OnChangeFont(wxCommandEvent& WXUNUSED(event))
col = wxTheColourDatabase->FindColour(colourChoice->GetStringSelection()); col = wxTheColourDatabase->FindColour(colourChoice->GetStringSelection());
if (col) if (col)
{ {
m_fontData.fontColour = *col; m_fontData.m_fontColour = *col;
m_previewer->SetForegroundColour(*col); m_previewer->SetForegroundColour(*col);
} }
} }

View File

@@ -51,13 +51,13 @@ bool wxColourDialog::Create(wxWindow *parent, wxColourData *data)
int wxColourDialog::ShowModal() int wxColourDialog::ShowModal()
{ {
Point where ; Point where ;
RGBColor currentColor = *((RGBColor*)m_colourData.dataColour.GetPixel()) , newColor ; RGBColor currentColor = *((RGBColor*)m_colourData.m_dataColour.GetPixel()) , newColor ;
where.h = where.v = -1; where.h = where.v = -1;
if (GetColor( where, "\pSelect a new palette color.", &currentColor, &newColor )) if (GetColor( where, "\pSelect a new palette color.", &currentColor, &newColor ))
{ {
m_colourData.dataColour.Set( (WXCOLORREF*) &newColor ) ; m_colourData.m_dataColour.Set( (WXCOLORREF*) &newColor ) ;
return wxID_OK; return wxID_OK;
} }
else else

View File

@@ -51,13 +51,13 @@ bool wxColourDialog::Create(wxWindow *parent, wxColourData *data)
int wxColourDialog::ShowModal() int wxColourDialog::ShowModal()
{ {
Point where ; Point where ;
RGBColor currentColor = *((RGBColor*)m_colourData.dataColour.GetPixel()) , newColor ; RGBColor currentColor = *((RGBColor*)m_colourData.m_dataColour.GetPixel()) , newColor ;
where.h = where.v = -1; where.h = where.v = -1;
if (GetColor( where, "\pSelect a new palette color.", &currentColor, &newColor )) if (GetColor( where, "\pSelect a new palette color.", &currentColor, &newColor ))
{ {
m_colourData.dataColour.Set( (WXCOLORREF*) &newColor ) ; m_colourData.m_dataColour.Set( (WXCOLORREF*) &newColor ) ;
return wxID_OK; return wxID_OK;
} }
else else

View File

@@ -129,12 +129,12 @@ int wxColourDialog::ShowModal()
int i; int i;
for (i = 0; i < 16; i++) for (i = 0; i < 16; i++)
custColours[i] = wxColourToRGB(m_colourData.custColours[i]); custColours[i] = wxColourToRGB(m_colourData.m_custColours[i]);
chooseColorStruct.lStructSize = sizeof(CHOOSECOLOR); chooseColorStruct.lStructSize = sizeof(CHOOSECOLOR);
if ( m_parent ) if ( m_parent )
chooseColorStruct.hwndOwner = GetHwndOf(m_parent); chooseColorStruct.hwndOwner = GetHwndOf(m_parent);
chooseColorStruct.rgbResult = wxColourToRGB(m_colourData.dataColour); chooseColorStruct.rgbResult = wxColourToRGB(m_colourData.m_dataColour);
chooseColorStruct.lpCustColors = custColours; chooseColorStruct.lpCustColors = custColours;
chooseColorStruct.Flags = CC_RGBINIT | CC_ENABLEHOOK; chooseColorStruct.Flags = CC_RGBINIT | CC_ENABLEHOOK;
@@ -160,10 +160,10 @@ int wxColourDialog::ShowModal()
// Restore values // Restore values
for (i = 0; i < 16; i++) for (i = 0; i < 16; i++)
{ {
wxRGBToColour(m_colourData.custColours[i], custColours[i]); wxRGBToColour(m_colourData.m_custColours[i], custColours[i]);
} }
wxRGBToColour(m_colourData.dataColour, chooseColorStruct.rgbResult); wxRGBToColour(m_colourData.m_dataColour, chooseColorStruct.rgbResult);
return success ? wxID_OK : wxID_CANCEL; return success ? wxID_OK : wxID_CANCEL;
} }

View File

@@ -79,15 +79,15 @@ int wxFontDialog::ShowModal()
chooseFontStruct.hwndOwner = GetHwndOf(m_parent); chooseFontStruct.hwndOwner = GetHwndOf(m_parent);
chooseFontStruct.lpLogFont = &logFont; chooseFontStruct.lpLogFont = &logFont;
if ( m_fontData.initialFont.Ok() ) if ( m_fontData.m_initialFont.Ok() )
{ {
flags |= CF_INITTOLOGFONTSTRUCT; flags |= CF_INITTOLOGFONTSTRUCT;
wxFillLogFont(&logFont, &m_fontData.initialFont); wxFillLogFont(&logFont, &m_fontData.m_initialFont);
} }
if ( m_fontData.fontColour.Ok() ) if ( m_fontData.m_fontColour.Ok() )
{ {
chooseFontStruct.rgbColors = wxColourToRGB(m_fontData.fontColour); chooseFontStruct.rgbColors = wxColourToRGB(m_fontData.m_fontColour);
// need this for the colour to be taken into account // need this for the colour to be taken into account
flags |= CF_EFFECTS; flags |= CF_EFFECTS;
@@ -109,10 +109,10 @@ int wxFontDialog::ShowModal()
if ( m_fontData.GetShowHelp() ) if ( m_fontData.GetShowHelp() )
flags |= CF_SHOWHELP; flags |= CF_SHOWHELP;
if ( m_fontData.minSize != 0 || m_fontData.maxSize != 0 ) if ( m_fontData.m_minSize != 0 || m_fontData.m_maxSize != 0 )
{ {
chooseFontStruct.nSizeMin = m_fontData.minSize; chooseFontStruct.nSizeMin = m_fontData.m_minSize;
chooseFontStruct.nSizeMax = m_fontData.maxSize; chooseFontStruct.nSizeMax = m_fontData.m_maxSize;
flags |= CF_LIMITSIZE; flags |= CF_LIMITSIZE;
} }
@@ -120,8 +120,8 @@ int wxFontDialog::ShowModal()
if ( ChooseFont(&chooseFontStruct) != 0 ) if ( ChooseFont(&chooseFontStruct) != 0 )
{ {
wxRGBToColour(m_fontData.fontColour, chooseFontStruct.rgbColors); wxRGBToColour(m_fontData.m_fontColour, chooseFontStruct.rgbColors);
m_fontData.chosenFont = wxCreateFontFromLogFont(&logFont); m_fontData.m_chosenFont = wxCreateFontFromLogFont(&logFont);
m_fontData.EncodingInfo().facename = logFont.lfFaceName; m_fontData.EncodingInfo().facename = logFont.lfFaceName;
m_fontData.EncodingInfo().charset = logFont.lfCharSet; m_fontData.EncodingInfo().charset = logFont.lfCharSet;

View File

@@ -67,7 +67,7 @@ int wxFontDialog::ShowModal()
wxColour vColour((unsigned long)0x00000000); wxColour vColour((unsigned long)0x00000000);
wxNativeFontInfo vInfo; wxNativeFontInfo vInfo;
m_fontData.fontColour = vColour; m_fontData.m_fontColour = vColour;
memset(&vFn, '\0', sizeof(FACENAMEDESC)); memset(&vFn, '\0', sizeof(FACENAMEDESC));
vFn.usSize = sizeof(FACENAMEDESC); vFn.usSize = sizeof(FACENAMEDESC);
@@ -89,7 +89,7 @@ int wxFontDialog::ShowModal()
int nPointSize = vFontDlg.fxPointSize >> 16; int nPointSize = vFontDlg.fxPointSize >> 16;
vChosenFont.SetPointSize(nPointSize); vChosenFont.SetPointSize(nPointSize);
m_fontData.chosenFont = vChosenFont; m_fontData.m_chosenFont = vChosenFont;
m_fontData.EncodingInfo().facename = vFontDlg.fAttrs.szFacename; m_fontData.EncodingInfo().facename = vFontDlg.fAttrs.szFacename;
m_fontData.EncodingInfo().charset = vFontDlg.fAttrs.usCodePage; m_fontData.EncodingInfo().charset = vFontDlg.fAttrs.usCodePage;