mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 04:17:35 +00:00
LibGUI: Allow falling back to default paint behavior in delegate
This patch adds a method that can optionally be implemented to allow a TableCellPaintingDelegate to fall back to the default painting in a View.
This commit is contained in:
parent
e2df145e14
commit
b67d4ab52f
3 changed files with 6 additions and 2 deletions
|
@ -1,5 +1,6 @@
|
|||
/*
|
||||
* Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org>
|
||||
* Copyright (c) 2022, Jakob-Niklas See <git@nwex.de>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
@ -14,6 +15,7 @@ class TableCellPaintingDelegate {
|
|||
public:
|
||||
virtual ~TableCellPaintingDelegate() { }
|
||||
|
||||
virtual bool should_paint(ModelIndex const&) { return true; }
|
||||
virtual void paint(Painter&, const Gfx::IntRect&, const Gfx::Palette&, const ModelIndex&) = 0;
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue