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:
@@ -7,8 +7,8 @@
|
|||||||
// Licence: wxWindows licence
|
// Licence: wxWindows licence
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
#ifndef __GTKFRAMEH__
|
#ifndef _WX_GTK_FRAME_H_
|
||||||
#define __GTKFRAMEH__
|
#define _WX_GTK_FRAME_H_
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
// classes
|
// classes
|
||||||
@@ -75,7 +75,7 @@ public:
|
|||||||
// --------------------------
|
// --------------------------
|
||||||
|
|
||||||
// GTK callbacks
|
// GTK callbacks
|
||||||
virtual void GtkOnSize( int x, int y, int width, int height );
|
virtual void GtkOnSize();
|
||||||
virtual void OnInternalIdle();
|
virtual void OnInternalIdle();
|
||||||
|
|
||||||
bool m_menuBarDetached;
|
bool m_menuBarDetached;
|
||||||
@@ -108,4 +108,4 @@ public:
|
|||||||
DECLARE_DYNAMIC_CLASS(wxFrame)
|
DECLARE_DYNAMIC_CLASS(wxFrame)
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // __GTKFRAMEH__
|
#endif // _WX_GTK_FRAME_H_
|
||||||
|
@@ -58,7 +58,7 @@ public:
|
|||||||
wxMDIClientWindow *m_clientWindow;
|
wxMDIClientWindow *m_clientWindow;
|
||||||
bool m_justInserted;
|
bool m_justInserted;
|
||||||
|
|
||||||
virtual void GtkOnSize( int x, int y, int width, int height );
|
virtual void GtkOnSize();
|
||||||
virtual void OnInternalIdle();
|
virtual void OnInternalIdle();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
@@ -37,7 +37,7 @@ public:
|
|||||||
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void GtkOnSize( int x, int y, int width, int height );
|
void GtkOnSize();
|
||||||
|
|
||||||
virtual void DoSetSize(int x, int y,
|
virtual void DoSetSize(int x, int y,
|
||||||
int width, int height,
|
int width, int height,
|
||||||
|
@@ -7,8 +7,8 @@
|
|||||||
// Licence: wxWindows licence
|
// Licence: wxWindows licence
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
#ifndef __GTKTOPLEVELH__
|
#ifndef _WX_GTK_TOPLEVEL_H_
|
||||||
#define __GTKTOPLEVELH__
|
#define _WX_GTK_TOPLEVEL_H_
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
// wxTopLevelWindowGTK
|
// wxTopLevelWindowGTK
|
||||||
@@ -82,7 +82,7 @@ public:
|
|||||||
// --------------------------
|
// --------------------------
|
||||||
|
|
||||||
// GTK callbacks
|
// GTK callbacks
|
||||||
virtual void GtkOnSize( int x, int y, int width, int height );
|
virtual void GtkOnSize();
|
||||||
virtual void OnInternalIdle();
|
virtual void OnInternalIdle();
|
||||||
|
|
||||||
// do *not* call this to iconize the frame, this is a private function!
|
// do *not* call this to iconize the frame, this is a private function!
|
||||||
@@ -131,4 +131,4 @@ protected:
|
|||||||
bool m_grabbed;
|
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
|
much ugly flicker nor from within the size_allocate
|
||||||
handler, because GTK 1.1.X forbids that. */
|
handler, because GTK 1.1.X forbids that. */
|
||||||
|
|
||||||
GtkOnSize( m_x, m_y, m_width, m_height );
|
GtkOnSize();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool ret = wxWindow::Show( show );
|
bool ret = wxWindow::Show( show );
|
||||||
|
@@ -326,13 +326,8 @@ void wxFrame::DoSetClientSize( int width, int height )
|
|||||||
wxTopLevelWindow::DoSetClientSize( width, height );
|
wxTopLevelWindow::DoSetClientSize( width, height );
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxFrame::GtkOnSize( int WXUNUSED(x), int WXUNUSED(y),
|
void wxFrame::GtkOnSize()
|
||||||
int width, int height )
|
|
||||||
{
|
{
|
||||||
// due to a bug in gtk, x,y are always 0
|
|
||||||
// m_x = x;
|
|
||||||
// m_y = y;
|
|
||||||
|
|
||||||
// avoid recursions
|
// avoid recursions
|
||||||
if (m_resizing) return;
|
if (m_resizing) return;
|
||||||
m_resizing = true;
|
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
|
// this shouldn't happen: wxFrame, wxMDIParentFrame and wxMDIChildFrame have m_wxwindow
|
||||||
wxASSERT_MSG( (m_wxwindow != NULL), wxT("invalid frame") );
|
wxASSERT_MSG( (m_wxwindow != NULL), wxT("invalid frame") );
|
||||||
|
|
||||||
m_width = width;
|
|
||||||
m_height = height;
|
|
||||||
|
|
||||||
// space occupied by m_frameToolBar and m_frameMenuBar
|
// space occupied by m_frameToolBar and m_frameMenuBar
|
||||||
int client_area_x_offset = 0,
|
int client_area_x_offset = 0,
|
||||||
client_area_y_offset = 0;
|
client_area_y_offset = 0;
|
||||||
|
@@ -126,9 +126,9 @@ bool wxMDIParentFrame::Create(wxWindow *parent,
|
|||||||
return true;
|
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();
|
wxMDIChildFrame *child_frame = GetActiveChild();
|
||||||
if (!child_frame) return;
|
if (!child_frame) return;
|
||||||
|
@@ -301,18 +301,11 @@ void wxPopupWindow::DoSetSize( int x, int y, int width, int height, int sizeFlag
|
|||||||
m_resizing = false;
|
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
|
if (m_sizeSet) return;
|
||||||
// m_x = x;
|
|
||||||
// m_y = y;
|
|
||||||
|
|
||||||
if ((m_height == height) && (m_width == width) && (m_sizeSet)) return;
|
|
||||||
if (!m_wxwindow) return;
|
if (!m_wxwindow) return;
|
||||||
|
|
||||||
m_width = width;
|
|
||||||
m_height = height;
|
|
||||||
|
|
||||||
/* FIXME: is this a hack? */
|
/* FIXME: is this a hack? */
|
||||||
/* Since for some reason GTK will revert to using maximum size ever set
|
/* 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
|
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()
|
void wxPopupWindow::OnInternalIdle()
|
||||||
{
|
{
|
||||||
if (!m_sizeSet && GTK_WIDGET_REALIZED(m_wxwindow))
|
if (!m_sizeSet && GTK_WIDGET_REALIZED(m_wxwindow))
|
||||||
GtkOnSize( m_x, m_y, m_width, m_height );
|
GtkOnSize();
|
||||||
|
|
||||||
wxWindow::OnInternalIdle();
|
wxWindow::OnInternalIdle();
|
||||||
}
|
}
|
||||||
@@ -356,7 +349,7 @@ bool wxPopupWindow::Show( bool show )
|
|||||||
much ugly flicker nor from within the size_allocate
|
much ugly flicker nor from within the size_allocate
|
||||||
handler, because GTK 1.1.X forbids that. */
|
handler, because GTK 1.1.X forbids that. */
|
||||||
|
|
||||||
GtkOnSize( m_x, m_y, m_width, m_height );
|
GtkOnSize();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool ret = wxWindow::Show( show );
|
bool ret = wxWindow::Show( show );
|
||||||
|
@@ -800,7 +800,7 @@ bool wxTopLevelWindowGTK::Show( bool show )
|
|||||||
much ugly flicker or from within the size_allocate
|
much ugly flicker or from within the size_allocate
|
||||||
handler, because GTK 1.1.X forbids that. */
|
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
|
// 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);
|
width + m_miniEdge*2, height + m_miniEdge*2 + m_miniTitle, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxTopLevelWindowGTK::GtkOnSize( int WXUNUSED(x), int WXUNUSED(y),
|
void wxTopLevelWindowGTK::GtkOnSize()
|
||||||
int width, int height )
|
|
||||||
{
|
{
|
||||||
// due to a bug in gtk, x,y are always 0
|
|
||||||
// m_x = x;
|
|
||||||
// m_y = y;
|
|
||||||
|
|
||||||
// avoid recursions
|
// avoid recursions
|
||||||
if (m_resizing) return;
|
if (m_resizing) return;
|
||||||
m_resizing = true;
|
m_resizing = true;
|
||||||
|
|
||||||
if ( m_wxwindow == NULL ) return;
|
if ( m_wxwindow == NULL ) return;
|
||||||
|
|
||||||
m_width = width;
|
|
||||||
m_height = height;
|
|
||||||
|
|
||||||
/* wxMDIChildFrame derives from wxFrame but it _is_ a wxWindow as it uses
|
/* wxMDIChildFrame derives from wxFrame but it _is_ a wxWindow as it uses
|
||||||
wxWindow::Create to create it's GTK equivalent. m_mainWidget is only
|
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
|
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))
|
if (!m_sizeSet && GTK_WIDGET_REALIZED(m_wxwindow))
|
||||||
{
|
{
|
||||||
GtkOnSize( m_x, m_y, m_width, m_height );
|
GtkOnSize();
|
||||||
|
|
||||||
// we'll come back later
|
// we'll come back later
|
||||||
if (g_isIdle)
|
if (g_isIdle)
|
||||||
|
Reference in New Issue
Block a user