#include "copy.xpm"
-#ifdef __WXUNIVERSAL__
- #include "wx/univ/theme.h"
-
- WX_USE_THEME(win32);
- WX_USE_THEME(gtk);
-#endif // __WXUNIVERSAL__
-
// ----------------------------------------------------------------------------
// classes
// ----------------------------------------------------------------------------
if ( title )
{
- title->Printf("Dummy menu &%d", ++m_countDummy);
+ title->Printf(wxT("Dummy menu &%d"), ++m_countDummy);
}
return menu;
wxMenuItemList::Node *node = menu->GetMenuItems().GetLast();
if ( !node )
{
- wxLogWarning("No last item in the last menu!");
+ wxLogWarning(wxT("No last item in the last menu!"));
return NULL;
}
if ( !GetMenuBar()->FindItem(id) )
return;
- wxString msg = wxString::Format("Menu command %d", id);
+ wxString msg = wxString::Format(wxT("Menu command %d"), id);
if ( GetMenuBar()->FindItem(id)->IsCheckable() )
{
- msg += wxString::Format(" (the item is currently %schecked)",
+ msg += wxString::Format(wxT(" (the item is currently %schecked)"),
event.IsChecked() ? "" : "not ");
}
void MyFrame::OnAbout(wxCommandEvent& WXUNUSED(event))
{
-#ifdef __WXUNIVERSAL__
- // wxMessageBox not implemented yet
- wxLogMessage("wxWindows menu sample\n© 1999-2001 Vadim Zeitlin");
-#else
(void)wxMessageBox("wxWindows menu sample\n© 1999-2001 Vadim Zeitlin",
"About wxWindows menu sample",
wxICON_INFORMATION);
-#endif
}
void MyFrame::OnDeleteMenu(wxCommandEvent& WXUNUSED(event))
if ( count == 2 )
{
// don't let delete the first 2 menus
- wxLogError("Can't delete any more menus");
+ wxLogError(wxT("Can't delete any more menus"));
}
else
{
wxMenuBar *mbar = GetMenuBar();
size_t count = mbar->GetMenuCount();
- wxLogMessage("The label of the last menu item is '%s'",
+ wxLogMessage(wxT("The label of the last menu item is '%s'"),
mbar->GetLabelTop(count - 1).c_str());
}
void MyFrame::OnDummy(wxCommandEvent& event)
{
- wxLogMessage("Dummy item #%d", event.GetId() - Menu_Dummy_First + 1);
+ wxLogMessage(wxT("Dummy item #%d"), event.GetId() - Menu_Dummy_First + 1);
}
void MyFrame::OnAppendMenuItem(wxCommandEvent& WXUNUSED(event))
size_t count = menu->GetMenuItemCount();
if ( !count )
{
- wxLogWarning("No items to delete!");
+ wxLogWarning(wxT("No items to delete!"));
}
else
{
if ( item )
{
- wxLogMessage("The label of the last menu item is '%s'",
+ wxLogMessage(wxT("The label of the last menu item is '%s'"),
item->GetLabel().c_str());
}
}