Mouse wheel and mouse buttons in Simulator

Description

I have created little GUI for my application and everything seems to work nice. Now I am navigating through the menu by left mouse button (click or drag) and I want to add mouse scrolling. So user can use either click and drag or scroll in large menu with lots of elements. My issue is similar to this how-to-use-mouse-wheel-on-simulator/803 but it did not help me.

What MCU/Processor/Board and compiler are you using?

Windows simulator under visual studio

What do you want to achieve?

Scrolling in menu using mouse wheel.

What have you tried so far?

I am using combination of this github.com/littlevgl/lv_drivers/blob/master/indev/mousewheel.c and
github.com/littlevgl/lv_drivers/blob/master/indev/mouse.c to handle mouse.

Code to reproduce

I am little bit confused with inicialization what should I choose as indev_drv.type when I want to use mouse wheel and mouse buttons together LV_INDEV_TYPE_ENCODER or LV_INDEV_TYPE_POINTER?

            lv_indev_drv_t indev_drv;
            lv_indev_drv_init(&indev_drv);
            indev_drv.type = LV_INDEV_TYPE_ENCODER;
            indev_drv.read_cb = mousewheel_read;
            lv_indev_drv_register(&indev_drv);

In mousewheel_read I can see that enc_diff changes as I am scrolling but menu is not moving. My menu is created as list of buttons and I am not sure if it is needed to group them like in this example lv_examples/lv_tests/lv_test_group/lv_test_group.c ? Or how I should propagate enc_ difference to my button list?

Do want something similar when you browse long webpage and simply scroll with your mouse to move the page? If so, this kind of action is not supported directly in lvgl. If you are interested in this feature please open a post in the “Feature request” category.

The mosusewheel driver is used to emulates an encoder so it’s not really like a real mouse wheel.