wxWindow::OnClose() removed completely from wxGTK, wxCloseEvent is now
processed properly. Also, fixes for compilation without WXWIN_COMPATIBILITY on. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@1608 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
// Created:
|
||||
// Id: $Id$
|
||||
// Copyright: (c) 1998 Robert Roebling
|
||||
// Licence: wxWindows licence
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef __GTKDIALOGH__
|
||||
@@ -41,24 +41,23 @@ class wxDialog: public wxPanel
|
||||
|
||||
public:
|
||||
wxDialog();
|
||||
wxDialog( wxWindow *parent, wxWindowID id,
|
||||
wxDialog( wxWindow *parent, wxWindowID id,
|
||||
const wxString &title,
|
||||
const wxPoint &pos = wxDefaultPosition,
|
||||
const wxSize &size = wxDefaultSize,
|
||||
long style = wxDEFAULT_DIALOG_STYLE,
|
||||
const wxString &name = wxDialogNameStr );
|
||||
bool Create( wxWindow *parent, wxWindowID id,
|
||||
const wxPoint &pos = wxDefaultPosition,
|
||||
const wxSize &size = wxDefaultSize,
|
||||
long style = wxDEFAULT_DIALOG_STYLE,
|
||||
const wxString &name = wxDialogNameStr );
|
||||
bool Create( wxWindow *parent, wxWindowID id,
|
||||
const wxString &title,
|
||||
const wxPoint &pos = wxDefaultPosition,
|
||||
const wxSize &size = wxDefaultSize,
|
||||
long style = wxDEFAULT_DIALOG_STYLE,
|
||||
const wxString &name = wxDialogNameStr );
|
||||
const wxPoint &pos = wxDefaultPosition,
|
||||
const wxSize &size = wxDefaultSize,
|
||||
long style = wxDEFAULT_DIALOG_STYLE,
|
||||
const wxString &name = wxDialogNameStr );
|
||||
~wxDialog();
|
||||
|
||||
|
||||
void SetTitle(const wxString& title);
|
||||
wxString GetTitle() const;
|
||||
|
||||
bool OnClose();
|
||||
|
||||
void OnApply( wxCommandEvent &event );
|
||||
void OnCancel( wxCommandEvent &event );
|
||||
void OnOK( wxCommandEvent &event );
|
||||
@@ -67,39 +66,39 @@ public:
|
||||
/*
|
||||
void OnCharHook( wxKeyEvent& event );
|
||||
*/
|
||||
|
||||
|
||||
bool Destroy();
|
||||
void OnCloseWindow( wxCloseEvent& event );
|
||||
|
||||
|
||||
virtual void SetSize( int x, int y, int width, int height,
|
||||
int sizeFlags = wxSIZE_AUTO );
|
||||
virtual void SetSize( int width, int height );
|
||||
|
||||
|
||||
virtual bool Show( bool show );
|
||||
virtual int ShowModal();
|
||||
virtual void EndModal( int retCode );
|
||||
virtual bool IsModal() const;
|
||||
void SetModal( bool modal );
|
||||
|
||||
|
||||
virtual void InitDialog(void);
|
||||
|
||||
|
||||
virtual void Centre( int direction = wxHORIZONTAL );
|
||||
|
||||
|
||||
virtual void SetIcon( const wxIcon &icon );
|
||||
virtual void Iconize( bool WXUNUSED(iconize)) { }
|
||||
virtual bool IsIconized() const { return FALSE; }
|
||||
bool Iconized() const { return IsIconized(); }
|
||||
virtual void Maximize() { }
|
||||
virtual void Restore() { }
|
||||
|
||||
|
||||
// implementation
|
||||
|
||||
|
||||
virtual void GtkOnSize( int x, int y, int width, int height );
|
||||
|
||||
|
||||
bool m_modalShowing;
|
||||
wxString m_title;
|
||||
wxIcon m_icon;
|
||||
|
||||
|
||||
DECLARE_EVENT_TABLE()
|
||||
};
|
||||
|
||||
|
@@ -4,7 +4,7 @@
|
||||
// Author: Robert Roebling
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) Robert Roebling
|
||||
// Licence: wxWindows licence
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef __GTKMINIFRAMEH__
|
||||
@@ -28,41 +28,41 @@ class wxMiniFrame;
|
||||
// wxMiniFrame
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
class wxMiniFrame: public wxFrame
|
||||
class wxMiniFrame: public wxFrame
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxMiniFrame)
|
||||
DECLARE_DYNAMIC_CLASS(wxMiniFrame)
|
||||
|
||||
public:
|
||||
inline wxMiniFrame(void) {}
|
||||
inline wxMiniFrame(wxWindow *parent,
|
||||
wxWindowID id,
|
||||
const wxString& title,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = wxDEFAULT_FRAME|wxTINY_CAPTION_HORIZ,
|
||||
const wxString& name = wxFrameNameStr)
|
||||
{
|
||||
Create(parent, id, title, pos, size, style, name);
|
||||
}
|
||||
bool Create(wxWindow *parent,
|
||||
wxWindowID id,
|
||||
const wxString& title,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = wxDEFAULT_FRAME|wxTINY_CAPTION_HORIZ,
|
||||
const wxString& name = wxFrameNameStr);
|
||||
|
||||
// implementation
|
||||
|
||||
bool m_isDragging;
|
||||
int m_oldX,m_oldY;
|
||||
int m_diffX,m_diffY;
|
||||
|
||||
void DrawFrame( int x, int y );
|
||||
void OnPaint( wxPaintEvent &event );
|
||||
void OnMouse( wxMouseEvent &event );
|
||||
wxMiniFrame() {}
|
||||
wxMiniFrame(wxWindow *parent,
|
||||
wxWindowID id,
|
||||
const wxString& title,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = wxDEFAULT_FRAME_STYLE | wxTINY_CAPTION_HORIZ,
|
||||
const wxString& name = wxFrameNameStr)
|
||||
{
|
||||
Create(parent, id, title, pos, size, style, name);
|
||||
}
|
||||
|
||||
DECLARE_EVENT_TABLE()
|
||||
bool Create(wxWindow *parent,
|
||||
wxWindowID id,
|
||||
const wxString& title,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = wxDEFAULT_FRAME_STYLE | wxTINY_CAPTION_HORIZ,
|
||||
const wxString& name = wxFrameNameStr);
|
||||
|
||||
// implementation
|
||||
bool m_isDragging;
|
||||
int m_oldX,m_oldY;
|
||||
int m_diffX,m_diffY;
|
||||
|
||||
void DrawFrame( int x, int y );
|
||||
void OnPaint( wxPaintEvent &event );
|
||||
void OnMouse( wxMouseEvent &event );
|
||||
|
||||
DECLARE_EVENT_TABLE()
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@@ -184,7 +184,6 @@ public:
|
||||
virtual void MakeModal( bool modal );
|
||||
virtual bool IsEnabled() const { return m_isEnabled; }
|
||||
inline bool Enabled() const { return IsEnabled(); }
|
||||
virtual bool OnClose();
|
||||
|
||||
virtual void SetFocus();
|
||||
static wxWindow *FindFocus();
|
||||
@@ -195,6 +194,7 @@ public:
|
||||
virtual void RemoveChild( wxWindow *child );
|
||||
void SetReturnCode( int retCode );
|
||||
int GetReturnCode();
|
||||
|
||||
wxWindow *GetParent() const
|
||||
{ return m_parent; }
|
||||
wxWindow *GetGrandParent() const
|
||||
@@ -260,10 +260,10 @@ public:
|
||||
virtual wxFont& GetFont() { return m_font; }
|
||||
|
||||
// For backward compatibility
|
||||
inline virtual void SetButtonFont(const wxFont& font) { SetFont(font); }
|
||||
inline virtual void SetLabelFont(const wxFont& font) { SetFont(font); }
|
||||
inline virtual wxFont& GetLabelFont() { return GetFont(); };
|
||||
inline virtual wxFont& GetButtonFont() { return GetFont(); };
|
||||
virtual void SetButtonFont(const wxFont& font) { SetFont(font); }
|
||||
virtual void SetLabelFont(const wxFont& font) { SetFont(font); }
|
||||
virtual wxFont& GetLabelFont() { return GetFont(); };
|
||||
virtual wxFont& GetButtonFont() { return GetFont(); };
|
||||
|
||||
virtual void SetWindowStyleFlag( long flag );
|
||||
virtual long GetWindowStyleFlag() const;
|
||||
@@ -277,7 +277,7 @@ public:
|
||||
virtual wxString GetName() const;
|
||||
virtual wxString GetLabel() const;
|
||||
|
||||
void OnSysColourChanged( wxSysColourChangedEvent &WXUNUSED(event) ) {};
|
||||
void OnSysColourChanged( wxSysColourChangedEvent &WXUNUSED(event) ) { }
|
||||
void OnKeyDown( wxKeyEvent &event );
|
||||
|
||||
virtual bool IsShown() const;
|
||||
@@ -289,8 +289,8 @@ public:
|
||||
virtual wxWindow *FindWindow( long id );
|
||||
virtual wxWindow *FindWindow( const wxString& name );
|
||||
|
||||
void AllowDoubleClick( bool WXUNUSED(allow) ) {};
|
||||
void SetDoubleClick( bool WXUNUSED(allow) ) {};
|
||||
void AllowDoubleClick( bool WXUNUSED(allow) ) { }
|
||||
void SetDoubleClick( bool WXUNUSED(allow) ) { }
|
||||
|
||||
virtual void ClientToScreen( int *x, int *y );
|
||||
virtual void ScreenToClient( int *x, int *y );
|
||||
|
Reference in New Issue
Block a user