]> git.saurik.com Git - wxWidgets.git/commitdiff
Support for scrolling
authorDavid Webster <Dave.Webster@bhmi.com>
Mon, 7 May 2001 04:17:46 +0000 (04:17 +0000)
committerDavid Webster <Dave.Webster@bhmi.com>
Mon, 7 May 2001 04:17:46 +0000 (04:17 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@10030 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/os2/window.h
src/os2/frame.cpp
src/os2/window.cpp
src/os2/wx23.def

index 9d22bad4e7d32150791071e62f09d92ee9b6486e..a3f195f75546f37e8a9bc424430c0cb418bc3fcc 100644 (file)
@@ -552,6 +552,8 @@ private:
     DECLARE_NO_COPY_CLASS(wxWindow);
     DECLARE_EVENT_TABLE()
 private:
     DECLARE_NO_COPY_CLASS(wxWindow);
     DECLARE_EVENT_TABLE()
 private:
+    HWND                            m_hWndScrollBar;
+
     // Virtual function hiding supression
     inline virtual bool Reparent(wxWindowBase* pNewParent)
     { return(wxWindowBase::Reparent(pNewParent));};
     // Virtual function hiding supression
     inline virtual bool Reparent(wxWindowBase* pNewParent)
     { return(wxWindowBase::Reparent(pNewParent));};
index 67201d59d7591a50dda5cac9109f03b3ff167fed..98ae3305e0fd968b6b1689301de329d6cf071f56 100644 (file)
@@ -1192,12 +1192,12 @@ void wxFrame::PositionToolBar()
     }
 #endif // wxUSE_STATUSBAR
 
     }
 #endif // wxUSE_STATUSBAR
 
