]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/framecmn.cpp
Hopefully fixed library names generated by wx-config for OS/2's PM port.
[wxWidgets.git] / src / common / framecmn.cpp
index bdd5dc26d1649e8c1ee4f40b80a0fb254bad5bca..ae37a7fbd87e286eb8229e579461146c443053ae 100644 (file)
@@ -176,6 +176,15 @@ wxPoint wxFrameBase::GetClientAreaOrigin() const
     return pt;
 }
 
+
+void wxFrameBase::SendSizeEvent()
+{
+    wxSizeEvent event( GetSize(), GetId() );
+    event.SetEventObject( this );
+    GetEventHandler()->AddPendingEvent( event );
+}
+
+
 // ----------------------------------------------------------------------------
 // misc
 // ----------------------------------------------------------------------------
@@ -196,6 +205,9 @@ bool wxFrameBase::ProcessCommand(int id)
         if (!item->IsEnabled())
             return true;
 
+        if ((item->GetKind() == wxITEM_RADIO) && item->IsChecked() )
+            return true;
+
         if (item->IsCheckable())
         {
             item->Toggle();
@@ -267,7 +279,7 @@ void wxFrameBase::OnMenuOpen(wxMenuEvent& WXUNUSED(event))
 void wxFrameBase::OnMenuClose(wxMenuEvent& WXUNUSED(event))
 {
     // do we have real status text to restore?
-    if ( m_oldStatusText.length() > 1 || m_oldStatusText[0u] )
+    if ( !m_oldStatusText.empty() )
     {
         if ( m_statusBarPane >= 0 )
         {
@@ -378,7 +390,7 @@ bool wxFrameBase::ShowMenuHelp(wxStatusBar *WXUNUSED(statbar), int menuId)
 
     DoGiveHelp(helpString, show);
 
-    return !helpString.IsEmpty();
+    return !helpString.empty();
 #else // !wxUSE_MENUS
     return false;
 #endif // wxUSE_MENUS/!wxUSE_MENUS
@@ -480,9 +492,15 @@ wxToolBar* wxFrameBase::OnCreateToolBar(long style,
                                         wxWindowID id,
                                         const wxString& name)
 {
+#if defined(__WXWINCE__) && defined(__POCKETPC__)
+    return new wxToolMenuBar(this, id,
+                         wxDefaultPosition, wxDefaultSize,
+                         style, name);
+#else
     return new wxToolBar(this, id,
                          wxDefaultPosition, wxDefaultSize,
                          style, name);
+#endif
 }
 
 void wxFrameBase::SetToolBar(wxToolBar *toolbar)
@@ -554,3 +572,12 @@ void wxFrameBase::SetMenuBar(wxMenuBar *menubar)
 }
 
 #endif // wxUSE_MENUS
+
+#if WXWIN_COMPATIBILITY_2_2
+
+bool wxFrameBase::Command(int winid)
+{
+    return ProcessCommand(winid);
+}
+
+#endif // WXWIN_COMPATIBILITY_2_2