// File: /workspace/github_c_makefile_star2_O0/enzo1982[P]smooth/classes/gui/widgets/multi/list/combobox.cpp
// Function: smooth::GUI::ComboBox::CloseListBox()
S::Void S::GUI::ComboBox::CloseListBox()
{
	if (listBox == NIL) return;

	Window	*window = container->GetContainerWindow();

	toolWindow->onLoseFocus.Disconnect(&ComboBox::CloseListBox, this);
	toolWindow->Close();

	window->onChangePosition.Disconnect(&ComboBox::CloseListBox, this);
	window->onChangeSize.Disconnect(&ComboBox::CloseListBox, this);

	listBox->RemoveAllEntries();

	for (Int i = 0; i < Length(); i++)
	{
		ListEntry	*entry = GetNthEntry(i);

		entry->SetTooltipText(NIL);

		entry->Hide();
		entry->Deactivate();

		entry->SetRegisteredFlag(True);
		entry->SetContainer(this);
	}

	toolWindow->Remove(listBox);

	Remove(toolWindow);

	DeleteObject(listBox);
	DeleteObject(toolWindow);

	listBox	   = NIL;
	toolWindow = NIL;

	listBoxClosed = S::System::System::Clock();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xa0, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x80(%rbp)
cmpq $0x0, 0x6d0(%rax)
jne 0xae3f6
jmp 0xae615
movq -0x80(%rbp), %rax
movq 0x190(%rax), %rdi
callq 0x59bc0
movq -0x80(%rbp), %rcx
movq %rax, -0x10(%rbp)
movq 0x6c8(%rcx), %rdi
addq $0x518, %rdi            # imm = 0x518
movq 0x15aa85(%rip), %rax    # 0x208ea8
movq %rax, -0x88(%rbp)
movq %rax, -0x20(%rbp)
movq $0x0, -0x18(%rbp)
movq -0x20(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0xaf990
movq -0x80(%rbp), %rax
movq 0x6c8(%rax), %rdi
callq 0x5ce80
movq -0x80(%rbp), %rcx
movq -0x88(%rbp), %rax
movq -0x10(%rbp), %rdi
addq $0x278, %rdi            # imm = 0x278
movq %rax, -0x30(%rbp)
movq $0x0, -0x28(%rbp)
movq -0x30(%rbp), %rsi
movq -0x28(%rbp), %rdx
callq 0xafb10
movq -0x80(%rbp), %rcx
movq -0x88(%rbp), %rax
movq -0x10(%rbp), %rdi
addq $0x298, %rdi            # imm = 0x298
movq %rax, -0x40(%rbp)
movq $0x0, -0x38(%rbp)
movq -0x40(%rbp), %rsi
movq -0x38(%rbp), %rdx
callq 0xafc90
movq -0x80(%rbp), %rax
movq 0x6d0(%rax), %rdi
movq (%rdi), %rax
callq *0x168(%rax)
movl $0x0, -0x44(%rbp)
movq -0x80(%rbp), %rdi
movl -0x44(%rbp), %eax
movl %eax, -0x8c(%rbp)
movq (%rdi), %rax
callq *0x178(%rax)
movl %eax, %ecx
movl -0x8c(%rbp), %eax
cmpl %ecx, %eax
jge 0xae59f
movq -0x80(%rbp), %rdi
movl -0x44(%rbp), %esi
movq (%rdi), %rax
movq 0x180(%rax), %rax
callq *%rax
movq %rax, -0x50(%rbp)
movq -0x50(%rbp), %rax
movq %rax, -0xa0(%rbp)
leaq -0x68(%rbp), %rdi
movq %rdi, -0x98(%rbp)
xorl %esi, %esi
callq 0x5da90
movq -0xa0(%rbp), %rdi
movq -0x98(%rbp), %rsi
movq (%rdi), %rax
movq 0xb0(%rax), %rax
callq *%rax
jmp 0xae542
leaq -0x68(%rbp), %rdi
callq 0x5df00
movq -0x50(%rbp), %rdi
movq (%rdi), %rax
callq *0x60(%rax)
movq -0x50(%rbp), %rdi
movq (%rdi), %rax
callq *0x70(%rax)
movq -0x50(%rbp), %rdi
movl $0x1, %esi
callq 0x5ba80
movq -0x80(%rbp), %rsi
movq -0x50(%rbp), %rdi
callq 0x598b0
movl -0x44(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x44(%rbp)
jmp 0xae4cc
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x70(%rbp)
movl %eax, -0x74(%rbp)
leaq -0x68(%rbp), %rdi
callq 0x5df00
jmp 0xae61e
movq -0x80(%rbp), %rax
movq 0x6c8(%rax), %rdi
movq 0x6d0(%rax), %rsi
movq (%rdi), %rax
callq *0x38(%rax)
movq -0x80(%rbp), %rdi
movq 0x6c8(%rdi), %rsi
movq (%rdi), %rax
callq *0x38(%rax)
movq -0x80(%rbp), %rax
movq 0x6d0(%rax), %rdi
callq 0x5d8d0
movq -0x80(%rbp), %rax
movq 0x6c8(%rax), %rdi
callq 0x5d8d0
movq -0x80(%rbp), %rax
movq $0x0, 0x6d0(%rax)
movq $0x0, 0x6c8(%rax)
callq 0x5b700
movq %rax, %rcx
movq -0x80(%rbp), %rax
movq %rcx, 0x6d8(%rax)
addq $0xa0, %rsp
popq %rbp
retq
movq -0x70(%rbp), %rdi
callq 0x5b6b0
nopw (%rax,%rax)