// File: /workspace/github_c_makefile_star2_O0/enzo1982[P]smooth/classes/gui/widgets/basic/editbox.cpp
// Function: smooth::GUI::EditBox::SetDropDownList(smooth::GUI::List*)
S::Int S::GUI::EditBox::SetDropDownList(List *nDropDownList)
{
	Surface	*surface = GetDrawSurface();

	surface->StartPaint(GetVisibleArea());

	if (comboBox != NIL) DeleteObject(comboBox);

	dropDownList = nDropDownList;

	if (dropDownList != NIL)
	{
		comboBox = new ComboBox(Point(), Size());
		comboBox->SetFlags(CB_HOTSPOTONLY);
		comboBox->onSelectEntry.Connect(&EditBox::OnSelectEntry, this);

		for (Int i = 0; i < dropDownList->Length(); i++)
		{
			if (dropDownList->GetNthEntry(i)->GetObjectType() == ListEntrySeparator::classID) comboBox->AddSeparator();
			else										  comboBox->AddEntry(dropDownList->GetNthEntry(i)->GetText());
		}

		Add(comboBox);

		OnChangeSize(GetSize());
	}

	Paint(SP_PAINT);

	surface->EndPaint();

	return Success();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xb0, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x78(%rbp)
movq (%rdi), %rax
callq *0x40(%rax)
movq -0x78(%rbp), %rdi
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x80(%rbp)
movq (%rdi), %rax
callq *0x130(%rax)
movq -0x80(%rbp), %rdi
movq %rax, -0x28(%rbp)
movq %rdx, -0x20(%rbp)
leaq -0x28(%rbp), %rsi
callq 0x591b0
movq -0x78(%rbp), %rax
cmpq $0x0, 0x5c8(%rax)
je 0x96f5d
movq -0x78(%rbp), %rax
movq 0x5c8(%rax), %rdi
callq 0x5d8d0
movq -0x78(%rbp), %rax
movq -0x10(%rbp), %rcx
movq %rcx, 0x5c0(%rax)
cmpq $0x0, 0x5c0(%rax)
je 0x97123
movl $0x6f8, %edi            # imm = 0x6F8
callq 0x59820
movq %rax, -0x88(%rbp)
leaq -0x30(%rbp), %rdi
callq 0x5b530
jmp 0x96f96
leaq -0x44(%rbp), %rdi
callq 0x59230
jmp 0x96fa1
movq -0x88(%rbp), %rdi
leaq -0x30(%rbp), %rsi
leaq -0x44(%rbp), %rdx
callq 0x597c0
jmp 0x96fb7
movq -0x78(%rbp), %rax
movq -0x88(%rbp), %rcx
movq %rcx, 0x5c8(%rax)
movq 0x5c8(%rax), %rdi
movl $0x1, %esi
callq 0x59730
movq -0x78(%rbp), %rcx
movq 0x5c8(%rcx), %rdi
addq $0x688, %rdi            # imm = 0x688
movq 0x1713b5(%rip), %rax    # 0x2083a8
movq %rax, -0x58(%rbp)
movq $0x0, -0x50(%rbp)
movq -0x58(%rbp), %rsi
movq -0x50(%rbp), %rdx
callq 0x97700
movl $0x0, -0x5c(%rbp)
movq -0x78(%rbp), %rax
movl -0x5c(%rbp), %ecx
movl %ecx, -0x8c(%rbp)
movq 0x5c0(%rax), %rdi
movq (%rdi), %rax
callq *0x178(%rax)
movl %eax, %ecx
movl -0x8c(%rbp), %eax
cmpl %ecx, %eax
jge 0x970fd
movq -0x78(%rbp), %rax
movq 0x5c0(%rax), %rdi
movl -0x5c(%rbp), %esi
movq (%rdi), %rax
callq *0x180(%rax)
movq %rax, %rdi
callq 0x5bb10
movq %rax, %rdi
movq 0x171b3f(%rip), %rax    # 0x208ba8
movswl (%rax), %esi
callq 0x5bc10
testb $0x1, %al
jne 0x97077
jmp 0x970ab
movq -0x78(%rbp), %rax
movq 0x5c8(%rax), %rdi
callq 0x5b9e0
jmp 0x970ed
movq -0x88(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
movl $0x6f8, %esi            # imm = 0x6F8
callq 0x595b0
jmp 0x9718c
movq -0x78(%rbp), %rax
movq 0x5c8(%rax), %rcx
movq %rcx, -0x98(%rbp)
movq 0x5c0(%rax), %rdi
movl -0x5c(%rbp), %esi
movq (%rdi), %rax
callq *0x180(%rax)
movq %rax, %rdi
movq (%rdi), %rax
callq *0xa8(%rax)
movq -0x98(%rbp), %rdi
movq %rax, %rsi
xorl %edx, %edx
callq 0x5dc60
jmp 0x970ef
movl -0x5c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x5c(%rbp)
jmp 0x97013
movq -0x78(%rbp), %rdi
movq 0x5c8(%rdi), %rsi
movq (%rdi), %rax
callq *0x30(%rax)
movq -0x78(%rbp), %rdi
callq 0x5bf70
movq -0x78(%rbp), %rdi
movq %rax, %rsi
callq 0x5de98
movq -0x78(%rbp), %rdi
movq (%rdi), %rax
movq 0x78(%rax), %rax
xorl %esi, %esi
callq *%rax
movq -0x18(%rbp), %rdi
callq 0x5d270
leaq -0x70(%rbp), %rdi
movq %rdi, -0xa8(%rbp)
callq 0x5ca80
movq -0xa8(%rbp), %rdi
callq 0x59680
movl %eax, -0x9c(%rbp)
jmp 0x9715f
leaq -0x70(%rbp), %rdi
callq 0x5a410
movl -0x9c(%rbp), %eax
addq $0xb0, %rsp
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x70(%rbp), %rdi
callq 0x5a410
movq -0x38(%rbp), %rdi
callq 0x5b6b0
nopw %cs:(%rax,%rax)