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

	scrollbar	= NIL;
	scrollbarPos	= 0;

	font.SetColor(Setup::ClientTextColor);

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

	cursor = new Cursor(Point(3, Math::Ceil(Float(19 - font.GetUnscaledTextSizeY()) / 2) - 2),
			    GetSize() - Size(6, Math::Ceil(Float(19 - font.GetUnscaledTextSizeY()) / 2) - 1));
	cursor->onScroll.Connect(&MultiEdit::OnCursorScroll, this);
	cursor->SetMaxSize(maxSize);
	cursor->SetBackgroundColor(Setup::ClientColor);
	cursor->SetFlags(CF_MULTILINE);
	cursor->SetFont(font);
	cursor->SetText(iText);
	cursor->onInput.Connect(&onInput);

	Add(cursor);

	onInput.SetParentObject(this);

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

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xc0, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movl %r8d, -0x24(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x80(%rbp)
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0x5c220
movq -0x80(%rbp), %rdi
movq 0x16d181(%rip), %rax    # 0x208360
addq $0x10, %rax
movq %rax, (%rdi)
addq $0x5d0, %rdi            # imm = 0x5D0
movq %rdi, -0x78(%rbp)
callq 0x97240
jmp 0x9b1f8
movq -0x80(%rbp), %rdi
movq 0x16d83d(%rip), %rax    # 0x208a40
movswl (%rax), %esi
addq $0x20, %rdi
callq 0x5a2e0
jmp 0x9b211
movq -0x80(%rbp), %rdi
movq $0x0, 0x5c0(%rdi)
movl $0x0, 0x5c8(%rdi)
addq $0x140, %rdi            # imm = 0x140
movq 0x16dba8(%rip), %rsi    # 0x208de0
callq 0x5d110
jmp 0x9b23f
movq -0x80(%rbp), %rdi
callq 0x5a210
movl %eax, -0x84(%rbp)
jmp 0x9b250
movl -0x84(%rbp), %eax
cmpl $0x0, %eax
jne 0x9b28f
movq -0x80(%rbp), %rdi
movl $0x50, %esi
callq 0x5db30
jmp 0x9b26b
jmp 0x9b28f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
jmp 0x9b57f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
jmp 0x9b576
movq -0x80(%rbp), %rdi
callq 0x5b860
movl %eax, -0x88(%rbp)
jmp 0x9b2a0
movl -0x88(%rbp), %eax
cmpl $0x0, %eax
jne 0x9b2bd
movq -0x80(%rbp), %rdi
movl $0x13, %esi
callq 0x5bed0
jmp 0x9b2bb
jmp 0x9b2bd
movl $0x768, %edi            # imm = 0x768
callq 0x59820
movq %rax, -0x90(%rbp)
jmp 0x9b2d0
movq -0x80(%rbp), %rdi
addq $0x140, %rdi            # imm = 0x140
movq 0x16dac6(%rip), %rsi    # 0x208da8
callq 0x5d5e0
movl %eax, -0x94(%rbp)
jmp 0x9b2ef
movl -0x94(%rbp), %ecx
movl $0x13, %eax
subl %ecx, %eax
cvtsi2sd %eax, %xmm0
movsd 0xec080(%rip), %xmm1    # 0x187388
mulsd %xmm1, %xmm0
callq 0x5b240
movq %rax, -0xa0(%rbp)
jmp 0x9b31a
movq -0xa0(%rbp), %rax
movl %eax, %edx
addl $-0x2, %edx
leaq -0x3c(%rbp), %rdi
movl $0x3, %esi
callq 0x5c2c0
jmp 0x9b336
movq -0x80(%rbp), %rdi
callq 0x5bf70
movq %rax, -0xa8(%rbp)
jmp 0x9b348
movq -0x80(%rbp), %rdi
addq $0x140, %rdi            # imm = 0x140
movq 0x16da4e(%rip), %rsi    # 0x208da8
callq 0x5d5e0
movl %eax, -0xac(%rbp)
jmp 0x9b367
movl -0xac(%rbp), %ecx
movl $0x13, %eax
subl %ecx, %eax
cvtsi2sd %eax, %xmm0
movsd 0xec008(%rip), %xmm1    # 0x187388
mulsd %xmm1, %xmm0
callq 0x5b240
movq %rax, -0xb8(%rbp)
jmp 0x9b392
movq -0xb8(%rbp), %rax
movl %eax, %edx
decl %edx
leaq -0x4c(%rbp), %rdi
movl $0x6, %esi
callq 0x59260
jmp 0x9b3ad
movq -0xa8(%rbp), %rdi
leaq -0x4c(%rbp), %rsi
callq 0x5db90
movq %rax, -0xc0(%rbp)
jmp 0x9b3c6
movq -0x90(%rbp), %rdi
movq -0xc0(%rbp), %rax
movq %rax, -0x44(%rbp)
leaq -0x3c(%rbp), %rsi
leaq -0x44(%rbp), %rdx
callq 0x59ed0
jmp 0x9b3e7
movq -0x80(%rbp), %rcx
movq -0x90(%rbp), %rax
movq %rax, 0x5b8(%rcx)
movq 0x5b8(%rcx), %rdi
addq $0x748, %rdi            # imm = 0x748
movq 0x16d86a(%rip), %rax    # 0x208c78
movq %rax, -0x60(%rbp)
movq $0x0, -0x58(%rbp)
movq -0x60(%rbp), %rsi
movq -0x58(%rbp), %rdx
callq 0x9bb90
jmp 0x9b429
movq -0x80(%rbp), %rax
movq 0x5b8(%rax), %rdi
movl -0x24(%rbp), %esi
callq 0x5ca90
jmp 0x9b43e
movq -0x80(%rbp), %rax
movq 0x5b8(%rax), %rdi
movq (%rdi), %rax
movq 0x138(%rax), %rax
movq 0x16d1ee(%rip), %rsi    # 0x208648
callq *%rax
jmp 0x9b45e
movq -0x80(%rbp), %rax
movq 0x5b8(%rax), %rdi
movl $0x1, %esi
callq 0x59730
jmp 0x9b475
movq -0x80(%rbp), %rsi
movq 0x5b8(%rsi), %rdi
addq $0x140, %rsi            # imm = 0x140
movq (%rdi), %rax
movq 0xe0(%rax), %rax
callq *%rax
jmp 0x9b495
movq -0x80(%rbp), %rax
movq 0x5b8(%rax), %rdi
movq -0x10(%rbp), %rsi
movq (%rdi), %rax
movq 0xa0(%rax), %rax
callq *%rax
jmp 0x9b4b2
movq -0x80(%rbp), %rsi
movq 0x5b8(%rsi), %rdi
addq $0x708, %rdi            # imm = 0x708
addq $0x5d0, %rsi            # imm = 0x5D0
callq 0x972e0
jmp 0x9b4d2
movq -0x80(%rbp), %rdi
movq 0x5b8(%rdi), %rsi
movq (%rdi), %rax
movq 0x30(%rax), %rax
callq *%rax
jmp 0x9b4e8
movq -0x80(%rbp), %rsi
movq %rsi, %rdi
addq $0x5d0, %rdi            # imm = 0x5D0
callq 0x8ad00
jmp 0x9b4fd
movq -0x80(%rbp), %rcx
movq %rcx, %rdi
addq $0x298, %rdi            # imm = 0x298
movq 0x16da56(%rip), %rax    # 0x208f68
movq %rax, -0x70(%rbp)
movq $0x0, -0x68(%rbp)
movq -0x70(%rbp), %rsi
movq -0x68(%rbp), %rdx
callq 0x9bcd0
jmp 0x9b52d
movq -0x80(%rbp), %rax
movq %rax, %rdi
addq $0x518, %rdi            # imm = 0x518
movq 0x5b8(%rax), %rsi
addq $0x518, %rsi            # imm = 0x518
callq 0x97550
jmp 0x9b550
addq $0xc0, %rsp
popq %rbp
retq
movq -0x90(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
movl $0x768, %esi            # imm = 0x768
callq 0x595b0
movq -0x78(%rbp), %rdi
callq 0x976c0
movq -0x80(%rbp), %rdi
callq 0x5bd90
movq -0x30(%rbp), %rdi
callq 0x5b6b0
nopw %cs:(%rax,%rax)