else
gtk_window_set_policy(GTK_WINDOW(win->m_widget), 1, 1, 1);
+ /* set size hints */
+ gint flag = GDK_HINT_POS;
+ if ((win->GetMinWidth() != -1) || (win->GetMinHeight() != -1)) flag |= GDK_HINT_MIN_SIZE;
+ if ((win->GetMaxWidth() != -1) || (win->GetMaxHeight() != -1)) flag |= GDK_HINT_MAX_SIZE;
+ if (flag)
+ {
+ gdk_window_set_hints( win->m_widget->window,
+ win->m_x, win->m_y,
+ win->GetMinWidth(), win->GetMinHeight(),
+ win->GetMaxWidth(), win->GetMaxHeight(),
+ flag );
+ }
+
/* reset the icon */
if (win->m_icon != wxNullIcon)
{
return new wxToolBar( this, id, wxDefaultPosition, wxDefaultSize, style, name );
}
+void wxFrame::SetToolBar(wxToolBar *toolbar)
+{
+ m_frameToolBar = toolbar;
+ if (m_frameToolBar)
+ {
+ /* insert into toolbar area if not already there */
+ if (m_frameToolBar->m_widget->parent != m_mainWidget)
+ {
+ gtk_widget_ref( m_frameToolBar->m_widget );
+ gtk_widget_unparent( m_frameToolBar->m_widget );
+
+ m_insertInClientArea = TRUE;
+ wxInsertChildInFrame( this, m_frameToolBar );
+ m_insertInClientArea = FALSE;
+
+ gtk_widget_unref( m_frameToolBar->m_widget );
+ }
+ }
+}
+
wxToolBar *wxFrame::GetToolBar() const
{
return m_frameToolBar;