File: wineda_toolbar.cpp

package info (click to toggle)
kicad 0.20120526%2Bbzr3261-1
  • links: PTS
  • area: main
  • in suites: wheezy
  • size: 320,668 kB
  • sloc: cpp: 403,066; ansic: 11,246; python: 469; sh: 297; awk: 294; perl: 239; makefile: 197; xml: 21
file content (36 lines) | stat: -rw-r--r-- 820 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
/****************/
/* toolbars.cpp */
/****************/

#ifdef __GNUG__
#pragma implementation
#endif

#include "fctsys.h"
#include "wxstruct.h"


EDA_TOOLBAR::EDA_TOOLBAR( id_toolbar type, wxWindow * parent, wxWindowID id, bool horizontal ):
    wxAuiToolBar( parent, id, wxDefaultPosition, wxDefaultSize,
                  wxAUI_TB_DEFAULT_STYLE | ( ( horizontal ) ?
                                             wxAUI_TB_HORZ_LAYOUT :
                                             wxAUI_TB_VERTICAL ) )
{
    m_Parent = parent;
    m_Ident = type;
    m_Horizontal = horizontal;

    SetToolBitmapSize(wxSize(16,16));
    SetMargins(0,0);
    SetToolSeparation(1);
    SetToolPacking(1);
}


int EDA_TOOLBAR::GetDimension( )
{
    if( m_Horizontal )
        return GetSize().y;
    else
        return GetSize().x;
}