added missing include; minor reformatting
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@37300 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -9,14 +9,6 @@
|
||||
// Licence: wxWindows licence
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// ============================================================================
|
||||
// declarations
|
||||
// ============================================================================
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// headers
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
// For compilers that support precompilation, includes "wx.h".
|
||||
#include "wx/wxprec.h"
|
||||
|
||||
@@ -27,6 +19,7 @@
|
||||
#if wxUSE_TOOLBOOK
|
||||
|
||||
#include "wx/imaglist.h"
|
||||
#include "wx/icon.h"
|
||||
#include "wx/toolbar.h"
|
||||
#include "wx/toolbook.h"
|
||||
#include "wx/settings.h"
|
||||
@@ -70,8 +63,7 @@ void wxToolbook::Init()
|
||||
m_needsRealizing = false;
|
||||
}
|
||||
|
||||
bool
|
||||
wxToolbook::Create(wxWindow *parent,
|
||||
bool wxToolbook::Create(wxWindow *parent,
|
||||
wxWindowID id,
|
||||
const wxPoint& pos,
|
||||
const wxSize& size,
|
||||
@@ -79,9 +71,7 @@ wxToolbook::Create(wxWindow *parent,
|
||||
const wxString& name)
|
||||
{
|
||||
if ( (style & wxBK_ALIGN_MASK) == wxBK_DEFAULT )
|
||||
{
|
||||
style |= wxBK_TOP;
|
||||
}
|
||||
|
||||
// no border for this control
|
||||
style &= ~wxBORDER_MASK;
|
||||
@@ -91,7 +81,6 @@ wxToolbook::Create(wxWindow *parent,
|
||||
wxDefaultValidator, name) )
|
||||
return false;
|
||||
|
||||
|
||||
int orient = wxTB_HORIZONTAL;
|
||||
if ( (style & (wxBK_LEFT | wxBK_RIGHT)) != 0)
|
||||
orient = wxTB_VERTICAL;
|
||||
@@ -161,7 +150,6 @@ wxSize wxToolbook::CalcSizeFromPage(const wxSize& sizePage) const
|
||||
return size;
|
||||
}
|
||||
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// accessing the pages
|
||||
// ----------------------------------------------------------------------------
|
||||
@@ -183,9 +171,7 @@ wxString wxToolbook::GetPageText(size_t n) const
|
||||
{
|
||||
wxToolBarToolBase* tool = GetToolBar()->FindById(n + 1);
|
||||
if (tool)
|
||||
{
|
||||
return tool->GetLabel();
|
||||
}
|
||||
else
|
||||
return wxEmptyString;
|
||||
}
|
||||
@@ -308,8 +294,7 @@ void wxToolbook::OnIdle(wxIdleEvent& event)
|
||||
// adding/removing the pages
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
bool
|
||||
wxToolbook::InsertPage(size_t n,
|
||||
bool wxToolbook::InsertPage(size_t n,
|
||||
wxWindow *page,
|
||||
const wxString& text,
|
||||
bool bSelect,
|
||||
@@ -410,9 +395,7 @@ void wxToolbook::OnToolSelected(wxCommandEvent& event)
|
||||
|
||||
// change wasn't allowed, return to previous state
|
||||
if (m_selection != selNew)
|
||||
{
|
||||
GetToolBar()->ToggleTool(m_selection, false);
|
||||
}
|
||||
}
|
||||
|
||||
#endif // wxUSE_TOOLBOOK
|
||||
|
Reference in New Issue
Block a user