]> git.saurik.com Git - wxWidgets.git/blobdiff - src/os2/frame.cpp
Make sure text part of combobox is enabled/disabled too
[wxWidgets.git] / src / os2 / frame.cpp
index 96743fc97989fc92e1a7530cbbafcbd145d6573c..a4258e5af630eb91e94daf6f096cb0f9e30a12e9 100644 (file)
@@ -51,7 +51,6 @@
 // globals
 // ----------------------------------------------------------------------------
 
-extern wxWindowList wxModelessWindows;
 extern wxList WXDLLEXPORT wxPendingDelete;
 
 #if wxUSE_MENUS_NATIVE
@@ -142,7 +141,6 @@ bool wxFrame::Create(
                                   ,rsName
                                  ))
         return FALSE;
-    wxModelessWindows.Append(this);
     return TRUE;
 } // end of wxFrame::Create
 
@@ -173,15 +171,13 @@ void wxFrame::DoGetClientSize(
 
 //
 // Set the client size (i.e. leave the calculation of borders etc.
-// to wxWindows)
+// to wxWidgets)
 //
 void wxFrame::DoSetClientSize(
   int                               nWidth
 , int                               nHeight
 )
 {
-    wxStatusBar*                    pStatusBar = GetStatusBar();
-
     //
     // Statusbars are not part of the OS/2 Client but parent frame
     // so no statusbar consideration
@@ -217,8 +213,6 @@ wxStatusBar* wxFrame::OnCreateStatusBar(
 )
 {
     wxStatusBar*                    pStatusBar = NULL;
-    SWP                             vSwp;
-    ERRORID                         vError;
     wxString                        sError;
 
     pStatusBar = wxFrameBase::OnCreateStatusBar( nNumber
@@ -237,7 +231,7 @@ wxStatusBar* wxFrame::OnCreateStatusBar(
     // Set the height according to the font and the border size
     //
     vDC.SetFont(pStatusBar->GetFont()); // Screws up the menues for some reason
-    vDC.GetTextExtent( "X"
+    vDC.GetTextExtent( wxT("X")
                       ,NULL
                       ,&nY
                      );
@@ -281,7 +275,6 @@ void wxFrame::PositionStatusBar()
         int                         nY;
         int                         nStatbarWidth;
         int                         nStatbarHeight;
-        HWND                        hWndClient;
         RECTL                       vRect;
         RECTL                       vFRect;
 
@@ -311,7 +304,7 @@ void wxFrame::PositionStatusBar()
         {
             vError = ::WinGetLastError(vHabmain);
             sError = wxPMErrorToStr(vError);
-            wxLogError("Error setting parent for StautsBar. Error: %s\n", sError.c_str());
+            wxLogError(_T("Error setting parent for StautsBar. Error: %s\n"), sError.c_str());
             return;
         }
     }
@@ -355,17 +348,7 @@ void wxFrame::SetMenuBar(
   wxMenuBar*                        pMenuBar
 )
 {
-    ERRORID                         vError;
     wxString                        sError;
-    HWND                            hTitlebar = NULLHANDLE;
-    HWND                            hHScroll = NULLHANDLE;
-    HWND                            hVScroll = NULLHANDLE;
-    HWND                            hMenuBar = NULLHANDLE;
-    SWP                             vSwp;
-    SWP                             vSwpTitlebar;
-    SWP                             vSwpVScroll;
-    SWP                             vSwpHScroll;
-    SWP                             vSwpMenu;
 
     if (!pMenuBar)
     {
@@ -384,7 +367,7 @@ void wxFrame::SetMenuBar(
         //
         // Can set a menubar several times.
         // TODO: how to prevent a memory leak if you have a currently-unattached
-        // menubar? wxWindows assumes that the frame will delete the menu (otherwise
+        // menubar? wxWidgets assumes that the frame will delete the menu (otherwise
         // there are problems for MDI).
         //
         if (pMenuBar->GetHMenu())
@@ -454,14 +437,14 @@ void wxFrame::InternalSetMenuBar()
     {
         vError = ::WinGetLastError(vHabmain);
         sError = wxPMErrorToStr(vError);
-        wxLogError("Error setting parent for submenu. Error: %s\n", sError.c_str());
+        wxLogError(_T("Error setting parent for submenu. Error: %s\n"), sError.c_str());
     }
 
     if (!::WinSetOwner(m_hMenu, m_hFrame))
     {
         vError = ::WinGetLastError(vHabmain);
         sError = wxPMErrorToStr(vError);
-        wxLogError("Error setting parent for submenu. Error: %s\n", sError.c_str());
+        wxLogError(_T("Error setting parent for submenu. Error: %s\n"), sError.c_str());
     }
     ::WinSendMsg(m_hFrame, WM_UPDATEFRAME, (MPARAM)FCF_MENU, (MPARAM)0);
 } // end of wxFrame::InternalSetMenuBar
@@ -738,10 +721,8 @@ void wxFrame::PositionToolBar()
     if (!pToolBar)
         return;
 
-    HWND                            hWndClient;
     RECTL                           vRect;
     RECTL                           vFRect;
-    SWP                             vSwp;
     wxPoint                         vPos;
 
     ::WinQueryWindowRect(m_hFrame, &vRect);
@@ -798,6 +779,10 @@ void wxFrame::IconizeChildFrames(
   bool                              bIconize
 )
 {
+  // FIXME: Generic MDI does not use Frames for the Childs, so this does _not_
+  //        work. Possibly, the right thing is simply to eliminate this
+  //        functions and all the calls to it from within this file.
+#if 0
     for (wxWindowList::Node* pNode = GetChildren().GetFirst();
          pNode;
          pNode = pNode->GetNext() )
@@ -829,6 +814,7 @@ void wxFrame::IconizeChildFrames(
                 pFrame->Iconize(bIconize);
         }
     }
+#endif
 } // end of wxFrame::IconizeChildFrames
 
 WXHICON wxFrame::GetDefaultIcon() const
@@ -899,7 +885,6 @@ bool wxFrame::HandlePaint()
 
             if (hIcon)
             {
-                HWND                            hWndClient;
                 RECTL                           vRect3;
 
                 ::WinQueryWindowRect(GetHwnd(), &vRect3);
@@ -1227,7 +1212,6 @@ MRESULT EXPENTRY wxFrameWndProc(
     //
 
     MRESULT                         rc = (MRESULT)0;
-    bool                            bProcessed = FALSE;
 
     //
     // Stop right here if we don't have a valid handle in our wxWindow object.
@@ -1325,8 +1309,6 @@ MRESULT wxFrame::OS2WindowProc(
 
         case WM_SIZE:
             {
-                SHORT               nScxold = SHORT1FROMMP(wParam); // Old horizontal size.
-                SHORT               nScyold = SHORT2FROMMP(wParam); // Old vertical size.
                 SHORT               nScxnew = SHORT1FROMMP(lParam); // New horizontal size.
                 SHORT               nScynew = SHORT2FROMMP(lParam); // New vertical size.