git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@41045
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
-#ifndef __GTKFRAMEH__
-#define __GTKFRAMEH__
+#ifndef _WX_GTK_FRAME_H_
+#define _WX_GTK_FRAME_H_
//-----------------------------------------------------------------------------
// classes
//-----------------------------------------------------------------------------
// classes
// --------------------------
// GTK callbacks
// --------------------------
// GTK callbacks
- virtual void GtkOnSize( int x, int y, int width, int height );
+ virtual void GtkOnSize();
virtual void OnInternalIdle();
bool m_menuBarDetached;
virtual void OnInternalIdle();
bool m_menuBarDetached;
DECLARE_DYNAMIC_CLASS(wxFrame)
};
DECLARE_DYNAMIC_CLASS(wxFrame)
};
+#endif // _WX_GTK_FRAME_H_
wxMDIClientWindow *m_clientWindow;
bool m_justInserted;
wxMDIClientWindow *m_clientWindow;
bool m_justInserted;
- virtual void GtkOnSize( int x, int y, int width, int height );
+ virtual void GtkOnSize();
virtual void OnInternalIdle();
protected:
virtual void OnInternalIdle();
protected:
- void GtkOnSize( int x, int y, int width, int height );
virtual void DoSetSize(int x, int y,
int width, int height,
virtual void DoSetSize(int x, int y,
int width, int height,
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
-#ifndef __GTKTOPLEVELH__
-#define __GTKTOPLEVELH__
+#ifndef _WX_GTK_TOPLEVEL_H_
+#define _WX_GTK_TOPLEVEL_H_
//-----------------------------------------------------------------------------
// wxTopLevelWindowGTK
//-----------------------------------------------------------------------------
// wxTopLevelWindowGTK
// --------------------------
// GTK callbacks
// --------------------------
// 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!
virtual void OnInternalIdle();
// do *not* call this to iconize the frame, this is a private function!
-#endif // __GTKTOPLEVELH__
+#endif // _WX_GTK_TOPLEVEL_H_
much ugly flicker nor from within the size_allocate
handler, because GTK 1.1.X forbids that. */
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 );
}
bool ret = wxWindow::Show( show );
}
bool ret = wxWindow::Show( show );
wxTopLevelWindow::DoSetClientSize( width, 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;
// avoid recursions
if (m_resizing) return;
m_resizing = true;
// this shouldn't happen: wxFrame, wxMDIParentFrame and wxMDIChildFrame have m_wxwindow
wxASSERT_MSG( (m_wxwindow != NULL), wxT("invalid frame") );
// 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;
// space occupied by m_frameToolBar and m_frameMenuBar
int client_area_x_offset = 0,
client_area_y_offset = 0;
-void wxMDIParentFrame::GtkOnSize( int x, int y, int width, int height )
+void wxMDIParentFrame::GtkOnSize()
- wxFrame::GtkOnSize( x, y, width, height );
wxMDIChildFrame *child_frame = GetActiveChild();
if (!child_frame) return;
wxMDIChildFrame *child_frame = GetActiveChild();
if (!child_frame) return;
-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;
- 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
/* 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
void wxPopupWindow::OnInternalIdle()
{
if (!m_sizeSet && GTK_WIDGET_REALIZED(m_wxwindow))
void wxPopupWindow::OnInternalIdle()
{
if (!m_sizeSet && GTK_WIDGET_REALIZED(m_wxwindow))
- GtkOnSize( m_x, m_y, m_width, m_height );
wxWindow::OnInternalIdle();
}
wxWindow::OnInternalIdle();
}
much ugly flicker nor from within the size_allocate
handler, because GTK 1.1.X forbids that. */
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 );
}
bool ret = wxWindow::Show( show );
}
bool ret = wxWindow::Show( show );
much ugly flicker or from within the size_allocate
handler, because GTK 1.1.X forbids that. */
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 );
}
// This seems no longer to be needed and the call
}
// This seems no longer to be needed and the call
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),
- 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;
// 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
/* 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
{
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 );
// we'll come back later
if (g_isIdle)
// we'll come back later
if (g_isIdle)