PaintBrush: Tool::on_contextmenu() => on_tool_button_context_menu()

This commit is contained in:
Andreas Kling 2020-05-13 21:51:43 +02:00
parent 72e57561a1
commit 02d9cf2039
Notes: sideshowbarker 2024-07-19 06:39:48 +09:00
14 changed files with 14 additions and 14 deletions

View file

@ -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();

View file

@ -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;

View file

@ -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();

View file

@ -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;

View file

@ -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();

View file

@ -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;

View file

@ -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();

View file

@ -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"; }

View file

@ -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();

View file

@ -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;

View file

@ -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();

View file

@ -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"; }

View file

@ -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&) {}

View file

@ -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: