GTkmm 中的自定义范围示例
我正在 Gtkmm 中开发电位计样式小部件,我想使用 Range 作为基类。
有谁知道这样做的正确例子?
I am working on a Potentiometer style widget in Gtkmm and I'd like to use Range as the baseclass.
Does anyone know of a proper example for doing this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我不确定你到底要问什么。我知道有一个使用范围小部件 的简单示例在这里。它确实处理您需要的调整对象的创建。您需要定义一个抽象电位计类,然后分别创建垂直和/或水平电位计以实现灵活性。
我能找到的最接近您需要重写的示例,以便制作您自己的自定义范围状小部件,位于 旧 Nabble。
我希望能为您提供更多帮助,但我对 Gtkmm 还很陌生。
I'm not sure exactly what you're asking for. I know that there is a simple example of using the range widget here. It does handle the creation of the Adjustment object that you'll need. You'll need to define an abstract potentiometer class, then create your vertical and/or horizontal potentiometers separately for flexibility.
The closest thing that I could find to an example of what you'd need to override in order to make your own custom range-like widget is on Old Nabble.
I wish that I could give you more help with this, but I'm rather new to Gtkmm.