This cleanup project is meant to clean up the code files and .xml files of the Viewer to enhance modability.\
Those major tasks are:
Whether it is faster or not to create an UI in XML as far as possible without using any code bits is arguable but it is definitly faster and more efficient to set widget attributes only once, preferably in their creation process e.g the XML file.
Example of where such cleanup is needed:
those 2 code lines do exactly the same as this line in XML:
this "follows" tag is a default attribute every widget should have, therefor it is redunant to add this attribute in code as it is already set on creation in the coresponding XML file.
Exception to this are attributes that change over time or with certain actions or cannot be set via XML file. Examples of this are:
//Enabling or disabling something because of a certain special action (not a Debug setting)
mBumpyTextureCtrl->setDnDFilterPermMask(PERM_COPY | PERM_TRANSFER);
//Setting DnD Permission Filters which is not possible in XML.
//Setting special callbacks which are not available in XML.
Since Viewer 2 the XUI system was heavily expanded and can now properly do tasks previously only doable via code. Such functions are:
//functions to enable/disable this widget when Debug X is set to true.
//functions to show/hide this widget when Debug X is set to true
//Callbacks to call an either locally or globally available function.
//Attribute to use a existing .xml file for this panel.
//Widgets to create menus in a floater or panel or container and add functions to them when beeing clicked or enabled or ticked.
This part of the project aims at improving readability extremly by creating a default layout sheet for all XML files and using it on all XML files.
Examples of such places where this project is needed:
They should look like this at the end: