Commit 0cedcb87 authored by Wayne Stambaugh's avatar Wayne Stambaugh

Coding policy fixes.

parent bf44999a
...@@ -19,7 +19,7 @@ void WinEDA3D_DrawFrame::ReCreateHToolbar() ...@@ -19,7 +19,7 @@ void WinEDA3D_DrawFrame::ReCreateHToolbar()
} }
m_HToolBar = new WinEDA_Toolbar( TOOLBAR_MAIN, this, ID_H_TOOLBAR, TRUE ); m_HToolBar = new EDA_TOOLBAR( TOOLBAR_MAIN, this, ID_H_TOOLBAR, TRUE );
// Set up toolbar // Set up toolbar
m_HToolBar->AddTool( ID_RELOAD3D_BOARD, wxEmptyString, m_HToolBar->AddTool( ID_RELOAD3D_BOARD, wxEmptyString,
......
...@@ -208,8 +208,8 @@ private: ...@@ -208,8 +208,8 @@ private:
wxString m_FrameName; // name used for writing and reading setup wxString m_FrameName; // name used for writing and reading setup
// It is "Frame3D" // It is "Frame3D"
Pcb3D_GLCanvas* m_Canvas; Pcb3D_GLCanvas* m_Canvas;
WinEDA_Toolbar* m_HToolBar; EDA_TOOLBAR* m_HToolBar;
WinEDA_Toolbar* m_VToolBar; EDA_TOOLBAR* m_VToolBar;
int m_InternalUnits; int m_InternalUnits;
wxPoint m_FramePos; wxPoint m_FramePos;
wxSize m_FrameSize; wxSize m_FrameSize;
......
...@@ -20,11 +20,10 @@ ...@@ -20,11 +20,10 @@
* *
*/ */
LAYER_BOX_SELECTOR::LAYER_BOX_SELECTOR( WinEDA_Toolbar* parent, wxWindowID id, LAYER_BOX_SELECTOR::LAYER_BOX_SELECTOR( EDA_TOOLBAR* parent, wxWindowID id,
const wxPoint& pos, const wxSize& size, const wxPoint& pos, const wxSize& size,
int n, const wxString choices[] ) : int n, const wxString choices[] ) :
wxBitmapComboBox( parent, id, wxEmptyString, pos, size, wxBitmapComboBox( parent, id, wxEmptyString, pos, size, n, choices, wxCB_READONLY )
n, choices, wxCB_READONLY )
{ {
m_layerorder = true; m_layerorder = true;
m_layerhotkeys = true; m_layerhotkeys = true;
...@@ -35,11 +34,10 @@ LAYER_BOX_SELECTOR::LAYER_BOX_SELECTOR( WinEDA_Toolbar* parent, wxWindowID id, ...@@ -35,11 +34,10 @@ LAYER_BOX_SELECTOR::LAYER_BOX_SELECTOR( WinEDA_Toolbar* parent, wxWindowID id,
} }
LAYER_BOX_SELECTOR::LAYER_BOX_SELECTOR( WinEDA_Toolbar* parent, wxWindowID id, LAYER_BOX_SELECTOR::LAYER_BOX_SELECTOR( EDA_TOOLBAR* parent, wxWindowID id,
const wxPoint& pos, const wxSize& size, const wxPoint& pos, const wxSize& size,
const wxArrayString& choices ) : const wxArrayString& choices ) :
wxBitmapComboBox( parent, id, wxEmptyString, pos, size, wxBitmapComboBox( parent, id, wxEmptyString, pos, size, choices, wxCB_READONLY )
choices, wxCB_READONLY )
{ {
m_layerorder = true; m_layerorder = true;
m_layerhotkeys = true; m_layerhotkeys = true;
......
...@@ -10,8 +10,7 @@ ...@@ -10,8 +10,7 @@
#include "wxstruct.h" #include "wxstruct.h"
WinEDA_Toolbar::WinEDA_Toolbar( id_toolbar type, wxWindow * parent, EDA_TOOLBAR::EDA_TOOLBAR( id_toolbar type, wxWindow * parent, wxWindowID id, bool horizontal ):
wxWindowID id, bool horizontal ):
wxAuiToolBar( parent, id, wxDefaultPosition, wxDefaultSize, wxAuiToolBar( parent, id, wxDefaultPosition, wxDefaultSize,
wxAUI_TB_DEFAULT_STYLE | ( ( horizontal ) ? wxAUI_TB_DEFAULT_STYLE | ( ( horizontal ) ?
wxAUI_TB_HORZ_LAYOUT : wxAUI_TB_HORZ_LAYOUT :
...@@ -28,7 +27,7 @@ WinEDA_Toolbar::WinEDA_Toolbar( id_toolbar type, wxWindow * parent, ...@@ -28,7 +27,7 @@ WinEDA_Toolbar::WinEDA_Toolbar( id_toolbar type, wxWindow * parent,
} }
int WinEDA_Toolbar::GetDimension( ) int EDA_TOOLBAR::GetDimension( )
{ {
if( m_Horizontal ) if( m_Horizontal )
return GetSize().y; return GetSize().y;
......
...@@ -158,7 +158,7 @@ void DISPLAY_FOOTPRINTS_FRAME::ReCreateOptToolbar() ...@@ -158,7 +158,7 @@ void DISPLAY_FOOTPRINTS_FRAME::ReCreateOptToolbar()
return; return;
// Create options tool bar. // Create options tool bar.
m_OptionsToolBar = new WinEDA_Toolbar( TOOLBAR_OPTION, this, ID_OPT_TOOLBAR, false ); m_OptionsToolBar = new EDA_TOOLBAR( TOOLBAR_OPTION, this, ID_OPT_TOOLBAR, false );
m_OptionsToolBar->AddTool( ID_TB_OPTIONS_SHOW_GRID, wxEmptyString, wxBitmap( grid_xpm ), m_OptionsToolBar->AddTool( ID_TB_OPTIONS_SHOW_GRID, wxEmptyString, wxBitmap( grid_xpm ),
_( "Hide grid" ), wxITEM_CHECK ); _( "Hide grid" ), wxITEM_CHECK );
...@@ -201,7 +201,7 @@ void DISPLAY_FOOTPRINTS_FRAME::ReCreateHToolbar() ...@@ -201,7 +201,7 @@ void DISPLAY_FOOTPRINTS_FRAME::ReCreateHToolbar()
if( m_HToolBar != NULL ) if( m_HToolBar != NULL )
return; return;
m_HToolBar = new WinEDA_Toolbar( TOOLBAR_MAIN, this, ID_H_TOOLBAR, true ); m_HToolBar = new EDA_TOOLBAR( TOOLBAR_MAIN, this, ID_H_TOOLBAR, true );
m_HToolBar->AddTool( ID_OPTIONS_SETUP, wxEmptyString, wxBitmap( display_options_xpm ), m_HToolBar->AddTool( ID_OPTIONS_SETUP, wxEmptyString, wxBitmap( display_options_xpm ),
_( "Display options" ) ); _( "Display options" ) );
......
...@@ -29,7 +29,7 @@ public: ...@@ -29,7 +29,7 @@ public:
FOOTPRINTS_LISTBOX* m_FootprintList; FOOTPRINTS_LISTBOX* m_FootprintList;
COMPONENTS_LISTBOX* m_ListCmp; COMPONENTS_LISTBOX* m_ListCmp;
DISPLAY_FOOTPRINTS_FRAME* DrawFrame; DISPLAY_FOOTPRINTS_FRAME* DrawFrame;
WinEDA_Toolbar* m_HToolBar; EDA_TOOLBAR* m_HToolBar;
wxFileName m_NetlistFileName; wxFileName m_NetlistFileName;
wxArrayString m_ModuleLibNames; wxArrayString m_ModuleLibNames;
wxArrayString m_AliasLibNames; wxArrayString m_AliasLibNames;
......
...@@ -19,7 +19,7 @@ void CVPCB_MAINFRAME::ReCreateHToolbar() ...@@ -19,7 +19,7 @@ void CVPCB_MAINFRAME::ReCreateHToolbar()
if( m_HToolBar != NULL ) if( m_HToolBar != NULL )
return; return;
m_HToolBar = new WinEDA_Toolbar( TOOLBAR_MAIN, this, ID_H_TOOLBAR, TRUE ); m_HToolBar = new EDA_TOOLBAR( TOOLBAR_MAIN, this, ID_H_TOOLBAR, TRUE );
m_HToolBar->AddTool( ID_CVPCB_READ_INPUT_NETLIST, wxEmptyString, m_HToolBar->AddTool( ID_CVPCB_READ_INPUT_NETLIST, wxEmptyString,
wxBitmap( open_document_xpm ), wxBitmap( open_document_xpm ),
......
...@@ -32,7 +32,7 @@ void LIB_EDIT_FRAME::ReCreateVToolbar() ...@@ -32,7 +32,7 @@ void LIB_EDIT_FRAME::ReCreateVToolbar()
if( m_VToolBar != NULL ) if( m_VToolBar != NULL )
return; return;
m_VToolBar = new WinEDA_Toolbar( TOOLBAR_TOOL, this, ID_V_TOOLBAR, false ); m_VToolBar = new EDA_TOOLBAR( TOOLBAR_TOOL, this, ID_V_TOOLBAR, false );
// Set up toolbar // Set up toolbar
m_VToolBar->AddTool( ID_NO_TOOL_SELECTED, wxEmptyString, wxBitmap( cursor_xpm ), m_VToolBar->AddTool( ID_NO_TOOL_SELECTED, wxEmptyString, wxBitmap( cursor_xpm ),
...@@ -80,7 +80,7 @@ void LIB_EDIT_FRAME::ReCreateHToolbar() ...@@ -80,7 +80,7 @@ void LIB_EDIT_FRAME::ReCreateHToolbar()
if( m_HToolBar != NULL ) if( m_HToolBar != NULL )
return; return;
m_HToolBar = new WinEDA_Toolbar( TOOLBAR_MAIN, this, ID_H_TOOLBAR, true ); m_HToolBar = new EDA_TOOLBAR( TOOLBAR_MAIN, this, ID_H_TOOLBAR, true );
// Set up toolbar // Set up toolbar
m_HToolBar->AddTool( ID_LIBEDIT_SAVE_CURRENT_LIB, wxEmptyString, wxBitmap( save_library_xpm ), m_HToolBar->AddTool( ID_LIBEDIT_SAVE_CURRENT_LIB, wxEmptyString, wxBitmap( save_library_xpm ),
...@@ -187,7 +187,7 @@ void LIB_EDIT_FRAME::CreateOptionToolbar() ...@@ -187,7 +187,7 @@ void LIB_EDIT_FRAME::CreateOptionToolbar()
if( m_OptionsToolBar ) if( m_OptionsToolBar )
return; return;
m_OptionsToolBar = new WinEDA_Toolbar( TOOLBAR_OPTION, this, ID_OPT_TOOLBAR, false ); m_OptionsToolBar = new EDA_TOOLBAR( TOOLBAR_OPTION, this, ID_OPT_TOOLBAR, false );
m_OptionsToolBar->AddTool( ID_TB_OPTIONS_SHOW_GRID, wxEmptyString, wxBitmap( grid_xpm ), m_OptionsToolBar->AddTool( ID_TB_OPTIONS_SHOW_GRID, wxEmptyString, wxBitmap( grid_xpm ),
_( "Turn grid off" ), wxITEM_CHECK ); _( "Turn grid off" ), wxITEM_CHECK );
......
...@@ -25,7 +25,7 @@ void SCH_EDIT_FRAME::ReCreateHToolbar() ...@@ -25,7 +25,7 @@ void SCH_EDIT_FRAME::ReCreateHToolbar()
return; return;
wxString msg; wxString msg;
m_HToolBar = new WinEDA_Toolbar( TOOLBAR_MAIN, this, ID_H_TOOLBAR, TRUE ); m_HToolBar = new EDA_TOOLBAR( TOOLBAR_MAIN, this, ID_H_TOOLBAR, TRUE );
// 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 ),
...@@ -126,7 +126,7 @@ void SCH_EDIT_FRAME::ReCreateVToolbar() ...@@ -126,7 +126,7 @@ void SCH_EDIT_FRAME::ReCreateVToolbar()
if( m_VToolBar ) if( m_VToolBar )
return; return;
m_VToolBar = new WinEDA_Toolbar( TOOLBAR_TOOL, this, ID_V_TOOLBAR, false ); m_VToolBar = new EDA_TOOLBAR( TOOLBAR_TOOL, this, ID_V_TOOLBAR, false );
// Set up toolbar // Set up toolbar
m_VToolBar->AddTool( ID_NO_TOOL_SELECTED, wxEmptyString, wxBitmap( cursor_xpm ), m_VToolBar->AddTool( ID_NO_TOOL_SELECTED, wxEmptyString, wxBitmap( cursor_xpm ),
...@@ -202,7 +202,7 @@ void SCH_EDIT_FRAME::ReCreateOptToolbar() ...@@ -202,7 +202,7 @@ void SCH_EDIT_FRAME::ReCreateOptToolbar()
if( m_OptionsToolBar ) if( m_OptionsToolBar )
return; return;
m_OptionsToolBar = new WinEDA_Toolbar( TOOLBAR_OPTION, this, ID_OPT_TOOLBAR, false ); m_OptionsToolBar = new EDA_TOOLBAR( TOOLBAR_OPTION, this, ID_OPT_TOOLBAR, false );
m_OptionsToolBar->AddTool( ID_TB_OPTIONS_SHOW_GRID, wxEmptyString, m_OptionsToolBar->AddTool( ID_TB_OPTIONS_SHOW_GRID, wxEmptyString,
wxBitmap( grid_xpm ), wxBitmap( grid_xpm ),
......
...@@ -28,7 +28,7 @@ void LIB_VIEW_FRAME::ReCreateHToolbar() ...@@ -28,7 +28,7 @@ void LIB_VIEW_FRAME::ReCreateHToolbar()
if( m_HToolBar == NULL ) if( m_HToolBar == NULL )
{ {
m_HToolBar = new WinEDA_Toolbar( TOOLBAR_MAIN, this, ID_H_TOOLBAR, true ); m_HToolBar = new EDA_TOOLBAR( TOOLBAR_MAIN, this, ID_H_TOOLBAR, true );
// Set up toolbar // Set up toolbar
m_HToolBar->AddTool( ID_LIBVIEW_SELECT_LIB, wxEmptyString, m_HToolBar->AddTool( ID_LIBVIEW_SELECT_LIB, wxEmptyString,
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
/* Helper class for displaying DCodes list */ /* Helper class for displaying DCodes list */
/*******************************************/ /*******************************************/
DCODE_SELECTION_BOX::DCODE_SELECTION_BOX( WinEDA_Toolbar* aParent, wxWindowID aId, DCODE_SELECTION_BOX::DCODE_SELECTION_BOX( EDA_TOOLBAR* aParent, wxWindowID aId,
const wxPoint& aLocation, const wxSize& aSize, const wxPoint& aLocation, const wxSize& aSize,
const wxArrayString& aChoices ) : const wxArrayString& aChoices ) :
wxComboBox( aParent, aId, wxEmptyString, aLocation, aSize, 0, NULL, wxCB_READONLY ) wxComboBox( aParent, aId, wxEmptyString, aLocation, aSize, 0, NULL, wxCB_READONLY )
......
...@@ -14,7 +14,7 @@ class DCODE_SELECTION_BOX : public wxComboBox ...@@ -14,7 +14,7 @@ class DCODE_SELECTION_BOX : public wxComboBox
private: private:
const wxArrayString* m_dcodeList; const wxArrayString* m_dcodeList;
public: DCODE_SELECTION_BOX( WinEDA_Toolbar* aParent, wxWindowID aId, public: DCODE_SELECTION_BOX( EDA_TOOLBAR* aParent, wxWindowID aId,
const wxPoint& aLocation, const wxSize& aSize, const wxPoint& aLocation, const wxSize& aSize,
const wxArrayString& aChoices); const wxArrayString& aChoices);
~DCODE_SELECTION_BOX(); ~DCODE_SELECTION_BOX();
......
...@@ -31,7 +31,7 @@ void GERBVIEW_FRAME::ReCreateHToolbar( void ) ...@@ -31,7 +31,7 @@ void GERBVIEW_FRAME::ReCreateHToolbar( void )
gerber = g_GERBER_List[layer]; gerber = g_GERBER_List[layer];
} }
m_HToolBar = new WinEDA_Toolbar( TOOLBAR_MAIN, this, ID_H_TOOLBAR, TRUE ); m_HToolBar = new EDA_TOOLBAR( TOOLBAR_MAIN, this, ID_H_TOOLBAR, TRUE );
// Set up toolbar // Set up toolbar
m_HToolBar->AddTool( ID_GERBVIEW_ERASE_ALL, wxEmptyString, wxBitmap( gerbview_clear_layers_xpm ), m_HToolBar->AddTool( ID_GERBVIEW_ERASE_ALL, wxEmptyString, wxBitmap( gerbview_clear_layers_xpm ),
...@@ -109,7 +109,7 @@ void GERBVIEW_FRAME::ReCreateVToolbar( void ) ...@@ -109,7 +109,7 @@ void GERBVIEW_FRAME::ReCreateVToolbar( void )
if( m_VToolBar ) if( m_VToolBar )
return; return;
m_VToolBar = new WinEDA_Toolbar( TOOLBAR_TOOL, this, ID_V_TOOLBAR, FALSE ); m_VToolBar = new EDA_TOOLBAR( TOOLBAR_TOOL, this, ID_V_TOOLBAR, FALSE );
// Set up toolbar // Set up toolbar
m_VToolBar->AddTool( ID_NO_TOOL_SELECTED, wxEmptyString, wxBitmap( cursor_xpm ) ); m_VToolBar->AddTool( ID_NO_TOOL_SELECTED, wxEmptyString, wxBitmap( cursor_xpm ) );
...@@ -128,7 +128,7 @@ void GERBVIEW_FRAME::ReCreateOptToolbar( void ) ...@@ -128,7 +128,7 @@ void GERBVIEW_FRAME::ReCreateOptToolbar( void )
return; return;
// creation of tool bar options // creation of tool bar options
m_OptionsToolBar = new WinEDA_Toolbar( TOOLBAR_OPTION, this, ID_OPT_TOOLBAR, FALSE ); m_OptionsToolBar = new EDA_TOOLBAR( TOOLBAR_OPTION, this, ID_OPT_TOOLBAR, FALSE );
m_OptionsToolBar->AddTool( ID_TB_OPTIONS_SHOW_GRID, wxEmptyString, wxBitmap( grid_xpm ), m_OptionsToolBar->AddTool( ID_TB_OPTIONS_SHOW_GRID, wxEmptyString, wxBitmap( grid_xpm ),
_( "Turn grid off" ), wxITEM_CHECK ); _( "Turn grid off" ), wxITEM_CHECK );
......
...@@ -14,12 +14,12 @@ private: ...@@ -14,12 +14,12 @@ private:
bool m_layerhotkeys; bool m_layerhotkeys;
bool m_layerorder; bool m_layerorder;
public: public:
LAYER_BOX_SELECTOR( WinEDA_Toolbar* parent, wxWindowID id, LAYER_BOX_SELECTOR( EDA_TOOLBAR* parent, wxWindowID id,
const wxPoint& pos = wxDefaultPosition, const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize, const wxSize& size = wxDefaultSize,
int n = 0, const wxString choices[] = NULL ); int n = 0, const wxString choices[] = NULL );
LAYER_BOX_SELECTOR( WinEDA_Toolbar* parent, wxWindowID id, LAYER_BOX_SELECTOR( EDA_TOOLBAR* parent, wxWindowID id,
const wxPoint& pos, const wxSize& size, const wxPoint& pos, const wxSize& size,
const wxArrayString& choices ); const wxArrayString& choices );
......
...@@ -20,7 +20,6 @@ ...@@ -20,7 +20,6 @@
/* Forward declarations of classes. */ /* Forward declarations of classes. */
class WinEDA_Toolbar;
class WinEDA_CvpcbFrame; class WinEDA_CvpcbFrame;
class PCB_EDIT_FRAME; class PCB_EDIT_FRAME;
class WinEDA_ModuleEditFrame; class WinEDA_ModuleEditFrame;
......
...@@ -19,7 +19,6 @@ ...@@ -19,7 +19,6 @@
/* Forward declarations of classes. */ /* Forward declarations of classes. */
class PCB_SCREEN; class PCB_SCREEN;
class WinEDA_Toolbar;
class WinEDA_ModuleEditFrame; class WinEDA_ModuleEditFrame;
class BOARD; class BOARD;
class TEXTE_PCB; class TEXTE_PCB;
...@@ -332,7 +331,7 @@ public: ...@@ -332,7 +331,7 @@ public:
void ReCreateMicrowaveVToolbar(); void ReCreateMicrowaveVToolbar();
void ReCreateOptToolbar(); void ReCreateOptToolbar();
void ReCreateMenuBar(); void ReCreateMenuBar();
LAYER_BOX_SELECTOR* ReCreateLayerBox( WinEDA_Toolbar* parent ); LAYER_BOX_SELECTOR* ReCreateLayerBox( EDA_TOOLBAR* parent );
/** Virtual Function OnModify() /** Virtual Function OnModify()
* Must be called after a board change * Must be called after a board change
......
...@@ -29,8 +29,7 @@ ...@@ -29,8 +29,7 @@
#endif #endif
// Option for dialog boxes // Option for dialog boxes
#define DIALOG_STYLE wxDEFAULT_DIALOG_STYLE | wxFRAME_FLOAT_ON_PARENT | \ #define DIALOG_STYLE wxDEFAULT_DIALOG_STYLE | wxFRAME_FLOAT_ON_PARENT | MAYBE_RESIZE_BORDER
MAYBE_RESIZE_BORDER
#define KICAD_DEFAULT_DRAWFRAME_STYLE wxDEFAULT_FRAME_STYLE | wxWANTS_CHARS #define KICAD_DEFAULT_DRAWFRAME_STYLE wxDEFAULT_FRAME_STYLE | wxWANTS_CHARS
...@@ -39,7 +38,7 @@ class EDA_RECT; ...@@ -39,7 +38,7 @@ class EDA_RECT;
class EDA_DRAW_PANEL; class EDA_DRAW_PANEL;
class EDA_MSG_PANEL; class EDA_MSG_PANEL;
class BASE_SCREEN; class BASE_SCREEN;
class WinEDA_Toolbar; class EDA_TOOLBAR;
class WinEDAChoiceBox; class WinEDAChoiceBox;
class PARAM_CFG_BASE; class PARAM_CFG_BASE;
class Ki_PageDescr; class Ki_PageDescr;
...@@ -94,7 +93,7 @@ public: ...@@ -94,7 +93,7 @@ public:
wxSize m_FrameSize; wxSize m_FrameSize;
int m_MsgFrameHeight; int m_MsgFrameHeight;
WinEDA_Toolbar* m_HToolBar; // Standard horizontal Toolbar EDA_TOOLBAR* m_HToolBar; // Standard horizontal Toolbar
bool m_FrameIsActive; bool m_FrameIsActive;
wxString m_FrameName; // name used for writing and reading setup wxString m_FrameName; // name used for writing and reading setup
// It is "SchematicFrame", "PcbFrame" .... // It is "SchematicFrame", "PcbFrame" ....
...@@ -229,11 +228,11 @@ public: ...@@ -229,11 +228,11 @@ public:
EDA_DRAW_PANEL* DrawPanel; // Draw area EDA_DRAW_PANEL* DrawPanel; // Draw area
EDA_MSG_PANEL* MsgPanel; // Panel used to display some EDA_MSG_PANEL* MsgPanel; // Panel used to display some
// info (bottom of the screen) // info (bottom of the screen)
WinEDA_Toolbar* m_VToolBar; // Vertical (right side) Toolbar EDA_TOOLBAR* m_VToolBar; // Vertical (right side) Toolbar
WinEDA_Toolbar* m_AuxVToolBar; // Auxiliary Vertical (right side) EDA_TOOLBAR* m_AuxVToolBar; // Auxiliary Vertical (right side)
// Toolbar // Toolbar
WinEDA_Toolbar* m_OptionsToolBar; // Options Toolbar (left side) EDA_TOOLBAR* m_OptionsToolBar; // Options Toolbar (left side)
WinEDA_Toolbar* m_AuxiliaryToolBar; // Auxiliary Toolbar used in pcbnew EDA_TOOLBAR* m_AuxiliaryToolBar; // Auxiliary Toolbar used in pcbnew
WinEDAChoiceBox* m_SelGridBox; // Choice box to choose the grid WinEDAChoiceBox* m_SelGridBox; // Choice box to choose the grid
// size // size
...@@ -671,7 +670,6 @@ public: ...@@ -671,7 +670,6 @@ public:
EDA_MSG_PANEL( EDA_DRAW_FRAME* parent, int id, const wxPoint& pos, const wxSize& size ); EDA_MSG_PANEL( EDA_DRAW_FRAME* parent, int id, const wxPoint& pos, const wxSize& size );
~EDA_MSG_PANEL(); ~EDA_MSG_PANEL();
/** /**
* Function GetRequiredHeight * Function GetRequiredHeight
* returns the required height (in pixels) of a EDA_MSG_PANEL. This takes * returns the required height (in pixels) of a EDA_MSG_PANEL. This takes
...@@ -714,11 +712,12 @@ public: ...@@ -714,11 +712,12 @@ public:
DECLARE_EVENT_TABLE() DECLARE_EVENT_TABLE()
}; };
/*************************/
/* class WinEDA_Toolbar */
/*************************/
class WinEDA_Toolbar : public wxAuiToolBar /*********************/
/* class EDA_TOOLBAR */
/*********************/
class EDA_TOOLBAR : public wxAuiToolBar
{ {
public: public:
wxWindow* m_Parent; wxWindow* m_Parent;
...@@ -726,7 +725,7 @@ public: ...@@ -726,7 +725,7 @@ public:
bool m_Horizontal; // some auxiliary TB are horizontal, others vertical bool m_Horizontal; // some auxiliary TB are horizontal, others vertical
public: public:
WinEDA_Toolbar( id_toolbar type, wxWindow* parent, wxWindowID id, bool horizontal ); EDA_TOOLBAR( id_toolbar type, wxWindow* parent, wxWindowID id, bool horizontal );
bool GetToolState( int toolId ) { return GetToolToggled(toolId); }; bool GetToolState( int toolId ) { return GetToolToggled(toolId); };
......
...@@ -62,7 +62,7 @@ class WinEDA_MainFrame : public EDA_BASE_FRAME ...@@ -62,7 +62,7 @@ class WinEDA_MainFrame : public EDA_BASE_FRAME
public: public:
TREE_PROJECT_FRAME* m_LeftWin; TREE_PROJECT_FRAME* m_LeftWin;
RIGHT_KM_FRAME* m_RightWin; RIGHT_KM_FRAME* m_RightWin;
WinEDA_Toolbar* m_VToolBar; // Vertical toolbar (not used) EDA_TOOLBAR* m_VToolBar; // Vertical toolbar (not used)
wxString m_BoardFileName; wxString m_BoardFileName;
wxString m_SchematicRootFileName; wxString m_SchematicRootFileName;
wxFileName m_ProjectFileName; wxFileName m_ProjectFileName;
......
...@@ -11,56 +11,48 @@ ...@@ -11,56 +11,48 @@
/* Menubar and toolbar event table */ /* Menubar and toolbar event table */
BEGIN_EVENT_TABLE( WinEDA_MainFrame, EDA_BASE_FRAME ) BEGIN_EVENT_TABLE( WinEDA_MainFrame, EDA_BASE_FRAME )
/* Window events */ /* Window events */
EVT_SIZE( WinEDA_MainFrame::OnSize ) EVT_SIZE( WinEDA_MainFrame::OnSize )
EVT_CLOSE( WinEDA_MainFrame::OnCloseWindow ) EVT_CLOSE( WinEDA_MainFrame::OnCloseWindow )
/* Sash drag events */ /* Sash drag events */
EVT_SASH_DRAGGED( ID_LEFT_FRAME, WinEDA_MainFrame::OnSashDrag ) EVT_SASH_DRAGGED( ID_LEFT_FRAME, WinEDA_MainFrame::OnSashDrag )
/* 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 )
EVT_TOOL( ID_SAVE_PROJECT, WinEDA_MainFrame::OnSaveProject ) EVT_TOOL( ID_SAVE_PROJECT, WinEDA_MainFrame::OnSaveProject )
EVT_TOOL( ID_SAVE_AND_ZIP_FILES, WinEDA_MainFrame::OnArchiveFiles ) EVT_TOOL( ID_SAVE_AND_ZIP_FILES, WinEDA_MainFrame::OnArchiveFiles )
/* Menu events */ /* Menu events */
EVT_MENU( ID_SAVE_PROJECT, WinEDA_MainFrame::OnSaveProject ) EVT_MENU( ID_SAVE_PROJECT, WinEDA_MainFrame::OnSaveProject )
EVT_MENU( wxID_EXIT, WinEDA_MainFrame::OnExit ) EVT_MENU( wxID_EXIT, WinEDA_MainFrame::OnExit )
EVT_MENU( ID_TO_EDITOR, WinEDA_MainFrame::OnOpenTextEditor ) EVT_MENU( ID_TO_EDITOR, WinEDA_MainFrame::OnOpenTextEditor )
EVT_MENU( ID_BROWSE_AN_SELECT_FILE, EVT_MENU( ID_BROWSE_AN_SELECT_FILE, WinEDA_MainFrame::OnOpenFileInTextEditor )
WinEDA_MainFrame::OnOpenFileInTextEditor ) EVT_MENU( ID_SELECT_PREFERED_EDITOR, EDA_BASE_FRAME::OnSelectPreferredEditor )
EVT_MENU( ID_SELECT_PREFERED_EDITOR, EVT_MENU( ID_SELECT_DEFAULT_PDF_BROWSER, WinEDA_MainFrame::OnSelectDefaultPdfBrowser )
EDA_BASE_FRAME::OnSelectPreferredEditor ) EVT_MENU( ID_SELECT_PREFERED_PDF_BROWSER, WinEDA_MainFrame::OnSelectPreferredPdfBrowser )
EVT_MENU( ID_SELECT_DEFAULT_PDF_BROWSER, EVT_MENU( ID_SELECT_PREFERED_PDF_BROWSER_NAME, WinEDA_MainFrame::OnSelectPreferredPdfBrowser )
WinEDA_MainFrame::OnSelectDefaultPdfBrowser ) EVT_MENU( ID_SAVE_AND_ZIP_FILES, WinEDA_MainFrame::OnArchiveFiles )
EVT_MENU( ID_SELECT_PREFERED_PDF_BROWSER, EVT_MENU( ID_READ_ZIP_ARCHIVE, WinEDA_MainFrame::OnUnarchiveFiles )
WinEDA_MainFrame::OnSelectPreferredPdfBrowser ) EVT_MENU( ID_PROJECT_TREE_REFRESH, WinEDA_MainFrame::OnRefresh )
EVT_MENU( ID_SELECT_PREFERED_PDF_BROWSER_NAME, EVT_MENU( ID_GENERAL_HELP, WinEDA_MainFrame::GetKicadHelp )
WinEDA_MainFrame::OnSelectPreferredPdfBrowser ) EVT_MENU( wxID_ABOUT, WinEDA_MainFrame::GetKicadAbout )
EVT_MENU( ID_SAVE_AND_ZIP_FILES, WinEDA_MainFrame::OnArchiveFiles )
EVT_MENU( ID_READ_ZIP_ARCHIVE, WinEDA_MainFrame::OnUnarchiveFiles ) /* Range menu events */
EVT_MENU( ID_PROJECT_TREE_REFRESH, WinEDA_MainFrame::OnRefresh ) EVT_MENU_RANGE( ID_LANGUAGE_CHOICE, ID_LANGUAGE_CHOICE_END, WinEDA_MainFrame::SetLanguage )
EVT_MENU( ID_GENERAL_HELP, WinEDA_MainFrame::GetKicadHelp )
EVT_MENU( wxID_ABOUT, WinEDA_MainFrame::GetKicadAbout ) EVT_MENU_RANGE( wxID_FILE1, wxID_FILE9, WinEDA_MainFrame::OnFileHistory )
/* Range menu events */ /* Button events */
EVT_MENU_RANGE( ID_LANGUAGE_CHOICE, ID_LANGUAGE_CHOICE_END, EVT_BUTTON( ID_TO_PCB, WinEDA_MainFrame::OnRunPcbNew )
WinEDA_MainFrame::SetLanguage ) EVT_BUTTON( ID_TO_CVPCB, WinEDA_MainFrame::OnRunCvpcb )
EVT_BUTTON( ID_TO_EESCHEMA, WinEDA_MainFrame::OnRunEeschema )
EVT_MENU_RANGE( wxID_FILE1, wxID_FILE9, WinEDA_MainFrame::OnFileHistory ) EVT_BUTTON( ID_TO_GERBVIEW, WinEDA_MainFrame::OnRunGerbview )
EVT_BUTTON( ID_TO_BITMAP_CONVERTER, WinEDA_MainFrame::OnRunBitmapConverter )
/* Button events */
EVT_BUTTON( ID_TO_PCB, WinEDA_MainFrame::OnRunPcbNew ) EVT_UPDATE_UI( ID_SELECT_DEFAULT_PDF_BROWSER, WinEDA_MainFrame::OnUpdateDefaultPdfBrowser )
EVT_BUTTON( ID_TO_CVPCB, WinEDA_MainFrame::OnRunCvpcb ) EVT_UPDATE_UI( ID_SELECT_PREFERED_PDF_BROWSER, WinEDA_MainFrame::OnUpdatePreferredPdfBrowser )
EVT_BUTTON( ID_TO_EESCHEMA, WinEDA_MainFrame::OnRunEeschema )
EVT_BUTTON( ID_TO_GERBVIEW, WinEDA_MainFrame::OnRunGerbview )
EVT_BUTTON( ID_TO_BITMAP_CONVERTER, WinEDA_MainFrame::OnRunBitmapConverter )
EVT_UPDATE_UI( ID_SELECT_DEFAULT_PDF_BROWSER,
WinEDA_MainFrame::OnUpdateDefaultPdfBrowser )
EVT_UPDATE_UI( ID_SELECT_PREFERED_PDF_BROWSER,
WinEDA_MainFrame::OnUpdatePreferredPdfBrowser )
END_EVENT_TABLE() END_EVENT_TABLE()
...@@ -266,7 +258,7 @@ void WinEDA_MainFrame::RecreateBaseHToolbar() ...@@ -266,7 +258,7 @@ void WinEDA_MainFrame::RecreateBaseHToolbar()
return; return;
// 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 EDA_TOOLBAR( TOOLBAR_MAIN, this, ID_H_TOOLBAR, TRUE );
// New // New
m_HToolBar->AddTool( ID_NEW_PROJECT, wxEmptyString, m_HToolBar->AddTool( ID_NEW_PROJECT, wxEmptyString,
......
...@@ -28,7 +28,7 @@ void WinEDA_ModuleEditFrame::ReCreateHToolbar() ...@@ -28,7 +28,7 @@ void WinEDA_ModuleEditFrame::ReCreateHToolbar()
wxString msg; wxString msg;
m_HToolBar = new WinEDA_Toolbar( TOOLBAR_MAIN, this, ID_H_TOOLBAR, true ); m_HToolBar = new EDA_TOOLBAR( TOOLBAR_MAIN, this, ID_H_TOOLBAR, true );
// Set up toolbar // Set up toolbar
m_HToolBar->AddTool( ID_MODEDIT_SELECT_CURRENT_LIB, wxEmptyString, m_HToolBar->AddTool( ID_MODEDIT_SELECT_CURRENT_LIB, wxEmptyString,
...@@ -122,7 +122,7 @@ void WinEDA_ModuleEditFrame::ReCreateVToolbar() ...@@ -122,7 +122,7 @@ void WinEDA_ModuleEditFrame::ReCreateVToolbar()
if( m_VToolBar ) if( m_VToolBar )
return; return;
m_VToolBar = new WinEDA_Toolbar( TOOLBAR_TOOL, this, ID_V_TOOLBAR, false ); m_VToolBar = new EDA_TOOLBAR( TOOLBAR_TOOL, this, ID_V_TOOLBAR, false );
// Set up toolbar // Set up toolbar
m_VToolBar->AddTool( ID_NO_TOOL_SELECTED, wxEmptyString, wxBitmap( cursor_xpm ), m_VToolBar->AddTool( ID_NO_TOOL_SELECTED, wxEmptyString, wxBitmap( cursor_xpm ),
...@@ -169,7 +169,7 @@ void WinEDA_ModuleEditFrame::ReCreateOptToolbar() ...@@ -169,7 +169,7 @@ void WinEDA_ModuleEditFrame::ReCreateOptToolbar()
return; return;
// Create options tool bar. // Create options tool bar.
m_OptionsToolBar = new WinEDA_Toolbar( TOOLBAR_OPTION, this, ID_OPT_TOOLBAR, false ); m_OptionsToolBar = new EDA_TOOLBAR( TOOLBAR_OPTION, this, ID_OPT_TOOLBAR, false );
m_OptionsToolBar->AddTool( ID_TB_OPTIONS_SHOW_GRID, wxEmptyString, wxBitmap( grid_xpm ), m_OptionsToolBar->AddTool( ID_TB_OPTIONS_SHOW_GRID, wxEmptyString, wxBitmap( grid_xpm ),
_( "Hide grid" ), wxITEM_CHECK ); _( "Hide grid" ), wxITEM_CHECK );
...@@ -213,7 +213,7 @@ void WinEDA_ModuleEditFrame::ReCreateAuxiliaryToolbar() ...@@ -213,7 +213,7 @@ void WinEDA_ModuleEditFrame::ReCreateAuxiliaryToolbar()
if( m_AuxiliaryToolBar ) if( m_AuxiliaryToolBar )
return; return;
m_AuxiliaryToolBar = new WinEDA_Toolbar( TOOLBAR_AUX, this, ID_AUX_TOOLBAR, true ); m_AuxiliaryToolBar = new EDA_TOOLBAR( TOOLBAR_AUX, this, ID_AUX_TOOLBAR, true );
// Set up toolbar // Set up toolbar
m_AuxiliaryToolBar->AddSeparator(); m_AuxiliaryToolBar->AddSeparator();
......
...@@ -187,7 +187,7 @@ void PCB_EDIT_FRAME::ReCreateHToolbar() ...@@ -187,7 +187,7 @@ void PCB_EDIT_FRAME::ReCreateHToolbar()
wxWindowUpdateLocker dummy( this ); wxWindowUpdateLocker dummy( this );
m_HToolBar = new WinEDA_Toolbar( TOOLBAR_MAIN, this, ID_H_TOOLBAR, true ); m_HToolBar = new EDA_TOOLBAR( TOOLBAR_MAIN, this, ID_H_TOOLBAR, true );
m_HToolBar->SetRows( 1 ); m_HToolBar->SetRows( 1 );
// Set up toolbar // Set up toolbar
...@@ -293,7 +293,7 @@ void PCB_EDIT_FRAME::ReCreateOptToolbar() ...@@ -293,7 +293,7 @@ void PCB_EDIT_FRAME::ReCreateOptToolbar()
wxWindowUpdateLocker dummy( this ); wxWindowUpdateLocker dummy( this );
m_OptionsToolBar = new WinEDA_Toolbar( TOOLBAR_OPTION, this, ID_OPT_TOOLBAR, false ); m_OptionsToolBar = new EDA_TOOLBAR( TOOLBAR_OPTION, this, ID_OPT_TOOLBAR, false );
m_OptionsToolBar->AddTool( ID_TB_OPTIONS_DRC_OFF, wxEmptyString, wxBitmap( drc_off_xpm ), m_OptionsToolBar->AddTool( ID_TB_OPTIONS_DRC_OFF, wxEmptyString, wxBitmap( drc_off_xpm ),
_( "Enable design rule checking" ), wxITEM_CHECK ); _( "Enable design rule checking" ), wxITEM_CHECK );
...@@ -385,7 +385,7 @@ void PCB_EDIT_FRAME::ReCreateVToolbar() ...@@ -385,7 +385,7 @@ void PCB_EDIT_FRAME::ReCreateVToolbar()
wxWindowUpdateLocker dummy( this ); wxWindowUpdateLocker dummy( this );
m_VToolBar = new WinEDA_Toolbar( TOOLBAR_TOOL, this, ID_V_TOOLBAR, false ); m_VToolBar = new EDA_TOOLBAR( TOOLBAR_TOOL, this, ID_V_TOOLBAR, false );
// Set up toolbar // Set up toolbar
m_VToolBar->AddTool( ID_NO_TOOL_SELECTED, wxEmptyString, wxBitmap( cursor_xpm ), m_VToolBar->AddTool( ID_NO_TOOL_SELECTED, wxEmptyString, wxBitmap( cursor_xpm ),
...@@ -456,7 +456,7 @@ void PCB_EDIT_FRAME::ReCreateMicrowaveVToolbar() ...@@ -456,7 +456,7 @@ void PCB_EDIT_FRAME::ReCreateMicrowaveVToolbar()
wxWindowUpdateLocker dummy(this); wxWindowUpdateLocker dummy(this);
m_AuxVToolBar = new WinEDA_Toolbar( TOOLBAR_TOOL, this, ID_MICROWAVE_V_TOOLBAR, false ); m_AuxVToolBar = new EDA_TOOLBAR( TOOLBAR_TOOL, this, ID_MICROWAVE_V_TOOLBAR, false );
// Set up toolbar // Set up toolbar
m_AuxVToolBar->AddTool( ID_PCB_MUWAVE_TOOL_SELF_CMD, wxEmptyString, m_AuxVToolBar->AddTool( ID_PCB_MUWAVE_TOOL_SELF_CMD, wxEmptyString,
...@@ -504,7 +504,7 @@ void PCB_EDIT_FRAME::ReCreateAuxiliaryToolbar() ...@@ -504,7 +504,7 @@ void PCB_EDIT_FRAME::ReCreateAuxiliaryToolbar()
if( m_AuxiliaryToolBar ) if( m_AuxiliaryToolBar )
return; return;
m_AuxiliaryToolBar = new WinEDA_Toolbar( TOOLBAR_AUX, this, ID_AUX_TOOLBAR, true ); m_AuxiliaryToolBar = new EDA_TOOLBAR( TOOLBAR_AUX, this, ID_AUX_TOOLBAR, true );
/* Set up toolbar items */ /* Set up toolbar items */
...@@ -612,7 +612,7 @@ void PCB_EDIT_FRAME::updateViaSizeSelectBox() ...@@ -612,7 +612,7 @@ void PCB_EDIT_FRAME::updateViaSizeSelectBox()
} }
LAYER_BOX_SELECTOR* PCB_EDIT_FRAME::ReCreateLayerBox( WinEDA_Toolbar* parent ) LAYER_BOX_SELECTOR* PCB_EDIT_FRAME::ReCreateLayerBox( EDA_TOOLBAR* parent )
{ {
if( m_SelLayerBox == NULL ) if( m_SelLayerBox == NULL )
return NULL; return NULL;
......
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