#include "wx/dcclient.h"
#include <glib.h>
-#include <gdk/gdk.h>
-#include <gtk/gtk.h>
+#include "wx/gtk/private.h"
+
#include <gdk/gdkkeysyms.h>
#include <gdk/gdkx.h>
skip the part which handles m_frameMenuBar, m_frameToolBar and (most
importantly) m_mainWidget */
- if ((m_minWidth != -1) && (m_width < m_minWidth)) m_width = m_minWidth;
- if ((m_minHeight != -1) && (m_height < m_minHeight)) m_height = m_minHeight;
- if ((m_maxWidth != -1) && (m_width > m_maxWidth)) m_width = m_maxWidth;
- if ((m_maxHeight != -1) && (m_height > m_maxHeight)) m_height = m_maxHeight;
+ int minWidth = GetMinWidth(),
+ minHeight = GetMinHeight(),
+ maxWidth = GetMaxWidth(),
+ maxHeight = GetMaxHeight();
+
+ if ((minWidth != -1) && (m_width < minWidth)) m_width = minWidth;
+ if ((minHeight != -1) && (m_height < minHeight)) m_height = minHeight;
+ if ((maxWidth != -1) && (m_width > maxWidth)) m_width = maxWidth;
+ if ((maxHeight != -1) && (m_height > maxHeight)) m_height = maxHeight;
if (m_mainWidget)
{
/* set size hints */
gint flag = 0; // GDK_HINT_POS;
- if ((m_minWidth != -1) || (m_minHeight != -1)) flag |= GDK_HINT_MIN_SIZE;
- if ((m_maxWidth != -1) || (m_maxHeight != -1)) flag |= GDK_HINT_MAX_SIZE;
+ if ((minWidth != -1) || (minHeight != -1)) flag |= GDK_HINT_MIN_SIZE;
+ if ((maxWidth != -1) || (maxHeight != -1)) flag |= GDK_HINT_MAX_SIZE;
GdkGeometry geom;
- geom.min_width = m_minWidth;
- geom.min_height = m_minHeight;
- geom.max_width = m_maxWidth;
- geom.max_height = m_maxHeight;
+ geom.min_width = minWidth;
+ geom.min_height = minHeight;
+ geom.max_width = maxWidth;
+ geom.max_height = maxHeight;
gtk_window_set_geometry_hints( GTK_WINDOW(m_widget),
(GtkWidget*) NULL,
&geom,
GTK_SIGNAL_FUNC(gtk_menu_detached_callback), (gpointer)this );
}
- gtk_container_remove( GTK_CONTAINER(m_mainWidget), m_frameMenuBar->m_widget );
gtk_widget_ref( m_frameMenuBar->m_widget );
- gtk_widget_unparent( m_frameMenuBar->m_widget );
+
+ gtk_container_remove( GTK_CONTAINER(m_mainWidget), m_frameMenuBar->m_widget );
}
wxFrameBase::DetachMenuBar();
m_frameMenuBar->Show( TRUE );
}
- /* resize window in OnInternalIdle */
+ // resize window in OnInternalIdle
m_sizeSet = FALSE;
}
if (m_frameToolBar)
{
- /* insert into toolbar area if not already there */
+ // insert into toolbar area if not already there
if ((m_frameToolBar->m_widget->parent) &&
(m_frameToolBar->m_widget->parent != m_mainWidget))
{