Unified flags for orienting wxBookCtrls (with backward compatibility). Centralised code for sizing internals.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@35972 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Włodzimierz Skiba
2005-10-21 19:03:06 +00:00
parent d8fd7acb8b
commit 2ddb4d1358
14 changed files with 291 additions and 450 deletions

View File

@@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////////
// Name: xh_treebk.cpp
// Name: src/xrc/xh_treebk.cpp
// Purpose: XRC resource handler for wxTreebook
// Author: Evgeniy Tarassov
// Created: 2005/09/28
@@ -28,9 +28,11 @@ IMPLEMENT_DYNAMIC_CLASS(wxTreebookXmlHandler, wxXmlResourceHandler)
wxTreebookXmlHandler::wxTreebookXmlHandler()
: wxXmlResourceHandler(), m_isInside(false), m_tbk(NULL), m_treeContext()
{
XRC_ADD_STYLE(wxTBK_DEFAULT);
XRC_ADD_STYLE(wxTBK_LEFT);
XRC_ADD_STYLE(wxTBK_RIGHT);
XRC_ADD_STYLE(wxBK_DEFAULT);
XRC_ADD_STYLE(wxBK_TOP);
XRC_ADD_STYLE(wxBK_BOTTOM);
XRC_ADD_STYLE(wxBK_LEFT);
XRC_ADD_STYLE(wxBK_RIGHT);
AddWindowStyles();
}
@@ -92,7 +94,7 @@ wxObject *wxTreebookXmlHandler::DoCreateResource()
}
size_t depth = GetLong( wxT("depth") );
if( depth <= m_treeContext.Count() )
{
// first prepare the icon
@@ -122,9 +124,9 @@ wxObject *wxTreebookXmlHandler::DoCreateResource()
m_tbk->AddSubPage(m_treeContext.Item(depth - 1), wnd,
GetText(wxT("label")), GetBool(wxT("selected")), imgIndex);
}
m_treeContext.Add( m_tbk->GetPageCount() - 1);
}
else
wxLogError(wxT("Error in resource. wxTreebookPage has an invalid depth."));