Skip to content

相对滚动

使鼠标滚轮相对当前位置发生滚动。

语法

cpp
class RX784::Device {
    Status scrollRel(
        int16_t w
    );
};
class RX784::Device {
    Status scrollRel(
        int16_t w
    );
};
e
类名基类公开备注
RX784设备
方法名返回值类型公开备注
相对滚动整数型
参数名类型参考可空数组备注
w短整数型
.版本 2 .程序集 RX784设备, , 公开 .子程序 相对滚动, 整数型, 公开 .参数 w, 短整数型
py
class Device:
    def scroll_rel(self,
        w: int
    ) -> Status: ...
class Device:
    def scroll_rel(self,
        w: int
    ) -> Status: ...

参数

名称英文说明
ww齿格数,向前为正,向后为负。

返回值

名称英文说明
状态码status成功返回

示例

cpp
#include "rx784.hpp"

int main() {
    RX784::Device device;

    device.open("COM1");

    device.scrollRel(1);  // 向前滚动 1 齿格

    device.close();
}
#include "rx784.hpp"

int main() {
    RX784::Device device;

    device.open("COM1");

    device.scrollRel(1);  // 向前滚动 1 齿格

    device.close();
}
e
方法名返回值类型公开备注
_启动子程序整数型
变量名类型静态数组备注
设备RX784设备
设备.打开 (“COM1”)
设备.相对滚动 (1) ' 向前滚动 1 齿格
设备.关闭 ()
返回 (0)
.版本 2 .子程序 _启动子程序, 整数型 .局部变量 设备, RX784设备 设备.打开 (“COM1”) 设备.相对滚动 (1) ' 向前滚动 1 齿格 设备.关闭 () 返回 (0)
py
import rx784

device = rx784.Device()

device.open('COM1')

device.scroll_rel(1)  # 向前滚动 1 齿格

device.close()
import rx784

device = rx784.Device()

device.open('COM1')

device.scroll_rel(1)  # 向前滚动 1 齿格

device.close()