// File: eiskalteschatten[P]developersnotebook/src/views/DashboardView.cpp
// Function: DashboardView::DashboardView(void*)
DashboardView::DashboardView(void *window_obj) {
    main_window_obj = window_obj;

    const int grid_spacing = 20;

    main_widget = gtk_grid_new();
    gtk_widget_set_halign(main_widget, GTK_ALIGN_FILL);
    gtk_widget_set_valign(main_widget, GTK_ALIGN_FILL);
    gtk_grid_set_column_spacing(GTK_GRID(main_widget), grid_spacing);
    gtk_grid_set_row_spacing(GTK_GRID(main_widget), grid_spacing);
    gtk_container_set_border_width(GTK_CONTAINER(main_widget), grid_spacing);

    gtk_grid_insert_row(GTK_GRID(main_widget), 0);
    gtk_grid_insert_row(GTK_GRID(main_widget), 1);
    gtk_grid_insert_column(GTK_GRID(main_widget), 0);

    // Setup grid for application title, logo, etc
    {
        GtkWidget *title_grid = gtk_grid_new();

        gtk_grid_insert_row(GTK_GRID(title_grid), 0);
        gtk_grid_insert_row(GTK_GRID(title_grid), 1);
        gtk_grid_insert_column(GTK_GRID(title_grid), 0);
        gtk_grid_insert_column(GTK_GRID(title_grid), 1);

        gtk_grid_set_column_spacing(GTK_GRID(title_grid), 10);

        // -- Logo
        GtkWidget *logo = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 0);
        gtk_widget_set_size_request(logo, 100, 100);
        gtk_widget_set_name(logo, "dashboard-logo");
        gtk_grid_attach(GTK_GRID(title_grid), logo, 0, 0, 1, 2);

        gchar *markup = nullptr;

        // Title
        GtkWidget *title          = gtk_label_new(NULL);
        const gchar *app_name     = Constants::application_name.c_str();
        const gchar *format_title = "<span font_weight=\"heavy\" font_size=\"xx-large\">\%s</span>";
        markup                    = g_markup_printf_escaped(format_title, app_name);
        gtk_label_set_markup(GTK_LABEL(title), markup);

        g_object_set(title, "hexpand", TRUE, NULL);
        gtk_widget_set_halign(title, GTK_ALIGN_START);
        gtk_grid_attach(GTK_GRID(title_grid), title, 1, 0, 1, 1);

        // Slogan
        GtkWidget *slogan          = gtk_label_new(NULL);
        const gchar *app_slogan    = Constants::application_slogan.c_str();
        const gchar *format_slogan = "<span font_size=\"large\">\%s</span>";
        markup                     = g_markup_printf_escaped(format_slogan, app_slogan);
        gtk_label_set_markup(GTK_LABEL(slogan), markup);

        g_object_set(slogan, "hexpand", TRUE, NULL);
        gtk_widget_set_halign(slogan, GTK_ALIGN_START);
        gtk_widget_set_valign(slogan, GTK_ALIGN_START);
        gtk_grid_attach(GTK_GRID(title_grid), slogan, 1, 1, 1, 1);

        g_free(markup);

        gtk_grid_attach(GTK_GRID(main_widget), title_grid, 0, 0, 2, 1);
    }

    // Projects Ending Soon
    {
        GtkWidget *projects_ending_soon_grid = gtk_grid_new();
        gtk_grid_set_row_spacing(GTK_GRID(projects_ending_soon_grid), 10);

        gtk_grid_insert_row(GTK_GRID(projects_ending_soon_grid), 0);
        gtk_grid_insert_row(GTK_GRID(projects_ending_soon_grid), 1);
        gtk_grid_insert_column(GTK_GRID(projects_ending_soon_grid), 0);

        // Title
        GtkWidget *title          = gtk_label_new(NULL);
        const gchar *format_title = "<span font_weight=\"heavy\" font_size=\"x-large\">\%s</span>";
        const gchar *markup       = g_markup_printf_escaped(format_title, "Projects Ending Soon");
        gtk_label_set_markup(GTK_LABEL(title), markup);

        g_object_set(title, "hexpand", TRUE, NULL);
        gtk_widget_set_halign(title, GTK_ALIGN_START);
        gtk_grid_attach(GTK_GRID(projects_ending_soon_grid), title, 0, 0, 1, 1);

        // Tree View
        setup_projects_ending_soon();
        gtk_grid_attach(GTK_GRID(projects_ending_soon_grid), projects_ending_soon_scrolled_window, 0, 1, 1, 1);

        gtk_grid_attach(GTK_GRID(main_widget), projects_ending_soon_grid, 0, 1, 1, 1);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x280, %rsp            # imm = 0x280
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0xa0(%rbp)
callq 0x1ac60
movq -0xa0(%rbp), %rax
movq -0x10(%rbp), %rcx
movq %rcx, 0x28(%rax)
movl $0x14, -0x14(%rbp)
callq 0xaea0
movq %rax, -0x98(%rbp)
jmp 0x1bcd7
movq -0xa0(%rbp), %rax
movq -0x98(%rbp), %rcx
movq %rcx, 0x8(%rax)
movq 0x8(%rax), %rdi
xorl %esi, %esi
callq 0xaff0
jmp 0x1bcf6
movq -0xa0(%rbp), %rax
movq 0x8(%rax), %rdi
xorl %esi, %esi
callq 0xb190
jmp 0x1bd0a
movq -0xa0(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0xb0(%rbp)
callq 0xac20
movq -0xb0(%rbp), %rdi
movq %rax, %rsi
callq 0xa190
movq %rax, -0xa8(%rbp)
jmp 0x1bd39
movq -0xa8(%rbp), %rdi
movl $0x14, %esi
callq 0xa2d0
jmp 0x1bd4c
movq -0xa0(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0xc0(%rbp)
callq 0xac20
movq -0xc0(%rbp), %rdi
movq %rax, %rsi
callq 0xa190
movq %rax, -0xb8(%rbp)
jmp 0x1bd7b
movq -0xb8(%rbp), %rdi
movl $0x14, %esi
callq 0xa5f0
jmp 0x1bd8e
movq -0xa0(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0xd0(%rbp)
callq 0xac10
movq -0xd0(%rbp), %rdi
movq %rax, %rsi
callq 0xa190
movq %rax, -0xc8(%rbp)
jmp 0x1bdbd
movq -0xc8(%rbp), %rdi
movl $0x14, %esi
callq 0xb350
jmp 0x1bdd0
movq -0xa0(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0xe0(%rbp)
callq 0xac20
movq -0xe0(%rbp), %rdi
movq %rax, %rsi
callq 0xa190
movq %rax, -0xd8(%rbp)
jmp 0x1bdff
movq -0xd8(%rbp), %rdi
xorl %esi, %esi
callq 0xa400
jmp 0x1be0f
movq -0xa0(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0xf0(%rbp)
callq 0xac20
movq -0xf0(%rbp), %rdi
movq %rax, %rsi
callq 0xa190
movq %rax, -0xe8(%rbp)
jmp 0x1be3e
movq -0xe8(%rbp), %rdi
movl $0x1, %esi
callq 0xa400
jmp 0x1be51
movq -0xa0(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x100(%rbp)
callq 0xac20
movq -0x100(%rbp), %rdi
movq %rax, %rsi
callq 0xa190
movq %rax, -0xf8(%rbp)
jmp 0x1be80
movq -0xf8(%rbp), %rdi
xorl %esi, %esi
callq 0xa930
jmp 0x1be90
callq 0xaea0
movq %rax, -0x108(%rbp)
jmp 0x1be9e
movq -0x108(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movq %rax, -0x118(%rbp)
callq 0xac20
movq -0x118(%rbp), %rdi
movq %rax, %rsi
callq 0xa190
movq %rax, -0x110(%rbp)
jmp 0x1bed1
movq -0x110(%rbp), %rdi
xorl %esi, %esi
callq 0xa400
jmp 0x1bee1
movq -0x30(%rbp), %rax
movq %rax, -0x128(%rbp)
callq 0xac20
movq -0x128(%rbp), %rdi
movq %rax, %rsi
callq 0xa190
movq %rax, -0x120(%rbp)
jmp 0x1bf09
movq -0x120(%rbp), %rdi
movl $0x1, %esi
callq 0xa400
jmp 0x1bf1c
movq -0x30(%rbp), %rax
movq %rax, -0x138(%rbp)
callq 0xac20
movq -0x138(%rbp), %rdi
movq %rax, %rsi
callq 0xa190
movq %rax, -0x130(%rbp)
jmp 0x1bf44
movq -0x130(%rbp), %rdi
xorl %esi, %esi
callq 0xa930
jmp 0x1bf54
movq -0x30(%rbp), %rax
movq %rax, -0x148(%rbp)
callq 0xac20
movq -0x148(%rbp), %rdi
movq %rax, %rsi
callq 0xa190
movq %rax, -0x140(%rbp)
jmp 0x1bf7c
movq -0x140(%rbp), %rdi
movl $0x1, %esi
callq 0xa930
jmp 0x1bf8f
movq -0x30(%rbp), %rax
movq %rax, -0x158(%rbp)
callq 0xac20
movq -0x158(%rbp), %rdi
movq %rax, %rsi
callq 0xa190
movq %rax, -0x150(%rbp)
jmp 0x1bfb7
movq -0x150(%rbp), %rdi
movl $0xa, %esi
callq 0xa2d0
jmp 0x1bfca
xorl %esi, %esi
movl %esi, %edi
callq 0xb2b0
movq %rax, -0x160(%rbp)
jmp 0x1bfdc
movq -0x160(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rdi
movl $0x64, %edx
movl %edx, %esi
callq 0xb3c0
jmp 0x1bff9
movq -0x38(%rbp), %rdi
leaq 0x3763f(%rip), %rsi     # 0x53643
callq 0xa2f0
jmp 0x1c00b
movq -0x30(%rbp), %rax
movq %rax, -0x170(%rbp)
callq 0xac20
movq -0x170(%rbp), %rdi
movq %rax, %rsi
callq 0xa190
movq %rax, -0x168(%rbp)
jmp 0x1c033
movq -0x168(%rbp), %rdi
movq -0x38(%rbp), %rsi
xorl %ecx, %ecx
movl $0x1, %r8d
movl $0x2, %r9d
movl %ecx, %edx
callq 0xad40
jmp 0x1c055
movq $0x0, -0x40(%rbp)
xorl %eax, %eax
movl %eax, %edi
callq 0xaa60
movq %rax, -0x178(%rbp)
jmp 0x1c06f
movq -0x178(%rbp), %rax
movq %rax, -0x48(%rbp)
leaq 0x5a4ff(%rip), %rdi     # 0x76580
callq 0xa1d0
movq %rax, -0x50(%rbp)
leaq 0x375c1(%rip), %rax     # 0x53652
movq %rax, -0x58(%rbp)
movq -0x58(%rbp), %rdi
movq -0x50(%rbp), %rsi
xorl %eax, %eax
callq 0xa370
movq %rax, -0x180(%rbp)
jmp 0x1c0ad
movq -0x180(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x48(%rbp), %rax
movq %rax, -0x190(%rbp)
callq 0xb0d0
movq -0x190(%rbp), %rdi
movq %rax, %rsi
callq 0xa190
movq %rax, -0x188(%rbp)
jmp 0x1c0e0
movq -0x188(%rbp), %rdi
movq -0x40(%rbp), %rsi
callq 0xaf20
jmp 0x1c0f2
movq -0x48(%rbp), %rdi
leaq 0x3735c(%rip), %rsi     # 0x53459
xorl %eax, %eax
movl %eax, %ecx
movl $0x1, %edx
callq 0xb230
jmp 0x1c10d
movq -0x48(%rbp), %rdi
movl $0x1, %esi
callq 0xaff0
jmp 0x1c11d
movq -0x30(%rbp), %rax
movq %rax, -0x1a0(%rbp)
callq 0xac20
movq -0x1a0(%rbp), %rdi
movq %rax, %rsi
callq 0xa190
movq %rax, -0x198(%rbp)
jmp 0x1c145
movq -0x198(%rbp), %rdi
movq -0x48(%rbp), %rsi
xorl %ecx, %ecx
movl $0x1, %r9d
movl %r9d, %edx
movl %r9d, %r8d
callq 0xad40
jmp 0x1c165
xorl %eax, %eax
movl %eax, %edi
callq 0xaa60
movq %rax, -0x1a8(%rbp)
jmp 0x1c177
movq -0x1a8(%rbp), %rax
movq %rax, -0x60(%rbp)
leaq 0x5a457(%rip), %rdi     # 0x765e0
callq 0xa1d0
movq %rax, -0x68(%rbp)
leaq 0x374f2(%rip), %rax     # 0x5368b
movq %rax, -0x70(%rbp)
movq -0x70(%rbp), %rdi
movq -0x68(%rbp), %rsi
xorl %eax, %eax
callq 0xa370
movq %rax, -0x1b0(%rbp)
jmp 0x1c1b5
movq -0x1b0(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x60(%rbp), %rax
movq %rax, -0x1c0(%rbp)
callq 0xb0d0
movq -0x1c0(%rbp), %rdi
movq %rax, %rsi
callq 0xa190
movq %rax, -0x1b8(%rbp)
jmp 0x1c1e8
movq -0x1b8(%rbp), %rdi
movq -0x40(%rbp), %rsi
callq 0xaf20
jmp 0x1c1fa
movq -0x60(%rbp), %rdi
leaq 0x37254(%rip), %rsi     # 0x53459
xorl %eax, %eax
movl %eax, %ecx
movl $0x1, %edx
callq 0xb230
jmp 0x1c215
movq -0x60(%rbp), %rdi
movl $0x1, %esi
callq 0xaff0
jmp 0x1c225
movq -0x60(%rbp), %rdi
movl $0x1, %esi
callq 0xb190
jmp 0x1c235
movq -0x30(%rbp), %rax
movq %rax, -0x1d0(%rbp)
callq 0xac20
movq -0x1d0(%rbp), %rdi
movq %rax, %rsi
callq 0xa190
movq %rax, -0x1c8(%rbp)
jmp 0x1c25d
movq -0x1c8(%rbp), %rdi
movq -0x60(%rbp), %rsi
movl $0x1, %r9d
movl %r9d, %edx
movl %r9d, %ecx
movl %r9d, %r8d
callq 0xad40
jmp 0x1c27e
movq -0x40(%rbp), %rdi
callq 0xb428
jmp 0x1c289
movq -0xa0(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x1e0(%rbp)
callq 0xac20
movq -0x1e0(%rbp), %rdi
movq %rax, %rsi
callq 0xa190
movq %rax, -0x1d8(%rbp)
jmp 0x1c2b8
movq -0x1d8(%rbp), %rdi
movq -0x30(%rbp), %rsi
xorl %ecx, %ecx
movl $0x2, %r8d
movl $0x1, %r9d
movl %ecx, %edx
callq 0xad40
jmp 0x1c2da
callq 0xaea0
movq %rax, -0x1e8(%rbp)
jmp 0x1c2e8
movq -0x1e8(%rbp), %rax
movq %rax, -0x78(%rbp)
movq -0x78(%rbp), %rax
movq %rax, -0x1f8(%rbp)
callq 0xac20
movq -0x1f8(%rbp), %rdi
movq %rax, %rsi
callq 0xa190
movq %rax, -0x1f0(%rbp)
jmp 0x1c31b
movq -0x1f0(%rbp), %rdi
movl $0xa, %esi
callq 0xa5f0
jmp 0x1c32e
movq -0x78(%rbp), %rax
movq %rax, -0x208(%rbp)
callq 0xac20
movq -0x208(%rbp), %rdi
movq %rax, %rsi
callq 0xa190
movq %rax, -0x200(%rbp)
jmp 0x1c356
movq -0x200(%rbp), %rdi
xorl %esi, %esi
callq 0xa400
jmp 0x1c366
movq -0x78(%rbp), %rax
movq %rax, -0x218(%rbp)
callq 0xac20
movq -0x218(%rbp), %rdi
movq %rax, %rsi
callq 0xa190
movq %rax, -0x210(%rbp)
jmp 0x1c38e
movq -0x210(%rbp), %rdi
movl $0x1, %esi
callq 0xa400
jmp 0x1c3a1
movq -0x78(%rbp), %rax
movq %rax, -0x228(%rbp)
callq 0xac20
movq -0x228(%rbp), %rdi
movq %rax, %rsi
callq 0xa190
movq %rax, -0x220(%rbp)
jmp 0x1c3c9
movq -0x220(%rbp), %rdi
xorl %esi, %esi
callq 0xa930
jmp 0x1c3d9
xorl %eax, %eax
movl %eax, %edi
callq 0xaa60
movq %rax, -0x230(%rbp)
jmp 0x1c3eb
movq -0x230(%rbp), %rax
movq %rax, -0x80(%rbp)
leaq 0x372b0(%rip), %rax     # 0x536ad
movq %rax, -0x88(%rbp)
movq -0x88(%rbp), %rdi
leaq 0x372d3(%rip), %rsi     # 0x536e5
xorl %eax, %eax
callq 0xa370
movq %rax, -0x238(%rbp)
jmp 0x1c422
movq -0x238(%rbp), %rax
movq %rax, -0x90(%rbp)
movq -0x80(%rbp), %rax
movq %rax, -0x248(%rbp)
callq 0xb0d0
movq -0x248(%rbp), %rdi
movq %rax, %rsi
callq 0xa190
movq %rax, -0x240(%rbp)
jmp 0x1c458
movq -0x240(%rbp), %rdi
movq -0x90(%rbp), %rsi
callq 0xaf20
jmp 0x1c46d
movq -0x80(%rbp), %rdi
leaq 0x36fe1(%rip), %rsi     # 0x53459
xorl %eax, %eax
movl %eax, %ecx
movl $0x1, %edx
callq 0xb230
jmp 0x1c488
movq -0x80(%rbp), %rdi
movl $0x1, %esi
callq 0xaff0
jmp 0x1c498
movq -0x78(%rbp), %rax
movq %rax, -0x258(%rbp)
callq 0xac20
movq -0x258(%rbp), %rdi
movq %rax, %rsi
callq 0xa190
movq %rax, -0x250(%rbp)
jmp 0x1c4c0
movq -0x250(%rbp), %rdi
movq -0x80(%rbp), %rsi
xorl %ecx, %ecx
movl $0x1, %r9d
movl %ecx, %edx
movl %r9d, %r8d
callq 0xad40
jmp 0x1c4df
movq -0xa0(%rbp), %rdi
callq 0x1c5c0
jmp 0x1c4ed
movq -0x78(%rbp), %rax
movq %rax, -0x268(%rbp)
callq 0xac20
movq -0x268(%rbp), %rdi
movq %rax, %rsi
callq 0xa190
movq %rax, -0x260(%rbp)
jmp 0x1c515
movq -0x260(%rbp), %rdi
movq -0xa0(%rbp), %rax
movq 0x18(%rax), %rsi
xorl %edx, %edx
movl $0x1, %r9d
movl %r9d, %ecx
movl %r9d, %r8d
callq 0xad40
jmp 0x1c53c
movq -0xa0(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x278(%rbp)
callq 0xac20
movq -0x278(%rbp), %rdi
movq %rax, %rsi
callq 0xa190
movq %rax, -0x270(%rbp)
jmp 0x1c56b
movq -0x270(%rbp), %rdi
movq -0x78(%rbp), %rsi
xorl %edx, %edx
movl $0x1, %r9d
movl %r9d, %ecx
movl %r9d, %r8d
callq 0xad40
jmp 0x1c58b
addq $0x280, %rsp            # imm = 0x280
popq %rbp
retq
movq -0xa0(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
callq 0x1ac90
movq -0x20(%rbp), %rdi
callq 0xaa00
nopw %cs:(%rax,%rax)