File: Scrollbar.html

package info (click to toggle)
polyml 5.6-8
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 31,892 kB
  • ctags: 34,453
  • sloc: cpp: 44,983; ansic: 24,520; asm: 14,850; sh: 11,730; makefile: 551; exp: 484; python: 253; awk: 91; sed: 9
file content (70 lines) | stat: -rw-r--r-- 2,956 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>

<head>
<title>Windows Interface Reference: Scrollbar structure</title>
</head>

<body>

<h1>Scrollbar </h1>

<p>The Scrollbar structure contains functions and styles for scroll bars and functions to
scroll windows.</p>

<pre>structure Scrollbar:
sig
    type HWND and HDC and HRGN
    type RECT =  { left: int, top: int, right: int, bottom: int }

    structure Style:
    sig
        include BIT_FLAGS where type flags = Window.Style.flags
        val WS_OVERLAPPED: flags and WS_POPUP: flags and WS_CHILD: flags and WS_MINIMIZE: flags
        and WS_VISIBLE: flags and WS_DISABLED:flags and WS_CLIPSIBLINGS:flags
        and WS_CLIPCHILDREN:flags and WS_MAXIMIZE:flags and WS_CAPTION:flags
        and WS_BORDER:flags and WS_DLGFRAME:flags and WS_VSCROLL:flags and WS_HSCROLL:flags
        and WS_SYSMENU:flags and WS_THICKFRAME:flags and WS_GROUP:flags and WS_TABSTOP:flags
        and WS_MINIMIZEBOX:flags and WS_MAXIMIZEBOX:flags and WS_TILED:flags and WS_ICONIC:flags
        and WS_SIZEBOX:flags and WS_OVERLAPPEDWINDOW:flags and WS_TILEDWINDOW:flags
        and WS_POPUPWINDOW:flags and WS_CHILDWINDOW:flags
        and SBS_HORZ:flags and SBS_VERT:flags and SBS_TOPALIGN:flags and SBS_LEFTALIGN:flags
        and SBS_BOTTOMALIGN:flags and SBS_RIGHTALIGN:flags and SBS_SIZEBOXTOPLEFTALIGN:flags
        and SBS_SIZEBOXBOTTOMRIGHTALIGN:flags and SBS_SIZEBOX:flags and SBS_SIZEGRIP:flags
    end

    type enableArrows = { enableLeftUp: bool, enableRightDown: bool }

    val ESB_ENABLE_BOTH: enableArrows
    val ESB_DISABLE_BOTH: enableArrows
    val ESB_DISABLE_LEFT: enableArrows
    val ESB_DISABLE_RIGHT: enableArrows
    val ESB_DISABLE_UP: enableArrows
    val ESB_DISABLE_DOWN: enableArrows

    type SCROLLINFO =
        { minPos: int, maxPos: int, pageSize: int, pos: int, trackPos: int }

    datatype ScrollInfoOption =
        SIF_RANGE | SIF_PAGE | SIF_POS | SIF_DISABLENOSCROLL | SIF_TRACKPOS

    val SIF_ALL : ScrollInfoOption list

    datatype ScrollBarType = SB_BOTH | SB_CTL | SB_HORZ | SB_VERT
    datatype ScrollWindowFlag = SW_ERASE | SW_INVALIDATE | SW_SCROLLCHILDREN

    val EnableScrollBar : HWND * ScrollBarType * enableArrows -&gt; unit
    val GetScrollInfo : HWND * ScrollBarType * ScrollInfoOption list -&gt; SCROLLINFO
    val GetScrollPos : HWND * ScrollBarType -&gt; int
    val ScrollDC : HDC * int * int * RECT * RECT * HRGN -&gt; RECT
    val ScrollWindow : HWND * int * int * RECT * RECT -&gt; unit
    val ScrollWindowEx : HWND * int * int * RECT * RECT * HRGN * ScrollWindowFlag list -&gt; RECT
    val SetScrollInfo :
        HWND * ScrollBarType * ScrollInfoOption list * SCROLLINFO * bool -&gt; int
    val SetScrollPos : HWND * ScrollBarType * int * bool -&gt; int
    val SetScrollRange : HWND * ScrollBarType * int * int * bool -&gt; bool
    val ShowScrollBar : HWND * ScrollBarType * bool -&gt; unit
end
=</pre>
</body>
</html>