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:
David Surovell
2006-02-04 04:58:30 +00:00
parent 0857d1d659
commit c2794afdbb

View File

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