prep flags, code indentation
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@43618 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -376,10 +376,11 @@ public:
|
|||||||
optionGripperTop = 1 << 15,
|
optionGripperTop = 1 << 15,
|
||||||
optionMaximized = 1 << 16,
|
optionMaximized = 1 << 16,
|
||||||
|
|
||||||
buttonClose = 1 << 22,
|
buttonClose = 1 << 21,
|
||||||
buttonMaximize = 1 << 23,
|
buttonMaximize = 1 << 22,
|
||||||
buttonMinimize = 1 << 24,
|
buttonMinimize = 1 << 23,
|
||||||
buttonPin = 1 << 25,
|
buttonPin = 1 << 24,
|
||||||
|
|
||||||
buttonCustom1 = 1 << 26,
|
buttonCustom1 = 1 << 26,
|
||||||
buttonCustom2 = 1 << 27,
|
buttonCustom2 = 1 << 27,
|
||||||
buttonCustom3 = 1 << 28,
|
buttonCustom3 = 1 << 28,
|
||||||
@@ -621,6 +622,8 @@ protected:
|
|||||||
wxTimer m_hint_fadetimer; // transparent fade timer
|
wxTimer m_hint_fadetimer; // transparent fade timer
|
||||||
wxByte m_hint_fadeamt; // transparent fade amount
|
wxByte m_hint_fadeamt; // transparent fade amount
|
||||||
wxByte m_hint_fademax; // maximum value of hint fade
|
wxByte m_hint_fademax; // maximum value of hint fade
|
||||||
|
|
||||||
|
void* m_reserved;
|
||||||
|
|
||||||
#ifndef SWIG
|
#ifndef SWIG
|
||||||
DECLARE_EVENT_TABLE()
|
DECLARE_EVENT_TABLE()
|
||||||
@@ -700,6 +703,7 @@ public:
|
|||||||
resizable = true;
|
resizable = true;
|
||||||
fixed = false;
|
fixed = false;
|
||||||
toolbar = false;
|
toolbar = false;
|
||||||
|
reserved1 = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef SWIG
|
#ifndef SWIG
|
||||||
@@ -715,6 +719,7 @@ public:
|
|||||||
toolbar = c.toolbar;
|
toolbar = c.toolbar;
|
||||||
panes = c.panes;
|
panes = c.panes;
|
||||||
rect = c.rect;
|
rect = c.rect;
|
||||||
|
reserved1 = c.reserved1;
|
||||||
}
|
}
|
||||||
|
|
||||||
wxAuiDockInfo& operator=(const wxAuiDockInfo& c)
|
wxAuiDockInfo& operator=(const wxAuiDockInfo& c)
|
||||||
@@ -729,6 +734,7 @@ public:
|
|||||||
toolbar = c.toolbar;
|
toolbar = c.toolbar;
|
||||||
panes = c.panes;
|
panes = c.panes;
|
||||||
rect = c.rect;
|
rect = c.rect;
|
||||||
|
reserved1 = c.reserved1;
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
#endif // SWIG
|
#endif // SWIG
|
||||||
@@ -751,6 +757,7 @@ public:
|
|||||||
bool toolbar; // flag indicating dock contains only toolbars
|
bool toolbar; // flag indicating dock contains only toolbars
|
||||||
bool fixed; // flag indicating that the dock operates on
|
bool fixed; // flag indicating that the dock operates on
|
||||||
// absolute coordinates as opposed to proportional
|
// absolute coordinates as opposed to proportional
|
||||||
|
bool reserved1;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@@ -97,8 +97,10 @@ void wxAuiFloatingFrame::SetPaneWindow(const wxAuiPaneInfo& pane)
|
|||||||
// if the frame window's max size is greater than the min size
|
// if the frame window's max size is greater than the min size
|
||||||
// then set the max size to the min size as well
|
// then set the max size to the min size as well
|
||||||
wxSize cur_max_size = GetMaxSize();
|
wxSize cur_max_size = GetMaxSize();
|
||||||
if (cur_max_size.x < pane.min_size.x ||
|
if (cur_max_size.IsFullySpecified() &&
|
||||||
cur_max_size.y < pane.min_size.y)
|
(cur_max_size.x < pane.min_size.x ||
|
||||||
|
cur_max_size.y < pane.min_size.y)
|
||||||
|
)
|
||||||
{
|
{
|
||||||
SetMaxSize(pane_min_size);
|
SetMaxSize(pane_min_size);
|
||||||
}
|
}
|
||||||
|
@@ -501,6 +501,7 @@ wxAuiManager::wxAuiManager(wxWindow* managed_wnd, unsigned int flags)
|
|||||||
m_frame = NULL;
|
m_frame = NULL;
|
||||||
m_dock_constraint_x = 0.3;
|
m_dock_constraint_x = 0.3;
|
||||||
m_dock_constraint_y = 0.3;
|
m_dock_constraint_y = 0.3;
|
||||||
|
m_reserved = NULL;
|
||||||
|
|
||||||
if (managed_wnd)
|
if (managed_wnd)
|
||||||
{
|
{
|
||||||
@@ -919,8 +920,8 @@ bool wxAuiManager::AddPane(wxWindow* window, const wxAuiPaneInfo& pane_info)
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool wxAuiManager::AddPane(wxWindow* window,
|
bool wxAuiManager::AddPane(wxWindow* window,
|
||||||
int direction,
|
int direction,
|
||||||
const wxString& caption)
|
const wxString& caption)
|
||||||
{
|
{
|
||||||
wxAuiPaneInfo pinfo;
|
wxAuiPaneInfo pinfo;
|
||||||
pinfo.Caption(caption);
|
pinfo.Caption(caption);
|
||||||
@@ -936,8 +937,8 @@ bool wxAuiManager::AddPane(wxWindow* window,
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool wxAuiManager::AddPane(wxWindow* window,
|
bool wxAuiManager::AddPane(wxWindow* window,
|
||||||
const wxAuiPaneInfo& pane_info,
|
const wxAuiPaneInfo& pane_info,
|
||||||
const wxPoint& drop_pos)
|
const wxPoint& drop_pos)
|
||||||
{
|
{
|
||||||
if (!AddPane(window, pane_info))
|
if (!AddPane(window, pane_info))
|
||||||
return false;
|
return false;
|
||||||
@@ -1123,7 +1124,8 @@ void wxAuiManager::MaximizePane(wxAuiPaneInfo& pane_info)
|
|||||||
p.Restore();
|
p.Restore();
|
||||||
|
|
||||||
// save hidden state
|
// save hidden state
|
||||||
p.SetFlag(wxAuiPaneInfo::savedHiddenState, p.HasFlag(wxAuiPaneInfo::optionHidden));
|
p.SetFlag(wxAuiPaneInfo::savedHiddenState,
|
||||||
|
p.HasFlag(wxAuiPaneInfo::optionHidden));
|
||||||
|
|
||||||
// hide the pane, because only the newly
|
// hide the pane, because only the newly
|
||||||
// maximized pane should show
|
// maximized pane should show
|
||||||
@@ -1153,7 +1155,8 @@ void wxAuiManager::RestorePane(wxAuiPaneInfo& pane_info)
|
|||||||
wxAuiPaneInfo& p = m_panes.Item(i);
|
wxAuiPaneInfo& p = m_panes.Item(i);
|
||||||
if (!p.IsToolbar())
|
if (!p.IsToolbar())
|
||||||
{
|
{
|
||||||
p.SetFlag(wxAuiPaneInfo::optionHidden, p.HasFlag(wxAuiPaneInfo::savedHiddenState));
|
p.SetFlag(wxAuiPaneInfo::optionHidden,
|
||||||
|
p.HasFlag(wxAuiPaneInfo::savedHiddenState));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1318,7 +1321,7 @@ wxString wxAuiManager::SavePerspective()
|
|||||||
{
|
{
|
||||||
wxString result;
|
wxString result;
|
||||||
result.Alloc(500);
|
result.Alloc(500);
|
||||||
result = wxT("layout1|");
|
result = wxT("layout2|");
|
||||||
|
|
||||||
int pane_i, pane_count = m_panes.GetCount();
|
int pane_i, pane_count = m_panes.GetCount();
|
||||||
for (pane_i = 0; pane_i < pane_count; ++pane_i)
|
for (pane_i = 0; pane_i < pane_count; ++pane_i)
|
||||||
@@ -1349,11 +1352,13 @@ bool wxAuiManager::LoadPerspective(const wxString& layout, bool update)
|
|||||||
wxString part;
|
wxString part;
|
||||||
|
|
||||||
// check layout string version
|
// check layout string version
|
||||||
|
// 'layout1' = wxAUI 0.9.0 - wxAUI 0.9.2
|
||||||
|
// 'layout2' = wxAUI 0.9.2 (wxWidgets 2.8)
|
||||||
part = input.BeforeFirst(wxT('|'));
|
part = input.BeforeFirst(wxT('|'));
|
||||||
input = input.AfterFirst(wxT('|'));
|
input = input.AfterFirst(wxT('|'));
|
||||||
part.Trim(true);
|
part.Trim(true);
|
||||||
part.Trim(false);
|
part.Trim(false);
|
||||||
if (part != wxT("layout1"))
|
if (part != wxT("layout2"))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
// mark all panes currently managed as docked and hidden
|
// mark all panes currently managed as docked and hidden
|
||||||
@@ -1521,10 +1526,10 @@ void wxAuiManager::GetPanePositionsAndSizes(wxAuiDockInfo& dock,
|
|||||||
|
|
||||||
|
|
||||||
void wxAuiManager::LayoutAddPane(wxSizer* cont,
|
void wxAuiManager::LayoutAddPane(wxSizer* cont,
|
||||||
wxAuiDockInfo& dock,
|
wxAuiDockInfo& dock,
|
||||||
wxAuiPaneInfo& pane,
|
wxAuiPaneInfo& pane,
|
||||||
wxAuiDockUIPartArray& uiparts,
|
wxAuiDockUIPartArray& uiparts,
|
||||||
bool spacer_only)
|
bool spacer_only)
|
||||||
{
|
{
|
||||||
wxAuiDockUIPart part;
|
wxAuiDockUIPart part;
|
||||||
wxSizerItem* sizer_item;
|
wxSizerItem* sizer_item;
|
||||||
@@ -1642,7 +1647,7 @@ void wxAuiManager::LayoutAddPane(wxSizer* cont,
|
|||||||
|
|
||||||
|
|
||||||
// determine if the pane should have a minimum size; if the pane is
|
// determine if the pane should have a minimum size; if the pane is
|
||||||
// non-resizable (fixed) then we must set a minimum size. Alternitavely,
|
// non-resizable (fixed) then we must set a minimum size. Alternatively,
|
||||||
// if the pane.min_size is set, we must use that value as well
|
// if the pane.min_size is set, we must use that value as well
|
||||||
|
|
||||||
wxSize min_size = pane.min_size;
|
wxSize min_size = pane.min_size;
|
||||||
@@ -2572,7 +2577,7 @@ int wxAuiManager::GetDockPixelOffset(wxAuiPaneInfo& test)
|
|||||||
// the target info. If the operation was allowed, the function returns true.
|
// the target info. If the operation was allowed, the function returns true.
|
||||||
|
|
||||||
bool wxAuiManager::ProcessDockResult(wxAuiPaneInfo& target,
|
bool wxAuiManager::ProcessDockResult(wxAuiPaneInfo& target,
|
||||||
const wxAuiPaneInfo& new_pos)
|
const wxAuiPaneInfo& new_pos)
|
||||||
{
|
{
|
||||||
bool allowed = false;
|
bool allowed = false;
|
||||||
switch (new_pos.dock_direction)
|
switch (new_pos.dock_direction)
|
||||||
|
Reference in New Issue
Block a user