added wxAuiToolBar

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@55195 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Benjamin Williams
2008-08-23 06:31:01 +00:00
parent c5301893b2
commit 5875590747
4 changed files with 3256 additions and 1 deletions

View File

@@ -29,6 +29,7 @@
#include "wx/aui/dockart.h"
#include "wx/aui/floatpane.h"
#include "wx/aui/tabmdi.h"
#include "wx/aui/auibar.h"
#ifndef WX_PRECOMP
#include "wx/panel.h"
@@ -994,6 +995,22 @@ bool wxAuiManager::AddPane(wxWindow* window, const wxAuiPaneInfo& pane_info)
button.button_id = wxAUI_BUTTON_CLOSE;
pinfo.buttons.Add(button);
}
if (pinfo.HasGripper())
{
if (pinfo.window->IsKindOf(CLASSINFO(wxAuiToolBar)))
{
// prevent duplicate gripper -- both wxAuiManager and wxAuiToolBar
// have a gripper control. The toolbar's built-in gripper
// meshes better with the look and feel of the control than ours,
// so turn wxAuiManager's gripper off, and the toolbar's on.
wxAuiToolBar* tb = static_cast<wxAuiToolBar*>(pinfo.window);
pinfo.SetFlag(wxAuiPaneInfo::optionGripper, false);
tb->SetGripperVisible(true);
}
}
if (pinfo.best_size == wxDefaultSize &&
pinfo.window)
@@ -1025,6 +1042,8 @@ bool wxAuiManager::AddPane(wxWindow* window, const wxAuiPaneInfo& pane_info)
}
}
return true;
}
@@ -3572,7 +3591,6 @@ void wxAuiManager::OnFloatingPaneMoved(wxWindow* wnd, wxDirection dir)
wxPoint frame_pos = pane.frame->GetPosition();
wxPoint action_offset(pt.x-frame_pos.x, pt.y-frame_pos.y);
// if a key modifier is pressed while dragging the frame,
// don't dock the window
if (!wxGetKeyState(WXK_CONTROL) && !wxGetKeyState(WXK_ALT))