// File: /workspace/github_c_makefile_star2_O0/enzo1982[P]smooth/classes/gui/widgets/widget.cpp
// Function: smooth::GUI::Widget::Hide()
S::Int S::GUI::Widget::Hide()
{
	if (!visible) return Success();

	/* Hide child widgets.
	 */
	for (Int i = 0; i < GetNOfObjects(); i++)
	{
		Widget	*object = GetNthObject(i);

		if (object == NIL || !object->IsVisible()) continue;

		object->Hide();
		visible = False;

		object->Show();
		visible = True;
	}

	/* Hide ourself.
	 */
	Surface	*surface = (IsVisible() ? GetDrawSurface() : NIL);

	visible = False;

	if (!registered) return Success();

	if (surface)
	{
		if (focussed) { focussed = False; onLoseFocus.Emit(); }

		surface->Box(GetVisibleArea(), container->GetBackgroundColor(), Rect::Filled);

		DeactivateTooltip();
	}

	/* Reset mouse status.
	 */
	mouseOver	= False;

	leftButtonDown	= False;
	rightButtonDown	= False;

	mouseDragging	= False;

	/* Notify listeners.
	 */
	onHide.Emit();

	return Success();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xe0, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x80(%rbp)
testb $0x1, 0xcb(%rax)
jne 0x87fb5
leaq -0x20(%rbp), %rdi
movq %rdi, -0x90(%rbp)
callq 0x5ca80
movq -0x90(%rbp), %rdi
callq 0x59680
movl %eax, -0x84(%rbp)
jmp 0x87f84
movl -0x84(%rbp), %eax
movl %eax, -0x4(%rbp)
leaq -0x20(%rbp), %rdi
callq 0x5a410
jmp 0x8820c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
leaq -0x20(%rbp), %rdi
callq 0x5a410
jmp 0x88218
movl $0x0, -0x30(%rbp)
movq -0x80(%rbp), %rdi
movl -0x30(%rbp), %eax
movl %eax, -0x94(%rbp)
callq 0x5b470
movl %eax, %ecx
movl -0x94(%rbp), %eax
cmpl %ecx, %eax
jge 0x88039
movq -0x80(%rbp), %rdi
movl -0x30(%rbp), %esi
callq 0x5c230
movq %rax, -0x38(%rbp)
cmpq $0x0, -0x38(%rbp)
je 0x88002
movq -0x38(%rbp), %rdi
movq (%rdi), %rax
callq *0x90(%rax)
testb $0x1, %al
jne 0x88004
jmp 0x8802e
movq -0x38(%rbp), %rdi
movq (%rdi), %rax
callq *0x60(%rax)
movq -0x80(%rbp), %rax
movb $0x0, 0xcb(%rax)
movq -0x38(%rbp), %rdi
movq (%rdi), %rax
callq *0x58(%rax)
movq -0x80(%rbp), %rax
movb $0x1, 0xcb(%rax)
movl -0x30(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x30(%rbp)
jmp 0x87fbc
movq -0x80(%rbp), %rdi
movq (%rdi), %rax
callq *0x90(%rax)
testb $0x1, %al
jne 0x8804c
jmp 0x8805f
movq -0x80(%rbp), %rdi
movq (%rdi), %rax
callq *0x40(%rax)
movq %rax, -0xa0(%rbp)
jmp 0x8806a
xorl %eax, %eax
movq %rax, -0xa0(%rbp)
jmp 0x8806a
movq -0x80(%rbp), %rax
movq -0xa0(%rbp), %rcx
movq %rcx, -0x40(%rbp)
movb $0x0, 0xcb(%rax)
testb $0x1, 0xca(%rax)
jne 0x880de
leaq -0x50(%rbp), %rdi
movq %rdi, -0xb0(%rbp)
callq 0x5ca80
movq -0xb0(%rbp), %rdi
callq 0x59680
movl %eax, -0xa4(%rbp)
jmp 0x880ad
movl -0xa4(%rbp), %eax
movl %eax, -0x4(%rbp)
leaq -0x50(%rbp), %rdi
callq 0x5a410
jmp 0x8820c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
leaq -0x50(%rbp), %rdi
callq 0x5a410
jmp 0x88218
cmpq $0x0, -0x40(%rbp)
je 0x88191
movq -0x80(%rbp), %rax
testb $0x1, 0xcd(%rax)
je 0x8810d
movq -0x80(%rbp), %rdi
movb $0x0, 0xcd(%rdi)
addq $0x518, %rdi            # imm = 0x518
callq 0x8af60
movq -0x80(%rbp), %rdi
movq -0x40(%rbp), %rax
movq %rax, -0xc8(%rbp)
movq (%rdi), %rax
callq *0x130(%rax)
movq %rax, %rcx
movq -0x80(%rbp), %rax
movq %rcx, -0x60(%rbp)
movq %rdx, -0x58(%rbp)
movq 0x190(%rax), %rdi
movq (%rdi), %rax
callq *0x140(%rax)
movq %rax, -0xc0(%rbp)
movq 0x180e4e(%rip), %rax    # 0x208fa0
movl (%rax), %eax
movl %eax, -0xb4(%rbp)
leaq -0x68(%rbp), %rdi
xorl %edx, %edx
movl %edx, %esi
callq 0x59260
movq -0xc8(%rbp), %rdi
movq -0xc0(%rbp), %rdx
movl -0xb4(%rbp), %ecx
leaq -0x60(%rbp), %rsi
leaq -0x68(%rbp), %r8
callq 0x5c110
movq -0x80(%rbp), %rdi
callq 0x5df08
movq -0x80(%rbp), %rdi
movb $0x0, 0xd4(%rdi)
movb $0x0, 0xd5(%rdi)
movb $0x0, 0xd6(%rdi)
movb $0x0, 0xd7(%rdi)
addq $0x218, %rdi            # imm = 0x218
callq 0x8af60
leaq -0x78(%rbp), %rdi
movq %rdi, -0xd8(%rbp)
callq 0x5ca80
movq -0xd8(%rbp), %rdi
callq 0x59680
movl %eax, -0xcc(%rbp)
jmp 0x881e1
movl -0xcc(%rbp), %eax
movl %eax, -0x4(%rbp)
leaq -0x78(%rbp), %rdi
callq 0x5a410
jmp 0x8820c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
leaq -0x78(%rbp), %rdi
callq 0x5a410
jmp 0x88218
movl -0x4(%rbp), %eax
addq $0xe0, %rsp
popq %rbp
retq
movq -0x28(%rbp), %rdi
callq 0x5b6b0
nopw %cs:(%rax,%rax)