Replace WinEDAChoiceBox with wxComboBox.
This commit is contained in:
parent
cb3e36f04b
commit
dcccaee2aa
|
@ -360,7 +360,7 @@ void EDA_DRAW_FRAME::OnSelectZoom( wxCommandEvent& event )
|
||||||
if( m_SelZoomBox == NULL )
|
if( m_SelZoomBox == NULL )
|
||||||
return; // Should not happen!
|
return; // Should not happen!
|
||||||
|
|
||||||
int id = m_SelZoomBox->GetChoice();
|
int id = m_SelZoomBox->GetCurrentSelection();
|
||||||
|
|
||||||
if( id < 0 || !( id < (int)m_SelZoomBox->GetCount() ) )
|
if( id < 0 || !( id < (int)m_SelZoomBox->GetCount() ) )
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -101,8 +101,8 @@ BEGIN_EVENT_TABLE( LIB_EDIT_FRAME, EDA_DRAW_FRAME )
|
||||||
EVT_TOOL( CreateNewLibAndSavePartId, LIB_EDIT_FRAME::OnExportPart )
|
EVT_TOOL( CreateNewLibAndSavePartId, LIB_EDIT_FRAME::OnExportPart )
|
||||||
EVT_TOOL( ImportPartId, LIB_EDIT_FRAME::OnImportPart )
|
EVT_TOOL( ImportPartId, LIB_EDIT_FRAME::OnImportPart )
|
||||||
|
|
||||||
EVT_KICAD_CHOICEBOX( ID_LIBEDIT_SELECT_PART_NUMBER, LIB_EDIT_FRAME::OnSelectPart )
|
EVT_COMBOBOX( ID_LIBEDIT_SELECT_PART_NUMBER, LIB_EDIT_FRAME::OnSelectPart )
|
||||||
EVT_KICAD_CHOICEBOX( ID_LIBEDIT_SELECT_ALIAS, LIB_EDIT_FRAME::OnSelectAlias )
|
EVT_COMBOBOX( ID_LIBEDIT_SELECT_ALIAS, LIB_EDIT_FRAME::OnSelectAlias )
|
||||||
|
|
||||||
/* Right vertical toolbar. */
|
/* Right vertical toolbar. */
|
||||||
EVT_TOOL( ID_NO_TOOL_SELECTED, LIB_EDIT_FRAME::OnSelectTool )
|
EVT_TOOL( ID_NO_TOOL_SELECTED, LIB_EDIT_FRAME::OnSelectTool )
|
||||||
|
|
|
@ -28,8 +28,8 @@ class LIB_EDIT_FRAME : public EDA_DRAW_FRAME
|
||||||
LIB_COMPONENT* m_tempCopyComponent; ///< Temporary copy of current component during edit.
|
LIB_COMPONENT* m_tempCopyComponent; ///< Temporary copy of current component during edit.
|
||||||
|
|
||||||
public:
|
public:
|
||||||
WinEDAChoiceBox* m_SelpartBox; // a Box to select a part to edit (if any)
|
wxComboBox* m_SelpartBox; // a Box to select a part to edit (if any)
|
||||||
WinEDAChoiceBox* m_SelAliasBox; // a box to select the alias to edit (if any)
|
wxComboBox* m_SelAliasBox; // a box to select the alias to edit (if any)
|
||||||
|
|
||||||
public:
|
public:
|
||||||
LIB_EDIT_FRAME( SCH_EDIT_FRAME* aParent, const wxString& title,
|
LIB_EDIT_FRAME( SCH_EDIT_FRAME* aParent, const wxString& title,
|
||||||
|
|
|
@ -158,14 +158,20 @@ void LIB_EDIT_FRAME::ReCreateHToolbar()
|
||||||
_( "Edit document file" ) );
|
_( "Edit document file" ) );
|
||||||
|
|
||||||
m_HToolBar->AddSeparator();
|
m_HToolBar->AddSeparator();
|
||||||
m_SelpartBox = new WinEDAChoiceBox( m_HToolBar,
|
m_SelpartBox = new wxComboBox( m_HToolBar,
|
||||||
ID_LIBEDIT_SELECT_PART_NUMBER,
|
ID_LIBEDIT_SELECT_PART_NUMBER,
|
||||||
wxDefaultPosition,
|
wxEmptyString,
|
||||||
wxSize( LISTBOX_WIDTH, -1 ) );
|
wxDefaultPosition,
|
||||||
|
wxSize( LISTBOX_WIDTH, -1 ),
|
||||||
|
0, NULL, wxCB_READONLY );
|
||||||
m_HToolBar->AddControl( m_SelpartBox );
|
m_HToolBar->AddControl( m_SelpartBox );
|
||||||
|
|
||||||
m_SelAliasBox = new WinEDAChoiceBox( m_HToolBar, ID_LIBEDIT_SELECT_ALIAS, wxDefaultPosition,
|
m_SelAliasBox = new wxComboBox( m_HToolBar,
|
||||||
wxSize( LISTBOX_WIDTH, -1 ) );
|
ID_LIBEDIT_SELECT_ALIAS,
|
||||||
|
wxEmptyString,
|
||||||
|
wxDefaultPosition,
|
||||||
|
wxSize( LISTBOX_WIDTH, -1 ),
|
||||||
|
0, NULL, wxCB_READONLY );
|
||||||
m_HToolBar->AddControl( m_SelAliasBox );
|
m_HToolBar->AddControl( m_SelAliasBox );
|
||||||
|
|
||||||
m_HToolBar->AddSeparator();
|
m_HToolBar->AddSeparator();
|
||||||
|
|
|
@ -82,9 +82,9 @@ void LIB_VIEW_FRAME::ReCreateHToolbar()
|
||||||
|
|
||||||
m_HToolBar->AddSeparator();
|
m_HToolBar->AddSeparator();
|
||||||
|
|
||||||
SelpartBox =
|
SelpartBox = new wxComboBox( m_HToolBar, ID_LIBVIEW_SELECT_PART_NUMBER,
|
||||||
new WinEDAChoiceBox( m_HToolBar, ID_LIBVIEW_SELECT_PART_NUMBER,
|
wxEmptyString, wxDefaultPosition,
|
||||||
wxDefaultPosition, wxSize( 150, -1 ) );
|
wxSize( 150, -1 ), 0, NULL, wxCB_READONLY );
|
||||||
m_HToolBar->AddControl( SelpartBox );
|
m_HToolBar->AddControl( SelpartBox );
|
||||||
|
|
||||||
m_HToolBar->AddSeparator();
|
m_HToolBar->AddSeparator();
|
||||||
|
|
|
@ -48,10 +48,8 @@ BEGIN_EVENT_TABLE( LIB_VIEW_FRAME, EDA_DRAW_FRAME )
|
||||||
EVT_TOOL_RANGE( ID_LIBVIEW_NEXT, ID_LIBVIEW_DE_MORGAN_CONVERT_BUTT,
|
EVT_TOOL_RANGE( ID_LIBVIEW_NEXT, ID_LIBVIEW_DE_MORGAN_CONVERT_BUTT,
|
||||||
LIB_VIEW_FRAME::Process_Special_Functions )
|
LIB_VIEW_FRAME::Process_Special_Functions )
|
||||||
|
|
||||||
EVT_TOOL( ID_LIBVIEW_CMP_EXPORT_TO_SCHEMATIC,
|
EVT_TOOL( ID_LIBVIEW_CMP_EXPORT_TO_SCHEMATIC, LIB_VIEW_FRAME::ExportToSchematicLibraryPart )
|
||||||
LIB_VIEW_FRAME::ExportToSchematicLibraryPart )
|
EVT_COMBOBOX( ID_LIBVIEW_SELECT_PART_NUMBER, LIB_VIEW_FRAME::Process_Special_Functions )
|
||||||
EVT_KICAD_CHOICEBOX( ID_LIBVIEW_SELECT_PART_NUMBER,
|
|
||||||
LIB_VIEW_FRAME::Process_Special_Functions )
|
|
||||||
|
|
||||||
/* listbox events */
|
/* listbox events */
|
||||||
EVT_LISTBOX( ID_LIBVIEW_LIB_LIST, LIB_VIEW_FRAME::ClickOnLibList )
|
EVT_LISTBOX( ID_LIBVIEW_LIB_LIST, LIB_VIEW_FRAME::ClickOnLibList )
|
||||||
|
|
|
@ -10,7 +10,6 @@
|
||||||
class wxSashLayoutWindow;
|
class wxSashLayoutWindow;
|
||||||
class wxListBox;
|
class wxListBox;
|
||||||
class wxSemaphore;
|
class wxSemaphore;
|
||||||
class WinEDAChoiceBox;
|
|
||||||
class SCH_SCREEN;
|
class SCH_SCREEN;
|
||||||
class CMP_LIBRARY;
|
class CMP_LIBRARY;
|
||||||
|
|
||||||
|
@ -21,7 +20,7 @@ class CMP_LIBRARY;
|
||||||
class LIB_VIEW_FRAME : public EDA_DRAW_FRAME
|
class LIB_VIEW_FRAME : public EDA_DRAW_FRAME
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
WinEDAChoiceBox* SelpartBox;
|
wxComboBox* SelpartBox;
|
||||||
|
|
||||||
// List of libraries (for selection )
|
// List of libraries (for selection )
|
||||||
wxSashLayoutWindow* m_LibListWindow;
|
wxSashLayoutWindow* m_LibListWindow;
|
||||||
|
|
|
@ -72,7 +72,7 @@ void LIB_VIEW_FRAME::Process_Special_Functions( wxCommandEvent& event )
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ID_LIBVIEW_SELECT_PART_NUMBER:
|
case ID_LIBVIEW_SELECT_PART_NUMBER:
|
||||||
ii = SelpartBox->GetChoice();
|
ii = SelpartBox->GetCurrentSelection();
|
||||||
if( ii < 0 )
|
if( ii < 0 )
|
||||||
return;
|
return;
|
||||||
m_unit = ii + 1;
|
m_unit = ii + 1;
|
||||||
|
|
|
@ -68,8 +68,8 @@ EVT_TOOL( wxID_COPY, GERBVIEW_FRAME::Process_Special_Functions )
|
||||||
EVT_TOOL( wxID_PASTE, GERBVIEW_FRAME::Process_Special_Functions )
|
EVT_TOOL( wxID_PASTE, GERBVIEW_FRAME::Process_Special_Functions )
|
||||||
EVT_TOOL( wxID_UNDO, GERBVIEW_FRAME::Process_Special_Functions )
|
EVT_TOOL( wxID_UNDO, GERBVIEW_FRAME::Process_Special_Functions )
|
||||||
EVT_TOOL( wxID_PRINT, GERBVIEW_FRAME::ToPrinter )
|
EVT_TOOL( wxID_PRINT, GERBVIEW_FRAME::ToPrinter )
|
||||||
EVT_KICAD_CHOICEBOX( ID_TOOLBARH_GERBVIEW_SELECT_ACTIVE_LAYER,
|
EVT_COMBOBOX( ID_TOOLBARH_GERBVIEW_SELECT_ACTIVE_LAYER,
|
||||||
GERBVIEW_FRAME::OnSelectActiveLayer )
|
GERBVIEW_FRAME::OnSelectActiveLayer )
|
||||||
|
|
||||||
EVT_SELECT_DCODE( ID_TOOLBARH_GERBER_SELECT_ACTIVE_DCODE, GERBVIEW_FRAME::OnSelectActiveDCode )
|
EVT_SELECT_DCODE( ID_TOOLBARH_GERBER_SELECT_ACTIVE_DCODE, GERBVIEW_FRAME::OnSelectActiveDCode )
|
||||||
|
|
||||||
|
|
|
@ -211,44 +211,5 @@ public:
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
/*************************/
|
|
||||||
/* class WinEDAChoiceBox */
|
|
||||||
/*************************/
|
|
||||||
|
|
||||||
/* class to display a choice list.
|
|
||||||
* This is a wrapper to wxComboBox (or wxChoice)
|
|
||||||
* but because they have some problems, WinEDAChoiceBox uses workarounds:
|
|
||||||
* - in wxGTK 2.6.2 wxGetSelection() does not work properly,
|
|
||||||
* - and wxChoice crashes if compiled in non unicode mode and uses utf8 codes
|
|
||||||
*/
|
|
||||||
|
|
||||||
#define EVT_KICAD_CHOICEBOX EVT_COMBOBOX
|
|
||||||
class WinEDAChoiceBox : public wxComboBox
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
WinEDAChoiceBox( wxWindow* parent, wxWindowID id,
|
|
||||||
const wxPoint& pos = wxDefaultPosition,
|
|
||||||
const wxSize& size = wxDefaultSize,
|
|
||||||
int n = 0, const wxString choices[] = NULL ) :
|
|
||||||
wxComboBox( parent, id, wxEmptyString, pos, size,
|
|
||||||
n, choices, wxCB_READONLY )
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
WinEDAChoiceBox( wxWindow* parent, wxWindowID id,
|
|
||||||
const wxPoint& pos, const wxSize& size,
|
|
||||||
const wxArrayString& choices ) :
|
|
||||||
wxComboBox( parent, id, wxEmptyString, pos, size,
|
|
||||||
choices, wxCB_READONLY )
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
int GetChoice()
|
|
||||||
{
|
|
||||||
return GetCurrentSelection();
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -58,7 +58,7 @@ enum fl_rot_cmp {
|
||||||
class SCH_EDIT_FRAME : public EDA_DRAW_FRAME
|
class SCH_EDIT_FRAME : public EDA_DRAW_FRAME
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
WinEDAChoiceBox* m_SelPartBox;
|
wxComboBox* m_SelPartBox;
|
||||||
SCH_SHEET_PATH* m_CurrentSheet; ///< which sheet we are presently working on.
|
SCH_SHEET_PATH* m_CurrentSheet; ///< which sheet we are presently working on.
|
||||||
int m_Multiflag;
|
int m_Multiflag;
|
||||||
int m_NetlistFormat;
|
int m_NetlistFormat;
|
||||||
|
|
|
@ -112,12 +112,9 @@ protected:
|
||||||
virtual void unitsChangeRefresh();
|
virtual void unitsChangeRefresh();
|
||||||
|
|
||||||
public:
|
public:
|
||||||
LAYER_BOX_SELECTOR* m_SelLayerBox; // a combo box to display and
|
LAYER_BOX_SELECTOR* m_SelLayerBox; // a combo box to display and select active layer
|
||||||
// select active layer
|
wxComboBox* m_SelTrackWidthBox; // a combo box to display and select current track width
|
||||||
WinEDAChoiceBox* m_SelTrackWidthBox; // a combo box to display and
|
wxComboBox* m_SelViaSizeBox; // a combo box to display and select current via diameter
|
||||||
// select current track width
|
|
||||||
WinEDAChoiceBox* m_SelViaSizeBox; // a combo box to display and
|
|
||||||
// select current via diameter
|
|
||||||
|
|
||||||
bool m_show_microwave_tools;
|
bool m_show_microwave_tools;
|
||||||
bool m_show_layer_manager_tools;
|
bool m_show_layer_manager_tools;
|
||||||
|
|
|
@ -39,7 +39,6 @@ class EDA_DRAW_PANEL;
|
||||||
class EDA_MSG_PANEL;
|
class EDA_MSG_PANEL;
|
||||||
class BASE_SCREEN;
|
class BASE_SCREEN;
|
||||||
class EDA_TOOLBAR;
|
class EDA_TOOLBAR;
|
||||||
class WinEDAChoiceBox;
|
|
||||||
class PARAM_CFG_BASE;
|
class PARAM_CFG_BASE;
|
||||||
class Ki_PageDescr;
|
class Ki_PageDescr;
|
||||||
class Ki_HotkeyInfo;
|
class Ki_HotkeyInfo;
|
||||||
|
@ -245,10 +244,8 @@ public:
|
||||||
EDA_TOOLBAR* m_OptionsToolBar; // Options Toolbar (left side)
|
EDA_TOOLBAR* m_OptionsToolBar; // Options Toolbar (left side)
|
||||||
EDA_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
|
wxComboBox* m_SelGridBox; // Choice box to choose the grid size
|
||||||
// size
|
wxComboBox* m_SelZoomBox; // Choice box to choose the zoom value
|
||||||
WinEDAChoiceBox* m_SelZoomBox; // Choice box to choose the zoom
|
|
||||||
// value
|
|
||||||
|
|
||||||
int m_CursorShape; // shape for cursor (0 = default
|
int m_CursorShape; // shape for cursor (0 = default
|
||||||
// cursor)
|
// cursor)
|
||||||
|
|
|
@ -49,7 +49,7 @@ private:
|
||||||
WinEDA_SizeCtrl* m_TxtSizeCtrl;
|
WinEDA_SizeCtrl* m_TxtSizeCtrl;
|
||||||
WinEDA_ValueCtrl* m_TxtWidthCtrl;
|
WinEDA_ValueCtrl* m_TxtWidthCtrl;
|
||||||
wxRadioBox* m_Mirror;
|
wxRadioBox* m_Mirror;
|
||||||
WinEDAChoiceBox* m_SelLayerBox;
|
wxComboBox* m_SelLayerBox;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
|
@ -122,8 +122,9 @@ DIMENSION_EDITOR_DIALOG::DIMENSION_EDITOR_DIALOG( PCB_EDIT_FRAME* parent,
|
||||||
|
|
||||||
wxStaticText* text = new wxStaticText( this, -1, _( "Layer:" ) );
|
wxStaticText* text = new wxStaticText( this, -1, _( "Layer:" ) );
|
||||||
LeftBoxSizer->Add( text, 0, wxGROW | wxLEFT | wxRIGHT | wxTOP, 5 );
|
LeftBoxSizer->Add( text, 0, wxGROW | wxLEFT | wxRIGHT | wxTOP, 5 );
|
||||||
m_SelLayerBox = new WinEDAChoiceBox( this, wxID_ANY,
|
m_SelLayerBox = new wxComboBox( this, wxID_ANY, wxEmptyString,
|
||||||
wxDefaultPosition, wxDefaultSize );
|
wxDefaultPosition, wxDefaultSize,
|
||||||
|
0, NULL, wxCB_READONLY );
|
||||||
LeftBoxSizer->Add( m_SelLayerBox, 0, wxGROW | wxLEFT | wxRIGHT | wxBOTTOM, 5 );
|
LeftBoxSizer->Add( m_SelLayerBox, 0, wxGROW | wxLEFT | wxRIGHT | wxBOTTOM, 5 );
|
||||||
|
|
||||||
for( int layer = FIRST_NO_COPPER_LAYER; layer<NB_LAYERS; layer++ )
|
for( int layer = FIRST_NO_COPPER_LAYER; layer<NB_LAYERS; layer++ )
|
||||||
|
@ -175,7 +176,7 @@ void DIMENSION_EDITOR_DIALOG::OnOkClick( wxCommandEvent& event )
|
||||||
|
|
||||||
CurrentDimension->m_Text->m_Mirror = ( m_Mirror->GetSelection() == 1 ) ? true : false;
|
CurrentDimension->m_Text->m_Mirror = ( m_Mirror->GetSelection() == 1 ) ? true : false;
|
||||||
|
|
||||||
CurrentDimension->SetLayer( m_SelLayerBox->GetChoice() + FIRST_NO_COPPER_LAYER );
|
CurrentDimension->SetLayer( m_SelLayerBox->GetCurrentSelection() + FIRST_NO_COPPER_LAYER );
|
||||||
|
|
||||||
CurrentDimension->AdjustDimensionDetails( true );
|
CurrentDimension->AdjustDimensionDetails( true );
|
||||||
|
|
||||||
|
|
|
@ -78,12 +78,12 @@ void PCB_EDIT_FRAME::Tracks_and_Vias_Size_Event( wxCommandEvent& event )
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ID_AUX_TOOLBAR_PCB_TRACK_WIDTH:
|
case ID_AUX_TOOLBAR_PCB_TRACK_WIDTH:
|
||||||
ii = m_SelTrackWidthBox->GetChoice();
|
ii = m_SelTrackWidthBox->GetCurrentSelection();
|
||||||
GetBoard()->m_TrackWidthSelector = ii;
|
GetBoard()->m_TrackWidthSelector = ii;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ID_AUX_TOOLBAR_PCB_VIA_SIZE:
|
case ID_AUX_TOOLBAR_PCB_VIA_SIZE:
|
||||||
ii = m_SelViaSizeBox->GetChoice();
|
ii = m_SelViaSizeBox->GetCurrentSelection();
|
||||||
GetBoard()->m_ViaSizeSelector = ii;
|
GetBoard()->m_ViaSizeSelector = ii;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
|
@ -36,8 +36,8 @@ BEGIN_EVENT_TABLE( WinEDA_ModuleEditFrame, PCB_BASE_FRAME )
|
||||||
|
|
||||||
EVT_SIZE( WinEDA_ModuleEditFrame::OnSize )
|
EVT_SIZE( WinEDA_ModuleEditFrame::OnSize )
|
||||||
|
|
||||||
EVT_KICAD_CHOICEBOX( ID_ON_ZOOM_SELECT, WinEDA_ModuleEditFrame::OnSelectZoom )
|
EVT_COMBOBOX( ID_ON_ZOOM_SELECT, WinEDA_ModuleEditFrame::OnSelectZoom )
|
||||||
EVT_KICAD_CHOICEBOX( ID_ON_GRID_SELECT, WinEDA_ModuleEditFrame::OnSelectGrid )
|
EVT_COMBOBOX( ID_ON_GRID_SELECT, WinEDA_ModuleEditFrame::OnSelectGrid )
|
||||||
|
|
||||||
EVT_TOOL( ID_MODEDIT_SELECT_CURRENT_LIB, WinEDA_ModuleEditFrame::Process_Special_Functions )
|
EVT_TOOL( ID_MODEDIT_SELECT_CURRENT_LIB, WinEDA_ModuleEditFrame::Process_Special_Functions )
|
||||||
EVT_TOOL( ID_MODEDIT_SAVE_LIBMODULE, WinEDA_ModuleEditFrame::Process_Special_Functions )
|
EVT_TOOL( ID_MODEDIT_SAVE_LIBMODULE, WinEDA_ModuleEditFrame::Process_Special_Functions )
|
||||||
|
|
|
@ -68,8 +68,8 @@ BEGIN_EVENT_TABLE( PCB_EDIT_FRAME, PCB_BASE_FRAME )
|
||||||
EVT_SOCKET( ID_EDA_SOCKET_EVENT_SERV, PCB_EDIT_FRAME::OnSockRequestServer )
|
EVT_SOCKET( ID_EDA_SOCKET_EVENT_SERV, PCB_EDIT_FRAME::OnSockRequestServer )
|
||||||
EVT_SOCKET( ID_EDA_SOCKET_EVENT, PCB_EDIT_FRAME::OnSockRequest )
|
EVT_SOCKET( ID_EDA_SOCKET_EVENT, PCB_EDIT_FRAME::OnSockRequest )
|
||||||
|
|
||||||
EVT_KICAD_CHOICEBOX( ID_ON_ZOOM_SELECT, PCB_EDIT_FRAME::OnSelectZoom )
|
EVT_COMBOBOX( ID_ON_ZOOM_SELECT, PCB_EDIT_FRAME::OnSelectZoom )
|
||||||
EVT_KICAD_CHOICEBOX( ID_ON_GRID_SELECT, PCB_EDIT_FRAME::OnSelectGrid )
|
EVT_COMBOBOX( ID_ON_GRID_SELECT, PCB_EDIT_FRAME::OnSelectGrid )
|
||||||
|
|
||||||
EVT_CLOSE( PCB_EDIT_FRAME::OnCloseWindow )
|
EVT_CLOSE( PCB_EDIT_FRAME::OnCloseWindow )
|
||||||
EVT_SIZE( PCB_EDIT_FRAME::OnSize )
|
EVT_SIZE( PCB_EDIT_FRAME::OnSize )
|
||||||
|
@ -164,10 +164,9 @@ BEGIN_EVENT_TABLE( PCB_EDIT_FRAME, PCB_BASE_FRAME )
|
||||||
EVT_TOOL( ID_DRC_CONTROL, PCB_EDIT_FRAME::Process_Special_Functions )
|
EVT_TOOL( ID_DRC_CONTROL, PCB_EDIT_FRAME::Process_Special_Functions )
|
||||||
EVT_TOOL( ID_AUX_TOOLBAR_PCB_SELECT_LAYER_PAIR, PCB_EDIT_FRAME::Process_Special_Functions )
|
EVT_TOOL( ID_AUX_TOOLBAR_PCB_SELECT_LAYER_PAIR, PCB_EDIT_FRAME::Process_Special_Functions )
|
||||||
EVT_TOOL( ID_AUX_TOOLBAR_PCB_SELECT_AUTO_WIDTH, PCB_EDIT_FRAME::Tracks_and_Vias_Size_Event )
|
EVT_TOOL( ID_AUX_TOOLBAR_PCB_SELECT_AUTO_WIDTH, PCB_EDIT_FRAME::Tracks_and_Vias_Size_Event )
|
||||||
EVT_KICAD_CHOICEBOX( ID_TOOLBARH_PCB_SELECT_LAYER, PCB_EDIT_FRAME::Process_Special_Functions )
|
EVT_COMBOBOX( ID_TOOLBARH_PCB_SELECT_LAYER, PCB_EDIT_FRAME::Process_Special_Functions )
|
||||||
EVT_KICAD_CHOICEBOX( ID_AUX_TOOLBAR_PCB_TRACK_WIDTH,
|
EVT_COMBOBOX( ID_AUX_TOOLBAR_PCB_TRACK_WIDTH, PCB_EDIT_FRAME::Tracks_and_Vias_Size_Event )
|
||||||
PCB_EDIT_FRAME::Tracks_and_Vias_Size_Event )
|
EVT_COMBOBOX( ID_AUX_TOOLBAR_PCB_VIA_SIZE, PCB_EDIT_FRAME::Tracks_and_Vias_Size_Event )
|
||||||
EVT_KICAD_CHOICEBOX( ID_AUX_TOOLBAR_PCB_VIA_SIZE, PCB_EDIT_FRAME::Tracks_and_Vias_Size_Event )
|
|
||||||
EVT_TOOL( ID_TOOLBARH_PCB_MODE_MODULE, PCB_EDIT_FRAME::AutoPlace )
|
EVT_TOOL( ID_TOOLBARH_PCB_MODE_MODULE, PCB_EDIT_FRAME::AutoPlace )
|
||||||
EVT_TOOL( ID_TOOLBARH_PCB_MODE_TRACKS, PCB_EDIT_FRAME::AutoPlace )
|
EVT_TOOL( ID_TOOLBARH_PCB_MODE_TRACKS, PCB_EDIT_FRAME::AutoPlace )
|
||||||
EVT_TOOL( ID_TOOLBARH_PCB_FREEROUTE_ACCESS, PCB_EDIT_FRAME::Access_to_External_Tool )
|
EVT_TOOL( ID_TOOLBARH_PCB_FREEROUTE_ACCESS, PCB_EDIT_FRAME::Access_to_External_Tool )
|
||||||
|
|
|
@ -219,18 +219,22 @@ void WinEDA_ModuleEditFrame::ReCreateAuxiliaryToolbar()
|
||||||
m_AuxiliaryToolBar->AddSeparator();
|
m_AuxiliaryToolBar->AddSeparator();
|
||||||
|
|
||||||
// Grid selection choice box.
|
// Grid selection choice box.
|
||||||
m_SelGridBox = new WinEDAChoiceBox( m_AuxiliaryToolBar,
|
m_SelGridBox = new wxComboBox( m_AuxiliaryToolBar,
|
||||||
ID_ON_GRID_SELECT,
|
ID_ON_GRID_SELECT,
|
||||||
wxPoint( -1, -1 ),
|
wxEmptyString,
|
||||||
wxSize( LISTBOX_WIDTH, -1 ) );
|
wxPoint( -1, -1 ),
|
||||||
|
wxSize( LISTBOX_WIDTH, -1 ),
|
||||||
|
0, NULL, wxCB_READONLY );
|
||||||
m_AuxiliaryToolBar->AddControl( m_SelGridBox );
|
m_AuxiliaryToolBar->AddControl( m_SelGridBox );
|
||||||
|
|
||||||
// Zoom selection choice box.
|
// Zoom selection choice box.
|
||||||
m_AuxiliaryToolBar->AddSeparator();
|
m_AuxiliaryToolBar->AddSeparator();
|
||||||
m_SelZoomBox = new WinEDAChoiceBox( m_AuxiliaryToolBar,
|
m_SelZoomBox = new wxComboBox( m_AuxiliaryToolBar,
|
||||||
ID_ON_ZOOM_SELECT,
|
ID_ON_ZOOM_SELECT,
|
||||||
wxPoint( -1, -1 ),
|
wxEmptyString,
|
||||||
wxSize( LISTBOX_WIDTH, -1 ) );
|
wxPoint( -1, -1 ),
|
||||||
|
wxSize( LISTBOX_WIDTH, -1 ),
|
||||||
|
0, NULL, wxCB_READONLY );
|
||||||
m_AuxiliaryToolBar->AddControl( m_SelZoomBox );
|
m_AuxiliaryToolBar->AddControl( m_SelZoomBox );
|
||||||
|
|
||||||
// Update tool bar to reflect setting.
|
// Update tool bar to reflect setting.
|
||||||
|
|
|
@ -509,18 +509,22 @@ void PCB_EDIT_FRAME::ReCreateAuxiliaryToolbar()
|
||||||
/* Set up toolbar items */
|
/* Set up toolbar items */
|
||||||
|
|
||||||
// Creates box to display and choose tracks widths:
|
// Creates box to display and choose tracks widths:
|
||||||
m_SelTrackWidthBox = new WinEDAChoiceBox( m_AuxiliaryToolBar,
|
m_SelTrackWidthBox = new wxComboBox( m_AuxiliaryToolBar,
|
||||||
ID_AUX_TOOLBAR_PCB_TRACK_WIDTH,
|
ID_AUX_TOOLBAR_PCB_TRACK_WIDTH,
|
||||||
wxPoint( -1, -1 ),
|
wxEmptyString,
|
||||||
wxSize( LISTBOX_WIDTH, -1 ) );
|
wxPoint( -1, -1 ),
|
||||||
|
wxSize( LISTBOX_WIDTH, -1 ),
|
||||||
|
0, NULL, wxCB_READONLY );
|
||||||
m_AuxiliaryToolBar->AddControl( m_SelTrackWidthBox );
|
m_AuxiliaryToolBar->AddControl( m_SelTrackWidthBox );
|
||||||
m_AuxiliaryToolBar->AddSeparator();
|
m_AuxiliaryToolBar->AddSeparator();
|
||||||
|
|
||||||
// Creates box to display and choose vias diameters:
|
// Creates box to display and choose vias diameters:
|
||||||
m_SelViaSizeBox = new WinEDAChoiceBox( m_AuxiliaryToolBar,
|
m_SelViaSizeBox = new wxComboBox( m_AuxiliaryToolBar,
|
||||||
ID_AUX_TOOLBAR_PCB_VIA_SIZE,
|
ID_AUX_TOOLBAR_PCB_VIA_SIZE,
|
||||||
wxPoint( -1, -1 ),
|
wxEmptyString,
|
||||||
wxSize( (LISTBOX_WIDTH*12)/10, -1 ) );
|
wxPoint( -1, -1 ),
|
||||||
|
wxSize( (LISTBOX_WIDTH*12)/10, -1 ),
|
||||||
|
0, NULL, wxCB_READONLY );
|
||||||
m_AuxiliaryToolBar->AddControl( m_SelViaSizeBox );
|
m_AuxiliaryToolBar->AddControl( m_SelViaSizeBox );
|
||||||
m_AuxiliaryToolBar->AddSeparator();
|
m_AuxiliaryToolBar->AddSeparator();
|
||||||
|
|
||||||
|
@ -534,18 +538,22 @@ an existing track use its width\notherwise, use current width setting" ),
|
||||||
|
|
||||||
// Add the box to display and select the current grid size:
|
// Add the box to display and select the current grid size:
|
||||||
m_AuxiliaryToolBar->AddSeparator();
|
m_AuxiliaryToolBar->AddSeparator();
|
||||||
m_SelGridBox = new WinEDAChoiceBox( m_AuxiliaryToolBar,
|
m_SelGridBox = new wxComboBox( m_AuxiliaryToolBar,
|
||||||
ID_ON_GRID_SELECT,
|
ID_ON_GRID_SELECT,
|
||||||
wxPoint( -1, -1 ),
|
wxEmptyString,
|
||||||
wxSize( LISTBOX_WIDTH, -1 ) );
|
wxPoint( -1, -1 ),
|
||||||
|
wxSize( LISTBOX_WIDTH, -1 ),
|
||||||
|
0, NULL, wxCB_READONLY );
|
||||||
m_AuxiliaryToolBar->AddControl( m_SelGridBox );
|
m_AuxiliaryToolBar->AddControl( m_SelGridBox );
|
||||||
|
|
||||||
// Add the box to display and select the current Zoom
|
// Add the box to display and select the current Zoom
|
||||||
m_AuxiliaryToolBar->AddSeparator();
|
m_AuxiliaryToolBar->AddSeparator();
|
||||||
m_SelZoomBox = new WinEDAChoiceBox( m_AuxiliaryToolBar,
|
m_SelZoomBox = new wxComboBox( m_AuxiliaryToolBar,
|
||||||
ID_ON_ZOOM_SELECT,
|
ID_ON_ZOOM_SELECT,
|
||||||
wxPoint( -1, -1 ),
|
wxEmptyString,
|
||||||
wxSize( LISTBOX_WIDTH, -1 ) );
|
wxPoint( -1, -1 ),
|
||||||
|
wxSize( LISTBOX_WIDTH, -1 ),
|
||||||
|
0, NULL, wxCB_READONLY );
|
||||||
m_AuxiliaryToolBar->AddControl( m_SelZoomBox );
|
m_AuxiliaryToolBar->AddControl( m_SelZoomBox );
|
||||||
|
|
||||||
updateZoomSelectBox();
|
updateZoomSelectBox();
|
||||||
|
|
Loading…
Reference in New Issue