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
d3468dd5
Commit
d3468dd5
authored
Nov 02, 2009
by
dickelbeck
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Marco's AUI patch, basically
parent
69e3f671
Changes
26
Hide whitespace changes
Inline
Side-by-side
Showing
26 changed files
with
449 additions
and
32 deletions
+449
-32
3d_frame.cpp
3d-viewer/3d_frame.cpp
+26
-1
3d_toolbar.cpp
3d-viewer/3d_toolbar.cpp
+3
-3
3d_viewer.h
3d-viewer/3d_viewer.h
+6
-3
basicframe.cpp
common/basicframe.cpp
+2
-1
drawframe.cpp
common/drawframe.cpp
+9
-1
toolbars.cpp
common/toolbars.cpp
+5
-0
cvframe.cpp
cvpcb/cvframe.cpp
+31
-0
displayframe.cpp
cvpcb/displayframe.cpp
+1
-1
tool_cvpcb.cpp
cvpcb/tool_cvpcb.cpp
+3
-2
libframe.cpp
eeschema/libframe.cpp
+30
-0
schframe.cpp
eeschema/schframe.cpp
+35
-0
tool_lib.cpp
eeschema/tool_lib.cpp
+3
-2
tool_sch.cpp
eeschema/tool_sch.cpp
+3
-2
tool_viewlib.cpp
eeschema/tool_viewlib.cpp
+4
-1
viewlib_frame.cpp
eeschema/viewlib_frame.cpp
+62
-1
gerberframe.cpp
gerbview/gerberframe.cpp
+37
-0
tool_gerber.cpp
gerbview/tool_gerber.cpp
+3
-2
wxstruct.h
include/wxstruct.h
+33
-0
buildmnu.cpp
kicad/buildmnu.cpp
+5
-4
mainframe.cpp
kicad/mainframe.cpp
+46
-2
dialog_general_options.cpp
pcbnew/dialog_general_options.cpp
+6
-0
moduleframe.cpp
pcbnew/moduleframe.cpp
+41
-0
pcbframe.cpp
pcbnew/pcbframe.cpp
+40
-0
tool_modedit.cpp
pcbnew/tool_modedit.cpp
+3
-3
tool_pcb.cpp
pcbnew/tool_pcb.cpp
+3
-3
toolbars_update_user_interface.cpp
pcbnew/toolbars_update_user_interface.cpp
+9
-0
No files found.
3d-viewer/3d_frame.cpp
View file @
d3468dd5
...
@@ -23,6 +23,7 @@
...
@@ -23,6 +23,7 @@
#include "trackball.h"
#include "trackball.h"
#include <wx/colordlg.h>
#include <wx/colordlg.h>
#include <wxstruct.h>
Info_3D_Visu
g_Parm_3D_Visu
;
Info_3D_Visu
g_Parm_3D_Visu
;
double
g_Draw3d_dx
;
double
g_Draw3d_dx
;
...
@@ -79,6 +80,30 @@ WinEDA3D_DrawFrame::WinEDA3D_DrawFrame( WinEDA_BasePcbFrame* parent,
...
@@ -79,6 +80,30 @@ WinEDA3D_DrawFrame::WinEDA3D_DrawFrame( WinEDA_BasePcbFrame* parent,
// Make a Pcb3D_GLCanvas
// Make a Pcb3D_GLCanvas
m_Canvas
=
new
Pcb3D_GLCanvas
(
this
);
m_Canvas
=
new
Pcb3D_GLCanvas
(
this
);
#if KICAD_AUIMANAGER
m_auimgr
.
SetManagedWindow
(
this
);
wxAuiPaneInfo
horiz
;
horiz
.
Gripper
(
false
);
horiz
.
DockFixed
(
true
);
horiz
.
Movable
(
false
);
horiz
.
Floatable
(
false
);
horiz
.
CloseButton
(
false
);
horiz
.
CaptionVisible
(
false
);
wxAuiPaneInfo
vert
(
horiz
);
vert
.
TopDockable
(
false
).
BottomDockable
(
false
);
horiz
.
LeftDockable
(
false
).
RightDockable
(
false
);
m_auimgr
.
AddPane
(
m_HToolBar
,
wxAuiPaneInfo
(
horiz
).
Name
(
wxT
(
"m_HToolBar"
)).
Top
());
m_auimgr
.
AddPane
(
m_Canvas
,
wxAuiPaneInfo
().
Name
(
wxT
(
"DrawFrame"
)).
CentrePane
());
m_auimgr
.
Update
();
#endif
}
}
...
@@ -127,7 +152,7 @@ void WinEDA3D_DrawFrame::GetSettings()
...
@@ -127,7 +152,7 @@ void WinEDA3D_DrawFrame::GetSettings()
config
->
Read
(
wxT
(
"BgColor_Blue"
),
config
->
Read
(
wxT
(
"BgColor_Blue"
),
&
g_Parm_3D_Visu
.
m_BgColor
.
m_Blue
,
0.0
);
&
g_Parm_3D_Visu
.
m_BgColor
.
m_Blue
,
0.0
);
}
}
#if
def __WXMAC__
#if
defined( __WXMAC__ ) && !defined( __WXOSX_COCOA__ )
// for macOSX, the window must be below system (macOSX) toolbar
// for macOSX, the window must be below system (macOSX) toolbar
if
(
m_FramePos
.
y
<
GetMBarHeight
()
)
if
(
m_FramePos
.
y
<
GetMBarHeight
()
)
...
...
3d-viewer/3d_toolbar.cpp
View file @
d3468dd5
...
@@ -21,9 +21,9 @@ void WinEDA3D_DrawFrame::ReCreateHToolbar()
...
@@ -21,9 +21,9 @@ void WinEDA3D_DrawFrame::ReCreateHToolbar()
m_HToolBar
=
new
WinEDA_Toolbar
(
TOOLBAR_MAIN
,
this
,
ID_H_TOOLBAR
,
TRUE
);
m_HToolBar
=
new
WinEDA_Toolbar
(
TOOLBAR_MAIN
,
this
,
ID_H_TOOLBAR
,
TRUE
);
#if !KICAD_AUIMANAGER
SetToolBar
(
m_HToolBar
);
SetToolBar
(
(
wxToolBar
*
)
m_HToolBar
);
#endif
// Set up toolbar
// Set up toolbar
m_HToolBar
->
AddTool
(
ID_RELOAD3D_BOARD
,
wxEmptyString
,
m_HToolBar
->
AddTool
(
ID_RELOAD3D_BOARD
,
wxEmptyString
,
wxBitmap
(
import3d_xpm
),
wxBitmap
(
import3d_xpm
),
...
...
3d-viewer/3d_viewer.h
View file @
d3468dd5
...
@@ -138,7 +138,6 @@ private:
...
@@ -138,7 +138,6 @@ private:
#if wxCHECK_VERSION( 2, 9, 0 )
#if wxCHECK_VERSION( 2, 9, 0 )
wxGLContext
*
m_glRC
;
wxGLContext
*
m_glRC
;
#endif
#endif
public
:
public
:
Pcb3D_GLCanvas
(
WinEDA3D_DrawFrame
*
parent
);
Pcb3D_GLCanvas
(
WinEDA3D_DrawFrame
*
parent
);
~
Pcb3D_GLCanvas
();
~
Pcb3D_GLCanvas
();
...
@@ -178,12 +177,16 @@ class WinEDA3D_DrawFrame: public wxFrame
...
@@ -178,12 +177,16 @@ class WinEDA3D_DrawFrame: public wxFrame
public
:
public
:
WinEDA_BasePcbFrame
*
m_Parent
;
WinEDA_BasePcbFrame
*
m_Parent
;
Pcb3D_GLCanvas
*
m_Canvas
;
Pcb3D_GLCanvas
*
m_Canvas
;
wxToolB
ar
*
m_HToolBar
;
WinEDA_Toolb
ar
*
m_HToolBar
;
wxToolB
ar
*
m_VToolBar
;
WinEDA_Toolb
ar
*
m_VToolBar
;
int
m_InternalUnits
;
int
m_InternalUnits
;
wxPoint
m_FramePos
;
wxPoint
m_FramePos
;
wxSize
m_FrameSize
;
wxSize
m_FrameSize
;
#if KICAD_AUIMANAGER
wxAuiManager
m_auimgr
;
~
WinEDA3D_DrawFrame
()
{
m_auimgr
.
UnInit
();
};
#endif
private
:
private
:
wxString
m_FrameName
;
// name used for writting and reading setup
wxString
m_FrameName
;
// name used for writting and reading setup
// It is "Frame3D"
// It is "Frame3D"
...
...
common/basicframe.cpp
View file @
d3468dd5
...
@@ -54,6 +54,7 @@ WinEDA_BasicFrame::WinEDA_BasicFrame( wxWindow* father,
...
@@ -54,6 +54,7 @@ WinEDA_BasicFrame::WinEDA_BasicFrame( wxWindow* father,
* zone utilisateur de la fenetre principale */
* zone utilisateur de la fenetre principale */
m_FramePos
.
x
=
m_FramePos
.
y
=
0
;
m_FramePos
.
x
=
m_FramePos
.
y
=
0
;
m_FrameSize
.
y
-=
m_MsgFrameHeight
;
m_FrameSize
.
y
-=
m_MsgFrameHeight
;
}
}
...
@@ -114,7 +115,7 @@ void WinEDA_BasicFrame::LoadSettings()
...
@@ -114,7 +115,7 @@ void WinEDA_BasicFrame::LoadSettings()
}
}
// Ensure Window title bar is visible
// Ensure Window title bar is visible
#if
def __WXMAC__
#if
defined( __WXMAC__ ) && !defined( __WXOSX_COCOA__ )
// for macOSX, the window must be below system (macOSX) toolbar
// for macOSX, the window must be below system (macOSX) toolbar
Ypos_min
=
GetMBarHeight
();
Ypos_min
=
GetMBarHeight
();
...
...
common/drawframe.cpp
View file @
d3468dd5
...
@@ -116,6 +116,9 @@ WinEDA_DrawFrame::~WinEDA_DrawFrame()
...
@@ -116,6 +116,9 @@ WinEDA_DrawFrame::~WinEDA_DrawFrame()
{
{
if
(
m_CurrentScreen
!=
NULL
)
if
(
m_CurrentScreen
!=
NULL
)
delete
m_CurrentScreen
;
delete
m_CurrentScreen
;
#if KICAD_AUIMANAGER
m_auimgr
.
UnInit
();
#endif
}
}
...
@@ -322,6 +325,10 @@ void WinEDA_DrawFrame::SetToolbars()
...
@@ -322,6 +325,10 @@ void WinEDA_DrawFrame::SetToolbars()
/***************************************/
/***************************************/
{
{
DisplayUnitsMsg
();
DisplayUnitsMsg
();
#if KICAD_AUIMANAGER
if
(
m_auimgr
.
GetManagedWindow
())
m_auimgr
.
Update
();
#endif
}
}
...
@@ -391,6 +398,7 @@ void WinEDA_DrawFrame::OnSize( wxSizeEvent& SizeEv )
...
@@ -391,6 +398,7 @@ void WinEDA_DrawFrame::OnSize( wxSizeEvent& SizeEv )
m_FrameSize
=
size
;
m_FrameSize
=
size
;
size
.
y
-=
m_MsgFrameHeight
;
size
.
y
-=
m_MsgFrameHeight
;
#if !KICAD_AUIMANAGER
if
(
MsgPanel
)
// Positionnement en bas d'ecran
if
(
MsgPanel
)
// Positionnement en bas d'ecran
{
{
MsgPanel
->
SetSize
(
0
,
size
.
y
,
size
.
x
,
m_MsgFrameHeight
);
MsgPanel
->
SetSize
(
0
,
size
.
y
,
size
.
x
,
m_MsgFrameHeight
);
...
@@ -446,7 +454,7 @@ void WinEDA_DrawFrame::OnSize( wxSizeEvent& SizeEv )
...
@@ -446,7 +454,7 @@ void WinEDA_DrawFrame::OnSize( wxSizeEvent& SizeEv )
size
.
y
-
opt_size
.
y
-
1
);
size
.
y
-
opt_size
.
y
-
1
);
DrawPanel
->
Move
(
opt_size
.
x
,
opt_size
.
y
+
Auxtoolbar_size
.
y
+
1
);
DrawPanel
->
Move
(
opt_size
.
x
,
opt_size
.
y
+
Auxtoolbar_size
.
y
+
1
);
}
}
#endif
SizeEv
.
Skip
();
SizeEv
.
Skip
();
}
}
...
...
common/toolbars.cpp
View file @
d3468dd5
...
@@ -15,8 +15,13 @@
...
@@ -15,8 +15,13 @@
WinEDA_Toolbar
::
WinEDA_Toolbar
(
id_toolbar
type
,
wxWindow
*
parent
,
WinEDA_Toolbar
::
WinEDA_Toolbar
(
id_toolbar
type
,
wxWindow
*
parent
,
wxWindowID
id
,
bool
horizontal
)
:
wxWindowID
id
,
bool
horizontal
)
:
#if KICAD_AUITOOLBAR
wxAuiToolBar
(
parent
,
id
,
wxDefaultPosition
,
wxDefaultSize
,
wxAUI_TB_DEFAULT_STYLE
|
(
horizontal
?
wxAUI_TB_HORZ_LAYOUT
:
wxAUI_TB_VERTICAL
))
#else
wxToolBar
(
parent
,
id
,
wxPoint
(
-
1
,
-
1
),
wxSize
(
-
1
,
-
1
),
wxToolBar
(
parent
,
id
,
wxPoint
(
-
1
,
-
1
),
wxSize
(
-
1
,
-
1
),
horizontal
?
wxTB_HORIZONTAL
:
wxTB_VERTICAL
)
horizontal
?
wxTB_HORIZONTAL
:
wxTB_VERTICAL
)
#endif
{
{
m_Parent
=
parent
;
m_Parent
=
parent
;
Pnext
=
NULL
;
Pnext
=
NULL
;
...
...
cvpcb/cvframe.cpp
View file @
d3468dd5
...
@@ -181,6 +181,33 @@ WinEDA_CvpcbFrame::WinEDA_CvpcbFrame( const wxString& title, long style ) :
...
@@ -181,6 +181,33 @@ WinEDA_CvpcbFrame::WinEDA_CvpcbFrame( const wxString& title, long style ) :
// Framesize and position
// Framesize and position
SetSize
(
m_FramePos
.
x
,
m_FramePos
.
y
,
m_FrameSize
.
x
,
m_FrameSize
.
y
);
SetSize
(
m_FramePos
.
x
,
m_FramePos
.
y
,
m_FrameSize
.
x
,
m_FrameSize
.
y
);
#if KICAD_AUIMANAGER
m_auimgr
.
SetManagedWindow
(
this
);
wxAuiPaneInfo
horiz
;
horiz
.
Gripper
(
false
);
horiz
.
DockFixed
(
true
);
horiz
.
Movable
(
false
);
horiz
.
Floatable
(
false
);
horiz
.
CloseButton
(
false
);
horiz
.
CaptionVisible
(
false
);
wxAuiPaneInfo
vert
(
horiz
);
vert
.
TopDockable
(
false
).
BottomDockable
(
false
);
horiz
.
LeftDockable
(
false
).
RightDockable
(
false
);
m_auimgr
.
AddPane
(
m_HToolBar
,
wxAuiPaneInfo
(
horiz
).
Name
(
wxT
(
"m_HToolBar"
)).
Top
());
m_auimgr
.
AddPane
(
m_FootprintList
,
wxAuiPaneInfo
(
horiz
).
Name
(
wxT
(
"m_FootprintList"
)).
Left
().
BestSize
(
m_FrameSize
.
x
*
0.3
,
m_FrameSize
.
y
*
0.9
));
m_auimgr
.
AddPane
(
m_ListCmp
,
wxAuiPaneInfo
().
Name
(
wxT
(
"m_ListCmp"
)).
CentrePane
());
m_auimgr
.
Update
();
#endif
}
}
...
@@ -196,6 +223,10 @@ WinEDA_CvpcbFrame::~WinEDA_CvpcbFrame()
...
@@ -196,6 +223,10 @@ WinEDA_CvpcbFrame::~WinEDA_CvpcbFrame()
ID_CVPCB_FOOTPRINT_DISPLAY_FILTERED_LIST
);
ID_CVPCB_FOOTPRINT_DISPLAY_FILTERED_LIST
);
config
->
Write
(
wxT
(
FILTERFOOTPRINTKEY
),
state
);
config
->
Write
(
wxT
(
FILTERFOOTPRINTKEY
),
state
);
}
}
#if KICAD_AUIMANAGER
m_auimgr
.
UnInit
();
#endif
}
}
...
...
cvpcb/displayframe.cpp
View file @
d3468dd5
...
@@ -126,7 +126,7 @@ void WinEDA_DisplayFrame::ReCreateHToolbar()
...
@@ -126,7 +126,7 @@ void WinEDA_DisplayFrame::ReCreateHToolbar()
m_HToolBar
=
new
WinEDA_Toolbar
(
TOOLBAR_MAIN
,
this
,
ID_H_TOOLBAR
,
TRUE
);
m_HToolBar
=
new
WinEDA_Toolbar
(
TOOLBAR_MAIN
,
this
,
ID_H_TOOLBAR
,
TRUE
);
SetToolBar
(
m_HToolBar
);
SetToolBar
(
(
wxToolBar
*
)
m_HToolBar
);
m_HToolBar
->
AddTool
(
ID_OPTIONS_SETUP
,
wxEmptyString
,
m_HToolBar
->
AddTool
(
ID_OPTIONS_SETUP
,
wxEmptyString
,
wxBitmap
(
display_options_xpm
),
wxBitmap
(
display_options_xpm
),
...
...
cvpcb/tool_cvpcb.cpp
View file @
d3468dd5
...
@@ -23,8 +23,9 @@ void WinEDA_CvpcbFrame::ReCreateHToolbar()
...
@@ -23,8 +23,9 @@ void WinEDA_CvpcbFrame::ReCreateHToolbar()
return
;
return
;
m_HToolBar
=
new
WinEDA_Toolbar
(
TOOLBAR_MAIN
,
this
,
ID_H_TOOLBAR
,
TRUE
);
m_HToolBar
=
new
WinEDA_Toolbar
(
TOOLBAR_MAIN
,
this
,
ID_H_TOOLBAR
,
TRUE
);
SetToolBar
(
m_HToolBar
);
#if !KICAD_AUIMANAGER
SetToolBar
(
(
wxToolBar
*
)
m_HToolBar
);
#endif
m_HToolBar
->
AddTool
(
ID_CVPCB_READ_INPUT_NETLIST
,
wxEmptyString
,
m_HToolBar
->
AddTool
(
ID_CVPCB_READ_INPUT_NETLIST
,
wxEmptyString
,
wxBitmap
(
open_xpm
),
wxBitmap
(
open_xpm
),
_
(
"Open a NetList file"
)
);
_
(
"Open a NetList file"
)
);
...
...
eeschema/libframe.cpp
View file @
d3468dd5
...
@@ -187,6 +187,36 @@ WinEDA_LibeditFrame::WinEDA_LibeditFrame( wxWindow* father,
...
@@ -187,6 +187,36 @@ WinEDA_LibeditFrame::WinEDA_LibeditFrame( wxWindow* father,
UpdatePartSelectList
();
UpdatePartSelectList
();
Zoom_Automatique
(
false
);
Zoom_Automatique
(
false
);
Show
(
true
);
Show
(
true
);
#if KICAD_AUIMANAGER
m_auimgr
.
SetManagedWindow
(
this
);
wxAuiPaneInfo
horiz
;
horiz
.
Gripper
(
false
);
horiz
.
DockFixed
(
true
);
horiz
.
Movable
(
false
);
horiz
.
Floatable
(
false
);
horiz
.
CloseButton
(
false
);
horiz
.
CaptionVisible
(
false
);
wxAuiPaneInfo
vert
(
horiz
);
vert
.
TopDockable
(
false
).
BottomDockable
(
false
);
horiz
.
LeftDockable
(
false
).
RightDockable
(
false
);
m_auimgr
.
AddPane
(
m_HToolBar
,
wxAuiPaneInfo
(
horiz
).
Name
(
wxT
(
"m_HToolBar"
)).
Top
().
Row
(
0
));
m_auimgr
.
AddPane
(
m_VToolBar
,
wxAuiPaneInfo
(
vert
).
Name
(
wxT
(
"m_VToolBar"
)).
Right
());
m_auimgr
.
AddPane
(
DrawPanel
,
wxAuiPaneInfo
().
Name
(
wxT
(
"DrawFrame"
)).
CentrePane
());
m_auimgr
.
AddPane
(
MsgPanel
,
wxAuiPaneInfo
(
horiz
).
Name
(
wxT
(
"MsgPanel"
)).
Bottom
());
m_auimgr
.
Update
();
#endif
}
}
...
...
eeschema/schframe.cpp
View file @
d3468dd5
...
@@ -187,6 +187,41 @@ WinEDA_SchematicFrame::WinEDA_SchematicFrame( wxWindow* father,
...
@@ -187,6 +187,41 @@ WinEDA_SchematicFrame::WinEDA_SchematicFrame( wxWindow* father,
ReCreateHToolbar
();
ReCreateHToolbar
();
ReCreateVToolbar
();
ReCreateVToolbar
();
ReCreateOptToolbar
();
ReCreateOptToolbar
();
#if KICAD_AUIMANAGER
m_auimgr
.
SetManagedWindow
(
this
);
wxAuiPaneInfo
horiz
;
horiz
.
Gripper
(
false
);
horiz
.
DockFixed
(
true
);
horiz
.
Movable
(
false
);
horiz
.
Floatable
(
false
);
horiz
.
CloseButton
(
false
);
horiz
.
CaptionVisible
(
false
);
wxAuiPaneInfo
vert
(
horiz
);
vert
.
TopDockable
(
false
).
BottomDockable
(
false
);
horiz
.
LeftDockable
(
false
).
RightDockable
(
false
);
m_auimgr
.
AddPane
(
m_HToolBar
,
wxAuiPaneInfo
(
horiz
).
Name
(
wxT
(
"m_HToolBar"
)).
Top
().
Row
(
0
));
m_auimgr
.
AddPane
(
m_VToolBar
,
wxAuiPaneInfo
(
vert
).
Name
(
wxT
(
"m_VToolBar"
)).
Right
());
m_auimgr
.
AddPane
(
m_OptionsToolBar
,
wxAuiPaneInfo
(
vert
).
Name
(
wxT
(
"m_OptionsToolBar"
)).
Left
());
m_auimgr
.
AddPane
(
DrawPanel
,
wxAuiPaneInfo
().
Name
(
wxT
(
"DrawFrame"
)).
CentrePane
());
m_auimgr
.
AddPane
(
MsgPanel
,
wxAuiPaneInfo
(
horiz
).
Name
(
wxT
(
"MsgPanel"
)).
Bottom
());
m_auimgr
.
Update
();
#endif
}
}
...
...
eeschema/tool_lib.cpp
View file @
d3468dd5
...
@@ -94,8 +94,9 @@ void WinEDA_LibeditFrame::ReCreateHToolbar()
...
@@ -94,8 +94,9 @@ void WinEDA_LibeditFrame::ReCreateHToolbar()
return
;
return
;
m_HToolBar
=
new
WinEDA_Toolbar
(
TOOLBAR_MAIN
,
this
,
ID_H_TOOLBAR
,
true
);
m_HToolBar
=
new
WinEDA_Toolbar
(
TOOLBAR_MAIN
,
this
,
ID_H_TOOLBAR
,
true
);
SetToolBar
(
m_HToolBar
);
#if !KICAD_AUIMANAGER
SetToolBar
(
(
wxToolBar
*
)
m_HToolBar
);
#endif
// Set up toolbar
// Set up toolbar
m_HToolBar
->
AddTool
(
ID_LIBEDIT_SAVE_CURRENT_LIB
,
wxEmptyString
,
m_HToolBar
->
AddTool
(
ID_LIBEDIT_SAVE_CURRENT_LIB
,
wxEmptyString
,
wxBitmap
(
save_library_xpm
),
wxBitmap
(
save_library_xpm
),
...
...
eeschema/tool_sch.cpp
View file @
d3468dd5
...
@@ -27,8 +27,9 @@ void WinEDA_SchematicFrame::ReCreateHToolbar()
...
@@ -27,8 +27,9 @@ void WinEDA_SchematicFrame::ReCreateHToolbar()
wxString
msg
;
wxString
msg
;
m_HToolBar
=
new
WinEDA_Toolbar
(
TOOLBAR_MAIN
,
this
,
ID_H_TOOLBAR
,
TRUE
);
m_HToolBar
=
new
WinEDA_Toolbar
(
TOOLBAR_MAIN
,
this
,
ID_H_TOOLBAR
,
TRUE
);
SetToolBar
(
m_HToolBar
);
#if !KICAD_AUIMANAGER
SetToolBar
(
(
wxToolBar
*
)
m_HToolBar
);
#endif
// Set up toolbar
// Set up toolbar
m_HToolBar
->
AddTool
(
ID_NEW_PROJECT
,
wxEmptyString
,
wxBitmap
(
new_xpm
),
m_HToolBar
->
AddTool
(
ID_NEW_PROJECT
,
wxEmptyString
,
wxBitmap
(
new_xpm
),
_
(
"New schematic project"
)
);
_
(
"New schematic project"
)
);
...
...
eeschema/tool_viewlib.cpp
View file @
d3468dd5
...
@@ -27,7 +27,10 @@ void WinEDA_ViewlibFrame::ReCreateHToolbar()
...
@@ -27,7 +27,10 @@ void WinEDA_ViewlibFrame::ReCreateHToolbar()
{
{
m_HToolBar
=
new
WinEDA_Toolbar
(
TOOLBAR_MAIN
,
this
,
ID_H_TOOLBAR
,
m_HToolBar
=
new
WinEDA_Toolbar
(
TOOLBAR_MAIN
,
this
,
ID_H_TOOLBAR
,
true
);
true
);
SetToolBar
(
m_HToolBar
);
#if !KICAD_AUIMANAGER
SetToolBar
(
(
wxToolBar
*
)
m_HToolBar
);
#endif
// Set up toolbar
// Set up toolbar
m_HToolBar
->
AddTool
(
ID_LIBVIEW_SELECT_LIB
,
wxEmptyString
,
m_HToolBar
->
AddTool
(
ID_LIBVIEW_SELECT_LIB
,
wxEmptyString
,
...
...
eeschema/viewlib_frame.cpp
View file @
d3468dd5
...
@@ -121,6 +121,7 @@ WinEDA_ViewlibFrame::WinEDA_ViewlibFrame( wxWindow* father,
...
@@ -121,6 +121,7 @@ WinEDA_ViewlibFrame::WinEDA_ViewlibFrame( wxWindow* father,
m_LibListSize
.
y
=
size
.
y
;
m_LibListSize
.
y
=
size
.
y
;
wxPoint
win_pos
(
0
,
0
);
wxPoint
win_pos
(
0
,
0
);
#if !KICAD_AUIMANAGER
if
(
Library
==
NULL
)
if
(
Library
==
NULL
)
{
{
// Creates the libraries window display
// Creates the libraries window display
...
@@ -165,7 +166,30 @@ WinEDA_ViewlibFrame::WinEDA_ViewlibFrame( wxWindow* father,
...
@@ -165,7 +166,30 @@ WinEDA_ViewlibFrame::WinEDA_ViewlibFrame( wxWindow* father,
m_CmpListWindow
->
GetClientSize
()
-
m_CmpListWindow
->
GetClientSize
()
-
wxSize
(
EXTRA_BORDER_SIZE
*
2
,
0
),
wxSize
(
EXTRA_BORDER_SIZE
*
2
,
0
),
0
,
NULL
,
wxLB_HSCROLL
);
0
,
NULL
,
wxLB_HSCROLL
);
#else
if
(
Library
==
NULL
)
{
m_LibList
=
new
wxListBox
(
this
,
ID_LIBVIEW_LIB_LIST
,
wxPoint
(
0
,
0
),
wxDefaultSize
,
0
,
NULL
,
wxLB_HSCROLL
);
}
else
{
m_libraryName
=
Library
->
GetName
();
m_entryName
.
Clear
();
m_unit
=
1
;
m_convert
=
1
;
m_LibListSize
.
x
=
0
;
}
m_CmpList
=
new
wxListBox
(
this
,
ID_LIBVIEW_CMP_LIST
,
wxPoint
(
0
,
0
),
wxDefaultSize
,
0
,
NULL
,
wxLB_HSCROLL
);
#endif
if
(
m_LibList
)
if
(
m_LibList
)
ReCreateListLib
();
ReCreateListLib
();
DisplayLibInfos
();
DisplayLibInfos
();
...
@@ -173,6 +197,40 @@ WinEDA_ViewlibFrame::WinEDA_ViewlibFrame( wxWindow* father,
...
@@ -173,6 +197,40 @@ WinEDA_ViewlibFrame::WinEDA_ViewlibFrame( wxWindow* father,
DrawPanel
->
SetAcceleratorTable
(
table
);
DrawPanel
->
SetAcceleratorTable
(
table
);
Zoom_Automatique
(
false
);
Zoom_Automatique
(
false
);
Show
(
TRUE
);
Show
(
TRUE
);
#if KICAD_AUIMANAGER
m_auimgr
.
SetManagedWindow
(
this
);
wxAuiPaneInfo
horiz
;
horiz
.
Gripper
(
false
);
horiz
.
DockFixed
(
true
);
horiz
.
Movable
(
false
);
horiz
.
Floatable
(
false
);
horiz
.
CloseButton
(
false
);
horiz
.
CaptionVisible
(
false
);
wxAuiPaneInfo
vert
(
horiz
);
vert
.
TopDockable
(
false
).
BottomDockable
(
false
);
horiz
.
LeftDockable
(
false
).
RightDockable
(
false
);
m_auimgr
.
AddPane
(
m_HToolBar
,
wxAuiPaneInfo
(
horiz
).
Name
(
wxT
(
"m_HToolBar"
)).
Top
().
Row
(
0
));
m_auimgr
.
AddPane
(
m_LibList
,
wxAuiPaneInfo
(
vert
).
Name
(
wxT
(
"m_LibList"
)).
Left
().
Row
(
0
));
m_auimgr
.
AddPane
(
m_CmpList
,
wxAuiPaneInfo
(
vert
).
Name
(
wxT
(
"m_CmpList"
)).
Left
().
Row
(
1
));
m_auimgr
.
AddPane
(
DrawPanel
,
wxAuiPaneInfo
(
vert
).
Name
(
wxT
(
"DrawFrame"
)).
Center
());
m_auimgr
.
AddPane
(
MsgPanel
,
wxAuiPaneInfo
(
horiz
).
Name
(
wxT
(
"MsgPanel"
)).
Bottom
());
m_auimgr
.
Update
();
#endif
}
}
...
@@ -281,7 +339,10 @@ void WinEDA_ViewlibFrame::OnSize( wxSizeEvent& SizeEv )
...
@@ -281,7 +339,10 @@ void WinEDA_ViewlibFrame::OnSize( wxSizeEvent& SizeEv )
m_CmpList
->
SetSize
(
m_CmpListWindow
->
GetClientSize
()
-
m_CmpList
->
SetSize
(
m_CmpListWindow
->
GetClientSize
()
-
wxSize
(
EXTRA_BORDER_SIZE
*
2
,
0
)
);
wxSize
(
EXTRA_BORDER_SIZE
*
2
,
0
)
);
}
}
#if KICAD_AUIMANAGER
if
(
m_auimgr
.
GetManagedWindow
())
m_auimgr
.
Update
();
#endif
SizeEv
.
Skip
();
SizeEv
.
Skip
();
}
}
...
...
gerbview/gerberframe.cpp
View file @
d3468dd5
...
@@ -156,6 +156,39 @@ WinEDA_GerberFrame::WinEDA_GerberFrame( wxWindow* father,
...
@@ -156,6 +156,39 @@ WinEDA_GerberFrame::WinEDA_GerberFrame( wxWindow* father,
ReCreateHToolbar
();
ReCreateHToolbar
();
ReCreateVToolbar
();
ReCreateVToolbar
();
ReCreateOptToolbar
();
ReCreateOptToolbar
();
#if KICAD_AUIMANAGER
m_auimgr
.
SetManagedWindow
(
this
);
wxAuiPaneInfo
horiz
;
horiz
.
Gripper
(
false
);
horiz
.
DockFixed
(
true
);
horiz
.
Movable
(
false
);
horiz
.
Floatable
(
false
);
horiz
.
CloseButton
(
false
);
horiz
.
CaptionVisible
(
false
);
wxAuiPaneInfo
vert
(
horiz
);
vert
.
TopDockable
(
false
).
BottomDockable
(
false
);
horiz
.
LeftDockable
(
false
).
RightDockable
(
false
);
m_auimgr
.
AddPane
(
m_HToolBar
,
wxAuiPaneInfo
(
horiz
).
Name
(
wxT
(
"m_HToolBar"
)).
Top
().
Row
(
0
));
m_auimgr
.
AddPane
(
m_VToolBar
,
wxAuiPaneInfo
(
vert
).
Name
(
wxT
(
"m_VToolBar"
)).
Right
());
m_auimgr
.
AddPane
(
m_OptionsToolBar
,
wxAuiPaneInfo
(
vert
).
Name
(
wxT
(
"m_OptionsToolBar"
)).
Left
());
m_auimgr
.
AddPane
(
DrawPanel
,
wxAuiPaneInfo
().
Name
(
wxT
(
"DrawFrame"
)).
CentrePane
());
m_auimgr
.
AddPane
(
MsgPanel
,
wxAuiPaneInfo
(
horiz
).
Name
(
wxT
(
"MsgPanel"
)).
Bottom
());
m_auimgr
.
Update
();
#endif
}
}
...
@@ -288,6 +321,10 @@ void WinEDA_GerberFrame::SetToolbars()
...
@@ -288,6 +321,10 @@ void WinEDA_GerberFrame::SetToolbars()
}
}
DisplayUnitsMsg
();
DisplayUnitsMsg
();
#if KICAD_AUIMANAGER
if
(
m_auimgr
.
GetManagedWindow
())
m_auimgr
.
Update
();
#endif
}
}
...
...
gerbview/tool_gerber.cpp
View file @
d3468dd5
...
@@ -161,8 +161,9 @@ void WinEDA_GerberFrame::ReCreateHToolbar( void )
...
@@ -161,8 +161,9 @@ void WinEDA_GerberFrame::ReCreateHToolbar( void )
}
}
m_HToolBar
=
new
WinEDA_Toolbar
(
TOOLBAR_MAIN
,
this
,
ID_H_TOOLBAR
,
TRUE
);
m_HToolBar
=
new
WinEDA_Toolbar
(
TOOLBAR_MAIN
,
this
,
ID_H_TOOLBAR
,
TRUE
);
SetToolBar
(
m_HToolBar
);
#if !KICAD_AUIMANAGER
SetToolBar
(
(
wxToolBar
*
)
m_HToolBar
);
#endif
// Set up toolbar
// Set up toolbar
m_HToolBar
->
AddTool
(
ID_NEW_BOARD
,
wxEmptyString
,
m_HToolBar
->
AddTool
(
ID_NEW_BOARD
,
wxEmptyString
,
wxBitmap
(
new_xpm
),
wxBitmap
(
new_xpm
),
...
...
include/wxstruct.h
View file @
d3468dd5
...
@@ -6,6 +6,12 @@
...
@@ -6,6 +6,12 @@
#ifndef WXSTRUCT_H
#ifndef WXSTRUCT_H
#define WXSTRUCT_H
#define WXSTRUCT_H
// @todo: these 2 defines need to be moved into the top most CMakeLists.txt as a CMake OPTION.
// and they need to be boiled down to a single OPTION, not 2, and we need to add the wxWidgets aui
// library to the link image under these circumstances. I volunteer, but need a day or so. Dick
//#define KICAD_AUITOOLBAR 1
//#define KICAD_AUIMANAGER 1
#include <vector>
#include <vector>
...
@@ -15,6 +21,10 @@
...
@@ -15,6 +21,10 @@
#include <wx/wxhtml.h>
#include <wx/wxhtml.h>
#include <wx/laywin.h>
#include <wx/laywin.h>
#if defined(KICAD_AUIMANAGER)
#include <wx/aui/aui.h>
#endif
//C++ guarantees that operator delete checks its argument for null-ness
//C++ guarantees that operator delete checks its argument for null-ness
#ifndef SAFE_DELETE
#ifndef SAFE_DELETE
...
@@ -101,6 +111,10 @@ public:
...
@@ -101,6 +111,10 @@ public:
// It is "SchematicFrame", "PcbFrame" ....
// It is "SchematicFrame", "PcbFrame" ....
wxString
m_AboutTitle
;
// Name of program displayed in About.
wxString
m_AboutTitle
;
// Name of program displayed in About.
#ifdef KICAD_AUIMANAGER
wxAuiManager
m_auimgr
;
#endif
public
:
public
:
// Constructor and destructor
// Constructor and destructor
...
@@ -642,7 +656,11 @@ public:
...
@@ -642,7 +656,11 @@ public:
/* class WinEDA_Toolbar */
/* class WinEDA_Toolbar */
/*************************/
/*************************/
#if KICAD_AUITOOLBAR
class
WinEDA_Toolbar
:
public
wxAuiToolBar
#else
class
WinEDA_Toolbar
:
public
wxToolBar
class
WinEDA_Toolbar
:
public
wxToolBar
#endif
{
{
public
:
public
:
wxWindow
*
m_Parent
;
wxWindow
*
m_Parent
;
...
@@ -655,6 +673,21 @@ public:
...
@@ -655,6 +673,21 @@ public:
WinEDA_Toolbar
(
id_toolbar
type
,
wxWindow
*
parent
,
WinEDA_Toolbar
(
id_toolbar
type
,
wxWindow
*
parent
,
wxWindowID
id
,
bool
horizontal
);
wxWindowID
id
,
bool
horizontal
);
WinEDA_Toolbar
*
Next
()
{
return
Pnext
;
}
WinEDA_Toolbar
*
Next
()
{
return
Pnext
;
}
#if KICAD_AUITOOLBAR
bool
GetToolState
(
int
toolId
)
{
return
GetToolToggled
(
toolId
);
};
void
AddRadioTool
(
int
toolid
,
const
wxString
&
label
,
const
wxBitmap
&
bitmap
,
const
wxBitmap
&
bmpDisabled
=
wxNullBitmap
,
const
wxString
&
shortHelp
=
wxEmptyString
,
const
wxString
&
longHelp
=
wxEmptyString
,
wxObject
*
data
=
NULL
)
{
AddTool
(
toolid
,
label
,
bitmap
,
bmpDisabled
,
wxITEM_CHECK
,
shortHelp
,
longHelp
,
data
);
};
void
SetToolNormalBitmap
(
int
id
,
const
wxBitmap
&
bitmap
)
{};
void
SetRows
(
int
nRows
)
{};
#endif
};
};
...
...
kicad/buildmnu.cpp
View file @
d3468dd5
...
@@ -19,12 +19,12 @@ BEGIN_EVENT_TABLE( WinEDA_MainFrame, WinEDA_BasicFrame )
...
@@ -19,12 +19,12 @@ BEGIN_EVENT_TABLE( WinEDA_MainFrame, WinEDA_BasicFrame )
/* Window events */
/* Window events */
EVT_SIZE
(
WinEDA_MainFrame
::
OnSize
)
EVT_SIZE
(
WinEDA_MainFrame
::
OnSize
)
EVT_CLOSE
(
WinEDA_MainFrame
::
OnCloseWindow
)
EVT_CLOSE
(
WinEDA_MainFrame
::
OnCloseWindow
)
#if !KICAD_AUIMANAGER
/* Sash drag events */
/* Sash drag events */
EVT_SASH_DRAGGED
(
ID_LEFT_FRAME
,
WinEDA_MainFrame
::
OnSashDrag
)
EVT_SASH_DRAGGED
(
ID_LEFT_FRAME
,
WinEDA_MainFrame
::
OnSashDrag
)
EVT_SASH_DRAGGED
(
ID_BOTTOM_FRAME
,
WinEDA_MainFrame
::
OnSashDrag
)
EVT_SASH_DRAGGED
(
ID_BOTTOM_FRAME
,
WinEDA_MainFrame
::
OnSashDrag
)
EVT_SASH_DRAGGED
(
ID_MAIN_COMMAND
,
WinEDA_MainFrame
::
OnSashDrag
)
EVT_SASH_DRAGGED
(
ID_MAIN_COMMAND
,
WinEDA_MainFrame
::
OnSashDrag
)
#endif
/* Toolbar events */
/* Toolbar events */
EVT_TOOL
(
ID_NEW_PROJECT
,
WinEDA_MainFrame
::
OnLoadProject
)
EVT_TOOL
(
ID_NEW_PROJECT
,
WinEDA_MainFrame
::
OnLoadProject
)
EVT_TOOL
(
ID_LOAD_PROJECT
,
WinEDA_MainFrame
::
OnLoadProject
)
EVT_TOOL
(
ID_LOAD_PROJECT
,
WinEDA_MainFrame
::
OnLoadProject
)
...
@@ -253,8 +253,9 @@ void WinEDA_MainFrame::RecreateBaseHToolbar()
...
@@ -253,8 +253,9 @@ void WinEDA_MainFrame::RecreateBaseHToolbar()
// Allocate memory for m_HToolBar
// Allocate memory for m_HToolBar
m_HToolBar
=
new
WinEDA_Toolbar
(
TOOLBAR_MAIN
,
this
,
ID_H_TOOLBAR
,
TRUE
);
m_HToolBar
=
new
WinEDA_Toolbar
(
TOOLBAR_MAIN
,
this
,
ID_H_TOOLBAR
,
TRUE
);
SetToolBar
(
m_HToolBar
);
#if !KICAD_AUIMANAGER
SetToolBar
(
(
wxToolBar
*
)
m_HToolBar
);
#endif
// Set up toolbar
// Set up toolbar
m_HToolBar
->
AddTool
(
ID_NEW_PROJECT
,
wxEmptyString
,
m_HToolBar
->
AddTool
(
ID_NEW_PROJECT
,
wxEmptyString
,
wxBitmap
(
new_project_xpm
),
wxBitmap
(
new_project_xpm
),
...
...
kicad/mainframe.cpp
View file @
d3468dd5
/***********************************************************/
/***********************************************************/
/* mdiframe.cpp - WinEDA_MainFrame is the kicad main frame */
/* mdiframe.cpp - WinEDA_MainFrame is the kicad main frame */
/***********************************************************/
/***********************************************************/
...
@@ -69,6 +70,7 @@ WinEDA_MainFrame::WinEDA_MainFrame( wxWindow* parent,
...
@@ -69,6 +70,7 @@ WinEDA_MainFrame::WinEDA_MainFrame( wxWindow* parent,
m_LeftWin
->
SetSashVisible
(
wxSASH_RIGHT
,
TRUE
);
m_LeftWin
->
SetSashVisible
(
wxSASH_RIGHT
,
TRUE
);
m_LeftWin
->
SetExtraBorderSize
(
2
);
m_LeftWin
->
SetExtraBorderSize
(
2
);
#if !KICAD_AUIMANAGER
// Bottom Window: box to display messages
// Bottom Window: box to display messages
m_BottomWin
=
new
wxSashLayoutWindow
(
this
,
ID_BOTTOM_FRAME
,
m_BottomWin
=
new
wxSashLayoutWindow
(
this
,
ID_BOTTOM_FRAME
,
wxDefaultPosition
,
wxDefaultSize
,
wxDefaultPosition
,
wxDefaultSize
,
...
@@ -83,7 +85,11 @@ WinEDA_MainFrame::WinEDA_MainFrame( wxWindow* parent,
...
@@ -83,7 +85,11 @@ WinEDA_MainFrame::WinEDA_MainFrame( wxWindow* parent,
m_DialogWin
=
new
wxTextCtrl
(
m_BottomWin
,
wxID_ANY
,
wxEmptyString
,
m_DialogWin
=
new
wxTextCtrl
(
m_BottomWin
,
wxID_ANY
,
wxEmptyString
,
wxDefaultPosition
,
wxDefaultSize
,
wxDefaultPosition
,
wxDefaultSize
,
wxTE_MULTILINE
|
wxNO_BORDER
|
wxTE_READONLY
);
wxTE_MULTILINE
|
wxNO_BORDER
|
wxTE_READONLY
);
#else
m_DialogWin
=
new
wxTextCtrl
(
this
,
wxID_ANY
,
wxEmptyString
,
wxDefaultPosition
,
wxDefaultSize
,
wxTE_MULTILINE
|
wxNO_BORDER
|
wxTE_READONLY
);
#endif
// m_CommandWin is the box with buttons which launch eechema, pcbnew ...
// m_CommandWin is the box with buttons which launch eechema, pcbnew ...
m_CommandWin
=
new
WinEDA_CommandFrame
(
this
,
ID_MAIN_COMMAND
,
m_CommandWin
=
new
WinEDA_CommandFrame
(
this
,
ID_MAIN_COMMAND
,
wxPoint
(
m_LeftWin_Width
,
0
),
wxPoint
(
m_LeftWin_Width
,
0
),
...
@@ -98,6 +104,38 @@ WinEDA_MainFrame::WinEDA_MainFrame( wxWindow* parent,
...
@@ -98,6 +104,38 @@ WinEDA_MainFrame::WinEDA_MainFrame( wxWindow* parent,
#ifdef KICAD_PYTHON
#ifdef KICAD_PYTHON
PyHandler
::
GetInstance
()
->
DeclareEvent
(
wxT
(
"kicad::LoadProject"
)
);
PyHandler
::
GetInstance
()
->
DeclareEvent
(
wxT
(
"kicad::LoadProject"
)
);
#endif
#endif
#if KICAD_AUIMANAGER
RecreateBaseHToolbar
();
m_auimgr
.
SetManagedWindow
(
this
);
wxAuiPaneInfo
horiz
;
horiz
.
Gripper
(
false
);
horiz
.
DockFixed
(
true
);
horiz
.
Movable
(
false
);
horiz
.
Floatable
(
false
);
horiz
.
CloseButton
(
false
);
horiz
.
CaptionVisible
(
false
);
wxAuiPaneInfo
vert
(
horiz
);
vert
.
TopDockable
(
false
).
BottomDockable
(
false
);
horiz
.
LeftDockable
(
false
).
RightDockable
(
false
);
m_auimgr
.
AddPane
(
m_HToolBar
,
wxAuiPaneInfo
(
horiz
).
Name
(
wxT
(
"m_HToolBar"
)).
Top
());
m_auimgr
.
AddPane
(
m_DialogWin
,
wxAuiPaneInfo
(
horiz
).
Name
(
wxT
(
"m_DialogWin"
)).
Center
());
m_auimgr
.
AddPane
(
m_CommandWin
,
wxAuiPaneInfo
().
Name
(
wxT
(
"m_CommandWin"
)).
CentrePane
());
m_auimgr
.
AddPane
(
m_LeftWin
,
wxAuiPaneInfo
(
horiz
).
Name
(
wxT
(
"m_LeftWin"
)).
Left
().
BestSize
(
clientsize
.
x
/
3
,
clientsize
.
y
));
m_auimgr
.
Update
();
#endif
}
}
...
@@ -105,6 +143,9 @@ WinEDA_MainFrame::WinEDA_MainFrame( wxWindow* parent,
...
@@ -105,6 +143,9 @@ WinEDA_MainFrame::WinEDA_MainFrame( wxWindow* parent,
WinEDA_MainFrame
::~
WinEDA_MainFrame
()
WinEDA_MainFrame
::~
WinEDA_MainFrame
()
/*****************************************************************************/
/*****************************************************************************/
{
{
#if KICAD_AUIMANAGER
m_auimgr
.
UnInit
();
#endif
}
}
...
@@ -195,7 +236,10 @@ void WinEDA_MainFrame::OnSize( wxSizeEvent& event )
...
@@ -195,7 +236,10 @@ void WinEDA_MainFrame::OnSize( wxSizeEvent& event )
layout
.
LayoutFrame
(
this
);
layout
.
LayoutFrame
(
this
);
if
(
m_CommandWin
)
if
(
m_CommandWin
)
m_CommandWin
->
Refresh
(
TRUE
);
m_CommandWin
->
Refresh
(
TRUE
);
#if KICAD_AUIMANAGER
if
(
m_auimgr
.
GetManagedWindow
())
m_auimgr
.
Update
();
#endif
event
.
Skip
();
event
.
Skip
();
}
}
...
...
pcbnew/dialog_general_options.cpp
View file @
d3468dd5
...
@@ -277,6 +277,7 @@ void WinEDA_PcbFrame::OnSelectOptionToolbar( wxCommandEvent& event )
...
@@ -277,6 +277,7 @@ void WinEDA_PcbFrame::OnSelectOptionToolbar( wxCommandEvent& event )
break
;
break
;
case
ID_TB_OPTIONS_SHOW_EXTRA_VERTICAL_TOOLBAR1
:
case
ID_TB_OPTIONS_SHOW_EXTRA_VERTICAL_TOOLBAR1
:
#if !KICAD_AUIMANAGER
if
(
m_OptionsToolBar
->
GetToolState
(
id
)
)
// show aux V toolbar (Microwave tool)
if
(
m_OptionsToolBar
->
GetToolState
(
id
)
)
// show aux V toolbar (Microwave tool)
ReCreateAuxVToolbar
();
ReCreateAuxVToolbar
();
else
else
...
@@ -289,6 +290,10 @@ void WinEDA_PcbFrame::OnSelectOptionToolbar( wxCommandEvent& event )
...
@@ -289,6 +290,10 @@ void WinEDA_PcbFrame::OnSelectOptionToolbar( wxCommandEvent& event )
OnSize
(
SizeEv
);
OnSize
(
SizeEv
);
}
}
#else
m_auimgr
.
GetPane
(
wxT
(
"m_AuxVToolBar"
)).
Show
(
m_OptionsToolBar
->
GetToolState
(
id
)
);
m_auimgr
.
Update
();
#endif
break
;
break
;
default
:
default
:
...
@@ -298,4 +303,5 @@ void WinEDA_PcbFrame::OnSelectOptionToolbar( wxCommandEvent& event )
...
@@ -298,4 +303,5 @@ void WinEDA_PcbFrame::OnSelectOptionToolbar( wxCommandEvent& event )
}
}
SetToolbars
();
SetToolbars
();
}
}
pcbnew/moduleframe.cpp
View file @
d3468dd5
...
@@ -192,6 +192,43 @@ WinEDA_ModuleEditFrame::WinEDA_ModuleEditFrame( wxWindow* father,
...
@@ -192,6 +192,43 @@ WinEDA_ModuleEditFrame::WinEDA_ModuleEditFrame( wxWindow* father,
if
(
DrawPanel
)
if
(
DrawPanel
)
DrawPanel
->
m_Block_Enable
=
TRUE
;
DrawPanel
->
m_Block_Enable
=
TRUE
;
#if KICAD_AUIMANAGER
m_auimgr
.
SetManagedWindow
(
this
);
wxAuiPaneInfo
horiz
;
horiz
.
Gripper
(
false
);
horiz
.
DockFixed
(
true
);
horiz
.
Movable
(
false
);
horiz
.
Floatable
(
false
);
horiz
.
CloseButton
(
false
);
horiz
.
CaptionVisible
(
false
);
wxAuiPaneInfo
vert
(
horiz
);
vert
.
TopDockable
(
false
).
BottomDockable
(
false
);
horiz
.
LeftDockable
(
false
).
RightDockable
(
false
);
m_auimgr
.
AddPane
(
m_HToolBar
,
wxAuiPaneInfo
(
horiz
).
Name
(
wxT
(
"m_HToolBar"
)).
Top
().
Row
(
0
));
m_auimgr
.
AddPane
(
m_AuxiliaryToolBar
,
wxAuiPaneInfo
(
horiz
).
Name
(
wxT
(
"m_AuxiliaryToolBar"
)).
Top
().
Row
(
1
));
m_auimgr
.
AddPane
(
m_VToolBar
,
wxAuiPaneInfo
(
vert
).
Name
(
wxT
(
"m_VToolBar"
)).
Right
());
m_auimgr
.
AddPane
(
m_OptionsToolBar
,
wxAuiPaneInfo
(
vert
).
Name
(
wxT
(
"m_OptionsToolBar"
)).
Left
());
m_auimgr
.
AddPane
(
DrawPanel
,
wxAuiPaneInfo
().
Name
(
wxT
(
"DrawFrame"
)).
CentrePane
());
m_auimgr
.
AddPane
(
MsgPanel
,
wxAuiPaneInfo
(
horiz
).
Name
(
wxT
(
"MsgPanel"
)).
Bottom
());
m_auimgr
.
Update
();
#endif
}
}
...
@@ -370,6 +407,10 @@ void WinEDA_ModuleEditFrame::SetToolbars()
...
@@ -370,6 +407,10 @@ void WinEDA_ModuleEditFrame::SetToolbars()
}
}
DisplayUnitsMsg
();
DisplayUnitsMsg
();
#if KICAD_AUIMANAGER
if
(
m_auimgr
.
GetManagedWindow
())
m_auimgr
.
Update
();
#endif
}
}
...
...
pcbnew/pcbframe.cpp
View file @
d3468dd5
...
@@ -263,6 +263,46 @@ WinEDA_PcbFrame::WinEDA_PcbFrame( wxWindow* father,
...
@@ -263,6 +263,46 @@ WinEDA_PcbFrame::WinEDA_PcbFrame( wxWindow* father,
if
(
m_show_microwave_tools
)
if
(
m_show_microwave_tools
)
ReCreateAuxVToolbar
();
ReCreateAuxVToolbar
();
#if KICAD_AUIMANAGER
m_auimgr
.
SetManagedWindow
(
this
);
wxAuiPaneInfo
horiz
;
horiz
.
Gripper
(
false
);
horiz
.
DockFixed
(
true
);
horiz
.
Movable
(
false
);
horiz
.
Floatable
(
false
);
horiz
.
CloseButton
(
false
);
horiz
.
CaptionVisible
(
false
);
wxAuiPaneInfo
vert
(
horiz
);
vert
.
TopDockable
(
false
).
BottomDockable
(
false
);
horiz
.
LeftDockable
(
false
).
RightDockable
(
false
);
m_auimgr
.
AddPane
(
m_HToolBar
,
wxAuiPaneInfo
(
horiz
).
Name
(
wxT
(
"m_HToolBar"
)).
Top
().
Row
(
0
));
m_auimgr
.
AddPane
(
m_AuxiliaryToolBar
,
wxAuiPaneInfo
(
horiz
).
Name
(
wxT
(
"m_AuxiliaryToolBar"
)).
Top
().
Row
(
1
));
m_auimgr
.
AddPane
(
m_AuxVToolBar
,
wxAuiPaneInfo
(
vert
).
Name
(
wxT
(
"m_AuxVToolBar"
)).
Right
().
Row
(
1
).
Hide
());
m_auimgr
.
AddPane
(
m_VToolBar
,
wxAuiPaneInfo
(
vert
).
Name
(
wxT
(
"m_VToolBar"
)).
Right
());
m_auimgr
.
AddPane
(
m_OptionsToolBar
,
wxAuiPaneInfo
(
vert
).
Name
(
wxT
(
"m_OptionsToolBar"
)).
Left
());
m_auimgr
.
AddPane
(
DrawPanel
,
wxAuiPaneInfo
().
Name
(
wxT
(
"DrawFrame"
)).
CentrePane
());
m_auimgr
.
AddPane
(
MsgPanel
,
wxAuiPaneInfo
(
horiz
).
Name
(
wxT
(
"MsgPanel"
)).
Bottom
());
m_auimgr
.
Update
();
#endif
}
}
...
...
pcbnew/tool_modedit.cpp
View file @
d3468dd5
...
@@ -33,9 +33,9 @@ void WinEDA_ModuleEditFrame::ReCreateHToolbar()
...
@@ -33,9 +33,9 @@ void WinEDA_ModuleEditFrame::ReCreateHToolbar()
wxString
msg
;
wxString
msg
;
m_HToolBar
=
new
WinEDA_Toolbar
(
TOOLBAR_MAIN
,
this
,
ID_H_TOOLBAR
,
TRUE
);
m_HToolBar
=
new
WinEDA_Toolbar
(
TOOLBAR_MAIN
,
this
,
ID_H_TOOLBAR
,
TRUE
);
#if !KICAD_AUIMANAGER
SetToolBar
(
m_HToolBar
);
SetToolBar
(
(
wxToolBar
*
)
m_HToolBar
);
#endif
// Set up toolbar
// Set up toolbar
m_HToolBar
->
AddTool
(
ID_MODEDIT_SELECT_CURRENT_LIB
,
wxEmptyString
,
m_HToolBar
->
AddTool
(
ID_MODEDIT_SELECT_CURRENT_LIB
,
wxEmptyString
,
wxBitmap
(
open_library_xpm
),
wxBitmap
(
open_library_xpm
),
...
...
pcbnew/tool_pcb.cpp
View file @
d3468dd5
...
@@ -196,9 +196,9 @@ void WinEDA_PcbFrame::ReCreateHToolbar()
...
@@ -196,9 +196,9 @@ void WinEDA_PcbFrame::ReCreateHToolbar()
m_HToolBar
=
new
WinEDA_Toolbar
(
TOOLBAR_MAIN
,
this
,
ID_H_TOOLBAR
,
true
);
m_HToolBar
=
new
WinEDA_Toolbar
(
TOOLBAR_MAIN
,
this
,
ID_H_TOOLBAR
,
true
);
m_HToolBar
->
SetRows
(
1
);
m_HToolBar
->
SetRows
(
1
);
#if !KICAD_AUIMANAGER
SetToolBar
(
m_HToolBar
);
SetToolBar
(
(
wxToolBar
*
)
m_HToolBar
);
#endif
// Set up toolbar
// Set up toolbar
m_HToolBar
->
AddTool
(
ID_NEW_BOARD
,
wxEmptyString
,
wxBitmap
(
new_xpm
),
m_HToolBar
->
AddTool
(
ID_NEW_BOARD
,
wxEmptyString
,
wxBitmap
(
new_xpm
),
_
(
"New board"
)
);
_
(
"New board"
)
);
...
...
pcbnew/toolbars_update_user_interface.cpp
View file @
d3468dd5
...
@@ -275,8 +275,13 @@ void WinEDA_PcbFrame::SetToolbars()
...
@@ -275,8 +275,13 @@ void WinEDA_PcbFrame::SetToolbars()
_
(
"Hide invisible text"
)
:
_
(
"Hide invisible text"
)
:
_
(
"Show invisible text"
)
);
_
(
"Show invisible text"
)
);
#if !KICAD_AUIMANAGER
m_OptionsToolBar
->
ToggleTool
(
ID_TB_OPTIONS_SHOW_EXTRA_VERTICAL_TOOLBAR1
,
m_OptionsToolBar
->
ToggleTool
(
ID_TB_OPTIONS_SHOW_EXTRA_VERTICAL_TOOLBAR1
,
m_AuxVToolBar
?
true
:
false
);
m_AuxVToolBar
?
true
:
false
);
#else
m_OptionsToolBar
->
ToggleTool
(
ID_TB_OPTIONS_SHOW_EXTRA_VERTICAL_TOOLBAR1
,
m_auimgr
.
GetPane
(
wxT
(
"m_AuxVToolBar"
)).
IsShown
()
);
#endif
}
}
if
(
m_AuxiliaryToolBar
)
if
(
m_AuxiliaryToolBar
)
...
@@ -285,4 +290,8 @@ void WinEDA_PcbFrame::SetToolbars()
...
@@ -285,4 +290,8 @@ void WinEDA_PcbFrame::SetToolbars()
UpdateToolbarLayerInfo
();
UpdateToolbarLayerInfo
();
PrepareLayerIndicator
();
PrepareLayerIndicator
();
DisplayUnitsMsg
();
DisplayUnitsMsg
();
#if KICAD_AUIMANAGER
if
(
m_auimgr
.
GetManagedWindow
())
m_auimgr
.
Update
();
#endif
}
}
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