// File: /workspace/github_c_makefile_star2_O1/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 0xe84ea(%rip), %rax     # 0x16c3b0
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 0xdee83(%rip), %rcx     # 0x162d78
movq %rcx, 0x6f8(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x708(%rbx)
movq 0xe905b(%rip), %rcx     # 0x16cf68
movzwl (%rcx), %ecx
movw %cx, 0x20(%rbx)
movq %rax, 0x6c8(%rbx)
movl $0x0, 0x6d0(%rbx)
leaq 0x140(%rbx), %rdi
callq 0x582a0
movq 0xe8f60(%rip), %rcx     # 0x16ce98
movswl (%rcx), %edx
movq 0xe883e(%rip), %rcx     # 0x16c780
movswl (%rcx), %ecx
movq 0xe8ea4(%rip), %r9      # 0x16cdf0
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 0xe86ef(%rip), %rsi     # 0x16c670
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 0x83fcc
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 0x83ffc
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 0xe888e(%rip), %rsi     # 0x16c898
xorl %edx, %edx
movq %rbx, %rcx
callq 0x84dfa
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 0xe8dbf(%rip), %rsi     # 0x16ce48
xorl %edx, %edx
movq %rbx, %rcx
callq 0x84eb8
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 0x84f76
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 0x84144
movq %rax, %r12
movl $0x668, %esi            # imm = 0x668
movq %r13, %rdi
callq 0x55480
jmp 0x84167
movq %rax, %r12
leaq 0x10(%rsp), %rdi
callq 0x56720
jmp 0x84167
movq %rax, %r12
jmp 0x84177
jmp 0x84164
movq %rax, %r12
movq %r15, %rdi
callq 0x72cce
movq %r14, %rdi
callq 0x59200
movq %rbx, %rdi
callq 0x58c00
movq %r12, %rdi
callq 0x57090
nop