blob: 570e9682d011f06855636e651aca11c1e04b1ae7 (
plain)
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
71
72
73
74
75
76
|
(******************************************************************************
*
* Copyright (c) 1996-2000 Palm, Inc. or its subsidiaries.
* All rights reserved.
*
* File: ScrollBar.h
*
* Release: Palm OS SDK 4.0 (63220)
*
* Description:
* This file defines scroll bar structures and routines.
*
* History:
* Feb 6, 1996 Created by Art Lamb
*
*****************************************************************************)
unit scrollbar;
interface
uses palmos, coretraps, control;
type
ScrollBarRegionType = Enum;
const
sclUpArrow = 0;
sclDownArrow = Succ(sclUpArrow);
sclUpPage = Succ(sclDownArrow);
sclDownPage = Succ(sclUpPage);
sclCar = Succ(sclDownPage);
type
ScrollBarAttrType = record
{$ifdef ALLOW_ACCESS_TO_INTERNALS_OF_SCROLLBARS} // These fields will not be available in the next OS release!
Bits: UInt16;
{
UInt16 usable :1; // Set if part of ui
UInt16 visible :1; // Set if drawn, used internally
UInt16 hilighted :1; // Set if region is hilighted
UInt16 shown :1; // Set if drawn and maxValue > minValue
UInt16 activeRegion :4; // ScrollBarRegionType
UInt16 reserved :8; // Reserved for future use
}
{$endif}
end;
ScrollBarAttrTag = ScrollBarAttrType;
ScrollBarType = record
{$ifdef ALLOW_ACCESS_TO_INTERNALS_OF_SCROLLBARS} // These fields will not be available in the next OS release!
bounds: RectangleType;
id: UInt16;
attr: ScrollBarAttrType;
value: Int16;
minValue: Int16;
maxValue: Int16;
pageSize: Int16;
penPosInCar: Int16;
savePos: Int16;
{$endif}
end;
ScrollBarPtr = ^ScrollBarType;
procedure SclGetScrollBar(const bar: ScrollBarPtr; var valueP, minP, maxP, pageSizeP: Int16); syscall sysTrapSclGetScrollBar;
procedure SclSetScrollBar(bar: ScrollBarPtr; value: Int16; const min, max, pageSize: Int16); syscall sysTrapSclSetScrollBar;
procedure SclDrawScrollBar(bar: ScrollBarPtr); syscall sysTrapSclDrawScrollBar;
function SclHandleEvent(bar: ScrollBarPtr; const event: EventPtr): Boolean; syscall sysTrapSclHandleEvent;
implementation
end.
|