// File: /workspace/github_c_makefile_star2_O2/enzo1982[P]smooth/classes/gui/widgets/multi/list/listbox.cpp
// Function: smooth::GUI::ListBox::ListBox(smooth::GUI::Point const&, smooth::GUI::Size const&)
S::GUI::ListBox::ListBox(const Point &iPos, const Size &iSize)
{
	type	     = classID;

	scrollbar    = NIL;
	scrollbarPos = 0;

	SetFont(Font(font.GetName(), Font::DefaultSize, Font::Normal, Font::Normal, Setup::ClientTextColor));

	SetBackgroundColor(Setup::ClientColor);
	SetMetrics(iPos, iSize);

	if (GetWidth() == 0) SetWidth(120);
	if (GetHeight() == 0) SetHeight(80);

	onChangeSize.Connect(&ListBox::OnChangeSize, this);

	scrollbar = new Scrollbar(Point(), Size(), OR_VERT, &scrollbarPos, 0, 1);
	scrollbar->SetOrientation(OR_UPPERRIGHT);
	scrollbar->SetStepSize(16);
	scrollbar->onValueChange.Connect(&ListBox::OnScrollbarValueChange, this);
	scrollbar->Hide();

	header = new ListBoxHeader(Point(1, 1), Size(GetWidth() - 2, 16));
	header->onClickTab.Connect(&onClickTab);
	header->Hide();

	Add(scrollbar);
	Add(header);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x50, %rsp
movq %rdx, %r12
movq %rsi, %r13
movq %rdi, %rbx
callq 0x57f30
movq 0xdfbda(%rip), %rax     # 0x1613b0
addq $0x10, %rax
movq %rax, (%rbx)
leaq 0x6e0(%rbx), %r14
movq %r14, %rdi
xorl %esi, %esi
callq 0x5a180
andq $0x0, 0x700(%rbx)
leaq 0x6f8(%rbx), %r15
leaq 0xd6594(%rip), %rax     # 0x157d98
movq %rax, 0x6f8(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x708(%rbx)
movq 0xe074c(%rip), %rax     # 0x161f68
movzwl (%rax), %eax
movw %ax, 0x20(%rbx)
andq $0x0, 0x6c8(%rbx)
andl $0x0, 0x6d0(%rbx)
leaq 0x140(%rbx), %rdi
callq 0x59550
movq 0xe0653(%rip), %rcx     # 0x161e98
movswl (%rcx), %edx
movq 0xdff31(%rip), %rcx     # 0x161780
movswl (%rcx), %ecx
movq 0xe0597(%rip), %r9      # 0x161df0
leaq 0x10(%rsp), %rdi
movq %rax, %rsi
movl %ecx, %r8d
callq 0x58460
movq (%rbx), %rax
leaq 0x10(%rsp), %rsi
movq %rbx, %rdi
callq *0xe0(%rax)
leaq 0x10(%rsp), %rdi
callq 0x57860
movq (%rbx), %rax
movq 0xdfde2(%rip), %rsi     # 0x161670
movq %rbx, %rdi
callq *0x138(%rax)
movq (%rbx), %rax
movq %rbx, %rdi
movq %r13, %rsi
movq %r12, %rdx
callq *0x150(%rax)
cmpl $0x0, 0xb0(%rbx)
jne 0x818bd
pushq $0x78
popq %rsi
movq %rbx, %rdi
callq 0x5a1f0
cmpl $0x0, 0xb4(%rbx)
jne 0x818d1
pushq $0x50
popq %rsi
movq %rbx, %rdi
callq 0x58980
leaq 0x298(%rbx), %rdi
movq 0xdffb9(%rip), %rsi     # 0x161898
xorl %edx, %edx
movq %rbx, %rcx
callq 0x8261c
movl $0x668, %edi            # imm = 0x668
callq 0x56700
movq %rax, %r13
leaq 0x6d0(%rbx), %r8
leaq 0x10(%rsp), %rsi
andq $0x0, (%rsi)
leaq 0x8(%rsp), %rdx
andq $0x0, (%rdx)
movl $0x1, (%rsp)
pushq $0x2
popq %rcx
movq %rax, %rdi
xorl %r9d, %r9d
callq 0x579c0
movq %r13, 0x6c8(%rbx)
movq (%r13), %rax
pushq $0x24
popq %rsi
movq %r13, %rdi
callq *0x120(%rax)
movq 0x6c8(%rbx), %rdi
movl $0x10, 0x5e0(%rdi)
addq $0x618, %rdi            # imm = 0x618
movq 0xe04ee(%rip), %rsi     # 0x161e48
xorl %edx, %edx
movq %rbx, %rcx
callq 0x826b8
movq 0x6c8(%rbx), %rdi
movq (%rdi), %rax
callq *0x60(%rax)
movl $0x758, %edi            # imm = 0x758
callq 0x56700
movq %rax, %r13
movabsq $0x100000001, %rax      # imm = 0x100000001
leaq 0x10(%rsp), %rsi
movq %rax, (%rsi)
movl 0xb0(%rbx), %eax
addl $-0x2, %eax
leaq 0x8(%rsp), %rdx
movl %eax, (%rdx)
movl $0x10, 0x4(%rdx)
movq %r13, %rdi
callq 0x57190
movq %r13, 0x6d8(%rbx)
addq $0x738, %r13            # imm = 0x738
movq %r13, %rdi
movq %r15, %rsi
callq 0x82754
movq 0x6d8(%rbx), %rdi
movq (%rdi), %rax
callq *0x60(%rax)
movq 0x6c8(%rbx), %rsi
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x30(%rax)
movq 0x6d8(%rbx), %rsi
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x30(%rax)
addq $0x50, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %rax, %r12
movl $0x758, %esi            # imm = 0x758
jmp 0x81a15
movq %rax, %r12
movl $0x668, %esi            # imm = 0x668
movq %r13, %rdi
callq 0x564c0
jmp 0x81a38
movq %rax, %r12
leaq 0x10(%rsp), %rdi
callq 0x57860
jmp 0x81a38
movq %rax, %r12
jmp 0x81a48
jmp 0x81a35
movq %rax, %r12
movq %r15, %rdi
callq 0x724c6
movq %r14, %rdi
callq 0x5a588
movq %rbx, %rdi
callq 0x59f50
movq %r12, %rdi
callq 0x58260