numere-org / NumeRe

Framework for numerical computations, data analysis and visualisation
https://www.numere.org
GNU General Public License v3.0
18 stars 6 forks source link

Allow passing dynamic layout scripts to 'window' #7

Closed numeredev closed 10 months ago

numeredev commented 1 year ago

DESCRIPTION

What does your feature request improve on? Please describe. Enabling the possibility that the user may inject a window layout as a string would make the window layouts far more flexible.

Describe the solution you'd like Allow passing a dynamic layout script as a string to the window command. This would free the user from the need to create the layout script in a temporary file to open a dynamic window.

Describe alternatives you've considered Writing the dynamic window to a file is the only possible alternative but that's error-prone.

Additional context Migrated from here: https://sourceforge.net/p/numere/tickets/721/

(Do not write below this line)


DEVS' SECTION

ANALYSIS

To implement this, add a simple detection algorithm to static std::string parseLayoutScript(), whether the passed string is already a string-encoded layout and if yes, use this as input for StyledTextFile. The latter has to be adapted to accept the file contents instead of the file name (e.g. by adding an optional parameter to the constructor (i.e. StyleTextFile(const std::string& sFileName, const std::string& sFileContents = "")). Ensure also that <this> is resolved "correctly".

IMPLEMENTATION STEPS

(see also our Wiki for implementation guidelines)

DOCUMENTATION STEPS

(see also our Wiki for further information)

PULL REQUEST