// Created: 01/02/97
// Id:
// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem
-// Licence: wxWindows licence
+// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifdef __GNUG__
IMPLEMENT_DYNAMIC_CLASS(wxFrame,wxWindow)
-wxFrame::wxFrame(void)
+wxFrame::wxFrame()
{
m_doingOnSize = FALSE;
m_frameMenuBar = NULL;
return TRUE;
};
-wxFrame::~wxFrame(void)
+wxFrame::~wxFrame()
{
if (m_frameMenuBar) delete m_frameMenuBar;
if (m_frameStatusBar) delete m_frameStatusBar;
}
};
-bool wxFrame::Destroy(void)
+bool wxFrame::Destroy()
{
if (!wxPendingDelete.Member(this))
wxPendingDelete.Append(this);
while (node)
{
wxMenuItem *menuitem = (wxMenuItem*)node->Data();
- if (menuitem->m_isSubMenu) SetInvokingWindow( menuitem->m_subMenu, win );
+ if (menuitem->IsSubMenu())
+ SetInvokingWindow( menuitem->GetSubMenu(), win );
node = node->Next();
};
};
if (m_frameStatusBar) m_frameStatusBar->SetStatusWidths( n, width );
};
-wxStatusBar *wxFrame::GetStatusBar(void)
+wxStatusBar *wxFrame::GetStatusBar()
{
return m_frameStatusBar;
};
-wxMenuBar *wxFrame::GetMenuBar(void)
+wxMenuBar *wxFrame::GetMenuBar()
{
return m_frameMenuBar;
};
gtk_window_set_title( GTK_WINDOW(m_widget), title );
};
-wxString wxFrame::GetTitle(void) const
+void wxFrame::SetSizeHints(int minW, int minH, int maxW, int maxH, int incW)
{
- return (wxString&)m_title;
-};
-
-void wxFrame::OnIdle(wxIdleEvent& WXUNUSED(event))
-{
- DoMenuUpdates();
-}
-
-// Query app for menu item updates (called from OnIdle)
-void wxFrame::DoMenuUpdates(void)
-{
- wxMenuBar* bar = GetMenuBar();
- if (!bar) return;
-
- wxNode *node = bar->m_menus.First();
- while (node)
- {
- wxMenu* menu = (wxMenu*)node->Data();
- DoMenuUpdates(menu);
-
- node = node->Next();
- };
+ // VZ: I don't know a way to set the max size for the window in GTK and have
+ // no idea about what incW might be
+ gtk_widget_set_usize(m_widget, minW, minH);
}
-void wxFrame::DoMenuUpdates(wxMenu* menu)
-{
- wxNode* node = menu->m_items.First();
- while (node)
- {
- wxMenuItem* item = (wxMenuItem*) node->Data();
- if ( !item->IsSeparator() )
- {
- wxWindowID id = item->GetId();
- wxUpdateUIEvent event(id);
- event.SetEventObject( this );
-
- if (GetEventHandler()->ProcessEvent(event))
- {
- if (event.GetSetText())
- menu->SetLabel(id, event.GetText());
- if (event.GetSetChecked())
- menu->Check(id, event.GetChecked());
- if (event.GetSetEnabled())
- menu->Enable(id, event.GetEnabled());
- }
-
- if (item->GetSubMenu())
- DoMenuUpdates(item->GetSubMenu());
- }
- node = node->Next();
- }
-}
-
-
+#include "../common/framecmn.cpp"
// Created: 01/02/97
// Id:
// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem
-// Licence: wxWindows licence
+// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifdef __GNUG__
IMPLEMENT_DYNAMIC_CLASS(wxFrame,wxWindow)
-wxFrame::wxFrame(void)
+wxFrame::wxFrame()
{
m_doingOnSize = FALSE;
m_frameMenuBar = NULL;
return TRUE;
};
-wxFrame::~wxFrame(void)
+wxFrame::~wxFrame()
{
if (m_frameMenuBar) delete m_frameMenuBar;
if (m_frameStatusBar) delete m_frameStatusBar;
}
};
-bool wxFrame::Destroy(void)
+bool wxFrame::Destroy()
{
if (!wxPendingDelete.Member(this))
wxPendingDelete.Append(this);
while (node)
{
wxMenuItem *menuitem = (wxMenuItem*)node->Data();
- if (menuitem->m_isSubMenu) SetInvokingWindow( menuitem->m_subMenu, win );
+ if (menuitem->IsSubMenu())
+ SetInvokingWindow( menuitem->GetSubMenu(), win );
node = node->Next();
};
};
if (m_frameStatusBar) m_frameStatusBar->SetStatusWidths( n, width );
};
-wxStatusBar *wxFrame::GetStatusBar(void)
+wxStatusBar *wxFrame::GetStatusBar()
{
return m_frameStatusBar;
};
-wxMenuBar *wxFrame::GetMenuBar(void)
+wxMenuBar *wxFrame::GetMenuBar()
{
return m_frameMenuBar;
};
gtk_window_set_title( GTK_WINDOW(m_widget), title );
};
-wxString wxFrame::GetTitle(void) const
+void wxFrame::SetSizeHints(int minW, int minH, int maxW, int maxH, int incW)
{
- return (wxString&)m_title;
-};
-
-void wxFrame::OnIdle(wxIdleEvent& WXUNUSED(event))
-{
- DoMenuUpdates();
-}
-
-// Query app for menu item updates (called from OnIdle)
-void wxFrame::DoMenuUpdates(void)
-{
- wxMenuBar* bar = GetMenuBar();
- if (!bar) return;
-
- wxNode *node = bar->m_menus.First();
- while (node)
- {
- wxMenu* menu = (wxMenu*)node->Data();
- DoMenuUpdates(menu);
-
- node = node->Next();
- };
+ // VZ: I don't know a way to set the max size for the window in GTK and have
+ // no idea about what incW might be
+ gtk_widget_set_usize(m_widget, minW, minH);
}
-void wxFrame::DoMenuUpdates(wxMenu* menu)
-{
- wxNode* node = menu->m_items.First();
- while (node)
- {
- wxMenuItem* item = (wxMenuItem*) node->Data();
- if ( !item->IsSeparator() )
- {
- wxWindowID id = item->GetId();
- wxUpdateUIEvent event(id);
- event.SetEventObject( this );
-
- if (GetEventHandler()->ProcessEvent(event))
- {
- if (event.GetSetText())
- menu->SetLabel(id, event.GetText());
- if (event.GetSetChecked())
- menu->Check(id, event.GetChecked());
- if (event.GetSetEnabled())
- menu->Enable(id, event.GetEnabled());
- }
-
- if (item->GetSubMenu())
- DoMenuUpdates(item->GetSubMenu());
- }
- node = node->Next();
- }
-}
-
-
+#include "../common/framecmn.cpp"