Mercurial > octave-nkf
comparison libgui/graphics/Container.h @ 18648:1f8ce7be9c00 gui-release
Add support for "windowbuttonmotionfcn" and "currentpoint"
* Figure.cc (Figure::Figure): Enable mouse tracking if
windowbuttonmotionfcn callback is defined.
(Figure::update): Enable mouse tracking on canvas and all child widgets
when windowbuttonmotionfcn is defined.
* Panel.cc (Panel::Panel): Propagate mouse tracking to child widgets
during initialization.
* Container.h (Container::childEvent): New method.
* Container.cc (Container::childEvent): Likewise. Propagate mouse
tracking status to child widgets.
* BaseControl.cc (BaseControl::eventFilter): Handle mouse move events
and call figure's appropriate callback.
* Canvas.h (Canvas::updateCurrentPoint): New method.
* Canvas.cc (Canvas::updateCurrentPoint): Likewise. Update figure and
child axes currentpoint property.
(Canvas::canvasMouseMoveEvent): Update currentpoint properties and call
windowbuttonmotionfcn callback.
(Canvas::canvasMousePressEvent): Call updateCurrentPoint.
(Canvas::canvasMouseReleaseEvent): Likewise.
author | Michael Goffioul <michael.goffioul@gmail.com> |
---|---|
date | Tue, 01 Apr 2014 20:57:08 -0400 |
parents | 523878f76518 |
children | f0e61a67ad9f |
comparison
equal
deleted
inserted
replaced
18645:086093fbdc1a | 18648:1f8ce7be9c00 |
---|---|
43 ~Container (void); | 43 ~Container (void); |
44 | 44 |
45 Canvas* canvas (const graphics_handle& handle, bool create = true); | 45 Canvas* canvas (const graphics_handle& handle, bool create = true); |
46 | 46 |
47 protected: | 47 protected: |
48 void childEvent (QChildEvent* event); | |
48 void resizeEvent (QResizeEvent* event); | 49 void resizeEvent (QResizeEvent* event); |
49 | 50 |
50 private: | 51 private: |
51 Canvas* m_canvas; | 52 Canvas* m_canvas; |
52 }; | 53 }; |