]> git.saurik.com Git - wxWidgets.git/commitdiff
Toolbar fixes and weekly catch-up.
authorDavid Webster <Dave.Webster@bhmi.com>
Mon, 8 Jul 2002 18:23:33 +0000 (18:23 +0000)
committerDavid Webster <Dave.Webster@bhmi.com>
Mon, 8 Jul 2002 18:23:33 +0000 (18:23 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@16087 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/os2/button.cpp
src/os2/frame.cpp
src/os2/radiobut.cpp
src/os2/toolbar.cpp
src/os2/wx23.def

index 1a7ab387c0957382b2e3b910e94516fd82189943..46892a89fc769fe17608a0786b09bb0775a2b23b 100644 (file)
@@ -162,13 +162,19 @@ wxSize wxButton::DoGetBestSize() const
     //
     nHeightButton += nHeightChar/1.5;
 
-    wxSize                          vSize = GetDefaultSize();
+    if (!HasFlag(wxBU_EXACTFIT))
+    {
+        wxSize                      vSize = GetDefaultSize();
 
-    if (nWidthButton > vSize.x)
-        vSize.x = nWidthButton;
-    if (nHeightButton > vSize.y)
-        vSize.y = nHeightButton;
-    return vSize;
+        if (nWidthButton > vSize.x)
+            vSize.x = nWidthButton;
+        if (nHeightButton > vSize.y)
+            vSize.y = nHeightButton;
+        return vSize;
+    }
+    return wxSize( nWidthButton
+                  ,nHeightButton
+                 );
 } // end of wxButton::DoGetBestSize
 
 /* static */
index e725d211161f88f3671f7443510ceebbfd50717d..056ce7bc741ce21ad697ad1fea37744b7b8f6d9f 100644 (file)
@@ -1182,7 +1182,7 @@ MRESULT EXPENTRY wxFrameMainWndProc(
                         }
                         else
                         {
-                            pSWP[i].x    = vRectl.xLeft;
+                            pSWP[i].x    = vRectl.xLeft + nWidth;
                             pSWP[i].y    = vRectl.yBottom + nHeight;
                             pSWP[i].cx   = vRectl.xRight - (vRectl.xLeft + nWidth);
                             pSWP[i].cy   = vRectl.yTop - vRectl.yBottom - nHeight;
index f30fb7e20170ffa518d36f692a10f878b8eadd7e..d4cc561bab90567044f0607d78fc7a8a307ec271 100644 (file)
@@ -193,3 +193,26 @@ void wxRadioButton::SetValue(
     ::WinSendMsg((HWND)GetHWND(), BM_SETCHECK, (MPARAM)bValue, (MPARAM)0);
 } // end of wxRadioButton::SetValue
 
+MRESULT wxRadioButton::OS2WindowProc(
+  WXUINT                            uMsg
+, WXWPARAM                          wParam
+, WXLPARAM                          lParam
+)
+{
+    if (uMsg == WM_SETFOCUS)
+    {
+        m_bFocusJustSet = TRUE;
+
+        MRESULT                     mRc = wxControl::OS2WindowProc( uMsg
+                                                                   ,wParam
+                                                                   ,lParam
+                                                                  );
+
+        m_bFocusJustSet = FALSE;
+        return mRc;
+    }
+    return wxControl::OS2WindowProc( uMsg
+                                    ,wParam
+                                    ,lParam
+                                   );
+} // end of wxRadioButton::OS2WindowProc
index e9b5b356822e406d752ca1aeaf683d1b7f656ed7..16261a8feb5ed453cf7ca8e66b90f7ab20858320 100644 (file)
@@ -827,22 +827,39 @@ void wxToolBar::OnPaint (
                                                 );
             int                     nX;
             int                     nY;
-            int                     nHeight;
+            int                     nHeight = 0;
+            int                     nWidth = 0;
 
             vDc.SetPen(vDarkGreyPen);
-            if (HasFlag(wxTB_TEXT) && !pTool->GetLabel().IsEmpty())
+            if (HasFlag(wxTB_TEXT))
             {
-                nX = pTool->m_vX;
-                nY = pTool->m_vY - (m_vTextY - 6);
-                nHeight = (m_vTextY - 2) + pTool->GetHeight();
+                if (HasFlag(wxTB_HORIZONTAL))
+                {
+                    nX = pTool->m_vX;
+                    nY = pTool->m_vY - (m_vTextY - 6);
+                    nHeight = (m_vTextY - 2) + pTool->GetHeight();
+                }
+                else
+                {
+                    nX = pTool->m_vX + m_xMargin + 10;
+                    nY = pTool->m_vY + m_vTextY + m_toolSeparation;
+                    nWidth = pTool->GetWidth() > m_vTextX ? pTool->GetWidth() : m_vTextX;
+                }
             }
             else
             {
                 nX = pTool->m_vX;
                 nY = pTool->m_vY;
-                nHeight = pTool->GetHeight() - 2;
+                if (HasFlag(wxTB_HORIZONTAL))
+                    nHeight = pTool->GetHeight() - 2;
+                else
+                {
+                    nX += m_xMargin + 10;
+                    nY +=  m_yMargin + m_toolSeparation;
+                    nWidth = pTool->GetWidth();
+                }
             }
-            vDc.DrawLine(nX, nY, nX, nY + nHeight);
+            vDc.DrawLine(nX, nY, nX + nWidth, nY + nHeight);
         }
     }
     nCount--;
index b19b91e62038904d555773e1f1f5128e354775ca..e52fc7ac46bad295db7dd55f5b6edf0795a1bc14 100644 (file)
@@ -4,7 +4,7 @@ DATA MULTIPLE NONSHARED READWRITE LOADONCALL
 CODE LOADONCALL
 
 EXPORTS
-;From library:  F:\DEV\WX2\WXWINDOWS\LIB\wx.lib
+;From library:  H:\DEV\WX2\WXWINDOWS\LIB\wx.lib
   ;From object file:  dummy.cpp
     ;PUBDEFs (Symbols available from object file):
       wxDummyChar
@@ -1946,7 +1946,7 @@ EXPORTS
       wxEVT_NC_LEFT_DCLICK
       wxEVT_INIT_DIALOG
       wxEVT_COMMAND_SET_FOCUS
-  ;From object file:  F:\DEV\WX2\WXWINDOWS\src\common\extended.c
+  ;From object file:  H:\DEV\WX2\WXWINDOWS\src\common\extended.c
     ;PUBDEFs (Symbols available from object file):
       ConvertToIeeeExtended
       ConvertFromIeeeExtended
@@ -6150,7 +6150,7 @@ EXPORTS
       Read32__17wxTextInputStreamFv
       ;wxTextInputStream::SkipIfEndOfLine(char)
       SkipIfEndOfLine__17wxTextInputStreamFc
-  ;From object file:  F:\DEV\WX2\WXWINDOWS\src\common\unzip.c
+  ;From object file:  H:\DEV\WX2\WXWINDOWS\src\common\unzip.c
     ;PUBDEFs (Symbols available from object file):
       unzReadCurrentFile
       unzGetCurrentFileInfo
@@ -13925,6 +13925,8 @@ EXPORTS
       SetValue__13wxRadioButtonFUl
       ;wxRadioButton::GetValue() const
       GetValue__13wxRadioButtonCFv
+      ;wxRadioButton::OS2WindowProc(unsigned int,void*,void*)
+      OS2WindowProc__13wxRadioButtonFUiPvT2
   ;From object file:  ..\os2\region.cpp
     ;PUBDEFs (Symbols available from object file):
       ;wxRegion::Combine(const wxRect&,wxRegionOp)