-
Notifications
You must be signed in to change notification settings - Fork 4
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
Refactoring of widget flags #3632
Comments
Branch: 3632_widget_flags |
Just some random notes:
|
Replying to mooffie:
Change state to what one? Widget state is a set is states: at the same time widget is active, enabled, focused, etc.
WANT_IDLE looks like WANT_CURSOR and WAND HOTKEY, i.e. option. Current IDLE is state. I agree, this name is not quite good and can be changed to some more appropriate.
Dialog is inherited from widget and therefore dialog is widget. Every visible object should be widget. This change will be used in the future.
See [1] below.
See above. Dialog is widget. No reason to have independent state definitions for one widget.
It does not matter what will be first. The implementation of WOP_TOP_SELECT is simple and simplify the code (get rid of special dlg_set_top_widget() function).
See [1] below.
[1] This is one step to #2919. I was not probably create this ticket but continue #2919. The following should be written there but I write it here.
In general: current widget subsystem in mc is very simple: there are only two layers: Widget and WDialog. It is obvious those two objects are not enough to create non-trivial complicated objects. Look at the current implementation of screens (#1490). This is a lot of hacks. In order to implement #2156 we should add more and more hacks.
We want flexible and power hierarchy of widgets. In simplest case this is Widget->WGroup->WDialog.
WGroup represents a set of widgets and it visible from outside as solid widget.
If you wand implement scrollbar within current widget subsystem, you have some problems with it positioning, sizing, drawing, communication with other widget. The scrollable widget should be group, i.e. WEditWinow = WEdit + 2 WScrollbars, WFilePanel = WFileList + WScrollbar(s), WScreen = WMenu + WButtonBar + (WFileManader or WEditor or WViewer or etc).
I'm currently slow working on implementation of WGroup, but this branch is very dirty and far from finish. I decided to split this work to several small steps to refacror current widget subsystem before implementation of WGroup. |
|
Merged to master: [61c379b].
|
|
Important
This issue was migrated from Trac:
andrew_b
(@aborodin)Currently, Widget::options is the mix of options and states and it should be split to:
The text was updated successfully, but these errors were encountered: