https://github.com/wxWidgets/wxWidgets/pull/26304
(3 files)
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
@wsu-cb pushed 1 commit.
—
View it on GitHub or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
@vadz commented on this pull request.
Thanks, changes to the documentation are good, but I'm less sure about the changes to the sample (using unique_ptr is good, of course, but moving the handlers to another class is less obviously so).
> {
public:
DnDShapeFrame(wxFrame *parent);
- ~DnDShapeFrame();
+
+protected:
+ bool TryBefore(wxEvent& event) override;
I think overriding this function is sufficiently rare to merit a comment explaining why do we do this.
> @@ -541,6 +553,23 @@ class wxScrolled : public T
*/
void Scroll(const wxPoint& pt);
+ /**
+ Set this window to autoscroll even if it has not captured the mouse
+ (assuming the mouse cursor is in its autoscroll zone). This is
+ intended to be called on drag-enter to support drag and drop between
+ windows.
+
+ @since 3.3.0
⬇️ Suggested change
- @since 3.3.0 + @since 3.3.3
> @@ -541,6 +553,23 @@ class wxScrolled : public T
*/
void Scroll(const wxPoint& pt);
+ /**
+ Set this window to autoscroll even if it has not captured the mouse
+ (assuming the mouse cursor is in its autoscroll zone). This is
+ intended to be called on drag-enter to support drag and drop between
+ windows.
+
+ @since 3.3.0
+ */
+ void EnableAutoscrollWithoutCapture();
+ /**
+ Undo EnableAutoscrollWithoutCapture(). This is intended to be called on
+ drag-exit and drag-drop when supporting drag and drop between windows.
+
+ @since 3.3.0
⬇️ Suggested change
- @since 3.3.0 + @since 3.3.3
> @@ -867,20 +866,20 @@ wxEND_EVENT_TABLE() #if wxUSE_DRAG_AND_DROP -wxBEGIN_EVENT_TABLE(DnDShapeFrame, wxFrame) - EVT_MENU(Menu_Shape_New, DnDShapeFrame::OnNewShape) - EVT_MENU(Menu_Shape_Edit, DnDShapeFrame::OnEditShape) - EVT_MENU(Menu_Shape_Clear, DnDShapeFrame::OnClearShape) +wxBEGIN_EVENT_TABLE(DnDShapeCanvas, wxScrolledCanvas)
Not sure why did all these functions have to be moved to another class. I don't see anything wrong with it, per se, but this results in a lot of changes and I don't understand why do we need them?
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
@wsu-cb commented on this pull request.
> @@ -867,20 +866,20 @@ wxEND_EVENT_TABLE() #if wxUSE_DRAG_AND_DROP -wxBEGIN_EVENT_TABLE(DnDShapeFrame, wxFrame) - EVT_MENU(Menu_Shape_New, DnDShapeFrame::OnNewShape) - EVT_MENU(Menu_Shape_Edit, DnDShapeFrame::OnEditShape) - EVT_MENU(Menu_Shape_Clear, DnDShapeFrame::OnClearShape) +wxBEGIN_EVENT_TABLE(DnDShapeCanvas, wxScrolledCanvas)
The problem I am addressing is that, if I don't create a DnDShapeCanvas window that performs the scrolling, then the scrolling is part of the DnDShapeFrame, and that causes the status bar to move when the frame scrolls. At that point, I think there are actually fewer changes by having the shape operations implemented by DnDShapeCanvas rather than DnDShapeFrame.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
@wsu-cb pushed 2 commits.
—
View it on GitHub or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
> {
public:
DnDShapeFrame(wxFrame *parent);
- ~DnDShapeFrame();
+
+protected:
+ bool TryBefore(wxEvent& event) override;
Commented in b51b388
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
@wsu-cb commented on this pull request.
> @@ -541,6 +553,23 @@ class wxScrolled : public T
*/
void Scroll(const wxPoint& pt);
+ /**
+ Set this window to autoscroll even if it has not captured the mouse
+ (assuming the mouse cursor is in its autoscroll zone). This is
+ intended to be called on drag-enter to support drag and drop between
+ windows.
+
+ @since 3.3.0
I apologize for the careless mistake.
Fixed in 2e6689f
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
> @@ -541,6 +553,23 @@ class wxScrolled : public T
*/
void Scroll(const wxPoint& pt);
+ /**
+ Set this window to autoscroll even if it has not captured the mouse
+ (assuming the mouse cursor is in its autoscroll zone). This is
+ intended to be called on drag-enter to support drag and drop between
+ windows.
+
+ @since 3.3.0
+ */
+ void EnableAutoscrollWithoutCapture();
+ /**
+ Undo EnableAutoscrollWithoutCapture(). This is intended to be called on
+ drag-exit and drag-drop when supporting drag and drop between windows.
+
+ @since 3.3.0
At least I was consistent.
Fixed in 2e6689f
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()