-    if ( GetToolBar() )
+    if ( m_frameToolBar )
     {
         int                         nToolbarWidth;
         int                         nToolbarHeight;
 
     {
         int                         nToolbarWidth;
         int                         nToolbarHeight;
 
-        GetToolBar()->GetSize( &nToolbarWidth
+        m_frameToolBar->GetSize( &nToolbarWidth
                               ,&nToolbarHeight
                              );
 
                               ,&nToolbarHeight
                              );
 
index 94d3060d5e1b3deb8e471ee948d0762c3fc60343..fb4a8cb4b76170b4d97b9d86cbac11ab51021379 100644 (file)
@@ -273,8 +273,9 @@ void wxWindow::Init()
     //
     // wxWnd
     //
     //
     // wxWnd
     //
-    m_hMenu = 0;
-    m_hWnd = 0;
+    m_hMenu         = 0L;
+    m_hWnd          = 0L;
+    m_hWndScrollBar = 0L;
 
     //
     // Pass WM_GETDLGCODE to DefWindowProc()
 
     //
     // Pass WM_GETDLGCODE to DefWindowProc()
@@ -687,13 +688,74 @@ void wxWindow::SetScrollbar(
 , bool                              bRefresh
 )
 {
 , bool                              bRefresh
 )
 {
-    ::WinSendMsg(GetHwnd(), SBM_SETSCROLLBAR, (MPARAM)nPos, MPFROM2SHORT(0, nRange));
-    if (nOrient == wxHORIZONTAL)
+    int                             nOldRange = nRange - nThumbVisible;
+    int                             nRange1 = nOldRange;
+    int                             nPageSize = nThumbVisible;
+    SBCDATA                         vInfo;
+    HWND                            hWnd = GetHwnd();
+    ULONG                           ulStyle = WS_VISIBLE;
+    RECTL                           vRect;
+
+    ::WinQueryWindowRect(hWnd, &vRect);
+    if (nPageSize > 1 && nRange > 0)
     {
     {
-        m_nXThumbSize = nThumbVisible;
+        nRange1 += (nPageSize - 1);
+    }
+
+    vInfo.cb = sizeof(SBCDATA);
+    vInfo.posFirst = 0;
+    vInfo.posLast = (SHORT)nRange1;
+    vInfo.posThumb = nPos;
+
+    if (nOrient == wxHORIZONTAL )
+    {
+        ulStyle |= SBS_HORZ;
+        if (m_hWndScrollBar == 0L)
+        {
+            m_hWndScrollBar = ::WinCreateWindow( hWnd
+                                                ,WC_SCROLLBAR
+                                                ,(PSZ)NULL
+                                                ,ulStyle
+                                                ,vRect.xLeft
+                                                ,vRect.yBottom
+                                                ,vRect.xRight - vRect.xLeft
+                                                ,20
+                                                ,hWnd
+                                                ,HWND_TOP
+                                                ,-1
+                                                ,&vInfo
+                                                ,NULL
+                                               );
+        }
+        else
+        {
+            ::WinSendMsg(m_hWndScrollBar, SBM_SETSCROLLBAR, (MPARAM)nPos, MPFROM2SHORT(0, (SHORT)nRange1));
+        }
     }
     else
     {
     }
     else
     {
+        ulStyle |= SBS_VERT;
+        if (m_hWndScrollBar == 0L)
+        {
+            m_hWndScrollBar = ::WinCreateWindow( hWnd
+                                                ,WC_SCROLLBAR
+                                                ,(PSZ)NULL
+                                                ,ulStyle
+                                                ,vRect.xRight - 20
+                                                ,vRect.yBottom
+                                                ,20
+                                                ,vRect.yTop - vRect.yBottom
+                                                ,hWnd
+                                                ,HWND_TOP
+                                                ,-1
+                                                ,&vInfo
+                                                ,NULL
+                                               );
+        }
+        else
+        {
+            ::WinSendMsg(m_hWndScrollBar, SBM_SETSCROLLBAR, (MPARAM)nPos, MPFROM2SHORT(0, (SHORT)nRange1));
+        }
         m_nYThumbSize = nThumbVisible;
     }
 } // end of wxWindow::SetScrollbar
         m_nYThumbSize = nThumbVisible;
     }
 } // end of wxWindow::SetScrollbar
index 030d3f7f6bc0126c86375f9fe64de3ce65201a9a..23d5bc3d58560495f69ecf3d3ff315daebccf97f 100644 (file)
@@ -4,7 +4,7 @@ DATA MULTIPLE NONSHARED READWRITE LOADONCALL
 CODE LOADONCALL
 
 EXPORTS
 CODE LOADONCALL
 
 EXPORTS
-;From library:  H:\Dev\Wx2\WxWindows\lib\wx.lib
+;From library:  F:\DEV\WX2\WXWINDOWS\LIB\WX.lib
   ;From object file:  dummy.cpp
     ;PUBDEFs (Symbols available from object file):
       wxDummyChar
   ;From object file:  dummy.cpp
     ;PUBDEFs (Symbols available from object file):
       wxDummyChar
@@ -1361,6 +1361,7 @@ EXPORTS
       Connect__12wxEvtHandlerFiN21M8wxObjectFR7wxEvent_vP8wxObject
       wxEVT_SOCKET
       wxEVT_SCROLLWIN_PAGEUP
       Connect__12wxEvtHandlerFiN21M8wxObjectFR7wxEvent_vP8wxObject
       wxEVT_SOCKET
       wxEVT_SCROLLWIN_PAGEUP
+      wxEVT_MOUSEWHEEL
       wxEVT_MIDDLE_UP
       wxEVT_MENU_INIT
       wxEVT_HELP
       wxEVT_MIDDLE_UP
       wxEVT_MENU_INIT
       wxEVT_HELP
@@ -1651,7 +1652,7 @@ EXPORTS
       wxEVT_NC_LEFT_DCLICK
       wxEVT_INIT_DIALOG
       wxEVT_COMMAND_SET_FOCUS
       wxEVT_NC_LEFT_DCLICK
       wxEVT_INIT_DIALOG
       wxEVT_COMMAND_SET_FOCUS
-  ;From object file:  H:\DEV\WX2\WXWINDOWS\src\common\extended.c
+  ;From object file:  F:\DEV\WX2\WXWINDOWS\src\common\extended.c
     ;PUBDEFs (Symbols available from object file):
       ConvertToIeeeExtended
       ConvertFromIeeeExtended
     ;PUBDEFs (Symbols available from object file):
       ConvertToIeeeExtended
       ConvertFromIeeeExtended
@@ -2296,6 +2297,8 @@ EXPORTS
       wxConstructorForwxPenList__Fv
       ;wxGetDisplaySizeMM()
       wxGetDisplaySizeMM__Fv
       wxConstructorForwxPenList__Fv
       ;wxGetDisplaySizeMM()
       wxGetDisplaySizeMM__Fv
+      ;wxGetClientDisplayRect()
+      wxGetClientDisplayRect__Fv
       ;wxDeleteStockObjects()
       wxDeleteStockObjects__Fv
       ;wxConstructorForwxBitmapList()
       ;wxDeleteStockObjects()
       wxDeleteStockObjects__Fv
       ;wxConstructorForwxBitmapList()
@@ -5260,7 +5263,7 @@ EXPORTS
       Read32__17wxTextInputStreamFv
       ;wxTextInputStream::SkipIfEndOfLine(char)
       SkipIfEndOfLine__17wxTextInputStreamFc
       Read32__17wxTextInputStreamFv
       ;wxTextInputStream::SkipIfEndOfLine(char)
       SkipIfEndOfLine__17wxTextInputStreamFc
-  ;From object file:  H:\DEV\WX2\WXWINDOWS\src\common\unzip.c
+  ;From object file:  F:\DEV\WX2\WXWINDOWS\src\common\unzip.c
     ;PUBDEFs (Symbols available from object file):
       unzReadCurrentFile
       unzGetCurrentFileInfo
     ;PUBDEFs (Symbols available from object file):
       unzReadCurrentFile
       unzGetCurrentFileInfo
@@ -6762,6 +6765,8 @@ EXPORTS
       __vft16wxGenericDirCtrl8wxObject
       ;wxGenericDirDialog::OnTreeSelected(wxTreeEvent&)
       OnTreeSelected__18wxGenericDirDialogFR11wxTreeEvent
       __vft16wxGenericDirCtrl8wxObject
       ;wxGenericDirDialog::OnTreeSelected(wxTreeEvent&)
       OnTreeSelected__18wxGenericDirDialogFR11wxTreeEvent
+      ;setdrive(int)
+      setdrive__Fi
       ;wxDirFilterListCtrl::Init()
       Init__19wxDirFilterListCtrlFv
       ;wxConstructorForwxGenericDirCtrl()
       ;wxDirFilterListCtrl::Init()
       Init__19wxDirFilterListCtrlFv
       ;wxConstructorForwxGenericDirCtrl()
@@ -8871,6 +8876,8 @@ EXPORTS
       sm_classwxScrolledWindow__16wxScrolledWindow
       ;wxGenericScrolledWindow::OnPaint(wxPaintEvent&)
       OnPaint__23wxGenericScrolledWindowFR12wxPaintEvent
       sm_classwxScrolledWindow__16wxScrolledWindow
       ;wxGenericScrolledWindow::OnPaint(wxPaintEvent&)
       OnPaint__23wxGenericScrolledWindowFR12wxPaintEvent
+      ;wxGenericScrolledWindow::OnMouseWheel(wxMouseEvent&)
+      OnMouseWheel__23wxGenericScrolledWindowFR12wxMouseEvent
       ;wxGenericScrolledWindow::GetScrollPixelsPerUnit(int*,int*) const
       GetScrollPixelsPerUnit__23wxGenericScrolledWindowCFPiT1
       ;wxGenericScrolledWindow::wxGenericScrolledWindow()
       ;wxGenericScrolledWindow::GetScrollPixelsPerUnit(int*,int*) const
       GetScrollPixelsPerUnit__23wxGenericScrolledWindowCFPiT1
       ;wxGenericScrolledWindow::wxGenericScrolledWindow()
@@ -9831,38 +9838,45 @@ EXPORTS
       sm_classwxHtmlTag__9wxHtmlTag
   ;From object file:  ..\html\htmlwin.cpp
     ;PUBDEFs (Symbols available from object file):
       sm_classwxHtmlTag__9wxHtmlTag
   ;From object file:  ..\html\htmlwin.cpp
     ;PUBDEFs (Symbols available from object file):
-      ;wxHtmlWindow::SetFonts(wxString,wxString,const int*)
-      SetFonts__12wxHtmlWindowF8wxStringT1PCi
+      ;wxHtmlHistoryArray::RemoveAt(unsigned int)
+      RemoveAt__18wxHtmlHistoryArrayFUi
       ;wxHtmlWinModule::sm_classwxHtmlWinModule
       sm_classwxHtmlWinModule__15wxHtmlWinModule
       ;wxHtmlWinModule::sm_classwxHtmlWinModule
       sm_classwxHtmlWinModule__15wxHtmlWinModule
+      ;wxHtmlWindow::SetFonts(wxString,wxString,const int*)
+      SetFonts__12wxHtmlWindowF8wxStringT1PCi
+      ;wxHtmlHistoryArray::DoCopy(const wxHtmlHistoryArray&)
+      DoCopy__18wxHtmlHistoryArrayFRC18wxHtmlHistoryArray
+      ;wxHtmlHistoryArray::Add(const wxHtmlHistoryItem&)
+      Add__18wxHtmlHistoryArrayFRC17wxHtmlHistoryItem
+      ;wxHtmlHistoryArray::~wxHtmlHistoryArray()
+      __dt__18wxHtmlHistoryArrayFv
       ;wxHtmlWindow::~wxHtmlWindow()
       __dt__12wxHtmlWindowFv
       ;wxHtmlWindow::HistoryCanForward()
       HistoryCanForward__12wxHtmlWindowFv
       ;wxHtmlWindow::HistoryBack()
       HistoryBack__12wxHtmlWindowFv
       ;wxHtmlWindow::~wxHtmlWindow()
       __dt__12wxHtmlWindowFv
       ;wxHtmlWindow::HistoryCanForward()
       HistoryCanForward__12wxHtmlWindowFv
       ;wxHtmlWindow::HistoryBack()
       HistoryBack__12wxHtmlWindowFv
+      ;wxwxHtmlProcessorListNode::DeleteData()
+      DeleteData__25wxwxHtmlProcessorListNodeFv
+      ;wxHtmlWindow::AddGlobalProcessor(wxHtmlProcessor*)
+      AddGlobalProcessor__12wxHtmlWindowFP15wxHtmlProcessor
       ;wxHtmlWindow::AddFilter(wxHtmlFilter*)
       AddFilter__12wxHtmlWindowFP12wxHtmlFilter
       ;wxHtmlWindow::OnDraw(wxDC&)
       OnDraw__12wxHtmlWindowFR4wxDC
       ;wxHtmlWindow::m_Filters
       m_Filters__12wxHtmlWindow
       ;wxHtmlWindow::AddFilter(wxHtmlFilter*)
       AddFilter__12wxHtmlWindowFP12wxHtmlFilter
       ;wxHtmlWindow::OnDraw(wxDC&)
       OnDraw__12wxHtmlWindowFR4wxDC
       ;wxHtmlWindow::m_Filters
       m_Filters__12wxHtmlWindow
-      ;HtmlHistoryArray::Index(const HtmlHistoryItem&,unsigned long) const
-      Index__16HtmlHistoryArrayCFRC15HtmlHistoryItemUl
-      ;HtmlHistoryArray::RemoveAt(unsigned int)
-      RemoveAt__16HtmlHistoryArrayFUi
-      ;HtmlHistoryArray::operator=(const HtmlHistoryArray&)
-      __as__16HtmlHistoryArrayFRC16HtmlHistoryArray
-      ;HtmlHistoryArray::Insert(const HtmlHistoryItem&,unsigned int)
-      Insert__16HtmlHistoryArrayFRC15HtmlHistoryItemUi
-      ;HtmlHistoryArray::DoCopy(const HtmlHistoryArray&)
-      DoCopy__16HtmlHistoryArrayFRC16HtmlHistoryArray
-      ;HtmlHistoryArray::Add(const HtmlHistoryItem&)
-      Add__16HtmlHistoryArrayFRC15HtmlHistoryItem
-      ;HtmlHistoryArray::DoEmpty()
-      DoEmpty__16HtmlHistoryArrayFv
+      ;wxHtmlHistoryArray::Index(const wxHtmlHistoryItem&,unsigned long) const
+      Index__18wxHtmlHistoryArrayCFRC17wxHtmlHistoryItemUl
+      ;wxHtmlHistoryArray::Insert(const wxHtmlHistoryItem&,unsigned int)
+      Insert__18wxHtmlHistoryArrayFRC17wxHtmlHistoryItemUi
+      __vft25wxwxHtmlProcessorListNode10wxNodeBase
+      ;wxHtmlHistoryArray::DoEmpty()
+      DoEmpty__18wxHtmlHistoryArrayFv
       ;wxConstructorForwxHtmlWinModule()
       wxConstructorForwxHtmlWinModule__Fv
       ;wxConstructorForwxHtmlWinModule()
       wxConstructorForwxHtmlWinModule__Fv
+      ;wxHtmlProcessor::sm_classwxHtmlProcessor
+      sm_classwxHtmlProcessor__15wxHtmlProcessor
       ;wxHtmlWindow::HistoryClear()
       HistoryClear__12wxHtmlWindowFv
       ;wxHtmlWindow::GetEventTable() const
       ;wxHtmlWindow::HistoryClear()
       HistoryClear__12wxHtmlWindowFv
       ;wxHtmlWindow::GetEventTable() const
@@ -9883,6 +9897,10 @@ EXPORTS
       OnSize__12wxHtmlWindowFR11wxSizeEvent
       ;wxHtmlWindow::OnMouseEvent(wxMouseEvent&)
       OnMouseEvent__12wxHtmlWindowFR12wxMouseEvent
       OnSize__12wxHtmlWindowFR11wxSizeEvent
       ;wxHtmlWindow::OnMouseEvent(wxMouseEvent&)
       OnMouseEvent__12wxHtmlWindowFR12wxMouseEvent
+      ;wxHtmlHistoryArray::operator=(const wxHtmlHistoryArray&)
+      __as__18wxHtmlHistoryArrayFRC18wxHtmlHistoryArray
+      ;wxHtmlHistoryArray::wxHtmlHistoryArray(const wxHtmlHistoryArray&)
+      __ct__18wxHtmlHistoryArrayFRC18wxHtmlHistoryArray
       ;wxHtmlWindow::SetRelatedStatusBar(int)
       SetRelatedStatusBar__12wxHtmlWindowFi
       ;wxHtmlWindow::CleanUpStatics()
       ;wxHtmlWindow::SetRelatedStatusBar(int)
       SetRelatedStatusBar__12wxHtmlWindowFi
       ;wxHtmlWindow::CleanUpStatics()
@@ -9897,21 +9915,21 @@ EXPORTS
       ReadCustomization__12wxHtmlWindowFP12wxConfigBase8wxString
       ;wxHtmlWindow::OnIdle(wxIdleEvent&)
       OnIdle__12wxHtmlWindowFR11wxIdleEvent
       ReadCustomization__12wxHtmlWindowFP12wxConfigBase8wxString
       ;wxHtmlWindow::OnIdle(wxIdleEvent&)
       OnIdle__12wxHtmlWindowFR11wxIdleEvent
-      ;HtmlHistoryArray::~HtmlHistoryArray()
-      __dt__16HtmlHistoryArrayFv
-      ;wxConstructorForwxHtmlWindow()
-      wxConstructorForwxHtmlWindow__Fv
       ;wxHtmlWindow::CreateLayout()
       CreateLayout__12wxHtmlWindowFv
       ;wxHtmlWindow::CreateLayout()
       CreateLayout__12wxHtmlWindowFv
+      ;wxConstructorForwxHtmlWindow()
+      wxConstructorForwxHtmlWindow__Fv
       ;wxHtmlWindow::OnLinkClicked(const wxHtmlLinkInfo&)
       OnLinkClicked__12wxHtmlWindowFRC14wxHtmlLinkInfo
       ;wxHtmlWindow::OnLinkClicked(const wxHtmlLinkInfo&)
       OnLinkClicked__12wxHtmlWindowFRC14wxHtmlLinkInfo
+      ;wxHtmlWindow::m_GlobalProcessors
+      m_GlobalProcessors__12wxHtmlWindow
       __vft12wxHtmlWindow8wxObject
       __vft12wxHtmlWindow8wxObject
-      ;HtmlHistoryArray::HtmlHistoryArray(const HtmlHistoryArray&)
-      __ct__16HtmlHistoryArrayFRC16HtmlHistoryArray
       ;wxHtmlWindow::HistoryCanBack()
       HistoryCanBack__12wxHtmlWindowFv
       ;wxHtmlWindow::HistoryForward()
       HistoryForward__12wxHtmlWindowFv
       ;wxHtmlWindow::HistoryCanBack()
       HistoryCanBack__12wxHtmlWindowFv
       ;wxHtmlWindow::HistoryForward()
       HistoryForward__12wxHtmlWindowFv
+      ;wxHtmlWindow::AddProcessor(wxHtmlProcessor*)
+      AddProcessor__12wxHtmlWindowFP15wxHtmlProcessor
       ;wxHtmlWindow::wxHtmlWindow(wxWindow*,int,const wxPoint&,const wxSize&,long,const wxString&)
       __ct__12wxHtmlWindowFP8wxWindowiRC7wxPointRC6wxSizelRC8wxString
       ;wxHtmlWindow::sm_eventTableEntries
       ;wxHtmlWindow::wxHtmlWindow(wxWindow*,int,const wxPoint&,const wxSize&,long,const wxString&)
       __ct__12wxHtmlWindowFP8wxWindowiRC7wxPointRC6wxSizelRC8wxString
       ;wxHtmlWindow::sm_eventTableEntries
@@ -13435,6 +13453,8 @@ EXPORTS
       wxFatalError__FRC8wxStringT1
       ;wxDisplaySize(int*,int*)
       wxDisplaySize__FPiT1
       wxFatalError__FRC8wxStringT1
       ;wxDisplaySize(int*,int*)
       wxDisplaySize__FPiT1
+      ;wxClientDisplayRect(int*,int*,int*,int*)
+      wxClientDisplayRect__FPiN31
       ;wxDisplayDepth()
       wxDisplayDepth__Fv
       gs_wxBusyCursor
       ;wxDisplayDepth()
       wxDisplayDepth__Fv
       gs_wxBusyCursor