// File: /workspace/github_c_makefile_star2_O1/enzo1982[P]smooth/tools/designer/designer.cpp
// Function: Designer::Designer()
Designer::Designer() : Application("smooth Designer")
{
	dlgcounter = 1;
	active_dlg = NIL;

	wnd		= new GUI::Window(String("smooth Designer v").Append(SMOOTH_VERSION), Point(50, 50), Size(600, 87));
	title		= new Titlebar(TB_MINBUTTON | TB_CLOSEBUTTON);
	menubar		= new Menubar();
	iconbar		= new Menubar();
	statusbar	= new Statusbar("Ready");

	timer1		= new Timer();
	timer1->onInterval.Connect(&Designer::TimerProc, this);

	menu_file	= new PopupMenu();
	menu_dialog	= new PopupMenu();

	menu_widgets		= new PopupMenu();
	menu_widgets_add	= new PopupMenu();
	menu_widgets_add_smooth	= new PopupMenu();

	menubar->AddEntry("File", menu_file);
	menubar->AddEntry("Dialog", menu_dialog);
	menubar->AddEntry("Widgets", menu_widgets);

	menu_file->AddEntry("Exit")->onAction.Connect(&Designer::Close, this);

	menu_dialog->AddEntry("New")->onAction.Connect(&Designer::NewDialog, this);

	menu_widgets->AddEntry("Add", menu_widgets_add);

	menu_widgets_add->AddEntry("smooth controls", menu_widgets_add_smooth);

	menu_widgets_add_smooth->AddEntry("Button")->onAction.Connect(&Designer::AddButton, this);
	menu_widgets_add_smooth->AddEntry("Layer")->onAction.Connect(&Designer::AddLayer, this);
	menu_widgets_add_smooth->AddEntry("Menubar")->onAction.Connect(&Designer::AddMenubar, this);

	Add(wnd);

	wnd->Add(title);
	wnd->Add(menubar);
	wnd->Add(iconbar);
	wnd->Add(statusbar);

	wnd->SetIcon(NIL);

	wnd->doClose.Connect(&Designer::ExitProc, this);

	wnd->Show();

	timer1->Start(100);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x40, %rsp
movq %rdi, %rbx
leaq 0x3a23(%rip), %rsi      # 0x803e
movq %rsp, %r14
movq %r14, %rdi
callq 0x4340
movq %rbx, %rdi
movq %r14, %rsi
callq 0x4330
movq %rsp, %rdi
callq 0x4200
leaq 0x7078(%rip), %rax      # 0xb6b8
movq %rax, (%rbx)
leaq 0x628(%rbx), %r14
movq %r14, %rdi
xorl %esi, %esi
callq 0x4210
leaq 0x660(%rbx), %r15
movq %r15, %rdi
callq 0x4080
leaq 0x727e(%rip), %rax      # 0xb8e8
movq %rax, 0x6a0(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x6a8(%rbx)
leaq 0x71c6(%rip), %rax      # 0xb848
movq %rax, 0x660(%rbx)
movl $0x1, 0x610(%rbx)
movq $0x0, 0x6b8(%rbx)
movl $0x6d8, %edi            # imm = 0x6D8
callq 0x4250
movq %rax, %r13
leaq 0x399c(%rip), %rsi      # 0x804e
movq %rsp, %rdi
callq 0x4340
leaq 0x399f(%rip), %rsi      # 0x8060
leaq 0x18(%rsp), %rdi
callq 0x4340
movq %rsp, %rdi
leaq 0x18(%rsp), %rsi
callq 0x40a0
movabsq $0x3200000032, %rcx     # imm = 0x3200000032
leaq 0x38(%rsp), %rdx
movq %rcx, (%rdx)
movabsq $0x5700000258, %rsi     # imm = 0x5700000258
leaq 0x30(%rsp), %rcx
movq %rsi, (%rcx)
movq %r13, %rdi
movq %rax, %rsi
xorl %r8d, %r8d
callq 0x4160
movq %r13, 0x5b8(%rbx)
leaq 0x18(%rsp), %rdi
callq 0x4200
movq %rsp, %rdi
callq 0x4200
movl $0x5c8, %edi            # imm = 0x5C8
callq 0x4250
movq %rax, %r13
movq %rax, %rdi
movl $0x5, %esi
callq 0x40c0
movq %r13, 0x5c0(%rbx)
movl $0x688, %edi            # imm = 0x688
callq 0x4250
movq %rax, %r13
movq %rax, %rdi
callq 0x4140
movq %r13, 0x5c8(%rbx)
movl $0x688, %edi            # imm = 0x688
callq 0x4250
movq %rax, %r13
movq %rax, %rdi
callq 0x4140
movq %r13, 0x5d0(%rbx)
movl $0x5b8, %edi            # imm = 0x5B8
callq 0x4250
movq %rax, %r13
leaq 0x38d7(%rip), %rsi      # 0x8067
movq %rsp, %rdi
callq 0x4340
movq %rsp, %rsi
movq %r13, %rdi
callq 0x40b0
movq %r13, 0x5d8(%rbx)
movq %rsp, %rdi
callq 0x4200
movl $0x68, %edi
callq 0x4250
movq %rax, %r13
movq %rax, %rdi
callq 0x4290
movq %r13, 0x608(%rbx)
addq $0x48, %r13
leaq 0x4e3(%rip), %rsi       # 0x4cbc
movq %r13, %rdi
xorl %edx, %edx
movq %rbx, %rcx
callq 0x540a
movl $0x6b8, %edi            # imm = 0x6B8
callq 0x4250
movq %rax, %r13
movq %rax, %rdi
callq 0x43a0
movq %r13, 0x5e0(%rbx)
movl $0x6b8, %edi            # imm = 0x6B8
callq 0x4250
movq %rax, %r13
movq %rax, %rdi
callq 0x43a0
movq %r13, 0x5e8(%rbx)
movl $0x6b8, %edi            # imm = 0x6B8
callq 0x4250
movq %rax, %r13
movq %rax, %rdi
callq 0x43a0
movq %r13, 0x5f0(%rbx)
movl $0x6b8, %edi            # imm = 0x6B8
callq 0x4250
movq %rax, %r13
movq %rax, %rdi
callq 0x43a0
movq %r13, 0x5f8(%rbx)
movl $0x6b8, %edi            # imm = 0x6B8
callq 0x4250
movq %rax, %r13
movq %rax, %rdi
callq 0x43a0
movq %r13, 0x600(%rbx)
movq 0x5c8(%rbx), %r12
leaq 0x37ed(%rip), %rsi      # 0x806d
movq %rsp, %rdi
callq 0x4340
movq 0x5e0(%rbx), %rdx
movq %rsp, %rsi
movq %r12, %rdi
callq 0x54c8
movq %rsp, %rdi
callq 0x4200
movq 0x5c8(%rbx), %r12
leaq 0x37c2(%rip), %rsi      # 0x8072
movq %rsp, %rdi
callq 0x4340
movq 0x5e8(%rbx), %rdx
movq %rsp, %rsi
movq %r12, %rdi
callq 0x54c8
movq %rsp, %rdi
callq 0x4200
movq 0x5c8(%rbx), %r12
leaq 0x3799(%rip), %rsi      # 0x8079
movq %rsp, %rdi
callq 0x4340
movq 0x5f0(%rbx), %rdx
movq %rsp, %rsi
movq %r12, %rdi
callq 0x54c8
movq %rsp, %rdi
callq 0x4200
movq 0x5e0(%rbx), %r12
leaq 0x3771(%rip), %rsi      # 0x8081
movq %rsp, %rdi
callq 0x4340
movq %rsp, %rsi
movq %r12, %rdi
xorl %edx, %edx
callq 0x54c8
addq $0x478, %rax            # imm = 0x478
leaq 0x4b2(%rip), %rsi       # 0x4de4
movq %rax, %rdi
xorl %edx, %edx
movq %rbx, %rcx
callq 0x540a
movq %rsp, %rdi
callq 0x4200
movq 0x5e8(%rbx), %r12
leaq 0x3731(%rip), %rsi      # 0x8086
movq %rsp, %rdi
callq 0x4340
movq %rsp, %rsi
movq %r12, %rdi
xorl %edx, %edx
callq 0x54c8
addq $0x478, %rax            # imm = 0x478
leaq 0x479(%rip), %rsi       # 0x4df0
movq %rax, %rdi
xorl %edx, %edx
movq %rbx, %rcx
callq 0x540a
movq %rsp, %rdi
callq 0x4200
movq 0x5f0(%rbx), %r12
leaq 0x36f0(%rip), %rsi      # 0x808a
movq %rsp, %rdi
callq 0x4340
movq 0x5f8(%rbx), %rdx
movq %rsp, %rsi
movq %r12, %rdi
callq 0x54c8
movq %rsp, %rdi
callq 0x4200
movq 0x5f8(%rbx), %r12
leaq 0x36c4(%rip), %rsi      # 0x808e
movq %rsp, %rdi
callq 0x4340
movq 0x600(%rbx), %rdx
movq %rsp, %rsi
movq %r12, %rdi
callq 0x54c8
movq %rsp, %rdi
callq 0x4200
movq 0x600(%rbx), %r12
leaq 0x36a4(%rip), %rsi      # 0x809e
movq %rsp, %rdi
callq 0x4340
movq %rsp, %rsi
movq %r12, %rdi
xorl %edx, %edx
callq 0x54c8
addq $0x478, %rax            # imm = 0x478
leaq 0x4cc(%rip), %rsi       # 0x4ee8
movq %rax, %rdi
xorl %edx, %edx
movq %rbx, %rcx
callq 0x540a
movq %rsp, %rdi
callq 0x4200
movq 0x600(%rbx), %r12
leaq 0x3666(%rip), %rsi      # 0x80a5
movq %rsp, %rdi
callq 0x4340
movq %rsp, %rsi
movq %r12, %rdi
xorl %edx, %edx
callq 0x54c8
addq $0x478, %rax            # imm = 0x478
leaq 0x49f(%rip), %rsi       # 0x4f00
movq %rax, %rdi
xorl %edx, %edx
movq %rbx, %rcx
callq 0x540a
movq %rsp, %rdi
callq 0x4200
movq 0x600(%rbx), %r12
leaq 0x3627(%rip), %rsi      # 0x80ab
movq %rsp, %rdi
callq 0x4340
movq %rsp, %rsi
movq %r12, %rdi
xorl %edx, %edx
callq 0x54c8
addq $0x478, %rax            # imm = 0x478
leaq 0x472(%rip), %rsi       # 0x4f18
movq %rax, %rdi
xorl %edx, %edx
movq %rbx, %rcx
callq 0x540a
movq %rsp, %rdi
callq 0x4200
movq 0x5b8(%rbx), %rsi
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x30(%rax)
movq 0x5b8(%rbx), %rdi
movq 0x5c0(%rbx), %rsi
movq (%rdi), %rax
callq *0x30(%rax)
movq 0x5b8(%rbx), %rdi
movq 0x5c8(%rbx), %rsi
movq (%rdi), %rax
callq *0x30(%rax)
movq 0x5b8(%rbx), %rdi
movq 0x5d0(%rbx), %rsi
movq (%rdi), %rax
callq *0x30(%rax)
movq 0x5b8(%rbx), %rdi
movq 0x5d8(%rbx), %rsi
movq (%rdi), %rax
callq *0x30(%rax)
movq 0x5b8(%rbx), %r12
movq %rsp, %rdi
xorl %esi, %esi
callq 0x4380
movq %rsp, %rsi
movq %r12, %rdi
callq 0x41f0
movq %rsp, %rdi
callq 0x40f0
movl $0x688, %r12d           # imm = 0x688
addq 0x5b8(%rbx), %r12
movq %r12, %rdi
callq 0x5ea8
leaq 0x3d5(%rip), %rsi       # 0x4f30
movq %r12, %rdi
xorl %edx, %edx
movq %rbx, %rcx
callq 0x5ee2
movq 0x5b8(%rbx), %rdi
movq (%rdi), %rax
callq *0x58(%rax)
movq 0x608(%rbx), %rdi
movl $0x64, %esi
callq 0x4030
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %rax, %r12
movq %rsp, %rdi
callq 0x40f0
jmp 0x4c9c
jmp 0x4c99
jmp 0x4c99
jmp 0x4c99
jmp 0x4c99
jmp 0x4c8c
jmp 0x4c99
jmp 0x4c8c
jmp 0x4c99
jmp 0x4c99
jmp 0x4c99
jmp 0x4c8c
jmp 0x4c99
jmp 0x4c8c
jmp 0x4c99
jmp 0x4c8c
jmp 0x4c99
jmp 0x4bfc
jmp 0x4bfc
jmp 0x4bfc
jmp 0x4bfc
movq %rax, %r12
movl $0x6b8, %esi            # imm = 0x6B8
jmp 0x4c63
movq %rax, %r12
movl $0x68, %esi
jmp 0x4c63
movq %rax, %r12
movq %rsp, %rdi
callq 0x4200
jmp 0x4c20
movq %rax, %r12
movl $0x5b8, %esi            # imm = 0x5B8
jmp 0x4c63
jmp 0x4c29
movq %rax, %r12
movl $0x688, %esi            # imm = 0x688
jmp 0x4c63
movq %rax, %r12
movl $0x5c8, %esi            # imm = 0x5C8
jmp 0x4c63
jmp 0x4c3f
movq %rax, %r12
leaq 0x18(%rsp), %rdi
callq 0x4200
jmp 0x4c51
movq %rax, %r12
movq %rsp, %rdi
callq 0x4200
jmp 0x4c5e
movq %rax, %r12
movl $0x6d8, %esi            # imm = 0x6D8
movq %r13, %rdi
callq 0x4050
jmp 0x4c9c
movq %rax, %r12
jmp 0x4ca4
movq %rax, %r12
jmp 0x4cac
movq %rax, %r12
movq %rsp, %rdi
callq 0x4200
jmp 0x4cb4
jmp 0x4c8c
jmp 0x4c8c
jmp 0x4c8c
jmp 0x4c8c
movq %rax, %r12
movq %rsp, %rdi
callq 0x4200
jmp 0x4c9c
movq %rax, %r12
movq %r15, %rdi
callq 0x5542
movq %r14, %rdi
callq 0x4200
movq %rbx, %rdi
callq 0x4220
movq %r12, %rdi
callq 0x4150