Modified cshelp.cpp file so that context help click on toolbar button returns button ID, NOT toolbar ID.
https://github.com/wxWidgets/wxWidgets/pull/25809
(1 file)
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.
Thanks, but I'd really prefer to have a virtual function instead of using dynamic cast like this.
And, of course, as you can see from the CI failures, the current version doesn't compile due to missing wx/toolbar.h include (but it won't be necessary if/when you change the code to use the virtual function).
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.
Strange – I was able to build the library with no errors.
You are probably using PCH. Please open this PR in your browser, you will see all the CI errors.
Any suggestion WHERE the virtual function could go?
In wxWindow
, of course, as I wrote in this comment.
P.S. If you reply by email, could you please trim the quoted text because it looks really poorly on the web page (again, please open it in your browser to see it).
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.
Added a virtual function to window.h called SetHelpEventPos. It does nothing except for the wxtoolbar base case, where it parses the button clicked. No static or other casts are needed.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.
@StevenPHirshman pushed 1 commit.
—
View it on GitHub or unsubscribe.
You are receiving this because you are subscribed to this thread.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.
@vadz requested changes on this pull request.
Thanks, I don't really understand what is the advantage of doing it like this rather than using GetHelpIdAtPoint()
as I thought to do it, but why not.
The real problem for me is that:
So could you please rename the function to something like AdjustHelpEvent()
and remove SetPosition()
call from it unless there is some good reason to do it that I'm missing?
> @@ -1448,6 +1448,9 @@ class WXDLLIMPEXP_CORE wxWindowBase : public wxEvtHandler return GetHelpTextAtPoint(wxDefaultPosition, wxHelpEvent::Origin_Unknown); } + //sph091825
Please don't do this, we use version control for this. Just imagine what this file would look like if each of hundreds of contributors to it left such lines in it.
⬇️ Suggested change- //sph091825 + //sph091825
> @@ -1448,6 +1448,9 @@ class WXDLLIMPEXP_CORE wxWindowBase : public wxEvtHandler return GetHelpTextAtPoint(wxDefaultPosition, wxHelpEvent::Origin_Unknown); } + //sph091825 + virtual void SetHelpEventPos(wxHelpEvent& WXUNUSED(event)) { return; }
This is trivial, but why have this useless return
?
- virtual void SetHelpEventPos(wxHelpEvent& WXUNUSED(event)) { return; } + virtual void SetHelpEventPos(wxHelpEvent& WXUNUSED(event)) { }
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.
Please reset the draft status when the builds pass.
BTW, I forgot to mention this, but it's probably worth mentioning this behaviour in wxHelpEvent
documentation in interface/wx/event.h
. TIA!
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.
@StevenPHirshman pushed 1 commit.
—
View it on GitHub or unsubscribe.
You are receiving this because you are subscribed to this thread.
@StevenPHirshman pushed 1 commit.
—
View it on GitHub or unsubscribe.
You are receiving this because you are subscribed to this thread.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.
@StevenPHirshman pushed 1 commit.
—
View it on GitHub or unsubscribe.
You are receiving this because you are subscribed to this thread.
@StevenPHirshman pushed 1 commit.
—
View it on GitHub or unsubscribe.
You are receiving this because you are subscribed to this thread.
@StevenPHirshman pushed 1 commit.
—
View it on GitHub or unsubscribe.
You are receiving this because you are subscribed to this thread.
@StevenPHirshman pushed 1 commit.
—
View it on GitHub or unsubscribe.
You are receiving this because you are subscribed to this thread.
@StevenPHirshman pushed 1 commit.
—
View it on GitHub or unsubscribe.
You are receiving this because you are subscribed to this thread.
@StevenPHirshman pushed 1 commit.
—
View it on GitHub or unsubscribe.
You are receiving this because you are subscribed to this thread.
@StevenPHirshman pushed 1 commit.
—
View it on GitHub or unsubscribe.
You are receiving this because you are subscribed to this thread.
@StevenPHirshman pushed 1 commit.
—
View it on GitHub or unsubscribe.
You are receiving this because you are subscribed to this thread.
@StevenPHirshman pushed 4 commits.
—
View it on GitHub or unsubscribe.
You are receiving this because you are subscribed to this thread.
Just for the recorded, you (or your editor) have completely reformatted all the files you have touched. You need to configure it to prevent this from happening.
Please make the changes in your fork of the repository, confirm that they look good to you by comparing them with this one and then, and only then, push them here.
Thanks in advance!
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.
@StevenPHirshman pushed 6 commits.
—
View it on GitHub or unsubscribe.
You are receiving this because you are subscribed to this thread.
@StevenPHirshman pushed 1 commit.
You are receiving this because you are subscribed to this thread.
@StevenPHirshman pushed 1 commit.
You are receiving this because you are subscribed to this thread.
Closed #25809.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.
Just for the recorded, you (or your editor) have completely reformatted all the files you have touched. You need to configure it to prevent this from happening.
Please make the changes in your fork of the repository, confirm that they look good to you by comparing them with this one and then, and only then, push them here.
Thanks in advance!
I updated the files. Now there are no EOL/White Space issues, but ALL compilation tests are failing now. I don't understand why that is happening.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.