Recent

Author Topic: TADiagram - Lazarus Library  (Read 5190 times)

Researching

  • Jr. Member
  • **
  • Posts: 60
Re: TADiagram - Lazarus Library
« Reply #15 on: February 06, 2020, 10:25:35 pm »
Another point is:
Ifthere are many entities on the drawing space, what approach is preferable for placing of each?
1. drawing space knows of placement
2. Each object knows his place..

What pattern of OOP seems to be the most efficient for this task?
Experienced help, advices greatly appreciated.
at 2020.01.- started looking for help on planning and developing TADiagram library / component for Lazarus. https://forum.lazarus.freepascal.org/index.php/topic,48351.0.html

HeavyUser

  • Sr. Member
  • ****
  • Posts: 310
Re: TADiagram - Lazarus Library
« Reply #16 on: February 07, 2020, 08:07:43 am »
Another point is:
Ifthere are many entities on the drawing space, what approach is preferable for placing of each?
1. drawing space knows of placement
2. Each object knows his place..

What pattern of OOP seems to be the most efficient for this task?
both approaches are valid for different reasons. an ERD diagram requires that each entity knows its place and can be moved around freely. An auto balancing hierarchical diagram or a mind map needs to be able to place the entities in the correct position and stay there the user can only influence its position in the list not on the screen so moving with the mouse will actually move it between items on the list or between different lists that means that the position is calculated every time a change is made or a draw is required depending on the design.

So the middle solution is: each entity saves its own position on screen and a mechanism must be put in placed to restrict or translate the movement of each entity and update the entities internal position variables.

HeavyUser

  • Sr. Member
  • ****
  • Posts: 310
Re: TADiagram - Lazarus Library
« Reply #17 on: February 07, 2020, 08:07:56 am »
Another point is:
Ifthere are many entities on the drawing space, what approach is preferable for placing of each?
1. drawing space knows of placement
2. Each object knows his place..

What pattern of OOP seems to be the most efficient for this task?
both approaches are valid for different reasons. an ERD diagram requires that each entity knows its place and can be moved around freely. An auto balancing hierarchical diagram or a mind map needs to be able to place the entities in the correct position and stay there the user can only influence its position in the list not on the screen so moving with the mouse will actually move it between items on the list or between different lists that means that the position is calculated every time a change is made or a draw is required depending on the design.

So the middle solution is: each entity saves its own position on screen and a mechanism must be put in placed to restrict or translate the movement of each entity and update the entity's internal position variables.

wp

  • Hero Member
  • *****
  • Posts: 7933
Re: TADiagram - Lazarus Library
« Reply #18 on: February 07, 2020, 10:23:21 am »
Maybe not exactly what you need, but it should be mentioned that a similar tool, TLvlGraphControl, is installed in the IDE by default, palette "LazControls". It is used to display the "Package Graph" (menu "Package"). Rather intimidating, I admit, but there is a tutorial on http://www.pp4s.co.uk/main/tu-form-level-graph.html from which I learned to create the TAChart class hierarchies shown on https://wiki.lazarus.freepascal.org/TAChart_documentation#Series.
Mainly Lazarus trunk / fpc 3.2.0 / all 32-bit on Win-10, but many more...

 

TinyPortal © 2005-2018