source: trunk/src/user32/new/winscrollbar.cpp@ 331

Last change on this file since 331 was 331, checked in by sandervl, 26 years ago

* empty log message *

File size: 4.5 KB
Line 
1/* $Id: winscrollbar.cpp,v 1.1 1999-07-18 17:12:04 sandervl Exp $ */
2/*
3 * Win32 scrollbar functions for OS/2
4 *
5 * Copyright 1999 Sander van Leeuwen
6 *
7 *
8 * Project Odin Software License can be found in LICENSE.TXT
9 *
10 */
11#include <os2win.h>
12#include <misc.h>
13
14//******************************************************************************
15//******************************************************************************
16int WIN32API SetScrollPos( HWND arg1, int arg2, int arg3, BOOL arg4)
17{
18#ifdef DEBUG
19 WriteLog("USER32: SetScrollPos\n");
20#endif
21 return O32_SetScrollPos(arg1, arg2, arg3, arg4);
22}
23//******************************************************************************
24//******************************************************************************
25BOOL WIN32API SetScrollRange( HWND arg1, int arg2, int arg3, int arg4, BOOL arg5)
26{
27#ifdef DEBUG
28 WriteLog("USER32: SetScrollRange\n");
29#endif
30 return O32_SetScrollRange(arg1, arg2, arg3, arg4, arg5);
31}
32//******************************************************************************
33//******************************************************************************
34BOOL WIN32API ShowScrollBar( HWND arg1, int arg2, BOOL arg3)
35{
36#ifdef DEBUG
37 WriteLog("USER32: ShowScrollBar\n");
38#endif
39 return O32_ShowScrollBar(arg1, arg2, arg3);
40}
41//******************************************************************************
42//******************************************************************************
43int WIN32API GetScrollPos(HWND hwnd, int fnBar)
44{
45 int pos;
46
47 pos = O32_GetScrollPos(hwnd, fnBar);
48#ifdef DEBUG
49 WriteLog("USER32: GetScrollPos of %X type %d returned %d\n", hwnd, fnBar, pos);
50#endif
51 return(pos);
52}
53//******************************************************************************
54//******************************************************************************
55BOOL WIN32API GetScrollRange( HWND arg1, int arg2, int * arg3, int * arg4)
56{
57#ifdef DEBUG
58 WriteLog("USER32: GetScrollRange\n");
59#endif
60 return O32_GetScrollRange(arg1, arg2, arg3, arg4);
61}
62//******************************************************************************
63//******************************************************************************
64BOOL WIN32API ScrollWindow( HWND arg1, int arg2, int arg3, const RECT * arg4, const RECT * arg5)
65{
66#ifdef DEBUG
67 WriteLog("USER32: ScrollWindow\n");
68#endif
69 return O32_ScrollWindow(arg1, arg2, arg3, arg4, arg5);
70}
71//******************************************************************************
72//******************************************************************************
73BOOL WIN32API ScrollWindowEx( HWND arg1, int arg2, int arg3, const RECT * arg4, const RECT * arg5, HRGN arg6, PRECT arg7, UINT arg8)
74{
75#ifdef DEBUG
76 WriteLog("USER32: ScrollWindowEx\n");
77#endif
78 return O32_ScrollWindowEx(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8);
79}
80//******************************************************************************
81//******************************************************************************
82BOOL WIN32API GetScrollInfo(HWND hwnd, int fnBar, LPSCROLLINFO lpsi)
83{
84#ifdef DEBUG
85 WriteLog("USER32: GetScrollInfo\n");
86#endif
87 if(lpsi == NULL)
88 return(FALSE);
89
90 if(lpsi->fMask & SIF_POS)
91 lpsi->nPos = GetScrollPos(hwnd, fnBar);
92 if(lpsi->fMask & SIF_RANGE)
93 GetScrollRange(hwnd, fnBar, &lpsi->nMin, &lpsi->nMax);
94 if(lpsi->fMask & SIF_PAGE) {
95#ifdef DEBUG
96 WriteLog("USER32: GetScrollInfo, page info not implemented\n");
97#endif
98 lpsi->nPage = 25;
99 }
100 return(TRUE);
101}
102//******************************************************************************
103//TODO: Not complete
104//******************************************************************************
105INT WIN32API SetScrollInfo(HWND hwnd, INT fnBar, const SCROLLINFO *lpsi, BOOL fRedraw)
106{
107 int smin, smax;
108
109#ifdef DEBUG
110 WriteLog("USER32: SetScrollInfo\n");
111#endif
112 if(lpsi == NULL)
113 return(FALSE);
114
115 if(lpsi->fMask & SIF_POS)
116 SetScrollPos(hwnd, fnBar, lpsi->nPos, fRedraw);
117 if(lpsi->fMask & SIF_RANGE)
118 SetScrollRange(hwnd, fnBar, lpsi->nMin, lpsi->nMax, fRedraw);
119 if(lpsi->fMask & SIF_PAGE) {
120#ifdef DEBUG
121 WriteLog("USER32: GetScrollInfo, page info not implemented\n");
122#endif
123 }
124 if(lpsi->fMask & SIF_DISABLENOSCROLL) {
125#ifdef DEBUG
126 WriteLog("USER32: GetScrollInfo, disable scrollbar not yet implemented\n");
127#endif
128 }
129 return(TRUE);
130}
131//******************************************************************************
132//******************************************************************************
Note: See TracBrowser for help on using the repository browser.