Be able to extend it for building a UI mocking tool
iongion opened this issue · 3 comments
Is your feature request related to a problem? Please describe.
I'm always frustrated when I need to use wine to start windows programs to do what I want, in an ugly and non-hidpi friendly way.
Describe the solution you'd like
I would like to be able to define my own shapes and control their attributes
Describe alternatives you've considered
Alternative would be to build my own web tool
Additional context
Yes, I am trying to have minimal replication of that the long time dead desktop Adobe Air application was doing, called Balsamiq mockup - I still use the cloud version for work, but that is overkill at home.
As you see, every symbol defined has its own attributes UI
- How can one define shapes ?
- How can one define and control attributes of those shapes using common or custom widgets, that in turn control the graphics of the shape ?
Hi @iongion,
Thanks for the feature request.
Is your idea to build a new tool?
Have you looked at Gaphor? Gaphor uses CSS to shape model elements. Those elements are coded in Python, but can be tweaked by CSS attributes. Gaphor is a more complex in that it's has a semantic model, but I think it contains most of the shapes and CSS you're looking for. If it fits your needs we can always backport it to Gaphas.
Styling core: https://github.com/gaphor/gaphor/tree/master/gaphor/core/styling
Shape code: https://github.com/gaphor/gaphor/blob/master/gaphor/diagram/shapes.py. The draw method can be defined from the actual diagram items, so the shape can differ per UML element. These classes add a nice abstraction over raw Cairo drawing commands.