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

Extract the Coords from Widgets #1

Open
chrisbouchard opened this issue Sep 4, 2019 · 0 comments
Open

Extract the Coords from Widgets #1

chrisbouchard opened this issue Sep 4, 2019 · 0 comments

Comments

@chrisbouchard
Copy link
Owner

Widgets should just be in charge of knowing their size and drawing themselves. We can then create a new type that would wrap a widget and have a position.

Possibly this type would store a Coord internally, but its interface should (also?) allow Positions to be specified for horizontal and vertical alignment.

enum Position {
    FlushStart,
    FlushEnd,
    FromStart(usize),
    FromEnd(usize),
    Middle,
}
@chrisbouchard chrisbouchard changed the title Extract the Coords from Widgets Extract the Coords from Widgets Sep 4, 2019
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