My plan, revised

I was originally going to add code, not randomly, but bit-by-bit from the main form's source code to the new C++ form.

After moving the first few bits of code I realised it didn't really make sense to do this; it felt unstructured and there's just too much code to do all of it this way.

So, I have a new plan for migrating the main form (main.pas is the original source file):

Starting with the top toolbar, I'm going left to right, top to bottom, filling in each connected event, and recursively adding code until everything is done.

Once the toolbars (all five of them) are done, I'll move to the menus (12), popup menus (9), and everything else which is left, which is likely (hopefully) not much.

I don't know if this is the right way to do it (I've never migrated anything this big before), but it seems like an efficient way of getting everything migrated from the old Delphi codebase to the shiny new C++ project.

The only downside is that in the beginning, each new button brings in lots of code which will in turn bring in forms, frames, and all kinds of stuff.

The first few buttons on the top toolbar have already forced me to migrate a couple of things I hadn't planned on doing until later, but it all has to be done eventually.

But I can refactor in the knowledge that I'm seeing several layers of code together, and I'm seeing the flow of each function. The knock-on effects of any changes are easier to spot, and there are many! It's also allowing me to plan ahead in a way the previous method wasn't.

It seems to be working okay so far, but it's very early days.

I'll need a working matrix component before I get the rest of the toolbars migrated (they are all functions related to drawing and animation), so that'll be the main task after the top toolbar is done.