wxDIALOG_ADAPTATION_MODE_DISABLED = 2 // disable this dialog overriding global status
};
-extern WXDLLEXPORT_DATA(const char) wxDialogNameStr[];
+extern WXDLLIMPEXP_DATA_CORE(const char) wxDialogNameStr[];
-class WXDLLEXPORT wxDialogBase : public wxTopLevelWindow
+class WXDLLIMPEXP_CORE wxDialogBase : public wxTopLevelWindow
{
public:
enum
void SetEscapeId(int escapeId);
int GetEscapeId() const { return m_escapeId; }
- // Returns the parent to use for modal dialogs if the user did not specify it
- // explicitly
+ // Find the parent to use for modal dialog: try to use the specified parent
+ // but fall back to the current active window or main application window as
+ // last resort if it is unsuitable.
+ //
+ // This function always returns a valid top level window or NULL.
wxWindow *GetParentForModalDialog(wxWindow *parent = NULL) const;
#if wxUSE_STATTEXT // && wxUSE_TEXTCTRL
// common part of all ctors
void Init();
+ // helper of GetParentForModalDialog(): returns the passed in window if it
+ // can be used as our parent or NULL if it can't
+ wxWindow *CheckIfCanBeUsedAsParent(wxWindow *parent) const;
+
// handle Esc key presses
void OnCharHook(wxKeyEvent& event);
void OnSysColourChanged(wxSysColourChangedEvent& event);
- DECLARE_NO_COPY_CLASS(wxDialogBase)
+ wxDECLARE_NO_COPY_CLASS(wxDialogBase);
DECLARE_EVENT_TABLE()
};
* a help mechanism.
*/
-class WXDLLEXPORT wxDialogLayoutAdapter: public wxObject
+class WXDLLIMPEXP_CORE wxDialogLayoutAdapter: public wxObject
{
DECLARE_CLASS(wxDialogLayoutAdapter)
public:
*
*/
-class WXDLLEXPORT wxStandardDialogLayoutAdapter: public wxDialogLayoutAdapter
+class WXDLLIMPEXP_CORE wxStandardDialogLayoutAdapter: public wxDialogLayoutAdapter
{
DECLARE_CLASS(wxStandardDialogLayoutAdapter)
public:
#elif defined(__WXGTK__)
#include "wx/gtk1/dialog.h"
#elif defined(__WXMAC__)
- #include "wx/mac/dialog.h"
+ #include "wx/osx/dialog.h"
#elif defined(__WXCOCOA__)
#include "wx/cocoa/dialog.h"
#elif defined(__WXPM__)