//-----------------------------------------------------------------------------
// size
-// I don't any longer intercept GTK's internal resize events (except frames)
+// I don't any longer intercept GTK's internal resize events, except
+// for frames and from within MDI and tabbed windows (client area
+// size determined internally by GTK, not wxWin).
/*
void gtk_window_size_callback( GtkWidget *WXUNUSED(widget), GtkAllocation* alloc, wxWindow *win )
m_drawingOffsetX = 0;
m_drawingOffsetY = 0;
m_pDropTarget = NULL;
+ m_resizing = FALSE;
};
wxWindow::wxWindow( wxWindow *parent, wxWindowID id,
m_drawingOffsetX = 0;
m_drawingOffsetY = 0;
m_pDropTarget = NULL;
+ m_resizing = FALSE;
}
void wxWindow::PostCreation(void)
void wxWindow::SetSize( int x, int y, int width, int height, int sizeFlags )
{
+ if (m_resizing) return; // I don't like recursions
+ m_resizing = TRUE;
+
int newX = x;
int newY = y;
int newW = width;
wxSizeEvent event( wxSize(m_width,m_height), GetId() );
event.SetEventObject( this );
ProcessEvent( event );
+
+ m_resizing = FALSE;
};
void wxWindow::SetSize( int width, int height )
void wxWindow::GetSize( int *width, int *height ) const
{
- (*width) = m_width;
- (*height) = m_height;
+ if (width) (*width) = m_width;
+ if (height) (*height) = m_height;
};
void wxWindow::SetClientSize( int width, int height )
};
};
+ // wxNotebooks are very special, so they have their own AddChild
+
if (IsKindOf(CLASSINFO(wxNotebook)))
{
wxNotebook *tab = (wxNotebook*)this;
m_vAdjust->page_increment = (float)(wxMax(fthumb-2,0));
m_vAdjust->page_size = fthumb;
};
-
+
if (m_wxwindow->window)
{
if (orient == wxHORIZONTAL)