I don't want to sound picky, but I couldn't get your code to work correctly, although I may have been looking at the wrong place. A little history:
I was investigating this
http://sourceforge.net/tracker/index.php?func=detail&aid=1606167&group_id=9863&atid=109863 bug report, and having built a debug version of wxWidgets 2.8.7, I fired up the auidemo project. In any case I added the aui library as a part of the project, so that I could step through the code to see what was happening where.
The above mentioned bug was traced (I believe) to line 3833 of framemanager.cpp
- Code: Select all
else if (part->type == wxAuiDockUIPart::typeGripper)
{
cursor = wxCursor(wxCURSOR_SIZING);
}
This simply checks to see if the mouse is over a gripper. The bug suggests that when the pane is floating (that is contained within a wxAuiFloatingFrame) then the mouse cursor should
not change to the wxCURSOR_SIZING shaped cursor (since it has no function here - the frame alone should be used). It took me a while, but the result of my investigations was to change the code to
- Code: Select all
else if (part->type == wxAuiDockUIPart::typeGripper)
{
if(!part->cont_sizer->GetContainingWindow()->IsKindOf(CLASSINFO(wxAuiFloatingFrame)))
cursor = wxCursor(wxCURSOR_SIZING);
}
This has the result that when the gripper is contained within a wxAuiFloatingFrame the mouse cursor remains unchanged, however will indeed change when the gripper pane is docked within the main frame (checked with auidemo).
Now as to your code, I adapted it slightly so that the code looks like
- Code: Select all
else if (part->type == wxAuiDockUIPart::typeGripper)
{
bool showcursor = part->pane->frame;
cursor = wxCursor(wxCURSOR_SIZING);
}
This code will return false whether the pane is docked or not.
OR have I missed something obvious here? (and quite probably so painfully obvious to a beginner that I should just hang my head in shame and try to stop fixing someone else's bugs and take a beginners course in C++ programming)
Thanks
Mal