Commit 56995b33 authored by dickelbeck's avatar dickelbeck

AUI support into topmost CMakeLists.txt

parent b2f9d5bd
...@@ -78,7 +78,7 @@ WinEDA3D_DrawFrame::WinEDA3D_DrawFrame( WinEDA_BasePcbFrame* parent, ...@@ -78,7 +78,7 @@ 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 #if defined(KICAD_AUIMANAGER)
m_auimgr.SetManagedWindow( this ); m_auimgr.SetManagedWindow( this );
wxAuiPaneInfo horiz; wxAuiPaneInfo horiz;
......
...@@ -21,7 +21,7 @@ void WinEDA3D_DrawFrame::ReCreateHToolbar() ...@@ -21,7 +21,7 @@ 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 #if !defined(KICAD_AUIMANAGER)
SetToolBar( (wxToolBar*) m_HToolBar ); SetToolBar( (wxToolBar*) m_HToolBar );
#endif #endif
......
...@@ -185,7 +185,7 @@ public: ...@@ -185,7 +185,7 @@ public:
wxPoint m_FramePos; wxPoint m_FramePos;
wxSize m_FrameSize; wxSize m_FrameSize;
#if KICAD_AUIMANAGER #if defined(KICAD_AUIMANAGER)
wxAuiManager m_auimgr; wxAuiManager m_auimgr;
~WinEDA3D_DrawFrame() { m_auimgr.UnInit(); }; ~WinEDA3D_DrawFrame() { m_auimgr.UnInit(); };
#endif #endif
......
...@@ -4,6 +4,13 @@ KiCad ChangeLog 2009 ...@@ -4,6 +4,13 @@ KiCad ChangeLog 2009
Please add newer entries at the top, list the date and your name with Please add newer entries at the top, list the date and your name with
email address. email address.
2009-Nov-5 UPDATE Dick Hollenbeck <dick@softplc.com>
================================================================================
++all
CMakeLists.txt support for AUI.
2009-Nov-04 UPDATE Jean-Pierre Charras <jean-pierre.charras@gipsa-lab.inpg.fr> 2009-Nov-04 UPDATE Jean-Pierre Charras <jean-pierre.charras@gipsa-lab.inpg.fr>
================================================================================ ================================================================================
++pcbnew ++pcbnew
......
...@@ -19,6 +19,16 @@ option(KICAD_CYRILLIC "enable/disable building using cyrillic (needs unicode) (d ...@@ -19,6 +19,16 @@ option(KICAD_CYRILLIC "enable/disable building using cyrillic (needs unicode) (d
option(wxUSE_UNICODE "enable/disable building unicode (default OFF)") option(wxUSE_UNICODE "enable/disable building unicode (default OFF)")
option(KICAD_GOST "enable/disable building using GOST notation for multiple gates per package (default OFF)") option(KICAD_GOST "enable/disable building using GOST notation for multiple gates per package (default OFF)")
if(APPLE)
option(KICAD_AUIMANAGER "Enable use of wxAuiManager (default ON)" ON)
option(KICAD_AUITOOLBAR "Enable use of wxAuiToolBar (default ON)" ON)
else(APPLE)
option(KICAD_AUIMANAGER "Enable use of wxAuiManager (default OFF)" OFF)
option(KICAD_AUITOOLBAR "Enable use of wxAuiToolBar (default OFF)" OFF)
endif(APPLE)
# Comment this out if you don't want to build with Python support. # Comment this out if you don't want to build with Python support.
# OPTION(KICAD_PYTHON "enable/disable building with Python support (default OFF)") # OPTION(KICAD_PYTHON "enable/disable building with Python support (default OFF)")
...@@ -119,7 +129,12 @@ check_find_package_result(OPENGL_FOUND "OpenGL") ...@@ -119,7 +129,12 @@ check_find_package_result(OPENGL_FOUND "OpenGL")
# Here you can define what libraries of wxWidgets you need for your # Here you can define what libraries of wxWidgets you need for your
# application. You can figure out what libraries you need here; # application. You can figure out what libraries you need here;
# http://www.wxwidgets.org/manuals/2.8/wx_librarieslist.html # http://www.wxwidgets.org/manuals/2.8/wx_librarieslist.html
find_package(wxWidgets COMPONENTS gl html adv core net base QUIET)
if( KICAD_AUIMANAGER OR KICAD_AUITOOLBAR )
find_package(wxWidgets COMPONENTS gl html adv core net base aui QUIET)
else( KICAD_AUIMANAGER OR KICAD_AUITOOLBAR )
find_package(wxWidgets COMPONENTS gl html adv core net base QUIET)
endif( KICAD_AUIMANAGER OR KICAD_AUITOOLBAR )
check_find_package_result(wxWidgets_FOUND "wxWidgets") check_find_package_result(wxWidgets_FOUND "wxWidgets")
...@@ -129,6 +144,7 @@ include(${wxWidgets_USE_FILE}) ...@@ -129,6 +144,7 @@ include(${wxWidgets_USE_FILE})
# Include MinGW resource compiler. # Include MinGW resource compiler.
include(MinGWResourceCompiler) include(MinGWResourceCompiler)
# Generate build system specific header file. # Generate build system specific header file.
include(PerformFeatureChecks) include(PerformFeatureChecks)
perform_feature_checks() perform_feature_checks()
......
...@@ -49,4 +49,8 @@ ...@@ -49,4 +49,8 @@
#define strnicmp _strnicmp #define strnicmp _strnicmp
#endif #endif
#cmakedefine KICAD_AUIMANAGER 1
#cmakedefine KICAD_AUITOOLBAR 1
#endif /* __CONFIG_H__ */ #endif /* __CONFIG_H__ */
...@@ -116,7 +116,8 @@ WinEDA_DrawFrame::~WinEDA_DrawFrame() ...@@ -116,7 +116,8 @@ WinEDA_DrawFrame::~WinEDA_DrawFrame()
{ {
if( m_CurrentScreen != NULL ) if( m_CurrentScreen != NULL )
delete m_CurrentScreen; delete m_CurrentScreen;
#if KICAD_AUIMANAGER
#if defined(KICAD_AUIMANAGER)
m_auimgr.UnInit(); m_auimgr.UnInit();
#endif #endif
} }
...@@ -325,9 +326,10 @@ void WinEDA_DrawFrame::SetToolbars() ...@@ -325,9 +326,10 @@ void WinEDA_DrawFrame::SetToolbars()
/***************************************/ /***************************************/
{ {
DisplayUnitsMsg(); DisplayUnitsMsg();
#if KICAD_AUIMANAGER
if(m_auimgr.GetManagedWindow()) #if defined(KICAD_AUIMANAGER)
m_auimgr.Update(); if( m_auimgr.GetManagedWindow() )
m_auimgr.Update();
#endif #endif
} }
...@@ -398,7 +400,7 @@ void WinEDA_DrawFrame::OnSize( wxSizeEvent& SizeEv ) ...@@ -398,7 +400,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 !defined(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 );
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
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 #if defined(KICAD_AUITOOLBAR)
wxAuiToolBar( parent, id, wxDefaultPosition, wxDefaultSize, wxAuiToolBar( parent, id, wxDefaultPosition, wxDefaultSize,
wxAUI_TB_DEFAULT_STYLE | (horizontal ? wxAUI_TB_HORZ_LAYOUT : wxAUI_TB_VERTICAL)) wxAUI_TB_DEFAULT_STYLE | (horizontal ? wxAUI_TB_HORZ_LAYOUT : wxAUI_TB_VERTICAL))
#else #else
......
...@@ -181,9 +181,10 @@ WinEDA_CvpcbFrame::WinEDA_CvpcbFrame( const wxString& title, long style ) : ...@@ -181,9 +181,10 @@ 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
#if defined(KICAD_AUIMANAGER)
m_auimgr.SetManagedWindow(this); m_auimgr.SetManagedWindow(this);
wxAuiPaneInfo horiz; wxAuiPaneInfo horiz;
horiz.Gripper(false); horiz.Gripper(false);
horiz.DockFixed(true); horiz.DockFixed(true);
...@@ -191,15 +192,15 @@ WinEDA_CvpcbFrame::WinEDA_CvpcbFrame( const wxString& title, long style ) : ...@@ -191,15 +192,15 @@ WinEDA_CvpcbFrame::WinEDA_CvpcbFrame( const wxString& title, long style ) :
horiz.Floatable(false); horiz.Floatable(false);
horiz.CloseButton(false); horiz.CloseButton(false);
horiz.CaptionVisible(false); horiz.CaptionVisible(false);
wxAuiPaneInfo vert(horiz); wxAuiPaneInfo vert(horiz);
vert.TopDockable(false).BottomDockable(false); vert.TopDockable(false).BottomDockable(false);
horiz.LeftDockable(false).RightDockable(false); horiz.LeftDockable(false).RightDockable(false);
m_auimgr.AddPane(m_HToolBar, m_auimgr.AddPane(m_HToolBar,
wxAuiPaneInfo(horiz).Name(wxT("m_HToolBar")).Top()); wxAuiPaneInfo(horiz).Name(wxT("m_HToolBar")).Top());
m_auimgr.AddPane(m_FootprintList, m_auimgr.AddPane(m_FootprintList,
wxAuiPaneInfo(horiz).Name(wxT("m_FootprintList")).Left().BestSize(m_FrameSize.x * 0.3 ,m_FrameSize.y * 0.9)); wxAuiPaneInfo(horiz).Name(wxT("m_FootprintList")).Left().BestSize(m_FrameSize.x * 0.3 ,m_FrameSize.y * 0.9));
...@@ -224,9 +225,9 @@ WinEDA_CvpcbFrame::~WinEDA_CvpcbFrame() ...@@ -224,9 +225,9 @@ WinEDA_CvpcbFrame::~WinEDA_CvpcbFrame()
config->Write( wxT( FILTERFOOTPRINTKEY ), state ); config->Write( wxT( FILTERFOOTPRINTKEY ), state );
} }
#if KICAD_AUIMANAGER #if defined(KICAD_AUIMANAGER)
m_auimgr.UnInit(); m_auimgr.UnInit();
#endif #endif
} }
......
...@@ -23,7 +23,7 @@ void WinEDA_CvpcbFrame::ReCreateHToolbar() ...@@ -23,7 +23,7 @@ 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 );
#if !KICAD_AUIMANAGER #if !defined(KICAD_AUIMANAGER)
SetToolBar( (wxToolBar *)m_HToolBar ); SetToolBar( (wxToolBar *)m_HToolBar );
#endif #endif
m_HToolBar->AddTool( ID_CVPCB_READ_INPUT_NETLIST, wxEmptyString, m_HToolBar->AddTool( ID_CVPCB_READ_INPUT_NETLIST, wxEmptyString,
......
...@@ -188,7 +188,7 @@ WinEDA_LibeditFrame::WinEDA_LibeditFrame( wxWindow* father, ...@@ -188,7 +188,7 @@ WinEDA_LibeditFrame::WinEDA_LibeditFrame( wxWindow* father,
Zoom_Automatique( false ); Zoom_Automatique( false );
Show( true ); Show( true );
#if KICAD_AUIMANAGER #if defined(KICAD_AUIMANAGER)
m_auimgr.SetManagedWindow( this ); m_auimgr.SetManagedWindow( this );
wxAuiPaneInfo horiz; wxAuiPaneInfo horiz;
......
...@@ -190,7 +190,7 @@ WinEDA_SchematicFrame::WinEDA_SchematicFrame( wxWindow* father, ...@@ -190,7 +190,7 @@ WinEDA_SchematicFrame::WinEDA_SchematicFrame( wxWindow* father,
ReCreateVToolbar(); ReCreateVToolbar();
ReCreateOptToolbar(); ReCreateOptToolbar();
#if KICAD_AUIMANAGER #if defined(KICAD_AUIMANAGER)
m_auimgr.SetManagedWindow( this ); m_auimgr.SetManagedWindow( this );
wxAuiPaneInfo horiz; wxAuiPaneInfo horiz;
......
...@@ -94,7 +94,7 @@ void WinEDA_LibeditFrame::ReCreateHToolbar() ...@@ -94,7 +94,7 @@ 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 );
#if !KICAD_AUIMANAGER #if !defined(KICAD_AUIMANAGER)
SetToolBar( (wxToolBar*)m_HToolBar ); SetToolBar( (wxToolBar*)m_HToolBar );
#endif #endif
// Set up toolbar // Set up toolbar
......
...@@ -25,7 +25,7 @@ void WinEDA_SchematicFrame::ReCreateHToolbar() ...@@ -25,7 +25,7 @@ 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 );
#if !KICAD_AUIMANAGER #if !defined(KICAD_AUIMANAGER)
SetToolBar( (wxToolBar*)m_HToolBar ); SetToolBar( (wxToolBar*)m_HToolBar );
#endif #endif
......
...@@ -28,7 +28,7 @@ void WinEDA_ViewlibFrame::ReCreateHToolbar() ...@@ -28,7 +28,7 @@ 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 );
#if !KICAD_AUIMANAGER #if !defined(KICAD_AUIMANAGER)
SetToolBar( (wxToolBar*)m_HToolBar ); SetToolBar( (wxToolBar*)m_HToolBar );
#endif #endif
......
...@@ -123,7 +123,7 @@ WinEDA_ViewlibFrame::WinEDA_ViewlibFrame( wxWindow* father, ...@@ -123,7 +123,7 @@ WinEDA_ViewlibFrame::WinEDA_ViewlibFrame( wxWindow* father,
wxPoint win_pos( 0, 0 ); wxPoint win_pos( 0, 0 );
#if !KICAD_AUIMANAGER #if !defined(KICAD_AUIMANAGER)
if( Library == NULL ) if( Library == NULL )
{ {
// Creates the libraries window display // Creates the libraries window display
...@@ -201,7 +201,7 @@ WinEDA_ViewlibFrame::WinEDA_ViewlibFrame( wxWindow* father, ...@@ -201,7 +201,7 @@ WinEDA_ViewlibFrame::WinEDA_ViewlibFrame( wxWindow* father,
Zoom_Automatique( false ); Zoom_Automatique( false );
Show( TRUE ); Show( TRUE );
#if KICAD_AUIMANAGER #if defined(KICAD_AUIMANAGER)
m_auimgr.SetManagedWindow( this ); m_auimgr.SetManagedWindow( this );
wxAuiPaneInfo horiz; wxAuiPaneInfo horiz;
...@@ -343,7 +343,7 @@ void WinEDA_ViewlibFrame::OnSize( wxSizeEvent& SizeEv ) ...@@ -343,7 +343,7 @@ void WinEDA_ViewlibFrame::OnSize( wxSizeEvent& SizeEv )
wxSize( EXTRA_BORDER_SIZE * 2, 0 ) ); wxSize( EXTRA_BORDER_SIZE * 2, 0 ) );
} }
#if KICAD_AUIMANAGER #if defined(KICAD_AUIMANAGER)
if( m_auimgr.GetManagedWindow() ) if( m_auimgr.GetManagedWindow() )
m_auimgr.Update(); m_auimgr.Update();
#endif #endif
......
...@@ -156,7 +156,7 @@ WinEDA_GerberFrame::WinEDA_GerberFrame( wxWindow* father, ...@@ -156,7 +156,7 @@ WinEDA_GerberFrame::WinEDA_GerberFrame( wxWindow* father,
ReCreateHToolbar(); ReCreateHToolbar();
ReCreateVToolbar(); ReCreateVToolbar();
ReCreateOptToolbar(); ReCreateOptToolbar();
#if KICAD_AUIMANAGER #if defined(KICAD_AUIMANAGER)
m_auimgr.SetManagedWindow(this); m_auimgr.SetManagedWindow(this);
wxAuiPaneInfo horiz; wxAuiPaneInfo horiz;
...@@ -321,7 +321,7 @@ void WinEDA_GerberFrame::SetToolbars() ...@@ -321,7 +321,7 @@ void WinEDA_GerberFrame::SetToolbars()
} }
DisplayUnitsMsg(); DisplayUnitsMsg();
#if KICAD_AUIMANAGER #if defined(KICAD_AUIMANAGER)
if(m_auimgr.GetManagedWindow()) if(m_auimgr.GetManagedWindow())
m_auimgr.Update(); m_auimgr.Update();
#endif #endif
......
...@@ -161,7 +161,7 @@ void WinEDA_GerberFrame::ReCreateHToolbar( void ) ...@@ -161,7 +161,7 @@ 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 );
#if !KICAD_AUIMANAGER #if !defined(KICAD_AUIMANAGER)
SetToolBar( (wxToolBar*)m_HToolBar ); SetToolBar( (wxToolBar*)m_HToolBar );
#endif #endif
// Set up toolbar // Set up toolbar
......
...@@ -6,12 +6,6 @@ ...@@ -6,12 +6,6 @@
#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>
...@@ -21,7 +15,7 @@ ...@@ -21,7 +15,7 @@
#include <wx/wxhtml.h> #include <wx/wxhtml.h>
#include <wx/laywin.h> #include <wx/laywin.h>
#if defined(KICAD_AUIMANAGER) #if defined(KICAD_AUIMANAGER) || defined(KICAD_AUITOOLBAR)
#include <wx/aui/aui.h> #include <wx/aui/aui.h>
#endif #endif
...@@ -656,7 +650,7 @@ public: ...@@ -656,7 +650,7 @@ public:
/* class WinEDA_Toolbar */ /* class WinEDA_Toolbar */
/*************************/ /*************************/
#if KICAD_AUITOOLBAR #if defined(KICAD_AUITOOLBAR)
class WinEDA_Toolbar : public wxAuiToolBar class WinEDA_Toolbar : public wxAuiToolBar
#else #else
class WinEDA_Toolbar : public wxToolBar class WinEDA_Toolbar : public wxToolBar
...@@ -674,19 +668,20 @@ public: ...@@ -674,19 +668,20 @@ public:
wxWindowID id, bool horizontal ); wxWindowID id, bool horizontal );
WinEDA_Toolbar* Next() { return Pnext; } WinEDA_Toolbar* Next() { return Pnext; }
#if KICAD_AUITOOLBAR #if defined(KICAD_AUITOOLBAR)
bool GetToolState(int toolId) {return GetToolToggled(toolId); }; bool GetToolState( int toolId ) { return GetToolToggled(toolId); };
void AddRadioTool(int toolid, const wxString& label, const wxBitmap& bitmap, void AddRadioTool( int toolid, const wxString& label, const wxBitmap& bitmap,
const wxBitmap& bmpDisabled = wxNullBitmap, const wxBitmap& bmpDisabled = wxNullBitmap,
const wxString& shortHelp = wxEmptyString, const wxString& shortHelp = wxEmptyString,
const wxString& longHelp = wxEmptyString, const wxString& longHelp = wxEmptyString,
wxObject *data = NULL) { wxObject *data = NULL )
AddTool( toolid, label, bitmap, bmpDisabled, wxITEM_CHECK, shortHelp, longHelp, data); {
AddTool( toolid, label, bitmap, bmpDisabled, wxITEM_CHECK, shortHelp, longHelp, data );
}; };
void SetToolNormalBitmap(int id, const wxBitmap& bitmap) {}; void SetToolNormalBitmap( int id, const wxBitmap& bitmap ) {};
void SetRows(int nRows) {}; void SetRows( int nRows ) {};
#endif #endif
}; };
......
...@@ -19,7 +19,7 @@ BEGIN_EVENT_TABLE( WinEDA_MainFrame, WinEDA_BasicFrame ) ...@@ -19,7 +19,7 @@ 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 #if !defined(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 )
...@@ -253,7 +253,7 @@ void WinEDA_MainFrame::RecreateBaseHToolbar() ...@@ -253,7 +253,7 @@ 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 );
#if !KICAD_AUIMANAGER #if !defined(KICAD_AUIMANAGER)
SetToolBar( (wxToolBar*)m_HToolBar ); SetToolBar( (wxToolBar*)m_HToolBar );
#endif #endif
// Set up toolbar // Set up toolbar
......
...@@ -70,7 +70,7 @@ WinEDA_MainFrame::WinEDA_MainFrame( wxWindow* parent, ...@@ -70,7 +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 #if !defined(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,
...@@ -105,7 +105,7 @@ WinEDA_MainFrame::WinEDA_MainFrame( wxWindow* parent, ...@@ -105,7 +105,7 @@ WinEDA_MainFrame::WinEDA_MainFrame( wxWindow* parent,
PyHandler::GetInstance()->DeclareEvent( wxT( "kicad::LoadProject" ) ); PyHandler::GetInstance()->DeclareEvent( wxT( "kicad::LoadProject" ) );
#endif #endif
#if KICAD_AUIMANAGER #if defined(KICAD_AUIMANAGER)
RecreateBaseHToolbar(); RecreateBaseHToolbar();
m_auimgr.SetManagedWindow(this); m_auimgr.SetManagedWindow(this);
...@@ -143,7 +143,7 @@ WinEDA_MainFrame::WinEDA_MainFrame( wxWindow* parent, ...@@ -143,7 +143,7 @@ WinEDA_MainFrame::WinEDA_MainFrame( wxWindow* parent,
WinEDA_MainFrame::~WinEDA_MainFrame() WinEDA_MainFrame::~WinEDA_MainFrame()
/*****************************************************************************/ /*****************************************************************************/
{ {
#if KICAD_AUIMANAGER #if defined(KICAD_AUIMANAGER)
m_auimgr.UnInit(); m_auimgr.UnInit();
#endif #endif
} }
...@@ -236,7 +236,7 @@ void WinEDA_MainFrame::OnSize( wxSizeEvent& event ) ...@@ -236,7 +236,7 @@ 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 defined(KICAD_AUIMANAGER)
if(m_auimgr.GetManagedWindow()) if(m_auimgr.GetManagedWindow())
m_auimgr.Update(); m_auimgr.Update();
#endif #endif
......
...@@ -277,7 +277,7 @@ void WinEDA_PcbFrame::OnSelectOptionToolbar( wxCommandEvent& event ) ...@@ -277,7 +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 !defined(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
......
...@@ -192,7 +192,7 @@ WinEDA_ModuleEditFrame::WinEDA_ModuleEditFrame( wxWindow* father, ...@@ -192,7 +192,7 @@ WinEDA_ModuleEditFrame::WinEDA_ModuleEditFrame( wxWindow* father,
if( DrawPanel ) if( DrawPanel )
DrawPanel->m_Block_Enable = TRUE; DrawPanel->m_Block_Enable = TRUE;
#if KICAD_AUIMANAGER #if defined(KICAD_AUIMANAGER)
m_auimgr.SetManagedWindow(this); m_auimgr.SetManagedWindow(this);
wxAuiPaneInfo horiz; wxAuiPaneInfo horiz;
...@@ -407,7 +407,7 @@ void WinEDA_ModuleEditFrame::SetToolbars() ...@@ -407,7 +407,7 @@ void WinEDA_ModuleEditFrame::SetToolbars()
} }
DisplayUnitsMsg(); DisplayUnitsMsg();
#if KICAD_AUIMANAGER #if defined(KICAD_AUIMANAGER)
if(m_auimgr.GetManagedWindow()) if(m_auimgr.GetManagedWindow())
m_auimgr.Update(); m_auimgr.Update();
#endif #endif
......
...@@ -264,9 +264,9 @@ WinEDA_PcbFrame::WinEDA_PcbFrame( wxWindow* father, ...@@ -264,9 +264,9 @@ WinEDA_PcbFrame::WinEDA_PcbFrame( wxWindow* father,
if( m_show_microwave_tools ) if( m_show_microwave_tools )
ReCreateAuxVToolbar(); ReCreateAuxVToolbar();
#if KICAD_AUIMANAGER #if defined(KICAD_AUIMANAGER)
m_auimgr.SetManagedWindow(this); m_auimgr.SetManagedWindow(this);
wxAuiPaneInfo horiz; wxAuiPaneInfo horiz;
horiz.Gripper(false); horiz.Gripper(false);
horiz.DockFixed(true); horiz.DockFixed(true);
...@@ -295,10 +295,10 @@ WinEDA_PcbFrame::WinEDA_PcbFrame( wxWindow* father, ...@@ -295,10 +295,10 @@ WinEDA_PcbFrame::WinEDA_PcbFrame( wxWindow* father,
m_auimgr.AddPane(m_OptionsToolBar, m_auimgr.AddPane(m_OptionsToolBar,
wxAuiPaneInfo(vert).Name(wxT("m_OptionsToolBar")).Left()); wxAuiPaneInfo(vert).Name(wxT("m_OptionsToolBar")).Left());
m_auimgr.AddPane(DrawPanel, m_auimgr.AddPane(DrawPanel,
wxAuiPaneInfo().Name(wxT("DrawFrame")).CentrePane()); wxAuiPaneInfo().Name(wxT("DrawFrame")).CentrePane());
m_auimgr.AddPane(MsgPanel, m_auimgr.AddPane(MsgPanel,
wxAuiPaneInfo(horiz).Name(wxT("MsgPanel")).Bottom()); wxAuiPaneInfo(horiz).Name(wxT("MsgPanel")).Bottom());
m_auimgr.Update(); m_auimgr.Update();
......
...@@ -33,7 +33,7 @@ void WinEDA_ModuleEditFrame::ReCreateHToolbar() ...@@ -33,7 +33,7 @@ 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 #if !defined(KICAD_AUIMANAGER)
SetToolBar( (wxToolBar*) m_HToolBar ); SetToolBar( (wxToolBar*) m_HToolBar );
#endif #endif
// Set up toolbar // Set up toolbar
......
...@@ -196,7 +196,7 @@ void WinEDA_PcbFrame::ReCreateHToolbar() ...@@ -196,7 +196,7 @@ 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 #if !defined(KICAD_AUIMANAGER)
SetToolBar( (wxToolBar*)m_HToolBar ); SetToolBar( (wxToolBar*)m_HToolBar );
#endif #endif
// Set up toolbar // Set up toolbar
......
...@@ -275,7 +275,7 @@ void WinEDA_PcbFrame::SetToolbars() ...@@ -275,7 +275,7 @@ void WinEDA_PcbFrame::SetToolbars()
_( "Hide invisible text" ) : _( "Hide invisible text" ) :
_( "Show invisible text" ) ); _( "Show invisible text" ) );
#if !KICAD_AUIMANAGER #if !defined(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 #else
...@@ -290,7 +290,7 @@ void WinEDA_PcbFrame::SetToolbars() ...@@ -290,7 +290,7 @@ void WinEDA_PcbFrame::SetToolbars()
UpdateToolbarLayerInfo(); UpdateToolbarLayerInfo();
PrepareLayerIndicator(); PrepareLayerIndicator();
DisplayUnitsMsg(); DisplayUnitsMsg();
#if KICAD_AUIMANAGER #if defined(KICAD_AUIMANAGER)
if(m_auimgr.GetManagedWindow()) if(m_auimgr.GetManagedWindow())
m_auimgr.Update(); m_auimgr.Update();
#endif #endif
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment