Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个包含绘图区域的对话。如果对话被放大或缩小或掩埋和暴露,我希望重新绘制绘图区域的内容,这在绘图区域是正常和自然的。为此,我创建了一个方法
bool on_expose_event (GdkEventExpose *event);
在课堂里。但是这个事件的存在会阻止对话中的所有其他小部件被正确绘制;据推测,当它们被暴露时,它也会被调用。如何创建一个仅刷新绘图区域的功能,而让所有其他小部件自行处理?
你真的应该继承 Gtk::DrawingArea 类并实现该类的 on_expose_event() 函数。