// File: /workspace/github_c_makefile_star2_O3/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 0x56da0
movq 0xe79fe(%rip), %rax     # 0x16b3b0
addq $0x10, %rax
movq %rax, (%rbx)
leaq 0x6e0(%rbx), %r14
movq %r14, %rdi
xorl %esi, %esi
callq 0x58e20
leaq 0x6f8(%rbx), %r15
xorl %eax, %eax
movq %rax, 0x700(%rbx)
leaq 0xde397(%rip), %rcx     # 0x161d78
movq %rcx, 0x6f8(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x708(%rbx)
movq 0xe856f(%rip), %rcx     # 0x16bf68
movzwl (%rcx), %ecx
movw %cx, 0x20(%rbx)
movq %rax, 0x6c8(%rbx)
movl $0x0, 0x6d0(%rbx)
leaq 0x140(%rbx), %rdi
callq 0x582a0
movq 0xe8474(%rip), %rcx     # 0x16be98
movswl (%rcx), %edx
movq 0xe7d52(%rip), %rcx     # 0x16b780
movswl (%rcx), %ecx
movq 0xe83b8(%rip), %r9      # 0x16bdf0
leaq 0x10(%rsp), %rdi
movq %rax, %rsi
movl %ecx, %r8d
callq 0x57270
movq (%rbx), %rax
leaq 0x10(%rsp), %rsi
movq %rbx, %rdi
callq *0xe0(%rax)
leaq 0x10(%rsp), %rdi
callq 0x56720
movq (%rbx), %rax
movq 0xe7c03(%rip), %rsi     # 0x16b670
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 0x83ab8
leaq 0xa8(%rbx), %rsi
movl 0xb4(%rbx), %eax
leaq 0x10(%rsp), %rdx
movl $0x78, (%rdx)
movl %eax, 0x4(%rdx)
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x150(%rax)
cmpl $0x0, 0xb4(%rbx)
jne 0x83ae8
leaq 0xa8(%rbx), %rsi
movl 0xb0(%rbx), %eax
leaq 0x10(%rsp), %rdx
movl %eax, (%rdx)
movl $0x50, 0x4(%rdx)
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x150(%rax)
leaq 0x298(%rbx), %rdi
movq 0xe7da2(%rip), %rsi     # 0x16b898
xorl %edx, %edx
movq %rbx, %rcx
callq 0x848ee
movl $0x668, %edi            # imm = 0x668
callq 0x556b0
movq %rax, %r13
leaq 0x6d0(%rbx), %r8
xorl %eax, %eax
leaq 0x10(%rsp), %rsi
movq %rax, (%rsi)
leaq 0x8(%rsp), %rdx
movq %rax, (%rdx)
movl $0x1, (%rsp)
movq %r13, %rdi
movl $0x2, %ecx
xorl %r9d, %r9d
callq 0x56880
movq %r13, 0x6c8(%rbx)
movq (%r13), %rax
movq %r13, %rdi
movl $0x24, %esi
callq *0x120(%rax)
movq 0x6c8(%rbx), %rdi
movl $0x10, 0x5e0(%rdi)
addq $0x618, %rdi            # imm = 0x618
movq 0xe82d3(%rip), %rsi     # 0x16be48
xorl %edx, %edx
movq %rbx, %rcx
callq 0x849ae
movq 0x6c8(%rbx), %rdi
movq (%rdi), %rax
callq *0x60(%rax)
movl $0x758, %edi            # imm = 0x758
callq 0x556b0
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 0x560b0
movq %r13, 0x6d8(%rbx)
addq $0x738, %r13            # imm = 0x738
movq %r13, %rdi
movq %r15, %rsi
callq 0x84a6e
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 0x83c30
movq %rax, %r12
movl $0x668, %esi            # imm = 0x668
movq %r13, %rdi
callq 0x55480
jmp 0x83c53
movq %rax, %r12
leaq 0x10(%rsp), %rdi
callq 0x56720
jmp 0x83c53
movq %rax, %r12
jmp 0x83c63
jmp 0x83c50
movq %rax, %r12
movq %r15, %rdi
callq 0x7296e
movq %r14, %rdi
callq 0x59200
movq %rbx, %rdi
callq 0x58c00
movq %r12, %rdi
callq 0x57090
nop