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

	listBox		  = NIL;
	toolWindow	  = NIL;

	listBoxClosed	  = 0;

	prevSelectedEntry = 0;

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

	SetMetrics(iPos, iSize);

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

	hotspot		= new Hotspot(Point(1, 1), GetSize() - Size(19, 2));
	hotspot->onLeftButtonDown.Connect(&ComboBox::OpenListBox, this);

	buttonHotspot	= new HotspotSimpleButton(Point(16, 3), Size(13, GetHeight() - 6));
	buttonHotspot->SetOrientation(OR_UPPERRIGHT);
	buttonHotspot->onLeftButtonDown.Connect(&ComboBox::OpenListBox, this);

	Add(hotspot);
	Add(buttonHotspot);

	onChangeSize.Connect(&ComboBox::OnChangeSize, this);
	onSelectEntry.Connect(&ComboBox::OnSelectEntry, this);
	onLoseFocus.Connect(&ComboBox::CloseListBox, this);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x50, %rsp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
callq 0x57f30
movq 0xe1f76(%rip), %rax     # 0x161e00
addq $0x10, %rax
movq %rax, (%rbx)
movq 0xe1f48(%rip), %rax     # 0x161de0
movzwl (%rax), %eax
movw %ax, 0x20(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x6c8(%rbx)
movups %xmm0, 0x6d4(%rbx)
leaq 0x140(%rbx), %rdi
callq 0x59550
movq 0xe1fd5(%rip), %rcx     # 0x161e98
movswl (%rcx), %edx
movq 0xe18b3(%rip), %rcx     # 0x161780
movswl (%rcx), %ecx
movq 0xe1f19(%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 %rbx, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq *0x150(%rax)
cmpl $0x0, 0xb0(%rbx)
jne 0x7ff28
pushq $0x50
popq %rsi
movq %rbx, %rdi
callq 0x5a1f0
cmpl $0x0, 0xb4(%rbx)
jne 0x7ff3c
pushq $0x13
popq %rsi
movq %rbx, %rdi
callq 0x58980
movl $0x5b8, %edi            # imm = 0x5B8
callq 0x56700
movq %rax, %r14
movabsq $0x100000001, %rax      # imm = 0x100000001
leaq 0x10(%rsp), %rsi
movq %rax, (%rsi)
movl 0xb0(%rbx), %eax
movl 0xb4(%rbx), %ecx
addl $-0x13, %eax
addl $-0x2, %ecx
shlq $0x20, %rcx
orq %rcx, %rax
leaq 0x8(%rsp), %rdx
movq %rax, (%rdx)
movq %r14, %rdi
callq 0x56aa0
movq %r14, 0x6e8(%rbx)
addq $0x2f8, %r14            # imm = 0x2F8
movq 0xe173f(%rip), %rsi     # 0x1616d8
movq %r14, %rdi
xorl %edx, %edx
movq %rbx, %rcx
callq 0x80cc2
movl $0x5b8, %edi            # imm = 0x5B8
callq 0x56700
movq %rax, %r14
movabsq $0x300000010, %rax      # imm = 0x300000010
leaq 0x10(%rsp), %rsi
movq %rax, (%rsi)
movl 0xb4(%rbx), %eax
addl $-0x6, %eax
leaq 0x8(%rsp), %rdx
movl $0xd, (%rdx)
movl %eax, 0x4(%rdx)
movq %r14, %rdi
callq 0x56ad0
movq %r14, 0x6f0(%rbx)
movq (%r14), %rax
pushq $0x24
popq %rsi
movq %r14, %rdi
callq *0x120(%rax)
movl $0x2f8, %edi            # imm = 0x2F8
addq 0x6f0(%rbx), %rdi
movq 0xe16cb(%rip), %rsi     # 0x1616d8
xorl %edx, %edx
movq %rbx, %rcx
callq 0x80cc2
movq 0x6e8(%rbx), %rsi
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x30(%rax)
movq 0x6f0(%rbx), %rsi
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x30(%rax)
leaq 0x298(%rbx), %rdi
movq 0xe1343(%rip), %rsi     # 0x161388
xorl %edx, %edx
movq %rbx, %rcx
callq 0x80d5e
leaq 0x688(%rbx), %rdi
movq 0xe18a3(%rip), %rsi     # 0x161900
xorl %edx, %edx
movq %rbx, %rcx
callq 0x80dfa
leaq 0x518(%rbx), %rdi
movq 0xe1e3b(%rip), %rsi     # 0x161eb0
xorl %edx, %edx
movq %rbx, %rcx
callq 0x80e96
addq $0x50, %rsp
popq %rbx
popq %r14
popq %r15
retq
jmp 0x8008b
movq %rax, %r15
movl $0x5b8, %esi            # imm = 0x5B8
movq %r14, %rdi
callq 0x564c0
jmp 0x800b1
movq %rax, %r15
leaq 0x10(%rsp), %rdi
callq 0x57860
jmp 0x800b1
jmp 0x800ae
movq %rax, %r15
movq %rbx, %rdi
callq 0x59f50
movq %r15, %rdi
callq 0x58260
nop