wxScrolled<>: reduce public API (PR #26319)

26 views
Skip to first unread message

Bill Su

unread,
Mar 26, 2026, 1:20:20 PMMar 26
to wx-...@googlegroups.com, Subscribed

Reduce the number of functions declared public by giving internal classes friend access


You can view, comment on, or merge this pull request online at:

  https://github.com/wxWidgets/wxWidgets/pull/26319

Commit Summary

  • 47aab7d wxScrolled<>: reduce public API

File Changes

(1 file)

Patch Links:


Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/pull/26319@github.com>

VZ

unread,
Apr 5, 2026, 9:16:50 AM (5 days ago) Apr 5
to wx-...@googlegroups.com, Subscribed
vadz left a comment (wxWidgets/wxWidgets#26319)

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.Message ID: <wxWidgets/wxWidgets/pull/26319/c4188877493@github.com>

Bill Su

unread,
Apr 5, 2026, 11:14:45 AM (5 days ago) Apr 5
to wx-...@googlegroups.com, Subscribed
wsu-cb left a comment (wxWidgets/wxWidgets#26319)

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.Message ID: <wxWidgets/wxWidgets/pull/26319/c4189038652@github.com>

VZ

unread,
Apr 5, 2026, 11:19:10 AM (5 days ago) Apr 5
to wx-...@googlegroups.com, Subscribed
vadz left a comment (wxWidgets/wxWidgets#26319)

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.Message ID: <wxWidgets/wxWidgets/pull/26319/c4189045008@github.com>

VZ

unread,
Apr 5, 2026, 11:24:36 AM (5 days ago) Apr 5
to wx-...@googlegroups.com, Subscribed

@vadz commented on this pull request.

Thanks, this mostly looks good, but I think a couple of places may need to be changed.


In include/wx/scrolwin.h:

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


In include/wx/scrolwin.h:

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


In include/wx/scrolwin.h:

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


In include/wx/scrolwin.h:

> @@ -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.Message ID: <wxWidgets/wxWidgets/pull/26319/review/4059566062@github.com>

Bill Su

unread,
Apr 5, 2026, 8:27:23 PM (4 days ago) Apr 5
to wx-...@googlegroups.com, Push

@wsu-cb pushed 1 commit.

  • 7372ba1 wxScrolled<>: rearrange public/protected/private sections


View it on GitHub or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/pull/26319/before/47aab7dd6f9a22af5e4e4dc86a31ca2ad01d51af/after/7372ba12f6dadef5a583de9b2d60b917750f54bb@github.com>

Bill Su

unread,
Apr 5, 2026, 9:39:43 PM (4 days ago) Apr 5
to wx-...@googlegroups.com, Subscribed
wsu-cb left a comment (wxWidgets/wxWidgets#26319)

@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.Message ID: <wxWidgets/wxWidgets/pull/26319/c4189939633@github.com>

VZ

unread,
Apr 6, 2026, 11:52:13 AM (4 days ago) Apr 6
to wx-...@googlegroups.com, Subscribed
vadz left a comment (wxWidgets/wxWidgets#26319)

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.Message ID: <wxWidgets/wxWidgets/pull/26319/c4193297410@github.com>

VZ

unread,
Apr 6, 2026, 6:06:11 PM (3 days ago) Apr 6
to wx-...@googlegroups.com, Subscribed

Closed #26319 via 1f0d74d.


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/pull/26319/issue_event/24237923490@github.com>

Reply all
Reply to author
Forward
0 new messages