Allow retrieving current filter from wxFileDialog extra controls

Add wxFileDialog::GetCurrentlySelectedFilterIndex() similar to the
existing GetCurrentlySelectedFilename(), which can be used to retrieve
the index of the currently selected filter and update the state of the
extra controls in wxFileDialog accordingly.

Implement this for wxMSW only by updating the internally stored value
from the native CDN_TYPECHANGE notification and also generating a
wxEVT_UPDATE_UI event to allow the extra controls to update themselves.

Closes https://github.com/wxWidgets/wxWidgets/pull/1310
This commit is contained in:
QuentinC
2019-04-30 21:55:15 +02:00
committed by Vadim Zeitlin
parent 1916442956
commit 413abb066e
5 changed files with 56 additions and 0 deletions

View File

@@ -44,6 +44,9 @@ public:
// 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;