Break up UI.h
into respective class files #43
Labels
No Label
Alpha Release Requirement
Bugfix
Demo Target
Documentation
Major Feature
Minor Feature
Refactoring & Cleanup
Tiny Feature
No Milestone
No project
No Assignees
1 Participants
Notifications
Total Time Spent: 8 hours 55 minutes
Due Date
john
8 hours 55 minutes
No due date set.
Dependencies
No dependencies set.
Reference: john/McRogueFace#43
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Notes say:
60 refactor: break up UI.h into the various objects
UI<thingy>.h
should include all the python interface method definitions, C++ class definitions, and PyTypeObject.UI.h
will import all of these. This is in turn imported by the rest of the McRogueFace projectThe static Type Objects that the module needs to import can be defined in the separate UI files, but inside the
mcrfpydef
namespace.UICommon.h
andUICommon.cpp
can define the shared data type handlers created for #11, #13, #18LOTS of new files. Disentangling these things is not hard, but there's a lot to do.
After it actually compiles again, which should be tomorrow, I'll make ANOTHER pass and make each file more idiomatic. The main task there will be renaming methods and using classes as namespaces for the pile of static methods. That should get each header file to be a lot shorter.
As a THIRD pass to fix up these files, the imports are excessive. I should remake the chart above with references to the SFML wrapper classes (Vector, Color, Texture, Font) and streamline the files to actual dependencies.
Compilation time should go down quite a bit when connections between the files are minimized and 80% of the UI classes aren't modified in any given revision.
see
c186d8c7f3
I have approximately 4 things I want to do to all of these new objects:
UIWidget::init
, etc.mcrfpydef::
type objectsHere is a progress diagram of completing those actions:
I'll pick up when I have some free time again by continuing with UICaption's cleanup.
edit: regarding item 2 here. I don't think it would take a ton of time to implement. But is it necessary?
On the Python Discuss thread about my issues with building objects while the interpreter is still starting up, I said:
I don't actually believe that, and I'm considering trying out the use of type objects in PyTexture again. All of the UI objects are compiling without the workarounds, so I suspect that I have some unnecessary steps in my process because I didn't reverse all of my experiments when figuring out what was wrong with Python object creation.
while fixing
__iter__
for this issue, I may end up accomplishing the work for #56 as well.Chart of properties to implement:
These should all work at init time, and they should all accept either a mcrfpy object of the correct type, or a tuple that satisfies that object's constructor.
I'm getting some segfaults from using the TypeObjects directly, so I guess I'll proceed with that fix.
Ready to merge (?)
cos_play
has segfaults, which I may want to fix before wrapping this issue... I am rushing to meet the April 21st deadline, now.