// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
-#ifndef __GTKFRAMEH__
-#define __GTKFRAMEH__
+#ifndef _WX_GTK_FRAME_H_
+#define _WX_GTK_FRAME_H_
//-----------------------------------------------------------------------------
// classes
// --------------------------
// GTK callbacks
- virtual void GtkOnSize( int x, int y, int width, int height );
+ virtual void GtkOnSize();
virtual void OnInternalIdle();
bool m_menuBarDetached;
DECLARE_DYNAMIC_CLASS(wxFrame)
};
-#endif // __GTKFRAMEH__
+#endif // _WX_GTK_FRAME_H_
wxMDIClientWindow *m_clientWindow;
bool m_justInserted;
- virtual void GtkOnSize( int x, int y, int width, int height );
+ virtual void GtkOnSize();
virtual void OnInternalIdle();
protected:
protected:
- void GtkOnSize( int x, int y, int width, int height );
+ void GtkOnSize();
virtual void DoSetSize(int x, int y,
int width, int height,
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
-#ifndef __GTKTOPLEVELH__
-#define __GTKTOPLEVELH__
+#ifndef _WX_GTK_TOPLEVEL_H_
+#define _WX_GTK_TOPLEVEL_H_
//-----------------------------------------------------------------------------
// wxTopLevelWindowGTK
// --------------------------
// 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!
bool m_grabbed;
};
-#endif // __GTKTOPLEVELH__
+#endif // _WX_GTK_TOPLEVEL_H_
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 );
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;
// 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;
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;
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
void wxPopupWindow::OnInternalIdle()
{
if (!m_sizeSet && GTK_WIDGET_REALIZED(m_wxwindow))
- GtkOnSize( m_x, m_y, m_width, m_height );
+ GtkOnSize();
wxWindow::OnInternalIdle();
}
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 );
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
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
{
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)