allow programmatic access to start pane dragging

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@43528 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Benjamin Williams 2006-11-19 18:10:18 +00:00
parent 2522d52917
commit cf37c9a90d
2 changed files with 35 additions and 8 deletions

View File

@ -476,15 +476,22 @@ public:
void Update();
public:
virtual wxAuiFloatingFrame* CreateFloatingFrame(wxWindow* parent, const wxAuiPaneInfo& p);
wxRect CalculateHintRect(wxWindow* pane_window,
const wxPoint& pt,
const wxPoint& offset);
void StartPaneDrag(
wxWindow* pane_window,
const wxPoint& offset);
wxRect CalculateHintRect(
wxWindow* pane_window,
const wxPoint& pt,
const wxPoint& offset);
void DrawHintRect(wxWindow* pane_window,
const wxPoint& pt,
const wxPoint& offset);
void DrawHintRect(
wxWindow* pane_window,
const wxPoint& pt,
const wxPoint& offset);
virtual void ShowHint(const wxRect& rect);
virtual void HideHint();

View File

@ -3074,6 +3074,27 @@ void wxAuiManager::HideHint()
void wxAuiManager::StartPaneDrag(wxWindow* pane_window,
const wxPoint& offset)
{
wxAuiPaneInfo& pane = GetPane(pane_window);
if (!pane.IsOk())
return;
if (pane.IsToolbar())
{
m_action = actionDragToolbarPane;
}
else
{
m_action = actionDragFloatingPane;
}
m_action_window = pane_window;
m_action_offset = offset;
m_frame->CaptureMouse();
}
// CalculateHintRect() calculates the drop hint rectangle. The method
// first calls DoDrop() to determine the exact position the pane would
@ -4041,9 +4062,8 @@ void wxAuiManager::OnMotion(wxMouseEvent& event)
pt.y - m_action_offset.y);
// float the window
if(pane_info->IsMaximized()) {
if (pane_info->IsMaximized())
RestorePane(*pane_info);
}
pane_info->Float();
Update();