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
|
|
|
|
|
|
|
|
2011-04-13 19:30:27 +00:00
|
|
|
EDA_TOOLBAR::EDA_TOOLBAR( id_toolbar type, wxWindow * parent, wxWindowID id, bool horizontal ):
|
2009-11-02 22:24:55 +00:00
|
|
|
wxAuiToolBar( parent, id, wxDefaultPosition, wxDefaultSize,
|
2010-11-01 19:03:08 +00:00
|
|
|
wxAUI_TB_DEFAULT_STYLE | ( ( 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
|
|
|
|
|
|
|
|
2011-04-13 19:30:27 +00:00
|
|
|
int EDA_TOOLBAR::GetDimension( )
|
2010-01-14 20:20:59 +00:00
|
|
|
{
|
|
|
|
if( m_Horizontal )
|
|
|
|
return GetSize().y;
|
|
|
|
else
|
|
|
|
return GetSize().x;
|
|
|
|
}
|