diff options
Diffstat (limited to 'ui/mouse_move_dlg.h')
-rw-r--r-- | ui/mouse_move_dlg.h | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/ui/mouse_move_dlg.h b/ui/mouse_move_dlg.h index 9d68845d..c7d07629 100644 --- a/ui/mouse_move_dlg.h +++ b/ui/mouse_move_dlg.h @@ -12,24 +12,23 @@ namespace ffs3 { -//move main dialog by mouse-dragging contained sub-windows: -//---------------------------------------------------------------------------------------- -//keep it as an attribute of the to-be-moved dialog and ensure that all connected source windows -//have a longer lifetime than the dialog which is moved (should be fulfilled naturally) -class MouseMoveWindow : private wxEvtHandler +//move main dialog by mouse-dragging contained sub-windows: just attach to parent via new in constructor: ownership passed! +class MouseMoveWindow : public wxWindow //private wxEvtHandler { public: - MouseMoveWindow(wxWindow* dialogToMove) : - dialogToMove_(dialogToMove) {} - - void connectSourceWindow(wxWindow* sourceWindow); + MouseMoveWindow(wxWindow& parent, + wxWindow* child1, + wxWindow* child2 = NULL, + wxWindow* child3 = NULL, + wxWindow* child4 = NULL, + wxWindow* child5 = NULL, + wxWindow* child6 = NULL); private: void LeftButtonDown(wxMouseEvent& event); - - wxWindow* dialogToMove_; }; + } |