implement tab close public method

This commit is contained in:
yggverse 2024-08-12 17:56:58 +03:00
parent a7bd2ae078
commit ea64d486a2
2 changed files with 10 additions and 3 deletions

View File

@ -63,6 +63,13 @@ void Tab::append(
}
};
void Tab::close()
{
remove_page(
get_current_page()
);
}
void Tab::on_label_click(
int n,
double x,
@ -70,8 +77,6 @@ void Tab::on_label_click(
) {
if (n == 2) // double click
{
remove_page(
get_current_page()
);
Tab::close();
}
}

View File

@ -49,6 +49,8 @@ namespace app::browser::main
bool focus
);
void close();
void update();
};
}