LibGUI: Add a GAbstractButton base class for button widgets.

This patch moves GButton and GRadioButton to inherit from it. This allows
them to share code for mouse event handling, etc.
This commit is contained in:
Andreas Kling 2019-05-24 16:32:20 +02:00
parent abbcdba72e
commit 21c56477b0
Notes: sideshowbarker 2024-07-19 13:58:24 +09:00
18 changed files with 202 additions and 211 deletions

View file

@ -72,7 +72,7 @@ void GMessageBox::build()
auto* button = new GButton(widget);
button->set_size_policy(SizePolicy::Fixed, SizePolicy::Fixed);
button->set_preferred_size({ 100, 20 });
button->set_caption("OK");
button->set_text("OK");
button->on_click = [this] (auto&) {
dbgprintf("GMessageBox: OK button clicked\n");
done(0);