{
wxControl::OnSize( event );
+/*
int w = 21;
gtk_widget_set_usize( GTK_COMBO(m_widget)->entry, m_width-w-1, m_height );
gtk_widget_set_uposition( GTK_COMBO(m_widget)->button, m_x+m_width-w, m_y );
gtk_widget_set_usize( GTK_COMBO(m_widget)->button, w, m_height );
+*/
}
void wxComboBox::ApplyWidgetStyle()
m_frameMenuBar->m_height = hh;
gtk_myfixed_move( GTK_MYFIXED(m_mainWidget), m_frameMenuBar->m_widget, xx, yy );
+
+// m_frameMenuBar->m_widget->requisition.width = ww;
+// m_frameMenuBar->m_widget->requisition.height = hh;
gtk_widget_set_usize( m_frameMenuBar->m_widget, ww, hh );
client_area_y_offset += hh;
m_frameToolBar->m_width = ww;
gtk_myfixed_move( GTK_MYFIXED(m_mainWidget), m_frameToolBar->m_widget, xx, yy );
+
+// m_frameToolBar->m_widget->requisition.width = ww;
+// m_frameToolBar->m_widget->requisition.height = hh;
gtk_widget_set_usize( m_frameToolBar->m_widget, ww, hh );
client_area_y_offset += hh;
int client_w = m_width - 2*m_miniEdge;
int client_h = m_height - client_area_y_offset- 2*m_miniEdge - m_miniTitle;
+// m_wxwindow->requisition.width = client_w;
+// m_wxwindow->requisition.height = client_h;
gtk_widget_set_usize( m_wxwindow, client_w, client_h );
+
}
else
{
m_frameStatusBar->m_height = hh;
gtk_myfixed_move( GTK_MYFIXED(m_wxwindow), m_frameStatusBar->m_widget, xx, yy );
+
+// m_frameStatusBar->m_widget->requisition.width = ww;
+// m_frameStatusBar->m_widget->requisition.height = hh;
gtk_widget_set_usize( m_frameStatusBar->m_widget, ww, hh );
}
/* we actually set the size of a frame here and no-where else */
gtk_widget_set_usize( m_widget, m_width, m_height );
-
+
m_sizeSet = TRUE;
/* send size event to frame */
static void gtk_page_size_callback( GtkWidget *WXUNUSED(widget), GtkAllocation* alloc, wxWindow *win )
{
if (g_isIdle) wxapp_install_idle_handler();
-
+
if ((win->m_x == alloc->x) &&
(win->m_y == alloc->y) &&
(win->m_width == alloc->width) &&
myfixed = GTK_MYFIXED (widget);
+/*
requisition->width = 0;
requisition->height = 0;
+*/
+ requisition->width = widget->requisition.width;
+ requisition->height = widget->requisition.height;
children = myfixed->children;
while (children)
g_return_if_fail (allocation != NULL);
myfixed = GTK_MYFIXED (widget);
-
+
widget->allocation = *allocation;
#if (GTK_MINOR_VERSION > 0)
if (myfixed->shadow_type == GTK_SHADOW_NONE)
{
gtk_myfixed_put( GTK_MYFIXED(parent->m_wxwindow),
GTK_WIDGET(child->m_widget),
- child->m_x,
+ child->m_x,
child->m_y );
- gtk_widget_set_usize( GTK_WIDGET(child->m_widget),
+ gtk_widget_set_usize( child->m_widget,
child->m_width,
child->m_height );
-
+
if (parent->m_windowStyle & wxTAB_TRAVERSAL)
{
/* we now allow a window to get the focus as long as it
if (m_resizing) return; /* I don't like recursions */
m_resizing = TRUE;
- if (m_parent->m_wxwindow == NULL) /* i.e. wxNotebook */
+ if (m_parent->m_wxwindow == NULL) /* i.e. wxNotebook page */
{
/* don't set the size for children of wxNotebook, just take the values. */
m_x = x;
if ((old_width != m_width) || (old_height != m_height))
{
/*
- GtkAllocation alloc;
- alloc.x = m_x;
- alloc.y = m_y;
- alloc.width = m_width;
- alloc.height = m_height;
- gtk_widget_size_allocate( m_widget, &alloc );
-*/
+ wxPrintf( _T("On DoSetSize from ") );
+ wxPrintf( GetClassInfo()->GetClassName() );
+ wxPrintf( _T(": %d %d.\n"), m_width, m_height );
+*/
+
gtk_widget_set_usize( m_widget, m_width, m_height );
+
+ /* this is the result of hours of debugging: the followomg code
+ means that if we have a m_wxwindow and we set the size of
+ m_widget, m_widget (which is a GtkScrolledWindow) does NOT
+ automatically propagate its size down to its m_wxwindow,
+ which is its client area. therefore, we have to tell the
+ client area directly that it has to get resize itself */
+ GtkAllocation alloc;
+ alloc.x = m_x;
+ alloc.y = m_y;
+ alloc.width = m_width;
+ alloc.height = m_height;
+ gtk_widget_size_allocate( m_widget, &alloc );
}
+
}
}
{
wxControl::OnSize( event );
+/*
int w = 21;
gtk_widget_set_usize( GTK_COMBO(m_widget)->entry, m_width-w-1, m_height );
gtk_widget_set_uposition( GTK_COMBO(m_widget)->button, m_x+m_width-w, m_y );
gtk_widget_set_usize( GTK_COMBO(m_widget)->button, w, m_height );
+*/
}
void wxComboBox::ApplyWidgetStyle()
m_frameMenuBar->m_height = hh;
gtk_myfixed_move( GTK_MYFIXED(m_mainWidget), m_frameMenuBar->m_widget, xx, yy );
+
+// m_frameMenuBar->m_widget->requisition.width = ww;
+// m_frameMenuBar->m_widget->requisition.height = hh;
gtk_widget_set_usize( m_frameMenuBar->m_widget, ww, hh );
client_area_y_offset += hh;
m_frameToolBar->m_width = ww;
gtk_myfixed_move( GTK_MYFIXED(m_mainWidget), m_frameToolBar->m_widget, xx, yy );
+
+// m_frameToolBar->m_widget->requisition.width = ww;
+// m_frameToolBar->m_widget->requisition.height = hh;
gtk_widget_set_usize( m_frameToolBar->m_widget, ww, hh );
client_area_y_offset += hh;
int client_w = m_width - 2*m_miniEdge;
int client_h = m_height - client_area_y_offset- 2*m_miniEdge - m_miniTitle;
+// m_wxwindow->requisition.width = client_w;
+// m_wxwindow->requisition.height = client_h;
gtk_widget_set_usize( m_wxwindow, client_w, client_h );
+
}
else
{
m_frameStatusBar->m_height = hh;
gtk_myfixed_move( GTK_MYFIXED(m_wxwindow), m_frameStatusBar->m_widget, xx, yy );
+
+// m_frameStatusBar->m_widget->requisition.width = ww;
+// m_frameStatusBar->m_widget->requisition.height = hh;
gtk_widget_set_usize( m_frameStatusBar->m_widget, ww, hh );
}
/* we actually set the size of a frame here and no-where else */
gtk_widget_set_usize( m_widget, m_width, m_height );
-
+
m_sizeSet = TRUE;
/* send size event to frame */
static void gtk_page_size_callback( GtkWidget *WXUNUSED(widget), GtkAllocation* alloc, wxWindow *win )
{
if (g_isIdle) wxapp_install_idle_handler();
-
+
if ((win->m_x == alloc->x) &&
(win->m_y == alloc->y) &&
(win->m_width == alloc->width) &&
myfixed = GTK_MYFIXED (widget);
+/*
requisition->width = 0;
requisition->height = 0;
+*/
+ requisition->width = widget->requisition.width;
+ requisition->height = widget->requisition.height;
children = myfixed->children;
while (children)
g_return_if_fail (allocation != NULL);
myfixed = GTK_MYFIXED (widget);
-
+
widget->allocation = *allocation;
#if (GTK_MINOR_VERSION > 0)
if (myfixed->shadow_type == GTK_SHADOW_NONE)
{
gtk_myfixed_put( GTK_MYFIXED(parent->m_wxwindow),
GTK_WIDGET(child->m_widget),
- child->m_x,
+ child->m_x,
child->m_y );
- gtk_widget_set_usize( GTK_WIDGET(child->m_widget),
+ gtk_widget_set_usize( child->m_widget,
child->m_width,
child->m_height );
-
+
if (parent->m_windowStyle & wxTAB_TRAVERSAL)
{
/* we now allow a window to get the focus as long as it
if (m_resizing) return; /* I don't like recursions */
m_resizing = TRUE;
- if (m_parent->m_wxwindow == NULL) /* i.e. wxNotebook */
+ if (m_parent->m_wxwindow == NULL) /* i.e. wxNotebook page */
{
/* don't set the size for children of wxNotebook, just take the values. */
m_x = x;
if ((old_width != m_width) || (old_height != m_height))
{
/*
- GtkAllocation alloc;
- alloc.x = m_x;
- alloc.y = m_y;
- alloc.width = m_width;
- alloc.height = m_height;
- gtk_widget_size_allocate( m_widget, &alloc );
-*/
+ wxPrintf( _T("On DoSetSize from ") );
+ wxPrintf( GetClassInfo()->GetClassName() );
+ wxPrintf( _T(": %d %d.\n"), m_width, m_height );
+*/
+
gtk_widget_set_usize( m_widget, m_width, m_height );
+
+ /* this is the result of hours of debugging: the followomg code
+ means that if we have a m_wxwindow and we set the size of
+ m_widget, m_widget (which is a GtkScrolledWindow) does NOT
+ automatically propagate its size down to its m_wxwindow,
+ which is its client area. therefore, we have to tell the
+ client area directly that it has to get resize itself */
+ GtkAllocation alloc;
+ alloc.x = m_x;
+ alloc.y = m_y;
+ alloc.width = m_width;
+ alloc.height = m_height;
+ gtk_widget_size_allocate( m_widget, &alloc );
}
+
}
}