// File: /workspace/github_c_makefile_star2_O3/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 0x56da0
movq 0xe9f86(%rip), %rax     # 0x16be00
addq $0x10, %rax
movq %rax, (%rbx)
movq 0xe9f58(%rip), %rax     # 0x16bde0
movzwl (%rax), %eax
movw %ax, 0x20(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x6c8(%rbx)
movups %xmm0, 0x6d4(%rbx)
leaq 0x140(%rbx), %rdi
callq 0x582a0
movq 0xe9fe5(%rip), %rcx     # 0x16be98
movswl (%rcx), %edx
movq 0xe98c3(%rip), %rcx     # 0x16b780
movswl (%rcx), %ecx
movq 0xe9f29(%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 %rbx, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq *0x150(%rax)
cmpl $0x0, 0xb0(%rbx)
jne 0x81f34
leaq 0xa8(%rbx), %rsi
movl 0xb4(%rbx), %eax
leaq 0x10(%rsp), %rdx
movl $0x50, (%rdx)
movl %eax, 0x4(%rdx)
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x150(%rax)
cmpl $0x0, 0xb4(%rbx)
jne 0x81f64
leaq 0xa8(%rbx), %rsi
movl 0xb0(%rbx), %eax
leaq 0x10(%rsp), %rdx
movl %eax, (%rdx)
movl $0x13, 0x4(%rdx)
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x150(%rax)
movl $0x5b8, %edi            # imm = 0x5B8
callq 0x556b0
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 0x55a30
movq %r14, 0x6e8(%rbx)
addq $0x2f8, %r14            # imm = 0x2F8
movq 0xe9717(%rip), %rsi     # 0x16b6d8
movq %r14, %rdi
xorl %edx, %edx
movq %rbx, %rcx
callq 0x82d12
movl $0x5b8, %edi            # imm = 0x5B8
callq 0x556b0
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 0x55a60
movq %r14, 0x6f0(%rbx)
movq (%r14), %rax
movq %r14, %rdi
movl $0x24, %esi
callq *0x120(%rax)
movl $0x2f8, %edi            # imm = 0x2F8
addq 0x6f0(%rbx), %rdi
movq 0xe96a1(%rip), %rsi     # 0x16b6d8
xorl %edx, %edx
movq %rbx, %rcx
callq 0x82d12
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 0xe9319(%rip), %rsi     # 0x16b388
xorl %edx, %edx
movq %rbx, %rcx
callq 0x82dd2
leaq 0x688(%rbx), %rdi
movq 0xe9879(%rip), %rsi     # 0x16b900
xorl %edx, %edx
movq %rbx, %rcx
callq 0x82e92
leaq 0x518(%rbx), %rdi
movq 0xe9e11(%rip), %rsi     # 0x16beb0
xorl %edx, %edx
movq %rbx, %rcx
callq 0x82f52
addq $0x50, %rsp
popq %rbx
popq %r14
popq %r15
retq
jmp 0x820b5
movq %rax, %r15
movl $0x5b8, %esi            # imm = 0x5B8
movq %r14, %rdi
callq 0x55480
jmp 0x820db
movq %rax, %r15
leaq 0x10(%rsp), %rdi
callq 0x56720
jmp 0x820db
jmp 0x820d8
movq %rax, %r15
movq %rbx, %rdi
callq 0x58c00
movq %r15, %rdi
callq 0x57090
nop