OpenSmock / Pyramid

Pyramid is a Graphical User-Interface (GUI) builder and editor for Bloc and Toplo.
MIT License
29 stars 5 forks source link

Library to create Bloc elements & Toplo widgets #168

Open labordep opened 1 month ago

labordep commented 1 month ago

Hi @Nyan11, I'm considering the library panel for creating elements (when click on + button of the tree). I would like to propose a similar architecture to the "Pharo Settings", based on a pragma in methods.

Thus, all declared pragma should offer contents for the library (or catalog) similar to how classes offer Settings content. It can be provided by active plugins or static classes. I'm not sure, but I think using plugins is more coherent with Pyramid principles.

This content can be a tree organized as menu or Tree Settings with a dedicated structure. We can start from actuel PyramidLibraryElement to add these features.

The need is:

What is you opinion?

Nyan11 commented 1 month ago

Currently, you have to write a BlocClosure that create a new BlElement to add it to the library list.

based on a pragma in methods

We can also imagine a solution based on the subclasses of BlElement. I do not like the class solution because there is a lot of subclasses of BlElement. The pragma solution remove the need to have any plugins because the pragma will automatically be detected.

It can be provided by active plugins or static classes.

plugins. This way we will have a plugin for Bloc and one for Toplo. Because Pragma are automatically detected, there will be a plugin that do not bring any modificaiton to Pyramid, it will just contains the Pragma for the library.

Later we could add a plugin with logos and icons.

This content can be a tree organized as menu

We should brainstorm all the elements we need in the library, and then organize them. It will be easier to make the different section and decide if the catalog model is a tree, a list or something else.

Nyan11 commented 1 month ago

We can even imagine a system where each plugins bring it's on catalog. For example the BlocLibrary plugin will be a list and the ToploLibrary plugin will be a menu with different categories.

Nyan11 commented 1 month ago

image