Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Finish integration of Flex Layout System #33

Closed
migueldeicaza opened this issue Jan 11, 2018 · 4 comments
Closed

Finish integration of Flex Layout System #33

migueldeicaza opened this issue Jan 11, 2018 · 4 comments

Comments

@migueldeicaza
Copy link
Collaborator

migueldeicaza commented Jan 11, 2018

Currently at best, we have LayoutSubviews, but there is no support for anchoring, springs or any other layout system.

Should consider what options we have.

Perhaps Views could have a LayoutManager in charge of laying things out. Would be desirable to have a layout manager that can work by default with Add, and the question is whether attributes of how a view should be laid out should live in the view itself, or should be an attached property when they are added to the parent.

It seems that with layout managers, we could have general purpose pones like Grid, or Flex, and convenience View subclasses like HBox/VBox to finetune the layout.

@migueldeicaza
Copy link
Collaborator Author

migueldeicaza commented Feb 10, 2018

I now have a branch with the Flex engine from Laurent Sansonetti and Stephane Delcroix here, but I have not had a chance to try it out yet:

https://github.com/migueldeicaza/gui.cs/tree/layout

https://github.com/migueldeicaza/gui.cs/blob/layout/Terminal.Gui/Flex.cs

Samples in the original C codebase:

https://github.com/xamarin/flex/blob/master/demo/FlexDemo/FlexView.m

@migueldeicaza migueldeicaza changed the title Debate: layout system Finish integration of Flex Layout System Feb 10, 2018
@migueldeicaza
Copy link
Collaborator Author

New branch for layout work is flex

@migueldeicaza
Copy link
Collaborator Author

Ok, my current thinking is that I should perhaps introduce Views that can do layout, and we would have a FlexView, which would apply Flex rules to the children, and have "attached" properties on the views to configure the item properties.

While Flex is very good, it might be premature to make this the sole way to lay out objects.

@migueldeicaza
Copy link
Collaborator Author

Used an alternative system, might revisit flex layer

tig added a commit that referenced this issue May 7, 2024
Fixes title size not being updating on view size change.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant