Remove mousebtn argument from action_open
This commit is contained in:
parent
8fcd514168
commit
7a569c4b98
@ -53,7 +53,7 @@ class renderer : public renderer_interface,
|
||||
|
||||
void change_alignment(const tags::context& ctxt) override;
|
||||
|
||||
void action_open(const tags::context& ctxt, mousebtn btn, tags::action_t id) override;
|
||||
void action_open(const tags::context& ctxt, tags::action_t id) override;
|
||||
void action_close(const tags::context& ctxt, tags::action_t id) override;
|
||||
|
||||
protected:
|
||||
|
@ -13,7 +13,7 @@ class renderer_interface {
|
||||
virtual void render_text(const tags::context& ctxt, const string&& str) = 0;
|
||||
virtual void change_alignment(const tags::context& ctxt) = 0;
|
||||
|
||||
virtual void action_open(const tags::context& ctxt, mousebtn btn, tags::action_t id) = 0;
|
||||
virtual void action_open(const tags::context& ctxt, tags::action_t id) = 0;
|
||||
virtual void action_close(const tags::context& ctxt, tags::action_t id) = 0;
|
||||
|
||||
protected:
|
||||
|
@ -706,8 +706,7 @@ void renderer::change_alignment(const tags::context& ctxt) {
|
||||
}
|
||||
}
|
||||
|
||||
void renderer::action_open(const tags::context&, mousebtn btn, tags::action_t id) {
|
||||
assert(btn != mousebtn::NONE);
|
||||
void renderer::action_open(const tags::context&, tags::action_t id) {
|
||||
m_action_ctxt.set_start(id, m_blocks.at(m_align).x);
|
||||
}
|
||||
|
||||
|
@ -127,7 +127,7 @@ namespace tags {
|
||||
renderer.action_close(*m_ctxt, id);
|
||||
} else {
|
||||
action_t id = m_action_ctxt.action_open(btn, std::move(cmd), m_ctxt->get_alignment());
|
||||
renderer.action_open(*m_ctxt, btn, id);
|
||||
renderer.action_open(*m_ctxt, id);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -18,7 +18,7 @@ class MockRenderer : public renderer_interface {
|
||||
MOCK_METHOD(void, render_offset, (const context& ctxt, int pixels), (override));
|
||||
MOCK_METHOD(void, render_text, (const context& ctxt, const string&& str), (override));
|
||||
MOCK_METHOD(void, change_alignment, (const context& ctxt), (override));
|
||||
MOCK_METHOD(void, action_open, (const context& ctxt, mousebtn btn, action_t id), (override));
|
||||
MOCK_METHOD(void, action_open, (const context& ctxt, action_t id), (override));
|
||||
MOCK_METHOD(void, action_close, (const context& ctxt, action_t id), (override));
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user