+
+void wxMenu::ChangeFont(bool keepOriginalSize)
+{
+ // Lesstif 0.87 hangs here, but 0.93 does not
+#if !wxCHECK_LESSTIF() || wxCHECK_LESSTIF_VERSION( 0, 93 )
+ if (!m_font.Ok() || !m_menuWidget)
+ return;
+
+ WXFontType fontType = m_font.GetFontType(XtDisplay((Widget) m_menuWidget));
+
+ XtVaSetValues ((Widget) m_menuWidget,
+ wxFont::GetFontTag(), fontType,
+ NULL);
+ if (m_buttonWidget)
+ {
+ XtVaSetValues ((Widget) m_buttonWidget,
+ wxFont::GetFontTag(), fontType,
+ NULL);
+ }
+
+ for ( wxMenuItemList::compatibility_iterator node = GetMenuItems().GetFirst();
+ node;
+ node = node->GetNext() )
+ {
+ wxMenuItem* item = node->GetData();
+ if (m_menuWidget && item->GetButtonWidget() && m_font.Ok())
+ {
+ XtVaSetValues ((Widget) item->GetButtonWidget(),
+ wxFont::GetFontTag(), fontType,
+ NULL);
+ }
+ if (item->GetSubMenu())
+ item->GetSubMenu()->ChangeFont(keepOriginalSize);
+ }
+#endif
+}
+
+void wxMenu::SetFont(const wxFont& font)
+{
+ m_font = font;
+ ChangeFont();
+}
+
+bool wxMenuBar::SetBackgroundColour(const wxColour& col)
+{
+ m_backgroundColour = col;
+ if (m_mainWidget)
+ wxDoChangeBackgroundColour(m_mainWidget, (wxColour&) col);
+
+ size_t menuCount = GetMenuCount();
+ for (size_t i = 0; i < menuCount; i++)
+ m_menus.Item(i)->GetData()->SetBackgroundColour((wxColour&) col);
+
+ return TRUE;
+}
+
+bool wxMenuBar::SetForegroundColour(const wxColour& col)
+{
+ m_foregroundColour = col;
+ if (m_mainWidget)
+ wxDoChangeForegroundColour(m_mainWidget, (wxColour&) col);
+
+ size_t menuCount = GetMenuCount();
+ for (size_t i = 0; i < menuCount; i++)
+ m_menus.Item(i)->GetData()->SetForegroundColour((wxColour&) col);
+
+ return TRUE;
+}
+
+void wxMenuBar::ChangeFont(bool WXUNUSED(keepOriginalSize))
+{
+ // Nothing to do for menubar, fonts are kept in wxMenus
+}
+
+bool wxMenuBar::SetFont(const wxFont& font)
+{
+ m_font = font;
+ ChangeFont();
+
+ size_t menuCount = GetMenuCount();
+ for (size_t i = 0; i < menuCount; i++)
+ m_menus.Item(i)->GetData()->SetFont(font);
+
+ return TRUE;
+}
+