#include <wx/filedlgcustomize.h>
Base class for customization hooks used with wxFileDialog.
wxFileDialogCustomizeHook is an abstract base class, i.e. in order to use a concrete class inheriting from it and implementing its pure virtual AddCustomControls() function must be defined. Then an object of this class should be passed to wxFileDialog::SetCustomizeHook(), which will result in its AddCustomControls() being called before the dialog is shown, UpdateCustomControls() being called whenever something changes in the dialog while it is shown and, finally, TransferDataFromCustomControls() being called when the user accepts their choice in the dialog.
Putting all this together, here is an example of customizing the file dialog using this class:
Public Member Functions | |
virtual void | AddCustomControls (wxFileDialogCustomize &customizer)=0 |
Must be overridden to add custom controls to the dialog using the provided customizer object. More... | |
virtual void | UpdateCustomControls () |
May be overridden to update the custom controls whenever something changes in the dialog. More... | |
virtual void | TransferDataFromCustomControls () |
Should typically be overridden to save the values of the custom controls when the dialog is accepted. More... | |
|
pure virtual |
Must be overridden to add custom controls to the dialog using the provided customizer object.
Call wxFileDialogCustomize functions to add controls and possibly bind to their events.
Note that there is no possibility to define the custom controls layout, they will appear more or less consecutively, but the exact layout is determined by the current platform.
|
virtual |
Should typically be overridden to save the values of the custom controls when the dialog is accepted.
Custom controls are destroyed and cannot be used any longer once wxFileDialog::ShowModal() returns, so their values must be retrieved in this function, which is called just before this happens.
This function is not called if the user cancels the dialog.
Base class version does nothing.
|
virtual |
May be overridden to update the custom controls whenever something changes in the dialog.
This function is called when the user selects a file, changes the directory or changes the current filter in the dialog, for example. It can be used to update the custom controls state depending on the currently selected file, for example.
Note that it is not necessarily called when the value of a custom control changes.
Base class version does nothing.