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.
ユーザーがパンして描画できるように、描画領域ウィジェットのxイベントを処理しようとしています。プレスイベントおよびリリースイベントハンドラーは呼び出されますが、モーション通知イベントは呼び出されません。ハンドラーを追加Gdk::POINTER_MOTION_MASKして上書きしましon_motion_notify_event(GdkEventButton *event)たが、呼び出されません。私は何か間違ったことをしていますか?
Gdk::POINTER_MOTION_MASK
on_motion_notify_event(GdkEventButton *event)
あなたが述べたことを正確に行った場合、問題は正しいメソッド名をオーバーロードしたが、引数のタイプが間違っていることです。正しいオーバーロードは次のとおりです(ドキュメントから):
virtual bool Gtk::Widget::on_motion_notify_event(GdkEventMotion * event)
異なる引数タイプに注意してください。