Looking for source for SpinButton

I am looking for the source for the SpinButton. I was expecting to find it at either https://pypi.org/project/wxPython or an old version at https://github.com/wxWidgets/wxPython-Classic, but am not finding a Python source named SpinButton at either place. Am I looking at the right stuff?

I’m doing it because I am considering a similar control but with different appearance and want to know how the keypress hold and timing and so forth are done. If there’s a way to extend that class, I’d like to understand that (I wouldn’t think so looking at the API).

Am I assuming correctly that these widgets are written in Python, or are they in some kind of Python-compliant C, some equivalent to the Java Native Interface for that language?

There are some widgets that are pure python, but most are wrappers around the C++ code of the wxWdigets library, and most of those are wrappers around the native widgets provided by the platform. The wx.SpinButton class is one of those that is native widget.

If you want some ideas on implementing a custom widget in Python then take a look at the modules in the wx.lib package. The statbmp.py and stattext.py modules are simpler ones to start with, and buttons.py is one that does mouse interactions and would have some similarities to what you are wanting to do.