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

layout support? #16

Closed
user1095108 opened this issue Oct 9, 2018 · 7 comments
Closed

layout support? #16

user1095108 opened this issue Oct 9, 2018 · 7 comments
Labels

Comments

@user1095108
Copy link

In other words, support for different text resolutions?

@gansm
Copy link
Owner

gansm commented Oct 9, 2018

If you need a flexible layout, you can overload the adjustSize() method.
An example can be found in examples/ui.cpp.

Planned for the future is an FGrid widget container, which organizes its child widgets into rows and columns.

@user1095108
Copy link
Author

The issue transcends adjusting the size to different screens. There exists a Turbo Vision port for Linux/Windows, that has implicit 80x25 assumptions. Nasty.

@gansm
Copy link
Owner

gansm commented Oct 9, 2018

I'm afraid I don't understand the question. I can't see your point.
If you have a flexible layout, then it also works in 80x25.

@user1095108
Copy link
Author

user1095108 commented Oct 9, 2018

That's the point. I wrote a tvision app once and once I ssh-ed to the shell and tried out the app, one could see there were some 80x25 assumptions in library code, as the phone terminal emulator had very strange dimensions, you could see artifacts stemming from the 80x25 assumptions.

@gansm
Copy link
Owner

gansm commented Oct 9, 2018

Unfortunately, I still don't understand your question.
Have you a problem with tvision or Final Cut?

Final Cut gets its resolution information via TIOCGWINSZ. If this doesn't work I use the environment variables COLUMNS and LINES. Otherwise I assume a standard xterm resolution of 80x24.

@user1095108
Copy link
Author

user1095108 commented Oct 9, 2018

I was merely making a philosophical observation. Not only do layouts provide flexibility are regards different screen resolutions, they also guard us from making potentially invalid assumptions (like the 80x25 assumption in tvision). As for me personally, I was looking for a TUI library, that would support something like the Qt's QScrollArea, but no luck :(

BTW: If you intend to implement signals/slots, take a look at:
https://github.com/user1095108/generic/blob/master/callback.hpp

Otherwise, you can close this issue.

@gansm
Copy link
Owner

gansm commented Oct 10, 2018

There is FScrollView that should be what you are looking for. For an example you can look into the examples/scrollview.cpp source code.

A callback functionality is already implemented. For example, you can use emitCallback("clicked") to generate a signal that can call a own routine via widget.addCallback("clicked", F_METHOD_CALLBACK (this, &classname::method)).

@gansm gansm closed this as completed Oct 10, 2018
@gansm gansm added the question label Jan 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants