fixed typos in last check in
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@43578 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -466,21 +466,21 @@ public:
|
|||||||
|
|
||||||
bool DetachPane(wxWindow* window);
|
bool DetachPane(wxWindow* window);
|
||||||
|
|
||||||
|
void Update();
|
||||||
|
|
||||||
|
wxString SavePaneInfo(wxAuiPaneInfo& pane);
|
||||||
|
void LoadPaneInfo(wxString pane_part, wxAuiPaneInfo &pane);
|
||||||
|
wxString SavePerspective();
|
||||||
|
bool LoadPerspective(const wxString& perspective, bool update = true);
|
||||||
|
|
||||||
|
void SetDockSizeConstraint(double width_pct, double height_pct);
|
||||||
|
void GetDockSizeConstraint(double* width_pct, double* height_pct) const;
|
||||||
|
|
||||||
void ClosePane(wxAuiPaneInfo& pane_info);
|
void ClosePane(wxAuiPaneInfo& pane_info);
|
||||||
void MaximizePane(wxAuiPaneInfo& pane_info);
|
void MaximizePane(wxAuiPaneInfo& pane_info);
|
||||||
void RestorePane(wxAuiPaneInfo& pane_info);
|
void RestorePane(wxAuiPaneInfo& pane_info);
|
||||||
void RestoreMaximizedPane();
|
void RestoreMaximizedPane();
|
||||||
|
|
||||||
wxString SavePaneInfo(wxAuiPaneInfo& pane);
|
|
||||||
void LoadPaneInfo(wxString pane_part, wxAuiPaneInfo &pane);
|
|
||||||
|
|
||||||
wxString SavePerspective();
|
|
||||||
|
|
||||||
bool LoadPerspective(const wxString& perspective,
|
|
||||||
bool update = true);
|
|
||||||
|
|
||||||
void Update();
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
virtual wxAuiFloatingFrame* CreateFloatingFrame(wxWindow* parent, const wxAuiPaneInfo& p);
|
virtual wxAuiFloatingFrame* CreateFloatingFrame(wxWindow* parent, const wxAuiPaneInfo& p);
|
||||||
@@ -609,12 +609,15 @@ protected:
|
|||||||
wxAuiDockUIPart* m_action_part; // ptr to the part the action happened to
|
wxAuiDockUIPart* m_action_part; // ptr to the part the action happened to
|
||||||
wxWindow* m_action_window; // action frame or window (NULL if none)
|
wxWindow* m_action_window; // action frame or window (NULL if none)
|
||||||
wxRect m_action_hintrect; // hint rectangle for the action
|
wxRect m_action_hintrect; // hint rectangle for the action
|
||||||
bool m_skipping;
|
|
||||||
bool m_has_maximized;
|
|
||||||
wxRect m_last_rect;
|
wxRect m_last_rect;
|
||||||
wxAuiDockUIPart* m_hover_button;// button uipart being hovered over
|
wxAuiDockUIPart* m_hover_button;// button uipart being hovered over
|
||||||
wxRect m_last_hint; // last hint rectangle
|
wxRect m_last_hint; // last hint rectangle
|
||||||
wxPoint m_last_mouse_move; // last mouse move position (see OnMotion)
|
wxPoint m_last_mouse_move; // last mouse move position (see OnMotion)
|
||||||
|
bool m_skipping;
|
||||||
|
bool m_has_maximized;
|
||||||
|
|
||||||
|
double m_dock_constraint_x; // 0.0 .. 1.0; max pct of window width a dock can consume
|
||||||
|
double m_dock_constraint_y; // 0.0 .. 1.0; max pct of window height a dock can consume
|
||||||
|
|
||||||
wxFrame* m_hint_wnd; // transparent hint window, if supported by platform
|
wxFrame* m_hint_wnd; // transparent hint window, if supported by platform
|
||||||
wxTimer m_hint_fadetimer; // transparent fade timer
|
wxTimer m_hint_fadetimer; // transparent fade timer
|
||||||
|
@@ -2398,7 +2398,8 @@ void wxAuiNotebook::InitNotebook(long style)
|
|||||||
m_dummy_wnd->Show(false);
|
m_dummy_wnd->Show(false);
|
||||||
|
|
||||||
m_mgr.SetManagedWindow(this);
|
m_mgr.SetManagedWindow(this);
|
||||||
m_mgr.SetFlags(wxAUI_MGR_DEFAULT | (1 << 28) /*wxAUI_MGR_NO_DOCK_SIZE_LIMIT*/);
|
m_mgr.SetFlags(wxAUI_MGR_DEFAULT);
|
||||||
|
m_mgr.SetDockSizeConstraint(1.0, 1.0); // no dock size constraint
|
||||||
|
|
||||||
m_mgr.AddPane(m_dummy_wnd,
|
m_mgr.AddPane(m_dummy_wnd,
|
||||||
wxAuiPaneInfo().Name(wxT("dummy")).Bottom().CaptionVisible(false).Show(false));
|
wxAuiPaneInfo().Name(wxT("dummy")).Bottom().CaptionVisible(false).Show(false));
|
||||||
|
@@ -153,9 +153,9 @@ static void DrawGradientRectangle(wxDC& dc,
|
|||||||
int r,g,b;
|
int r,g,b;
|
||||||
|
|
||||||
|
|
||||||
r = start_color.Red() + (high == 0 ? 0 : (((i*rd*100)/high)/100));
|
r = start_color.Red() + (high <= 0 ? 0 : (((i*rd*100)/high)/100));
|
||||||
g = start_color.Green() + (high == 0 ? 0 : (((i*gd*100)/high)/100));
|
g = start_color.Green() + (high <= 0 ? 0 : (((i*gd*100)/high)/100));
|
||||||
b = start_color.Blue() + (high == 0 ? 0 : (((i*bd*100)/high)/100));
|
b = start_color.Blue() + (high <= 0 ? 0 : (((i*bd*100)/high)/100));
|
||||||
|
|
||||||
wxPen p(wxColor((unsigned char)r,
|
wxPen p(wxColor((unsigned char)r,
|
||||||
(unsigned char)g,
|
(unsigned char)g,
|
||||||
|
@@ -69,11 +69,6 @@ DEFINE_EVENT_TYPE(wxEVT_AUI_FIND_MANAGER)
|
|||||||
IMPLEMENT_DYNAMIC_CLASS(wxAuiManagerEvent, wxEvent)
|
IMPLEMENT_DYNAMIC_CLASS(wxAuiManagerEvent, wxEvent)
|
||||||
IMPLEMENT_CLASS(wxAuiManager, wxEvtHandler)
|
IMPLEMENT_CLASS(wxAuiManager, wxEvtHandler)
|
||||||
|
|
||||||
// private manager flags (not yet on the public API)
|
|
||||||
enum wxAuiPrivateManagerOption
|
|
||||||
{
|
|
||||||
wxAUI_MGR_NO_DOCK_SIZE_LIMIT = 1 << 28
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
const int auiToolBarLayer = 10;
|
const int auiToolBarLayer = 10;
|
||||||
@@ -504,6 +499,8 @@ wxAuiManager::wxAuiManager(wxWindow* managed_wnd, unsigned int flags)
|
|||||||
m_skipping = false;
|
m_skipping = false;
|
||||||
m_has_maximized = false;
|
m_has_maximized = false;
|
||||||
m_frame = NULL;
|
m_frame = NULL;
|
||||||
|
m_dock_constraint_x = 0.3;
|
||||||
|
m_dock_constraint_y = 0.3;
|
||||||
|
|
||||||
if (managed_wnd)
|
if (managed_wnd)
|
||||||
{
|
{
|
||||||
@@ -1972,17 +1969,22 @@ wxSizer* wxAuiManager::LayoutAll(wxAuiPaneInfoArray& panes,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!(m_flags & wxAUI_MGR_NO_DOCK_SIZE_LIMIT))
|
|
||||||
{
|
// new dock's size may not be more than the dock constraint
|
||||||
// new dock's size may not be more than 1/3 of the frame size
|
// parameter specifies. See SetDockSizeConstraint()
|
||||||
if (dock.IsHorizontal())
|
|
||||||
size = wxMin(size, cli_size.y/3);
|
|
||||||
else
|
|
||||||
size = wxMin(size, cli_size.x/3);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
int max_dock_x_size = (int)(m_dock_constraint_x * ((double)cli_size.x));
|
||||||
|
int max_dock_y_size = (int)(m_dock_constraint_y * ((double)cli_size.y));
|
||||||
|
|
||||||
|
if (dock.IsHorizontal())
|
||||||
|
size = wxMin(size, max_dock_y_size);
|
||||||
|
else
|
||||||
|
size = wxMin(size, max_dock_x_size);
|
||||||
|
|
||||||
|
// absolute minimum size for a dock is 10 pixels
|
||||||
if (size < 10)
|
if (size < 10)
|
||||||
size = 10;
|
size = 10;
|
||||||
|
|
||||||
dock.size = size;
|
dock.size = size;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2215,6 +2217,27 @@ wxSizer* wxAuiManager::LayoutAll(wxAuiPaneInfoArray& panes,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// SetDockSizeConstraint() allows the dock constraints to be set. For example,
|
||||||
|
// specifying values of 0.5, 0.5 will mean that upon dock creation, a dock may
|
||||||
|
// not be larger than half of the window's size
|
||||||
|
|
||||||
|
void wxAuiManager::SetDockSizeConstraint(double width_pct, double height_pct)
|
||||||
|
{
|
||||||
|
m_dock_constraint_x = wxMax(0.0, wxMin(1.0, width_pct));
|
||||||
|
m_dock_constraint_y = wxMax(0.0, wxMin(1.0, height_pct));
|
||||||
|
}
|
||||||
|
|
||||||
|
void wxAuiManager::GetDockSizeConstraint(double* width_pct, double* height_pct) const
|
||||||
|
{
|
||||||
|
if (width_pct)
|
||||||
|
*width_pct = m_dock_constraint_x;
|
||||||
|
|
||||||
|
if (height_pct)
|
||||||
|
*height_pct = m_dock_constraint_y;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Update() updates the layout. Whenever changes are made to
|
// Update() updates the layout. Whenever changes are made to
|
||||||
// one or more panes, this function should be called. It is the
|
// one or more panes, this function should be called. It is the
|
||||||
// external entry point for running the layout engine.
|
// external entry point for running the layout engine.
|
||||||
|
Reference in New Issue
Block a user