Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
K
kicad-source-mirror
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
Elphel
kicad-source-mirror
Commits
2a2bf469
Commit
2a2bf469
authored
Oct 31, 2007
by
raburton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
set eol-style native on new file
parent
b5781155
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
94 additions
and
94 deletions
+94
-94
commandframe.cpp
kicad/commandframe.cpp
+94
-94
No files found.
kicad/commandframe.cpp
View file @
2a2bf469
/*****************************************************/
/* commandframe.cpp: window handling comman buttons */
/*****************************************************/
#include "fctsys.h"
#include "common.h"
#include "kicad.h"
#include "macros.h"
#define BITMAP wxBitmap
// ----------------------------------------------------------------------------
// resources
// ----------------------------------------------------------------------------
// USE_XPM_BITMAPS
#include "bitmaps.h"
#include "id.h"
/************************************************************************************/
WinEDA_CommandFrame
::
WinEDA_CommandFrame
(
wxWindow
*
parent
,
int
id
,
wxPoint
pos
,
wxSize
size
,
long
style
)
:
wxSashLayoutWindow
(
parent
,
id
,
pos
,
size
,
style
)
/************************************************************************************/
/** WinEDA_CommandFrame constructor
* create the window which the buttons to call eeschema and others...
*/
{
SetDefaultSize
(
wxSize
(
size
.
x
,
100
)
);
SetOrientation
(
wxLAYOUT_HORIZONTAL
);
SetAlignment
(
wxLAYOUT_TOP
);
SetSashVisible
(
wxSASH_BOTTOM
,
TRUE
);
SetSashVisible
(
wxSASH_LEFT
,
TRUE
);
SetExtraBorderSize
(
2
);
SetFont
(
*
g_StdFont
);
CreateCommandToolbar
();
}
/*************************************************/
void
WinEDA_CommandFrame
::
CreateCommandToolbar
(
void
)
/*************************************************/
/** Function CreateCommandToolbar
* create the buttons to call eescheman cvpcb, pcbnew and gerbview
*/
{
wxBitmapButton
*
btn
;
m_ButtonSeparation
=
10
;
m_ButtonLastPosition
.
x
=
20
;
m_ButtonLastPosition
.
y
=
20
;
btn
=
new
wxBitmapButton
(
this
,
ID_TO_EESCHEMA
,
BITMAP
(
icon_eeschema_xpm
)
);
btn
->
SetToolTip
(
_
(
"eeschema (Schematic editor)"
)
);
AddFastLaunch
(
btn
);
btn
=
new
wxBitmapButton
(
this
,
ID_TO_CVPCB
,
BITMAP
(
icon_cvpcb_xpm
)
);
btn
->
SetToolTip
(
_
(
"cvpcb (Components to modules)"
)
);
AddFastLaunch
(
btn
);
btn
=
new
wxBitmapButton
(
this
,
ID_TO_PCB
,
BITMAP
(
a_icon_pcbnew_xpm
)
);
btn
->
SetToolTip
(
_
(
"pcbnew (PCB editor)"
)
);
AddFastLaunch
(
btn
);
btn
=
new
wxBitmapButton
(
this
,
ID_TO_GERBVIEW
,
BITMAP
(
icon_gerbview_xpm
)
);
btn
->
SetToolTip
(
_
(
"gerbview (Gerber viewer)"
)
);
AddFastLaunch
(
btn
);
// Set up toolbar
#ifdef KICAD_PYTHON
btn
=
new
wxBitmapButton
(
this
,
ID_RUN_PYTHON
,
BITMAP
(
icon_python_xpm
)
);
btn
->
SetToolTip
(
_
(
"Run Python Script"
)
);
AddFastLaunch
(
btn
);
#endif
}
/****************************************************************/
void
WinEDA_CommandFrame
::
AddFastLaunch
(
wxBitmapButton
*
button
)
/****************************************************************/
/** Function AddFastLaunch
* add a Bitmap Button (fast launch button) to the window
* @param button = wxBitmapButton to add to the window
*/
{
button
->
Move
(
m_ButtonLastPosition
);
m_ButtonLastPosition
.
x
+=
button
->
GetSize
().
GetWidth
()
+
m_ButtonSeparation
;
}
/*****************************************************/
/* commandframe.cpp: window handling comman buttons */
/*****************************************************/
#include "fctsys.h"
#include "common.h"
#include "kicad.h"
#include "macros.h"
#define BITMAP wxBitmap
// ----------------------------------------------------------------------------
// resources
// ----------------------------------------------------------------------------
// USE_XPM_BITMAPS
#include "bitmaps.h"
#include "id.h"
/************************************************************************************/
WinEDA_CommandFrame
::
WinEDA_CommandFrame
(
wxWindow
*
parent
,
int
id
,
wxPoint
pos
,
wxSize
size
,
long
style
)
:
wxSashLayoutWindow
(
parent
,
id
,
pos
,
size
,
style
)
/************************************************************************************/
/** WinEDA_CommandFrame constructor
* create the window which the buttons to call eeschema and others...
*/
{
SetDefaultSize
(
wxSize
(
size
.
x
,
100
)
);
SetOrientation
(
wxLAYOUT_HORIZONTAL
);
SetAlignment
(
wxLAYOUT_TOP
);
SetSashVisible
(
wxSASH_BOTTOM
,
TRUE
);
SetSashVisible
(
wxSASH_LEFT
,
TRUE
);
SetExtraBorderSize
(
2
);
SetFont
(
*
g_StdFont
);
CreateCommandToolbar
();
}
/*************************************************/
void
WinEDA_CommandFrame
::
CreateCommandToolbar
(
void
)
/*************************************************/
/** Function CreateCommandToolbar
* create the buttons to call eescheman cvpcb, pcbnew and gerbview
*/
{
wxBitmapButton
*
btn
;
m_ButtonSeparation
=
10
;
m_ButtonLastPosition
.
x
=
20
;
m_ButtonLastPosition
.
y
=
20
;
btn
=
new
wxBitmapButton
(
this
,
ID_TO_EESCHEMA
,
BITMAP
(
icon_eeschema_xpm
)
);
btn
->
SetToolTip
(
_
(
"eeschema (Schematic editor)"
)
);
AddFastLaunch
(
btn
);
btn
=
new
wxBitmapButton
(
this
,
ID_TO_CVPCB
,
BITMAP
(
icon_cvpcb_xpm
)
);
btn
->
SetToolTip
(
_
(
"cvpcb (Components to modules)"
)
);
AddFastLaunch
(
btn
);
btn
=
new
wxBitmapButton
(
this
,
ID_TO_PCB
,
BITMAP
(
a_icon_pcbnew_xpm
)
);
btn
->
SetToolTip
(
_
(
"pcbnew (PCB editor)"
)
);
AddFastLaunch
(
btn
);
btn
=
new
wxBitmapButton
(
this
,
ID_TO_GERBVIEW
,
BITMAP
(
icon_gerbview_xpm
)
);
btn
->
SetToolTip
(
_
(
"gerbview (Gerber viewer)"
)
);
AddFastLaunch
(
btn
);
// Set up toolbar
#ifdef KICAD_PYTHON
btn
=
new
wxBitmapButton
(
this
,
ID_RUN_PYTHON
,
BITMAP
(
icon_python_xpm
)
);
btn
->
SetToolTip
(
_
(
"Run Python Script"
)
);
AddFastLaunch
(
btn
);
#endif
}
/****************************************************************/
void
WinEDA_CommandFrame
::
AddFastLaunch
(
wxBitmapButton
*
button
)
/****************************************************************/
/** Function AddFastLaunch
* add a Bitmap Button (fast launch button) to the window
* @param button = wxBitmapButton to add to the window
*/
{
button
->
Move
(
m_ButtonLastPosition
);
m_ButtonLastPosition
.
x
+=
button
->
GetSize
().
GetWidth
()
+
m_ButtonSeparation
;
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment