mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-12-07 21:59:54 +00:00
Everywhere: Hoist the Libraries folder to the top-level
This commit is contained in:
parent
950e819ee7
commit
93712b24bf
Notes:
github-actions[bot]
2024-11-10 11:51:52 +00:00
Author: https://github.com/trflynn89
Commit: 93712b24bf
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2256
Reviewed-by: https://github.com/sideshowbarker
4547 changed files with 104 additions and 113 deletions
46
Libraries/LibWeb/Painting/LabelablePaintable.h
Normal file
46
Libraries/LibWeb/Painting/LabelablePaintable.h
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
/*
|
||||
* Copyright (c) 2022, Andreas Kling <andreas@ladybird.org>
|
||||
* Copyright (c) 2022, sin-ack <sin-ack@protonmail.com>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <LibWeb/HTML/FormAssociatedElement.h>
|
||||
#include <LibWeb/Layout/FormAssociatedLabelableNode.h>
|
||||
#include <LibWeb/Painting/PaintableBox.h>
|
||||
|
||||
namespace Web::Painting {
|
||||
|
||||
// FIXME: Splinter this into FormAssociatedLabelablePaintable once
|
||||
// ProgressPaintable switches over to this.
|
||||
class LabelablePaintable : public PaintableBox {
|
||||
JS_CELL(LabelablePaintable, PaintableBox);
|
||||
|
||||
public:
|
||||
Layout::FormAssociatedLabelableNode const& layout_box() const;
|
||||
Layout::FormAssociatedLabelableNode& layout_box();
|
||||
|
||||
virtual bool wants_mouse_events() const override { return true; }
|
||||
virtual DispatchEventOfSameName handle_mousedown(Badge<EventHandler>, CSSPixelPoint, unsigned button, unsigned modifiers) override;
|
||||
virtual DispatchEventOfSameName handle_mouseup(Badge<EventHandler>, CSSPixelPoint, unsigned button, unsigned modifiers) override;
|
||||
virtual DispatchEventOfSameName handle_mousemove(Badge<EventHandler>, CSSPixelPoint, unsigned buttons, unsigned modifiers) override;
|
||||
|
||||
void handle_associated_label_mousedown(Badge<Layout::Label>);
|
||||
void handle_associated_label_mouseup(Badge<Layout::Label>);
|
||||
void handle_associated_label_mousemove(Badge<Layout::Label>, bool is_inside_node_or_label);
|
||||
|
||||
bool being_pressed() const { return m_being_pressed; }
|
||||
// NOTE: Only the HTML node associated with this paintable should call this!
|
||||
void set_being_pressed(bool being_pressed);
|
||||
|
||||
protected:
|
||||
LabelablePaintable(Layout::LabelableNode const&);
|
||||
|
||||
private:
|
||||
bool m_being_pressed { false };
|
||||
bool m_tracking_mouse { false };
|
||||
};
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue