Acolyte of the Butterfly
Posts: 106 from 2015/3/31
of course you (or anybody else
) can do everything you want with the Source, it's on github and unter CC0 (or unlicence as GitHub calls that, I like to call it "Do what the fuck you want Licence")https://github.com/alb42/MUIClass
(The IDE is in ide/ folder)
But (there is always a but isn't it) I don't believe an other Code Generator is possible because the Magic here is not in the IDE, the IDE is stupid, it doesn't know much about MUI objects and it's fields/methods. The "Magic" is in the MUIClass implementation which capsulate every MUI BOOPSI object into a real Pascal class, in principle you could write the same in C++ as well I guess.
The idea is that you can use them like any other class/object.
So instead of:
get(ListviewObj, MUIA_ListView_List, @ListObj);
get(ListObj, MUIA_List_Active, @Idx);
set(ListObj, MUIA_List_Active, NewIdx);
you can write
Idx := ListViewObj.List.Active;
ListViewObj.List.Active := NIdx;
or for Methods:
DoMethod(ListObj, [MUIM_List_InsertSingle ,NewText, MUIV_List_Insert_Bottom]);
And so on and so on.
The IDE uses RTTI to inspect which properties to show them in the property list so it does not know how the parameter in MUI (MUIA_xxx) looks like it doesn't even know the property names/types before it inspects the class, and you could give a completely new class to it without changing code.
In the IDE there is for every new Type just a single line added (RegisterMUIClass) but before the wrapper must be written of course.
So if you want to use that for a different language you have to write such wrapper first, of course it would be possible for C++ or so, but as long nobody did until now I guess it's not strongly demanded ;)@pollux:
ehhmm look to the date of your fpc compiler
it's 2 years old! did you think I sit on my hands for two years
I implemented the icon.library wrapper already long time before.
For MUIClass and the programs using it (MoGit/IDE) the latest 3.1.1 snapshot is needed. Download it here:http://build.alb42.de/fpcreleases/
for you of course only the fpc powerpc-morphos would be interesting:http://build.alb42.de/fpcreleases/fpc-release.powerpc-morphos.lha
The IDE and so on is also compiled every night:http://build.alb42.de/MUIClass/
and there is also the Docomentation for the MUIClasses