0
votes

I would like to know the best practices/design patterns of layouting in 2D.

Must have reference to:

  • absolute layout
  • vertical layout
  • horizontal layout

Components properties can be:

  • width
  • height
  • minWidth
  • minHeight
  • maxWidth
  • maxHeight
  • top
  • right
  • bottom
  • left
  • x
  • y
  • horizontalAlign(left|center|right)
  • verticalAlign(top|center|bottom)

Of course all these elements are not used for each component and are not used by all the layouts.

So for example I set a components width, height, top, right it should automatically recognize its bottom and left values.

Then about all these implication about minWidth, minHeight.

It can have a reference to how to find the scroller position, to appear when is needed.

*this will be build in javascript

1

1 Answers

0
votes

sounds like java's swing. they use layout managers. gwt has a similar set of widgets and containers. microsoft has always had some of this similar, it's latest is wpf.

these frameworks use composite, iterator, flyweight, observer/observable (m$ has delegate which naict is an observable), and maybe strategy.

users of a framework could use mediator.