Summary
Currently, the macOS backend defines the following four Objective-C classes:
| Name |
Superclass |
Python Owner |
| Window |
NSWindow |
FigureManager |
| View |
NSView |
FigureCanvas |
| MatplotlibAppDelegate |
NSObject |
- |
| NavigationToolbar2Handler |
NSObject |
NavigationToolbar2 |
Officially, per Apple Conventions: "your own classes should use three-letter prefixes".
In practice, un-prefixed names like "Window" or "View" are commonly used inside of application code. Inside of framework code, however, they would cause naming conflicts.
The macOS matplotlib backend is an unusual hybrid of a Python framework that then masquerades as an app. As such, it probably makes sense to prefix our classes (either with a standard three-letter abbreviation like MPL or with a full-name prefix like "Matplotlib").
That said, the un-prefixed names seemingly haven't conflicted with anything in over a decade.
Opinions?
Proposed fix
No response
Summary
Currently, the macOS backend defines the following four Objective-C classes:
Officially, per Apple Conventions: "your own classes should use three-letter prefixes".
In practice, un-prefixed names like "Window" or "View" are commonly used inside of application code. Inside of framework code, however, they would cause naming conflicts.
The macOS matplotlib backend is an unusual hybrid of a Python framework that then masquerades as an app. As such, it probably makes sense to prefix our classes (either with a standard three-letter abbreviation like
MPLor with a full-name prefix like "Matplotlib").That said, the un-prefixed names seemingly haven't conflicted with anything in over a decade.
Opinions?
Proposed fix
No response