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:
@@ -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.
|
||||
*
|
||||
*/
|
||||
|
||||
|
Reference in New Issue
Block a user