2009-11-23 15:16:50 +00:00
|
|
|
/****************/
|
|
|
|
/* toolbars.cpp */
|
|
|
|
/****************/
|
2007-06-05 12:10:51 +00:00
|
|
|
|
|
|
|
#ifdef __GNUG__
|
|
|
|
#pragma implementation
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#include "fctsys.h"
|
2009-02-04 15:25:03 +00:00
|
|
|
#include "wxstruct.h"
|
2007-06-05 12:10:51 +00:00
|
|
|
|
|
|
|
|
2009-02-04 15:25:03 +00:00
|
|
|
WinEDA_Toolbar::WinEDA_Toolbar( id_toolbar type, wxWindow * parent,
|
|
|
|
wxWindowID id, bool horizontal ):
|
2009-11-02 22:24:55 +00:00
|
|
|
wxAuiToolBar( parent, id, wxDefaultPosition, wxDefaultSize,
|
2010-05-16 19:47:22 +00:00
|
|
|
wxAUI_TB_DEFAULT_STYLE | wxAUI_TB_OVERFLOW | ( ( horizontal ) ?
|
2009-11-23 15:16:50 +00:00
|
|
|
wxAUI_TB_HORZ_LAYOUT :
|
|
|
|
wxAUI_TB_VERTICAL ) )
|
2007-06-05 12:10:51 +00:00
|
|
|
{
|
2009-02-04 15:25:03 +00:00
|
|
|
m_Parent = parent;
|
|
|
|
m_Ident = type;
|
|
|
|
m_Horizontal = horizontal;
|
|
|
|
|
|
|
|
SetToolBitmapSize(wxSize(16,16));
|
|
|
|
SetMargins(0,0);
|
|
|
|
SetToolSeparation(1);
|
|
|
|
SetToolPacking(1);
|
2007-06-05 12:10:51 +00:00
|
|
|
}
|
2010-01-14 20:20:59 +00:00
|
|
|
|
|
|
|
|
|
|
|
int WinEDA_Toolbar::GetDimension( )
|
|
|
|
{
|
|
|
|
if( m_Horizontal )
|
|
|
|
return GetSize().y;
|
|
|
|
else
|
|
|
|
return GetSize().x;
|
|
|
|
}
|