Commit d55989cc authored by charras's avatar charras

patch for 3D viewer from Emanuel Rumpf and minor other changes

parent 680762a9
...@@ -172,6 +172,14 @@ Info_3D_Visu::Info_3D_Visu() ...@@ -172,6 +172,14 @@ Info_3D_Visu::Info_3D_Visu()
m_Layers = 1; m_Layers = 1;
m_BoardSettings = NULL; m_BoardSettings = NULL;
m_Draw3DAxis = TRUE;
m_Draw3DModule = TRUE;
m_Draw3DPlace = TRUE;
m_Draw3DZone = TRUE;
m_Draw3DComments = TRUE;
m_Draw3DDrawings = TRUE;
m_Draw3DEco1 = TRUE;
m_Draw3DEco2 = TRUE;
} }
......
...@@ -83,6 +83,7 @@ Pcb3D_GLCanvas::~Pcb3D_GLCanvas() ...@@ -83,6 +83,7 @@ Pcb3D_GLCanvas::~Pcb3D_GLCanvas()
/*************************************/ /*************************************/
{ {
ClearLists(); ClearLists();
m_init = FALSE;
} }
...@@ -92,7 +93,7 @@ void Pcb3D_GLCanvas::ClearLists() ...@@ -92,7 +93,7 @@ void Pcb3D_GLCanvas::ClearLists()
{ {
if( m_gllist > 0 ) if( m_gllist > 0 )
glDeleteLists( m_gllist, 1 ); glDeleteLists( m_gllist, 1 );
m_init = FALSE; // m_init = FALSE;
m_gllist = 0; m_gllist = 0;
} }
......
This diff is collapsed.
...@@ -293,6 +293,38 @@ void WinEDA3D_DrawFrame::Process_Special_Functions( wxCommandEvent& event ) ...@@ -293,6 +293,38 @@ void WinEDA3D_DrawFrame::Process_Special_Functions( wxCommandEvent& event )
Set3DBgColor(); Set3DBgColor();
return; return;
case ID_MENU3D_AXIS_ONOFF:
Set3DAxisOnOff();
return;
case ID_MENU3D_MODULE_ONOFF:
Set3DModuleOnOff();
return;
case ID_MENU3D_PLACE_ONOFF:
Set3DPlaceOnOff();
return;
case ID_MENU3D_ZONE_ONOFF:
Set3DZoneOnOff();
return;
case ID_MENU3D_COMMENTS_ONOFF:
Set3DCommentsOnOff();
return;
case ID_MENU3D_DRAWINGS_ONOFF:
Set3DDrawingsOnOff();
return;
case ID_MENU3D_ECO1_ONOFF:
Set3DEco1OnOff();
return;
case ID_MENU3D_ECO2_ONOFF:
Set3DEco2OnOff();
return;
default: default:
wxMessageBox( wxMessageBox(
wxT( "WinEDA3D_DrawFrame::Process_Special_Functions() error: unknown command" ) ); wxT( "WinEDA3D_DrawFrame::Process_Special_Functions() error: unknown command" ) );
...@@ -315,7 +347,6 @@ void WinEDA3D_DrawFrame::NewDisplay() ...@@ -315,7 +347,6 @@ void WinEDA3D_DrawFrame::NewDisplay()
m_Canvas->Refresh( true ); m_Canvas->Refresh( true );
} }
/******************************************/ /******************************************/
void WinEDA3D_DrawFrame::Set3DBgColor() void WinEDA3D_DrawFrame::Set3DBgColor()
/******************************************/ /******************************************/
...@@ -339,3 +370,75 @@ void WinEDA3D_DrawFrame::Set3DBgColor() ...@@ -339,3 +370,75 @@ void WinEDA3D_DrawFrame::Set3DBgColor()
NewDisplay(); NewDisplay();
} }
} }
/******************************************/
void WinEDA3D_DrawFrame::Set3DAxisOnOff()
/******************************************/
{
if (g_Parm_3D_Visu.m_Draw3DAxis) g_Parm_3D_Visu.m_Draw3DAxis = FALSE;
else g_Parm_3D_Visu.m_Draw3DAxis = TRUE;
NewDisplay();
}
/******************************************/
void WinEDA3D_DrawFrame::Set3DModuleOnOff()
/******************************************/
{
if (g_Parm_3D_Visu.m_Draw3DModule) g_Parm_3D_Visu.m_Draw3DModule = FALSE;
else g_Parm_3D_Visu.m_Draw3DModule = TRUE;
NewDisplay();
}
/******************************************/
void WinEDA3D_DrawFrame::Set3DPlaceOnOff()
/******************************************/
{
if (g_Parm_3D_Visu.m_Draw3DPlace) g_Parm_3D_Visu.m_Draw3DPlace = FALSE;
else g_Parm_3D_Visu.m_Draw3DPlace = TRUE;
NewDisplay();
}
/******************************************/
void WinEDA3D_DrawFrame::Set3DZoneOnOff()
/******************************************/
{
if (g_Parm_3D_Visu.m_Draw3DZone) g_Parm_3D_Visu.m_Draw3DZone = FALSE;
else g_Parm_3D_Visu.m_Draw3DZone = TRUE;
NewDisplay();
}
/******************************************/
void WinEDA3D_DrawFrame::Set3DCommentsOnOff()
/******************************************/
{
if (g_Parm_3D_Visu.m_Draw3DComments) g_Parm_3D_Visu.m_Draw3DComments = FALSE;
else g_Parm_3D_Visu.m_Draw3DComments = TRUE;
NewDisplay();
}
/******************************************/
void WinEDA3D_DrawFrame::Set3DDrawingsOnOff()
/******************************************/
{
if (g_Parm_3D_Visu.m_Draw3DDrawings) g_Parm_3D_Visu.m_Draw3DDrawings = FALSE;
else g_Parm_3D_Visu.m_Draw3DDrawings = TRUE;
NewDisplay();
}
/******************************************/
void WinEDA3D_DrawFrame::Set3DEco1OnOff()
/******************************************/
{
if (g_Parm_3D_Visu.m_Draw3DEco1) g_Parm_3D_Visu.m_Draw3DEco1 = FALSE;
else g_Parm_3D_Visu.m_Draw3DEco1 = TRUE;
NewDisplay();
}
/******************************************/
void WinEDA3D_DrawFrame::Set3DEco2OnOff()
/******************************************/
{
if (g_Parm_3D_Visu.m_Draw3DEco2) g_Parm_3D_Visu.m_Draw3DEco2 = FALSE;
else g_Parm_3D_Visu.m_Draw3DEco2 = TRUE;
NewDisplay();
}
...@@ -120,6 +120,29 @@ void WinEDA3D_DrawFrame::ReCreateMenuBar() ...@@ -120,6 +120,29 @@ void WinEDA3D_DrawFrame::ReCreateMenuBar()
ADD_MENUITEM( referencesMenu, ID_MENU3D_BGCOLOR_SELECTION, ADD_MENUITEM( referencesMenu, ID_MENU3D_BGCOLOR_SELECTION,
_( "Choose background color" ), palette_xpm ); _( "Choose background color" ), palette_xpm );
ADD_MENUITEM( referencesMenu, ID_MENU3D_AXIS_ONOFF,
_( "Axis On/Off" ), axis3d_front_xpm );
ADD_MENUITEM( referencesMenu, ID_MENU3D_MODULE_ONOFF,
_( "Module 3D On/Off" ), add_component_xpm );
ADD_MENUITEM( referencesMenu, ID_MENU3D_PLACE_ONOFF,
_( "PCB place 3D On/off" ), select_w_layer_xpm );
ADD_MENUITEM( referencesMenu, ID_MENU3D_ZONE_ONOFF,
_( "Zone On/Off" ), add_zone_xpm );
ADD_MENUITEM( referencesMenu, ID_MENU3D_COMMENTS_ONOFF,
_( "Comments On/Off" ), edit_sheet_xpm );
ADD_MENUITEM( referencesMenu, ID_MENU3D_DRAWINGS_ONOFF,
_( "Drawings On/Off" ), options_text_xpm );
ADD_MENUITEM( referencesMenu, ID_MENU3D_ECO1_ONOFF,
_( "Eco1 On/Off" ), options_text_xpm );
ADD_MENUITEM( referencesMenu, ID_MENU3D_ECO2_ONOFF,
_( "Eco2 On/Off" ), options_text_xpm );
SetMenuBar( menuBar ); SetMenuBar( menuBar );
} }
......
...@@ -54,6 +54,14 @@ public: ...@@ -54,6 +54,14 @@ public:
float m_Rot[4]; /* man rotation of object */ float m_Rot[4]; /* man rotation of object */
float m_Zoom; /* field of view in degrees */ float m_Zoom; /* field of view in degrees */
S3D_Color m_BgColor; S3D_Color m_BgColor;
bool m_Draw3DAxis;
bool m_Draw3DModule;
bool m_Draw3DPlace;
bool m_Draw3DZone;
bool m_Draw3DComments;
bool m_Draw3DDrawings;
bool m_Draw3DEco1;
bool m_Draw3DEco2;
wxPoint m_BoardPos; wxPoint m_BoardPos;
wxSize m_BoardSize; wxSize m_BoardSize;
int m_Layers; int m_Layers;
...@@ -107,6 +115,8 @@ public: ...@@ -107,6 +115,8 @@ public:
void Draw3D_Track(TRACK * track); void Draw3D_Track(TRACK * track);
void Draw3D_Via(SEGVIA * via); void Draw3D_Via(SEGVIA * via);
void Draw3D_DrawSegment(DRAWSEGMENT * segment); void Draw3D_DrawSegment(DRAWSEGMENT * segment);
void Draw3D_DrawText(TEXTE_PCB * text);
//int Get3DLayerEnable(int act_layer);
DECLARE_EVENT_TABLE() DECLARE_EVENT_TABLE()
}; };
...@@ -151,6 +161,14 @@ public: ...@@ -151,6 +161,14 @@ public:
void NewDisplay(); void NewDisplay();
void Set3DBgColor(); void Set3DBgColor();
void Set3DAxisOnOff();
void Set3DModuleOnOff();
void Set3DPlaceOnOff();
void Set3DZoneOnOff();
void Set3DCommentsOnOff();
void Set3DDrawingsOnOff();
void Set3DEco1OnOff();
void Set3DEco2OnOff();
DECLARE_EVENT_TABLE() DECLARE_EVENT_TABLE()
}; };
......
...@@ -15,7 +15,7 @@ OBJECTS= \ ...@@ -15,7 +15,7 @@ OBJECTS= \
common_plotHPGL_functions.o\ common_plotHPGL_functions.o\
hotkeys_basic.o\ hotkeys_basic.o\
drawtxt.o \ drawtxt.o \
infospgm.o\ about_kicad.o\
wxwineda.o \ wxwineda.o \
string.o \ string.o \
gr_basic.o\ gr_basic.o\
......
...@@ -852,6 +852,14 @@ enum main_id { ...@@ -852,6 +852,14 @@ enum main_id {
ID_MOVE3D_UP, ID_MOVE3D_UP,
ID_MOVE3D_DOWN, ID_MOVE3D_DOWN,
ID_MENU3D_BGCOLOR_SELECTION, ID_MENU3D_BGCOLOR_SELECTION,
ID_MENU3D_AXIS_ONOFF,
ID_MENU3D_MODULE_ONOFF,
ID_MENU3D_PLACE_ONOFF,
ID_MENU3D_ZONE_ONOFF,
ID_MENU3D_DRAWINGS_ONOFF,
ID_MENU3D_COMMENTS_ONOFF,
ID_MENU3D_ECO1_ONOFF,
ID_MENU3D_ECO2_ONOFF,
ID_3D_UNUSED0, ID_3D_UNUSED0,
ID_3D_UNUSED1, ID_3D_UNUSED1,
ID_3D_UNUSED2, ID_3D_UNUSED2,
......
No preview for this file type
This diff is collapsed.
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// Name: dialog_gendrill.cpp // Name: dialog_gendrill.cpp
// Purpose: // Purpose:
// Author: jean-pierre Charras // Author: jean-pierre Charras
// Modified by: // Modified by:
// Created: 13/01/2008 17:26:27 // Created: 13/01/2008 17:26:27
// RCS-ID: // RCS-ID:
// Copyright: License GNU // Copyright: License GNU
// Licence: // Licence:
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// Generated by DialogBlocks (unregistered), 13/01/2008 17:26:27 // Generated by DialogBlocks (unregistered), 13/01/2008 17:26:27
...@@ -53,7 +53,7 @@ BEGIN_EVENT_TABLE( WinEDA_DrillFrame, wxDialog ) ...@@ -53,7 +53,7 @@ BEGIN_EVENT_TABLE( WinEDA_DrillFrame, wxDialog )
EVT_BUTTON( wxID_OK, WinEDA_DrillFrame::OnOkClick ) EVT_BUTTON( wxID_OK, WinEDA_DrillFrame::OnOkClick )
EVT_BUTTON( wxID_CLOSE, WinEDA_DrillFrame::OnCloseClick ) EVT_BUTTON( wxID_CANCEL, WinEDA_DrillFrame::OnCancelClick )
////@end WinEDA_DrillFrame event table entries ////@end WinEDA_DrillFrame event table entries
...@@ -139,6 +139,8 @@ void WinEDA_DrillFrame::Init() ...@@ -139,6 +139,8 @@ void WinEDA_DrillFrame::Init()
m_ThroughViasInfoMsg = NULL; m_ThroughViasInfoMsg = NULL;
m_MicroViasInfoMsg = NULL; m_MicroViasInfoMsg = NULL;
m_BuriedViasInfoMsg = NULL; m_BuriedViasInfoMsg = NULL;
m_OkButton = NULL;
m_CancelButton = NULL;
////@end WinEDA_DrillFrame member initialisation ////@end WinEDA_DrillFrame member initialisation
} }
...@@ -148,9 +150,9 @@ void WinEDA_DrillFrame::Init() ...@@ -148,9 +150,9 @@ void WinEDA_DrillFrame::Init()
*/ */
void WinEDA_DrillFrame::CreateControls() void WinEDA_DrillFrame::CreateControls()
{ {
////@begin WinEDA_DrillFrame content construction ////@begin WinEDA_DrillFrame content construction
// Generated by DialogBlocks, 14/01/2008 08:32:06 (unregistered) // Generated by DialogBlocks, 12/08/2008 13:05:18 (unregistered)
WinEDA_DrillFrame* itemDialog1 = this; WinEDA_DrillFrame* itemDialog1 = this;
...@@ -174,6 +176,8 @@ void WinEDA_DrillFrame::CreateControls() ...@@ -174,6 +176,8 @@ void WinEDA_DrillFrame::CreateControls()
m_Choice_Zeros_FormatStrings.Add(_("keep zeros")); m_Choice_Zeros_FormatStrings.Add(_("keep zeros"));
m_Choice_Zeros_Format = new wxRadioBox( itemDialog1, ID_SEL_ZEROS_FMT, _("Zeros Format"), wxDefaultPosition, wxDefaultSize, m_Choice_Zeros_FormatStrings, 1, wxRA_SPECIFY_COLS ); m_Choice_Zeros_Format = new wxRadioBox( itemDialog1, ID_SEL_ZEROS_FMT, _("Zeros Format"), wxDefaultPosition, wxDefaultSize, m_Choice_Zeros_FormatStrings, 1, wxRA_SPECIFY_COLS );
m_Choice_Zeros_Format->SetSelection(0); m_Choice_Zeros_Format->SetSelection(0);
if (WinEDA_DrillFrame::ShowToolTips())
m_Choice_Zeros_Format->SetToolTip(_("Choose EXCELLON numbers notation"));
m_LeftBoxSizer->Add(m_Choice_Zeros_Format, 0, wxALIGN_LEFT|wxALL, 5); m_LeftBoxSizer->Add(m_Choice_Zeros_Format, 0, wxALIGN_LEFT|wxALL, 5);
wxArrayString m_Choice_PrecisionStrings; wxArrayString m_Choice_PrecisionStrings;
...@@ -181,6 +185,8 @@ void WinEDA_DrillFrame::CreateControls() ...@@ -181,6 +185,8 @@ void WinEDA_DrillFrame::CreateControls()
m_Choice_PrecisionStrings.Add(_("2:4")); m_Choice_PrecisionStrings.Add(_("2:4"));
m_Choice_Precision = new wxRadioBox( itemDialog1, ID_SEL_PRECISION, _("Precision"), wxDefaultPosition, wxDefaultSize, m_Choice_PrecisionStrings, 1, wxRA_SPECIFY_COLS ); m_Choice_Precision = new wxRadioBox( itemDialog1, ID_SEL_PRECISION, _("Precision"), wxDefaultPosition, wxDefaultSize, m_Choice_PrecisionStrings, 1, wxRA_SPECIFY_COLS );
m_Choice_Precision->SetSelection(0); m_Choice_Precision->SetSelection(0);
if (WinEDA_DrillFrame::ShowToolTips())
m_Choice_Precision->SetToolTip(_("Choose EXCELLON numbers precision"));
m_LeftBoxSizer->Add(m_Choice_Precision, 0, wxGROW|wxALL, 5); m_LeftBoxSizer->Add(m_Choice_Precision, 0, wxGROW|wxALL, 5);
wxArrayString m_Choice_Drill_OffsetStrings; wxArrayString m_Choice_Drill_OffsetStrings;
...@@ -188,6 +194,8 @@ void WinEDA_DrillFrame::CreateControls() ...@@ -188,6 +194,8 @@ void WinEDA_DrillFrame::CreateControls()
m_Choice_Drill_OffsetStrings.Add(_("auxiliary axis")); m_Choice_Drill_OffsetStrings.Add(_("auxiliary axis"));
m_Choice_Drill_Offset = new wxRadioBox( itemDialog1, ID_SEL_DRILL_SHEET, _("Drill Origin:"), wxDefaultPosition, wxDefaultSize, m_Choice_Drill_OffsetStrings, 1, wxRA_SPECIFY_COLS ); m_Choice_Drill_Offset = new wxRadioBox( itemDialog1, ID_SEL_DRILL_SHEET, _("Drill Origin:"), wxDefaultPosition, wxDefaultSize, m_Choice_Drill_OffsetStrings, 1, wxRA_SPECIFY_COLS );
m_Choice_Drill_Offset->SetSelection(0); m_Choice_Drill_Offset->SetSelection(0);
if (WinEDA_DrillFrame::ShowToolTips())
m_Choice_Drill_Offset->SetToolTip(_("Choose the coordinate origin: absolute or relative to the auxiliray axis"));
m_LeftBoxSizer->Add(m_Choice_Drill_Offset, 0, wxGROW|wxALL, 5); m_LeftBoxSizer->Add(m_Choice_Drill_Offset, 0, wxGROW|wxALL, 5);
wxBoxSizer* itemBoxSizer8 = new wxBoxSizer(wxVERTICAL); wxBoxSizer* itemBoxSizer8 = new wxBoxSizer(wxVERTICAL);
...@@ -199,6 +207,8 @@ void WinEDA_DrillFrame::CreateControls() ...@@ -199,6 +207,8 @@ void WinEDA_DrillFrame::CreateControls()
m_Choice_Drill_MapStrings.Add(_("drill sheet (PostScript)")); m_Choice_Drill_MapStrings.Add(_("drill sheet (PostScript)"));
m_Choice_Drill_Map = new wxRadioBox( itemDialog1, ID_SEL_DRILL_SHEET, _("Drill Sheet:"), wxDefaultPosition, wxDefaultSize, m_Choice_Drill_MapStrings, 1, wxRA_SPECIFY_COLS ); m_Choice_Drill_Map = new wxRadioBox( itemDialog1, ID_SEL_DRILL_SHEET, _("Drill Sheet:"), wxDefaultPosition, wxDefaultSize, m_Choice_Drill_MapStrings, 1, wxRA_SPECIFY_COLS );
m_Choice_Drill_Map->SetSelection(0); m_Choice_Drill_Map->SetSelection(0);
if (WinEDA_DrillFrame::ShowToolTips())
m_Choice_Drill_Map->SetToolTip(_("Creates a drill map in PS or HPGL format"));
itemBoxSizer8->Add(m_Choice_Drill_Map, 0, wxGROW|wxALL, 5); itemBoxSizer8->Add(m_Choice_Drill_Map, 0, wxGROW|wxALL, 5);
wxArrayString m_Choice_Drill_ReportStrings; wxArrayString m_Choice_Drill_ReportStrings;
...@@ -206,6 +216,8 @@ void WinEDA_DrillFrame::CreateControls() ...@@ -206,6 +216,8 @@ void WinEDA_DrillFrame::CreateControls()
m_Choice_Drill_ReportStrings.Add(_("Drill report")); m_Choice_Drill_ReportStrings.Add(_("Drill report"));
m_Choice_Drill_Report = new wxRadioBox( itemDialog1, ID_SEL_DRILL_REPORT, _("Drill Report:"), wxDefaultPosition, wxDefaultSize, m_Choice_Drill_ReportStrings, 1, wxRA_SPECIFY_COLS ); m_Choice_Drill_Report = new wxRadioBox( itemDialog1, ID_SEL_DRILL_REPORT, _("Drill Report:"), wxDefaultPosition, wxDefaultSize, m_Choice_Drill_ReportStrings, 1, wxRA_SPECIFY_COLS );
m_Choice_Drill_Report->SetSelection(0); m_Choice_Drill_Report->SetSelection(0);
if (WinEDA_DrillFrame::ShowToolTips())
m_Choice_Drill_Report->SetToolTip(_("Creates a plain text report"));
itemBoxSizer8->Add(m_Choice_Drill_Report, 0, wxGROW|wxALL, 5); itemBoxSizer8->Add(m_Choice_Drill_Report, 0, wxGROW|wxALL, 5);
wxStaticBox* itemStaticBoxSizer11Static = new wxStaticBox(itemDialog1, wxID_ANY, _("HPGL plotter Options:")); wxStaticBox* itemStaticBoxSizer11Static = new wxStaticBox(itemDialog1, wxID_ANY, _("HPGL plotter Options:"));
...@@ -234,6 +246,8 @@ void WinEDA_DrillFrame::CreateControls() ...@@ -234,6 +246,8 @@ void WinEDA_DrillFrame::CreateControls()
m_Check_Minimal = new wxCheckBox( itemDialog1, ID_CHECKBOX3, _("minimal header"), wxDefaultPosition, wxDefaultSize, 0 ); m_Check_Minimal = new wxCheckBox( itemDialog1, ID_CHECKBOX3, _("minimal header"), wxDefaultPosition, wxDefaultSize, 0 );
m_Check_Minimal->SetValue(false); m_Check_Minimal->SetValue(false);
if (WinEDA_DrillFrame::ShowToolTips())
m_Check_Minimal->SetToolTip(_("If checked, the EXCELLON header is minimal"));
itemStaticBoxSizer16->Add(m_Check_Minimal, 0, wxGROW|wxALL, 5); itemStaticBoxSizer16->Add(m_Check_Minimal, 0, wxGROW|wxALL, 5);
wxBoxSizer* itemBoxSizer19 = new wxBoxSizer(wxVERTICAL); wxBoxSizer* itemBoxSizer19 = new wxBoxSizer(wxVERTICAL);
...@@ -275,13 +289,14 @@ void WinEDA_DrillFrame::CreateControls() ...@@ -275,13 +289,14 @@ void WinEDA_DrillFrame::CreateControls()
itemBoxSizer19->Add(5, 5, 1, wxGROW|wxALL, 5); itemBoxSizer19->Add(5, 5, 1, wxGROW|wxALL, 5);
wxButton* itemButton31 = new wxButton( itemDialog1, wxID_OK, _("OK"), wxDefaultPosition, wxDefaultSize, 0 ); m_OkButton = new wxButton( itemDialog1, wxID_OK, _("OK"), wxDefaultPosition, wxDefaultSize, 0 );
itemButton31->SetForegroundColour(wxColour(156, 1, 5)); m_OkButton->SetDefault();
itemBoxSizer19->Add(itemButton31, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5); m_OkButton->SetForegroundColour(wxColour(156, 1, 5));
itemBoxSizer19->Add(m_OkButton, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
wxButton* itemButton32 = new wxButton( itemDialog1, wxID_CLOSE, _("&Close"), wxDefaultPosition, wxDefaultSize, 0 ); m_CancelButton = new wxButton( itemDialog1, wxID_CANCEL, _("Cancel"), wxDefaultPosition, wxDefaultSize, 0 );
itemButton32->SetForegroundColour(wxColour(16, 1, 205)); m_CancelButton->SetForegroundColour(wxColour(16, 1, 205));
itemBoxSizer19->Add(itemButton32, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5); itemBoxSizer19->Add(m_CancelButton, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
// Set validators // Set validators
m_Choice_Unit->SetValidator( wxGenericValidator(& s_Unit_Drill_is_Inch) ); m_Choice_Unit->SetValidator( wxGenericValidator(& s_Unit_Drill_is_Inch) );
...@@ -290,6 +305,7 @@ void WinEDA_DrillFrame::CreateControls() ...@@ -290,6 +305,7 @@ void WinEDA_DrillFrame::CreateControls()
m_Check_Minimal->SetValidator( wxGenericValidator(& Minimal) ); m_Check_Minimal->SetValidator( wxGenericValidator(& Minimal) );
////@end WinEDA_DrillFrame content construction ////@end WinEDA_DrillFrame content construction
SetFocus(); // Under wxGTK: mandatory to close dialog by the ESC key
InitDisplayParams(); InitDisplayParams();
} }
...@@ -318,10 +334,10 @@ void WinEDA_DrillFrame::OnOkClick( wxCommandEvent& event ) ...@@ -318,10 +334,10 @@ void WinEDA_DrillFrame::OnOkClick( wxCommandEvent& event )
* wxEVT_COMMAND_BUTTON_CLICKED event handler for wxID_CLOSE * wxEVT_COMMAND_BUTTON_CLICKED event handler for wxID_CLOSE
*/ */
void WinEDA_DrillFrame::OnCloseClick( wxCommandEvent& event ) void WinEDA_DrillFrame::OnCancelClick( wxCommandEvent& event )
{ {
UpdateConfig(); /* Save drill options: */ UpdateConfig(); /* Save drill options: */
Close( true ); // true is to force the frame to close event.Skip(); // Process the default cancel event (close dialog)
} }
...@@ -380,6 +396,6 @@ void WinEDA_DrillFrame::OnCloseWindow( wxCloseEvent& event ) ...@@ -380,6 +396,6 @@ void WinEDA_DrillFrame::OnCloseWindow( wxCloseEvent& event )
////@begin wxEVT_CLOSE_WINDOW event handler for ID_WINEDA_DRILLFRAME in WinEDA_DrillFrame. ////@begin wxEVT_CLOSE_WINDOW event handler for ID_WINEDA_DRILLFRAME in WinEDA_DrillFrame.
// Before editing this code, remove the block markers. // Before editing this code, remove the block markers.
event.Skip(); event.Skip();
////@end wxEVT_CLOSE_WINDOW event handler for ID_WINEDA_DRILLFRAME in WinEDA_DrillFrame. ////@end wxEVT_CLOSE_WINDOW event handler for ID_WINEDA_DRILLFRAME in WinEDA_DrillFrame.
} }
...@@ -47,7 +47,7 @@ class wxBoxSizer; ...@@ -47,7 +47,7 @@ class wxBoxSizer;
#define ID_CHECKBOX2 10011 #define ID_CHECKBOX2 10011
#define ID_CHECKBOX3 10012 #define ID_CHECKBOX3 10012
#define SYMBOL_WINEDA_DRILLFRAME_STYLE wxCAPTION|wxRESIZE_BORDER|wxSYSTEM_MENU|wxCLOSE_BOX|wxTAB_TRAVERSAL #define SYMBOL_WINEDA_DRILLFRAME_STYLE wxCAPTION|wxRESIZE_BORDER|wxSYSTEM_MENU|wxCLOSE_BOX|wxTAB_TRAVERSAL
#define SYMBOL_WINEDA_DRILLFRAME_TITLE _("WinEDA_DrillFrame") #define SYMBOL_WINEDA_DRILLFRAME_TITLE _("Drill Files Generation")
#define SYMBOL_WINEDA_DRILLFRAME_IDNAME ID_WINEDA_DRILLFRAME #define SYMBOL_WINEDA_DRILLFRAME_IDNAME ID_WINEDA_DRILLFRAME
#define SYMBOL_WINEDA_DRILLFRAME_SIZE wxSize(400, 300) #define SYMBOL_WINEDA_DRILLFRAME_SIZE wxSize(400, 300)
#define SYMBOL_WINEDA_DRILLFRAME_POSITION wxDefaultPosition #define SYMBOL_WINEDA_DRILLFRAME_POSITION wxDefaultPosition
...@@ -99,8 +99,8 @@ public: ...@@ -99,8 +99,8 @@ public:
/// wxEVT_COMMAND_BUTTON_CLICKED event handler for wxID_OK /// wxEVT_COMMAND_BUTTON_CLICKED event handler for wxID_OK
void OnOkClick( wxCommandEvent& event ); void OnOkClick( wxCommandEvent& event );
/// wxEVT_COMMAND_BUTTON_CLICKED event handler for wxID_CLOSE /// wxEVT_COMMAND_BUTTON_CLICKED event handler for wxID_CANCEL
void OnCloseClick( wxCommandEvent& event ); void OnCancelClick( wxCommandEvent& event );
////@end WinEDA_DrillFrame event handler declarations ////@end WinEDA_DrillFrame event handler declarations
...@@ -136,6 +136,8 @@ public: ...@@ -136,6 +136,8 @@ public:
wxStaticText* m_ThroughViasInfoMsg; wxStaticText* m_ThroughViasInfoMsg;
wxStaticText* m_MicroViasInfoMsg; wxStaticText* m_MicroViasInfoMsg;
wxStaticText* m_BuriedViasInfoMsg; wxStaticText* m_BuriedViasInfoMsg;
wxButton* m_OkButton;
wxButton* m_CancelButton;
////@end WinEDA_DrillFrame member variables ////@end WinEDA_DrillFrame member variables
private: private:
......
...@@ -128,6 +128,7 @@ ...@@ -128,6 +128,7 @@
<long name="locked">0</long> <long name="locked">0</long>
<string name="template-name">""</string> <string name="template-name">""</string>
<bool name="dirty">1</bool> <bool name="dirty">1</bool>
<long name="makefile-last-written">-8519680</long>
<string name="Compiler name">""</string> <string name="Compiler name">""</string>
<string name="Build mode">"Debug"</string> <string name="Build mode">"Debug"</string>
<string name="Unicode mode">"ANSI"</string> <string name="Unicode mode">"ANSI"</string>
...@@ -169,6 +170,8 @@ ...@@ -169,6 +170,8 @@
<string name="wxWidgets build command">"%AUTO%"</string> <string name="wxWidgets build command">"%AUTO%"</string>
<string name="wxWidgets clean command">"%AUTO%"</string> <string name="wxWidgets clean command">"%AUTO%"</string>
<string name="PATH variable">"%AUTO%"</string> <string name="PATH variable">"%AUTO%"</string>
<bool name="Suppress source rules">0</bool>
<bool name="Enable makefile generation">1</bool>
</document> </document>
</document> </document>
</data> </data>
...@@ -219,7 +222,7 @@ ...@@ -219,7 +222,7 @@
<string name="proxy-Implementation filename">"dialog_gendrill.cpp"</string> <string name="proxy-Implementation filename">"dialog_gendrill.cpp"</string>
<string name="proxy-Header filename">"dialog_gendrill.h"</string> <string name="proxy-Header filename">"dialog_gendrill.h"</string>
<string name="proxy-XRC filename">""</string> <string name="proxy-XRC filename">""</string>
<string name="proxy-Title">"WinEDA_DrillFrame"</string> <string name="proxy-Title">"Drill Files Generation"</string>
<bool name="proxy-Centre">1</bool> <bool name="proxy-Centre">1</bool>
<string name="proxy-Icon">""</string> <string name="proxy-Icon">""</string>
<bool name="proxy-Dialog units">0</bool> <bool name="proxy-Dialog units">0</bool>
...@@ -405,7 +408,7 @@ ...@@ -405,7 +408,7 @@
<string name="proxy-Items">"decimal format|suppress leading zeros|suppress trailing zeros|keep zeros"</string> <string name="proxy-Items">"decimal format|suppress leading zeros|suppress trailing zeros|keep zeros"</string>
<long name="proxy-Initial value">0</long> <long name="proxy-Initial value">0</long>
<string name="proxy-Help text">""</string> <string name="proxy-Help text">""</string>
<string name="proxy-Tooltip text">""</string> <string name="proxy-Tooltip text">"Choose EXCELLON numbers notation"</string>
<string name="proxy-Background colour">""</string> <string name="proxy-Background colour">""</string>
<string name="proxy-Foreground colour">""</string> <string name="proxy-Foreground colour">""</string>
<string name="proxy-Font">""</string> <string name="proxy-Font">""</string>
...@@ -469,7 +472,7 @@ ...@@ -469,7 +472,7 @@
<string name="proxy-Items">"2:3|2:4"</string> <string name="proxy-Items">"2:3|2:4"</string>
<long name="proxy-Initial value">0</long> <long name="proxy-Initial value">0</long>
<string name="proxy-Help text">""</string> <string name="proxy-Help text">""</string>
<string name="proxy-Tooltip text">""</string> <string name="proxy-Tooltip text">"Choose EXCELLON numbers precision"</string>
<string name="proxy-Background colour">""</string> <string name="proxy-Background colour">""</string>
<string name="proxy-Foreground colour">""</string> <string name="proxy-Foreground colour">""</string>
<string name="proxy-Font">""</string> <string name="proxy-Font">""</string>
...@@ -533,7 +536,7 @@ ...@@ -533,7 +536,7 @@
<string name="proxy-Items">"absolute|auxiliary axis"</string> <string name="proxy-Items">"absolute|auxiliary axis"</string>
<long name="proxy-Initial value">0</long> <long name="proxy-Initial value">0</long>
<string name="proxy-Help text">""</string> <string name="proxy-Help text">""</string>
<string name="proxy-Tooltip text">""</string> <string name="proxy-Tooltip text">"Choose the coordinate origin: absolute or relative to the auxiliray axis"</string>
<string name="proxy-Background colour">""</string> <string name="proxy-Background colour">""</string>
<string name="proxy-Foreground colour">""</string> <string name="proxy-Foreground colour">""</string>
<string name="proxy-Font">""</string> <string name="proxy-Font">""</string>
...@@ -623,7 +626,7 @@ ...@@ -623,7 +626,7 @@
<string name="proxy-Items">"None|drill sheet (HPGL)|drill sheet (PostScript)"</string> <string name="proxy-Items">"None|drill sheet (HPGL)|drill sheet (PostScript)"</string>
<long name="proxy-Initial value">0</long> <long name="proxy-Initial value">0</long>
<string name="proxy-Help text">""</string> <string name="proxy-Help text">""</string>
<string name="proxy-Tooltip text">""</string> <string name="proxy-Tooltip text">"Creates a drill map in PS or HPGL format"</string>
<string name="proxy-Background colour">""</string> <string name="proxy-Background colour">""</string>
<string name="proxy-Foreground colour">""</string> <string name="proxy-Foreground colour">""</string>
<string name="proxy-Font">""</string> <string name="proxy-Font">""</string>
...@@ -687,7 +690,7 @@ ...@@ -687,7 +690,7 @@
<string name="proxy-Items">"None|Drill report"</string> <string name="proxy-Items">"None|Drill report"</string>
<long name="proxy-Initial value">0</long> <long name="proxy-Initial value">0</long>
<string name="proxy-Help text">""</string> <string name="proxy-Help text">""</string>
<string name="proxy-Tooltip text">""</string> <string name="proxy-Tooltip text">"Creates a plain text report"</string>
<string name="proxy-Background colour">""</string> <string name="proxy-Background colour">""</string>
<string name="proxy-Foreground colour">""</string> <string name="proxy-Foreground colour">""</string>
<string name="proxy-Font">""</string> <string name="proxy-Font">""</string>
...@@ -1185,7 +1188,7 @@ ...@@ -1185,7 +1188,7 @@
<string name="proxy-Label">"minimal header"</string> <string name="proxy-Label">"minimal header"</string>
<bool name="proxy-Initial value">0</bool> <bool name="proxy-Initial value">0</bool>
<string name="proxy-Help text">""</string> <string name="proxy-Help text">""</string>
<string name="proxy-Tooltip text">""</string> <string name="proxy-Tooltip text">"If checked, the EXCELLON header is minimal"</string>
<string name="proxy-Data variable">"Minimal"</string> <string name="proxy-Data variable">"Minimal"</string>
<string name="proxy-Data validator">"wxGenericValidator(&amp; %VARIABLE%)"</string> <string name="proxy-Data validator">"wxGenericValidator(&amp; %VARIABLE%)"</string>
<string name="proxy-Data source">""</string> <string name="proxy-Data source">""</string>
...@@ -1860,9 +1863,9 @@ ...@@ -1860,9 +1863,9 @@
<bool name="proxy-Separate files">0</bool> <bool name="proxy-Separate files">0</bool>
<string name="proxy-Implementation filename">""</string> <string name="proxy-Implementation filename">""</string>
<string name="proxy-Header filename">""</string> <string name="proxy-Header filename">""</string>
<string name="proxy-Member variable name">""</string> <string name="proxy-Member variable name">"m_OkButton"</string>
<string name="proxy-Label">"OK"</string> <string name="proxy-Label">"OK"</string>
<bool name="proxy-Default">0</bool> <bool name="proxy-Default">1</bool>
<string name="proxy-Help text">""</string> <string name="proxy-Help text">""</string>
<string name="proxy-Tooltip text">""</string> <string name="proxy-Tooltip text">""</string>
<string name="proxy-Data variable">""</string> <string name="proxy-Data variable">""</string>
...@@ -1907,7 +1910,7 @@ ...@@ -1907,7 +1910,7 @@
<string name="proxy-Custom ctor arguments">""</string> <string name="proxy-Custom ctor arguments">""</string>
</document> </document>
<document> <document>
<string name="title">"wxButton: wxID_CLOSE"</string> <string name="title">"wxButton: wxID_CANCEL"</string>
<string name="type">"dialog-control-document"</string> <string name="type">"dialog-control-document"</string>
<string name="filename">""</string> <string name="filename">""</string>
<string name="icon-name">"dialogcontrol"</string> <string name="icon-name">"dialogcontrol"</string>
...@@ -1917,9 +1920,9 @@ ...@@ -1917,9 +1920,9 @@
<long name="locked">0</long> <long name="locked">0</long>
<string name="created">"13/1/2008"</string> <string name="created">"13/1/2008"</string>
<string name="proxy-type">"wbButtonProxy"</string> <string name="proxy-type">"wbButtonProxy"</string>
<string name="event-handler-0">"wxEVT_COMMAND_BUTTON_CLICKED|OnCloseClick|NONE||WinEDA_DrillFrame"</string> <string name="event-handler-0">"wxEVT_COMMAND_BUTTON_CLICKED|OnCancelClick|NONE||WinEDA_DrillFrame"</string>
<string name="proxy-Id name">"wxID_CLOSE"</string> <string name="proxy-Id name">"wxID_CANCEL"</string>
<long name="proxy-Id value">5001</long> <long name="proxy-Id value">5101</long>
<string name="proxy-Name">""</string> <string name="proxy-Name">""</string>
<string name="proxy-Class">"wxButton"</string> <string name="proxy-Class">"wxButton"</string>
<string name="proxy-Base class">"wxButton"</string> <string name="proxy-Base class">"wxButton"</string>
...@@ -1927,8 +1930,8 @@ ...@@ -1927,8 +1930,8 @@
<bool name="proxy-Separate files">0</bool> <bool name="proxy-Separate files">0</bool>
<string name="proxy-Implementation filename">""</string> <string name="proxy-Implementation filename">""</string>
<string name="proxy-Header filename">""</string> <string name="proxy-Header filename">""</string>
<string name="proxy-Member variable name">""</string> <string name="proxy-Member variable name">"m_CancelButton"</string>
<string name="proxy-Label">"&amp;Close"</string> <string name="proxy-Label">"Cancel"</string>
<bool name="proxy-Default">0</bool> <bool name="proxy-Default">0</bool>
<string name="proxy-Help text">""</string> <string name="proxy-Help text">""</string>
<string name="proxy-Tooltip text">""</string> <string name="proxy-Tooltip text">""</string>
......
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