Make wxFileDialog::MSWOnXXX() private
These functions were always marked as being implementation-only, but we can actually do better and make them private, by making the dialog hook function a (static) member of wxFileDialogMSWData and making this class (which is now a class and not a struct any more, as it's not just a collection of fields any longer) a friend of wxFileDialog. No real changes.
This commit is contained in:
parent
cf81527cfc
commit
895b4a0710
2 changed files with 28 additions and 20 deletions
|
|
@ -34,22 +34,9 @@ public:
|
|||
virtual void GetPaths(wxArrayString& paths) const wxOVERRIDE;
|
||||
virtual void GetFilenames(wxArrayString& files) const wxOVERRIDE;
|
||||
virtual bool SupportsExtraControl() const wxOVERRIDE { return true; }
|
||||
void MSWOnInitDialogHook(WXHWND hwnd);
|
||||
|
||||
virtual int ShowModal() wxOVERRIDE;
|
||||
|
||||
// wxMSW-specific implementation from now on
|
||||
// -----------------------------------------
|
||||
|
||||
// called from the hook procedure on CDN_INITDONE reception
|
||||
virtual void MSWOnInitDone(WXHWND hDlg);
|
||||
|
||||
// called from the hook procedure on CDN_SELCHANGE.
|
||||
void MSWOnSelChange(WXHWND hDlg);
|
||||
|
||||
// called from the hook procedure on CDN_TYPECHANGE.
|
||||
void MSWOnTypeChange(WXHWND hDlg, int nFilterIndex);
|
||||
|
||||
protected:
|
||||
|
||||
virtual void DoMoveWindow(int x, int y, int width, int height) wxOVERRIDE;
|
||||
|
|
@ -58,6 +45,21 @@ protected:
|
|||
virtual void DoGetPosition( int *x, int *y ) const wxOVERRIDE;
|
||||
|
||||
private:
|
||||
// Allow it to call MSWOnXXX() functions below.
|
||||
friend class wxFileDialogMSWData;
|
||||
|
||||
// called when the dialog is created
|
||||
void MSWOnInitDialogHook(WXHWND hwnd);
|
||||
|
||||
// called from the hook procedure on CDN_INITDONE reception
|
||||
void MSWOnInitDone(WXHWND hDlg);
|
||||
|
||||
// called from the hook procedure on CDN_SELCHANGE.
|
||||
void MSWOnSelChange(WXHWND hDlg);
|
||||
|
||||
// called from the hook procedure on CDN_TYPECHANGE.
|
||||
void MSWOnTypeChange(WXHWND hDlg, int nFilterIndex);
|
||||
|
||||
// The real implementation of ShowModal() using traditional common dialog
|
||||
// functions.
|
||||
int ShowCommFileDialog(WXHWND owner);
|
||||
|
|
@ -66,7 +68,7 @@ private:
|
|||
int ShowIFileDialog(WXHWND owner);
|
||||
|
||||
// Get the data object, allocating it if necessary.
|
||||
struct wxFileDialogMSWData& MSWData();
|
||||
wxFileDialogMSWData& MSWData();
|
||||
|
||||
|
||||
wxArrayString m_fileNames;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue