Removed lots of OnClose functions; doc'ed OnCloseWindow better;
MM_... -> wxMM_... git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@1615 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -148,7 +148,7 @@ same API;
|
||||
temporarily with the window as an argument;
|
||||
\item events from sliders and scrollbars can be handled more flexibly;
|
||||
\item the handling of window close events has been changed in line with the new
|
||||
event system, but backward {\bf OnClose} compatibility has been retained;
|
||||
event system;
|
||||
\item the concept of {\it validator} has been added to allow much easier coding of
|
||||
the relationship between controls and application data;
|
||||
\item the documentation has been revised, with more cross-referencing.
|
||||
|
@@ -644,12 +644,12 @@ PostScript output.
|
||||
The mapping mode can be one of the following:
|
||||
|
||||
\begin{twocollist}\itemsep=0pt
|
||||
\twocolitem{MM\_TWIPS}{Each logical unit is 1/20 of a point, or 1/1440 of
|
||||
\twocolitem{wxMM\_TWIPS}{Each logical unit is 1/20 of a point, or 1/1440 of
|
||||
an inch.}
|
||||
\twocolitem{MM\_POINTS}{Each logical unit is a point, or 1/72 of an inch.}
|
||||
\twocolitem{MM\_METRIC}{Each logical unit is 1 mm.}
|
||||
\twocolitem{MM\_LOMETRIC}{Each logical unit is 1/10 of a mm.}
|
||||
\twocolitem{MM\_TEXT}{Each logical unit is 1 pixel.}
|
||||
\twocolitem{wxMM\_POINTS}{Each logical unit is a point, or 1/72 of an inch.}
|
||||
\twocolitem{wxMM\_METRIC}{Each logical unit is 1 mm.}
|
||||
\twocolitem{wxMM\_LOMETRIC}{Each logical unit is 1/10 of a mm.}
|
||||
\twocolitem{wxMM\_TEXT}{Each logical unit is 1 pixel.}
|
||||
\end{twocollist}
|
||||
|
||||
\membersection{wxDC::SetOptimization}\label{wxsetoptimization}
|
||||
|
@@ -463,7 +463,7 @@ the equivalent of the following code to the start of the metafile data:
|
||||
SetWindowExt(dc, maxX - minX, maxY - minY);
|
||||
\end{verbatim}
|
||||
|
||||
This simulates the MM\_TEXT mapping mode, which wxWindows assumes.
|
||||
This simulates the wxMM\_TEXT mapping mode, which wxWindows assumes.
|
||||
|
||||
Placeable metafiles may be imported by many Windows applications, and can be
|
||||
used in RTF (Rich Text Format) files.
|
||||
|
@@ -167,9 +167,9 @@ in the application.
|
||||
This function should be called by the application prior to
|
||||
showing the frame.
|
||||
|
||||
\membersection{wxPreviewFrame::OnClose}
|
||||
\membersection{wxPreviewFrame::OnCloseWindow}
|
||||
|
||||
\func{bool}{OnClose}{\void}
|
||||
\func{void}{OnCloseWindow}{\param{wxCloseEvent\&}{ event}}
|
||||
|
||||
Enables the other frames in the application, and deletes the print preview
|
||||
object, implicitly deleting any printout objects associated with the print
|
||||
|
@@ -9,15 +9,18 @@ to close windows.
|
||||
\wxheading{What is the sequence of events in a window deletion?}
|
||||
|
||||
When the user clicks on the system close button or system close command,
|
||||
in a frame or a dialog, wxWindows calls \helpref{wxWindow::Close}{wxwindowclose}.
|
||||
in a frame or a dialog, wxWindows calls \helpref{wxWindow::Close}{wxwindowclose}. This
|
||||
in turn generates an EVT\_CLOSE event: see \helpref{wxWindow::OnCloseWindow}{wxwindowonclosewindow}.
|
||||
|
||||
This function then generates a \helpref{wxCloseEvent}{wxcloseevent} event which
|
||||
can be handled by the application (by using an EVT\_CLOSE event table entry). It is the duty of the application to
|
||||
define a suitable event handler, and decide whether or not to destroy the window.
|
||||
If the application is for some reason forcing the application to close,
|
||||
the window should always be destroyed, otherwise there is the option to
|
||||
It is the duty of the application to define a suitable event handler, and
|
||||
decide whether or not to destroy the window.
|
||||
If the application is for some reason forcing the application to close
|
||||
(\helpref{wxCloseEvent::CanVeto}{wxcloseeventcanveto} returns FALSE), the window should always be destroyed, otherwise there is the option to
|
||||
ignore the request, or maybe wait until the user has answered a question
|
||||
before deciding whether it's safe to close.
|
||||
before deciding whether it's safe to close. The handler for EVT\_CLOSE should
|
||||
signal to the calling code if it does not destroy the window, by calling
|
||||
\helpref{wxCloseEvent::Veto}{wxcloseeventveto}. Calling this provides useful information
|
||||
to the calling code.
|
||||
|
||||
The wxCloseEvent handler should only call \helpref{wxWindow::Destroy}{wxwindowdestroy} to
|
||||
delete the window, and not use the {\bf delete} operator. This is because
|
||||
@@ -26,24 +29,28 @@ since otherwise there is the danger that events will be sent to a non-existent w
|
||||
|
||||
\wxheading{How can the application close a window itself?}
|
||||
|
||||
Your application can use the \helpref{wxWindow::Close}{wxwindowclose} event just as
|
||||
the framework does. Pass a TRUE argument to this function to tell the event handler
|
||||
that we definitely want to delete the frame.
|
||||
Your application can either use \helpref{wxWindow::Close}{wxwindowclose} event just as
|
||||
the framework does, or it can call \helpref{wxWindow::Destroy}{wxwindowdestroy} directly.
|
||||
If using Close(), you can pass a TRUE argument to this function to tell the event handler
|
||||
that we definitely want to delete the frame and it cannot be vetoed.
|
||||
|
||||
If for some reason you don't wish to use the {\bf Close} function to delete a window, at least use
|
||||
the {\bf Destroy} function so that wxWindows can decide when it's safe to delete the window.
|
||||
The advantage of using Close instead of Destroy is that it will call any clean-up code
|
||||
defined by the EVT\_CLOSE handler; for example it may close a document contained in
|
||||
a window after first asking the user whether the work should be saved. Close can be vetoed
|
||||
by this process (return FALSE), whereas Destroy definitely destroys the window.
|
||||
|
||||
\wxheading{What is the default behaviour?}
|
||||
|
||||
By default, the close event handlers for wxFrame and wxDialog
|
||||
both call the old \helpref{wxWindow::OnClose}{wxwindowonclose} handler
|
||||
for backward compatibility. So you can still use the old form if you wish.
|
||||
|
||||
In addition, the default close event handler for wxDialog simulates a Cancel command,
|
||||
The default close event handler for wxDialog simulates a Cancel command,
|
||||
generating a wxID\_CANCEL event. Since the handler for this cancel event might
|
||||
itself call {\bf Close}, there is a check for infinite looping.
|
||||
itself call {\bf Close}, there is a check for infinite looping. The default handler
|
||||
for wxID\_CANCEL hides the dialog (if modeless) or calls EndModal(wxID\_CANCEL) (if modal).
|
||||
In other words, by default, the dialog is not destroyed (it might have been created
|
||||
on the stack, so the assumption of dynamic creation cannot be made).
|
||||
|
||||
Under Windows, wxDialog also defines a handler for \helpref{wxWindow::OnCharHook}{wxwindowoncharhook} that
|
||||
The default close event handler for wxFrame destroys the frame using Destroy().
|
||||
|
||||
Under Windows, wxDialog defines a handler for \helpref{wxWindow::OnCharHook}{wxwindowoncharhook} that
|
||||
generates a Cancel event if the Escape key has been pressed.
|
||||
|
||||
\wxheading{What should I do when the user calls up Exit from a menu?}
|
||||
@@ -63,9 +70,6 @@ In wxWindows 1.xx, the {\bf OnClose} function did not actually delete 'this', bu
|
||||
to the calling function (either {\bf Close}, or the wxWindows framework) to delete
|
||||
or not delete the window.
|
||||
|
||||
You can still use this function unchanged in 2.0, but it's worth upgrading to
|
||||
the new method in case future versions of wxWindows does not support the old one.
|
||||
|
||||
To update your code, you should provide an event table entry in your frame or
|
||||
dialog, using the EVT\_CLOSE macro. The event handler function might look like this:
|
||||
|
||||
@@ -73,22 +77,13 @@ dialog, using the EVT\_CLOSE macro. The event handler function might look like t
|
||||
\begin{verbatim}
|
||||
void MyFrame::OnCloseWindow(wxCloseEvent& event)
|
||||
{
|
||||
// If the application forces the deletion,
|
||||
// obey without question.
|
||||
if (event.GetForce())
|
||||
{
|
||||
this->Destroy();
|
||||
return;
|
||||
}
|
||||
|
||||
// Otherwise...
|
||||
if (MyDataHasBeenModified())
|
||||
{
|
||||
wxMessageDialog* dialog = new wxMessageDialog(this,
|
||||
"Save changed data?", "My app", wxYES_NO|wxCANCEL);
|
||||
|
||||
int ans = dialog->ShowModal();
|
||||
dialog->Close(TRUE);
|
||||
dialog->Destroy();
|
||||
|
||||
switch (ans)
|
||||
{
|
||||
@@ -101,6 +96,10 @@ dialog, using the EVT\_CLOSE macro. The event handler function might look like t
|
||||
break;
|
||||
case wxID_CANCEL: // Do nothing - so don't quit app.
|
||||
default:
|
||||
if (!event.CanVeto()) // Test if we can veto this deletion
|
||||
this->Destroy(); // If not, destroy the window anyway.
|
||||
else
|
||||
event.Veto(); // Notify the calling code that we didn't delete the frame.
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -111,7 +110,8 @@ dialog, using the EVT\_CLOSE macro. The event handler function might look like t
|
||||
\wxheading{How do I exit the application gracefully?}
|
||||
|
||||
A wxWindows application automatically exits when the designated top window, or the
|
||||
last frame or dialog, is destroyed.
|
||||
last frame or dialog, is destroyed. Put any application-wide cleanup code in \helpref{wxApp::OnExit}{wxapponexit} (this
|
||||
is a virtual function, not an event handler).
|
||||
|
||||
\wxheading{Do child windows get deleted automatically?}
|
||||
|
||||
|
@@ -27,7 +27,7 @@ or if allowing the user to specify a face name, store the family id with any fil
|
||||
might be transported to a different Windows machine or other platform.
|
||||
|
||||
\normalbox{{\bf Note:} There is currently a difference between the appearance of fonts on the
|
||||
two platforms, if the mapping mode is anything other than MM\_TEXT.
|
||||
two platforms, if the mapping mode is anything other than wxMM\_TEXT.
|
||||
Under X, font size is always specified in points. Under MS Windows, the
|
||||
unit for text is points but the text is scaled according to the
|
||||
current mapping mode. However, user scaling on a device context will
|
||||
|
@@ -898,7 +898,7 @@ the control(s) in question.
|
||||
Called when the user has tried to close a a frame
|
||||
or dialog box using the window manager (X) or system menu (Windows).
|
||||
|
||||
{\bf Note:} This is an obsolete function retained for backward compatibility.
|
||||
{\bf Note:} This is an obsolete function.
|
||||
It is superceded by the \helpref{wxWindow::OnCloseWindow}{wxwindowonclosewindow} event
|
||||
handler.
|
||||
|
||||
@@ -908,10 +908,6 @@ If TRUE is returned by OnClose, the window will be deleted by the system, otherw
|
||||
attempt will be ignored. Do not delete the window from within this handler, although
|
||||
you may delete other windows.
|
||||
|
||||
\wxheading{Remarks}
|
||||
|
||||
Derive your own class to handle this message. The default handler returns TRUE.
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{Window deletion overview}{windowdeletionoverview},\rtfsp
|
||||
|
@@ -296,3 +296,7 @@ General Notes
|
||||
|
||||
and it's also on the wxWindows CD-ROM under Packages.
|
||||
|
||||
- If you are installing wxWindows 2 from CVS, you may find that
|
||||
include/wx/msw/setup.h is missing. This is deliberate, to avoid
|
||||
developers' different setup.h configurations getting confused.
|
||||
Please copy setup0.h to setup.h before compiling.
|
||||
|
@@ -946,6 +946,19 @@ enum
|
||||
|
||||
#define wxID_HIGHEST 5999
|
||||
|
||||
// Mapping modes (as per Windows)
|
||||
#define wxMM_TEXT 1
|
||||
#define wxMM_LOMETRIC 2
|
||||
#define wxMM_HIMETRIC 3
|
||||
#define wxMM_LOENGLISH 4
|
||||
#define wxMM_HIENGLISH 5
|
||||
#define wxMM_TWIPS 6
|
||||
#define wxMM_ISOTROPIC 7
|
||||
#define wxMM_ANISOTROPIC 8
|
||||
|
||||
#define wxMM_POINTS 9
|
||||
#define wxMM_METRIC 10
|
||||
|
||||
/* Shortcut for easier dialog-unit-to-pixel conversion */
|
||||
#define wxDLG_UNIT(parent, pt) parent->ConvertDialogToPixels(pt)
|
||||
|
||||
|
@@ -188,7 +188,7 @@ class WXDLLEXPORT wxView: public wxEvtHandler
|
||||
// Override to do cleanup/veto close
|
||||
virtual bool OnClose(bool deleteWindow);
|
||||
|
||||
#ifdef WXWIN_COMPATIBILITY
|
||||
#if WXWIN_COMPATIBILITY
|
||||
// Defeat compiler warning
|
||||
bool OnClose(void) { return wxEvtHandler::OnClose(); }
|
||||
#endif
|
||||
|
@@ -771,6 +771,7 @@ public:
|
||||
m_veto = veto;
|
||||
}
|
||||
void SetCanVeto(bool canVeto) { m_canVeto = canVeto; }
|
||||
// No more asserts here please, the one you put here was wrong.
|
||||
bool CanVeto() const { return m_canVeto; }
|
||||
bool GetVeto() const { return m_canVeto && m_veto; }
|
||||
|
||||
@@ -1156,7 +1157,9 @@ public:
|
||||
virtual long Default()
|
||||
{ return GetNextHandler() ? GetNextHandler()->Default() : 0; };
|
||||
|
||||
#if WXWIN_COMPATIBILITY
|
||||
virtual bool OnClose();
|
||||
#endif
|
||||
|
||||
virtual bool ProcessEvent(wxEvent& event);
|
||||
virtual bool SearchEventTable(wxEventTable& table, wxEvent& event);
|
||||
|
@@ -88,8 +88,6 @@ class WXDLLEXPORT wxGenericColourDialog: public wxDialog
|
||||
void OnMouseEvent(wxMouseEvent& event);
|
||||
void OnPaint(wxPaintEvent& event);
|
||||
|
||||
bool OnClose(void);
|
||||
|
||||
virtual void CalculateMeasurements(void);
|
||||
virtual void CreateWidgets(void);
|
||||
virtual void InitializeColours(void);
|
||||
@@ -102,17 +100,14 @@ class WXDLLEXPORT wxGenericColourDialog: public wxDialog
|
||||
virtual void OnBasicColourClick(int which);
|
||||
virtual void OnCustomColourClick(int which);
|
||||
|
||||
/*
|
||||
virtual void OnOk(void);
|
||||
virtual void OnCancel(void);
|
||||
virtual void OnAddCustom(void);
|
||||
*/
|
||||
void OnAddCustom(wxCommandEvent& event);
|
||||
|
||||
void OnRedSlider(wxCommandEvent& event);
|
||||
void OnGreenSlider(wxCommandEvent& event);
|
||||
void OnBlueSlider(wxCommandEvent& event);
|
||||
|
||||
void OnCloseWindow(wxCloseEvent& event);
|
||||
|
||||
DECLARE_EVENT_TABLE()
|
||||
};
|
||||
|
||||
|
@@ -72,7 +72,7 @@ class WXDLLEXPORT wxGenericFontDialog: public wxDialog
|
||||
// Internal functions
|
||||
void OnPaint(wxPaintEvent& event);
|
||||
|
||||
bool OnClose(void);
|
||||
void OnCloseWindow(wxCloseEvent& event);
|
||||
|
||||
virtual void CreateWidgets(void);
|
||||
virtual void InitializeFont(void);
|
||||
|
@@ -71,7 +71,6 @@ public:
|
||||
void SetTitle(const wxString& title);
|
||||
wxString GetTitle() const ;
|
||||
|
||||
bool OnClose();
|
||||
void OnCharHook(wxKeyEvent& event);
|
||||
void OnCloseWindow(wxCloseEvent& event);
|
||||
|
||||
|
@@ -63,8 +63,6 @@ public:
|
||||
void ClientToScreen(int *x, int *y) const;
|
||||
void ScreenToClient(int *x, int *y) const;
|
||||
|
||||
virtual bool OnClose();
|
||||
|
||||
void OnSize(wxSizeEvent& event);
|
||||
void OnMenuHighlight(wxMenuEvent& event);
|
||||
void OnActivate(wxActivateEvent& event);
|
||||
|
@@ -87,7 +87,7 @@ protected:
|
||||
/*
|
||||
* Pass filename of existing non-placeable metafile, and bounding box.
|
||||
* Adds a placeable metafile header, sets the mapping mode to anisotropic,
|
||||
* and sets the window origin and extent to mimic the MM_TEXT mapping mode.
|
||||
* and sets the window origin and extent to mimic the wxMM_TEXT mapping mode.
|
||||
*
|
||||
*/
|
||||
|
||||
|
@@ -80,7 +80,7 @@ public:
|
||||
void SetTitle(const wxString& title);
|
||||
wxString GetTitle() const ;
|
||||
|
||||
bool OnClose();
|
||||
// bool OnClose();
|
||||
void OnCharHook(wxKeyEvent& event);
|
||||
void OnCloseWindow(wxCloseEvent& event);
|
||||
|
||||
|
@@ -79,8 +79,6 @@ public:
|
||||
void ScreenToClient(int *x, int *y) const;
|
||||
wxPoint ScreenToClient(const wxPoint& pt) const { return wxWindow::ScreenToClient(pt); }
|
||||
|
||||
virtual bool OnClose();
|
||||
|
||||
void OnSize(wxSizeEvent& event);
|
||||
void OnMenuHighlight(wxMenuEvent& event);
|
||||
void OnActivate(wxActivateEvent& event);
|
||||
|
@@ -87,7 +87,7 @@ protected:
|
||||
/*
|
||||
* Pass filename of existing non-placeable metafile, and bounding box.
|
||||
* Adds a placeable metafile header, sets the mapping mode to anisotropic,
|
||||
* and sets the window origin and extent to mimic the MM_TEXT mapping mode.
|
||||
* and sets the window origin and extent to mimic the wxMM_TEXT mapping mode.
|
||||
*
|
||||
*/
|
||||
|
||||
|
@@ -420,8 +420,8 @@ protected:
|
||||
#define MS_XDEV2LOGREL(x) DeviceToLogicalXRel(x)
|
||||
#define MS_YDEV2LOGREL(y) DeviceToLogicalYRel(y)
|
||||
|
||||
#define MM_POINTS 7
|
||||
#define MM_METRIC 8
|
||||
#define MM_POINTS 9
|
||||
#define MM_METRIC 10
|
||||
|
||||
extern int wxPageNumber;
|
||||
|
||||
|
@@ -82,7 +82,6 @@ public:
|
||||
wxString GetTitle() const ;
|
||||
|
||||
void OnSize(wxSizeEvent& event);
|
||||
bool OnClose();
|
||||
void OnCharHook(wxKeyEvent& event);
|
||||
void OnPaint(wxPaintEvent& event);
|
||||
void OnCloseWindow(wxCloseEvent& event);
|
||||
|
@@ -74,8 +74,6 @@ public:
|
||||
|
||||
virtual void ScreenToClient(int *x, int *y) const;
|
||||
|
||||
virtual bool OnClose();
|
||||
|
||||
void OnSize(wxSizeEvent& event);
|
||||
void OnMenuHighlight(wxMenuEvent& event);
|
||||
void OnActivate(wxActivateEvent& event);
|
||||
|
@@ -119,7 +119,7 @@ protected:
|
||||
/*
|
||||
* Pass filename of existing non-placeable metafile, and bounding box.
|
||||
* Adds a placeable metafile header, sets the mapping mode to anisotropic,
|
||||
* and sets the window origin and extent to mimic the MM_TEXT mapping mode.
|
||||
* and sets the window origin and extent to mimic the wxMM_TEXT mapping mode.
|
||||
*
|
||||
*/
|
||||
|
||||
|
@@ -173,7 +173,7 @@ public:
|
||||
long style = wxDEFAULT_FRAME_STYLE, const wxString& name = "frame");
|
||||
~wxPreviewFrame();
|
||||
|
||||
bool OnClose();
|
||||
void OnCloseWindow(wxCloseEvent& event);
|
||||
virtual void Initialize();
|
||||
virtual void CreateCanvas();
|
||||
virtual void CreateControlBar();
|
||||
@@ -182,6 +182,8 @@ protected:
|
||||
wxWindow* m_previewCanvas;
|
||||
wxPreviewControlBar* m_controlBar;
|
||||
wxPrintPreviewBase* m_printPreview;
|
||||
|
||||
DECLARE_EVENT_TABLE()
|
||||
};
|
||||
|
||||
/*
|
||||
|
@@ -61,7 +61,7 @@ class WXDLLEXPORT wxPropertyFormView: public wxPropertyView
|
||||
void OnUpdate(wxCommandEvent& event);
|
||||
void OnRevert(wxCommandEvent& event);
|
||||
|
||||
virtual bool OnClose(void);
|
||||
virtual bool OnClose();
|
||||
virtual void OnDoubleClick(wxControl *item);
|
||||
|
||||
// TODO: does OnCommand still get called...???
|
||||
@@ -230,7 +230,8 @@ class WXDLLEXPORT wxPropertyFormDialog: public wxDialog
|
||||
wxPropertyFormDialog(wxPropertyFormView *v, wxWindow *parent, const wxString& title,
|
||||
const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize,
|
||||
long style = wxDEFAULT_DIALOG_STYLE, const wxString& name = "dialogBox");
|
||||
bool OnClose(void);
|
||||
|
||||
void OnCloseWindow(wxCloseEvent& event);
|
||||
void OnDefaultAction(wxControl *item);
|
||||
void OnCommand(wxWindow& win, wxCommandEvent& event);
|
||||
|
||||
@@ -239,6 +240,8 @@ class WXDLLEXPORT wxPropertyFormDialog: public wxDialog
|
||||
|
||||
private:
|
||||
wxPropertyFormView* m_view;
|
||||
|
||||
DECLARE_EVENT_TABLE()
|
||||
};
|
||||
|
||||
/*
|
||||
@@ -281,7 +284,7 @@ class WXDLLEXPORT wxPropertyFormFrame: public wxFrame
|
||||
m_view = v;
|
||||
m_propertyPanel = NULL;
|
||||
}
|
||||
bool OnClose(void);
|
||||
void OnCloseWindow(wxCloseEvent& event);
|
||||
|
||||
// Must call this to create panel and associate view
|
||||
virtual bool Initialize(void);
|
||||
@@ -291,6 +294,8 @@ class WXDLLEXPORT wxPropertyFormFrame: public wxFrame
|
||||
private:
|
||||
wxPropertyFormView* m_view;
|
||||
wxPanel* m_propertyPanel;
|
||||
|
||||
DECLARE_EVENT_TABLE()
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@@ -276,7 +276,7 @@ class WXDLLEXPORT wxPropertyListDialog: public wxDialog
|
||||
wxPropertyListDialog(wxPropertyListView *v, wxWindow *parent, const wxString& title,
|
||||
const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize,
|
||||
long style = wxDEFAULT_DIALOG_STYLE, const wxString& name = "dialogBox");
|
||||
bool OnClose(void);
|
||||
void OnCloseWindow(wxCloseEvent& event);
|
||||
void OnDefaultAction(wxControl *item);
|
||||
void OnCancel(wxCommandEvent& event);
|
||||
|
||||
@@ -338,7 +338,7 @@ class WXDLLEXPORT wxPropertyListFrame: public wxFrame
|
||||
m_view = v;
|
||||
m_propertyPanel = NULL;
|
||||
}
|
||||
bool OnClose(void);
|
||||
void OnCloseWindow(wxCloseEvent& event);
|
||||
|
||||
// Must call this to create panel and associate view
|
||||
virtual bool Initialize(void);
|
||||
@@ -348,6 +348,8 @@ class WXDLLEXPORT wxPropertyListFrame: public wxFrame
|
||||
private:
|
||||
wxPropertyListView* m_view;
|
||||
wxPropertyListPanel* m_propertyPanel;
|
||||
|
||||
DECLARE_EVENT_TABLE()
|
||||
};
|
||||
|
||||
/*
|
||||
|
@@ -71,7 +71,6 @@ public:
|
||||
void SetTitle(const wxString& title);
|
||||
wxString GetTitle() const ;
|
||||
|
||||
bool OnClose();
|
||||
void OnCharHook(wxKeyEvent& event);
|
||||
void OnCloseWindow(wxCloseEvent& event);
|
||||
|
||||
|
@@ -61,8 +61,6 @@ public:
|
||||
void GetPosition(int *x, int *y) const ;
|
||||
void SetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO);
|
||||
|
||||
virtual bool OnClose();
|
||||
|
||||
void OnSize(wxSizeEvent& event);
|
||||
void OnMenuHighlight(wxMenuEvent& event);
|
||||
void OnActivate(wxActivateEvent& event);
|
||||
|
@@ -71,7 +71,6 @@ public:
|
||||
void SetTitle(const wxString& title);
|
||||
wxString GetTitle() const ;
|
||||
|
||||
bool OnClose();
|
||||
void OnCharHook(wxKeyEvent& event);
|
||||
void OnCloseWindow(wxCloseEvent& event);
|
||||
|
||||
|
@@ -63,8 +63,6 @@ public:
|
||||
void ClientToScreen(int *x, int *y) const;
|
||||
void ScreenToClient(int *x, int *y) const;
|
||||
|
||||
virtual bool OnClose();
|
||||
|
||||
void OnSize(wxSizeEvent& event);
|
||||
void OnMenuHighlight(wxMenuEvent& event);
|
||||
void OnActivate(wxActivateEvent& event);
|
||||
|
@@ -87,7 +87,7 @@ protected:
|
||||
/*
|
||||
* Pass filename of existing non-placeable metafile, and bounding box.
|
||||
* Adds a placeable metafile header, sets the mapping mode to anisotropic,
|
||||
* and sets the window origin and extent to mimic the MM_TEXT mapping mode.
|
||||
* and sets the window origin and extent to mimic the wxMM_TEXT mapping mode.
|
||||
*
|
||||
*/
|
||||
|
||||
|
@@ -167,7 +167,7 @@ BombsCanvasClass::BombsCanvasClass(wxFrame *parent, const wxPoint& pos, const wx
|
||||
dc.GetTextExtent(buf, &chw, &chh);
|
||||
dc.SetFont(wxNullFont);
|
||||
|
||||
dc.SetMapMode(MM_METRIC);
|
||||
dc.SetMapMode(wxMM_METRIC);
|
||||
|
||||
int xcm = dc.LogicalToDeviceX(10.0);
|
||||
int ycm = dc.LogicalToDeviceY(10.0);
|
||||
@@ -183,7 +183,7 @@ BombsCanvasClass::BombsCanvasClass(wxFrame *parent, const wxPoint& pos, const wx
|
||||
}
|
||||
x_cell = (sx+3+X_UNIT)/X_UNIT;
|
||||
y_cell = (sy+3+Y_UNIT)/Y_UNIT;
|
||||
dc.SetMapMode(MM_TEXT);
|
||||
dc.SetMapMode(wxMM_TEXT);
|
||||
bmp=NULL;
|
||||
UpdateFieldSize();
|
||||
}
|
||||
|
@@ -154,7 +154,7 @@ void CheckListBoxFrame::OnQuit(wxCommandEvent& WXUNUSED(event))
|
||||
|
||||
void CheckListBoxFrame::OnAbout(wxCommandEvent& WXUNUSED(event))
|
||||
{
|
||||
wxMessageDialog dialog(this, "Demo of wxCheckListBox control\n"
|
||||
wxMessageDialog dialog(this, "Demo of wxCheckListBox control\n",
|
||||
"About wxCheckListBox", wxYES_NO | wxCANCEL);
|
||||
dialog.ShowModal();
|
||||
}
|
||||
|
@@ -46,7 +46,7 @@ public:
|
||||
void OnQuit(wxCommandEvent& event);
|
||||
void OnAbout(wxCommandEvent& event);
|
||||
void OnDelete(wxCommandEvent& event);
|
||||
bool OnClose() { return TRUE; }
|
||||
void OnCloseWindow(wxCloseEvent& event);
|
||||
|
||||
private:
|
||||
wxTextCtrl *m_text;
|
||||
@@ -69,6 +69,7 @@ BEGIN_EVENT_TABLE(MyFrame, wxFrame)
|
||||
EVT_MENU(Minimal_Quit, MyFrame::OnQuit)
|
||||
EVT_MENU(Minimal_About, MyFrame::OnAbout)
|
||||
EVT_MENU(Minimal_Delete, MyFrame::OnDelete)
|
||||
EVT_CLOSE(MyFrame::OnCloseWindow)
|
||||
END_EVENT_TABLE()
|
||||
|
||||
// ============================================================================
|
||||
@@ -189,6 +190,11 @@ MyFrame::MyFrame()
|
||||
SetClientSize(w, h);
|
||||
}
|
||||
|
||||
void MyFrame::OnCloseWindow(wxCloseEvent& event)
|
||||
{
|
||||
this->Destroy();
|
||||
}
|
||||
|
||||
void MyFrame::OnQuit(wxCommandEvent&)
|
||||
{
|
||||
Close(TRUE);
|
||||
|
@@ -264,7 +264,7 @@ void DatabaseDemoFrame::OnCloseWindow(wxCloseEvent& event)
|
||||
// to close the program here that is not done elsewhere
|
||||
|
||||
this->Destroy();
|
||||
} // DatabaseDemoFrame::OnClose()
|
||||
} // DatabaseDemoFrame::OnCloseWindow()
|
||||
|
||||
|
||||
void DatabaseDemoFrame::CreateDataTable()
|
||||
@@ -651,21 +651,21 @@ CeditorDlg::CeditorDlg(wxWindow *parent) : wxPanel (parent, 1, 1, 460, 455)
|
||||
} // CeditorDlg constructor
|
||||
|
||||
|
||||
bool CeditorDlg::OnClose()
|
||||
void CeditorDlg::OnCloseWindow(wxCloseEvent& event)
|
||||
{
|
||||
// Clean up time
|
||||
if ((mode != mCreate) && (mode != mEdit))
|
||||
{
|
||||
if (Contact)
|
||||
delete Contact;
|
||||
return TRUE;
|
||||
this->Destroy();
|
||||
}
|
||||
else
|
||||
{
|
||||
wxMessageBox("Must finish processing the current record being created/modified before exiting","Notice...",wxOK | wxICON_INFORMATION);
|
||||
return FALSE;
|
||||
event.Veto();
|
||||
}
|
||||
} // CeditorDlg::OnClose()
|
||||
} // CeditorDlg::OnCloseWindow()
|
||||
|
||||
|
||||
void CeditorDlg::OnButton( wxCommandEvent &event )
|
||||
@@ -1283,6 +1283,11 @@ bool CeditorDlg::GetRec(char *whereStr)
|
||||
/*
|
||||
* CparameterDlg constructor
|
||||
*/
|
||||
|
||||
BEGIN_EVENT_TABLE(CparameterDlg, wxDialog)
|
||||
EVT_CLOSE(CparameterDlg::OnCloseWindow)
|
||||
END_EVENT_TABLE()
|
||||
|
||||
CparameterDlg::CparameterDlg(wxWindow *parent) : wxDialog (parent, PARAMETER_DIALOG, "ODBC parameter settings", wxPoint(-1, -1), wxSize(400, 275))
|
||||
{
|
||||
// Since the ::OnCommand() function is overridden, this prevents the widget
|
||||
@@ -1315,7 +1320,7 @@ CparameterDlg::CparameterDlg(wxWindow *parent) : wxDialog (parent, PARAMETER_DIA
|
||||
} // CparameterDlg constructor
|
||||
|
||||
|
||||
bool CparameterDlg::OnClose()
|
||||
void CparameterDlg::OnCloseWindow(wxCloseEvent& event)
|
||||
{
|
||||
// Put any additional checking necessary to make certain it is alright
|
||||
// to close the program here that is not done elsewhere
|
||||
@@ -1324,15 +1329,19 @@ bool CparameterDlg::OnClose()
|
||||
bool Ok = (wxMessageBox("No changes have been saved.\n\nAre you sure you wish exit the parameter screen?","Confirm",wxYES_NO|wxICON_QUESTION) == wxYES);
|
||||
|
||||
if (!Ok)
|
||||
return FALSE;
|
||||
{
|
||||
event.Veto();
|
||||
return;
|
||||
}
|
||||
|
||||
wxGetApp().params = savedParamSettings;
|
||||
}
|
||||
|
||||
if (GetParent() != NULL)
|
||||
GetParent()->SetFocus();
|
||||
return TRUE;
|
||||
} // Cparameter::OnClose()
|
||||
this->Destroy();
|
||||
|
||||
} // Cparameter::OnCloseWindow()
|
||||
|
||||
|
||||
void CparameterDlg::OnCommand(wxWindow& win, wxCommandEvent& event)
|
||||
@@ -1471,6 +1480,7 @@ void CparameterDlg::FillDataSourceList()
|
||||
|
||||
BEGIN_EVENT_TABLE(CqueryDlg, wxDialog)
|
||||
EVT_BUTTON(-1, CqueryDlg::OnButton)
|
||||
EVT_CLOSE(CqueryDlg::OnCloseWindow)
|
||||
END_EVENT_TABLE()
|
||||
|
||||
// CqueryDlg() constructor
|
||||
@@ -1800,7 +1810,7 @@ void CqueryDlg::OnCommand(wxWindow& win, wxCommandEvent& event)
|
||||
} // CqueryDlg::OnCommand
|
||||
|
||||
|
||||
bool CqueryDlg::OnClose()
|
||||
void CqueryDlg::OnCloseWindow(wxCloseEvent& event)
|
||||
{
|
||||
// Clean up
|
||||
if (colInf)
|
||||
@@ -1817,9 +1827,10 @@ bool CqueryDlg::OnClose()
|
||||
|
||||
GetParent()->SetFocus();
|
||||
wxEndBusyCursor();
|
||||
return TRUE;
|
||||
|
||||
} // CqueryDlg::OnClose()
|
||||
this->Destroy();
|
||||
|
||||
} // CqueryDlg::OnCloseWindow()
|
||||
|
||||
/*
|
||||
bool CqueryDlg::SetWidgetPtrs()
|
||||
|
@@ -165,7 +165,7 @@ class CeditorDlg : public wxPanel
|
||||
Ccontact *Contact; // this is the table object that will be being manipulated
|
||||
|
||||
CeditorDlg(wxWindow *parent);
|
||||
bool OnClose(void);
|
||||
void OnCloseWindow(wxCloseEvent& event);
|
||||
void OnButton( wxCommandEvent &event );
|
||||
void OnCommand(wxWindow& win, wxCommandEvent& event);
|
||||
void OnActivate(bool) {}; // necessary for hot keys
|
||||
@@ -243,7 +243,7 @@ class CparameterDlg : public wxDialog
|
||||
|
||||
public:
|
||||
CparameterDlg(wxWindow *parent);
|
||||
bool OnClose(void);
|
||||
void OnCloseWindow(wxCloseEvent& event);
|
||||
void OnCommand(wxWindow& win, wxCommandEvent& event);
|
||||
void OnActivate(bool) {}; // necessary for hot keys
|
||||
|
||||
@@ -252,6 +252,7 @@ class CparameterDlg : public wxDialog
|
||||
bool Save();
|
||||
void FillDataSourceList();
|
||||
|
||||
DECLARE_EVENT_TABLE()
|
||||
}; // CparameterDlg
|
||||
|
||||
#define PARAMETER_DIALOG 400
|
||||
@@ -341,7 +342,7 @@ class CqueryDlg : public wxDialog
|
||||
|
||||
void OnButton( wxCommandEvent &event );
|
||||
void OnCommand(wxWindow& win, wxCommandEvent& event);
|
||||
bool OnClose();
|
||||
void OnCloseWindow(wxCloseEvent& event);
|
||||
void OnActivate(bool) {}; // necessary for hot keys
|
||||
|
||||
// bool SetWidgetPtrs();
|
||||
|
@@ -26,7 +26,6 @@ class MyFrame: public wxFrame
|
||||
{ public:
|
||||
MyFrame(wxWindow *parent, const wxString& title, const wxPoint& pos,
|
||||
const wxSize& size);
|
||||
bool OnClose(void) { return TRUE; }
|
||||
|
||||
void ChooseColour(wxCommandEvent& event);
|
||||
void ChooseFont(wxCommandEvent& event);
|
||||
|
@@ -91,8 +91,6 @@ public:
|
||||
void OnLeftDown(wxMouseEvent& event);
|
||||
void OnRightDown(wxMouseEvent& event);
|
||||
|
||||
bool OnClose();
|
||||
|
||||
DECLARE_EVENT_TABLE()
|
||||
|
||||
private:
|
||||
@@ -302,11 +300,6 @@ void DnDFrame::OnLogClear(wxCommandEvent& /* event */ )
|
||||
m_ctrlLog->Clear();
|
||||
}
|
||||
|
||||
bool DnDFrame::OnClose()
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
void DnDFrame::OnLeftDown(wxMouseEvent &WXUNUSED(event) )
|
||||
{
|
||||
if ( !m_strText.IsEmpty() )
|
||||
|
@@ -43,7 +43,6 @@ class MyFrame: public wxFrame
|
||||
public:
|
||||
void OnQuit(wxCommandEvent& event);
|
||||
void OnAbout(wxCommandEvent& event);
|
||||
bool OnClose(void) { return TRUE; }
|
||||
};
|
||||
|
||||
// ID for the menu commands
|
||||
|
@@ -123,7 +123,7 @@ void FortyCanvas::OnDraw(wxDC& dc)
|
||||
/*
|
||||
Called when the main frame is closed
|
||||
*/
|
||||
bool FortyCanvas::OnClose()
|
||||
bool FortyCanvas::OnCloseCanvas()
|
||||
{
|
||||
if (m_game->InPlay() &&
|
||||
wxMessageBox("Are you sure you want to\nabandon the current game?",
|
||||
|
@@ -25,7 +25,7 @@ public:
|
||||
virtual ~FortyCanvas();
|
||||
|
||||
virtual void OnDraw(wxDC& dc);
|
||||
bool OnClose();
|
||||
bool OnCloseCanvas();
|
||||
void OnMouseEvent(wxMouseEvent& event);
|
||||
void SetCursorStyle(int x, int y);
|
||||
|
||||
|
@@ -40,7 +40,7 @@ public:
|
||||
FortyFrame(wxFrame* frame, char* title, int x, int y, int w, int h);
|
||||
virtual ~FortyFrame();
|
||||
|
||||
bool OnClose();
|
||||
void OnCloseWindow(wxCloseEvent& event);
|
||||
|
||||
// Menu callbacks
|
||||
void NewGame(wxCommandEvent& event);
|
||||
@@ -73,6 +73,7 @@ BEGIN_EVENT_TABLE(FortyFrame, wxFrame)
|
||||
EVT_MENU(SCORES, FortyFrame::Scores)
|
||||
EVT_MENU(RIGHT_BUTTON_UNDO, FortyFrame::ToggleRightButtonUndo)
|
||||
EVT_MENU(HELPING_HAND, FortyFrame::ToggleHelpingHand)
|
||||
EVT_CLOSE(FortyFrame::OnCloseWindow)
|
||||
END_EVENT_TABLE()
|
||||
|
||||
// Create a new application object
|
||||
@@ -189,9 +190,14 @@ FortyFrame::~FortyFrame()
|
||||
{
|
||||
}
|
||||
|
||||
bool FortyFrame::OnClose()
|
||||
void FortyFrame::OnCloseWindow(wxCloseEvent& event)
|
||||
{
|
||||
return m_canvas->OnClose();
|
||||
if (m_canvas->OnCloseCanvas())
|
||||
{
|
||||
this->Destroy();
|
||||
}
|
||||
else
|
||||
event.Veto();
|
||||
}
|
||||
|
||||
void
|
||||
@@ -205,7 +211,7 @@ FortyFrame::Exit(wxCommandEvent&)
|
||||
{
|
||||
#ifdef __WXGTK__
|
||||
// wxGTK doesn't call OnClose() so we do it here
|
||||
if (OnClose())
|
||||
// if (OnClose())
|
||||
#endif
|
||||
Close(TRUE);
|
||||
}
|
||||
|
@@ -37,6 +37,7 @@ BEGIN_EVENT_TABLE(PlayerSelectionDialog, wxDialog)
|
||||
EVT_BUTTON(wxID_OK, PlayerSelectionDialog::ButtonCallback)
|
||||
EVT_BUTTON(wxID_CANCEL, PlayerSelectionDialog::ButtonCallback)
|
||||
EVT_LISTBOX(ID_LISTBOX, PlayerSelectionDialog::SelectCallback)
|
||||
EVT_CLOSE(PlayerSelectionDialog::OnCloseWindow)
|
||||
END_EVENT_TABLE()
|
||||
|
||||
PlayerSelectionDialog::PlayerSelectionDialog(
|
||||
@@ -142,13 +143,10 @@ const wxString& PlayerSelectionDialog::GetPlayersName()
|
||||
return m_player;
|
||||
}
|
||||
|
||||
bool PlayerSelectionDialog::OnClose()
|
||||
void PlayerSelectionDialog::OnCloseWindow(wxCloseEvent& event)
|
||||
{
|
||||
// hide the dialog
|
||||
// NB don't return TRUE otherwise delete is called
|
||||
m_player = "";
|
||||
Show(FALSE);
|
||||
return FALSE;
|
||||
EndModal(wxID_CANCEL);
|
||||
}
|
||||
|
||||
void PlayerSelectionDialog::SelectCallback(wxCommandEvent& event)
|
||||
|
@@ -28,7 +28,7 @@ public:
|
||||
|
||||
protected:
|
||||
friend void SelectCallback(wxListBox&, wxCommandEvent&);
|
||||
bool OnClose();
|
||||
void OnCloseWindow(wxCloseEvent& event);
|
||||
|
||||
private:
|
||||
ScoreFile* m_scoreFile;
|
||||
|
@@ -137,6 +137,9 @@ void ScoreCanvas::OnDraw(wxDC& dc)
|
||||
}
|
||||
}
|
||||
|
||||
BEGIN_EVENT_TABLE(ScoreDialog, wxDialog)
|
||||
EVT_CLOSE(ScoreDialog::OnCloseWindow)
|
||||
END_EVENT_TABLE()
|
||||
|
||||
ScoreDialog::ScoreDialog(
|
||||
wxWindow* parent,
|
||||
@@ -183,10 +186,7 @@ void ScoreDialog::Display()
|
||||
Show(TRUE);
|
||||
}
|
||||
|
||||
bool ScoreDialog::OnClose()
|
||||
void ScoreDialog::OnCloseWindow(wxCloseEvent& event)
|
||||
{
|
||||
// hide the dialog
|
||||
// NB don't return TRUE otherwise delete is called
|
||||
Show(FALSE);
|
||||
return FALSE;
|
||||
EndModal(wxID_OK);
|
||||
}
|
||||
|
@@ -22,11 +22,13 @@ public:
|
||||
void Display();
|
||||
|
||||
protected:
|
||||
bool OnClose();
|
||||
void OnCloseWindow(wxCloseEvent& event);
|
||||
|
||||
private:
|
||||
ScoreFile* m_scoreFile;
|
||||
wxButton* m_OK;
|
||||
|
||||
DECLARE_EVENT_TABLE()
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@@ -40,8 +40,6 @@ class MyFrame: public wxFrame
|
||||
wxGrid *grid;
|
||||
MyFrame(wxFrame *frame, const wxString& title, const wxPoint& pos, const wxSize& size);
|
||||
|
||||
bool OnClose(void) { return TRUE; }
|
||||
|
||||
void ToggleEditable(wxCommandEvent& event);
|
||||
void ToggleRowLabel(wxCommandEvent& event);
|
||||
void ToggleColLabel(wxCommandEvent& event);
|
||||
|
@@ -54,7 +54,6 @@ public:
|
||||
void OnAbout(wxCommandEvent& event);
|
||||
void OnPlay(wxCommandEvent& event);
|
||||
void OnOpen(wxCommandEvent& event);
|
||||
bool OnClose() { return TRUE; }
|
||||
|
||||
DECLARE_EVENT_TABLE()
|
||||
};
|
||||
|
@@ -164,8 +164,3 @@ void MyFrame::OnActivate(wxActivateEvent& event)
|
||||
if (event.GetActive() && canvas)
|
||||
canvas->SetFocus();
|
||||
}
|
||||
|
||||
bool MyFrame::OnClose(void)
|
||||
{
|
||||
return TRUE;
|
||||
}
|
@@ -40,7 +40,6 @@ class MyFrame: public wxFrame
|
||||
MyCanvas *canvas;
|
||||
MyFrame(wxFrame *parent, const wxString& title, const wxPoint& pos, const wxSize& size, const long style);
|
||||
~MyFrame(void);
|
||||
bool OnClose(void);
|
||||
void OnActivate(wxActivateEvent& event);
|
||||
void OnQuit(wxCommandEvent& event);
|
||||
|
||||
|
@@ -244,14 +244,6 @@ void MyWindow::OnPaint(wxPaintEvent& WXUNUSED(event) )
|
||||
frame->Draw(dc,TRUE);
|
||||
}
|
||||
|
||||
// Define the behaviour for the frame closing
|
||||
// - must delete all frames except for the main one.
|
||||
bool MyFrame::OnClose(void)
|
||||
{
|
||||
Show(FALSE);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
SizerFrame::SizerFrame(wxFrame *frame, char *title, int x, int y, int w, int h):
|
||||
wxFrame(frame, -1, title, wxPoint(x, y), wxSize(w, h))
|
||||
@@ -346,10 +338,3 @@ void SizerFrame::OnSize(wxSizeEvent& event)
|
||||
panel->Layout();
|
||||
}
|
||||
|
||||
bool SizerFrame::OnClose(void)
|
||||
{
|
||||
Show(FALSE);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
@@ -29,7 +29,6 @@ class MyFrame: public wxFrame
|
||||
MyWindow *canvas;
|
||||
MyFrame(wxFrame *frame, char *title, int x, int y, int w, int h);
|
||||
void OnSize(wxSizeEvent& event);
|
||||
bool OnClose(void);
|
||||
void Draw(wxDC& dc, bool draw_bitmaps = TRUE);
|
||||
|
||||
void LoadFile(wxCommandEvent& event);
|
||||
@@ -68,7 +67,6 @@ class SizerFrame: public wxFrame
|
||||
wxPanel *panel;
|
||||
SizerFrame(wxFrame *frame, char *title, int x, int y, int w, int h);
|
||||
void OnSize(wxSizeEvent& event);
|
||||
bool OnClose(void);
|
||||
|
||||
DECLARE_EVENT_TABLE()
|
||||
};
|
||||
|
@@ -60,7 +60,6 @@ class MyFrame: public wxFrame
|
||||
void OnIconTextView(wxCommandEvent& event);
|
||||
void OnSmallIconView(wxCommandEvent& event);
|
||||
void OnSmallIconTextView(wxCommandEvent& event);
|
||||
bool OnClose(void) { return TRUE; }
|
||||
void OnDeselectAll(wxCommandEvent& event);
|
||||
void OnSelectAll(wxCommandEvent& event);
|
||||
|
||||
|
@@ -237,23 +237,6 @@ void MyCanvas::OnEvent(wxMouseEvent& event)
|
||||
ypos = pt.y;
|
||||
}
|
||||
|
||||
// Define the behaviour for the frame closing
|
||||
// - must delete all frames except for the main one.
|
||||
bool MyFrame::OnClose(void)
|
||||
{
|
||||
// Must delete children
|
||||
wxNode *node = my_children.First();
|
||||
while (node)
|
||||
{
|
||||
MyChild *child = (MyChild *)node->Data();
|
||||
wxNode *next = node->Next();
|
||||
child->OnClose();
|
||||
delete child;
|
||||
node = next;
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
void MyFrame::OnSize(wxSizeEvent& WXUNUSED(event) )
|
||||
{
|
||||
int w, h;
|
||||
@@ -295,11 +278,6 @@ void MyChild::OnActivate(wxActivateEvent& event)
|
||||
canvas->SetFocus();
|
||||
}
|
||||
|
||||
bool MyChild::OnClose(void)
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
void MyFrame::InitToolBar(wxToolBar* toolBar)
|
||||
{
|
||||
wxBitmap* bitmaps[8];
|
||||
|
@@ -38,7 +38,6 @@ class MyFrame: public wxMDIParentFrame
|
||||
|
||||
void InitToolBar(wxToolBar* toolBar);
|
||||
|
||||
bool OnClose(void);
|
||||
void OnSize(wxSizeEvent& event);
|
||||
void OnAbout(wxCommandEvent& event);
|
||||
void OnNewWindow(wxCommandEvent& event);
|
||||
@@ -53,7 +52,6 @@ class MyChild: public wxMDIChildFrame
|
||||
MyCanvas *canvas;
|
||||
MyChild(wxMDIParentFrame *parent, const wxString& title, const wxPoint& pos, const wxSize& size, const long style);
|
||||
~MyChild(void);
|
||||
bool OnClose(void);
|
||||
void OnActivate(wxActivateEvent& event);
|
||||
void OnQuit(wxCommandEvent& event);
|
||||
|
||||
|
@@ -93,7 +93,6 @@ class MyChild: public wxFrame
|
||||
MyCanvas *canvas;
|
||||
MyChild(wxFrame *frame, const wxString& title, const wxPoint& pos, const wxSize& size, const long style);
|
||||
~MyChild(void);
|
||||
bool OnClose(void);
|
||||
|
||||
void OnQuit(wxCommandEvent& event);
|
||||
void OnNew(wxCommandEvent& event);
|
||||
@@ -376,12 +375,6 @@ void MyChild::OnActivate(wxActivateEvent& event)
|
||||
canvas->SetFocus();
|
||||
}
|
||||
|
||||
bool MyChild::OnClose(void)
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
// Dummy MFC window for specifying a valid main window to MFC, using
|
||||
// a wxWindows HWND.
|
||||
CDummyWindow::CDummyWindow(HWND hWnd):CWnd()
|
||||
|
@@ -108,13 +108,6 @@ void MyFrame::OnTest1(wxCommandEvent& event)
|
||||
dialog->Close(TRUE);
|
||||
}
|
||||
|
||||
bool MyFrame::OnClose(void)
|
||||
{
|
||||
Show(FALSE);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
BEGIN_EVENT_TABLE(MyDialog, wxDialog)
|
||||
EVT_BUTTON(wxID_OK, MyDialog::OnOk)
|
||||
EVT_BUTTON(wxID_CANCEL, MyDialog::OnCancel)
|
||||
|
@@ -26,7 +26,6 @@ class MyFrame: public wxFrame
|
||||
public:
|
||||
wxWindow *panel;
|
||||
MyFrame(wxWindow *parent, const wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size);
|
||||
bool OnClose(void);
|
||||
void OnQuit(wxCommandEvent& event);
|
||||
void OnTest1(wxCommandEvent& event);
|
||||
|
||||
|
@@ -263,7 +263,8 @@ void OwnerDrawnFrame::OnQuit(wxCommandEvent& event)
|
||||
|
||||
void OwnerDrawnFrame::OnAbout(wxCommandEvent& event)
|
||||
{
|
||||
wxMessageDialog dialog(this, "Demo of owner-drawn controls\n"
|
||||
wxMessageDialog dialog(this,
|
||||
"Demo of owner-drawn controls\n",
|
||||
"About wxOwnerDrawn", wxYES_NO | wxCANCEL);
|
||||
dialog.ShowModal();
|
||||
}
|
||||
|
@@ -207,12 +207,4 @@ void MyCanvas::OnPaint(wxPaintEvent& WXUNUSED(event))
|
||||
}
|
||||
}
|
||||
|
||||
// Define the behaviour for the frame closing
|
||||
// - must delete all frames except for the main one.
|
||||
bool MyFrame::OnClose(void)
|
||||
{
|
||||
Show(FALSE);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
@@ -32,7 +32,6 @@ class MyFrame: public wxFrame
|
||||
MyCanvas *canvas;
|
||||
MyFrame(wxFrame *parent, const wxString& title, const wxPoint& pos, const wxSize& size);
|
||||
|
||||
bool OnClose(void);
|
||||
void OnActivate(bool) {}
|
||||
void OnLoadFile(wxCommandEvent& event);
|
||||
void OnSaveFile(wxCommandEvent& event);
|
||||
|
@@ -131,6 +131,12 @@ bool MyApp::OnInit(void)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
int MyApp::OnExit()
|
||||
{
|
||||
delete wxGetApp().m_testFont;
|
||||
return 1;
|
||||
}
|
||||
|
||||
BEGIN_EVENT_TABLE(MyFrame, wxFrame)
|
||||
EVT_MENU(WXPRINT_QUIT, MyFrame::OnExit)
|
||||
EVT_MENU(WXPRINT_PRINT, MyFrame::OnPrint)
|
||||
@@ -317,14 +323,6 @@ void MyCanvas::OnEvent(wxMouseEvent& WXUNUSED(event))
|
||||
{
|
||||
}
|
||||
|
||||
bool MyFrame::OnClose(void)
|
||||
{
|
||||
Show(FALSE);
|
||||
delete wxGetApp().m_testFont;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
bool MyPrintout::OnPrintPage(int page)
|
||||
{
|
||||
wxDC *dc = GetDC();
|
||||
|
@@ -17,8 +17,9 @@
|
||||
class MyApp: public wxApp
|
||||
{
|
||||
public:
|
||||
MyApp(void) ;
|
||||
bool OnInit(void);
|
||||
MyApp() ;
|
||||
bool OnInit();
|
||||
int OnExit();
|
||||
|
||||
wxFont* m_testFont;
|
||||
};
|
||||
@@ -34,8 +35,6 @@ class MyFrame: public wxFrame
|
||||
MyCanvas *canvas;
|
||||
MyFrame(wxFrame *frame, const wxString& title, const wxPoint& pos, const wxSize& size);
|
||||
|
||||
bool OnClose(void);
|
||||
|
||||
void Draw(wxDC& dc);
|
||||
|
||||
void OnSize(wxSizeEvent& event);
|
||||
|
@@ -173,13 +173,6 @@ void MyFrame::OnTestDialog(wxCommandEvent& WXUNUSED(event) )
|
||||
dialog->Close(TRUE);
|
||||
}
|
||||
|
||||
bool MyFrame::OnClose(void)
|
||||
{
|
||||
Show(FALSE);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
BEGIN_EVENT_TABLE(MyDialog, wxDialog)
|
||||
// EVT_BUTTON(RESOURCE_OK, MyDialog::OnOk)
|
||||
EVT_BUTTON(ID_BUTTON109, MyDialog::OnCancel)
|
||||
|
@@ -40,7 +40,6 @@ class MyFrame: public wxFrame
|
||||
public:
|
||||
MyFrame(wxWindow *parent, const wxWindowID id, const wxString& title,
|
||||
const wxPoint& pos, const wxSize& size);
|
||||
bool OnClose();
|
||||
void OnQuit(wxCommandEvent& event);
|
||||
void OnAbout(wxCommandEvent& event);
|
||||
void OnTestDialog(wxCommandEvent& event);
|
||||
|
@@ -312,23 +312,6 @@ void MyCanvas::OnEvent(wxMouseEvent& event)
|
||||
ypos = pt.y;
|
||||
}
|
||||
|
||||
// Define the behaviour for the frame closing
|
||||
// - must delete all frames except for the main one.
|
||||
bool MyFrame::OnClose(void)
|
||||
{
|
||||
// Must delete children
|
||||
wxNode *node = my_children.First();
|
||||
while (node)
|
||||
{
|
||||
MyChild *child = (MyChild *)node->Data();
|
||||
wxNode *next = node->Next();
|
||||
child->OnClose();
|
||||
delete child;
|
||||
node = next;
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
void MyFrame::OnSize(wxSizeEvent& WXUNUSED(event))
|
||||
{
|
||||
wxLayoutAlgorithm layout;
|
||||
@@ -367,9 +350,3 @@ void MyChild::OnActivate(wxActivateEvent& event)
|
||||
canvas->SetFocus();
|
||||
}
|
||||
|
||||
bool MyChild::OnClose(void)
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
|
@@ -35,7 +35,6 @@ class MyFrame: public wxMDIParentFrame
|
||||
|
||||
MyFrame(wxWindow *parent, const wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, const long style);
|
||||
|
||||
bool OnClose(void);
|
||||
void OnSize(wxSizeEvent& event);
|
||||
void OnAbout(wxCommandEvent& event);
|
||||
void OnNewWindow(wxCommandEvent& event);
|
||||
@@ -58,7 +57,6 @@ class MyChild: public wxMDIChildFrame
|
||||
MyCanvas *canvas;
|
||||
MyChild(wxMDIParentFrame *parent, const wxString& title, const wxPoint& pos, const wxSize& size, const long style);
|
||||
~MyChild(void);
|
||||
bool OnClose(void);
|
||||
void OnActivate(wxActivateEvent& event);
|
||||
void OnQuit(wxCommandEvent& event);
|
||||
|
||||
|
@@ -62,8 +62,6 @@ public:
|
||||
MyFrame(wxFrame* frame, const wxString& title, const wxPoint& pos, const wxSize& size);
|
||||
virtual ~MyFrame();
|
||||
|
||||
bool OnClose();
|
||||
|
||||
// Menu commands
|
||||
void SplitHorizontal(wxCommandEvent& event);
|
||||
void SplitVertical(wxCommandEvent& event);
|
||||
@@ -185,11 +183,6 @@ MyFrame::~MyFrame()
|
||||
{
|
||||
}
|
||||
|
||||
bool MyFrame::OnClose()
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
void MyFrame::Quit(wxCommandEvent& WXUNUSED(event) )
|
||||
{
|
||||
Close(TRUE);
|
||||
|
@@ -73,7 +73,6 @@ public:
|
||||
void OnResumeThread(wxCommandEvent& event);
|
||||
|
||||
void OnIdle(wxIdleEvent &event);
|
||||
bool OnClose() { return TRUE; }
|
||||
|
||||
// called by dying thread _in_that_thread_context_
|
||||
void OnThreadExit(wxThread *thread);
|
||||
|
@@ -47,7 +47,6 @@ public:
|
||||
public:
|
||||
void OnQuit(wxCommandEvent& event);
|
||||
void OnAbout(wxCommandEvent& event);
|
||||
bool OnClose(void) { return TRUE; }
|
||||
|
||||
DECLARE_EVENT_TABLE()
|
||||
|
||||
|
@@ -27,7 +27,6 @@ class MyFrame: public wxFrame
|
||||
public:
|
||||
void OnQuit(wxCommandEvent& event);
|
||||
void OnTestDialog(wxCommandEvent& event);
|
||||
bool OnClose(void) { return TRUE; }
|
||||
|
||||
DECLARE_EVENT_TABLE()
|
||||
|
||||
|
@@ -47,6 +47,13 @@
|
||||
#include <string.h>
|
||||
#include <time.h>
|
||||
|
||||
#ifdef __WINDOWS__
|
||||
#include <windows.h>
|
||||
#ifdef DrawText
|
||||
#undef DrawText
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#define buf_size 10000
|
||||
#define DEFAULT_POETRY_DAT "wxpoem"
|
||||
#define DEFAULT_POETRY_IND "wxpoem"
|
||||
|
@@ -476,6 +476,7 @@ bool wxEvtHandler::SearchDynamicEventTable( wxEvent& event )
|
||||
return FALSE;
|
||||
};
|
||||
|
||||
#if WXWIN_COMPATIBILITY
|
||||
bool wxEvtHandler::OnClose()
|
||||
{
|
||||
if (GetNextHandler())
|
||||
@@ -483,3 +484,5 @@ bool wxEvtHandler::OnClose()
|
||||
else
|
||||
return FALSE;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@@ -429,6 +429,10 @@ int wxPreviewControlBar::GetZoomControl()
|
||||
* Preview frame
|
||||
*/
|
||||
|
||||
BEGIN_EVENT_TABLE(wxPreviewFrame, wxFrame)
|
||||
EVT_CLOSE(wxPreviewFrame::OnCloseWindow)
|
||||
END_EVENT_TABLE()
|
||||
|
||||
wxPreviewFrame::wxPreviewFrame(wxPrintPreviewBase *preview, wxFrame *parent, const wxString& title,
|
||||
const wxPoint& pos, const wxSize& size, long style, const wxString& name):
|
||||
wxFrame(parent, -1, title, pos, size, style, name)
|
||||
@@ -442,7 +446,7 @@ wxPreviewFrame::~wxPreviewFrame()
|
||||
{
|
||||
}
|
||||
|
||||
bool wxPreviewFrame::OnClose()
|
||||
void wxPreviewFrame::OnCloseWindow(wxCloseEvent& event)
|
||||
{
|
||||
MakeModal(FALSE);
|
||||
|
||||
@@ -456,7 +460,8 @@ bool wxPreviewFrame::OnClose()
|
||||
m_printPreview->SetFrame(NULL);
|
||||
}
|
||||
delete m_printPreview;
|
||||
return TRUE;
|
||||
|
||||
Destroy();
|
||||
}
|
||||
|
||||
void wxPreviewFrame::Initialize()
|
||||
|
@@ -46,6 +46,7 @@ BEGIN_EVENT_TABLE(wxGenericColourDialog, wxDialog)
|
||||
EVT_SLIDER(wxID_BLUE_SLIDER, wxGenericColourDialog::OnBlueSlider)
|
||||
EVT_PAINT(wxGenericColourDialog::OnPaint)
|
||||
EVT_MOUSE_EVENTS(wxGenericColourDialog::OnMouseEvent)
|
||||
EVT_CLOSE(wxGenericColourDialog::OnCloseWindow)
|
||||
END_EVENT_TABLE()
|
||||
|
||||
#endif
|
||||
@@ -129,10 +130,9 @@ wxGenericColourDialog::~wxGenericColourDialog(void)
|
||||
{
|
||||
}
|
||||
|
||||
bool wxGenericColourDialog::OnClose(void)
|
||||
void wxGenericColourDialog::OnCloseWindow(wxCloseEvent& event)
|
||||
{
|
||||
Show(FALSE);
|
||||
return FALSE;
|
||||
EndModal(wxID_CANCEL);
|
||||
}
|
||||
|
||||
bool wxGenericColourDialog::Create(wxWindow *parent, wxColourData *data)
|
||||
|
@@ -51,6 +51,7 @@ BEGIN_EVENT_TABLE(wxGenericFontDialog, wxDialog)
|
||||
EVT_CHOICE(wxID_FONT_COLOUR, wxGenericFontDialog::OnChangeFont)
|
||||
EVT_CHOICE(wxID_FONT_SIZE, wxGenericFontDialog::OnChangeFont)
|
||||
EVT_PAINT(wxGenericFontDialog::OnPaint)
|
||||
EVT_CLOSE(wxGenericFontDialog::OnCloseWindow)
|
||||
END_EVENT_TABLE()
|
||||
|
||||
#endif
|
||||
@@ -132,10 +133,9 @@ wxGenericFontDialog::~wxGenericFontDialog(void)
|
||||
{
|
||||
}
|
||||
|
||||
bool wxGenericFontDialog::OnClose(void)
|
||||
void wxGenericFontDialog::OnCloseWindow(wxCloseEvent& event)
|
||||
{
|
||||
Show(FALSE);
|
||||
return FALSE;
|
||||
EndModal(wxID_CANCEL);
|
||||
}
|
||||
|
||||
bool wxGenericFontDialog::Create(wxWindow *parent, wxFontData *data)
|
||||
|
@@ -284,6 +284,10 @@ void wxPropertyFormView::OnDoubleClick(wxControl *item)
|
||||
|
||||
IMPLEMENT_CLASS(wxPropertyFormDialog, wxDialog)
|
||||
|
||||
BEGIN_EVENT_TABLE(wxPropertyFormDialog, wxDialog)
|
||||
EVT_CLOSE(wxPropertyFormDialog::OnCloseWindow)
|
||||
END_EVENT_TABLE()
|
||||
|
||||
wxPropertyFormDialog::wxPropertyFormDialog(wxPropertyFormView *v, wxWindow *parent, const wxString& title,
|
||||
const wxPoint& pos, const wxSize& size, long style, const wxString& name):
|
||||
wxDialog(parent, -1, title, pos, size, style, name)
|
||||
@@ -294,16 +298,16 @@ wxPropertyFormDialog::wxPropertyFormDialog(wxPropertyFormView *v, wxWindow *pare
|
||||
// SetAutoLayout(TRUE);
|
||||
}
|
||||
|
||||
bool wxPropertyFormDialog::OnClose(void)
|
||||
void wxPropertyFormDialog::OnCloseWindow(wxCloseEvent& event)
|
||||
{
|
||||
if (m_view)
|
||||
{
|
||||
m_view->OnClose();
|
||||
m_view = NULL;
|
||||
return TRUE;
|
||||
this->Destroy();
|
||||
}
|
||||
else
|
||||
return FALSE;
|
||||
event.Veto();
|
||||
}
|
||||
|
||||
void wxPropertyFormDialog::OnDefaultAction(wxControl *item)
|
||||
@@ -358,12 +362,16 @@ bool wxPropertyFormPanel::ProcessEvent(wxEvent& event)
|
||||
|
||||
IMPLEMENT_CLASS(wxPropertyFormFrame, wxFrame)
|
||||
|
||||
bool wxPropertyFormFrame::OnClose(void)
|
||||
BEGIN_EVENT_TABLE(wxPropertyFormFrame, wxFrame)
|
||||
EVT_CLOSE(wxPropertyFormFrame::OnCloseWindow)
|
||||
END_EVENT_TABLE()
|
||||
|
||||
void wxPropertyFormFrame::OnCloseWindow(wxCloseEvent& event)
|
||||
{
|
||||
if (m_view)
|
||||
return m_view->OnClose();
|
||||
if (m_view && m_view->OnClose())
|
||||
this->Destroy();
|
||||
else
|
||||
return FALSE;
|
||||
event.Veto();
|
||||
}
|
||||
|
||||
wxPanel *wxPropertyFormFrame::OnCreatePanel(wxFrame *parent, wxPropertyFormView *v)
|
||||
|
@@ -808,6 +808,7 @@ IMPLEMENT_CLASS(wxPropertyListDialog, wxDialog)
|
||||
|
||||
BEGIN_EVENT_TABLE(wxPropertyListDialog, wxDialog)
|
||||
EVT_BUTTON(wxID_CANCEL, wxPropertyListDialog::OnCancel)
|
||||
EVT_CLOSE(wxPropertyListDialog::OnCloseWindow)
|
||||
END_EVENT_TABLE()
|
||||
|
||||
wxPropertyListDialog::wxPropertyListDialog(wxPropertyListView *v, wxWindow *parent,
|
||||
@@ -821,17 +822,19 @@ wxPropertyListDialog::wxPropertyListDialog(wxPropertyListView *v, wxWindow *pare
|
||||
SetAutoLayout(TRUE);
|
||||
}
|
||||
|
||||
bool wxPropertyListDialog::OnClose(void)
|
||||
void wxPropertyListDialog::OnCloseWindow(wxCloseEvent& event)
|
||||
{
|
||||
if (m_view)
|
||||
{
|
||||
SetReturnCode(wxID_CANCEL);
|
||||
m_view->OnClose();
|
||||
m_view = NULL;
|
||||
return TRUE;
|
||||
this->Destroy();
|
||||
}
|
||||
else
|
||||
return FALSE;
|
||||
{
|
||||
event.Veto();
|
||||
}
|
||||
}
|
||||
|
||||
void wxPropertyListDialog::OnCancel(wxCommandEvent& WXUNUSED(event))
|
||||
@@ -899,7 +902,11 @@ void wxPropertyListPanel::OnSize(wxSizeEvent& WXUNUSED(event))
|
||||
|
||||
IMPLEMENT_CLASS(wxPropertyListFrame, wxFrame)
|
||||
|
||||
bool wxPropertyListFrame::OnClose(void)
|
||||
BEGIN_EVENT_TABLE(wxPropertyListFrame, wxFrame)
|
||||
EVT_CLOSE(wxPropertyListFrame::OnCloseWindow)
|
||||
END_EVENT_TABLE()
|
||||
|
||||
void wxPropertyListFrame::OnCloseWindow(wxCloseEvent& event)
|
||||
{
|
||||
if (m_view)
|
||||
{
|
||||
@@ -907,10 +914,12 @@ bool wxPropertyListFrame::OnClose(void)
|
||||
m_propertyPanel->SetView(NULL);
|
||||
m_view->OnClose();
|
||||
m_view = NULL;
|
||||
return TRUE;
|
||||
this->Destroy();
|
||||
}
|
||||
else
|
||||
return FALSE;
|
||||
{
|
||||
event.Veto();
|
||||
}
|
||||
}
|
||||
|
||||
wxPropertyListPanel *wxPropertyListFrame::OnCreatePanel(wxFrame *parent, wxPropertyListView *v)
|
||||
|
@@ -57,7 +57,7 @@ wxDC::wxDC()
|
||||
m_scaleX = 1.0;
|
||||
m_scaleY = 1.0;
|
||||
|
||||
m_mappingMode = MM_TEXT;
|
||||
m_mappingMode = wxMM_TEXT;
|
||||
m_needComputeScaleX = FALSE; /* not used yet */
|
||||
m_needComputeScaleY = FALSE; /* not used yet */
|
||||
|
||||
@@ -217,25 +217,25 @@ void wxDC::SetMapMode( int mode )
|
||||
{
|
||||
switch (mode)
|
||||
{
|
||||
case MM_TWIPS:
|
||||
case wxMM_TWIPS:
|
||||
SetLogicalScale( twips2mm*m_mm_to_pix_x, twips2mm*m_mm_to_pix_y );
|
||||
break;
|
||||
case MM_POINTS:
|
||||
case wxMM_POINTS:
|
||||
SetLogicalScale( pt2mm*m_mm_to_pix_x, pt2mm*m_mm_to_pix_y );
|
||||
break;
|
||||
case MM_METRIC:
|
||||
case wxMM_METRIC:
|
||||
SetLogicalScale( m_mm_to_pix_x, m_mm_to_pix_y );
|
||||
break;
|
||||
case MM_LOMETRIC:
|
||||
case wxMM_LOMETRIC:
|
||||
SetLogicalScale( m_mm_to_pix_x/10.0, m_mm_to_pix_y/10.0 );
|
||||
break;
|
||||
default:
|
||||
case MM_TEXT:
|
||||
case wxMM_TEXT:
|
||||
SetLogicalScale( 1.0, 1.0 );
|
||||
break;
|
||||
}
|
||||
/* we don't do this mega optimisation
|
||||
if (mode != MM_TEXT)
|
||||
if (mode != wxMM_TEXT)
|
||||
{
|
||||
m_needComputeScaleX = TRUE;
|
||||
m_needComputeScaleY = TRUE;
|
||||
|
@@ -219,14 +219,25 @@ void wxDialog::OnPaint( wxPaintEvent& WXUNUSED(event) )
|
||||
|
||||
void wxDialog::OnCloseWindow(wxCloseEvent& event)
|
||||
{
|
||||
// We'll send a Cancel message by default,
|
||||
// which may close the dialog.
|
||||
// Check for looping if the Cancel event handler calls Close().
|
||||
|
||||
// Note that if a cancel button and handler aren't present in the dialog,
|
||||
// nothing will happen when you close the dialog via the window manager, or
|
||||
// via Close().
|
||||
// We wouldn't want to destroy the dialog by default, since the dialog may have been
|
||||
// created on the stack.
|
||||
// However, this does mean that calling dialog->Close() won't delete the dialog
|
||||
// unless the handler for wxID_CANCEL does so. So use Destroy() if you want to be
|
||||
// sure to destroy the dialog.
|
||||
// The default OnCancel (above) simply ends a modal dialog, and hides a modeless dialog.
|
||||
|
||||
static wxList closing;
|
||||
|
||||
if (closing.Member(this))
|
||||
return; // no loops
|
||||
|
||||
if ( event.GetVeto() )
|
||||
return;
|
||||
|
||||
closing.Append(this);
|
||||
|
||||
wxCommandEvent cancelEvent(wxEVT_COMMAND_BUTTON_CLICKED, wxID_CANCEL);
|
||||
|
@@ -478,7 +478,7 @@ void wxFrame::OnInternalIdle()
|
||||
void wxFrame::OnCloseWindow( wxCloseEvent& event )
|
||||
{
|
||||
// close the window if it wasn't vetoed by the application
|
||||
if ( !event.GetVeto() )
|
||||
// if ( !event.GetVeto() ) // No, this isn't the interpretation of GetVeto.
|
||||
Destroy();
|
||||
}
|
||||
|
||||
|
@@ -57,7 +57,7 @@ wxDC::wxDC()
|
||||
m_scaleX = 1.0;
|
||||
m_scaleY = 1.0;
|
||||
|
||||
m_mappingMode = MM_TEXT;
|
||||
m_mappingMode = wxMM_TEXT;
|
||||
m_needComputeScaleX = FALSE; /* not used yet */
|
||||
m_needComputeScaleY = FALSE; /* not used yet */
|
||||
|
||||
@@ -217,25 +217,25 @@ void wxDC::SetMapMode( int mode )
|
||||
{
|
||||
switch (mode)
|
||||
{
|
||||
case MM_TWIPS:
|
||||
case wxMM_TWIPS:
|
||||
SetLogicalScale( twips2mm*m_mm_to_pix_x, twips2mm*m_mm_to_pix_y );
|
||||
break;
|
||||
case MM_POINTS:
|
||||
case wxMM_POINTS:
|
||||
SetLogicalScale( pt2mm*m_mm_to_pix_x, pt2mm*m_mm_to_pix_y );
|
||||
break;
|
||||
case MM_METRIC:
|
||||
case wxMM_METRIC:
|
||||
SetLogicalScale( m_mm_to_pix_x, m_mm_to_pix_y );
|
||||
break;
|
||||
case MM_LOMETRIC:
|
||||
case wxMM_LOMETRIC:
|
||||
SetLogicalScale( m_mm_to_pix_x/10.0, m_mm_to_pix_y/10.0 );
|
||||
break;
|
||||
default:
|
||||
case MM_TEXT:
|
||||
case wxMM_TEXT:
|
||||
SetLogicalScale( 1.0, 1.0 );
|
||||
break;
|
||||
}
|
||||
/* we don't do this mega optimisation
|
||||
if (mode != MM_TEXT)
|
||||
if (mode != wxMM_TEXT)
|
||||
{
|
||||
m_needComputeScaleX = TRUE;
|
||||
m_needComputeScaleY = TRUE;
|
||||
|
@@ -219,14 +219,25 @@ void wxDialog::OnPaint( wxPaintEvent& WXUNUSED(event) )
|
||||
|
||||
void wxDialog::OnCloseWindow(wxCloseEvent& event)
|
||||
{
|
||||
// We'll send a Cancel message by default,
|
||||
// which may close the dialog.
|
||||
// Check for looping if the Cancel event handler calls Close().
|
||||
|
||||
// Note that if a cancel button and handler aren't present in the dialog,
|
||||
// nothing will happen when you close the dialog via the window manager, or
|
||||
// via Close().
|
||||
// We wouldn't want to destroy the dialog by default, since the dialog may have been
|
||||
// created on the stack.
|
||||
// However, this does mean that calling dialog->Close() won't delete the dialog
|
||||
// unless the handler for wxID_CANCEL does so. So use Destroy() if you want to be
|
||||
// sure to destroy the dialog.
|
||||
// The default OnCancel (above) simply ends a modal dialog, and hides a modeless dialog.
|
||||
|
||||
static wxList closing;
|
||||
|
||||
if (closing.Member(this))
|
||||
return; // no loops
|
||||
|
||||
if ( event.GetVeto() )
|
||||
return;
|
||||
|
||||
closing.Append(this);
|
||||
|
||||
wxCommandEvent cancelEvent(wxEVT_COMMAND_BUTTON_CLICKED, wxID_CANCEL);
|
||||
|
@@ -478,7 +478,7 @@ void wxFrame::OnInternalIdle()
|
||||
void wxFrame::OnCloseWindow( wxCloseEvent& event )
|
||||
{
|
||||
// close the window if it wasn't vetoed by the application
|
||||
if ( !event.GetVeto() )
|
||||
// if ( !event.GetVeto() ) // No, this isn't the interpretation of GetVeto.
|
||||
Destroy();
|
||||
}
|
||||
|
||||
|
@@ -1414,6 +1414,10 @@ void wxApp::doMacInGoAway(WindowPtr window)
|
||||
{
|
||||
if (TrackGoAway(window, m_event.where))
|
||||
{
|
||||
// TODO: Stefan, I think you need to send a wxCloseEvent to the window
|
||||
// here. The OnCloseWindow handler will take care of delete the frame
|
||||
// if it wishes to (there should be a default wxFrame::OnCloseWindow
|
||||
// that destroys the frame).
|
||||
if (theMacWxFrame->OnClose()) {
|
||||
#if WXGARBAGE_COLLECTION_ON
|
||||
theMacWxFrame->Show(FALSE);
|
||||
|
@@ -1414,6 +1414,10 @@ void wxApp::doMacInGoAway(WindowPtr window)
|
||||
{
|
||||
if (TrackGoAway(window, m_event.where))
|
||||
{
|
||||
// TODO: Stefan, I think you need to send a wxCloseEvent to the window
|
||||
// here. The OnCloseWindow handler will take care of delete the frame
|
||||
// if it wishes to (there should be a default wxFrame::OnCloseWindow
|
||||
// that destroys the frame).
|
||||
if (theMacWxFrame->OnClose()) {
|
||||
#if WXGARBAGE_COLLECTION_ON
|
||||
theMacWxFrame->Show(FALSE);
|
||||
|
@@ -61,7 +61,7 @@ wxDC::wxDC(void)
|
||||
m_scaleX = 1.0;
|
||||
m_scaleY = 1.0;
|
||||
|
||||
m_mappingMode = MM_TEXT;
|
||||
m_mappingMode = wxMM_TEXT;
|
||||
m_needComputeScaleX = FALSE;
|
||||
m_needComputeScaleY = FALSE;
|
||||
|
||||
@@ -211,24 +211,24 @@ void wxDC::SetMapMode( int mode )
|
||||
{
|
||||
switch (mode)
|
||||
{
|
||||
case MM_TWIPS:
|
||||
case wxMM_TWIPS:
|
||||
SetLogicalScale( twips2mm*m_mm_to_pix_x, twips2mm*m_mm_to_pix_y );
|
||||
break;
|
||||
case MM_POINTS:
|
||||
case wxMM_POINTS:
|
||||
SetLogicalScale( pt2mm*m_mm_to_pix_x, pt2mm*m_mm_to_pix_y );
|
||||
break;
|
||||
case MM_METRIC:
|
||||
case wxMM_METRIC:
|
||||
SetLogicalScale( m_mm_to_pix_x, m_mm_to_pix_y );
|
||||
break;
|
||||
case MM_LOMETRIC:
|
||||
case wxMM_LOMETRIC:
|
||||
SetLogicalScale( m_mm_to_pix_x/10.0, m_mm_to_pix_y/10.0 );
|
||||
break;
|
||||
default:
|
||||
case MM_TEXT:
|
||||
case wxMM_TEXT:
|
||||
SetLogicalScale( 1.0, 1.0 );
|
||||
break;
|
||||
};
|
||||
if (mode != MM_TEXT)
|
||||
if (mode != wxMM_TEXT)
|
||||
{
|
||||
m_needComputeScaleX = TRUE;
|
||||
m_needComputeScaleY = TRUE;
|
||||
|
@@ -237,37 +237,34 @@ void wxDialog::OnCancel(wxCommandEvent& event)
|
||||
}
|
||||
}
|
||||
|
||||
bool wxDialog::OnClose()
|
||||
void wxDialog::OnCloseWindow(wxCloseEvent& event)
|
||||
{
|
||||
// Behaviour changed in 2.0: we'll send a Cancel message by default,
|
||||
// We'll send a Cancel message by default,
|
||||
// which may close the dialog.
|
||||
// Check for looping if the Cancel event handler calls Close()
|
||||
// Check for looping if the Cancel event handler calls Close().
|
||||
|
||||
// Note that if a cancel button and handler aren't present in the dialog,
|
||||
// nothing will happen when you close the dialog via the window manager, or
|
||||
// via Close().
|
||||
// We wouldn't want to destroy the dialog by default, since the dialog may have been
|
||||
// created on the stack.
|
||||
// However, this does mean that calling dialog->Close() won't delete the dialog
|
||||
// unless the handler for wxID_CANCEL does so. So use Destroy() if you want to be
|
||||
// sure to destroy the dialog.
|
||||
// The default OnCancel (above) simply ends a modal dialog, and hides a modeless dialog.
|
||||
|
||||
static wxList closing;
|
||||
|
||||
if ( closing.Member(this) )
|
||||
return FALSE;
|
||||
return;
|
||||
|
||||
closing.Append(this);
|
||||
|
||||
wxCommandEvent cancelEvent(wxEVT_COMMAND_BUTTON_CLICKED, wxID_CANCEL);
|
||||
cancelEvent.SetEventObject( this );
|
||||
GetEventHandler()->ProcessEvent(cancelEvent);
|
||||
GetEventHandler()->ProcessEvent(cancelEvent); // This may close the dialog
|
||||
|
||||
closing.DeleteObject(this);
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
void wxDialog::OnCloseWindow(wxCloseEvent& event)
|
||||
{
|
||||
// Compatibility
|
||||
if ( GetEventHandler()->OnClose() || !event.CanVeto())
|
||||
{
|
||||
this->Destroy();
|
||||
}
|
||||
else
|
||||
event.Veto(TRUE);
|
||||
}
|
||||
|
||||
// Destroy the window (delayed, if a managed window)
|
||||
|
@@ -371,23 +371,10 @@ void wxFrame::OnActivate(wxActivateEvent& event)
|
||||
}
|
||||
}
|
||||
|
||||
// The default implementation for the close window event - calls
|
||||
// OnClose for backward compatibility.
|
||||
|
||||
// The default implementation for the close window event.
|
||||
void wxFrame::OnCloseWindow(wxCloseEvent& event)
|
||||
{
|
||||
// Compatibility
|
||||
if ( GetEventHandler()->OnClose() || !event.CanVeto())
|
||||
{
|
||||
this->Destroy();
|
||||
}
|
||||
else
|
||||
event.Veto(TRUE);
|
||||
}
|
||||
|
||||
bool wxFrame::OnClose()
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
// Destroy the window (delayed, if a managed window)
|
||||
|
@@ -128,7 +128,7 @@ struct mfPLACEABLEHEADER {
|
||||
/*
|
||||
* Pass filename of existing non-placeable metafile, and bounding box.
|
||||
* Adds a placeable metafile header, sets the mapping mode to anisotropic,
|
||||
* and sets the window origin and extent to mimic the MM_TEXT mapping mode.
|
||||
* and sets the window origin and extent to mimic the wxMM_TEXT mapping mode.
|
||||
*
|
||||
*/
|
||||
|
||||
@@ -198,7 +198,7 @@ bool wxMakeMetaFilePlaceable(const wxString& filename, int x1, int y1, int x2, i
|
||||
|
||||
modeRecord->rdSize = 4;
|
||||
modeRecord->rdFunction = META_SETMAPMODE;
|
||||
modeRecord->rdParm[0] = MM_ANISOTROPIC;
|
||||
modeRecord->rdParm[0] = wxMM_ANISOTROPIC;
|
||||
|
||||
originRecord->rdSize = 5;
|
||||
originRecord->rdFunction = META_SETWINDOWORG;
|
||||
|
@@ -1110,7 +1110,10 @@ bool wxWindow::Close(bool force)
|
||||
{
|
||||
wxCloseEvent event(wxEVT_CLOSE_WINDOW, m_windowId);
|
||||
event.SetEventObject(this);
|
||||
#if WXWIN_COMPATIBILITY
|
||||
event.SetForce(force);
|
||||
#endif
|
||||
event.SetCanVeto(!force);
|
||||
|
||||
return GetEventHandler()->ProcessEvent(event);
|
||||
}
|
||||
|
@@ -61,7 +61,7 @@ wxDC::wxDC(void)
|
||||
m_scaleX = 1.0;
|
||||
m_scaleY = 1.0;
|
||||
|
||||
m_mappingMode = MM_TEXT;
|
||||
m_mappingMode = wxMM_TEXT;
|
||||
m_needComputeScaleX = FALSE;
|
||||
m_needComputeScaleY = FALSE;
|
||||
|
||||
@@ -211,24 +211,24 @@ void wxDC::SetMapMode( int mode )
|
||||
{
|
||||
switch (mode)
|
||||
{
|
||||
case MM_TWIPS:
|
||||
case wxMM_TWIPS:
|
||||
SetLogicalScale( twips2mm*m_mm_to_pix_x, twips2mm*m_mm_to_pix_y );
|
||||
break;
|
||||
case MM_POINTS:
|
||||
case wxMM_POINTS:
|
||||
SetLogicalScale( pt2mm*m_mm_to_pix_x, pt2mm*m_mm_to_pix_y );
|
||||
break;
|
||||
case MM_METRIC:
|
||||
case wxMM_METRIC:
|
||||
SetLogicalScale( m_mm_to_pix_x, m_mm_to_pix_y );
|
||||
break;
|
||||
case MM_LOMETRIC:
|
||||
case wxMM_LOMETRIC:
|
||||
SetLogicalScale( m_mm_to_pix_x/10.0, m_mm_to_pix_y/10.0 );
|
||||
break;
|
||||
default:
|
||||
case MM_TEXT:
|
||||
case wxMM_TEXT:
|
||||
SetLogicalScale( 1.0, 1.0 );
|
||||
break;
|
||||
};
|
||||
if (mode != MM_TEXT)
|
||||
if (mode != wxMM_TEXT)
|
||||
{
|
||||
m_needComputeScaleX = TRUE;
|
||||
m_needComputeScaleY = TRUE;
|
||||
|
@@ -237,37 +237,34 @@ void wxDialog::OnCancel(wxCommandEvent& event)
|
||||
}
|
||||
}
|
||||
|
||||
bool wxDialog::OnClose()
|
||||
void wxDialog::OnCloseWindow(wxCloseEvent& event)
|
||||
{
|
||||
// Behaviour changed in 2.0: we'll send a Cancel message by default,
|
||||
// We'll send a Cancel message by default,
|
||||
// which may close the dialog.
|
||||
// Check for looping if the Cancel event handler calls Close()
|
||||
// Check for looping if the Cancel event handler calls Close().
|
||||
|
||||
// Note that if a cancel button and handler aren't present in the dialog,
|
||||
// nothing will happen when you close the dialog via the window manager, or
|
||||
// via Close().
|
||||
// We wouldn't want to destroy the dialog by default, since the dialog may have been
|
||||
// created on the stack.
|
||||
// However, this does mean that calling dialog->Close() won't delete the dialog
|
||||
// unless the handler for wxID_CANCEL does so. So use Destroy() if you want to be
|
||||
// sure to destroy the dialog.
|
||||
// The default OnCancel (above) simply ends a modal dialog, and hides a modeless dialog.
|
||||
|
||||
static wxList closing;
|
||||
|
||||
if ( closing.Member(this) )
|
||||
return FALSE;
|
||||
return;
|
||||
|
||||
closing.Append(this);
|
||||
|
||||
wxCommandEvent cancelEvent(wxEVT_COMMAND_BUTTON_CLICKED, wxID_CANCEL);
|
||||
cancelEvent.SetEventObject( this );
|
||||
GetEventHandler()->ProcessEvent(cancelEvent);
|
||||
GetEventHandler()->ProcessEvent(cancelEvent); // This may close the dialog
|
||||
|
||||
closing.DeleteObject(this);
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
void wxDialog::OnCloseWindow(wxCloseEvent& event)
|
||||
{
|
||||
// Compatibility
|
||||
if ( GetEventHandler()->OnClose() || !event.CanVeto())
|
||||
{
|
||||
this->Destroy();
|
||||
}
|
||||
else
|
||||
event.Veto(TRUE);
|
||||
}
|
||||
|
||||
// Destroy the window (delayed, if a managed window)
|
||||
|
@@ -371,23 +371,10 @@ void wxFrame::OnActivate(wxActivateEvent& event)
|
||||
}
|
||||
}
|
||||
|
||||
// The default implementation for the close window event - calls
|
||||
// OnClose for backward compatibility.
|
||||
|
||||
// The default implementation for the close window event.
|
||||
void wxFrame::OnCloseWindow(wxCloseEvent& event)
|
||||
{
|
||||
// Compatibility
|
||||
if ( GetEventHandler()->OnClose() || !event.CanVeto())
|
||||
{
|
||||
this->Destroy();
|
||||
}
|
||||
else
|
||||
event.Veto(TRUE);
|
||||
}
|
||||
|
||||
bool wxFrame::OnClose()
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
// Destroy the window (delayed, if a managed window)
|
||||
|
@@ -128,7 +128,7 @@ struct mfPLACEABLEHEADER {
|
||||
/*
|
||||
* Pass filename of existing non-placeable metafile, and bounding box.
|
||||
* Adds a placeable metafile header, sets the mapping mode to anisotropic,
|
||||
* and sets the window origin and extent to mimic the MM_TEXT mapping mode.
|
||||
* and sets the window origin and extent to mimic the wxMM_TEXT mapping mode.
|
||||
*
|
||||
*/
|
||||
|
||||
@@ -198,7 +198,7 @@ bool wxMakeMetaFilePlaceable(const wxString& filename, int x1, int y1, int x2, i
|
||||
|
||||
modeRecord->rdSize = 4;
|
||||
modeRecord->rdFunction = META_SETMAPMODE;
|
||||
modeRecord->rdParm[0] = MM_ANISOTROPIC;
|
||||
modeRecord->rdParm[0] = wxMM_ANISOTROPIC;
|
||||
|
||||
originRecord->rdSize = 5;
|
||||
originRecord->rdFunction = META_SETWINDOWORG;
|
||||
|
@@ -1110,7 +1110,10 @@ bool wxWindow::Close(bool force)
|
||||
{
|
||||
wxCloseEvent event(wxEVT_CLOSE_WINDOW, m_windowId);
|
||||
event.SetEventObject(this);
|
||||
#if WXWIN_COMPATIBILITY
|
||||
event.SetForce(force);
|
||||
#endif
|
||||
event.SetCanVeto(!force);
|
||||
|
||||
return GetEventHandler()->ProcessEvent(event);
|
||||
}
|
||||
|
@@ -61,7 +61,7 @@ wxDC::wxDC(void)
|
||||
m_scaleX = 1.0;
|
||||
m_scaleY = 1.0;
|
||||
|
||||
m_mappingMode = MM_TEXT;
|
||||
m_mappingMode = wxMM_TEXT;
|
||||
m_needComputeScaleX = FALSE;
|
||||
m_needComputeScaleY = FALSE;
|
||||
|
||||
@@ -238,24 +238,24 @@ void wxDC::SetMapMode( int mode )
|
||||
{
|
||||
switch (mode)
|
||||
{
|
||||
case MM_TWIPS:
|
||||
case wxMM_TWIPS:
|
||||
SetLogicalScale( twips2mm*m_mm_to_pix_x, twips2mm*m_mm_to_pix_y );
|
||||
break;
|
||||
case MM_POINTS:
|
||||
case wxMM_POINTS:
|
||||
SetLogicalScale( pt2mm*m_mm_to_pix_x, pt2mm*m_mm_to_pix_y );
|
||||
break;
|
||||
case MM_METRIC:
|
||||
case wxMM_METRIC:
|
||||
SetLogicalScale( m_mm_to_pix_x, m_mm_to_pix_y );
|
||||
break;
|
||||
case MM_LOMETRIC:
|
||||
case wxMM_LOMETRIC:
|
||||
SetLogicalScale( m_mm_to_pix_x/10.0, m_mm_to_pix_y/10.0 );
|
||||
break;
|
||||
default:
|
||||
case MM_TEXT:
|
||||
case wxMM_TEXT:
|
||||
SetLogicalScale( 1.0, 1.0 );
|
||||
break;
|
||||
};
|
||||
if (mode != MM_TEXT)
|
||||
if (mode != wxMM_TEXT)
|
||||
{
|
||||
m_needComputeScaleX = TRUE;
|
||||
m_needComputeScaleY = TRUE;
|
||||
|
@@ -564,37 +564,34 @@ void wxDialog::OnCancel(wxCommandEvent& WXUNUSED(event))
|
||||
}
|
||||
}
|
||||
|
||||
bool wxDialog::OnClose()
|
||||
void wxDialog::OnCloseWindow(wxCloseEvent& event)
|
||||
{
|
||||
// Behaviour changed in 2.0: we'll send a Cancel message by default,
|
||||
// We'll send a Cancel message by default,
|
||||
// which may close the dialog.
|
||||
// Check for looping if the Cancel event handler calls Close()
|
||||
// Check for looping if the Cancel event handler calls Close().
|
||||
|
||||
// Note that if a cancel button and handler aren't present in the dialog,
|
||||
// nothing will happen when you close the dialog via the window manager, or
|
||||
// via Close().
|
||||
// We wouldn't want to destroy the dialog by default, since the dialog may have been
|
||||
// created on the stack.
|
||||
// However, this does mean that calling dialog->Close() won't delete the dialog
|
||||
// unless the handler for wxID_CANCEL does so. So use Destroy() if you want to be
|
||||
// sure to destroy the dialog.
|
||||
// The default OnCancel (above) simply ends a modal dialog, and hides a modeless dialog.
|
||||
|
||||
static wxList closing;
|
||||
|
||||
if ( closing.Member(this) )
|
||||
return FALSE;
|
||||
return;
|
||||
|
||||
closing.Append(this);
|
||||
|
||||
wxCommandEvent cancelEvent(wxEVT_COMMAND_BUTTON_CLICKED, wxID_CANCEL);
|
||||
cancelEvent.SetEventObject( this );
|
||||
GetEventHandler()->ProcessEvent(cancelEvent);
|
||||
GetEventHandler()->ProcessEvent(cancelEvent); // This may close the dialog
|
||||
|
||||
closing.DeleteObject(this);
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
void wxDialog::OnCloseWindow(wxCloseEvent& event)
|
||||
{
|
||||
// Compatibility
|
||||
if ( GetEventHandler()->OnClose() || !event.CanVeto())
|
||||
{
|
||||
this->Destroy();
|
||||
}
|
||||
else
|
||||
event.Veto(TRUE);
|
||||
}
|
||||
|
||||
// Destroy the window (delayed, if a managed window)
|
||||
|
@@ -782,23 +782,12 @@ void wxFrame::OnActivate(wxActivateEvent& event)
|
||||
}
|
||||
}
|
||||
|
||||
// The default implementation for the close window event - calls
|
||||
// The default implementation for the close window event.
|
||||
// OnClose for backward compatibility.
|
||||
|
||||
void wxFrame::OnCloseWindow(wxCloseEvent& event)
|
||||
{
|
||||
// Compatibility
|
||||
if ( GetEventHandler()->OnClose() || !event.CanVeto())
|
||||
{
|
||||
this->Destroy();
|
||||
}
|
||||
else
|
||||
event.Veto(TRUE);
|
||||
}
|
||||
|
||||
bool wxFrame::OnClose()
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
// Destroy the window (delayed, if a managed window)
|
||||
|
@@ -128,7 +128,7 @@ struct mfPLACEABLEHEADER {
|
||||
/*
|
||||
* Pass filename of existing non-placeable metafile, and bounding box.
|
||||
* Adds a placeable metafile header, sets the mapping mode to anisotropic,
|
||||
* and sets the window origin and extent to mimic the MM_TEXT mapping mode.
|
||||
* and sets the window origin and extent to mimic the wxMM_TEXT mapping mode.
|
||||
*
|
||||
*/
|
||||
|
||||
@@ -198,7 +198,7 @@ bool wxMakeMetaFilePlaceable(const wxString& filename, int x1, int y1, int x2, i
|
||||
|
||||
modeRecord->rdSize = 4;
|
||||
modeRecord->rdFunction = META_SETMAPMODE;
|
||||
modeRecord->rdParm[0] = MM_ANISOTROPIC;
|
||||
modeRecord->rdParm[0] = wxMM_ANISOTROPIC;
|
||||
|
||||
originRecord->rdSize = 5;
|
||||
originRecord->rdFunction = META_SETWINDOWORG;
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user