Andrew Borodin
e9d23e90f0
Find widget API: support groups.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2020-03-08 20:13:33 +03:00
Andrew Borodin
fdf3d9c3b7
WGroup: implement init & destroy.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2020-03-08 20:12:45 +03:00
Andrew Borodin
b9cf650605
Move send broadcast message API from WDialog to WGroup.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2020-03-08 20:11:55 +03:00
Andrew Borodin
22ad70ed02
Move widget add/del API from WDialog to WGroup.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2020-03-08 20:11:55 +03:00
Andrew Borodin
6eedbce076
Move widget selection API from WDialog to WGroup.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2020-03-08 20:11:39 +03:00
Andrew Borodin
d575c7058b
Move winch_pending member from WDialog to WGroup.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2020-03-08 20:09:13 +03:00
Andrew Borodin
e4e0070db5
Ticket #2919 : implement WGroup widget.
...
WGroup is the base widget for complex objects such as windows, dialog
windows, etc.
Initial steps:
* move widget list of dialog into WGroup class;
* inherit WGroup from Widget;
* inherit WDialog from WGroup.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2020-03-08 20:09:12 +03:00
Andrew Borodin
31b37a1f79
Ticket #4050 : code cleanup before 4.8.25 release.
...
Update copyright years.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2020-02-29 19:10:17 +03:00
Andrew Borodin
65e12d1a9f
(dlg_redraw): rename to dlg_draw.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-12-15 12:53:20 +03:00
Andrew Borodin
35f14be028
(widget_move): rename to widget_gotoyx.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-12-15 12:53:20 +03:00
Andrew Borodin
baca4ba045
Widget and WDialog API changes:
...
* (widget_destroy): new API to destroy widget.
* (del_widget): don't destroy widget after remove it from dialog.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-12-15 12:53:20 +03:00
Andrew Borodin
297391fd60
(dlg_adjust_position): rename to widget_adjust_position and make public.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-09-01 19:41:12 +03:00
Andrew Borodin
29110e5681
Move history operation routines from lib/widget/history.c to lib/mcconfig/history.c.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-09-01 19:41:12 +03:00
Andrew Borodin
37ffc02422
Ticket #117 : refactoring of SIGWINCH hangling.
...
Use pipe to collect consecutive raised SIGWINCH events.
Then handle multiple events at a time treating them
as a single one.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-09-01 19:22:21 +03:00
Andrew Borodin
3b997974ec
Refactor dialog command execution.
2019-04-27 19:29:24 +03:00
Andrew Borodin
433ae45bdd
Clarify checks of dialog and widget existence.
...
Widget list in the dialog cannot contain empty elements.
Dialog list cannot contain empty elements too.
Therefore simplify some checks.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-02-03 13:10:00 +03:00
Andrew Borodin
1dd8a47987
Ticket #3955 : code cleanup before 4.8.23 release.
...
Update copyright years.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-02-03 12:44:40 +03:00
Andrew Borodin
669a8e3e17
(dlg_run_done): fix possible NULL dereference.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2018-09-09 19:10:43 +03:00
Andrew Borodin
b9194d8c8a
(dlg_init): fix possible NULL dereference.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2018-09-09 19:10:43 +03:00
Andrew Borodin
a38c7f19e9
Ticket #3453 : Find file: show pattern and content in the results dialog title.
...
Initial step:
* (dlg_set_title): new API.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2018-09-04 10:26:35 +03:00
Andrew Borodin
ddd645526a
Update copyright years.
2018-02-04 11:30:22 +03:00
Andrew Borodin
e83409b6d7
Ticket #3766 : add_widget_autopos() doesn't remove focus from the previously focused widget.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2017-02-09 17:49:34 +02:00
Andrew Borodin
e9fd11bfcd
Update copyright years.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2017-01-22 19:12:55 +03:00
Andrew Borodin
8b14798cc4
setup: split integer and boolean options.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2017-01-22 18:44:22 +03:00
Andrew Borodin
36cc88b5f2
Reimplement widget focus/selection.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-09-11 11:30:20 +03:00
Andrew Borodin
599361b3fc
(dlg_set_bottom_widget): rename to widget_set_bottom.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-09-11 11:30:20 +03:00
Andrew Borodin
d200893347
(dlg_select_widget): rename to widget_select.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-09-11 11:30:20 +03:00
Andrew Borodin
35451978f6
Rename WDialog APIs:
...
dlg_one_up -> dlg_select_prev_widget
dlg_one_down -> dlg_select_next_widget
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-09-11 11:30:20 +03:00
Andrew Borodin
b19ae2b938
Refactoring of change of current widget.
...
Add new WDialog APIs:
* dlg_set_current_widget_next
* dlg_set_current_widget_prev
* dlg_get_widget_next_of
* dlg_get_widget_prev_of
and use them:
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-09-11 11:30:20 +03:00
Andrew Borodin
240350db95
Refactoring of widget drawing to avoid multiple widget redraw.
...
Send MSG_DRAW message immediately after MSG_FOCUS/MSG_UNFOCUS.
Thus, the MSG_DRAW message handler is the only place where widget
should be drawn. Widget should not draw itself in other message
handlers.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-09-11 11:30:20 +03:00
Andrew Borodin
c37f9b770a
WST_FOCUSED: add new state and handle it.
...
Notify widget's owner that widget gets or loses focus.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-09-11 11:26:00 +03:00
Andrew Borodin
c90b806728
Don't focus widget that doesn't have the WOP_SELECTABLE option.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-09-11 11:26:00 +03:00
Andrew Borodin
5ac1c5a3e0
Ticket #2919 : refactoring of focus/unfocus of widgets.
...
Initial step: add WOP_SELECTABLE option and set it up explicitly for
widgets that can be selected.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-09-11 11:26:00 +03:00
Andrew Borodin
adc6bd83d6
(dlg_adjust_position): refactoring.
2016-09-11 11:11:01 +03:00
Andrew Borodin
fb4f4674c7
Ticket #3641 : code cleanup before 4.8.18 release.
...
(dlg_adjust_position): don't change origin of non-centered dialog.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-09-11 11:11:01 +03:00
Andrew Borodin
b0e3552847
Refactoring of widget's position and size calculation.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-07-29 09:29:36 +03:00
Andrew Borodin
86fd77155e
Refactoring of dialog's position and size calculation.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-07-29 09:29:36 +03:00
Andrew Borodin
7c74fd90f0
Ticket #3661 : wrong handling of mouse clicks in long listing mode.
...
This occurs if the left panel is in long listing mode and the right
panel is in full listing mode:
When the left panel is active and you click on the right side of the
panel, the click event is directed to the (inactive) right panel instead
of the (active) left panel.
This occurs if the right panel is in long listing mode:
When the left panel is active and you click on the left panel, the click
event is always directed to the (inactive) right panel. It's impossible
to click anything on the left panel, if the right panel is in long
listing mode.
Thanks Seray Rosh <seray.rosh@web.de> for intial patch.
Initial commit: refactoring of widget selection.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-07-09 19:13:20 +03:00
Andrew Borodin
b4af91dfc0
Reorganize WDialog flags.
...
* DLG_FULLSCREEN: move and rename to WPOS_FULLSCREEN.
* DLG_CENTER: move and rename to WPOS_CENTER.
* DLG_TRYUP: move and rename to WPOS_TRYUP.
* WDialog::fullscreen: remove, use WPOS_FULLSCREEN instead.
* WDialog::compact: new field. Use instead of DLG_COMPACT.
* WDialog:🎏 remove.
* dlg_flags_t: remove.
* dlg_create: add new agruments: pos_flags, compact. Remove
argument: flags.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-06-02 20:41:00 +03:00
Andrew Borodin
0933b08964
(dlg_set_position): minor refactoring.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-06-02 20:34:38 +03:00
Andrew Borodin
163d9cd94a
Rename DLG_WANT_TAB to WOP_WANT_TAB and move it to widget_options_t.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-06-02 20:34:38 +03:00
Andrew Borodin
d44220c75f
If widget wants cursor, define that explicitly.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-06-02 20:34:38 +03:00
Andrew Borodin
db0d01b9d6
Add WST_MODAL state.
...
* WDialog::modal: remove. Use WST_MODAL instead.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-06-02 20:34:38 +03:00
Andrew Borodin
fd4e56bf39
WOP_TOP_SELECT: new widget option
...
...to place widget on top of other widgets in dialog.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-06-02 20:34:38 +03:00
Andrew Borodin
4b72fb5f5e
Join widget_state_t and dlg_state_t.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-06-02 20:34:38 +03:00
Andrew Borodin
0a2877edef
Move WOP_WANT_IDLE option to widget_state_t flags
...
...and rename to WST_IDLE.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-06-02 20:34:38 +03:00
Andrew Borodin
b337287336
Move WOP_DISABLED option to widget_state_t flags
...
...and rename to WST_DISABLED.
* Widget::state: new field.
* (widget_set_state): new function.
* (widget_set_options): symplify.
* (input_set_options): remove.
* MSG_ENABLE, MSG_DISABLE: new messages.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-06-02 20:34:38 +03:00
Andrew Borodin
f5a1dfcef4
(widget_get_options): new widget API.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-06-02 20:34:38 +03:00
Andrew Borodin
4a0cd948df
Change prefix of widget options: W_ -> WOP_.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-06-02 20:34:38 +03:00
Andrew Borodin
dcf2ac11c1
(dlg_set_top_or_bottom_widget): move to proper file section.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-05-07 16:19:02 +03:00