);
private:
+ inline virtual bool LoadFile( wxBitmap* pBitmap
+ ,int nId
+ ,long lFlags
+ ,int nDesiredWidth
+ ,int nDesiredHeight
+ )
+ {
+ return wxBitmapHandler::LoadFile( pBitmap
+ ,nId
+ ,lFlags
+ ,nDesiredWidth
+ ,nDesiredHeight
+ );
+ }
DECLARE_DYNAMIC_CLASS(wxBMPFileHandler)
};
}
virtual bool LoadFile( wxBitmap* pBitmap
- ,const wxString& rName
- ,HPS hPs
+ ,int nId
,long lFlags
,int nDesiredWidth
,int nDesiredHeight
,int nDesiredWidth = -1
,int nDesiredHeight = -1
) = 0;
+private:
+ inline virtual bool Load( wxGDIImage* pImage
+ ,int nId
+ ,long lFlags
+ ,int nDesiredWidth
+ ,int nDesiredHeight
+ )
+ {
+ return FALSE;
+ }
};
class WXDLLEXPORT wxICOFileHandler : public wxIconHandler
bool wxBMPResourceHandler::LoadFile(
wxBitmap* pBitmap
-, const wxString& rName
-, HPS hPs
+, int nId
, long lFlags
, int nDesiredWidth
, int nDesiredHeight
)
{
- // TODO: load a bitmap from a file
- /*
- rBitmap->SetHBITMAP((WXHBITMAP)::LoadBitmap(wxGetInstance(), rName));
-
- wxBitmapRefData* pData = bitmap->GetBitmapData();
-
- if (pBitmap->Ok())
+ SIZEL vSize = {0, 0};
+ DEVOPENSTRUC vDop = {0L, "DISPLAY", NULL, 0L, 0L, 0L, 0L, 0L, 0L};
+ HDC hDC = ::DevOpenDC(vHabmain, OD_MEMORY, "*", 5L, (PDEVOPENDATA)&vDop, NULLHANDLE);
+ HPS hPS = ::GpiCreatePS(vHabmain, hDC, &vSize, PU_PELS | GPIA_ASSOC);
+
+ pBitmap->SetHBITMAP((WXHBITMAP)::GpiLoadBitmap( hPS
+ ,NULLHANDLE
+ ,nId
+ ,0
+ ,0
+ ));
+ ::GpiDestroyPS(hPS);
+ ::DevCloseDC(hDC);
+
+ wxBitmapRefData* pData = pBitmap->GetBitmapData();
+
+ if ( pBitmap->Ok() )
{
- BITMAP bm;
-
- if ( !::GetObject(GetHbitmapOf(*pBitmap), sizeof(BITMAP), (LPSTR) &bm) )
- {
- wxLogLastError("GetObject(HBITMAP)");
- }
+ BITMAPINFOHEADER vBmph;
- data->m_width = bm.bmWidth;
- data->m_height = bm.bmHeight;
- data->m_depth = bm.bmBitsPixel;
- }
- else
- {
- // it's probably not found
- wxLogError(wxT("Can't load bitmap '%s' from resources! Check .rc file."),
- name.c_str());
+ ::GpiQueryBitmapParameters(GetHbitmapOf(*pBitmap), &vBmph);
+ pData->m_nWidth = vBmph.cx;
+ pData->m_nHeight = vBmph.cy;
+ pData->m_nDepth = vBmph.cBitCount;
}
-
- return bitmap->Ok();
- */
- return(FALSE);
-}
+ return(pBitmap->Ok());
+} // end of wxBMPResourceHandler::LoadFile
bool wxBMPFileHandler::LoadFile(
wxBitmap* pBitmap
// actual size
wxSize vSize;
- // TODO: load icon directly from a file
- /*
-#ifdef __WIN32__
- HICON hicon = ::ExtractIcon(wxGetInstance(), name, first);
- if ( !hicon )
- {
- wxLogSysError(_T("Failed to load icon from the file '%s'"),
- name.c_str());
-
- return FALSE;
- }
-
- size = GetHiconSize(hicon);
-#else // Win16
- HICON hicon = ReadIconFile((wxChar *)name.c_str(),
- wxGetInstance(),
- &size.x, &size.y);
-#endif // Win32/Win16
-
- if ( (desiredWidth != -1 && desiredWidth != size.x) ||
- (desiredHeight != -1 && desiredHeight != size.y) )
- {
- wxLogDebug(_T("Returning FALSE from wxICOFileHandler::Load because "
- "of the size mismatch: actual (%d, %d), "
- "requested (%d, %d)"),
- size.x, size.y,
- desiredWidth, desiredHeight);
-
- ::DestroyIcon(hicon);
-
- return FALSE;
- }
-
- icon->SetHICON((WXHICON)hicon);
- icon->SetSize(size.x, size.y);
-
- return icon->Ok();
- */
return(FALSE);
#else
return(FALSE);
vError = ::WinGetLastError(vHabmain);
sError = wxPMErrorToStr(vError);
}
- vNewBmp.SetMask(rBmp.GetMask());
+ wxMask* pNewMask;
+
+ pNewMask = new wxMask(pMask->GetMaskBitmap());
+ vNewBmp.SetMask(pNewMask);
free(pucBits);
::GpiSetBitmap(hPS, NULLHANDLE);
::GpiDestroyPS(hPS);
);
} // end of wxToolBar::DoAddTool
+bool wxToolBar::DeleteTool(
+ int nId
+)
+{
+ bool bOk = wxToolBarBase::DeleteTool(nId);
+
+ if (bOk)
+ {
+ Realize();
+ }
+ return bOk;
+} // end of wxToolBar::DeleteTool
+
+bool wxToolBar::DeleteToolByPos(
+ size_t nPos
+)
+{
+ bool bOk = wxToolBarBase::DeleteToolByPos(nPos);
+
+ if (bOk)
+ {
+ Realize();
+ }
+ return bOk;
+} // end of wxToolBar::DeleteTool
+
+wxToolBarToolBase* wxToolBar::InsertControl(
+ size_t nPos
+, wxControl* pControl
+)
+{
+ wxToolBarToolBase* pTool = wxToolBarBase::InsertControl( nPos
+ ,pControl
+ );
+ if (m_bInitialized)
+ {
+ Realize();
+ Refresh();
+ }
+ return pTool;
+} // end of wxToolBar::InsertControl
+
+wxToolBarToolBase* wxToolBar::InsertSeparator(
+ size_t nPos
+)
+{
+ wxToolBarToolBase* pTool = wxToolBarBase::InsertSeparator(nPos);
+
+ if (m_bInitialized)
+ {
+ Realize();
+ Refresh();
+ }
+ return pTool;
+} // end of wxToolBar::InsertSeparator
+
+wxToolBarToolBase* wxToolBar::InsertTool(
+ size_t nPos
+, int nId
+, const wxString& rsLabel
+, const wxBitmap& rBitmap
+, const wxBitmap& rBmpDisabled
+, wxItemKind eKind
+, const wxString& rsShortHelp
+, const wxString& rsLongHelp
+, wxObject* pClientData
+)
+{
+ wxToolBarToolBase* pTool = wxToolBarBase::InsertTool( nPos
+ ,nId
+ ,rsLabel
+ ,rBitmap
+ ,rBmpDisabled
+ ,eKind
+ ,rsShortHelp
+ ,rsLongHelp
+ ,pClientData
+ );
+ if (m_bInitialized)
+ {
+ Realize();
+ Refresh();
+ }
+ return pTool;
+} // end of wxToolBar::InsertTool
+
bool wxToolBar::DoInsertTool(
size_t WXUNUSED(nPos)
, wxToolBarToolBase* pToolBase
if (nHeight <= 0)
{
if (lStyle & wxTB_TEXT)
- nHeight = m_defaultHeight + 18;
+ nHeight = m_defaultHeight + m_vTextY;
else
nHeight = m_defaultHeight;
}
//
// Set the height according to the font and the border size
//
- nMaxToolWidth = m_vTextX;
+ if (pTool->GetWidth() > m_vTextX)
+ nMaxToolWidth = pTool->GetWidth() + 4;
+ else
+ nMaxToolWidth = m_vTextX;
if (pTool->GetHeight() + m_vTextY > nMaxToolHeight)
nMaxToolHeight = pTool->GetHeight() + m_vTextY;
}
else
{
if (pTool->GetWidth() > nMaxToolWidth )
- nMaxToolWidth = pTool->GetWidth();
+ nMaxToolWidth = pTool->GetWidth() + 4;
if (pTool->GetHeight() > nMaxToolHeight)
nMaxToolHeight = pTool->GetHeight();
}
pNode = pNode->GetNext();
}
+ wxCoord vTbWidth = 0L;
+ wxCoord vTbHeight = 0L;
+
+ GetSize( &vTbWidth
+ ,&vTbHeight
+ );
+ if (vTbHeight < nMaxToolHeight)
+ {
+ SetSize( -1L
+ ,-1L
+ ,vTbWidth
+ ,nMaxToolHeight + 4
+ );
+ if (GetParent()->IsKindOf(CLASSINFO(wxFrame)))
+ {
+ wxFrame* pFrame = wxDynamicCast(GetParent(), wxFrame);
+
+ if (pFrame)
+ pFrame->PositionToolBar();
+ }
+ }
+
int nSeparatorSize = m_toolSeparation;
pNode = m_tools.GetFirst();
if (m_nCurrentRowsOrColumns >= m_maxCols)
m_vLastY += nSeparatorSize;
else
- m_vLastX += nSeparatorSize;
+ m_vLastX += nSeparatorSize * 4;
}
else
{
if (m_nCurrentRowsOrColumns >= m_maxRows)
m_vLastX += nSeparatorSize;
else
- m_vLastY += nSeparatorSize;
+ m_vLastY += nSeparatorSize * 4;
}
}
else if (pTool->IsButton())
m_maxWidth += m_xMargin;
m_maxHeight += m_yMargin;
+ m_bInitialized = TRUE;
return TRUE;
} // end of wxToolBar::Realize
if (rEvent.LeftIsDown())
SpringUpButton(m_nCurrentTool);
pTool = (wxToolBarTool *)FindById(m_nCurrentTool);
- if (pTool && pTool->IsToggled())
+ if (pTool && !pTool->IsToggled())
{
RaiseTool( pTool
,FALSE
}
DrawTool(pTool);
}
+ wxToolBarTool* pOldTool = (wxToolBarTool*)FindById(m_nCurrentTool);
+
+ if (pOldTool && !pTool->IsToggled())
+ RaiseTool( pOldTool
+ ,FALSE
+ );
m_nCurrentTool = pTool->GetId();
OnMouseEnter(m_nCurrentTool);
if (!pTool->IsToggled())
,&vX
,&vY
);
- vLeft += (wxCoord)((m_vTextX - vX)/2);
- rDc.DrawText( pTool->GetLabel()
- ,vLeft
- ,pTool->m_vY + m_vTextY + 4 // a bit of margin
- );
+ if (pTool->GetWidth() > vX) // large tools
+ {
+ vLeft = pTool->m_vX + (pTool->GetWidth() - vX);
+ GetSize(&vX, &vY);
+ rDc.DrawText( pTool->GetLabel()
+ ,vLeft
+ ,vY - (m_vTextY - 2)
+ );
+ }
+ else // normal tools
+ {
+ vLeft += (wxCoord)((m_vTextX - vX)/2);
+ rDc.DrawText( pTool->GetLabel()
+ ,vLeft
+ ,pTool->m_vY + m_vTextY + 4 // a bit of margin
+ );
+ }
}
}
else
wxCoord vTextY = 0;
wxCoord vTBarHeight = 0;
+ GetSize( NULL
+ ,&vTBarHeight
+ );
+ vY = vTBarHeight - vY;
wxToolBarToolsList::Node* pNode = m_tools.GetFirst();
while (pNode)
{
if (HasFlag(wxTB_TEXT) && !pTool->GetLabel().IsEmpty())
{
- vX = pTool->m_vX - (wxCoord)(pTool->GetWidth()/2);
+ if (pTool->GetWidth() > m_vTextX)
+ {
+ vX = pTool->m_vX - 2;
+ vWidth = pTool->GetWidth() + 4;
+ }
+ else
+ {
+ vX = pTool->m_vX - (wxCoord)(pTool->GetWidth()/2);
+ vWidth = m_vTextX + 4;
+ }
vY = pTool->m_vY - 2;
- vWidth = m_vTextX + 4;
vHeight = pTool->GetHeight() + m_vTextY + 2;
}
else
{
- vX = pTool->m_vX;
+ vX = pTool->m_vX - 2;
vY = pTool->m_vY - 2;
vWidth = pTool->GetWidth() + 4;
vHeight = pTool->GetHeight() + 4;
if (HasFlag(wxTB_TEXT) && !pTool->GetLabel().IsEmpty())
{
- vX = pTool->m_vX - (wxCoord)(pTool->GetWidth()/2);
+ if (pTool->GetWidth() > m_vTextX)
+ {
+ vX = pTool->m_vX - 2;
+ vWidth = pTool->GetWidth() + 4;
+ }
+ else
+ {
+ vX = pTool->m_vX - (wxCoord)(pTool->GetWidth()/2);
+ vWidth = m_vTextX + 4;
+ }
vY = pTool->m_vY - 2;
- vWidth = m_vTextX + 4;
vHeight = pTool->GetHeight() + m_vTextY + 2;
}
else
{
- vX = pTool->m_vX;
+ vX = pTool->m_vX - 2;
vY = pTool->m_vY - 2;
vWidth = pTool->GetWidth() + 4;
vHeight = pTool->GetHeight() + 4;
CODE LOADONCALL
EXPORTS
-;From library: H:\Dev\Wx2\WxWindows\lib\wx.lib
+;From library: F:\DEV\WX2\WXWINDOWS\LIB\wx.lib
;From object file: dummy.cpp
;PUBDEFs (Symbols available from object file):
wxDummyChar
wxEVT_NC_LEFT_DCLICK
wxEVT_INIT_DIALOG
wxEVT_COMMAND_SET_FOCUS
- ;From object file: H:\DEV\WX2\WXWINDOWS\src\common\extended.c
+ ;From object file: F:\DEV\WX2\WXWINDOWS\src\common\extended.c
;PUBDEFs (Symbols available from object file):
ConvertToIeeeExtended
ConvertFromIeeeExtended
Read32__17wxTextInputStreamFv
;wxTextInputStream::SkipIfEndOfLine(char)
SkipIfEndOfLine__17wxTextInputStreamFc
- ;From object file: H:\DEV\WX2\WXWINDOWS\src\common\unzip.c
+ ;From object file: F:\DEV\WX2\WXWINDOWS\src\common\unzip.c
;PUBDEFs (Symbols available from object file):
unzReadCurrentFile
unzGetCurrentFileInfo
Create__8wxBitmapFPvliN23
;wxBitmap::GetBitmapForDC(wxDC&) const
GetBitmapForDC__8wxBitmapCFR4wxDC
- ;wxBitmap::wxBitmap(const wxString&,long)
- __ct__8wxBitmapFRC8wxStringl
- ;wxMask::wxMask(const wxBitmap&)
- __ct__6wxMaskFRC8wxBitmap
;wxBitmap::GetSubBitmap(const wxRect&) const
GetSubBitmap__8wxBitmapCFRC6wxRect
+ ;wxMask::wxMask(const wxBitmap&)
+ __ct__6wxMaskFRC8wxBitmap
;wxMask::Create(const wxBitmap&)
Create__6wxMaskFRC8wxBitmap
;wxBitmapHandler::Create(wxBitmap*,void*,long,int,int,int)
__ct__8wxBitmapFPCciN22
;wxBitmapRefData::wxBitmapRefData()
__ct__15wxBitmapRefDataFv
+ ;wxBitmapHandler::Load(wxGDIImage*,int,long,int,int)
+ Load__15wxBitmapHandlerFP10wxGDIImageilN22
;wxMask::Create(const wxBitmap&,const wxColour&)
Create__6wxMaskFRC8wxBitmapRC8wxColour
;wxBitmap::ConvertToImage() const
ConvertToImage__8wxBitmapCFv
;wxBitmap::wxBitmap(void*,long,int,int,int)
__ct__8wxBitmapFPvliN23
- ;wxBitmap::LoadFile(const wxString&,long)
- LoadFile__8wxBitmapFRC8wxStringl
+ ;wxBitmap::LoadFile(int,long)
+ LoadFile__8wxBitmapFil
;wxBitmap::CreateFromImage(const wxImage&,int)
CreateFromImage__8wxBitmapFRC7wxImagei
;wxBitmap::SetPalette(const wxPalette&)
SetPalette__8wxBitmapFRC9wxPalette
;wxBitmapHandler::Save(wxGDIImage*,const wxString&,int)
Save__15wxBitmapHandlerFP10wxGDIImageRC8wxStringi
- ;wxBitmapHandler::LoadFile(wxBitmap*,const wxString&,unsigned long,long,int,int)
- LoadFile__15wxBitmapHandlerFP8wxBitmapRC8wxStringUlliT5
;wxConstructorForwxBitmapHandler()
wxConstructorForwxBitmapHandler__Fv
+ ;wxBitmapHandler::LoadFile(wxBitmap*,int,long,int,int)
+ LoadFile__15wxBitmapHandlerFP8wxBitmapilN22
;wxBitmapRefData::Free()
Free__15wxBitmapRefDataFv
+ ;wxBitmap::wxBitmap(int,long)
+ __ct__8wxBitmapFil
;wxBitmap::sm_classwxBitmap
sm_classwxBitmap__8wxBitmap
- ;wxBitmapHandler::Load(wxGDIImage*,const wxString&,unsigned long,long,int,int)
- Load__15wxBitmapHandlerFP10wxGDIImageRC8wxStringUlliT5
;wxConstructorForwxBitmap()
wxConstructorForwxBitmap__Fv
;wxConstructorForwxMask()
wxConstructorForwxICOResourceHandler__Fv
;wxBMPFileHandler::sm_classwxBMPFileHandler
sm_classwxBMPFileHandler__16wxBMPFileHandler
+ ;wxBMPResourceHandler::LoadFile(wxBitmap*,int,long,int,int)
+ LoadFile__20wxBMPResourceHandlerFP8wxBitmapilN22
;wxGDIImage::CleanUpHandlers()
CleanUpHandlers__10wxGDIImageFv
;wxGDIImage::AddHandler(wxGDIImageHandler*)
;wxGDIImage::FindHandler(long)
FindHandler__10wxGDIImageFl
__vft20wxBMPResourceHandler8wxObject
- ;wxBMPResourceHandler::LoadFile(wxBitmap*,const wxString&,unsigned long,long,int,int)
- LoadFile__20wxBMPResourceHandlerFP8wxBitmapRC8wxStringUlliT5
;wxICOResourceHandler::LoadIcon(wxIcon*,const wxString&,unsigned long,long,int,int)
LoadIcon__20wxICOResourceHandlerFP6wxIconRC8wxStringUlliT5
;wxConstructorForwxBMPResourceHandler()
__dt__12wxPenRefDataFv
;wxPen::SetColour(const wxColour&)
SetColour__5wxPenFRC8wxColour
- ;From object file: ..\os2\pnghand.cpp
- ;PUBDEFs (Symbols available from object file):
- ;wxPNGReader::Create(int,int,int,int)
- Create__11wxPNGReaderFiN31
- ;wxCopyPalette(const wxPalette*)
- wxCopyPalette__FPC9wxPalette
- ;wxPNGFileHandler::SaveFile(wxBitmap*,const wxString&,int,const wxPalette*)
- SaveFile__16wxPNGFileHandlerFP8wxBitmapRC8wxStringiPC9wxPalette
- ;wxPNGReader::GetIndex(int,int)
- GetIndex__11wxPNGReaderFiT1
- ;wxPNGReader::~wxPNGReader()
- __dt__11wxPNGReaderFv
- ;wxPNGReader::ReadFile(char*)
- ReadFile__11wxPNGReaderFPc
- ;wxPNGReader::SetRGB(int,int,unsigned char,unsigned char,unsigned char)
- SetRGB__11wxPNGReaderFiT1UcN23
- ;wxPNGReader::SetPalette(int,rgb_color_struct*)
- SetPalette__11wxPNGReaderFiP16rgb_color_struct
- ;wxPNGReader::InstantiateBitmap(wxBitmap*)
- InstantiateBitmap__11wxPNGReaderFP8wxBitmap
- ;wxPNGReader::SetPalette(int,unsigned char*,unsigned char*,unsigned char*)
- SetPalette__11wxPNGReaderFiPUcN22
- ;wxConstructorForwxPNGFileHandler()
- wxConstructorForwxPNGFileHandler__Fv
- ;wxPNGReader::NullData()
- NullData__11wxPNGReaderFv
- ;wxPNGReader::SaveFile(char*)
- SaveFile__11wxPNGReaderFPc
- ;wxPNGReader::SetIndex(int,int,int)
- SetIndex__11wxPNGReaderFiN21
- ;wxPNGReader::SaveXPM(char*,char*)
- SaveXPM__11wxPNGReaderFPcT1
- ;wxPNGFileHandler::LoadFile(wxBitmap*,const wxString&,unsigned long,long,int,int)
- LoadFile__16wxPNGFileHandlerFP8wxBitmapRC8wxStringUlliT5
- __vft11wxPNGReader
- ;ima_png_error(png_struct_def*,char*)
- ima_png_error__FP14png_struct_defPc
- ;wxPNGReader::wxPNGReader(char*)
- __ct__11wxPNGReaderFPc
- ;wxPNGReader::GetRGB(int,int,unsigned char*,unsigned char*,unsigned char*)
- GetRGB__11wxPNGReaderFiT1PUcN23
- __vft16wxPNGFileHandler8wxObject
- ;wxPNGReader::SetPalette(wxPalette*)
- SetPalette__11wxPNGReaderFP9wxPalette
- ;wxPNGReader::wxPNGReader()
- __ct__11wxPNGReaderFv
- ;wxPNGFileHandler::sm_classwxPNGFileHandler
- sm_classwxPNGFileHandler__16wxPNGFileHandler
- ;wxPNGReader::GetBitmap()
- GetBitmap__11wxPNGReaderFv
- ;wxPNGReader::CreateMask()
- CreateMask__11wxPNGReaderFv
;From object file: ..\os2\popupwin.cpp
;PUBDEFs (Symbols available from object file):
__vft13wxPopupWindow8wxObject
CreateTool__9wxToolBarFP9wxControl
;wxToolBar::DoToggleTool(wxToolBarToolBase*,unsigned long)
DoToggleTool__9wxToolBarFP17wxToolBarToolBaseUl
+ ;wxToolBar::DeleteToolByPos(unsigned int)
+ DeleteToolByPos__9wxToolBarFUi
;wxToolBar::SpringUpButton(int)
SpringUpButton__9wxToolBarFi
;wxToolBar::Init()
sm_eventTable__9wxToolBar
;wxToolBar::Create(wxWindow*,int,const wxPoint&,const wxSize&,long,const wxString&)
Create__9wxToolBarFP8wxWindowiRC7wxPointRC6wxSizelRC8wxString
+ ;wxToolBar::InsertControl(unsigned int,wxControl*)
+ InsertControl__9wxToolBarFUiP9wxControl
;wxToolBar::OnKillFocus(wxFocusEvent&)
OnKillFocus__9wxToolBarFR12wxFocusEvent
;wxToolBar::LowerTool(wxToolBarToolBase*,unsigned long)
LowerTool__9wxToolBarFP17wxToolBarToolBaseUl
+ ;wxToolBar::InsertSeparator(unsigned int)
+ InsertSeparator__9wxToolBarFUi
;wxToolBar::DoInsertTool(unsigned int,wxToolBarToolBase*)
DoInsertTool__9wxToolBarFUiP17wxToolBarToolBase
;wxToolBar::Realize()
sm_eventTableEntries__9wxToolBar
;wxToolBar::sm_classwxToolBar
sm_classwxToolBar__9wxToolBar
- ;wxToolBar::OnPaint(wxPaintEvent&)
- OnPaint__9wxToolBarFR12wxPaintEvent
+ ;wxToolBar::InsertTool(unsigned int,int,const wxString&,const wxBitmap&,const wxBitmap&,wxItemKind,const wxString&,const wxString&,wxObject*)
+ InsertTool__9wxToolBarFUiiRC8wxStringRC8wxBitmapT410wxItemKindN23P8wxObject
__vft9wxToolBar8wxObject
;wxToolBar::RaiseTool(wxToolBarToolBase*,unsigned long)
RaiseTool__9wxToolBarFP17wxToolBarToolBaseUl
+ ;wxToolBar::OnPaint(wxPaintEvent&)
+ OnPaint__9wxToolBarFR12wxPaintEvent
+ ;wxToolBar::DeleteTool(int)
+ DeleteTool__9wxToolBarFi
;wxToolBar::DrawTool(wxDC&,wxToolBarToolBase*)
DrawTool__9wxToolBarFR4wxDCP17wxToolBarToolBase
;wxToolBar::OnSize(wxSizeEvent&)