void gtk_pizza_scroll (GtkPizza *pizza,
gint dx,
gint dy);
+
+gint gtk_pizza_child_resized (GtkPizza *pizza,
+ GtkWidget *widget);
void gtk_pizza_put (GtkPizza *pizza,
GtkWidget *widget,
void gtk_pizza_scroll (GtkPizza *pizza,
gint dx,
gint dy);
+
+gint gtk_pizza_child_resized (GtkPizza *pizza,
+ GtkWidget *widget);
void gtk_pizza_put (GtkPizza *pizza,
GtkWidget *widget,
{
// using constraints doesn't work under GTK - the calendar window is never
// repainted after it had been moved at least once!
-#if 0
+#if 1
SetAutoLayout(TRUE);
wxString date;
win->m_width = alloc->width;
win->m_height = alloc->height;
+ win->m_queuedFullRedraw = TRUE;
win->GtkUpdateSize();
}
}
m_menuBarDetached = FALSE;
m_toolBarDetached = FALSE;
m_insertInClientArea = TRUE;
- m_isFrame = TRUE;
+ m_isFrame = FALSE;
}
bool wxFrame::Create( wxWindow *parent,
wxTopLevelWindows.Append( this );
m_needParent = FALSE;
+ m_isFrame = TRUE;
if (!PreCreation( parent, pos, size ) ||
!CreateBase( parent, id, pos, size, style, wxDefaultValidator, name ))
}
}
+gint
+gtk_pizza_child_resized (GtkPizza *pizza,
+ GtkWidget *widget)
+{
+ GtkPizzaChild *child;
+ GList *children;
+
+ g_return_val_if_fail (pizza != NULL, FALSE);
+ g_return_val_if_fail (GTK_IS_PIZZA (pizza), FALSE);
+ g_return_val_if_fail (widget != NULL, FALSE);
+
+ children = pizza->children;
+ while (children)
+ {
+ child = children->data;
+ children = children->next;
+
+ if (child->widget == widget)
+ {
+ return ((child->width == widget->allocation.width) &&
+ (child->height == widget->allocation.height));
+ }
+ }
+
+ return FALSE;
+}
+
static void
gtk_pizza_map (GtkWidget *widget)
{
#include <gtk/gtk.h>
#include <gdk/gdkprivate.h>
#include <gdk/gdkkeysyms.h>
-#include <wx/gtk/win_gtk.h>
-
#include <gdk/gdkx.h>
+#include <gtk/gtk.h>
+#include <gtk/gtkprivate.h>
+
+#include "wx/gtk/win_gtk.h"
+
//-----------------------------------------------------------------------------
// documentation on internals
//-----------------------------------------------------------------------------
wxapp_install_idle_handler();
/*
- if (win->GetName() == wxT("status_line"))
+ if (win->GetName() == wxT("panel"))
{
wxPrintf( wxT("OnExpose from ") );
if (win->GetClassInfo() && win->GetClassInfo()->GetClassName())
wxapp_install_idle_handler();
/*
- if (win->GetName() == wxT("status_line"))
+ if (win->GetName() == wxT("panel"))
{
wxPrintf( wxT("OnDraw from ") );
if (win->GetClassInfo() && win->GetClassInfo()->GetClassName())
if (!win->m_queuedFullRedraw)
{
+
if (!(GTK_WIDGET_APP_PAINTABLE (widget)) &&
(pizza->clear_on_draw))
{
the actual size of window, in which case all expose events that resulted
from resizing the window have been sent (and discarded) and we can
now do our full redraw and switch on expose event handling again. */
-
- if ((m_width == m_widget->allocation.width) && (m_height == m_widget->allocation.height))
+
+ bool child_already_resized = FALSE;
+ if (m_isFrame)
+ child_already_resized = gtk_pizza_child_resized( GTK_PIZZA(m_wxwindow->parent), m_wxwindow );
+ else
+ child_already_resized = gtk_pizza_child_resized( GTK_PIZZA(m_widget->parent), m_widget );
+
+ if (child_already_resized)
{
m_queuedFullRedraw = FALSE;
m_updateRegion.Clear();
win->m_width = alloc->width;
win->m_height = alloc->height;
+ win->m_queuedFullRedraw = TRUE;
win->GtkUpdateSize();
}
}
m_menuBarDetached = FALSE;
m_toolBarDetached = FALSE;
m_insertInClientArea = TRUE;
- m_isFrame = TRUE;
+ m_isFrame = FALSE;
}
bool wxFrame::Create( wxWindow *parent,
wxTopLevelWindows.Append( this );
m_needParent = FALSE;
+ m_isFrame = TRUE;
if (!PreCreation( parent, pos, size ) ||
!CreateBase( parent, id, pos, size, style, wxDefaultValidator, name ))
}
}
+gint
+gtk_pizza_child_resized (GtkPizza *pizza,
+ GtkWidget *widget)
+{
+ GtkPizzaChild *child;
+ GList *children;
+
+ g_return_val_if_fail (pizza != NULL, FALSE);
+ g_return_val_if_fail (GTK_IS_PIZZA (pizza), FALSE);
+ g_return_val_if_fail (widget != NULL, FALSE);
+
+ children = pizza->children;
+ while (children)
+ {
+ child = children->data;
+ children = children->next;
+
+ if (child->widget == widget)
+ {
+ return ((child->width == widget->allocation.width) &&
+ (child->height == widget->allocation.height));
+ }
+ }
+
+ return FALSE;
+}
+
static void
gtk_pizza_map (GtkWidget *widget)
{
#include <gtk/gtk.h>
#include <gdk/gdkprivate.h>
#include <gdk/gdkkeysyms.h>
-#include <wx/gtk/win_gtk.h>
-
#include <gdk/gdkx.h>
+#include <gtk/gtk.h>
+#include <gtk/gtkprivate.h>
+
+#include "wx/gtk/win_gtk.h"
+
//-----------------------------------------------------------------------------
// documentation on internals
//-----------------------------------------------------------------------------
wxapp_install_idle_handler();
/*
- if (win->GetName() == wxT("status_line"))
+ if (win->GetName() == wxT("panel"))
{
wxPrintf( wxT("OnExpose from ") );
if (win->GetClassInfo() && win->GetClassInfo()->GetClassName())
wxapp_install_idle_handler();
/*
- if (win->GetName() == wxT("status_line"))
+ if (win->GetName() == wxT("panel"))
{
wxPrintf( wxT("OnDraw from ") );
if (win->GetClassInfo() && win->GetClassInfo()->GetClassName())
if (!win->m_queuedFullRedraw)
{
+
if (!(GTK_WIDGET_APP_PAINTABLE (widget)) &&
(pizza->clear_on_draw))
{
the actual size of window, in which case all expose events that resulted
from resizing the window have been sent (and discarded) and we can
now do our full redraw and switch on expose event handling again. */
-
- if ((m_width == m_widget->allocation.width) && (m_height == m_widget->allocation.height))
+
+ bool child_already_resized = FALSE;
+ if (m_isFrame)
+ child_already_resized = gtk_pizza_child_resized( GTK_PIZZA(m_wxwindow->parent), m_wxwindow );
+ else
+ child_already_resized = gtk_pizza_child_resized( GTK_PIZZA(m_widget->parent), m_widget );
+
+ if (child_already_resized)
{
m_queuedFullRedraw = FALSE;
m_updateRegion.Clear();