Commit 37748ad2 authored by Brian Sidebotham's avatar Brian Sidebotham

* Final commit for eeschema options dialog tidyup + template field name improved editor

parents 40c27660 f8cea818
#.rst:
# CMakeParseArguments
# -------------------
#
#
#
# CMAKE_PARSE_ARGUMENTS(<prefix> <options> <one_value_keywords>
# <multi_value_keywords> args...)
#
# CMAKE_PARSE_ARGUMENTS() is intended to be used in macros or functions
# for parsing the arguments given to that macro or function. It
# processes the arguments and defines a set of variables which hold the
# values of the respective options.
#
# The <options> argument contains all options for the respective macro,
# i.e. keywords which can be used when calling the macro without any
# value following, like e.g. the OPTIONAL keyword of the install()
# command.
#
# The <one_value_keywords> argument contains all keywords for this macro
# which are followed by one value, like e.g. DESTINATION keyword of the
# install() command.
#
# The <multi_value_keywords> argument contains all keywords for this
# macro which can be followed by more than one value, like e.g. the
# TARGETS or FILES keywords of the install() command.
#
# When done, CMAKE_PARSE_ARGUMENTS() will have defined for each of the
# keywords listed in <options>, <one_value_keywords> and
# <multi_value_keywords> a variable composed of the given <prefix>
# followed by "_" and the name of the respective keyword. These
# variables will then hold the respective value from the argument list.
# For the <options> keywords this will be TRUE or FALSE.
#
# All remaining arguments are collected in a variable
# <prefix>_UNPARSED_ARGUMENTS, this can be checked afterwards to see
# whether your macro was called with unrecognized parameters.
#
# As an example here a my_install() macro, which takes similar arguments
# as the real install() command:
#
# ::
#
# function(MY_INSTALL)
# set(options OPTIONAL FAST)
# set(oneValueArgs DESTINATION RENAME)
# set(multiValueArgs TARGETS CONFIGURATIONS)
# cmake_parse_arguments(MY_INSTALL "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN} )
# ...
#
#
#
# Assume my_install() has been called like this:
#
# ::
#
# my_install(TARGETS foo bar DESTINATION bin OPTIONAL blub)
#
#
#
# After the cmake_parse_arguments() call the macro will have set the
# following variables:
#
# ::
#
# MY_INSTALL_OPTIONAL = TRUE
# MY_INSTALL_FAST = FALSE (this option was not used when calling my_install()
# MY_INSTALL_DESTINATION = "bin"
# MY_INSTALL_RENAME = "" (was not used)
# MY_INSTALL_TARGETS = "foo;bar"
# MY_INSTALL_CONFIGURATIONS = "" (was not used)
# MY_INSTALL_UNPARSED_ARGUMENTS = "blub" (no value expected after "OPTIONAL"
#
#
#
# You can then continue and process these variables.
#
# Keywords terminate lists of values, e.g. if directly after a
# one_value_keyword another recognized keyword follows, this is
# interpreted as the beginning of the new option. E.g.
# my_install(TARGETS foo DESTINATION OPTIONAL) would result in
# MY_INSTALL_DESTINATION set to "OPTIONAL", but MY_INSTALL_DESTINATION
# would be empty and MY_INSTALL_OPTIONAL would be set to TRUE therefor.
#=============================================================================
# Copyright 2010 Alexander Neundorf <neundorf@kde.org>
#
# Distributed under the OSI-approved BSD License (the "License");
# see accompanying file Copyright.txt for details.
#
# This software is distributed WITHOUT ANY WARRANTY; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the License for more information.
#=============================================================================
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
if(__CMAKE_PARSE_ARGUMENTS_INCLUDED)
return()
endif()
set(__CMAKE_PARSE_ARGUMENTS_INCLUDED TRUE)
function(CMAKE_PARSE_ARGUMENTS prefix _optionNames _singleArgNames _multiArgNames)
# first set all result variables to empty/FALSE
foreach(arg_name ${_singleArgNames} ${_multiArgNames})
set(${prefix}_${arg_name})
endforeach()
foreach(option ${_optionNames})
set(${prefix}_${option} FALSE)
endforeach()
set(${prefix}_UNPARSED_ARGUMENTS)
set(insideValues FALSE)
set(currentArgName)
# now iterate over all arguments and fill the result variables
foreach(currentArg ${ARGN})
list(FIND _optionNames "${currentArg}" optionIndex) # ... then this marks the end of the arguments belonging to this keyword
list(FIND _singleArgNames "${currentArg}" singleArgIndex) # ... then this marks the end of the arguments belonging to this keyword
list(FIND _multiArgNames "${currentArg}" multiArgIndex) # ... then this marks the end of the arguments belonging to this keyword
if(${optionIndex} EQUAL -1 AND ${singleArgIndex} EQUAL -1 AND ${multiArgIndex} EQUAL -1)
if(insideValues)
if("${insideValues}" STREQUAL "SINGLE")
set(${prefix}_${currentArgName} ${currentArg})
set(insideValues FALSE)
elseif("${insideValues}" STREQUAL "MULTI")
list(APPEND ${prefix}_${currentArgName} ${currentArg})
endif()
else()
list(APPEND ${prefix}_UNPARSED_ARGUMENTS ${currentArg})
endif()
else()
if(NOT ${optionIndex} EQUAL -1)
set(${prefix}_${currentArg} TRUE)
set(insideValues FALSE)
elseif(NOT ${singleArgIndex} EQUAL -1)
set(currentArgName ${currentArg})
set(${prefix}_${currentArgName})
set(insideValues "SINGLE")
elseif(NOT ${multiArgIndex} EQUAL -1)
set(currentArgName ${currentArg})
set(${prefix}_${currentArgName})
set(insideValues "MULTI")
endif()
endif()
endforeach()
# propagate the result variables to the caller:
foreach(arg_name ${_singleArgNames} ${_multiArgNames} ${_optionNames})
set(${prefix}_${arg_name} ${${prefix}_${arg_name}} PARENT_SCOPE)
endforeach()
set(${prefix}_UNPARSED_ARGUMENTS ${${prefix}_UNPARSED_ARGUMENTS} PARENT_SCOPE)
endfunction()
This diff is collapsed.
......@@ -91,7 +91,7 @@ unset(_PYTHON3_VERSIONS)
# Search for newest python version if python executable isn't found
if(NOT PYTHON_EXECUTABLE)
# If using the MINGW compiler, we mustn't find the standard python
# distribution because of multiple C-Runtime errors. We must instead
# use the Python-a-mingw-us distribution
......@@ -110,7 +110,7 @@ if(NOT PYTHON_EXECUTABLE)
else()
list( APPEND _Python_PPATHS [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\${_CURRENT_VERSION}\\InstallPath] )
endif()
foreach(_CURRENT_VERSION ${_Python_VERSIONS})
set(_Python_NAMES python${_CURRENT_VERSION})
if(WIN32)
......@@ -169,7 +169,7 @@ endif()
# handle the QUIETLY and REQUIRED arguments and set PYTHONINTERP_FOUND to TRUE if
# all listed variables are TRUE
include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(PythonInterp REQUIRED_VARS PYTHON_EXECUTABLE VERSION_VAR PYTHON_VERSION_STRING)
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(PythonInterp REQUIRED_VARS PYTHON_EXECUTABLE VERSION_VAR PYTHON_VERSION_STRING)
mark_as_advanced(PYTHON_EXECUTABLE)
This diff is collapsed.
......@@ -194,7 +194,7 @@ void PLOTTER::markerSquare( const wxPoint& position, int radius )
corner.y = position.y + r;
corner_list.push_back( corner );
PlotPoly( corner_list, NO_FILL );
PlotPoly( corner_list, NO_FILL, GetCurrentLineWidth() );
}
/**
......@@ -202,7 +202,7 @@ void PLOTTER::markerSquare( const wxPoint& position, int radius )
*/
void PLOTTER::markerCircle( const wxPoint& position, int radius )
{
Circle( position, radius * 2, NO_FILL );
Circle( position, radius * 2, NO_FILL, GetCurrentLineWidth() );
}
/**
......@@ -228,7 +228,7 @@ void PLOTTER::markerLozenge( const wxPoint& position, int radius )
corner.y = position.y + radius;
corner_list.push_back( corner );
PlotPoly( corner_list, NO_FILL );
PlotPoly( corner_list, NO_FILL, GetCurrentLineWidth() );
}
/**
......@@ -354,8 +354,8 @@ void PLOTTER::Marker( const wxPoint& position, int diametre, unsigned aShapeId )
};
if( aShapeId >= MARKER_COUNT )
{
// Fallback shape
markerCircle( position, radius );
// Fallback shape
markerCircle( position, radius );
}
else
{
......@@ -376,7 +376,6 @@ void PLOTTER::Marker( const wxPoint& position, int diametre, unsigned aShapeId )
if( pat & 0100 )
markerCircle( position, radius );
}
}
......
......@@ -168,8 +168,7 @@ void EDA_DRAW_PANEL_GAL::Refresh( bool aEraseBackground, const wxRect* aRect )
if( delta >= MinRefreshPeriod )
{
wxPaintEvent redrawEvent;
wxPostEvent( this, redrawEvent );
ForceRefresh();
m_pendingRefresh = true;
}
else
......@@ -181,6 +180,13 @@ void EDA_DRAW_PANEL_GAL::Refresh( bool aEraseBackground, const wxRect* aRect )
}
void EDA_DRAW_PANEL_GAL::ForceRefresh()
{
wxPaintEvent redrawEvent;
wxPostEvent( this, redrawEvent );
}
void EDA_DRAW_PANEL_GAL::SetEventDispatcher( TOOL_DISPATCHER* aEventDispatcher )
{
m_eventDispatcher = aEventDispatcher;
......
......@@ -168,6 +168,8 @@ void COMPONENTS_LISTBOX::OnChar( wxKeyEvent& event )
break;
}
}
event.Skip();
}
......
......@@ -286,4 +286,6 @@ void FOOTPRINTS_LISTBOX::OnChar( wxKeyEvent& event )
break;
}
}
event.Skip();
}
......@@ -213,6 +213,8 @@ void LIBRARY_LISTBOX::OnChar( wxKeyEvent& event )
break;
}
}
event.Skip();
}
......
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Apr 10 2012)
// C++ code generated with wxFormBuilder (version Jun 6 2014)
// http://www.wxformbuilder.org/
//
// PLEASE DO "NOT" EDIT THIS FILE!
......@@ -205,7 +205,7 @@ DIALOG_ANNOTATE_BASE::DIALOG_ANNOTATE_BASE( wxWindow* parent, wxWindowID id, con
m_btnClear = new wxButton( this, ID_CLEAR_ANNOTATION_CMP, _("Clear Annotation"), wxDefaultPosition, wxDefaultSize, 0 );
bButtonsSizer->Add( m_btnClear, 0, wxALL|wxEXPAND, 5 );
m_btnApply = new wxButton( this, wxID_APPLY, _("Annotation"), wxDefaultPosition, wxDefaultSize, 0 );
m_btnApply = new wxButton( this, wxID_APPLY, _("Annotate"), wxDefaultPosition, wxDefaultSize, 0 );
bButtonsSizer->Add( m_btnApply, 0, wxALL|wxEXPAND, 5 );
......
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<wxFormBuilder_Project>
<FileVersion major="1" minor="11" />
<FileVersion major="1" minor="13" />
<object class="Project" expanded="1">
<property name="class_decoration"></property>
<property name="code_generation">C++</property>
......@@ -20,8 +20,10 @@
<property name="path">.</property>
<property name="precompiled_header"></property>
<property name="relative_path">1</property>
<property name="skip_lua_events">1</property>
<property name="skip_php_events">1</property>
<property name="skip_python_events">1</property>
<property name="ui_table">UI</property>
<property name="use_enum">0</property>
<property name="use_microsoft_bom">0</property>
<object class="Dialog" expanded="1">
......@@ -42,7 +44,7 @@
<property name="minimum_size"></property>
<property name="name">DIALOG_ANNOTATE_BASE</property>
<property name="pos"></property>
<property name="size">432,454</property>
<property name="size">432,550</property>
<property name="style">wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER</property>
<property name="subclass">DIALOG_SHIM; dialog_shim.h</property>
<property name="title">Annotate Schematic</property>
......@@ -2398,7 +2400,7 @@
<property name="gripper">0</property>
<property name="hidden">0</property>
<property name="id">wxID_APPLY</property>
<property name="label">Annotation</property>
<property name="label">Annotate</property>
<property name="max_size"></property>
<property name="maximize_button">0</property>
<property name="maximum_size"></property>
......
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Apr 10 2012)
// C++ code generated with wxFormBuilder (version Jun 6 2014)
// http://www.wxformbuilder.org/
//
// PLEASE DO "NOT" EDIT THIS FILE!
......@@ -11,6 +11,8 @@
#include <wx/artprov.h>
#include <wx/xrc/xmlres.h>
#include <wx/intl.h>
class DIALOG_SHIM;
#include "dialog_shim.h"
#include <wx/string.h>
#include <wx/stattext.h>
......@@ -81,7 +83,7 @@ class DIALOG_ANNOTATE_BASE : public DIALOG_SHIM
public:
DIALOG_ANNOTATE_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Annotate Schematic"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 432,454 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
DIALOG_ANNOTATE_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Annotate Schematic"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 432,550 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
~DIALOG_ANNOTATE_BASE();
};
......
......@@ -49,7 +49,7 @@ DIALOG_CHOOSE_COMPONENT::DIALOG_CHOOSE_COMPONENT( SCH_BASE_FRAME* aParent, const
m_searchBox->SetFocus();
m_componentDetails->SetEditable( false );
#if wxCHECK_VERSION( 3, 0, 0 )
#if wxCHECK_VERSION( 3, 0, 0 )
m_libraryComponentTree->ScrollTo( m_libraryComponentTree->GetFocusedItem() );
#endif
......@@ -76,7 +76,7 @@ LIB_ALIAS* DIALOG_CHOOSE_COMPONENT::GetSelectedAlias( int* aUnit ) const
void DIALOG_CHOOSE_COMPONENT::OnSearchBoxChange( wxCommandEvent& aEvent )
{
m_search_container->UpdateSearchTerm( m_searchBox->GetLineText(0) );
m_search_container->UpdateSearchTerm( m_searchBox->GetLineText( 0 ) );
updateSelection();
m_searchBox->SetFocus();
}
......@@ -114,7 +114,7 @@ void DIALOG_CHOOSE_COMPONENT::OnInterceptSearchBoxKey( wxKeyEvent& aKeyStroke )
selectIfValid( GetNextItem( *m_libraryComponentTree, sel ) );
break;
// The follwoing keys we can only hijack if they are not needed by the textbox itself.
// The following keys we can only hijack if they are not needed by the textbox itself.
case WXK_LEFT:
if( m_searchBox->GetInsertionPoint() == 0 )
......@@ -215,31 +215,58 @@ bool DIALOG_CHOOSE_COMPONENT::updateSelection()
font_bold.SetWeight( wxFONTWEIGHT_BOLD );
wxTextAttr headline_attribute;
headline_attribute.SetFont(font_bold);
headline_attribute.SetFont( font_bold );
wxTextAttr text_attribute;
text_attribute.SetFont(font_normal);
text_attribute.SetFont( font_normal );
const wxString name = selection->GetName();
if ( !name.empty() )
{
m_componentDetails->SetDefaultStyle( headline_attribute );
m_componentDetails->AppendText( name );
}
const wxString description = selection->GetDescription();
if( !description.empty() )
{
if ( !m_componentDetails->IsEmpty() )
m_componentDetails->AppendText( wxT( "\n\n" ) );
m_componentDetails->SetDefaultStyle( headline_attribute );
m_componentDetails->AppendText( _("Description\n") );
m_componentDetails->AppendText( _( "Description\n" ) );
m_componentDetails->SetDefaultStyle( text_attribute );
m_componentDetails->AppendText( description );
m_componentDetails->AppendText( wxT("\n\n") );
}
const wxString keywords = selection->GetKeyWords();
if( !keywords.empty() )
{
if ( !m_componentDetails->IsEmpty() )
m_componentDetails->AppendText( wxT( "\n\n" ) );
m_componentDetails->SetDefaultStyle( headline_attribute );
m_componentDetails->AppendText( _("Keywords\n") );
m_componentDetails->AppendText( _( "Keywords\n" ) );
m_componentDetails->SetDefaultStyle( text_attribute );
m_componentDetails->AppendText( keywords );
}
if ( !selection->IsRoot() )
{
LIB_PART* root_part = selection->GetPart();
const wxString root_component_name( root_part ? root_part->GetName() : _( "Unknown" ) );
if ( !m_componentDetails->IsEmpty() )
m_componentDetails->AppendText( wxT( "\n\n" ) );
m_componentDetails->SetDefaultStyle( headline_attribute );
m_componentDetails->AppendText( _( "Alias of " ) );
m_componentDetails->SetDefaultStyle( text_attribute );
m_componentDetails->AppendText( root_component_name );
}
m_componentDetails->SetInsertionPoint( 0 ); // scroll up.
m_componentDetails->Thaw();
......@@ -250,18 +277,39 @@ bool DIALOG_CHOOSE_COMPONENT::updateSelection()
void DIALOG_CHOOSE_COMPONENT::OnHandlePreviewRepaint( wxPaintEvent& aRepaintEvent )
{
int unit = 0;
LIB_ALIAS* selection = m_search_container->GetSelectedAlias( &unit );
LIB_ALIAS* selection = m_search_container->GetSelectedAlias( &unit );
LIB_PART* part = selection ? selection->GetPart() : NULL;
// Don't draw anything (not even the background) if we don't have
// a part to show
if( !part )
return;
renderPreview( selection ? selection->GetPart() : NULL, unit );
if( selection->IsRoot() )
{
// just show the part directly
renderPreview( part, unit );
}
else
{
// switch out the name temporarily for the alias name
wxString tmp( part->GetName() );
part->SetName( selection->GetName() );
renderPreview( part, unit );
part->SetName( tmp );
}
}
// Render the preview in our m_componentView. If this gets more complicated, we should
// probably have a derived class from wxPanel; but this keeps things local.
void DIALOG_CHOOSE_COMPONENT::renderPreview( LIB_PART* aComponent, int aUnit )
void DIALOG_CHOOSE_COMPONENT::renderPreview( LIB_PART* aComponent, int aUnit )
{
wxPaintDC dc( m_componentView );
EDA_COLOR_T bgcolor = m_parent->GetDrawBgColor();
dc.SetBackground( bgcolor == BLACK ? *wxBLACK_BRUSH : *wxWHITE_BRUSH );
dc.Clear();
......@@ -323,6 +371,7 @@ static wxTreeItemId GetNextItem( const wxTreeCtrl& tree, const wxTreeItemId& ite
for ( wxTreeItemId walk = item; walk.IsOk(); walk = tree.GetItemParent( walk ) )
{
nextItem = tree.GetNextSibling( walk );
if( nextItem.IsOk() )
break;
}
......
......@@ -42,11 +42,6 @@ DIALOG_EESCHEMA_OPTIONS::DIALOG_EESCHEMA_OPTIONS( wxWindow* parent ) :
// Dialog should not shrink beyond it's minimal size.
GetSizer()->SetSizeHints( this );
// The width returned by GetSize includes the amount taken up by the scroll bar, remove the
// scrollbar width
int listWidth = templateFieldListCtrl->GetSize().GetWidth() - 1;
// - wxSystemSettings::GetMetric( wxSYS_HSCROLL_Y );
wxListItem col0;
col0.SetId( 0 );
col0.SetText( _( "Field Name" ) );
......@@ -69,7 +64,8 @@ DIALOG_EESCHEMA_OPTIONS::DIALOG_EESCHEMA_OPTIONS( wxWindow* parent ) :
// Invalid field selected and don't ignore selection events because
// they'll be from the user
selectedField = -1;
selectedField = 0;
selectionValid = false;
ignoreSelection = false;
// Make sure we select the first tab of the options tab page
......@@ -78,9 +74,14 @@ DIALOG_EESCHEMA_OPTIONS::DIALOG_EESCHEMA_OPTIONS( wxWindow* parent ) :
// Connect the edit controls for the template field names to the kill focus event which
// doesn't propogate, hence the need to connect it here.
fieldNameTextCtrl->Connect( wxEVT_KILL_FOCUS, wxFocusEventHandler( DIALOG_EESCHEMA_OPTIONS::OnEditControlKillFocus ), NULL, this );
fieldDefaultValueTextCtrl->Connect( wxEVT_KILL_FOCUS, wxFocusEventHandler( DIALOG_EESCHEMA_OPTIONS::OnEditControlKillFocus ), NULL, this );
fieldVisibleCheckbox->Connect( wxEVT_KILL_FOCUS, wxFocusEventHandler( DIALOG_EESCHEMA_OPTIONS::OnEditControlKillFocus ), NULL, this );
fieldNameTextCtrl->Connect( wxEVT_KILL_FOCUS,
wxFocusEventHandler( DIALOG_EESCHEMA_OPTIONS::OnEditControlKillFocus ), NULL, this );
fieldDefaultValueTextCtrl->Connect( wxEVT_KILL_FOCUS,
wxFocusEventHandler( DIALOG_EESCHEMA_OPTIONS::OnEditControlKillFocus ), NULL, this );
fieldVisibleCheckbox->Connect( wxEVT_KILL_FOCUS,
wxFocusEventHandler( DIALOG_EESCHEMA_OPTIONS::OnEditControlKillFocus ), NULL, this );
}
......@@ -203,7 +204,7 @@ void DIALOG_EESCHEMA_OPTIONS::OnAddButtonClick( wxCommandEvent& event )
{
// If there is currently a valid selection, copy the edit panel to the
// selected field so as not to lose the data
if( ( selectedField >= 0 ) && ( selectedField < templateFields.size() ) )
if( selectionValid && ( selectedField < templateFields.size() ) )
copyPanelToSelected();
// Add a new fieldname to the fieldname list
......@@ -216,6 +217,7 @@ void DIALOG_EESCHEMA_OPTIONS::OnAddButtonClick( wxCommandEvent& event )
// Make sure any previously selected state is cleared and then select the
// new field
selectedField = templateFields.size() - 1;
selectionValid = true;
// Update the display to reflect the new data
RefreshTemplateFieldView();
......@@ -230,7 +232,7 @@ void DIALOG_EESCHEMA_OPTIONS::OnDeleteButtonClick( wxCommandEvent& event )
{
// If there is currently a valid selection, delete the template field from
// the template field list
if( ( selectedField >= 0 ) && ( selectedField < templateFields.size() ) )
if( selectionValid && ( selectedField < templateFields.size() ) )
{
// Delete the fieldname from the fieldname list
templateFields.erase( templateFields.begin() + selectedField );
......@@ -252,7 +254,7 @@ void DIALOG_EESCHEMA_OPTIONS::OnDeleteButtonClick( wxCommandEvent& event )
void DIALOG_EESCHEMA_OPTIONS::copyPanelToSelected( void )
{
if( ( selectedField < 0 ) || ( selectedField >= templateFields.size() ) )
if( !selectionValid || ( selectedField >= templateFields.size() ) )
return;
// Update the template field from the edit panel
......@@ -272,7 +274,7 @@ void DIALOG_EESCHEMA_OPTIONS::OnEditControlKillFocus( wxFocusEvent& event )
void DIALOG_EESCHEMA_OPTIONS::copySelectedToPanel( void )
{
if( ( selectedField < 0 ) || ( selectedField >= templateFields.size() ) )
if( !selectionValid || ( selectedField >= templateFields.size() ) )
return;
// Update the panel data from the selected template field
......@@ -298,6 +300,7 @@ void DIALOG_EESCHEMA_OPTIONS::OnTemplateFieldSelected( wxListEvent& event )
// Now update the selected field and copy the data from the field to the
// edit panel
selectedField = event.GetIndex();
selectionValid = true;
copySelectedToPanel();
// Refresh the template field view - this deletes all fields and then
......
......@@ -42,7 +42,10 @@ protected:
/** @brief The current row selected in the template fieldname wxListCtrl which is also in the
edit panel */
int selectedField;
size_t selectedField;
/** @brief The selectedField value is only valid when this bool is set to true */
bool selectionValid;
/** @brief Set to true internally when OnTemplateFieldSelected() an event needs to be
ignored */
......@@ -70,7 +73,17 @@ protected:
* Deletes the selected template fieldname from the template fieldnames data
*/
void OnDeleteButtonClick( wxCommandEvent& event );
void OnInitDialog( wxInitDialogEvent& event );
/**
* Function OnEditControlKillFocus
* This Focus Event Handler should be connected to any controls in the template field edit box
* so that any loss of focus results in the data being saved to the currently selected template
* field
*
* @param event The wxWidgets produced event information
*
* Copies data from the edit box to the selected field template
*/
void OnEditControlKillFocus( wxFocusEvent& event );
/**
......@@ -123,6 +136,11 @@ protected:
void SelectTemplateField( int aItem );
public:
/**
* Public constructor
*
* @param parent The dialog's parent
*/
DIALOG_EESCHEMA_OPTIONS( wxWindow* parent );
/**
......@@ -171,73 +189,242 @@ public:
*/
void SetBusWidth( int aWidth ) { m_spinBusWidth->SetValue( aWidth ); }
/**
* Function SetLineWidth
* Sets the current LineWidth value in the dialog
* @param aWidth The line width to set in the dialog
*/
void SetLineWidth( int aWidth ) { m_spinLineWidth->SetValue( aWidth ); }
/**
* Function GetLineWidth
* Returns the current LineWidth value from the dialog
*/
int GetLineWidth( void ) { return m_spinLineWidth->GetValue(); }
/**
* Function SetTextSize
* Sets the current default TextSize value in the dialog
* @param text_size The text size to set in the dialog
*/
void SetTextSize( int text_size ) { m_spinTextSize->SetValue( text_size ); }
/**
* Function GetTextSize
* Returns the current default TextSize value from the dialog
*/
int GetTextSize( void ) { return m_spinTextSize->GetValue(); }
/**
* Function SetRepeatHorizontal
* Sets the current RepeatHorizontal displacement value in the dialog
* @param displacement The displacement to set in the dialog
*/
void SetRepeatHorizontal( int displacement )
{
m_spinRepeatHorizontal->SetValue( displacement );
}
/**
* Function GetRepeatHorizontal
* Returns the current RepeatHorizontal displacement value from the dialog
*/
int GetRepeatHorizontal( void ) { return m_spinRepeatHorizontal->GetValue(); }
/**
* Function SetRepeatVertical
* Sets the current RepeatVertical displacement value in the dialog
* @param displacement The displacement to set in the dialog
*/
void SetRepeatVertical( int displacement ) { m_spinRepeatVertical->SetValue( displacement ); }
/**
* Function GetRepeatVertical
* Returns the current RepeatVertical displacement value from the dialog
*/
int GetRepeatVertical( void ) { return m_spinRepeatVertical->GetValue(); }
/**
* Function SetRepeatLabel
* Sets the current RepeatLabel increment value in the dialog
* @param increment The increment to set in the dialog
*/
void SetRepeatLabel( int increment ) { m_spinRepeatLabel->SetValue( increment ); }
/**
* Function GetRepeatLabel
* Returns the current RepeatLabel increment value from the dialog
*/
int GetRepeatLabel( void ) { return m_spinRepeatLabel->GetValue(); }
/**
* Function SetAutoSaveInterval
* Sets the current AutoSaveInterval value in the dialog
* @param aInterval The interval to set in the dialog
*/
void SetAutoSaveInterval( int aInterval ) { m_spinAutoSaveInterval->SetValue( aInterval ); }
/**
* Function GetAutoSaveInterval
* Returns the current AutoSaveInterval value from the dialog
*/
int GetAutoSaveInterval() const { return m_spinAutoSaveInterval->GetValue(); }
/**
* Function SetRefIdSeparator
* Sets the current RefIdSeparator value in the dialog
* @param aSep The seperator to use between the reference and the part ID
* @param aFirstId The first part ID, currently either 'A' or '1'
*/
void SetRefIdSeparator( wxChar aSep, wxChar aFirstId);
/**
* Function GetRefIdSeparator
* Returns the current RefIdSeparator value from the dialog
* @param aSep The OUTPUT seperator value
* @param aFirstId The OUTPUT reference first ID
*/
void GetRefIdSeparator( int& aSep, int& aFirstId);
/**
* Function SetShowGrid
* Sets the current ShowGrid value in the dialog
* @param show The ShowGrid value to set in the dialog
*/
void SetShowGrid( bool show ) { m_checkShowGrid->SetValue( show ); }
/**
* Function GetShowGrid
* Returns the current ShowGrid value from the dialog
*/
bool GetShowGrid( void ) { return m_checkShowGrid->GetValue(); }
/**
* Function SetShowHiddenPins
* Sets the current ShowHiddenPins value in the dialog
* @param show The ShowHiddenPins value to set in the dialog
*/
void SetShowHiddenPins( bool show ) { m_checkShowHiddenPins->SetValue( show ); }
/**
* Function GetShowHiddenPins
* Returns the current ShowHiddenPins value from the dialog
*/
bool GetShowHiddenPins( void ) { return m_checkShowHiddenPins->GetValue(); }
/**
* Function SetEnableZoomNoCenter
* Sets the current ZoomNoCenter value in the dialog
* @param enable The ZoomNoCenter value to set in the dialog
*/
void SetEnableZoomNoCenter( bool enable )
{
m_checkEnableZoomNoCenter->SetValue( enable );
}
/**
* Function GetEnableZoomNoCenter
* Returns the current ZoomNoCenter value from the dialog
*/
bool GetEnableZoomNoCenter( void )
{
return m_checkEnableZoomNoCenter->GetValue();
}
/**
* Function SetEnableMiddleButtonPan
* Sets the current MiddleButtonPan value in the dialog
*
* @param enable The boolean value to set the MiddleButtonPan value in the dialog
*/
void SetEnableMiddleButtonPan( bool enable )
{
m_checkEnableMiddleButtonPan->SetValue( enable );
m_checkMiddleButtonPanLimited->Enable( enable );
}
/**
* Function GetEnableMiddleButtonPan
* Returns the current MiddleButtonPan setting from the dialog
*/
bool GetEnableMiddleButtonPan( void )
{
return m_checkEnableMiddleButtonPan->GetValue();
}
/**
* Function SetMiddleButtonPanLimited
* Sets the MiddleButtonPanLimited value in the dialog
*
* @param enable The boolean value to set the MiddleButtonPanLimted value in the dialog
*/
void SetMiddleButtonPanLimited( bool enable )
{
m_checkMiddleButtonPanLimited->SetValue( enable );
}
/**
* Function GetMiddleButtonPanLimited
* Returns the MiddleButtonPanLimited setting from the dialog
*/
bool GetMiddleButtonPanLimited( void )
{
return m_checkMiddleButtonPanLimited->GetValue();
}
/**
* Function SetEnableAutoPan
* Sets the AutoPan setting in the dialog
*
* @param enable The boolean value to set the AutoPan value in the dialog
*/
void SetEnableAutoPan( bool enable ) { m_checkAutoPan->SetValue( enable ); }
/**
* Function GetEnableAutoPan
* Return the AutoPan setting from the dialog
*/
bool GetEnableAutoPan( void ) { return m_checkAutoPan->GetValue(); }
/**
* Function SetEnableHVBusOrientation
* Set the HVBusOrientation setting in the dialog
*
* @param enable The boolean value to set the HVBusOrientation value in the dialog
*/
void SetEnableHVBusOrientation( bool enable ) { m_checkHVOrientation->SetValue( enable ); }
/**
* Function GetEnableHVBusOrientation
* Get the HVBusOrientation setting from the dialog
*/
bool GetEnableHVBusOrientation( void ) { return m_checkHVOrientation->GetValue(); }
/**
* Function
* Set the ShowPageLimits setting in the dialog
*/
void SetShowPageLimits( bool show ) { m_checkPageLimits->SetValue( show ); }
/**
* Function
* Return the current ShowPageLimits setting from the dialog
*/
bool GetShowPageLimits( void ) { return m_checkPageLimits->GetValue(); }
/**
* Function SetTemplateFields
* Set the template field data in the dialog
*
* @param aFields The template fieldnames that the dialog should start with before any editing
*/
void SetTemplateFields( const TEMPLATE_FIELDNAMES& aFields );
/**
* Function GetTemplateFields
* Get the dialog's template field data
*
*/
TEMPLATE_FIELDNAMES GetTemplateFields( void );
private:
......
......@@ -88,18 +88,7 @@ void DIALOG_ERC::Init()
m_WriteResultOpt->SetValue( m_writeErcFile );
SCH_SCREENS screens;
int markers = screens.GetMarkerCount();
int warnings = screens.GetMarkerCount( WAR );
wxString num;
num.Printf( wxT( "%d" ), markers );
m_TotalErrCount->SetLabel( num );
num.Printf( wxT( "%d" ), markers - warnings );
m_LastErrCount->SetLabel( num );
num.Printf( wxT( "%d" ), warnings );
m_LastWarningCount->SetLabel( num );
updateMarkerCounts( &screens );
DisplayERC_MarkersList();
......@@ -110,6 +99,24 @@ void DIALOG_ERC::Init()
m_buttonERC->SetDefault();
}
void DIALOG_ERC::updateMarkerCounts( SCH_SCREENS *screens )
{
int markers = screens->GetMarkerCount();
int warnings = screens->GetMarkerCount( WAR );
wxString num;
num.Printf( wxT( "%d" ), markers );
m_TotalErrCount->SetValue( num );
num.Printf( wxT( "%d" ), markers - warnings );
m_LastErrCount->SetValue( num );
num.Printf( wxT( "%d" ), warnings );
m_LastWarningCount->SetValue( num );
}
/* Delete the old ERC markers, over the whole hierarchy
*/
void DIALOG_ERC::OnEraseDrcMarkersClick( wxCommandEvent& event )
......@@ -117,6 +124,8 @@ void DIALOG_ERC::OnEraseDrcMarkersClick( wxCommandEvent& event )
SCH_SCREENS ScreenList;
ScreenList.DeleteAllMarkers( MARK_ERC );
updateMarkerCounts( &ScreenList );
m_MarkersList->ClearList();
m_parent->GetCanvas()->Refresh();
}
......@@ -154,6 +163,7 @@ void DIALOG_ERC::OnErcCmpClick( wxCommandEvent& event )
m_MessagesList->AppendText( messageList[ii] );
}
void DIALOG_ERC::OnLeftClickMarkersList( wxCommandEvent& event )
{
m_lastMarkerFound = NULL;
......@@ -173,6 +183,7 @@ void DIALOG_ERC::OnLeftClickMarkersList( wxCommandEvent& event )
for( sheet = SheetList.GetFirst(); sheet; sheet = SheetList.GetNext() )
{
SCH_ITEM* item = (SCH_ITEM*) sheet->LastDrawList();
for( ; item; item = item->Next() )
{
if( item == marker )
......@@ -216,7 +227,7 @@ void DIALOG_ERC::OnLeftDblClickMarkersList( wxCommandEvent& event )
if( m_lastMarkerFound )
{
m_parent->SetCrossHairPosition( m_lastMarkerFound->m_Pos );
m_parent->RedrawScreen( m_lastMarkerFound->m_Pos, true);
m_parent->RedrawScreen( m_lastMarkerFound->m_Pos, true );
// prevent a mouse left button release event in
// coming from the ERC dialog double click
// ( the button is released after closing this dialog and will generate
......@@ -231,8 +242,7 @@ void DIALOG_ERC::OnLeftDblClickMarkersList( wxCommandEvent& event )
void DIALOG_ERC::ReBuildMatrixPanel()
{
// Try to know the size of bitmap button used in drc matrix
wxBitmapButton * dummy = new wxBitmapButton( m_matrixPanel, wxID_ANY,
KiBitmap( ercerr_xpm ) );
wxBitmapButton * dummy = new wxBitmapButton( m_matrixPanel, wxID_ANY, KiBitmap( ercerr_xpm ) );
wxSize bitmap_size = dummy->GetSize();
delete dummy;
......@@ -289,30 +299,14 @@ void DIALOG_ERC::ReBuildMatrixPanel()
}
int event_id = ID_MATRIX_0 + ii + ( jj * PIN_NMAX );
BITMAP_DEF bitmap_butt = NULL;
// Add button on matrix
switch( diag )
{
case OK:
bitmap_butt = erc_green_xpm;
break;
case WAR:
bitmap_butt = ercwarn_xpm ;
break;
default:
case ERR:
bitmap_butt = ercerr_xpm;
break;
}
BITMAP_DEF bitmap_butt = erc_green_xpm;
delete m_buttonList[ii][jj];
m_buttonList[ii][jj] = new wxBitmapButton( m_matrixPanel,
event_id,
KiBitmap( bitmap_butt ),
wxPoint( x, y ) );
setDRCMatrixButtonState( m_buttonList[ii][jj], diag );
}
}
......@@ -320,12 +314,44 @@ void DIALOG_ERC::ReBuildMatrixPanel()
}
void DIALOG_ERC::setDRCMatrixButtonState( wxBitmapButton *aButton, int aState )
{
BITMAP_DEF bitmap_butt = NULL;
wxString tooltip;
switch( aState )
{
case OK:
bitmap_butt = erc_green_xpm;
tooltip = _( "No error or warning" );
break;
case WAR:
bitmap_butt = ercwarn_xpm;
tooltip = _( "Generate warning" );
break;
case ERR:
bitmap_butt = ercerr_xpm;
tooltip = _( "Generate error" );
break;
}
if( bitmap_butt )
{
aButton->SetBitmap( KiBitmap( bitmap_butt ) );
aButton->SetToolTip( tooltip );
}
}
void DIALOG_ERC::DisplayERC_MarkersList()
{
SCH_SHEET_LIST sheetList;
m_MarkersList->ClearList();
SCH_SHEET_PATH* sheet = sheetList.GetFirst();
for( ; sheet != NULL; sheet = sheetList.GetNext() )
{
SCH_ITEM* item = sheet->LastDrawList();
......@@ -351,7 +377,7 @@ void DIALOG_ERC::DisplayERC_MarkersList()
void DIALOG_ERC::ResetDefaultERCDiag( wxCommandEvent& event )
{
memcpy( DiagErc, DefaultDiagErc, sizeof(DiagErc) );
memcpy( DiagErc, DefaultDiagErc, sizeof( DiagErc ) );
ReBuildMatrixPanel();
}
......@@ -359,7 +385,6 @@ void DIALOG_ERC::ResetDefaultERCDiag( wxCommandEvent& event )
void DIALOG_ERC::ChangeErrorLevel( wxCommandEvent& event )
{
int id, level, ii, x, y;
BITMAP_DEF new_bitmap_butt = NULL;
wxPoint pos;
id = event.GetId();
......@@ -371,33 +396,25 @@ void DIALOG_ERC::ChangeErrorLevel( wxCommandEvent& event )
level = DiagErc[y][x];
//change to the next error level
switch( level )
{
case OK:
level = WAR;
new_bitmap_butt = ercwarn_xpm;
break;
case WAR:
level = ERR;
new_bitmap_butt = ercerr_xpm;
break;
case ERR:
level = OK;
new_bitmap_butt = erc_green_xpm;
break;
}
if( new_bitmap_butt )
{
delete butt;
butt = new wxBitmapButton( m_matrixPanel, id,
KiBitmap( new_bitmap_butt ), pos );
setDRCMatrixButtonState( butt, level);
m_buttonList[y][x] = butt;
DiagErc[y][x] = DiagErc[x][y] = level;
}
DiagErc[y][x] = DiagErc[x][y] = level;
}
......@@ -407,7 +424,7 @@ void DIALOG_ERC::TestErc( wxArrayString* aMessagesList )
if( !DiagErcTableInit )
{
memcpy( DiagErc, DefaultDiagErc, sizeof(DefaultDiagErc) );
memcpy( DiagErc, DefaultDiagErc, sizeof( DefaultDiagErc ) );
DiagErcTableInit = true;
}
......@@ -515,18 +532,7 @@ void DIALOG_ERC::TestErc( wxArrayString* aMessagesList )
}
// Displays global results:
wxString num;
int markers = screens.GetMarkerCount();
int warnings = screens.GetMarkerCount( WAR );
num.Printf( wxT( "%d" ), markers );
m_TotalErrCount->SetLabel( num );
num.Printf( wxT( "%d" ), markers - warnings );
m_LastErrCount->SetLabel( num );
num.Printf( wxT( "%d" ), warnings );
m_LastWarningCount->SetLabel( num );
updateMarkerCounts( &screens );
// Display diags:
DisplayERC_MarkersList();
......
......@@ -61,6 +61,8 @@ private:
void ResetDefaultERCDiag( wxCommandEvent& event );
void ChangeErrorLevel( wxCommandEvent& event );
void ReBuildMatrixPanel();
void setDRCMatrixButtonState( wxBitmapButton *aButton, int aState );
void updateMarkerCounts( SCH_SCREENS *screens );
};
......
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Nov 6 2013)
// C++ code generated with wxFormBuilder (version Jun 6 2014)
// http://www.wxformbuilder.org/
//
// PLEASE DO "NOT" EDIT THIS FILE!
......@@ -13,11 +13,11 @@
BEGIN_EVENT_TABLE( DIALOG_ERC_BASE, DIALOG_SHIM )
EVT_CLOSE( DIALOG_ERC_BASE::_wxFB_OnCloseErcDialog )
EVT_BUTTON( ID_ERC_CMP, DIALOG_ERC_BASE::_wxFB_OnErcCmpClick )
EVT_BUTTON( ID_ERASE_DRC_MARKERS, DIALOG_ERC_BASE::_wxFB_OnEraseDrcMarkersClick )
EVT_BUTTON( wxID_CANCEL, DIALOG_ERC_BASE::_wxFB_OnButtonCloseClick )
EVT_LISTBOX( ID_MAKER_HTMLLISTBOX, DIALOG_ERC_BASE::_wxFB_OnLeftClickMarkersList )
EVT_LISTBOX_DCLICK( ID_MAKER_HTMLLISTBOX, DIALOG_ERC_BASE::_wxFB_OnLeftDblClickMarkersList )
EVT_BUTTON( ID_ERASE_DRC_MARKERS, DIALOG_ERC_BASE::_wxFB_OnEraseDrcMarkersClick )
EVT_BUTTON( ID_ERC_CMP, DIALOG_ERC_BASE::_wxFB_OnErcCmpClick )
EVT_BUTTON( wxID_CANCEL, DIALOG_ERC_BASE::_wxFB_OnButtonCloseClick )
EVT_BUTTON( ID_RESET_MATRIX, DIALOG_ERC_BASE::_wxFB_OnResetMatrixClick )
END_EVENT_TABLE()
......@@ -37,26 +37,26 @@ DIALOG_ERC_BASE::DIALOG_ERC_BASE( wxWindow* parent, wxWindowID id, const wxStrin
bupperSizer = new wxBoxSizer( wxHORIZONTAL );
wxStaticBoxSizer* sdiagSizer;
sdiagSizer = new wxStaticBoxSizer( new wxStaticBox( m_PanelERC, wxID_ANY, _("Erc report:") ), wxVERTICAL );
sdiagSizer = new wxStaticBoxSizer( new wxStaticBox( m_PanelERC, wxID_ANY, _("ERC Report:") ), wxVERTICAL );
wxGridSizer* gSizeDiag;
gSizeDiag = new wxGridSizer( 3, 2, 0, 0 );
m_ErcTotalErrorsText = new wxStaticText( m_PanelERC, wxID_ANY, _("Total errors count: "), wxDefaultPosition, wxDefaultSize, wxALIGN_RIGHT );
m_ErcTotalErrorsText = new wxStaticText( m_PanelERC, wxID_ANY, _("Total:"), wxDefaultPosition, wxDefaultSize, wxALIGN_RIGHT );
m_ErcTotalErrorsText->Wrap( -1 );
gSizeDiag->Add( m_ErcTotalErrorsText, 0, wxALIGN_CENTER_VERTICAL, 5 );
m_TotalErrCount = new wxTextCtrl( m_PanelERC, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_READONLY );
gSizeDiag->Add( m_TotalErrCount, 0, wxALIGN_CENTER_VERTICAL, 5 );
m_WarnErcErrorsText = new wxStaticText( m_PanelERC, wxID_ANY, _("Warnings count:"), wxDefaultPosition, wxDefaultSize, wxALIGN_RIGHT );
m_WarnErcErrorsText = new wxStaticText( m_PanelERC, wxID_ANY, _("Warnings:"), wxDefaultPosition, wxDefaultSize, wxALIGN_RIGHT );
m_WarnErcErrorsText->Wrap( -1 );
gSizeDiag->Add( m_WarnErcErrorsText, 0, wxALIGN_CENTER_VERTICAL, 5 );
m_LastWarningCount = new wxTextCtrl( m_PanelERC, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_READONLY );
gSizeDiag->Add( m_LastWarningCount, 0, wxALIGN_CENTER_VERTICAL, 5 );
m_LastErrCountText = new wxStaticText( m_PanelERC, wxID_ANY, _("Errors count:"), wxDefaultPosition, wxDefaultSize, wxALIGN_RIGHT );
m_LastErrCountText = new wxStaticText( m_PanelERC, wxID_ANY, _("Errors:"), wxDefaultPosition, wxDefaultSize, wxALIGN_RIGHT );
m_LastErrCountText->Wrap( -1 );
gSizeDiag->Add( m_LastErrCountText, 0, wxALIGN_CENTER_VERTICAL, 5 );
......@@ -86,24 +86,8 @@ DIALOG_ERC_BASE::DIALOG_ERC_BASE( wxWindow* parent, wxWindowID id, const wxStrin
bupperSizer->Add( bSizerMessages, 1, wxEXPAND, 5 );
wxBoxSizer* bbuttonsSizer;
bbuttonsSizer = new wxBoxSizer( wxVERTICAL );
m_buttonERC = new wxButton( m_PanelERC, ID_ERC_CMP, _("&Test Erc"), wxDefaultPosition, wxDefaultSize, 0 );
m_buttonERC->SetDefault();
bbuttonsSizer->Add( m_buttonERC, 0, wxALL|wxEXPAND, 5 );
m_buttondelmarkers = new wxButton( m_PanelERC, ID_ERASE_DRC_MARKERS, _("&Del Markers"), wxDefaultPosition, wxDefaultSize, 0 );
bbuttonsSizer->Add( m_buttondelmarkers, 0, wxALL|wxEXPAND, 5 );
m_buttonClose = new wxButton( m_PanelERC, wxID_CANCEL, _("&Close"), wxDefaultPosition, wxDefaultSize, 0 );
bbuttonsSizer->Add( m_buttonClose, 0, wxALL|wxEXPAND, 5 );
bupperSizer->Add( bbuttonsSizer, 0, wxALIGN_CENTER_VERTICAL, 5 );
bercSizer->Add( bupperSizer, 0, wxEXPAND, 5 );
bercSizer->Add( bupperSizer, 0, wxALL|wxEXPAND, 5 );
m_textMarkers = new wxStaticText( m_PanelERC, wxID_ANY, _("Error list:"), wxDefaultPosition, wxDefaultSize, 0 );
m_textMarkers->Wrap( -1 );
......@@ -114,6 +98,22 @@ DIALOG_ERC_BASE::DIALOG_ERC_BASE( wxWindow* parent, wxWindowID id, const wxStrin
bercSizer->Add( m_MarkersList, 1, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
wxBoxSizer* bbuttonsSizer;
bbuttonsSizer = new wxBoxSizer( wxHORIZONTAL );
m_buttondelmarkers = new wxButton( m_PanelERC, ID_ERASE_DRC_MARKERS, _("&Delete Markers"), wxDefaultPosition, wxDefaultSize, 0 );
bbuttonsSizer->Add( m_buttondelmarkers, 0, wxALL|wxEXPAND, 5 );
m_buttonERC = new wxButton( m_PanelERC, ID_ERC_CMP, _("&Run"), wxDefaultPosition, wxDefaultSize, 0 );
m_buttonERC->SetDefault();
bbuttonsSizer->Add( m_buttonERC, 0, wxALL|wxEXPAND, 5 );
m_buttonClose = new wxButton( m_PanelERC, wxID_CANCEL, _("&Close"), wxDefaultPosition, wxDefaultSize, 0 );
bbuttonsSizer->Add( m_buttonClose, 0, wxALL|wxEXPAND, 5 );
bercSizer->Add( bbuttonsSizer, 0, wxALIGN_RIGHT, 5 );
m_PanelERC->SetSizer( bercSizer );
m_PanelERC->Layout();
......
This diff is collapsed.
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Nov 6 2013)
// C++ code generated with wxFormBuilder (version Jun 6 2014)
// http://www.wxformbuilder.org/
//
// PLEASE DO "NOT" EDIT THIS FILE!
......@@ -25,8 +25,8 @@ class ERC_HTML_LISTBOX;
#include <wx/sizer.h>
#include <wx/checkbox.h>
#include <wx/statbox.h>
#include <wx/button.h>
#include <wx/listbox.h>
#include <wx/button.h>
#include <wx/panel.h>
#include <wx/bitmap.h>
#include <wx/image.h>
......@@ -46,20 +46,20 @@ class DIALOG_ERC_BASE : public DIALOG_SHIM
// Private event handlers
void _wxFB_OnCloseErcDialog( wxCloseEvent& event ){ OnCloseErcDialog( event ); }
void _wxFB_OnErcCmpClick( wxCommandEvent& event ){ OnErcCmpClick( event ); }
void _wxFB_OnEraseDrcMarkersClick( wxCommandEvent& event ){ OnEraseDrcMarkersClick( event ); }
void _wxFB_OnButtonCloseClick( wxCommandEvent& event ){ OnButtonCloseClick( event ); }
void _wxFB_OnLeftClickMarkersList( wxCommandEvent& event ){ OnLeftClickMarkersList( event ); }
void _wxFB_OnLeftDblClickMarkersList( wxCommandEvent& event ){ OnLeftDblClickMarkersList( event ); }
void _wxFB_OnEraseDrcMarkersClick( wxCommandEvent& event ){ OnEraseDrcMarkersClick( event ); }
void _wxFB_OnErcCmpClick( wxCommandEvent& event ){ OnErcCmpClick( event ); }
void _wxFB_OnButtonCloseClick( wxCommandEvent& event ){ OnButtonCloseClick( event ); }
void _wxFB_OnResetMatrixClick( wxCommandEvent& event ){ OnResetMatrixClick( event ); }
protected:
enum
{
ID_ERC_CMP = 1000,
ID_MAKER_HTMLLISTBOX = 1000,
ID_ERASE_DRC_MARKERS,
ID_MAKER_HTMLLISTBOX,
ID_ERC_CMP,
ID_RESET_MATRIX
};
......@@ -74,28 +74,28 @@ class DIALOG_ERC_BASE : public DIALOG_SHIM
wxCheckBox* m_WriteResultOpt;
wxStaticText* m_titleMessages;
wxTextCtrl* m_MessagesList;
wxButton* m_buttonERC;
wxButton* m_buttondelmarkers;
wxButton* m_buttonClose;
wxStaticText* m_textMarkers;
ERC_HTML_LISTBOX* m_MarkersList;
wxButton* m_buttondelmarkers;
wxButton* m_buttonERC;
wxButton* m_buttonClose;
wxPanel* m_PanelERCOptions;
wxButton* m_ResetOptButton;
wxPanel* m_matrixPanel;
// Virtual event handlers, overide them in your derived class
virtual void OnCloseErcDialog( wxCloseEvent& event ) { event.Skip(); }
virtual void OnErcCmpClick( wxCommandEvent& event ) { event.Skip(); }
virtual void OnEraseDrcMarkersClick( wxCommandEvent& event ) { event.Skip(); }
virtual void OnButtonCloseClick( wxCommandEvent& event ) { event.Skip(); }
virtual void OnLeftClickMarkersList( wxCommandEvent& event ) { event.Skip(); }
virtual void OnLeftDblClickMarkersList( wxCommandEvent& event ) { event.Skip(); }
virtual void OnEraseDrcMarkersClick( wxCommandEvent& event ) { event.Skip(); }
virtual void OnErcCmpClick( wxCommandEvent& event ) { event.Skip(); }
virtual void OnButtonCloseClick( wxCommandEvent& event ) { event.Skip(); }
virtual void OnResetMatrixClick( wxCommandEvent& event ) { event.Skip(); }
public:
DIALOG_ERC_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("EESchema Erc"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 519,392 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
DIALOG_ERC_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Electrical Rules Checker"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 519,392 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
~DIALOG_ERC_BASE();
};
......
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Apr 10 2012)
// C++ code generated with wxFormBuilder (version Jun 6 2014)
// http://www.wxformbuilder.org/
//
// PLEASE DO "NOT" EDIT THIS FILE!
......@@ -43,7 +43,7 @@ NETLIST_DIALOG_BASE::NETLIST_DIALOG_BASE( wxWindow* parent, wxWindowID id, const
bLeftSizer->Add( 0, 0, 0, wxTOP, 15 );
m_buttonNetlist = new wxButton( this, ID_CREATE_NETLIST, _("Netlist"), wxDefaultPosition, wxDefaultSize, 0 );
m_buttonNetlist = new wxButton( this, ID_CREATE_NETLIST, _("Generate"), wxDefaultPosition, wxDefaultSize, 0 );
bLeftSizer->Add( m_buttonNetlist, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 );
m_buttonCancel = new wxButton( this, wxID_CANCEL, _("Cancel"), wxDefaultPosition, wxDefaultSize, 0 );
......@@ -72,6 +72,7 @@ NETLIST_DIALOG_BASE::NETLIST_DIALOG_BASE( wxWindow* parent, wxWindowID id, const
bMainSizer->Add( m_staticTextDefaultFN, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
m_textCtrlDefaultFileName = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_READONLY );
m_textCtrlDefaultFileName->SetMaxLength( 0 );
bMainSizer->Add( m_textCtrlDefaultFileName, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
......@@ -106,6 +107,7 @@ NETLIST_DIALOG_ADD_PLUGIN_BASE::NETLIST_DIALOG_ADD_PLUGIN_BASE( wxWindow* parent
bSizerLeft->Add( m_staticTextCmd, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
m_textCtrlCommand = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
m_textCtrlCommand->SetMaxLength( 0 );
m_textCtrlCommand->SetMinSize( wxSize( 300,-1 ) );
bSizerLeft->Add( m_textCtrlCommand, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
......@@ -115,6 +117,7 @@ NETLIST_DIALOG_ADD_PLUGIN_BASE::NETLIST_DIALOG_ADD_PLUGIN_BASE( wxWindow* parent
bSizerLeft->Add( m_staticTextName, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
m_textCtrlName = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
m_textCtrlName->SetMaxLength( 0 );
bSizerLeft->Add( m_textCtrlName, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
......
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<wxFormBuilder_Project>
<FileVersion major="1" minor="11" />
<FileVersion major="1" minor="13" />
<object class="Project" expanded="1">
<property name="class_decoration"></property>
<property name="code_generation">C++</property>
......@@ -20,8 +20,10 @@
<property name="path">.</property>
<property name="precompiled_header"></property>
<property name="relative_path">1</property>
<property name="skip_lua_events">1</property>
<property name="skip_php_events">1</property>
<property name="skip_python_events">1</property>
<property name="ui_table">UI</property>
<property name="use_enum">1</property>
<property name="use_microsoft_bom">0</property>
<object class="Dialog" expanded="1">
......@@ -247,7 +249,7 @@
<property name="gripper">0</property>
<property name="hidden">0</property>
<property name="id">ID_CREATE_NETLIST</property>
<property name="label">Netlist</property>
<property name="label">Generate</property>
<property name="max_size"></property>
<property name="maximize_button">0</property>
<property name="maximum_size"></property>
......
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Apr 10 2012)
// C++ code generated with wxFormBuilder (version Jun 6 2014)
// http://www.wxformbuilder.org/
//
// PLEASE DO "NOT" EDIT THIS FILE!
......@@ -11,6 +11,8 @@
#include <wx/artprov.h>
#include <wx/xrc/xmlres.h>
#include <wx/intl.h>
class DIALOG_SHIM;
#include "dialog_shim.h"
#include <wx/gdicmn.h>
#include <wx/notebook.h>
......
......@@ -6,7 +6,7 @@
DIALOG_SCH_SHEET_PROPS::DIALOG_SCH_SHEET_PROPS( wxWindow* parent ) :
DIALOG_SCH_SHEET_PROPS_BASE( parent )
{
m_textFileName->SetValidator( FILE_NAME_CHAR_VALIDATOR() );
m_textFileName->SetValidator( FILE_NAME_WITH_PATH_CHAR_VALIDATOR() );
m_textFileName->SetFocus();
m_sdbSizer1OK->SetDefault();
}
......
......@@ -386,13 +386,13 @@ void SCH_EDIT_FRAME::OnPreferencesOptions( wxCommandEvent& event )
SetForceHVLines( dlg.GetEnableHVBusOrientation() );
m_showPageLimits = dlg.GetShowPageLimits();
// @todo this will change when the template field editor is redone to
// look like the component field property editor, showing visibility and value also
// Delete all template fieldnames and then restore them using the template field data from
// the options dialog
DeleteAllTemplateFieldNames();
TEMPLATE_FIELDNAMES newFieldNames = dlg.GetTemplateFields();
for( TEMPLATE_FIELDNAMES::iterator dlgfld = newFieldNames.begin(); dlgfld != newFieldNames.end(); ++dlgfld )
for( TEMPLATE_FIELDNAMES::iterator dlgfld = newFieldNames.begin();
dlgfld != newFieldNames.end(); ++dlgfld )
{
TEMPLATE_FIELDNAME fld = *dlgfld;
AddTemplateFieldName( fld );
......@@ -711,11 +711,8 @@ void SCH_EDIT_FRAME::SaveSettings( wxConfigBase* aCfg )
// Save template fieldnames
STRING_FORMATTER sf;
m_TemplateFieldNames.Format( &sf, 0 );
printf("saving formatted template fieldnames:'%s'\n", sf.GetString().c_str() );
wxString record = FROM_UTF8( sf.GetString().c_str() );
record.Replace( wxT("\n"), wxT(""), true ); // strip all newlines
record.Replace( wxT(" "), wxT(" "), true ); // double space to single
......
......@@ -110,6 +110,12 @@ public:
/// @copydoc wxWindow::Refresh()
void Refresh( bool aEraseBackground = true, const wxRect* aRect = NULL );
/**
* Function ForceRefresh()
* Forces a redraw.
*/
void ForceRefresh();
/**
* Function SetEventDispatcher()
* Sets a dispatcher that processes events and forwards them to tools.
......
......@@ -43,7 +43,7 @@ public:
wxTextValidator( wxFILTER_EXCLUDE_CHAR_LIST, aValue )
{
// The Windows (DOS) file system forbidden characters already include the forbidden
// file name characters for both Posix and OSX systems. The characters \/*?|"<> are
// file name characters for both Posix and OSX systems. The characters \/:*?|"<> are
// illegal and filtered by the validator.
wxString illegalChars = wxFileName::GetForbiddenChars( wxPATH_DOS );
wxTextValidator nameValidator( wxFILTER_EXCLUDE_CHAR_LIST );
......@@ -55,3 +55,38 @@ public:
SetExcludes( illegalCharList );
}
};
/**
* Class FILE_NAME_WITH_PATH_CHAR_VALIDATOR
*
* This class provides a custom wxValidator object for limiting the allowable characters when
* defining file names with path, for instance in schematic sheet file names.
*/
class FILE_NAME_WITH_PATH_CHAR_VALIDATOR : public wxTextValidator
{
public:
FILE_NAME_WITH_PATH_CHAR_VALIDATOR( wxString* aValue = NULL ) :
wxTextValidator( wxFILTER_EXCLUDE_CHAR_LIST, aValue )
{
// The Windows (DOS) file system forbidden characters already include the forbidden
// file name characters for both Posix and OSX systems. The characters *?|"<> are
// illegal and filtered by the validator, but /\: are valid (\ and : only on Windows.
wxString illegalChars = wxFileName::GetForbiddenChars(wxPATH_DOS );
wxTextValidator nameValidator( wxFILTER_EXCLUDE_CHAR_LIST );
wxArrayString illegalCharList;
for( unsigned i = 0; i < illegalChars.size(); i++ )
{
if( illegalChars[i] == '/' )
continue;
#if defined (__WINDOWS__)
if( illegalChars[i] == '\\' || illegalChars[i] == ':' )
continue;
#endif
illegalCharList.Add( wxString( illegalChars[i] ) );
}
SetExcludes( illegalCharList );
}
};
......@@ -689,10 +689,11 @@ if( KICAD_SCRIPTING )
else()
# put into bundle at build time, it is relocated at install
add_custom_target( ScriptingPcbnewPyCopy ALL
COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_BINARY_DIR}/pcbnew/pcbnew.py" "${PYTHON_DEST}"
COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_BINARY_DIR}/pcbnew/pcbnew.py" "${PYTHON_DEST}/"
DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/pcbnew.py
COMMENT "Copying pcbnew.py into ${PYTHON_DEST}"
)
add_dependencies( ScriptingPcbnewPyCopy ScriptingWxpythonCopy )
# scripting plugins
install( DIRECTORY ${PROJECT_SOURCE_DIR}/pcbnew/scripting/plugins/
DESTINATION ${KICAD_DATA}/scripting/plugins
......@@ -713,10 +714,11 @@ if( KICAD_SCRIPTING_MODULES )
else()
# put everything into bundle at build time, it is relocated at install
add_custom_target( ScriptingModulesPcbnewPyCopy ALL
COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_BINARY_DIR}/pcbnew/pcbnew.py" "${PYTHON_DEST}"
COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_BINARY_DIR}/pcbnew/pcbnew.py" "${PYTHON_DEST}/"
DEPENDS FixSwigImportsModuleScripting
COMMENT "Copying pcbnew.py into ${PYTHON_DEST}"
)
add_dependencies( ScriptingModulesPcbnewPyCopy ScriptingWxpythonCopy )
endif()
if( MINGW )
......@@ -724,10 +726,11 @@ if( KICAD_SCRIPTING_MODULES )
elseif( APPLE )
# put everything into bundle at build time, it is relocated at install
add_custom_target( ScriptingModulesPcbnewSoCopy ALL
COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_BINARY_DIR}/pcbnew/_pcbnew.so" "${PYTHON_DEST}"
COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_BINARY_DIR}/pcbnew/_pcbnew.so" "${PYTHON_DEST}/"
DEPENDS _pcbnew
COMMENT "Copying _pcbnew.so into ${PYTHON_DEST}"
)
add_dependencies( ScriptingModulesPcbnewSoCopy ScriptingWxpythonCopy )
else()
install( FILES ${CMAKE_BINARY_DIR}/pcbnew/_pcbnew.so DESTINATION ${PYTHON_DEST} )
endif()
......
......@@ -84,6 +84,11 @@ public:
bool HitTest( const wxPoint& aPosition ) const;
wxString GetClass() const
{
return wxT( "PCB_TARGET" );
}
/** @copydoc BOARD_ITEM::HitTest(const EDA_RECT& aRect,
* bool aContained = true, int aAccuracy ) const
*/
......
......@@ -602,7 +602,7 @@ void MODULE::GetMsgPanelInfo( std::vector< MSG_PANEL_ITEM >& aList )
}
aList.push_back( MSG_PANEL_ITEM( _( "Attrib" ), msg, BROWN ) );
aList.push_back( MSG_PANEL_ITEM( _( "Module" ), FROM_UTF8( m_fpid.Format().c_str() ), BLUE ) );
aList.push_back( MSG_PANEL_ITEM( _( "Footprint" ), FROM_UTF8( m_fpid.Format().c_str() ), BLUE ) );
msg = _( "No 3D shape" );
// Search the first active 3D shape in list
......
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Apr 10 2012)
// C++ code generated with wxFormBuilder (version Jun 6 2014)
// http://www.wxformbuilder.org/
//
// PLEASE DO "NOT" EDIT THIS FILE!
......@@ -22,14 +22,14 @@ DIALOG_BLOCK_OPTIONS_BASE::DIALOG_BLOCK_OPTIONS_BASE( wxWindow* parent, wxWindow
wxGridSizer* gSizer1;
gSizer1 = new wxGridSizer( 4, 2, 0, 0 );
m_Include_Modules = new wxCheckBox( this, wxID_ANY, _("Include modules"), wxDefaultPosition, wxDefaultSize, 0 );
m_Include_Modules = new wxCheckBox( this, wxID_ANY, _("Include footprints"), wxDefaultPosition, wxDefaultSize, 0 );
gSizer1->Add( m_Include_Modules, 0, wxALL, 5 );
m_Include_PcbTextes = new wxCheckBox( this, wxID_ANY, _("Include text items"), wxDefaultPosition, wxDefaultSize, 0 );
m_Include_PcbTextes->SetValue(true);
gSizer1->Add( m_Include_PcbTextes, 0, wxALL, 5 );
m_IncludeLockedModules = new wxCheckBox( this, wxID_ANY, _("Include locked modules"), wxDefaultPosition, wxDefaultSize, 0 );
m_IncludeLockedModules = new wxCheckBox( this, wxID_ANY, _("Include locked footprints"), wxDefaultPosition, wxDefaultSize, 0 );
gSizer1->Add( m_IncludeLockedModules, 0, wxALL, 5 );
m_Include_Draw_Items = new wxCheckBox( this, wxID_ANY, _("Include drawings"), wxDefaultPosition, wxDefaultSize, 0 );
......
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<wxFormBuilder_Project>
<FileVersion major="1" minor="11" />
<FileVersion major="1" minor="13" />
<object class="Project" expanded="1">
<property name="class_decoration"></property>
<property name="code_generation">C++</property>
......@@ -20,8 +20,10 @@
<property name="path">.</property>
<property name="precompiled_header"></property>
<property name="relative_path">1</property>
<property name="skip_lua_events">1</property>
<property name="skip_php_events">1</property>
<property name="skip_python_events">1</property>
<property name="ui_table">UI</property>
<property name="use_enum">0</property>
<property name="use_microsoft_bom">0</property>
<object class="Dialog" expanded="1">
......@@ -42,7 +44,7 @@
<property name="minimum_size"></property>
<property name="name">DIALOG_BLOCK_OPTIONS_BASE</property>
<property name="pos"></property>
<property name="size">397,226</property>
<property name="size">500,226</property>
<property name="style">wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER</property>
<property name="subclass">DIALOG_SHIM; dialog_shim.h</property>
<property name="title"></property>
......@@ -148,7 +150,7 @@
<property name="gripper">0</property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="label">Include modules</property>
<property name="label">Include footprints</property>
<property name="max_size"></property>
<property name="maximize_button">0</property>
<property name="maximum_size"></property>
......@@ -324,7 +326,7 @@
<property name="gripper">0</property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="label">Include locked modules</property>
<property name="label">Include locked footprints</property>
<property name="max_size"></property>
<property name="maximize_button">0</property>
<property name="maximum_size"></property>
......
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Apr 10 2012)
// C++ code generated with wxFormBuilder (version Jun 6 2014)
// http://www.wxformbuilder.org/
//
// PLEASE DO "NOT" EDIT THIS FILE!
......@@ -11,6 +11,8 @@
#include <wx/artprov.h>
#include <wx/xrc/xmlres.h>
#include <wx/intl.h>
class DIALOG_SHIM;
#include "dialog_shim.h"
#include <wx/string.h>
#include <wx/checkbox.h>
......@@ -57,7 +59,7 @@ class DIALOG_BLOCK_OPTIONS_BASE : public DIALOG_SHIM
public:
DIALOG_BLOCK_OPTIONS_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxEmptyString, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 397,226 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
DIALOG_BLOCK_OPTIONS_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxEmptyString, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 500,226 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
~DIALOG_BLOCK_OPTIONS_BASE();
};
......
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Apr 10 2012)
// C++ code generated with wxFormBuilder (version Jun 6 2014)
// http://www.wxformbuilder.org/
//
// PLEASE DO "NOT" EDIT THIS FILE!
......@@ -74,7 +74,7 @@ DIALOG_DISPLAY_OPTIONS_BASE::DIALOG_DISPLAY_OPTIONS_BASE( wxWindow* parent, wxWi
wxString m_OptDisplayModEdgesChoices[] = { _("Line"), _("Filled"), _("Sketch") };
int m_OptDisplayModEdgesNChoices = sizeof( m_OptDisplayModEdgesChoices ) / sizeof( wxString );
m_OptDisplayModEdges = new wxRadioBox( this, ID_EDGES_MODULES, _("Module Edges:"), wxDefaultPosition, wxDefaultSize, m_OptDisplayModEdgesNChoices, m_OptDisplayModEdgesChoices, 1, wxRA_SPECIFY_COLS );
m_OptDisplayModEdges = new wxRadioBox( this, ID_EDGES_MODULES, _("Footprint Edges:"), wxDefaultPosition, wxDefaultSize, m_OptDisplayModEdgesNChoices, m_OptDisplayModEdgesChoices, 1, wxRA_SPECIFY_COLS );
m_OptDisplayModEdges->SetSelection( 1 );
bLModuleSizer->Add( m_OptDisplayModEdges, 0, wxALL|wxEXPAND, 5 );
......@@ -128,7 +128,7 @@ DIALOG_DISPLAY_OPTIONS_BASE::DIALOG_DISPLAY_OPTIONS_BASE( wxWindow* parent, wxWi
wxString m_Show_Page_LimitsChoices[] = { _("Yes"), _("No") };
int m_Show_Page_LimitsNChoices = sizeof( m_Show_Page_LimitsChoices ) / sizeof( wxString );
m_Show_Page_Limits = new wxRadioBox( this, wxID_ANY, _("Show page limits"), wxDefaultPosition, wxDefaultSize, m_Show_Page_LimitsNChoices, m_Show_Page_LimitsChoices, 1, wxRA_SPECIFY_COLS );
m_Show_Page_Limits->SetSelection( 0 );
m_Show_Page_Limits->SetSelection( 1 );
sRightUpperSizer->Add( m_Show_Page_Limits, 0, wxALL|wxEXPAND, 5 );
......
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<wxFormBuilder_Project>
<FileVersion major="1" minor="11" />
<FileVersion major="1" minor="13" />
<object class="Project" expanded="1">
<property name="class_decoration"></property>
<property name="code_generation">C++</property>
......@@ -20,8 +20,10 @@
<property name="path">.</property>
<property name="precompiled_header"></property>
<property name="relative_path">1</property>
<property name="skip_lua_events">1</property>
<property name="skip_php_events">1</property>
<property name="skip_python_events">1</property>
<property name="ui_table">UI</property>
<property name="use_enum">1</property>
<property name="use_microsoft_bom">0</property>
<object class="Dialog" expanded="1">
......@@ -42,7 +44,7 @@
<property name="minimum_size"></property>
<property name="name">DIALOG_DISPLAY_OPTIONS_BASE</property>
<property name="pos"></property>
<property name="size">731,291</property>
<property name="size">880,320</property>
<property name="style">wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER</property>
<property name="subclass">DIALOG_SHIM; dialog_shim.h</property>
<property name="title">Display options</property>
......@@ -623,7 +625,7 @@
<property name="gripper">0</property>
<property name="hidden">0</property>
<property name="id">ID_EDGES_MODULES</property>
<property name="label">Module Edges:</property>
<property name="label">Footprint Edges:</property>
<property name="majorDimension">1</property>
<property name="max_size"></property>
<property name="maximize_button">0</property>
......@@ -1303,7 +1305,7 @@
<property name="pin_button">1</property>
<property name="pos"></property>
<property name="resize">Resizable</property>
<property name="selection">0</property>
<property name="selection">1</property>
<property name="show">1</property>
<property name="size"></property>
<property name="style">wxRA_SPECIFY_COLS</property>
......
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Apr 10 2012)
// C++ code generated with wxFormBuilder (version Jun 6 2014)
// http://www.wxformbuilder.org/
//
// PLEASE DO "NOT" EDIT THIS FILE!
......@@ -11,6 +11,8 @@
#include <wx/artprov.h>
#include <wx/xrc/xmlres.h>
#include <wx/intl.h>
class DIALOG_SHIM;
#include "dialog_shim.h"
#include <wx/string.h>
#include <wx/radiobox.h>
......@@ -68,7 +70,7 @@ class DIALOG_DISPLAY_OPTIONS_BASE : public DIALOG_SHIM
public:
DIALOG_DISPLAY_OPTIONS_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Display options"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 731,291 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
DIALOG_DISPLAY_OPTIONS_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Display options"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 880,320 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
~DIALOG_DISPLAY_OPTIONS_BASE();
};
......
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Nov 6 2013)
// C++ code generated with wxFormBuilder (version Jun 6 2014)
// http://www.wxformbuilder.org/
//
// PLEASE DO "NOT" EDIT THIS FILE!
......@@ -128,10 +128,10 @@ DIALOG_MODULE_BOARD_EDITOR_BASE::DIALOG_MODULE_BOARD_EDITOR_BASE( wxWindow* pare
m_PropRightSizer = new wxBoxSizer( wxVERTICAL );
m_buttonExchange = new wxButton( m_PanelProperties, ID_MODULE_PROPERTIES_EXCHANGE, _("Change Module(s)"), wxDefaultPosition, wxDefaultSize, 0 );
m_buttonExchange = new wxButton( m_PanelProperties, ID_MODULE_PROPERTIES_EXCHANGE, _("Change Footprint(s)"), wxDefaultPosition, wxDefaultSize, 0 );
m_PropRightSizer->Add( m_buttonExchange, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 );
m_buttonModuleEditor = new wxButton( m_PanelProperties, ID_GOTO_MODULE_EDITOR, _("Module Editor"), wxDefaultPosition, wxDefaultSize, 0 );
m_buttonModuleEditor = new wxButton( m_PanelProperties, ID_GOTO_MODULE_EDITOR, _("Footprint Editor"), wxDefaultPosition, wxDefaultSize, 0 );
m_PropRightSizer->Add( m_buttonModuleEditor, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 );
wxBoxSizer* bSizerAttrib;
......
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<wxFormBuilder_Project>
<FileVersion major="1" minor="11" />
<FileVersion major="1" minor="13" />
<object class="Project" expanded="1">
<property name="class_decoration"></property>
<property name="code_generation">C++</property>
......@@ -44,10 +44,10 @@
<property name="minimum_size"></property>
<property name="name">DIALOG_MODULE_BOARD_EDITOR_BASE</property>
<property name="pos"></property>
<property name="size">499,591</property>
<property name="size">499,630</property>
<property name="style">wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER</property>
<property name="subclass">DIALOG_SHIM; dialog_shim.h</property>
<property name="title">Module Properties</property>
<property name="title">Footprint Properties</property>
<property name="tooltip"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
......@@ -2000,7 +2000,7 @@
<property name="gripper">0</property>
<property name="hidden">0</property>
<property name="id">ID_MODULE_PROPERTIES_EXCHANGE</property>
<property name="label">Change Module(s)</property>
<property name="label">Change Footprint(s)</property>
<property name="max_size"></property>
<property name="maximize_button">0</property>
<property name="maximum_size"></property>
......@@ -2088,7 +2088,7 @@
<property name="gripper">0</property>
<property name="hidden">0</property>
<property name="id">ID_GOTO_MODULE_EDITOR</property>
<property name="label">Module Editor</property>
<property name="label">Footprint Editor</property>
<property name="max_size"></property>
<property name="maximize_button">0</property>
<property name="maximum_size"></property>
......
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Nov 6 2013)
// C++ code generated with wxFormBuilder (version Jun 6 2014)
// http://www.wxformbuilder.org/
//
// PLEASE DO "NOT" EDIT THIS FILE!
......@@ -138,7 +138,7 @@ class DIALOG_MODULE_BOARD_EDITOR_BASE : public DIALOG_SHIM
public:
wxStaticBoxSizer* m_Sizer3DValues;
DIALOG_MODULE_BOARD_EDITOR_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Module Properties"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 499,591 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
DIALOG_MODULE_BOARD_EDITOR_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Footprint Properties"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 499,630 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
~DIALOG_MODULE_BOARD_EDITOR_BASE();
};
......
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Nov 6 2013)
// C++ code generated with wxFormBuilder (version Jun 6 2014)
// http://www.wxformbuilder.org/
//
// PLEASE DO "NOT" EDIT THIS FILE!
......
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<wxFormBuilder_Project>
<FileVersion major="1" minor="11" />
<FileVersion major="1" minor="13" />
<object class="Project" expanded="1">
<property name="class_decoration"></property>
<property name="code_generation">C++</property>
......@@ -44,10 +44,10 @@
<property name="minimum_size"></property>
<property name="name">DIALOG_MODULE_MODULE_EDITOR_BASE</property>
<property name="pos"></property>
<property name="size">486,462</property>
<property name="size">486,510</property>
<property name="style">wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER</property>
<property name="subclass">DIALOG_SHIM; dialog_shim.h</property>
<property name="title">Module Properties</property>
<property name="title">Footprint Properties</property>
<property name="tooltip"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
......
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Nov 6 2013)
// C++ code generated with wxFormBuilder (version Jun 6 2014)
// http://www.wxformbuilder.org/
//
// PLEASE DO "NOT" EDIT THIS FILE!
......@@ -117,7 +117,7 @@ class DIALOG_MODULE_MODULE_EDITOR_BASE : public DIALOG_SHIM
public:
DIALOG_MODULE_MODULE_EDITOR_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Module Properties"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 486,462 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
DIALOG_MODULE_MODULE_EDITOR_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Footprint Properties"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 486,510 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
~DIALOG_MODULE_MODULE_EDITOR_BASE();
};
......
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Nov 6 2013)
// C++ code generated with wxFormBuilder (version Jun 6 2014)
// http://www.wxformbuilder.org/
//
// PLEASE DO "NOT" EDIT THIS FILE!
......@@ -52,10 +52,10 @@ DIALOG_EXCHANGE_MODULE_BASE::DIALOG_EXCHANGE_MODULE_BASE( wxWindow* parent, wxWi
wxBoxSizer* bMiddleSizer;
bMiddleSizer = new wxBoxSizer( wxVERTICAL );
wxString m_SelectionChoices[] = { _("Change module"), _("Change same modules"), _("Ch. same module+value"), _("Change all") };
wxString m_SelectionChoices[] = { _("Change footprint"), _("Change same footprint"), _("Ch. same footprint+value"), _("Change all") };
int m_SelectionNChoices = sizeof( m_SelectionChoices ) / sizeof( wxString );
m_Selection = new wxRadioBox( this, ID_SELECTION_CLICKED, _("Options"), wxDefaultPosition, wxDefaultSize, m_SelectionNChoices, m_SelectionChoices, 1, wxRA_SPECIFY_COLS );
m_Selection->SetSelection( 2 );
m_Selection->SetSelection( 1 );
bMiddleSizer->Add( m_Selection, 0, wxALL, 5 );
......
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<wxFormBuilder_Project>
<FileVersion major="1" minor="11" />
<FileVersion major="1" minor="13" />
<object class="Project" expanded="1">
<property name="class_decoration"></property>
<property name="code_generation">C++</property>
......@@ -47,7 +47,7 @@
<property name="size">-1,-1</property>
<property name="style">wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER</property>
<property name="subclass">DIALOG_SHIM; dialog_shim.h</property>
<property name="title">Exchange Modules</property>
<property name="title">Exchange Footprints</property>
<property name="tooltip"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
......@@ -662,7 +662,7 @@
<property name="caption"></property>
<property name="caption_visible">1</property>
<property name="center_pane">0</property>
<property name="choices">&quot;Change module&quot; &quot;Change same modules&quot; &quot;Ch. same module+value&quot; &quot;Change all&quot;</property>
<property name="choices">&quot;Change footprint&quot; &quot;Change same footprint&quot; &quot;Ch. same footprint+value&quot; &quot;Change all&quot;</property>
<property name="close_button">1</property>
<property name="context_help"></property>
<property name="context_menu">1</property>
......@@ -694,7 +694,7 @@
<property name="pin_button">1</property>
<property name="pos"></property>
<property name="resize">Resizable</property>
<property name="selection">2</property>
<property name="selection">1</property>
<property name="show">1</property>
<property name="size"></property>
<property name="style">wxRA_SPECIFY_COLS</property>
......
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Nov 6 2013)
// C++ code generated with wxFormBuilder (version Jun 6 2014)
// http://www.wxformbuilder.org/
//
// PLEASE DO "NOT" EDIT THIS FILE!
......@@ -62,7 +62,7 @@ class DIALOG_EXCHANGE_MODULE_BASE : public DIALOG_SHIM
public:
DIALOG_EXCHANGE_MODULE_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Exchange Modules"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
DIALOG_EXCHANGE_MODULE_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Exchange Footprints"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
~DIALOG_EXCHANGE_MODULE_BASE();
};
......
......@@ -36,26 +36,7 @@
#include <pcbnew.h>
#include <pcbnew_id.h>
#include <dialog_find_base.h>
class DIALOG_FIND : public DIALOG_FIND_BASE
{
public:
DIALOG_FIND( PCB_BASE_FRAME* aParent );
private:
PCB_BASE_FRAME* parent;
int itemCount, markerCount;
static wxString prevSearchString;
static bool warpMouse;
void onButtonFindItemClick( wxCommandEvent& event );
void onButtonFindMarkerClick( wxCommandEvent& event );
void onButtonCloseClick( wxCommandEvent& event );
void onClose( wxCloseEvent& event );
};
#include <dialog_find.h>
// Initialize static member variables
......@@ -66,6 +47,7 @@ bool DIALOG_FIND::warpMouse = true;
DIALOG_FIND::DIALOG_FIND( PCB_BASE_FRAME* aParent ) : DIALOG_FIND_BASE( aParent )
{
parent = aParent;
foundItem = NULL;
GetSizer()->SetSizeHints( this );
m_SearchTextCtrl->AppendText( prevSearchString );
......@@ -78,6 +60,11 @@ DIALOG_FIND::DIALOG_FIND( PCB_BASE_FRAME* aParent ) : DIALOG_FIND_BASE( aParent
Center();
}
void DIALOG_FIND::EnableWarp( bool aEnabled )
{
m_NoMouseWarpCheckBox->SetValue( !aEnabled );
warpMouse = aEnabled;
}
void DIALOG_FIND::onButtonCloseClick( wxCommandEvent& aEvent )
{
......@@ -89,8 +76,8 @@ void DIALOG_FIND::onButtonFindItemClick( wxCommandEvent& aEvent )
{
PCB_SCREEN* screen = (PCB_SCREEN*) ( parent->GetScreen() );
wxPoint pos;
BOARD_ITEM* foundItem = 0;
foundItem = NULL;
wxString searchString = m_SearchTextCtrl->GetValue();
if( !searchString.IsSameAs( prevSearchString, false ) )
......@@ -149,6 +136,9 @@ void DIALOG_FIND::onButtonFindItemClick( wxCommandEvent& aEvent )
DisplayError( this, msg, 10 );
itemCount = 0;
}
if( callback )
callback( foundItem );
}
......@@ -156,7 +146,7 @@ void DIALOG_FIND::onButtonFindMarkerClick( wxCommandEvent& aEvent )
{
PCB_SCREEN* screen = (PCB_SCREEN*) ( parent->GetScreen() );
wxPoint pos;
BOARD_ITEM* foundItem = 0;
foundItem = NULL;
parent->GetCanvas()->GetViewStart( &screen->m_StartVisu.x, &screen->m_StartVisu.y );
......@@ -184,6 +174,9 @@ void DIALOG_FIND::onButtonFindMarkerClick( wxCommandEvent& aEvent )
DisplayError( this, msg, 10 );
markerCount = 0;
}
if( callback )
callback( foundItem );
}
......
/*
* This program source code file is part of KICAD, a free EDA CAD application.
*
* Copyright (C) 2012 Marco Mattila <marcom99@gmail.com>
* Copyright (C) 2006 Jean-Pierre Charras <jean-pierre.charras@gipsa-lab.inpg.fr>
* Copyright (C) 1992-2012 Kicad Developers, see AUTHORS.txt for contributors.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, you may find one here:
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
* or you may search the http://www.gnu.org website for the version 2 license,
* or you may write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
#ifndef DIALOG_FIND_BASE_H
#define DIALOG_FIND_BASE_H
#include <dialog_find_base.h>
#include <boost/function.hpp>
class DIALOG_FIND : public DIALOG_FIND_BASE
{
public:
DIALOG_FIND( PCB_BASE_FRAME* aParent );
inline BOARD_ITEM* GetItem() const { return foundItem; }
void EnableWarp( bool aEnabled );
void SetCallback( boost::function<void (BOARD_ITEM*)> aCallback ) { callback = aCallback; }
private:
PCB_BASE_FRAME* parent;
int itemCount, markerCount;
static wxString prevSearchString;
static bool warpMouse;
BOARD_ITEM* foundItem;
// Function called when an item is found
boost::function<void (BOARD_ITEM*)> callback;
void onButtonFindItemClick( wxCommandEvent& event );
void onButtonFindMarkerClick( wxCommandEvent& event );
void onButtonCloseClick( wxCommandEvent& event );
void onClose( wxCloseEvent& event );
};
#endif /* DIALOG_FIND_BASE_H */
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Oct 8 2012)
// C++ code generated with wxFormBuilder (version Jun 6 2014)
// http://www.wxformbuilder.org/
//
// PLEASE DO "NOT" EDIT THIS FILE!
......@@ -39,7 +39,7 @@ DIALOG_GLOBAL_MODULES_FIELDS_EDITION_BASE::DIALOG_GLOBAL_MODULES_FIELDS_EDITION_
m_staticTextFilter = new wxStaticText( this, wxID_ANY, _("Footprint Filter:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticTextFilter->Wrap( -1 );
m_staticTextFilter->SetToolTip( _("A string to filter modules to edit.\nIf not void, footprint names should match this filter.\nA filter can be something like SM* (case insensitive)") );
m_staticTextFilter->SetToolTip( _("A string to filter footprints to edit.\nIf not void, footprint names should match this filter.\nA filter can be something like SM* (case insensitive)") );
bLeftSizer->Add( m_staticTextFilter, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
......
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<wxFormBuilder_Project>
<FileVersion major="1" minor="11" />
<FileVersion major="1" minor="13" />
<object class="Project" expanded="1">
<property name="class_decoration"></property>
<property name="code_generation">C++</property>
......@@ -20,8 +20,10 @@
<property name="path">.</property>
<property name="precompiled_header"></property>
<property name="relative_path">1</property>
<property name="skip_lua_events">1</property>
<property name="skip_php_events">1</property>
<property name="skip_python_events">1</property>
<property name="ui_table">UI</property>
<property name="use_enum">0</property>
<property name="use_microsoft_bom">0</property>
<object class="Dialog" expanded="1">
......@@ -440,7 +442,7 @@
<property name="style"></property>
<property name="subclass"></property>
<property name="toolbar_pane">0</property>
<property name="tooltip">A string to filter modules to edit.&#x0A;If not void, footprint names should match this filter.&#x0A;A filter can be something like SM* (case insensitive)</property>
<property name="tooltip">A string to filter footprints to edit.&#x0A;If not void, footprint names should match this filter.&#x0A;A filter can be something like SM* (case insensitive)</property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
......
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Oct 8 2012)
// C++ code generated with wxFormBuilder (version Jun 6 2014)
// http://www.wxformbuilder.org/
//
// PLEASE DO "NOT" EDIT THIS FILE!
......
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Oct 8 2012)
// C++ code generated with wxFormBuilder (version Jun 6 2014)
// http://www.wxformbuilder.org/
//
// PLEASE DO "NOT" EDIT THIS FILE!
......@@ -46,10 +46,10 @@ DIALOG_GLOBAL_PADS_EDITION_BASE::DIALOG_GLOBAL_PADS_EDITION_BASE( wxWindow* pare
bRightSizer->Add( 10, 10, 0, 0, 5 );
m_buttonChangeModule = new wxButton( this, ID_CHANGE_CURRENT_MODULE, _("Change Pads on Module"), wxDefaultPosition, wxDefaultSize, 0 );
m_buttonChangeModule = new wxButton( this, ID_CHANGE_CURRENT_MODULE, _("Change Pads on Footprint"), wxDefaultPosition, wxDefaultSize, 0 );
bRightSizer->Add( m_buttonChangeModule, 0, wxALL|wxEXPAND, 5 );
m_buttonIdModules = new wxButton( this, ID_CHANGE_ID_MODULES, _("Change Pads on Same Modules"), wxDefaultPosition, wxDefaultSize, 0 );
m_buttonIdModules = new wxButton( this, ID_CHANGE_ID_MODULES, _("Change Pads on Identical Footprints"), wxDefaultPosition, wxDefaultSize, 0 );
bRightSizer->Add( m_buttonIdModules, 0, wxALL|wxEXPAND, 5 );
m_buttonCancel = new wxButton( this, wxID_CANCEL, _("Cancel"), wxDefaultPosition, wxDefaultSize, 0 );
......
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<wxFormBuilder_Project>
<FileVersion major="1" minor="11" />
<FileVersion major="1" minor="13" />
<object class="Project" expanded="1">
<property name="class_decoration"></property>
<property name="code_generation">C++</property>
......@@ -20,8 +20,10 @@
<property name="path">.</property>
<property name="precompiled_header"></property>
<property name="relative_path">1</property>
<property name="skip_lua_events">1</property>
<property name="skip_php_events">1</property>
<property name="skip_python_events">1</property>
<property name="ui_table">UI</property>
<property name="use_enum">0</property>
<property name="use_microsoft_bom">0</property>
<object class="Dialog" expanded="1">
......@@ -520,7 +522,7 @@
<property name="gripper">0</property>
<property name="hidden">0</property>
<property name="id">ID_CHANGE_CURRENT_MODULE</property>
<property name="label">Change Pads on Module</property>
<property name="label">Change Pads on Footprint</property>
<property name="max_size"></property>
<property name="maximize_button">0</property>
<property name="maximum_size"></property>
......@@ -608,7 +610,7 @@
<property name="gripper">0</property>
<property name="hidden">0</property>
<property name="id">ID_CHANGE_ID_MODULES</property>
<property name="label">Change Pads on Same Modules</property>
<property name="label">Change Pads on Identical Footprints</property>
<property name="max_size"></property>
<property name="maximize_button">0</property>
<property name="maximum_size"></property>
......
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Oct 8 2012)
// C++ code generated with wxFormBuilder (version Jun 6 2014)
// http://www.wxformbuilder.org/
//
// PLEASE DO "NOT" EDIT THIS FILE!
......
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Apr 16 2008)
// C++ code generated with wxFormBuilder (version Jun 6 2014)
// http://www.wxformbuilder.org/
//
// PLEASE DO "NOT" EDIT THIS FILE!
......@@ -9,7 +9,7 @@
///////////////////////////////////////////////////////////////////////////
DIALOG_GRAPHIC_ITEMS_OPTIONS_BASE::DIALOG_GRAPHIC_ITEMS_OPTIONS_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style )
DIALOG_GRAPHIC_ITEMS_OPTIONS_BASE::DIALOG_GRAPHIC_ITEMS_OPTIONS_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : DIALOG_SHIM( parent, id, title, pos, size, style )
{
this->SetSizeHints( wxDefaultSize, wxDefaultSize );
......@@ -27,6 +27,7 @@ DIALOG_GRAPHIC_ITEMS_OPTIONS_BASE::DIALOG_GRAPHIC_ITEMS_OPTIONS_BASE( wxWindow*
sbSizerLeft->Add( m_GraphicSegmWidthTitle, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
m_OptPcbSegmWidth = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
m_OptPcbSegmWidth->SetMaxLength( 0 );
sbSizerLeft->Add( m_OptPcbSegmWidth, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
m_BoardEdgesWidthTitle = new wxStaticText( this, wxID_ANY, _("Board Edges Width"), wxDefaultPosition, wxDefaultSize, 0 );
......@@ -34,6 +35,7 @@ DIALOG_GRAPHIC_ITEMS_OPTIONS_BASE::DIALOG_GRAPHIC_ITEMS_OPTIONS_BASE( wxWindow*
sbSizerLeft->Add( m_BoardEdgesWidthTitle, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
m_OptPcbEdgesWidth = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
m_OptPcbEdgesWidth->SetMaxLength( 0 );
sbSizerLeft->Add( m_OptPcbEdgesWidth, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
m_CopperTextWidthTitle = new wxStaticText( this, wxID_ANY, _("Copper Text Width"), wxDefaultPosition, wxDefaultSize, 0 );
......@@ -41,6 +43,7 @@ DIALOG_GRAPHIC_ITEMS_OPTIONS_BASE::DIALOG_GRAPHIC_ITEMS_OPTIONS_BASE( wxWindow*
sbSizerLeft->Add( m_CopperTextWidthTitle, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
m_OptPcbTextWidth = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
m_OptPcbTextWidth->SetMaxLength( 0 );
sbSizerLeft->Add( m_OptPcbTextWidth, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
m_TextSizeVTitle = new wxStaticText( this, wxID_ANY, _("Text Size V"), wxDefaultPosition, wxDefaultSize, 0 );
......@@ -48,6 +51,7 @@ DIALOG_GRAPHIC_ITEMS_OPTIONS_BASE::DIALOG_GRAPHIC_ITEMS_OPTIONS_BASE( wxWindow*
sbSizerLeft->Add( m_TextSizeVTitle, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
m_OptPcbTextVSize = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
m_OptPcbTextVSize->SetMaxLength( 0 );
sbSizerLeft->Add( m_OptPcbTextVSize, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
m_TextSizeHTitle = new wxStaticText( this, wxID_ANY, _("Text Size H"), wxDefaultPosition, wxDefaultSize, 0 );
......@@ -55,41 +59,48 @@ DIALOG_GRAPHIC_ITEMS_OPTIONS_BASE::DIALOG_GRAPHIC_ITEMS_OPTIONS_BASE( wxWindow*
sbSizerLeft->Add( m_TextSizeHTitle, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
m_OptPcbTextHSize = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
m_OptPcbTextHSize->SetMaxLength( 0 );
sbSizerLeft->Add( m_OptPcbTextHSize, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
bSizerUpper->Add( sbSizerLeft, 1, wxEXPAND|wxALL, 5 );
wxStaticBoxSizer* sbSizerMiddle;
sbSizerMiddle = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Modules:") ), wxVERTICAL );
sbSizerMiddle = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Footprints:") ), wxVERTICAL );
m_EdgeModWidthTitle = new wxStaticText( this, wxID_ANY, _("Edges Module Width"), wxDefaultPosition, wxDefaultSize, 0 );
m_EdgeModWidthTitle = new wxStaticText( this, wxID_ANY, _("Edges Width"), wxDefaultPosition, wxDefaultSize, 0 );
m_EdgeModWidthTitle->Wrap( -1 );
sbSizerMiddle->Add( m_EdgeModWidthTitle, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
m_OptModuleEdgesWidth = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
m_OptModuleEdgesWidth->SetMaxLength( 0 );
sbSizerMiddle->Add( m_OptModuleEdgesWidth, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
m_TextModWidthTitle = new wxStaticText( this, wxID_ANY, _("Text Module Width"), wxDefaultPosition, wxDefaultSize, 0 );
m_TextModWidthTitle = new wxStaticText( this, wxID_ANY, _("Text Width"), wxDefaultPosition, wxDefaultSize, 0 );
m_TextModWidthTitle->Wrap( -1 );
sbSizerMiddle->Add( m_TextModWidthTitle, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
m_OptModuleTextWidth = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
m_OptModuleTextWidth->SetMaxLength( 0 );
sbSizerMiddle->Add( m_OptModuleTextWidth, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 );
m_TextModSizeVTitle = new wxStaticText( this, wxID_ANY, _("Text Module Size V"), wxDefaultPosition, wxDefaultSize, 0 );
m_TextModSizeVTitle = new wxStaticText( this, wxID_ANY, _("Text Size V"), wxDefaultPosition, wxDefaultSize, 0 );
m_TextModSizeVTitle->Wrap( -1 );
sbSizerMiddle->Add( m_TextModSizeVTitle, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
m_OptModuleTextVSize = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
m_OptModuleTextVSize->SetMaxLength( 0 );
sbSizerMiddle->Add( m_OptModuleTextVSize, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 );
m_TextModSizeHTitle = new wxStaticText( this, wxID_ANY, _("Text Module Size H"), wxDefaultPosition, wxDefaultSize, 0 );
m_TextModSizeHTitle = new wxStaticText( this, wxID_ANY, _("Text Size H"), wxDefaultPosition, wxDefaultSize, 0 );
m_TextModSizeHTitle->Wrap( -1 );
sbSizerMiddle->Add( m_TextModSizeHTitle, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
m_OptModuleTextHSize = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
m_OptModuleTextHSize->SetMaxLength( 0 );
sbSizerMiddle->Add( m_OptModuleTextHSize, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 );
bSizerUpper->Add( sbSizerMiddle, 1, wxEXPAND|wxALL, 5 );
wxStaticBoxSizer* sbSizerRight;
......@@ -102,10 +113,13 @@ DIALOG_GRAPHIC_ITEMS_OPTIONS_BASE::DIALOG_GRAPHIC_ITEMS_OPTIONS_BASE( wxWindow*
sbSizerRight->Add( m_DefaultPenSizeTitle, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
m_DefaultPenSizeCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
m_DefaultPenSizeCtrl->SetMaxLength( 0 );
sbSizerRight->Add( m_DefaultPenSizeCtrl, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
bSizerUpper->Add( sbSizerRight, 1, wxEXPAND|wxALL, 5 );
bSizerMain->Add( bSizerUpper, 1, wxEXPAND, 5 );
m_sdbSizer1 = new wxStdDialogButtonSizer();
......@@ -114,8 +128,10 @@ DIALOG_GRAPHIC_ITEMS_OPTIONS_BASE::DIALOG_GRAPHIC_ITEMS_OPTIONS_BASE( wxWindow*
m_sdbSizer1Cancel = new wxButton( this, wxID_CANCEL );
m_sdbSizer1->AddButton( m_sdbSizer1Cancel );
m_sdbSizer1->Realize();
bSizerMain->Add( m_sdbSizer1, 0, wxALIGN_RIGHT|wxEXPAND|wxTOP|wxBOTTOM, 5 );
this->SetSizer( bSizerMain );
this->Layout();
......@@ -129,4 +145,5 @@ DIALOG_GRAPHIC_ITEMS_OPTIONS_BASE::~DIALOG_GRAPHIC_ITEMS_OPTIONS_BASE()
// Disconnect Events
m_sdbSizer1Cancel->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_GRAPHIC_ITEMS_OPTIONS_BASE::OnCancelClick ), NULL, this );
m_sdbSizer1OK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_GRAPHIC_ITEMS_OPTIONS_BASE::OnOkClick ), NULL, this );
}
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<wxFormBuilder_Project>
<FileVersion major="1" minor="11" />
<FileVersion major="1" minor="13" />
<object class="Project" expanded="1">
<property name="class_decoration"></property>
<property name="code_generation">C++</property>
......@@ -20,8 +20,10 @@
<property name="path">.</property>
<property name="precompiled_header"></property>
<property name="relative_path">1</property>
<property name="skip_lua_events">1</property>
<property name="skip_php_events">1</property>
<property name="skip_python_events">1</property>
<property name="ui_table">UI</property>
<property name="use_enum">0</property>
<property name="use_microsoft_bom">0</property>
<object class="Dialog" expanded="1">
......@@ -42,7 +44,7 @@
<property name="minimum_size"></property>
<property name="name">DIALOG_GRAPHIC_ITEMS_OPTIONS_BASE</property>
<property name="pos"></property>
<property name="size">459,315</property>
<property name="size">459,345</property>
<property name="style">wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER</property>
<property name="subclass">DIALOG_SHIM; dialog_shim.h</property>
<property name="title">Texts and Drawings</property>
......@@ -990,7 +992,7 @@
<property name="proportion">1</property>
<object class="wxStaticBoxSizer" expanded="1">
<property name="id">wxID_ANY</property>
<property name="label">Modules:</property>
<property name="label">Footprints:</property>
<property name="minimum_size"></property>
<property name="name">sbSizerMiddle</property>
<property name="orient">wxVERTICAL</property>
......@@ -1028,7 +1030,7 @@
<property name="gripper">0</property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="label">Edges Module Width</property>
<property name="label">Edges Width</property>
<property name="max_size"></property>
<property name="maximize_button">0</property>
<property name="maximum_size"></property>
......@@ -1202,7 +1204,7 @@
<property name="gripper">0</property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="label">Text Module Width</property>
<property name="label">Text Width</property>
<property name="max_size"></property>
<property name="maximize_button">0</property>
<property name="maximum_size"></property>
......@@ -1376,7 +1378,7 @@
<property name="gripper">0</property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="label">Text Module Size V</property>
<property name="label">Text Size V</property>
<property name="max_size"></property>
<property name="maximize_button">0</property>
<property name="maximum_size"></property>
......@@ -1550,7 +1552,7 @@
<property name="gripper">0</property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="label">Text Module Size H</property>
<property name="label">Text Size H</property>
<property name="max_size"></property>
<property name="maximize_button">0</property>
<property name="maximum_size"></property>
......
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Apr 16 2008)
// C++ code generated with wxFormBuilder (version Jun 6 2014)
// http://www.wxformbuilder.org/
//
// PLEASE DO "NOT" EDIT THIS FILE!
///////////////////////////////////////////////////////////////////////////
#ifndef __dialog_graphic_items_options_base__
#define __dialog_graphic_items_options_base__
#ifndef __DIALOG_GRAPHIC_ITEMS_OPTIONS_BASE_H__
#define __DIALOG_GRAPHIC_ITEMS_OPTIONS_BASE_H__
#include <wx/artprov.h>
#include <wx/xrc/xmlres.h>
#include <wx/intl.h>
class DIALOG_SHIM;
#include "dialog_shim.h"
#include <wx/string.h>
#include <wx/stattext.h>
#include <wx/gdicmn.h>
......@@ -28,7 +32,7 @@
///////////////////////////////////////////////////////////////////////////////
/// Class DIALOG_GRAPHIC_ITEMS_OPTIONS_BASE
///////////////////////////////////////////////////////////////////////////////
class DIALOG_GRAPHIC_ITEMS_OPTIONS_BASE : public wxDialog
class DIALOG_GRAPHIC_ITEMS_OPTIONS_BASE : public DIALOG_SHIM
{
private:
......@@ -58,14 +62,15 @@ class DIALOG_GRAPHIC_ITEMS_OPTIONS_BASE : public wxDialog
wxButton* m_sdbSizer1Cancel;
// Virtual event handlers, overide them in your derived class
virtual void OnCancelClick( wxCommandEvent& event ){ event.Skip(); }
virtual void OnOkClick( wxCommandEvent& event ){ event.Skip(); }
virtual void OnCancelClick( wxCommandEvent& event ) { event.Skip(); }
virtual void OnOkClick( wxCommandEvent& event ) { event.Skip(); }
public:
DIALOG_GRAPHIC_ITEMS_OPTIONS_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Texts and Drawings"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 459,315 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
DIALOG_GRAPHIC_ITEMS_OPTIONS_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Texts and Drawings"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 459,345 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
~DIALOG_GRAPHIC_ITEMS_OPTIONS_BASE();
};
#endif //__dialog_graphic_items_options_base__
#endif //__DIALOG_GRAPHIC_ITEMS_OPTIONS_BASE_H__
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Nov 6 2013)
// C++ code generated with wxFormBuilder (version Jun 6 2014)
// http://www.wxformbuilder.org/
//
// PLEASE DO "NOT" EDIT THIS FILE!
......@@ -30,7 +30,7 @@ DIALOG_NETLIST_FBP::DIALOG_NETLIST_FBP( wxWindow* parent, wxWindowID id, const w
wxString m_Select_By_TimestampChoices[] = { _("Reference"), _("Timestamp") };
int m_Select_By_TimestampNChoices = sizeof( m_Select_By_TimestampChoices ) / sizeof( wxString );
m_Select_By_Timestamp = new wxRadioBox( this, wxID_ANY, _("Module Selection"), wxDefaultPosition, wxDefaultSize, m_Select_By_TimestampNChoices, m_Select_By_TimestampChoices, 1, wxRA_SPECIFY_COLS );
m_Select_By_Timestamp = new wxRadioBox( this, wxID_ANY, _("Footprint Selection"), wxDefaultPosition, wxDefaultSize, m_Select_By_TimestampNChoices, m_Select_By_TimestampChoices, 1, wxRA_SPECIFY_COLS );
m_Select_By_Timestamp->SetSelection( 0 );
m_Select_By_Timestamp->SetToolTip( _("Select how footprints are recognized:\nby their reference (U1, R3...) (normal setting)\nor their time stamp (special setting after a full schematic reannotation)") );
......@@ -38,7 +38,7 @@ DIALOG_NETLIST_FBP::DIALOG_NETLIST_FBP( wxWindow* parent, wxWindowID id, const w
wxString m_cmpNameSourceOptChoices[] = { _("From netlist"), _("From separate .cmp file") };
int m_cmpNameSourceOptNChoices = sizeof( m_cmpNameSourceOptChoices ) / sizeof( wxString );
m_cmpNameSourceOpt = new wxRadioBox( this, wxID_ANY, _("Module Name Source"), wxDefaultPosition, wxDefaultSize, m_cmpNameSourceOptNChoices, m_cmpNameSourceOptChoices, 1, wxRA_SPECIFY_COLS );
m_cmpNameSourceOpt = new wxRadioBox( this, wxID_ANY, _("Footprint Name Source"), wxDefaultPosition, wxDefaultSize, m_cmpNameSourceOptNChoices, m_cmpNameSourceOptChoices, 1, wxRA_SPECIFY_COLS );
m_cmpNameSourceOpt->SetSelection( 0 );
m_cmpNameSourceOpt->SetToolTip( _("Source of footprints names for component:\n- the netlist (if you have filled the footprint field of each component in schematic)\n- the .cmp file created by CvPcb") );
......@@ -46,7 +46,7 @@ DIALOG_NETLIST_FBP::DIALOG_NETLIST_FBP( wxWindow* parent, wxWindowID id, const w
wxString m_ChangeExistingFootprintCtrlChoices[] = { _("Keep"), _("Change") };
int m_ChangeExistingFootprintCtrlNChoices = sizeof( m_ChangeExistingFootprintCtrlChoices ) / sizeof( wxString );
m_ChangeExistingFootprintCtrl = new wxRadioBox( this, wxID_ANY, _("Exchange Module"), wxDefaultPosition, wxDefaultSize, m_ChangeExistingFootprintCtrlNChoices, m_ChangeExistingFootprintCtrlChoices, 1, wxRA_SPECIFY_COLS );
m_ChangeExistingFootprintCtrl = new wxRadioBox( this, wxID_ANY, _("Exchange Footprint"), wxDefaultPosition, wxDefaultSize, m_ChangeExistingFootprintCtrlNChoices, m_ChangeExistingFootprintCtrlChoices, 1, wxRA_SPECIFY_COLS );
m_ChangeExistingFootprintCtrl->SetSelection( 0 );
m_ChangeExistingFootprintCtrl->SetToolTip( _("Keep or change an existing footprint when the netlist gives a different footprint") );
......
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<wxFormBuilder_Project>
<FileVersion major="1" minor="11" />
<FileVersion major="1" minor="13" />
<object class="Project" expanded="1">
<property name="class_decoration"></property>
<property name="code_generation">C++</property>
......@@ -162,7 +162,7 @@
<property name="gripper">0</property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="label">Module Selection</property>
<property name="label">Footprint Selection</property>
<property name="majorDimension">1</property>
<property name="max_size"></property>
<property name="maximize_button">0</property>
......@@ -252,7 +252,7 @@
<property name="gripper">0</property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="label">Module Name Source</property>
<property name="label">Footprint Name Source</property>
<property name="majorDimension">1</property>
<property name="max_size"></property>
<property name="maximize_button">0</property>
......@@ -342,7 +342,7 @@
<property name="gripper">0</property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="label">Exchange Module</property>
<property name="label">Exchange Footprint</property>
<property name="majorDimension">1</property>
<property name="max_size"></property>
<property name="maximize_button">0</property>
......
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Nov 6 2013)
// C++ code generated with wxFormBuilder (version Jun 6 2014)
// http://www.wxformbuilder.org/
//
// PLEASE DO "NOT" EDIT THIS FILE!
......
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Apr 30 2013)
// C++ code generated with wxFormBuilder (version Jun 6 2014)
// http://www.wxformbuilder.org/
//
// PLEASE DO "NOT" EDIT THIS FILE!
......@@ -471,7 +471,7 @@ DIALOG_PAD_PROPERTIES_BASE::DIALOG_PAD_PROPERTIES_BASE( wxWindow* parent, wxWind
m_staticText40->Wrap( -1 );
fgSizer41->Add( m_staticText40, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxTOP, 5 );
wxString m_ZoneConnectionChoiceChoices[] = { _("From parent module"), _("Solid"), _("Thermal relief"), _("None") };
wxString m_ZoneConnectionChoiceChoices[] = { _("From parent footprint"), _("Solid"), _("Thermal relief"), _("None") };
int m_ZoneConnectionChoiceNChoices = sizeof( m_ZoneConnectionChoiceChoices ) / sizeof( wxString );
m_ZoneConnectionChoice = new wxChoice( m_localSettingsPanel, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_ZoneConnectionChoiceNChoices, m_ZoneConnectionChoiceChoices, 0 );
m_ZoneConnectionChoice->SetSelection( 0 );
......
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<wxFormBuilder_Project>
<FileVersion major="1" minor="11" />
<FileVersion major="1" minor="13" />
<object class="Project" expanded="1">
<property name="class_decoration"></property>
<property name="code_generation">C++</property>
......@@ -20,8 +20,10 @@
<property name="path">.</property>
<property name="precompiled_header"></property>
<property name="relative_path">1</property>
<property name="skip_lua_events">1</property>
<property name="skip_php_events">1</property>
<property name="skip_python_events">1</property>
<property name="ui_table">UI</property>
<property name="use_enum">1</property>
<property name="use_microsoft_bom">0</property>
<object class="Dialog" expanded="1">
......@@ -7460,7 +7462,7 @@
<property name="caption"></property>
<property name="caption_visible">1</property>
<property name="center_pane">0</property>
<property name="choices">&quot;From parent module&quot; &quot;Solid&quot; &quot;Thermal relief&quot; &quot;None&quot;</property>
<property name="choices">&quot;From parent footprint&quot; &quot;Solid&quot; &quot;Thermal relief&quot; &quot;None&quot;</property>
<property name="close_button">1</property>
<property name="context_help"></property>
<property name="context_menu">1</property>
......
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Apr 30 2013)
// C++ code generated with wxFormBuilder (version Jun 6 2014)
// http://www.wxformbuilder.org/
//
// PLEASE DO "NOT" EDIT THIS FILE!
......
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Jun 5 2014)
// C++ code generated with wxFormBuilder (version Jun 6 2014)
// http://www.wxformbuilder.org/
//
// PLEASE DO "NOT" EDIT THIS FILE!
......@@ -96,14 +96,15 @@ DIALOG_PLOT_BASE::DIALOG_PLOT_BASE( wxWindow* parent, wxWindowID id, const wxStr
bSizerPlotItems->Add( m_plotPads_on_Silkscreen, 0, wxALL, 2 );
m_plotModuleValueOpt = new wxCheckBox( this, wxID_ANY, _("Plot module values"), wxDefaultPosition, wxDefaultSize, 0 );
m_plotModuleValueOpt = new wxCheckBox( this, wxID_ANY, _("Plot footprint values"), wxDefaultPosition, wxDefaultSize, 0 );
m_plotModuleValueOpt->SetValue(true);
bSizerPlotItems->Add( m_plotModuleValueOpt, 0, wxTOP|wxRIGHT|wxLEFT, 2 );
m_plotModuleRefOpt = new wxCheckBox( this, ID_PRINT_REF, _("Plot module references"), wxDefaultPosition, wxDefaultSize, 0 );
m_plotModuleRefOpt = new wxCheckBox( this, ID_PRINT_REF, _("Plot footprint references"), wxDefaultPosition, wxDefaultSize, 0 );
bSizerPlotItems->Add( m_plotModuleRefOpt, 0, wxTOP|wxRIGHT|wxLEFT, 2 );
m_plotInvisibleText = new wxCheckBox( this, wxID_ANY, _("Force plot invisible values/references"), wxDefaultPosition, wxDefaultSize, 0 );
m_plotInvisibleText->SetToolTip( _("Force plotting of invisible values and/or references") );
m_plotInvisibleText = new wxCheckBox( this, wxID_ANY, _("Force plotting of invisible values/references"), wxDefaultPosition, wxDefaultSize, 0 );
m_plotInvisibleText->SetToolTip( _("Force plot invisible values and/or references") );
bSizerPlotItems->Add( m_plotInvisibleText, 0, wxALL, 2 );
......@@ -246,7 +247,7 @@ DIALOG_PLOT_BASE::DIALOG_PLOT_BASE( wxWindow* parent, wxWindowID id, const wxStr
int m_rbGerberFormatNChoices = sizeof( m_rbGerberFormatChoices ) / sizeof( wxString );
m_rbGerberFormat = new wxRadioBox( this, wxID_ANY, _("Format"), wxDefaultPosition, wxDefaultSize, m_rbGerberFormatNChoices, m_rbGerberFormatChoices, 1, wxRA_SPECIFY_COLS );
m_rbGerberFormat->SetSelection( 0 );
m_rbGerberFormat->SetToolTip( _("Resolution of coordinates in Gerber files.\nUse the higher value if possible") );
m_rbGerberFormat->SetToolTip( _("Resolution of coordinates in Gerber files.\nUse the higher value if possible.") );
m_GerberOptionsSizer->Add( m_rbGerberFormat, 1, wxEXPAND|wxALIGN_CENTER_VERTICAL|wxALL, 5 );
......
This diff is collapsed.
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Jun 5 2014)
// C++ code generated with wxFormBuilder (version Jun 6 2014)
// http://www.wxformbuilder.org/
//
// PLEASE DO "NOT" EDIT THIS FILE!
......
......@@ -620,7 +620,7 @@ void FOOTPRINT_WIZARD_FRAME::ReCreateHToolbar()
m_mainToolBar->AddSeparator();
m_mainToolBar->AddTool( ID_FOOTPRINT_WIZARD_DONE,
wxEmptyString, KiBitmap( export_footprint_names_xpm ),
_( "Insert footprint in board" ) );
_( "Add footprint to board" ) );
}
// after adding the buttons to the toolbar, must call Realize() to
......
......@@ -81,6 +81,7 @@
#include <class_edge_mod.h>
#include <3d_struct.h>
#include <pcb_plot_params.h>
#include <pcb_plot_params_parser.h>
#include <drawtxt.h>
#include <convert_to_biu.h>
#include <trigo.h>
......
......@@ -164,7 +164,7 @@ MODULE* PCB_BASE_FRAME::LoadModuleFromLibrary( const wxString& aLibrary,
static wxString lastComponentName;
// Ask for a component name or key words
DIALOG_GET_COMPONENT dlg( this, HistoryList, _( "Load Module" ), aUseFootprintViewer );
DIALOG_GET_COMPONENT dlg( this, HistoryList, _( "Load Footprint" ), aUseFootprintViewer );
dlg.SetComponentName( lastComponentName );
......
......@@ -69,7 +69,7 @@ void FOOTPRINT_EDIT_FRAME::ReCreateMenuBar()
// New module
AddMenuItem( fileMenu, ID_MODEDIT_NEW_MODULE,
_( "&New Module" ), _( "Create new module" ),
_( "&New Footprint" ), _( "Create new footprint" ),
KiBitmap( new_footprint_xpm ) );
// Open submenu
......@@ -77,26 +77,26 @@ void FOOTPRINT_EDIT_FRAME::ReCreateMenuBar()
// from File
AddMenuItem( openSubmenu, ID_MODEDIT_IMPORT_PART,
_( "&Import Module From File" ),
_( "&Import Footprint From File" ),
_( "Import footprint from an existing file" ),
KiBitmap( import_module_xpm ) );
// from Library
AddMenuItem( openSubmenu, ID_MODEDIT_LOAD_MODULE,
_( "Load Module From Current Li&brary" ),
_( "Open a footprint module from library" ),
_( "Load Footprint From Current Li&brary" ),
_( "Open a footprint from library" ),
KiBitmap( module_xpm ) );
// from current Board
AddMenuItem( openSubmenu, ID_MODEDIT_LOAD_MODULE_FROM_BOARD,
_( "Load Module From &Current Board" ),
_( "Load a footprint module from the current board" ),
_( "Load Footprint From &Current Board" ),
_( "Load a footprint from the current board" ),
KiBitmap( load_module_board_xpm ) );
/* Append openSubmenu to fileMenu */
AddMenuItem( fileMenu, openSubmenu, -1,
_( "&Load Module" ),
_( "Load footprint module" ),
_( "&Load Footprint" ),
_( "Load footprint" ),
KiBitmap( open_document_xpm ) );
fileMenu->AppendSeparator();
......@@ -107,23 +107,23 @@ void FOOTPRINT_EDIT_FRAME::ReCreateMenuBar()
KiBitmap( copy_library_xpm ) );
// Save module
text = AddHotkeyName( _( "&Save Module in Active Library" ),
text = AddHotkeyName( _( "&Save Footprint in Active Library" ),
g_Module_Editor_Hokeys_Descr, HK_SAVE_MODULE );
AddMenuItem( fileMenu, ID_MODEDIT_SAVE_LIBMODULE, text,
_( "Save module in active library" ),
_( "Save footprint in active library" ),
KiBitmap( save_library_xpm ) );
// Save module in new lib
AddMenuItem( fileMenu, ID_MODEDIT_CREATE_NEW_LIB_AND_SAVE_CURRENT_PART,
_( "S&ave Module in New Library" ),
_( "S&ave Footprint in New Library" ),
_( "Create a new library and save current module into it" ),
KiBitmap( new_library_xpm ) );
// Export module
AddMenuItem( fileMenu, ID_MODEDIT_EXPORT_PART,
_( "&Export Module" ),
_( "Save current loaded module into file" ),
_( "&Export Footprint" ),
_( "Save currently loaded footprint into file" ),
KiBitmap( export_module_xpm ) );
// Import DXF File
......@@ -137,7 +137,7 @@ void FOOTPRINT_EDIT_FRAME::ReCreateMenuBar()
// Print
AddMenuItem( fileMenu, wxID_PRINT,
_( "&Print" ),
_( "Print current module" ),
_( "Print current footprint" ),
KiBitmap( plot_xpm ) );
// Separator
......@@ -175,7 +175,7 @@ void FOOTPRINT_EDIT_FRAME::ReCreateMenuBar()
// Properties
AddMenuItem( editMenu, ID_MODEDIT_EDIT_MODULE_PROPERTIES,
_( "Edit &Properties" ),
_( "Edit module properties" ),
_( "Edit footprint properties" ),
KiBitmap( module_options_xpm ) );
// Dimensions submenu
......
......@@ -134,8 +134,8 @@ void PCB_EDIT_FRAME::ReCreateMenuBar()
//----- Fabrication Outputs submenu -----------------------------------------
wxMenu* fabricationOutputsMenu = new wxMenu;
AddMenuItem( fabricationOutputsMenu, ID_PCB_GEN_POS_MODULES_FILE,
_( "&Modules Position (.pos) File" ),
_( "Generate modules position file for pick and place" ),
_( "&Footprint Position (.pos) File" ),
_( "Generate footprint position file for pick and place" ),
KiBitmap( post_compo_xpm ) );
AddMenuItem( fabricationOutputsMenu, ID_PCB_GEN_DRILL_FILE,
......@@ -144,8 +144,8 @@ void PCB_EDIT_FRAME::ReCreateMenuBar()
KiBitmap( post_drill_xpm ) );
AddMenuItem( fabricationOutputsMenu, ID_GEN_EXPORT_FILE_MODULE_REPORT,
_( "&Module (.rpt) Report" ),
_( "Create a report of all modules on the current board" ),
_( "&Footprint (.rpt) Report" ),
_( "Create a report of all footprints on the current board" ),
KiBitmap( tools_xpm ) );
AddMenuItem( fabricationOutputsMenu, ID_PCB_GEN_D356_FILE,
......@@ -279,7 +279,7 @@ void PCB_EDIT_FRAME::ReCreateMenuBar()
AddMenuItem( editMenu, ID_PCB_GLOBAL_DELETE,
_( "&Global Deletions" ),
_( "Delete tracks, modules, texts... on board" ),
_( "Delete tracks, footprints, texts... on board" ),
KiBitmap( general_deletions_xpm ) );
AddMenuItem( editMenu, ID_MENU_PCB_CLEAN,
......@@ -293,8 +293,8 @@ void PCB_EDIT_FRAME::ReCreateMenuBar()
KiBitmap( swap_layer_xpm ) );
AddMenuItem( editMenu, ID_MENU_PCB_RESET_TEXTMODULE_FIELDS_SIZES,
_( "&Reset Module Field Sizes" ),
_( "Reset text size and width of all module fields to current defaults" ),
_( "&Reset Footprint Field Sizes" ),
_( "Reset text size and width of all footprint fields to current defaults" ),
KiBitmap( reset_text_xpm ) );
//----- View menu -----------------------------------------------------------
......@@ -365,10 +365,10 @@ void PCB_EDIT_FRAME::ReCreateMenuBar()
//----- Place Menu ----------------------------------------------------------
wxMenu* placeMenu = new wxMenu;
text = AddHotkeyName( _( "&Module" ), g_Pcbnew_Editor_Hokeys_Descr,
text = AddHotkeyName( _( "&Footprint" ), g_Pcbnew_Editor_Hokeys_Descr,
HK_ADD_MODULE );
AddMenuItem( placeMenu, ID_PCB_MODULE_BUTT, text,
_( "Add modules" ), KiBitmap( module_xpm ) );
_( "Add footprints" ), KiBitmap( module_xpm ) );
text = AddHotkeyName( _( "&Track" ), g_Pcbnew_Editor_Hokeys_Descr,
HK_ADD_NEW_TRACK, IS_COMMENT );
......
......@@ -262,10 +262,10 @@ bool FOOTPRINT_EDIT_FRAME::OnRightClick( const wxPoint& MousePos, wxMenu* PopMen
KiBitmap( rotate_module_ccw_xpm ) );
AddMenuItem( transform_choice, ID_MODEDIT_MODULE_MIRROR, _( "Mirror" ),
KiBitmap( mirror_footprint_axisY_xpm ) );
msg = AddHotkeyName( _( "Edit Module" ), g_Module_Editor_Hokeys_Descr, HK_EDIT_ITEM );
msg = AddHotkeyName( _( "Edit Footprint" ), g_Module_Editor_Hokeys_Descr, HK_EDIT_ITEM );
AddMenuItem( PopMenu, ID_POPUP_PCB_EDIT_MODULE_PRMS, msg, KiBitmap( edit_module_xpm ) );
AddMenuItem( PopMenu, transform_choice, ID_MODEDIT_TRANSFORM_MODULE,
_( "Transform Module" ), KiBitmap( edit_xpm ) );
_( "Transform Footprint" ), KiBitmap( edit_xpm ) );
break;
}
......@@ -297,25 +297,25 @@ bool FOOTPRINT_EDIT_FRAME::OnRightClick( const wxPoint& MousePos, wxMenu* PopMen
case PCB_MODULE_TEXT_T:
if( !flags )
{
msg = AddHotkeyName( _("Move Text Mod." ), g_Module_Editor_Hokeys_Descr,
msg = AddHotkeyName( _("Move Text" ), g_Module_Editor_Hokeys_Descr,
HK_MOVE_ITEM );
AddMenuItem( PopMenu, ID_POPUP_PCB_MOVE_TEXTMODULE_REQUEST, msg,
KiBitmap( move_field_xpm ) );
}
msg = AddHotkeyName( _("Rotate Text Mod." ), g_Module_Editor_Hokeys_Descr,
msg = AddHotkeyName( _("Rotate Text" ), g_Module_Editor_Hokeys_Descr,
HK_ROTATE_ITEM );
AddMenuItem( PopMenu, ID_POPUP_PCB_ROTATE_TEXTMODULE, msg, KiBitmap( rotate_field_xpm ) );
if( !flags )
{
msg = AddHotkeyName( _("Edit Text Mod." ), g_Module_Editor_Hokeys_Descr,
msg = AddHotkeyName( _("Edit Text" ), g_Module_Editor_Hokeys_Descr,
HK_EDIT_ITEM );
AddMenuItem( PopMenu, ID_POPUP_PCB_EDIT_TEXTMODULE, msg, KiBitmap( edit_text_xpm ) );
if( ( static_cast<TEXTE_MODULE*>( item ) )->GetType() == TEXTE_MODULE::TEXT_is_DIVERS )
{
msg = AddHotkeyName( _("Delete Text Mod." ), g_Module_Editor_Hokeys_Descr,
msg = AddHotkeyName( _("Delete Text" ), g_Module_Editor_Hokeys_Descr,
HK_DELETE );
AddMenuItem( PopMenu, ID_POPUP_PCB_DELETE_TEXTMODULE, msg,
KiBitmap( delete_text_xpm ) );
......
......@@ -461,7 +461,7 @@ void FOOTPRINT_EDIT_FRAME::OnCloseWindow( wxCloseEvent& Event )
{
if( GetScreen()->IsModify() )
{
int ii = DisplayExitDialog( this, _( "Save the changes in the module before closing?" ) );
int ii = DisplayExitDialog( this, _( "Save the changes to the footprint before closing?" ) );
switch( ii )
{
......@@ -482,7 +482,7 @@ void FOOTPRINT_EDIT_FRAME::OnCloseWindow( wxCloseEvent& Event )
}
else
{
DisplayError( this, _( "Library is not set, the module could not be saved." ) );
DisplayError( this, _( "Library is not set, the footprint could not be saved." ) );
}
// fall through: cancel the close because of an error
......@@ -672,7 +672,7 @@ void FOOTPRINT_EDIT_FRAME::OnModify()
void FOOTPRINT_EDIT_FRAME::updateTitle()
{
wxString title = _( "Module Editor " );
wxString title = _( "Footprint Editor " );
wxString nickname = GetCurrentLib();
......@@ -688,7 +688,7 @@ void FOOTPRINT_EDIT_FRAME::updateTitle()
bool writable = Prj().PcbFootprintLibs()->IsFootprintLibWritable( nickname );
// no exception was thrown, this means libPath is valid, but it may be read only.
title = _( "Module Editor (active library: " ) + nickname + wxT( ")" );
title = _( "Footprint Editor (active library: " ) + nickname + wxT( ")" );
if( !writable )
title += _( " [Read Only]" );
......
......@@ -64,7 +64,7 @@ MODULE* PCB_BASE_FRAME::GetModuleByName()
wxString moduleName;
MODULE* module = NULL;
wxTextEntryDialog dlg( this, _( "Name:" ), _( "Search footprint" ), moduleName );
wxTextEntryDialog dlg( this, _( "Reference:" ), _( "Search for footprint" ), moduleName );
if( dlg.ShowModal() != wxID_OK )
return NULL; //Aborted by user
......@@ -262,7 +262,7 @@ bool PCB_EDIT_FRAME::Delete_Module( MODULE* aModule, wxDC* aDC, bool aAskBeforeD
/* Confirm module delete. */
if( aAskBeforeDeleting )
{
msg.Printf( _( "Delete Module %s (value %s) ?" ),
msg.Printf( _( "Delete Footprint %s (value %s) ?" ),
GetChars( aModule->GetReference() ),
GetChars( aModule->GetValue() ) );
......
......@@ -153,14 +153,14 @@ bool PCB_EDIT_FRAME::OnRightClick( const wxPoint& aMousePos, wxMenu* aPopMenu )
if( !( (MODULE*) item )->IsLocked() )
{
msg = AddHotkeyName( _("Lock Module" ), g_Board_Editor_Hokeys_Descr,
msg = AddHotkeyName( _("Lock Footprint" ), g_Board_Editor_Hokeys_Descr,
HK_LOCK_UNLOCK_FOOTPRINT );
AddMenuItem( aPopMenu, ID_POPUP_PCB_AUTOPLACE_FIXE_MODULE, msg,
KiBitmap( locked_xpm ) );
}
else
{
msg = AddHotkeyName( _( "Unlock Module" ), g_Board_Editor_Hokeys_Descr,
msg = AddHotkeyName( _( "Unlock Footprint" ), g_Board_Editor_Hokeys_Descr,
HK_LOCK_UNLOCK_FOOTPRINT );
AddMenuItem( aPopMenu, ID_POPUP_PCB_AUTOPLACE_FREE_MODULE, msg,
KiBitmap( unlocked_xpm ) );
......@@ -168,14 +168,14 @@ bool PCB_EDIT_FRAME::OnRightClick( const wxPoint& aMousePos, wxMenu* aPopMenu )
if( !flags )
aPopMenu->Append( ID_POPUP_PCB_AUTOPLACE_CURRENT_MODULE,
_( "Automatically Place Module" ) );
_( "Automatically Place Footprint" ) );
}
if( m_mainToolBar->GetToolToggled( ID_TOOLBARH_PCB_MODE_TRACKS ) )
{
if( !flags )
aPopMenu->Append( ID_POPUP_PCB_AUTOROUTE_MODULE,
_( "Automatically Route Module" ) );
_( "Automatically Route Footprint" ) );
}
break;
......@@ -413,7 +413,7 @@ bool PCB_EDIT_FRAME::OnRightClick( const wxPoint& aMousePos, wxMenu* aPopMenu )
_( "Select Layer Pair" ), KiBitmap( select_layer_pair_xpm ) );
commands->AppendSeparator();
commands->Append( ID_POPUP_PCB_AUTOROUTE_ALL_MODULES,
_( "Automatically Route All Modules" ) );
_( "Automatically Route All Footprints" ) );
commands->AppendSeparator();
commands->Append( ID_POPUP_PCB_AUTOROUTE_RESET_UNROUTED, _( "Reset Unrouted" ) );
aPopMenu->AppendSeparator();
......@@ -758,10 +758,10 @@ void PCB_EDIT_FRAME::createPopUpMenuForFootprints( MODULE* aModule, wxMenu* menu
AddMenuItem( sub_menu_footprint, ID_POPUP_PCB_EDIT_MODULE_PRMS, msg,
KiBitmap( edit_module_xpm ) );
AddMenuItem( sub_menu_footprint, ID_POPUP_PCB_EDIT_MODULE_WITH_MODEDIT,
_( "Edit with Module Editor" ),
_( "Edit with Footprint Editor" ),
KiBitmap( module_editor_xpm ) );
sub_menu_footprint->AppendSeparator();
msg = AddHotkeyName( _( "Delete Module" ),
msg = AddHotkeyName( _( "Delete Footprint" ),
g_Board_Editor_Hokeys_Descr, HK_DELETE );
AddMenuItem( sub_menu_footprint, ID_POPUP_PCB_DELETE_MODULE,
msg, KiBitmap( delete_module_xpm ) );
......
......@@ -55,22 +55,6 @@ const LAYER_NUM GAL_LAYER_ORDER[] =
NETNAMES_GAL_LAYER( F_Cu ), F_Cu,
F_SilkS, F_Paste, F_Adhes,
#if 0 // was:
NETNAMES_GAL_LAYER( LAYER_15_NETNAMES_VISIBLE ), LAYER_N_15,
NETNAMES_GAL_LAYER( LAYER_14_NETNAMES_VISIBLE ), LAYER_N_14,
NETNAMES_GAL_LAYER( LAYER_13_NETNAMES_VISIBLE ), LAYER_N_13,
NETNAMES_GAL_LAYER( LAYER_12_NETNAMES_VISIBLE ), LAYER_N_12,
NETNAMES_GAL_LAYER( LAYER_11_NETNAMES_VISIBLE ), LAYER_N_11,
NETNAMES_GAL_LAYER( LAYER_10_NETNAMES_VISIBLE ), LAYER_N_10,
NETNAMES_GAL_LAYER( LAYER_9_NETNAMES_VISIBLE ), LAYER_N_9,
NETNAMES_GAL_LAYER( LAYER_8_NETNAMES_VISIBLE ), LAYER_N_8,
NETNAMES_GAL_LAYER( LAYER_7_NETNAMES_VISIBLE ), LAYER_N_7,
NETNAMES_GAL_LAYER( LAYER_6_NETNAMES_VISIBLE ), LAYER_N_6,
NETNAMES_GAL_LAYER( LAYER_5_NETNAMES_VISIBLE ), LAYER_N_5,
NETNAMES_GAL_LAYER( LAYER_4_NETNAMES_VISIBLE ), LAYER_N_4,
NETNAMES_GAL_LAYER( LAYER_3_NETNAMES_VISIBLE ), LAYER_N_3,
NETNAMES_GAL_LAYER( LAYER_2_NETNAMES_VISIBLE ), LAYER_N_2,
#else
NETNAMES_GAL_LAYER( In1_Cu ), In1_Cu,
NETNAMES_GAL_LAYER( In2_Cu ), In2_Cu,
NETNAMES_GAL_LAYER( In3_Cu ), In3_Cu,
......@@ -101,7 +85,7 @@ const LAYER_NUM GAL_LAYER_ORDER[] =
NETNAMES_GAL_LAYER( In28_Cu ), In28_Cu,
NETNAMES_GAL_LAYER( In29_Cu ), In29_Cu,
NETNAMES_GAL_LAYER( In30_Cu ), In30_Cu,
#endif
NETNAMES_GAL_LAYER( PAD_BK_NETNAMES_VISIBLE ), ITEM_GAL_LAYER( PAD_BK_VISIBLE ), B_Mask,
NETNAMES_GAL_LAYER( B_Cu ), B_Cu,
......@@ -214,6 +198,7 @@ void PCB_DRAW_PANEL_GAL::DisplayBoard( const BOARD* aBoard )
m_view->Add( m_ratsnest );
UseColorScheme( aBoard->GetColorsSettings() );
static_cast<KIGFX::PCB_RENDER_SETTINGS*>( m_view->GetPainter()->GetSettings() )->LoadDisplayOptions( DisplayOpt );
m_view->RecacheAllItems( true );
}
......
......@@ -47,6 +47,7 @@
#include <class_track.h>
#include <class_zone.h>
#include <kicad_plugin.h>
#include <pcb_plot_params_parser.h>
#include <pcb_plot_params.h>
#include <zones.h>
#include <pcb_parser.h>
......
......@@ -23,6 +23,7 @@
*/
#include <wx/wx.h>
#include <pcb_plot_params_parser.h>
#include <pcb_plot_params.h>
#include <layers_id_colors_and_visibility.h>
#include <plot_common.h>
......
......@@ -24,56 +24,11 @@
*/
#include <wx/wx.h>
#include <pcb_plot_params_lexer.h>
#include <eda_text.h> // EDA_DRAW_MODE_T
#include <plot_common.h>
#include <layers_id_colors_and_visibility.h>
class PCB_PLOT_PARAMS;
class LINE_READER;
/**
* Class PCB_PLOT_PARAMS_PARSER
* is the parser class for PCB_PLOT_PARAMS.
*/
class PCB_PLOT_PARAMS_PARSER : public PCB_PLOT_PARAMS_LEXER
{
public:
PCB_PLOT_PARAMS_PARSER( LINE_READER* aReader );
PCB_PLOT_PARAMS_PARSER( char* aLine, const wxString& aSource );
LINE_READER* GetReader() { return reader; };
void Parse( PCB_PLOT_PARAMS* aPcbPlotParams ) throw( PARSE_ERROR, IO_ERROR );
private:
bool parseBool();
/**
* Function parseInt
* parses an integer and constrains it between two values.
* @param aMin is the smallest return value.
* @param aMax is the largest return value.
* @return int - the parsed integer.
*/
int parseInt( int aMin, int aMax );
/**
* Function parseDouble
* parses a double
* @return double - the parsed double.
*/
double parseDouble();
/**
* Function skipCurrent
* Skip the current token level, i.e
* search for the RIGHT parenthesis which closes the current description
*/
void skipCurrent() throw( IO_ERROR, PARSE_ERROR );
};
class PCB_PLOT_PARAMS_PARSER;
/**
* Class PCB_PLOT_PARAMS
......
#ifndef PCB_PLOT_PARAMS_PARSER_H_
#define PCB_PLOT_PARAMS_PARSER_H_
/*
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 1992-2011 KiCad Developers, see change_log.txt for contributors.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, you may find one here:
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
* or you may search the http://www.gnu.org website for the version 2 license,
* or you may write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include <pcb_plot_params_lexer.h>
//#include <plot_common.h>
class PCB_PLOT_PARAMS;
class LINE_READER;
/**
* Class PCB_PLOT_PARAMS_PARSER
* is the parser class for PCB_PLOT_PARAMS.
*/
class PCB_PLOT_PARAMS_PARSER : public PCB_PLOT_PARAMS_LEXER
{
public:
PCB_PLOT_PARAMS_PARSER( LINE_READER* aReader );
PCB_PLOT_PARAMS_PARSER( char* aLine, const wxString& aSource );
LINE_READER* GetReader() { return reader; };
void Parse( PCB_PLOT_PARAMS* aPcbPlotParams ) throw( PARSE_ERROR, IO_ERROR );
private:
bool parseBool();
/**
* Function parseInt
* parses an integer and constrains it between two values.
* @param aMin is the smallest return value.
* @param aMax is the largest return value.
* @return int - the parsed integer.
*/
int parseInt( int aMin, int aMax );
/**
* Function parseDouble
* parses a double
* @return double - the parsed double.
*/
double parseDouble();
/**
* Function skipCurrent
* Skip the current token level, i.e
* search for the RIGHT parenthesis which closes the current description
*/
void skipCurrent() throw( IO_ERROR, PARSE_ERROR );
};
#endif // PCB_PLOT_PARAMS_PARSER_H_
......@@ -695,6 +695,8 @@ void PCB_EDIT_FRAME::UseGalCanvas( bool aEnable )
}
else
{
m_toolManager->ResetTools( TOOL_BASE::GAL_SWITCH );
// Redirect all events to the legacy canvas
GetGalCanvas()->SetEventDispatcher( NULL );
}
......
......@@ -47,8 +47,9 @@
EDGE_MODULE* Cast_to_EDGE_MODULE() { return dynamic_cast<EDGE_MODULE*>(self); }
D_PAD* Cast_to_D_PAD() { return dynamic_cast<D_PAD*>(self); }
TRACK* Cast_to_TRACK() { return dynamic_cast<TRACK*>(self); }
ZONE_CONTAINER* Cast_to_ZONE_CONTAINER() { return dynamic_cast<ZONE_CONTAINER*>(self);}
VIA* Cast_to_VIA() { return dynamic_cast<VIA*>(self); }
ZONE_CONTAINER* Cast_to_ZONE_CONTAINER() { return dynamic_cast<ZONE_CONTAINER*>(self);}
PCB_TARGET* Cast_to_PCB_TARGET() { return dynamic_cast<PCB_TARGET*>(self); }
%pythoncode
......@@ -77,6 +78,8 @@
return self.Cast_to_VIA()
elif ct=="TRACK":
return self.Cast_to_TRACK()
elif ct=="PCB_TARGET":
return self.Cast_to_PCB_TARGET()
elif ct=="ZONE_CONTAINER":
return self.Cast_to_ZONE_CONTAINER()
else:
......
......@@ -97,6 +97,7 @@
#include <class_dimension.h>
#include <class_drawsegment.h>
#include <class_marker_pcb.h>
#include <class_mire.h>
#include <class_text_mod.h>
#include <class_edge_mod.h>
#include <dlist.h>
......@@ -133,6 +134,7 @@
%include <class_dimension.h>
%include <class_drawsegment.h>
%include <class_marker_pcb.h>
%include <class_mire.h>
%include <class_text_mod.h>
%include <class_edge_mod.h>
%include <dlist.h>
......
......@@ -61,14 +61,14 @@ void FOOTPRINT_EDIT_FRAME::ReCreateHToolbar()
_( "Select active library" ) );
m_mainToolBar->AddTool( ID_MODEDIT_SAVE_LIBMODULE, wxEmptyString, KiBitmap( save_library_xpm ),
_( "Save module in active library" ) );
_( "Save footprint in active library" ) );
m_mainToolBar->AddTool( ID_MODEDIT_CREATE_NEW_LIB_AND_SAVE_CURRENT_PART, wxEmptyString,
KiBitmap( new_library_xpm ),
_( "Create new library and save current module" ) );
_( "Create new library and save current footprint" ) );
m_mainToolBar->AddTool( ID_OPEN_MODULE_VIEWER, wxEmptyString, KiBitmap( modview_icon_xpm ),
_( "Open module viewer" ) );
_( "Open footprint viewer" ) );
m_mainToolBar->AddSeparator();
m_mainToolBar->AddTool( ID_MODEDIT_DELETE_PART, wxEmptyString, KiBitmap( delete_xpm ),
......@@ -76,38 +76,38 @@ void FOOTPRINT_EDIT_FRAME::ReCreateHToolbar()
m_mainToolBar->AddSeparator();
m_mainToolBar->AddTool( ID_MODEDIT_NEW_MODULE, wxEmptyString, KiBitmap( new_footprint_xpm ),
_( "New module" ) );
_( "New footprint" ) );
#ifdef KICAD_SCRIPTING
m_mainToolBar->AddTool( ID_MODEDIT_NEW_MODULE_FROM_WIZARD, wxEmptyString,
KiBitmap( module_wizard_xpm ),
_( "New module from footprint wizard" ) );
_( "New footprint using wizard" ) );
#endif
m_mainToolBar->AddTool( ID_MODEDIT_LOAD_MODULE, wxEmptyString,
KiBitmap( load_module_lib_xpm ),
_( "Load module from library" ) );
_( "Load footprint from library" ) );
m_mainToolBar->AddSeparator();
m_mainToolBar->AddTool( ID_MODEDIT_LOAD_MODULE_FROM_BOARD, wxEmptyString,
KiBitmap( load_module_board_xpm ),
_( "Load module from current board" ) );
_( "Load footprint from current board" ) );
m_mainToolBar->AddTool( ID_MODEDIT_UPDATE_MODULE_IN_BOARD, wxEmptyString,
KiBitmap( update_module_board_xpm ),
_( "Update module in current board" ) );
_( "Update footprint in current board" ) );
m_mainToolBar->AddTool( ID_MODEDIT_INSERT_MODULE_IN_BOARD, wxEmptyString,
KiBitmap( insert_module_board_xpm ),
_( "Insert module into current board" ) );
_( "Insert footprint into current board" ) );
m_mainToolBar->AddSeparator();
m_mainToolBar->AddTool( ID_MODEDIT_IMPORT_PART, wxEmptyString, KiBitmap( import_module_xpm ),
_( "Import module" ) );
_( "Import footprint" ) );
m_mainToolBar->AddTool( ID_MODEDIT_EXPORT_PART, wxEmptyString, KiBitmap( export_module_xpm ),
_( "Export module" ) );
_( "Export footprint" ) );
m_mainToolBar->AddSeparator();
......@@ -119,11 +119,11 @@ void FOOTPRINT_EDIT_FRAME::ReCreateHToolbar()
m_mainToolBar->AddSeparator();
m_mainToolBar->AddTool( ID_MODEDIT_EDIT_MODULE_PROPERTIES, wxEmptyString,
KiBitmap( module_options_xpm ),
_( "Module properties" ) );
_( "Footprint properties" ) );
m_mainToolBar->AddSeparator();
m_mainToolBar->AddTool( wxID_PRINT, wxEmptyString, KiBitmap( print_button_xpm ),
_( "Print module" ) );
_( "Print footprint" ) );
m_mainToolBar->AddSeparator();
msg = AddHotkeyName( _( "Zoom in" ), g_Module_Editor_Hokeys_Descr, HK_ZOOM_IN, IS_COMMENT );
......@@ -146,7 +146,7 @@ void FOOTPRINT_EDIT_FRAME::ReCreateHToolbar()
m_mainToolBar->AddSeparator();
m_mainToolBar->AddTool( ID_MODEDIT_CHECK, wxEmptyString,
KiBitmap( module_check_xpm ),
_( "Check module" ) );
_( "Check footprint" ) );
// after adding the buttons to the toolbar, must call Realize() to reflect the changes
m_mainToolBar->Realize();
......@@ -184,7 +184,7 @@ void FOOTPRINT_EDIT_FRAME::ReCreateVToolbar()
m_drawToolBar->AddSeparator();
m_drawToolBar->AddTool( ID_MODEDIT_ANCHOR_TOOL, wxEmptyString, KiBitmap( anchor_xpm ),
_( "Place the footprint module reference anchor" ),
_( "Place the footprint reference anchor" ),
wxITEM_CHECK );
m_drawToolBar->AddSeparator();
......
This diff is collapsed.
......@@ -149,8 +149,8 @@ void PCB_EDIT_FRAME::OnUpdateShowModuleRatsnest( wxUpdateUIEvent& aEvent )
aEvent.Check( g_Show_Module_Ratsnest );
m_optionsToolBar->SetToolShortHelp( ID_TB_OPTIONS_SHOW_MODULE_RATSNEST,
g_Show_Module_Ratsnest ?
_( "Hide module ratsnest" ) :
_( "Show module ratsnest" ) );
_( "Hide footprint ratsnest" ) :
_( "Show footprint ratsnest" ) );
}
......
This diff is collapsed.
......@@ -217,6 +217,14 @@ public:
static TOOL_ACTION showHelp;
static TOOL_ACTION toBeDone;
/// Find an item
static TOOL_ACTION find;
/// Find an item and start moving
static TOOL_ACTION findMove;
/// Blocks CTRL+F, it is handled by wxWidgets
static TOOL_ACTION findDummy;
/**
* Function TranslateLegacyId()
* Translates legacy tool ids to the corresponding TOOL_ACTION name.
......
This diff is collapsed.
This diff is collapsed.
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