mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 23:50:19 +00:00
PaintBrush: Tool::on_contextmenu() => on_tool_button_context_menu()
This commit is contained in:
parent
72e57561a1
commit
02d9cf2039
Notes:
sideshowbarker
2024-07-19 06:39:48 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/02d9cf2039e
14 changed files with 14 additions and 14 deletions
|
@ -108,7 +108,7 @@ void EllipseTool::on_keydown(GUI::KeyEvent& event)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void EllipseTool::on_contextmenu(GUI::ContextMenuEvent& event)
|
void EllipseTool::on_tool_button_contextmenu(GUI::ContextMenuEvent& event)
|
||||||
{
|
{
|
||||||
if (!m_context_menu) {
|
if (!m_context_menu) {
|
||||||
m_context_menu = GUI::Menu::construct();
|
m_context_menu = GUI::Menu::construct();
|
||||||
|
|
|
@ -40,7 +40,7 @@ public:
|
||||||
virtual void on_mousedown(Layer&, GUI::MouseEvent& layer_event, GUI::MouseEvent& original_event) override;
|
virtual void on_mousedown(Layer&, GUI::MouseEvent& layer_event, GUI::MouseEvent& original_event) override;
|
||||||
virtual void on_mousemove(Layer&, GUI::MouseEvent& layer_event, GUI::MouseEvent& original_event) override;
|
virtual void on_mousemove(Layer&, GUI::MouseEvent& layer_event, GUI::MouseEvent& original_event) override;
|
||||||
virtual void on_mouseup(Layer&, GUI::MouseEvent& layer_event, GUI::MouseEvent& original_event) override;
|
virtual void on_mouseup(Layer&, GUI::MouseEvent& layer_event, GUI::MouseEvent& original_event) override;
|
||||||
virtual void on_contextmenu(GUI::ContextMenuEvent&) override;
|
virtual void on_tool_button_contextmenu(GUI::ContextMenuEvent&) override;
|
||||||
virtual void on_second_paint(const Layer&, GUI::PaintEvent&) override;
|
virtual void on_second_paint(const Layer&, GUI::PaintEvent&) override;
|
||||||
virtual void on_keydown(GUI::KeyEvent&) override;
|
virtual void on_keydown(GUI::KeyEvent&) override;
|
||||||
|
|
||||||
|
|
|
@ -72,7 +72,7 @@ void EraseTool::on_mousemove(Layer& layer, GUI::MouseEvent& event, GUI::MouseEve
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void EraseTool::on_contextmenu(GUI::ContextMenuEvent& event)
|
void EraseTool::on_tool_button_contextmenu(GUI::ContextMenuEvent& event)
|
||||||
{
|
{
|
||||||
if (!m_context_menu) {
|
if (!m_context_menu) {
|
||||||
m_context_menu = GUI::Menu::construct();
|
m_context_menu = GUI::Menu::construct();
|
||||||
|
|
|
@ -40,7 +40,7 @@ public:
|
||||||
|
|
||||||
virtual void on_mousedown(Layer&, GUI::MouseEvent& layer_event, GUI::MouseEvent& original_event) override;
|
virtual void on_mousedown(Layer&, GUI::MouseEvent& layer_event, GUI::MouseEvent& original_event) override;
|
||||||
virtual void on_mousemove(Layer&, GUI::MouseEvent& layer_event, GUI::MouseEvent& original_event) override;
|
virtual void on_mousemove(Layer&, GUI::MouseEvent& layer_event, GUI::MouseEvent& original_event) override;
|
||||||
virtual void on_contextmenu(GUI::ContextMenuEvent&) override;
|
virtual void on_tool_button_contextmenu(GUI::ContextMenuEvent&) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Gfx::Color get_color() const;
|
Gfx::Color get_color() const;
|
||||||
|
|
|
@ -128,7 +128,7 @@ void LineTool::on_keyup(GUI::KeyEvent& event)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void LineTool::on_contextmenu(GUI::ContextMenuEvent& event)
|
void LineTool::on_tool_button_contextmenu(GUI::ContextMenuEvent& event)
|
||||||
{
|
{
|
||||||
if (!m_context_menu) {
|
if (!m_context_menu) {
|
||||||
m_context_menu = GUI::Menu::construct();
|
m_context_menu = GUI::Menu::construct();
|
||||||
|
|
|
@ -40,7 +40,7 @@ public:
|
||||||
virtual void on_mousedown(Layer&, GUI::MouseEvent& layer_event, GUI::MouseEvent& original_event) override;
|
virtual void on_mousedown(Layer&, GUI::MouseEvent& layer_event, GUI::MouseEvent& original_event) override;
|
||||||
virtual void on_mousemove(Layer&, GUI::MouseEvent& layer_event, GUI::MouseEvent& original_event) override;
|
virtual void on_mousemove(Layer&, GUI::MouseEvent& layer_event, GUI::MouseEvent& original_event) override;
|
||||||
virtual void on_mouseup(Layer&, GUI::MouseEvent& layer_event, GUI::MouseEvent& original_event) override;
|
virtual void on_mouseup(Layer&, GUI::MouseEvent& layer_event, GUI::MouseEvent& original_event) override;
|
||||||
virtual void on_contextmenu(GUI::ContextMenuEvent&) override;
|
virtual void on_tool_button_contextmenu(GUI::ContextMenuEvent&) override;
|
||||||
virtual void on_second_paint(const Layer&, GUI::PaintEvent&) override;
|
virtual void on_second_paint(const Layer&, GUI::PaintEvent&) override;
|
||||||
virtual void on_keydown(GUI::KeyEvent&) override;
|
virtual void on_keydown(GUI::KeyEvent&) override;
|
||||||
virtual void on_keyup(GUI::KeyEvent&) override;
|
virtual void on_keyup(GUI::KeyEvent&) override;
|
||||||
|
|
|
@ -73,7 +73,7 @@ void PenTool::on_mousemove(Layer& layer, GUI::MouseEvent& event, GUI::MouseEvent
|
||||||
m_last_drawing_event_position = event.position();
|
m_last_drawing_event_position = event.position();
|
||||||
}
|
}
|
||||||
|
|
||||||
void PenTool::on_contextmenu(GUI::ContextMenuEvent& event)
|
void PenTool::on_tool_button_contextmenu(GUI::ContextMenuEvent& event)
|
||||||
{
|
{
|
||||||
if (!m_context_menu) {
|
if (!m_context_menu) {
|
||||||
m_context_menu = GUI::Menu::construct();
|
m_context_menu = GUI::Menu::construct();
|
||||||
|
|
|
@ -40,7 +40,7 @@ public:
|
||||||
virtual void on_mousedown(Layer&, GUI::MouseEvent& layer_event, GUI::MouseEvent& original_event) override;
|
virtual void on_mousedown(Layer&, GUI::MouseEvent& layer_event, GUI::MouseEvent& original_event) override;
|
||||||
virtual void on_mousemove(Layer&, GUI::MouseEvent& layer_event, GUI::MouseEvent& original_event) override;
|
virtual void on_mousemove(Layer&, GUI::MouseEvent& layer_event, GUI::MouseEvent& original_event) override;
|
||||||
virtual void on_mouseup(Layer&, GUI::MouseEvent& layer_event, GUI::MouseEvent& original_event) override;
|
virtual void on_mouseup(Layer&, GUI::MouseEvent& layer_event, GUI::MouseEvent& original_event) override;
|
||||||
virtual void on_contextmenu(GUI::ContextMenuEvent&) override;
|
virtual void on_tool_button_contextmenu(GUI::ContextMenuEvent&) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
virtual const char* class_name() const override { return "PenTool"; }
|
virtual const char* class_name() const override { return "PenTool"; }
|
||||||
|
|
|
@ -114,7 +114,7 @@ void RectangleTool::on_keydown(GUI::KeyEvent& event)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void RectangleTool::on_contextmenu(GUI::ContextMenuEvent& event)
|
void RectangleTool::on_tool_button_contextmenu(GUI::ContextMenuEvent& event)
|
||||||
{
|
{
|
||||||
if (!m_context_menu) {
|
if (!m_context_menu) {
|
||||||
m_context_menu = GUI::Menu::construct();
|
m_context_menu = GUI::Menu::construct();
|
||||||
|
|
|
@ -40,7 +40,7 @@ public:
|
||||||
virtual void on_mousedown(Layer&, GUI::MouseEvent& layer_event, GUI::MouseEvent& original_event) override;
|
virtual void on_mousedown(Layer&, GUI::MouseEvent& layer_event, GUI::MouseEvent& original_event) override;
|
||||||
virtual void on_mousemove(Layer&, GUI::MouseEvent& layer_event, GUI::MouseEvent& original_event) override;
|
virtual void on_mousemove(Layer&, GUI::MouseEvent& layer_event, GUI::MouseEvent& original_event) override;
|
||||||
virtual void on_mouseup(Layer&, GUI::MouseEvent& layer_event, GUI::MouseEvent& original_event) override;
|
virtual void on_mouseup(Layer&, GUI::MouseEvent& layer_event, GUI::MouseEvent& original_event) override;
|
||||||
virtual void on_contextmenu(GUI::ContextMenuEvent&) override;
|
virtual void on_tool_button_contextmenu(GUI::ContextMenuEvent&) override;
|
||||||
virtual void on_second_paint(const Layer&, GUI::PaintEvent&) override;
|
virtual void on_second_paint(const Layer&, GUI::PaintEvent&) override;
|
||||||
virtual void on_keydown(GUI::KeyEvent&) override;
|
virtual void on_keydown(GUI::KeyEvent&) override;
|
||||||
|
|
||||||
|
|
|
@ -103,7 +103,7 @@ void SprayTool::on_mouseup(Layer&, GUI::MouseEvent&, GUI::MouseEvent&)
|
||||||
m_timer->stop();
|
m_timer->stop();
|
||||||
}
|
}
|
||||||
|
|
||||||
void SprayTool::on_contextmenu(GUI::ContextMenuEvent& event)
|
void SprayTool::on_tool_button_contextmenu(GUI::ContextMenuEvent& event)
|
||||||
{
|
{
|
||||||
if (!m_context_menu) {
|
if (!m_context_menu) {
|
||||||
m_context_menu = GUI::Menu::construct();
|
m_context_menu = GUI::Menu::construct();
|
||||||
|
|
|
@ -41,7 +41,7 @@ public:
|
||||||
virtual void on_mousedown(Layer&, GUI::MouseEvent& layer_event, GUI::MouseEvent& original_event) override;
|
virtual void on_mousedown(Layer&, GUI::MouseEvent& layer_event, GUI::MouseEvent& original_event) override;
|
||||||
virtual void on_mouseup(Layer&, GUI::MouseEvent& layer_event, GUI::MouseEvent& original_event) override;
|
virtual void on_mouseup(Layer&, GUI::MouseEvent& layer_event, GUI::MouseEvent& original_event) override;
|
||||||
virtual void on_mousemove(Layer&, GUI::MouseEvent& layer_event, GUI::MouseEvent& original_event) override;
|
virtual void on_mousemove(Layer&, GUI::MouseEvent& layer_event, GUI::MouseEvent& original_event) override;
|
||||||
virtual void on_contextmenu(GUI::ContextMenuEvent&) override;
|
virtual void on_tool_button_contextmenu(GUI::ContextMenuEvent&) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
virtual const char* class_name() const override { return "SprayTool"; }
|
virtual const char* class_name() const override { return "SprayTool"; }
|
||||||
|
|
|
@ -43,7 +43,7 @@ public:
|
||||||
virtual void on_mousedown(Layer&, GUI::MouseEvent&, GUI::MouseEvent&) {}
|
virtual void on_mousedown(Layer&, GUI::MouseEvent&, GUI::MouseEvent&) {}
|
||||||
virtual void on_mousemove(Layer&, GUI::MouseEvent&, GUI::MouseEvent&) {}
|
virtual void on_mousemove(Layer&, GUI::MouseEvent&, GUI::MouseEvent&) {}
|
||||||
virtual void on_mouseup(Layer&, GUI::MouseEvent&, GUI::MouseEvent&) {}
|
virtual void on_mouseup(Layer&, GUI::MouseEvent&, GUI::MouseEvent&) {}
|
||||||
virtual void on_contextmenu(GUI::ContextMenuEvent&) {}
|
virtual void on_tool_button_contextmenu(GUI::ContextMenuEvent&) {}
|
||||||
virtual void on_second_paint(const Layer&, GUI::PaintEvent&) {}
|
virtual void on_second_paint(const Layer&, GUI::PaintEvent&) {}
|
||||||
virtual void on_keydown(GUI::KeyEvent&) {}
|
virtual void on_keydown(GUI::KeyEvent&) {}
|
||||||
virtual void on_keyup(GUI::KeyEvent&) {}
|
virtual void on_keyup(GUI::KeyEvent&) {}
|
||||||
|
|
|
@ -75,7 +75,7 @@ public:
|
||||||
virtual void context_menu_event(GUI::ContextMenuEvent& event) override
|
virtual void context_menu_event(GUI::ContextMenuEvent& event) override
|
||||||
{
|
{
|
||||||
m_action->activate();
|
m_action->activate();
|
||||||
m_tool->on_contextmenu(event);
|
m_tool->on_tool_button_contextmenu(event);
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
Loading…
Reference in a new issue