// File: /workspace/github_c_makefile_star2_O0/enzo1982[P]smooth/classes/gui/widgets/basic/scrollbar.cpp
// Function: smooth::GUI::Scrollbar::Scrollbar(smooth::GUI::Point const&, smooth::GUI::Size const&, int, int*, int, int)
S::GUI::Scrollbar::Scrollbar(const Point &iPos, const Size &iSize, Int sType, Int *var, Int rangeStart, Int rangeEnd) : Arrows(iPos, iSize, sType, var, rangeStart, rangeEnd)
{
	type		= classID;

	if (GetWidth()	== 0) SetWidth(subtype	== OR_VERT ? 17  : 120);
	if (GetHeight()	== 0) SetHeight(subtype	== OR_VERT ? 120 :  17);

	clickHotspot	= new Hotspot(Point(), Size());
	dragHotspot	= new Hotspot(Point(), Size());

	clickTimer	= new System::Timer();
	clickTimerDirection = 1;

	pageSize	= 6;

	dragging	= False;
	clickOffset	= 0;

	scrollSpill	= 0;

	clickHotspot->onLeftButtonDown.Connect(&Scrollbar::OnMouseClick, this);
	clickHotspot->onLeftButtonUp.Connect(&System::Timer::Stop, clickTimer);
	clickHotspot->onMouseOut.Connect(&System::Timer::Stop, clickTimer);

	dragHotspot->onMouseDragStart.Connect(&Scrollbar::OnMouseDragStart, this);
	dragHotspot->onMouseDrag.Connect(&Scrollbar::OnMouseDrag, this);
	dragHotspot->onMouseDragEnd.Connect(&Scrollbar::OnMouseDragEnd, this);

	dragHotspot->onMouseWheel.Connect(&Scrollbar::OnMouseWheel, this);

	clickTimer->onInterval.Connect(&Scrollbar::OnMouseClickTimer, this);

	Add(clickHotspot);
	Add(dragHotspot);

	UpdateHotspotPositions();

	onRangeChange.Connect(&Scrollbar::OnValueChange, this);
	onValueChange.Connect(&Scrollbar::OnValueChange, this);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x130, %rsp            # imm = 0x130
movl 0x10(%rbp), %eax
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movq %r8, -0x28(%rbp)
movl %r9d, -0x2c(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x108(%rbp)
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
movl -0x1c(%rbp), %ecx
movq -0x28(%rbp), %r8
movl -0x2c(%rbp), %r9d
movl 0x10(%rbp), %r10d
movq %rsp, %rax
movl %r10d, (%rax)
callq 0x59aa0
movq -0x108(%rbp), %rdi
movq 0x169bc0(%rip), %rax    # 0x208e30
addq $0x10, %rax
movq %rax, (%rdi)
movq 0x1691b2(%rip), %rax    # 0x208430
movswl (%rax), %esi
addq $0x20, %rdi
callq 0x5a2e0
jmp 0x9f28c
movq -0x108(%rbp), %rdi
callq 0x5a210
movl %eax, -0x10c(%rbp)
jmp 0x9f2a0
movl -0x10c(%rbp), %eax
cmpl $0x0, %eax
jne 0x9f2e4
movq -0x108(%rbp), %rdi
movw 0x1a0(%rdi), %ax
subw $0x2, %ax
movl $0x11, %eax
movl $0x78, %esi
cmovel %eax, %esi
callq 0x5db30
jmp 0x9f2d1
jmp 0x9f2e4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x9f75f
movq -0x108(%rbp), %rdi
callq 0x5b860
movl %eax, -0x110(%rbp)
jmp 0x9f2f8
movl -0x110(%rbp), %eax
cmpl $0x0, %eax
jne 0x9f32b
movq -0x108(%rbp), %rdi
movw 0x1a0(%rdi), %ax
subw $0x2, %ax
movl $0x78, %eax
movl $0x11, %esi
cmovel %eax, %esi
callq 0x5bed0
jmp 0x9f329
jmp 0x9f32b
movl $0x5b8, %edi            # imm = 0x5B8
callq 0x59820
movq %rax, -0x118(%rbp)
jmp 0x9f33e
leaq -0x44(%rbp), %rdi
callq 0x5b530
jmp 0x9f349
leaq -0x4c(%rbp), %rdi
callq 0x59230
jmp 0x9f354
movq -0x118(%rbp), %rdi
leaq -0x44(%rbp), %rsi
leaq -0x4c(%rbp), %rdx
callq 0x59c30
jmp 0x9f36a
movq -0x108(%rbp), %rax
movq -0x118(%rbp), %rcx
movq %rcx, 0x658(%rax)
movl $0x5b8, %edi            # imm = 0x5B8
callq 0x59820
movq %rax, -0x120(%rbp)
jmp 0x9f392
leaq -0x54(%rbp), %rdi
callq 0x5b530
jmp 0x9f39d
leaq -0x5c(%rbp), %rdi
callq 0x59230
jmp 0x9f3a8
movq -0x120(%rbp), %rdi
leaq -0x54(%rbp), %rsi
leaq -0x5c(%rbp), %rdx
callq 0x59c30
jmp 0x9f3be
movq -0x108(%rbp), %rax
movq -0x120(%rbp), %rcx
movq %rcx, 0x660(%rax)
movl $0x68, %edi
callq 0x59820
movq %rax, -0x128(%rbp)
jmp 0x9f3e6
movq -0x128(%rbp), %rdi
callq 0x59db0
jmp 0x9f3f4
movq -0x108(%rbp), %rcx
movq -0x128(%rbp), %rax
movq %rax, 0x648(%rcx)
movl $0x1, 0x650(%rcx)
movl $0x6, 0x654(%rcx)
movb $0x0, 0x638(%rcx)
movl $0x0, 0x63c(%rcx)
movq $0x0, 0x640(%rcx)
movq 0x658(%rcx), %rdi
addq $0x2f8, %rdi            # imm = 0x2F8
movq 0x16931a(%rip), %rax    # 0x208768
movq %rax, -0x70(%rbp)
movq $0x0, -0x68(%rbp)
movq -0x70(%rbp), %rsi
movq -0x68(%rbp), %rdx
callq 0xa11d0
jmp 0x9f469
movq -0x108(%rbp), %rax
movq 0x648(%rax), %rcx
movq 0x658(%rax), %rdi
addq $0x318, %rdi            # imm = 0x318
movq 0x16960c(%rip), %rax    # 0x208a98
movq %rax, -0x80(%rbp)
movq $0x0, -0x78(%rbp)
movq -0x80(%rbp), %rsi
movq -0x78(%rbp), %rdx
callq 0xa1310
jmp 0x9f4a7
movq -0x108(%rbp), %rax
movq 0x648(%rax), %rcx
movq 0x658(%rax), %rdi
addq $0x2d8, %rdi            # imm = 0x2D8
movq 0x1695ce(%rip), %rax    # 0x208a98
movq %rax, -0x90(%rbp)
movq $0x0, -0x88(%rbp)
movq -0x90(%rbp), %rsi
movq -0x88(%rbp), %rdx
callq 0xa1450
jmp 0x9f4f1
movq -0x108(%rbp), %rcx
movq 0x660(%rcx), %rdi
addq $0x3f8, %rdi            # imm = 0x3F8
movq 0x168f0b(%rip), %rax    # 0x208418
movq %rax, -0xa0(%rbp)
movq $0x0, -0x98(%rbp)
movq -0xa0(%rbp), %rsi
movq -0x98(%rbp), %rdx
callq 0xa11d0
jmp 0x9f534
movq -0x108(%rbp), %rcx
movq 0x660(%rcx), %rdi
addq $0x418, %rdi            # imm = 0x418
movq 0x169a90(%rip), %rax    # 0x208fe0
movq %rax, -0xb0(%rbp)
movq $0x0, -0xa8(%rbp)
movq -0xb0(%rbp), %rsi
movq -0xa8(%rbp), %rdx
callq 0xa11d0
jmp 0x9f577
movq -0x108(%rbp), %rcx
movq 0x660(%rcx), %rdi
addq $0x438, %rdi            # imm = 0x438
movq 0x16904d(%rip), %rax    # 0x2085e0
movq %rax, -0xc0(%rbp)
movq $0x0, -0xb8(%rbp)
movq -0xc0(%rbp), %rsi
movq -0xb8(%rbp), %rdx
callq 0xa11d0
jmp 0x9f5ba
movq -0x108(%rbp), %rcx
movq 0x660(%rcx), %rdi
addq $0x458, %rdi            # imm = 0x458
movq 0x168eda(%rip), %rax    # 0x2084b0
movq %rax, -0xd0(%rbp)
movq $0x0, -0xc8(%rbp)
movq -0xd0(%rbp), %rsi
movq -0xc8(%rbp), %rdx
callq 0xa1590
jmp 0x9f5fd
movq -0x108(%rbp), %rcx
movq 0x648(%rcx), %rdi
addq $0x48, %rdi
movq 0x169882(%rip), %rax    # 0x208e98
movq %rax, -0xe0(%rbp)
movq $0x0, -0xd8(%rbp)
movq -0xe0(%rbp), %rsi
movq -0xd8(%rbp), %rdx
callq 0xa16d0
jmp 0x9f63d
movq -0x108(%rbp), %rdi
movq 0x658(%rdi), %rsi
movq (%rdi), %rax
movq 0x30(%rax), %rax
callq *%rax
jmp 0x9f656
movq -0x108(%rbp), %rdi
movq 0x660(%rdi), %rsi
movq (%rdi), %rax
movq 0x30(%rax), %rax
callq *%rax
jmp 0x9f66f
movq -0x108(%rbp), %rdi
callq 0x5cc50
jmp 0x9f67d
movq -0x108(%rbp), %rcx
movq %rcx, %rdi
addq $0x5f8, %rdi            # imm = 0x5F8
movq 0x169533(%rip), %rax    # 0x208bc8
movq %rax, -0xf0(%rbp)
movq $0x0, -0xe8(%rbp)
movq -0xf0(%rbp), %rsi
movq -0xe8(%rbp), %rdx
callq 0xa1810
jmp 0x9f6bc
movq -0x108(%rbp), %rcx
movq %rcx, %rdi
addq $0x618, %rdi            # imm = 0x618
movq 0x1694f4(%rip), %rax    # 0x208bc8
movq %rax, -0x100(%rbp)
movq $0x0, -0xf8(%rbp)
movq -0x100(%rbp), %rsi
movq -0xf8(%rbp), %rdx
callq 0xa1950
jmp 0x9f6fb
addq $0x130, %rsp            # imm = 0x130
popq %rbp
retq
movq -0x118(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
movl $0x5b8, %esi            # imm = 0x5B8
callq 0x595b0
jmp 0x9f75f
movq -0x120(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
movl $0x5b8, %esi            # imm = 0x5B8
callq 0x595b0
jmp 0x9f75f
movq -0x128(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
movl $0x68, %esi
callq 0x595b0
movq -0x108(%rbp), %rdi
callq 0x5ccf0
movq -0x38(%rbp), %rdi
callq 0x5b6b0
nopw %cs:(%rax,%rax)