1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 06:57:45 +00:00

PixelPaint: Allow tools to know when the user has left them

This commit is contained in:
Timothy Slater 2022-10-26 18:33:43 -05:00 committed by Sam Atkins
parent d28c9ba054
commit a321df12e1
2 changed files with 4 additions and 1 deletions

View file

@ -64,6 +64,7 @@ public:
virtual bool on_keydown(GUI::KeyEvent const&);
virtual void on_keyup(GUI::KeyEvent&) { }
virtual void on_tool_activation() { }
virtual void on_tool_deactivation() { }
virtual GUI::Widget* get_properties_widget() { return nullptr; }
virtual Variant<Gfx::StandardCursor, NonnullRefPtr<Gfx::Bitmap>> cursor() { return Gfx::StandardCursor::None; }
virtual Gfx::IntPoint point_position_to_preferred_cell(Gfx::FloatPoint position) const { return position.to_type<int>(); }