Table of Contents

Class ScrollBar

Namespace
OmegaGUI.Render
Assembly
OmegaGUI.dll

A scroll bar control

public class ScrollBar : Control
Inheritance
ScrollBar
Inherited Members
Extension Methods

Constructors

ScrollBar(Dialog)

Creates a new instance of the scroll bar class

public ScrollBar(Dialog parent)

Parameters

parent Dialog

Fields

DownButtonLayer

public const int DownButtonLayer = 2

Field Value

int

MinimumThumbSize

protected const int MinimumThumbSize = 8

Field Value

int

ThumbLayer

public const int ThumbLayer = 3

Field Value

int

TrackLayer

public const int TrackLayer = 0

Field Value

int

UpButtonLayer

public const int UpButtonLayer = 1

Field Value

int

downButtonRect

protected Rectangle downButtonRect

Field Value

Rectangle

end

protected int end

Field Value

int

m_position

protected int m_position

Field Value

int

pgSize

protected int pgSize

Field Value

int

showingThumb

protected bool showingThumb

Field Value

bool

start

protected int start

Field Value

int

thumbRect

protected Rectangle thumbRect

Field Value

Rectangle

trackRect

protected Rectangle trackRect

Field Value

Rectangle

upButtonRect

protected Rectangle upButtonRect

Field Value

Rectangle

Properties

PageSize

Size of a 'page'

public int PageSize { get; set; }

Property Value

int

TrackPosition

Position of the track

public int TrackPosition { get; set; }

Property Value

int

Methods

Cap()

Clips position at boundaries

protected void Cap()

HandleMouse(WindowMessage, Point, IntPtr, IntPtr)

Stores data for a dropdown list item

public override bool HandleMouse(WindowMessage msg, Point pt, IntPtr wParam, IntPtr lParam)

Parameters

msg WindowMessage
pt Point
wParam IntPtr
lParam IntPtr

Returns

bool

Render(Device, float)

Render the scroll bar control

public override void Render(Device device, float elapsedTime)

Parameters

device Device
elapsedTime float

Scroll(int)

Scrolls by delta items. A positive value scrolls down, while a negative scrolls down

public void Scroll(int delta)

Parameters

delta int

ScrollTo(int)

Scrolls by to position.

public void ScrollTo(int position)

Parameters

position int

SetTrackRange(int, int)

Sets the track range

public void SetTrackRange(int startRange, int endRange)

Parameters

startRange int
endRange int

ShowItem(int)

Shows an item

public void ShowItem(int index)

Parameters

index int

UpdateRectangles()

Update all of the rectangles

protected override void UpdateRectangles()

UpdateThumbRectangle()

Compute the dimension of the scroll thumb

protected void UpdateThumbRectangle()