// File: /workspace/github_c_makefile_star2_O2/enzo1982[P]smooth/classes/gui/widgets/basic/editbox.cpp
// Function: smooth::GUI::EditBox::EditBox(smooth::GUI::Point const&, smooth::GUI::Size const&, int)
S::GUI::EditBox::EditBox(const Point &iPos, const Size &iSize, Int maxSize) : Widget(iPos, iSize)
{
	type		= classID;

	dropDownList	= NIL;
	comboBox	= NIL;

	font.SetColor(Setup::ClientTextColor);

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

	cursor = new Cursor(Point(3, Math::Ceil(Float(GetHeight() - font.GetUnscaledTextSizeY()) / 2) - 2),
			    GetSize() - Size(6, Math::Ceil(Float(GetHeight() - font.GetUnscaledTextSizeY()) / 2) - 1));
	cursor->SetMaxSize(maxSize);
	cursor->SetBackgroundColor(Setup::ClientColor);
	cursor->SetFont(font);
	cursor->onInput.Connect(&onInput);
	cursor->onEnter.Connect(&onEnter);

	Add(cursor);

	onInput.SetParentObject(this);
	onEnter.SetParentObject(this);

	onChangeSize.Connect(&EditBox::OnChangeSize, this);
	onLoseFocus.Connect(&cursor->onLoseFocus);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %ecx, %ebp
movq %rdi, %rbx
callq 0x58c80
movq 0xecf2d(%rip), %rax     # 0x161dd8
addq $0x10, %rax
movq %rax, (%rbx)
leaq 0x5d0(%rbx), %rax
movq %rax, (%rsp)
andq $0x0, 0x5d8(%rbx)
leaq 0xe3914(%rip), %rax     # 0x1587e0
movq %rax, 0x5d0(%rbx)
xorpd %xmm0, %xmm0
movupd %xmm0, 0x5e0(%rbx)
leaq 0x5f0(%rbx), %r15
andq $0x0, 0x5f8(%rbx)
movq %rax, 0x5f0(%rbx)
movupd %xmm0, 0x600(%rbx)
andq $0x0, 0x618(%rbx)
leaq 0xe390c(%rip), %rax     # 0x158818
movq %rax, 0x610(%rbx)
movupd %xmm0, 0x620(%rbx)
movq 0xec4e6(%rip), %rax     # 0x161408
movzwl (%rax), %eax
movw %ax, 0x20(%rbx)
leaq 0x140(%rbx), %r12
movupd %xmm0, 0x5c0(%rbx)
movq 0xeceb1(%rip), %rsi     # 0x161df0
movq %r12, %rdi
callq 0x59940
cmpl $0x0, 0xb0(%rbx)
jne 0x74f5b
pushq $0x50
popq %rsi
movq %rbx, %rdi
callq 0x5a1f0
cmpl $0x0, 0xb4(%rbx)
jne 0x74f6f
pushq $0x13
popq %rsi
movq %rbx, %rdi
callq 0x58980
movl $0x768, %edi            # imm = 0x768
callq 0x56700
movq %rax, %r13
movl 0xb4(%rbx), %r14d
movq 0xece2e(%rip), %rsi     # 0x161db8
movq %r12, %rdi
callq 0x59d90
subl %eax, %r14d
cvtsi2sd %r14d, %xmm0
mulsd 0x6e3de(%rip), %xmm0    # 0xe3380
callq 0x57e30
addl $-0x2, %eax
movl $0x3, 0x8(%rsp)
movl %eax, 0xc(%rsp)
movl 0xb4(%rbx), %r14d
movq 0xecdf4(%rip), %rsi     # 0x161db8
movq %r12, %rdi
callq 0x59d90
subl %eax, %r14d
cvtsi2sd %r14d, %xmm0
mulsd 0x6e3a4(%rip), %xmm0    # 0xe3380
callq 0x57e30
movl 0xb0(%rbx), %ecx
movl 0xb4(%rbx), %edx
addl $-0x6, %ecx
subl %eax, %edx
incl %edx
shlq $0x20, %rdx
orq %rdx, %rcx
leaq 0x10(%rsp), %rdx
movq %rcx, (%rdx)
leaq 0x8(%rsp), %rsi
movq %r13, %rdi
callq 0x56d10
movq %r13, 0x5b8(%rbx)
movq %r13, %rdi
movl %ebp, %esi
callq 0x59380
movq 0x5b8(%rbx), %rdi
movq (%rdi), %rax
movq 0xec63e(%rip), %rsi     # 0x161670
callq *0x138(%rax)
movq 0x5b8(%rbx), %rdi
movq (%rdi), %rax
movq %r12, %rsi
callq *0xe0(%rax)
movl $0x708, %edi            # imm = 0x708
addq 0x5b8(%rbx), %rdi
movq (%rsp), %rsi
callq 0x75890
movl $0x728, %edi            # imm = 0x728
addq 0x5b8(%rbx), %rdi
movq %r15, %rsi
callq 0x75890
movq 0x5b8(%rbx), %rsi
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x30(%rax)
movq %rbx, 0x5d8(%rbx)
movq %rbx, 0x5f8(%rbx)
leaq 0x298(%rbx), %rdi
movq 0xecac0(%rip), %rsi     # 0x161b60
xorl %edx, %edx
movq %rbx, %rcx
callq 0x7591e
movl $0x518, %esi            # imm = 0x518
leaq (%rbx,%rsi), %rdi
addq 0x5b8(%rbx), %rsi
callq 0x759ba
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x750d0
movq %rax, %r12
movl $0x768, %esi            # imm = 0x768
movq %r13, %rdi
callq 0x564c0
jmp 0x750e5
movq %rax, %r12
leaq 0x610(%rbx), %rdi
callq 0x75a48
movq %r15, %rdi
callq 0x75a62
movq (%rsp), %rdi
callq 0x75a62
movq %rbx, %rdi
callq 0x58860
movq %r12, %rdi
callq 0x58260