GtkOnSize parameters aren't useful
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@41045 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
e40821559e
commit
b5e31cc8e2
@ -7,8 +7,8 @@
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef __GTKFRAMEH__
|
||||
#define __GTKFRAMEH__
|
||||
#ifndef _WX_GTK_FRAME_H_
|
||||
#define _WX_GTK_FRAME_H_
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// classes
|
||||
@ -75,7 +75,7 @@ public:
|
||||
// --------------------------
|
||||
|
||||
// GTK callbacks
|
||||
virtual void GtkOnSize( int x, int y, int width, int height );
|
||||
virtual void GtkOnSize();
|
||||
virtual void OnInternalIdle();
|
||||
|
||||
bool m_menuBarDetached;
|
||||
@ -108,4 +108,4 @@ public:
|
||||
DECLARE_DYNAMIC_CLASS(wxFrame)
|
||||
};
|
||||
|
||||
#endif // __GTKFRAMEH__
|
||||
#endif // _WX_GTK_FRAME_H_
|
||||
|
@ -58,7 +58,7 @@ public:
|
||||
wxMDIClientWindow *m_clientWindow;
|
||||
bool m_justInserted;
|
||||
|
||||
virtual void GtkOnSize( int x, int y, int width, int height );
|
||||
virtual void GtkOnSize();
|
||||
virtual void OnInternalIdle();
|
||||
|
||||
protected:
|
||||
|
@ -37,7 +37,7 @@ public:
|
||||
|
||||
|
||||
protected:
|
||||
void GtkOnSize( int x, int y, int width, int height );
|
||||
void GtkOnSize();
|
||||
|
||||
virtual void DoSetSize(int x, int y,
|
||||
int width, int height,
|
||||
|
@ -7,8 +7,8 @@
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef __GTKTOPLEVELH__
|
||||
#define __GTKTOPLEVELH__
|
||||
#ifndef _WX_GTK_TOPLEVEL_H_
|
||||
#define _WX_GTK_TOPLEVEL_H_
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// wxTopLevelWindowGTK
|
||||
@ -82,7 +82,7 @@ public:
|
||||
// --------------------------
|
||||
|
||||
// GTK callbacks
|
||||
virtual void GtkOnSize( int x, int y, int width, int height );
|
||||
virtual void GtkOnSize();
|
||||
virtual void OnInternalIdle();
|
||||
|
||||
// do *not* call this to iconize the frame, this is a private function!
|
||||
@ -131,4 +131,4 @@ protected:
|
||||
bool m_grabbed;
|
||||
};
|
||||
|
||||
#endif // __GTKTOPLEVELH__
|
||||
#endif // _WX_GTK_TOPLEVEL_H_
|
||||
|
@ -83,7 +83,7 @@ bool wxDialog::Show( bool show )
|
||||
much ugly flicker nor from within the size_allocate
|
||||
handler, because GTK 1.1.X forbids that. */
|
||||
|
||||
GtkOnSize( m_x, m_y, m_width, m_height );
|
||||
GtkOnSize();
|
||||
}
|
||||
|
||||
bool ret = wxWindow::Show( show );
|
||||
|
@ -326,13 +326,8 @@ void wxFrame::DoSetClientSize( int width, int height )
|
||||
wxTopLevelWindow::DoSetClientSize( width, height );
|
||||
}
|
||||
|
||||
void wxFrame::GtkOnSize( int WXUNUSED(x), int WXUNUSED(y),
|
||||
int width, int height )
|
||||
void wxFrame::GtkOnSize()
|
||||
{
|
||||
// due to a bug in gtk, x,y are always 0
|
||||
// m_x = x;
|
||||
// m_y = y;
|
||||
|
||||
// avoid recursions
|
||||
if (m_resizing) return;
|
||||
m_resizing = true;
|
||||
@ -340,9 +335,6 @@ void wxFrame::GtkOnSize( int WXUNUSED(x), int WXUNUSED(y),
|
||||
// this shouldn't happen: wxFrame, wxMDIParentFrame and wxMDIChildFrame have m_wxwindow
|
||||
wxASSERT_MSG( (m_wxwindow != NULL), wxT("invalid frame") );
|
||||
|
||||
m_width = width;
|
||||
m_height = height;
|
||||
|
||||
// space occupied by m_frameToolBar and m_frameMenuBar
|
||||
int client_area_x_offset = 0,
|
||||
client_area_y_offset = 0;
|
||||
|
@ -126,9 +126,9 @@ bool wxMDIParentFrame::Create(wxWindow *parent,
|
||||
return true;
|
||||
}
|
||||
|
||||
void wxMDIParentFrame::GtkOnSize( int x, int y, int width, int height )
|
||||
void wxMDIParentFrame::GtkOnSize()
|
||||
{
|
||||
wxFrame::GtkOnSize( x, y, width, height );
|
||||
wxFrame::GtkOnSize();
|
||||
|
||||
wxMDIChildFrame *child_frame = GetActiveChild();
|
||||
if (!child_frame) return;
|
||||
|
@ -301,18 +301,11 @@ void wxPopupWindow::DoSetSize( int x, int y, int width, int height, int sizeFlag
|
||||
m_resizing = false;
|
||||
}
|
||||
|
||||
void wxPopupWindow::GtkOnSize( int WXUNUSED(x), int WXUNUSED(y), int width, int height )
|
||||
void wxPopupWindow::GtkOnSize()
|
||||
{
|
||||
// due to a bug in gtk, x,y are always 0
|
||||
// m_x = x;
|
||||
// m_y = y;
|
||||
|
||||
if ((m_height == height) && (m_width == width) && (m_sizeSet)) return;
|
||||
if (m_sizeSet) return;
|
||||
if (!m_wxwindow) return;
|
||||
|
||||
m_width = width;
|
||||
m_height = height;
|
||||
|
||||
/* FIXME: is this a hack? */
|
||||
/* Since for some reason GTK will revert to using maximum size ever set
|
||||
for this window, we have to set geometry hints maxsize to match size
|
||||
@ -342,7 +335,7 @@ void wxPopupWindow::GtkOnSize( int WXUNUSED(x), int WXUNUSED(y), int width, int
|
||||
void wxPopupWindow::OnInternalIdle()
|
||||
{
|
||||
if (!m_sizeSet && GTK_WIDGET_REALIZED(m_wxwindow))
|
||||
GtkOnSize( m_x, m_y, m_width, m_height );
|
||||
GtkOnSize();
|
||||
|
||||
wxWindow::OnInternalIdle();
|
||||
}
|
||||
@ -356,7 +349,7 @@ bool wxPopupWindow::Show( bool show )
|
||||
much ugly flicker nor from within the size_allocate
|
||||
handler, because GTK 1.1.X forbids that. */
|
||||
|
||||
GtkOnSize( m_x, m_y, m_width, m_height );
|
||||
GtkOnSize();
|
||||
}
|
||||
|
||||
bool ret = wxWindow::Show( show );
|
||||
|
@ -800,7 +800,7 @@ bool wxTopLevelWindowGTK::Show( bool show )
|
||||
much ugly flicker or from within the size_allocate
|
||||
handler, because GTK 1.1.X forbids that. */
|
||||
|
||||
GtkOnSize( m_x, m_y, m_width, m_height );
|
||||
GtkOnSize();
|
||||
}
|
||||
|
||||
// This seems no longer to be needed and the call
|
||||
@ -937,22 +937,14 @@ void wxTopLevelWindowGTK::DoSetClientSize( int width, int height )
|
||||
width + m_miniEdge*2, height + m_miniEdge*2 + m_miniTitle, 0);
|
||||
}
|
||||
|
||||
void wxTopLevelWindowGTK::GtkOnSize( int WXUNUSED(x), int WXUNUSED(y),
|
||||
int width, int height )
|
||||
void wxTopLevelWindowGTK::GtkOnSize()
|
||||
{
|
||||
// due to a bug in gtk, x,y are always 0
|
||||
// m_x = x;
|
||||
// m_y = y;
|
||||
|
||||
// avoid recursions
|
||||
if (m_resizing) return;
|
||||
m_resizing = true;
|
||||
|
||||
if ( m_wxwindow == NULL ) return;
|
||||
|
||||
m_width = width;
|
||||
m_height = height;
|
||||
|
||||
/* wxMDIChildFrame derives from wxFrame but it _is_ a wxWindow as it uses
|
||||
wxWindow::Create to create it's GTK equivalent. m_mainWidget is only
|
||||
set in wxFrame::Create so it is used to check what kind of frame we
|
||||
@ -1054,7 +1046,7 @@ void wxTopLevelWindowGTK::OnInternalIdle()
|
||||
{
|
||||
if (!m_sizeSet && GTK_WIDGET_REALIZED(m_wxwindow))
|
||||
{
|
||||
GtkOnSize( m_x, m_y, m_width, m_height );
|
||||
GtkOnSize();
|
||||
|
||||
// we'll come back later
|
||||
if (g_isIdle)
|
||||
|
Loading…
Reference in New Issue
Block a user