Class TCastleScrollViewCustom
Unit
CastleControls
Declaration
type TCastleScrollViewCustom = class(TCastleUserInterface)
Description
Abstract user interface with a scrollbar. In most cases you want to use TCastleScrollView in your application, which is a more comfortable descendant of this class.
Hierarchy
Overview
Fields
Methods
Properties
Description
Fields
 |
FScrollbarLeft: Boolean; |
|
 |
nested const DefaultKeyScrollSpeed = 200.0; |
|
 |
nested const DefaultWheelScrollSpeed = 20.0; |
|
Methods
 |
procedure DoScrollChange; virtual; |
|
 |
procedure CustomScrollBarChanged(Sender: TObject); |
|
 |
function GetScroll: Single; virtual; abstract; |
|
 |
procedure SetScroll(Value: Single); virtual; abstract; |
|
 |
function GetScrollStored: Boolean; virtual; abstract; |
|
 |
function GetPageSize: Single; virtual; abstract; |
How much Scroll is represented by the height of the scrollbar slider. Among other things, this determines how much Scroll changes in response to Page Up and Page Down keys.
|
 |
function GetCompleteSize: Single; virtual; abstract; |
How much Scroll is represented by the height of the entire scrollbar (that is, the height of this TCastleScrollViewCustom instance).
|
 |
constructor Create(AOwner: TComponent); override; |
|
 |
destructor Destroy; override; |
|
 |
procedure RenderOverChildren; override; |
|
 |
function Motion(const Event: TInputMotion): boolean; override; |
|
 |
procedure Update(const SecondsPassed: Single; var HandleInput: boolean); override; |
|
 |
function ScrollMin: Single; |
Minimum sensible value for Scroll, corresponds to scrollbar slider at the top.
|
 |
function ScrollMax: Single; |
Maximum sensible value for Scroll, corresponds to scrollbar slider at the bottom.
|
Properties
 |
property ScrollbarVisible: Boolean read FScrollbarVisible; |
|
 |
property TintScrollBarInactive: TCastleColor read FTintScrollBarInactive write FTintScrollBarInactive; |
Color and alpha tint to use when scrollbar is not used. May have some alpha, which makes scrollbar "make itself more opaque", and thus noticeable, when you start dragging. By default it's opaque white, which means that no tint is shown.
|
 |
property KeyScrollSpeed: Single read FKeyScrollSpeed write FKeyScrollSpeed default DefaultKeyScrollSpeed; |
Speed of scrolling by arrow keys, in pixels (before UI scaling) per second.
|
 |
property WheelScrollSpeed: Single read FWheelScrollSpeed write FWheelScrollSpeed default DefaultWheelScrollSpeed; |
Speed of scrolling by mouse wheel, in pixels (before UI scaling) per event.
|
 |
property ScrollBarWidth: Single read FScrollBarWidth write FScrollBarWidth default 0; |
Width of the scroll bar. Value of 0 means to use global default in Theme.ScrollBarWidth.
|
 |
property ScrollBarLeft: Boolean read FScrollBarLeft write FScrollBarLeft default false; |
Position of the scroll bar.
False
Scroll bar is located on the right side of the ScrollView.
True
Scroll bar is located on the left side of the ScrollView. Pay attention, that additional space is not reserved for the scroll bar automatically, you have to specify ScrollArea.Translation.X manually, e.g. ScrollArea.Translation := Vector2(ScrollBarWidth + Gap, ScrollArea.Translation.Y) .
|
 |
property EnableDragging: Boolean read FEnableDragging write FEnableDragging default true; |
Enable scrolling by dragging anywhere in the scroll area. This is usually suitable for mobile devices. Note that this doesn't affect the dragging directly by the scrollbar, which is always enabled.
|
 |
property ScrollbarFrame: TCastleImagePersistent read FScrollbarFrame; |
Customize the image of scrollbar frame, drawn on the right side of this control.
|
 |
property ScrollbarVerticalMargin: Single
read FScrollbarVerticalMargin write SetScrollbarVerticalMargin default 0; |
Vertical space between the scrollbar and borders of the scrollview. Can be used e.g. to draw up/down buttons by adding them to the TCastleScrollViewCustom.
TODO: We should add automatic PageUpDown buttons activated by property ButtonsUpDown: Boolean, with gfx customizable by ButtonUp, ButtonDown. Then the property ScrollbarVerticalMargin should be deprecated.
|
Generated by PasDoc 0.16.0.