Reduce the number of functions declared public by giving internal classes friend access
https://github.com/wxWidgets/wxWidgets/pull/26319
(1 file)
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
Should this be merged or do you still plan more changes here?
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
Should this be merged or do you still plan more changes here?
I am waiting for a review before declaring it ready.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
Ah, this is a catch-22 because I typically wait for a PR to exit the draft status before reviewing it (which is how it's supposed to work, I think, as implied by the "Ready for review" button label). Anyhow, I'll look at it in a moment, thanks.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
@vadz commented on this pull request.
Thanks, this mostly looks good, but I think a couple of places may need to be changed.
> @@ -161,13 +167,16 @@ class WXDLLIMPEXP_CORE wxScrollHelperBase : public wxAnyScrollHelperBase
// Forbid autoscrolling when the mouse is outside the window
void DisableAutoScrollOutside();
+private:
Minor, but I'd rather move this part to the end of the class declaration instead of having public/private/public scopes.
> @@ -196,9 +204,11 @@ class WXDLLIMPEXP_CORE wxScrollHelperBase : public wxAnyScrollHelperBase
DoShowScrollbars(horz, vert);
}
+private:
I think IsScrollbarShown() should remain public, at least I don't see why would we want to hide it, it's a possibly useful function and it could be already used by the applications code.
> @@ -254,15 +264,19 @@ class WXDLLIMPEXP_CORE wxScrollHelperBase : public wxAnyScrollHelperBase
return p2;
}
+private:
Again, minor, but I'd rather move them to a private section in the end.
> @@ -430,7 +448,8 @@ public: \
virtual void DoSetVirtualSize(int x, int y) override \
{ ScrollDoSetVirtualSize(x, y); } \
virtual wxSize GetBestVirtualSize() const override \
- { return ScrollGetBestVirtualSize(); }
+ { return ScrollGetBestVirtualSize(); } \
+private:
I'd rather not do this, hiding access change inside a macro is not very developer-friendly, it's better to put private: explicitly after calling it if necessary.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
@wsu-cb pushed 1 commit.
—
View it on GitHub or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
@vadz This is ready for a re-review.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
Thanks, will push soon.
—
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.![]()