X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/457814b5aa2ee5c83abc65a6aee2a3ebcb1af34f..3fd528b939f44c0e0535fc5f3aff40989fb67a45:/utils/dialoged/src/dlghndlr.h diff --git a/utils/dialoged/src/dlghndlr.h b/utils/dialoged/src/dlghndlr.h index aced1272c7..80a9cf5ac8 100644 --- a/utils/dialoged/src/dlghndlr.h +++ b/utils/dialoged/src/dlghndlr.h @@ -41,15 +41,16 @@ DECLARE_CLASS(wxResourceEditorDialogHandler) int firstDragY; int oldDragX; int oldDragY; + bool m_mouseCaptured; +// long m_treeItem; wxResourceEditorDialogHandler(wxPanel *dialog, wxItemResource *resource, wxEvtHandler *oldHandler, wxResourceManager *manager); - ~wxResourceEditorDialogHandler(void) {} - - bool OnClose(void); + ~wxResourceEditorDialogHandler(void); void OnPaint(wxPaintEvent& event); void OnMouseEvent(wxMouseEvent& event); + void OnSize(wxSizeEvent& event); virtual void OnItemEvent(wxControl *win, wxMouseEvent& event); virtual void OnLeftClick(int x, int y, int keys); @@ -57,13 +58,21 @@ DECLARE_CLASS(wxResourceEditorDialogHandler) virtual void OnItemLeftClick(wxControl *item, int x, int y, int keys); virtual void OnItemRightClick(wxControl *item, int x, int y, int keys); virtual void OnItemSelect(wxControl *item, bool select); - virtual void OnItemMove(wxControl *item, int x, int y) {}; - virtual void OnItemSize(wxControl *item, int w, int h) {}; + virtual void OnItemMove( + wxControl *WXUNUSED(item), int WXUNUSED(x), int WXUNUSED(y) ) {}; + virtual void OnItemSize( + wxControl *WXUNUSED(item), int WXUNUSED(w), int WXUNUSED(h) ) {}; void AddChildHandlers(void); void PaintSelectionHandles(wxDC& dc); void ProcessItemEvent(wxControl *item, wxMouseEvent& event, int selectionHandle); +// Accessors +/* + inline long GetTreeItem() const { return m_treeItem; } + inline void SetTreeItem(long item) { m_treeItem = item; } +*/ + DECLARE_EVENT_TABLE() }; @@ -79,11 +88,12 @@ DECLARE_CLASS(wxResourceEditorControlHandler) bool isSelected; int handleSize; // selection handle size int handleMargin; // Distance between item edge and handle edge + long m_treeItem; static int dragOffsetX; // Distance between pointer at start of drag and static int dragOffsetY; // top-left of item wxResourceEditorControlHandler(wxControl *control, wxEvtHandler *oldHandler); - ~wxResourceEditorControlHandler(void) {} + ~wxResourceEditorControlHandler(void); void OnMouseEvent(wxMouseEvent& event); @@ -116,6 +126,12 @@ DECLARE_CLASS(wxResourceEditorControlHandler) virtual void OnRightClick(int x, int y, int keys); virtual void OnSelect(bool select); +// Accessors +/* + inline long GetTreeItem() const { return m_treeItem; } + inline void SetTreeItem(long item) { m_treeItem = item; } +*/ + DECLARE_EVENT_TABLE() };