Compare commits
138 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 9c9252e8a3 | |||
| 3a744ad72f | |||
| 554e2a4bce | |||
| 6e8979d8d8 | |||
| 583d416640 | |||
| 03b50b4f85 | |||
| 440e135e3a | |||
| ab39f06003 | |||
| 98f78f534c | |||
| d18b12c1a3 | |||
| 6a7b1aa39a | |||
| c4be74a9d0 | |||
| 9092048dbc | |||
| bb419f1201 | |||
| d505fd2b60 | |||
| a771e0eccb | |||
| 593a5181d7 | |||
| c29274e760 | |||
| 216573bf48 | |||
| 1c235a5c89 | |||
| f90049dd9e | |||
| 90787e84bf | |||
| c36c80a077 | |||
| 227333239f | |||
| 2d43fcf9ee | |||
| 3edad56e6b | |||
| 4e2d900775 | |||
| 4dae82054e | |||
| cb5948d3a5 | |||
| 9fc7281fab | |||
| bb779b237a | |||
| 1294b4fec8 | |||
| 0b754562f6 | |||
| 15cb032ab7 | |||
| c85d2fd3bf | |||
| bc821ff47d | |||
| 42d9f42807 | |||
| 7ceff4cf5d | |||
| 4147da312b | |||
| 439891c31f | |||
| 322524101d | |||
| fd698653d9 | |||
| 8b503a06fa | |||
| 4a201df556 | |||
| 577b9f478b | |||
| f5a2eb1ab0 | |||
| 4379480d4b | |||
| dfa4afa826 | |||
| a533514763 | |||
| 952aaef52a | |||
| a54016a6f7 | |||
| 0c8a95c44b | |||
| 403633d21f | |||
| cc6f1d784d | |||
| e07ef3be9c | |||
| f35f534ff4 | |||
| 3899ec136b | |||
| 91ee809558 | |||
| 4c94e2729f | |||
| 2a5a207148 | |||
| c75bd89d63 | |||
| f58844bf8b | |||
| 07ac3499f3 | |||
| 050b64b822 | |||
| 43aa94dcfc | |||
| b2e54a432b | |||
| e766732020 | |||
| 3a5e01c44a | |||
| d4883da98b | |||
| 7cc3e9a16d | |||
| 9ad352d4bd | |||
| 031173bc47 | |||
| 658820a25e | |||
| 17fdce01a9 | |||
| bc4cc00332 | |||
| b57e9492b1 | |||
| 712bdc9d8d | |||
| 33a7c95455 | |||
| f054dcc77d | |||
| 95858b77c1 | |||
| 4afbce5ad6 | |||
| 93956002ac | |||
| 006dd290e9 | |||
| fb875145aa | |||
| 77993ced7e | |||
| e1f64d6283 | |||
| 2b60ce484e | |||
| a21b336138 | |||
| 0655280f2c | |||
| 2793578dcb | |||
| f1a70662c5 | |||
| 8a7e501fe6 | |||
| 86fc2dc2ba | |||
| 9cff42b4ed | |||
| 55546126a1 | |||
| 5a11dacd9e | |||
| bb5873bf20 | |||
| 20eda54349 | |||
| c98461f59e | |||
| b154c9a5c4 | |||
| 12255e3680 | |||
| 473c41ddbf | |||
| b93382831c | |||
| 5ee61f5ae7 | |||
| 082bbd49e7 | |||
| 4e2e69c9cb | |||
| 6f78bb6960 | |||
| a00caac789 | |||
| 4e8f191f43 | |||
| b1c5afd72f | |||
| aa5a2225e7 | |||
| 4c7672b581 | |||
| 5f9fa05e21 | |||
| ee92fa51bc | |||
| 63b3960120 | |||
| e5c76ddf3e | |||
| 4b07979008 | |||
| 168fa09f5f | |||
| 4facd57cb7 | |||
| e999636048 | |||
| 5bd769ea40 | |||
| bd693f97a1 | |||
| af0cb68c1b | |||
| 761d7fd438 | |||
| c537e8a892 | |||
| 702e85cd96 | |||
| c93e0b6c5e | |||
| f7b4a20066 | |||
| 49ac89bfed | |||
| 16e62b29f9 | |||
| b8180b0459 | |||
| 37f250b384 | |||
| 5685ec525b | |||
| 5be59ea8dd | |||
| 5855f2d909 | |||
| 5424223949 | |||
| de22148b44 | |||
| 73664e610b |
@@ -0,0 +1,31 @@
|
||||
|
||||
# Custom attribute to mark source files using KiCad C++ formatting
|
||||
[attr]kicad-cpp-source whitepace=tab-in-indent format.clang-format-kicad
|
||||
|
||||
# Custom attribute to mark KiCad's own CMake files
|
||||
[attr]kicad-cmake-source whitespace=tab-in-indent
|
||||
|
||||
# Custom attribute for auto-generated sources:
|
||||
# * Do not perform whitespace checking
|
||||
# * Do not format
|
||||
[attr]generated whitespace=-tab-in-indent,-indent-with-non-tab -format.clang-format-kicad
|
||||
|
||||
# By default, all C and C++ files conform to KiCad formatting,
|
||||
# unless overridden
|
||||
*.c kicad-cpp-source
|
||||
*.cpp kicad-cpp-source
|
||||
*.h kicad-cpp-source
|
||||
|
||||
*.cmake kicad-cmake-source
|
||||
*.txt kicad-cmake-source
|
||||
|
||||
# Compiled bitmap sources
|
||||
bitmaps_png/cpp_*/*.cpp generated
|
||||
|
||||
# wxFormBuilder-generated files
|
||||
**/dialog*/*_base.cpp generated
|
||||
**/dialog*/*_base.h generated
|
||||
|
||||
# Lemon grammars
|
||||
common/libeval/grammar.c generated
|
||||
common/libeval/grammar.h generated
|
||||
@@ -7,10 +7,24 @@
|
||||
# Based on clang-format pre-commit hook by Alex Eagle
|
||||
# https://gist.github.com/alexeagle/c8ed91b14a407342d9a8e112b5ac7dab
|
||||
|
||||
# Set KICAD_CHECK_FORMAT to allow this hook to run
|
||||
# if not set, the hook always succeeds.
|
||||
if [ -z "$KICAD_CHECK_FORMAT" ]; then
|
||||
exit 0
|
||||
# Set kicad.check-format to allow this hook to run
|
||||
# If not set, the hook always succeeds.
|
||||
|
||||
do_format=false
|
||||
|
||||
# Check if formatting is configured
|
||||
if [ "$(git config --get kicad.check-format)" = true ]; then
|
||||
do_format=true
|
||||
fi
|
||||
|
||||
# Older env variable method
|
||||
if [ ! -z "$KICAD_CHECK_FORMAT" ]; then
|
||||
do_format=true
|
||||
fi
|
||||
|
||||
if [ ! ${do_format} = true ]; then
|
||||
# No formatting required
|
||||
exit 0;
|
||||
fi
|
||||
|
||||
check_clang_format() {
|
||||
@@ -30,20 +44,48 @@ check_git_config() {
|
||||
fi
|
||||
}
|
||||
|
||||
get_filtered_filenames()
|
||||
{
|
||||
format_attr='clang-format-kicad'
|
||||
|
||||
# command to get list of candidate files
|
||||
git_list_files='git diff --cached --name-only --diff-filter=ACM'
|
||||
|
||||
files=$(${git_list_files} |
|
||||
|
||||
# Filter for format-controlled files
|
||||
git check-attr --stdin format.${format_attr} |
|
||||
|
||||
# output only the file names
|
||||
grep ": set$" |
|
||||
cut -d: -f1)
|
||||
|
||||
echo ${files}
|
||||
}
|
||||
|
||||
check_clang_format
|
||||
check_git_config
|
||||
|
||||
readonly out=$(git clang-format -v --diff)
|
||||
files_to_check=$(get_filtered_filenames)
|
||||
|
||||
if [ -z "${files_to_check}" ]; then
|
||||
# No controlled files to check
|
||||
exit 0;
|
||||
fi
|
||||
|
||||
git_clang_format_cmd="git clang-format -v --diff -- ${files_to_check}"
|
||||
|
||||
readonly out=$(${git_clang_format_cmd})
|
||||
|
||||
# In these cases, there is no formatting issues, so we succeed
|
||||
if [[ "$out" == *"no modified files to format"* ]]; then exit 0; fi
|
||||
if [[ "$out" == *"clang-format did not modify any files"* ]]; then exit 0; fi
|
||||
|
||||
# Any other case implies formatting results
|
||||
echo "ERROR: you need to run git clang-format on your commit"
|
||||
echo "ERROR: you need to run clang-format (e.g. using tools/check_coding.sh) on your commit"
|
||||
|
||||
# print the errors to show what's the issue
|
||||
git clang-format -v --diff
|
||||
${git_clang_format_cmd}
|
||||
|
||||
# fail the pre-commit
|
||||
exit 1
|
||||
|
||||
@@ -28,16 +28,20 @@
|
||||
* @file panel_prev_model.cpp
|
||||
*/
|
||||
|
||||
#include "panel_prev_model.h"
|
||||
|
||||
#include <3d_canvas/eda_3d_canvas.h>
|
||||
#include <common_ogl/cogl_att_list.h>
|
||||
#include <bitmaps.h>
|
||||
#include <base_units.h>
|
||||
|
||||
#include "project.h"
|
||||
#include "panel_prev_model.h"
|
||||
#include <class_board.h>
|
||||
|
||||
#include <base_units.h>
|
||||
#include <bitmaps.h>
|
||||
#include <class_drawpanel.h>
|
||||
#include <dpi_scaling.h>
|
||||
#include <pgm_base.h>
|
||||
#include <project.h>
|
||||
|
||||
|
||||
PANEL_PREV_3D::PANEL_PREV_3D( wxWindow* aParent, PCB_BASE_FRAME* aFrame, MODULE* aModule,
|
||||
std::vector<MODULE_3D_SETTINGS> *aParentModelList ) :
|
||||
@@ -58,15 +62,13 @@ PANEL_PREV_3D::PANEL_PREV_3D( wxWindow* aParent, PCB_BASE_FRAME* aFrame, MODULE*
|
||||
// Set 3d viewer configuration for preview
|
||||
m_settings3Dviewer = new CINFO3D_VISU();
|
||||
|
||||
bool option;
|
||||
Pgm().CommonSettings()->Read( ENBL_MOUSEWHEEL_PAN_KEY, &option, false );
|
||||
m_settings3Dviewer->SetFlag( FL_MOUSEWHEEL_PANNING, option );
|
||||
|
||||
// Create the 3D canvas
|
||||
m_previewPane = new EDA_3D_CANVAS( this, COGL_ATT_LIST::GetAttributesList( true ),
|
||||
m_dummyBoard, *m_settings3Dviewer,
|
||||
aFrame->Prj().Get3DCacheManager() );
|
||||
|
||||
loadCommonSettings();
|
||||
|
||||
m_SizerPanelView->Add( m_previewPane, 1, wxEXPAND, 5 );
|
||||
}
|
||||
|
||||
@@ -111,6 +113,25 @@ void PANEL_PREV_3D::initPanel()
|
||||
}
|
||||
|
||||
|
||||
void PANEL_PREV_3D::loadCommonSettings()
|
||||
{
|
||||
wxCHECK_RET( m_previewPane, "Cannot load settings to null canvas" );
|
||||
|
||||
wxConfigBase& cmnCfg = *Pgm().CommonSettings();
|
||||
|
||||
{
|
||||
const DPI_SCALING dpi{ &cmnCfg, this };
|
||||
m_previewPane->SetScaleFactor( dpi.GetScaleFactor() );
|
||||
}
|
||||
|
||||
{
|
||||
bool option;
|
||||
cmnCfg.Read( ENBL_MOUSEWHEEL_PAN_KEY, &option, false );
|
||||
m_settings3Dviewer->SetFlag( FL_MOUSEWHEEL_PANNING, option );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief rotationFromString
|
||||
* Ensure -MAX_ROTATION <= rotation <= MAX_ROTATION
|
||||
|
||||
@@ -93,6 +93,11 @@ private:
|
||||
private:
|
||||
void initPanel();
|
||||
|
||||
/**
|
||||
* Load 3D relevant settings from the user configuration
|
||||
*/
|
||||
void loadCommonSettings();
|
||||
|
||||
/**
|
||||
* @brief updateOrientation - it will receive the events from editing the fields
|
||||
* @param event
|
||||
|
||||
@@ -40,100 +40,111 @@ void EDA_3D_VIEWER::ReCreateMainToolbar()
|
||||
{
|
||||
wxLogTrace( m_logTrace, "EDA_3D_VIEWER::ReCreateMainToolbar" );
|
||||
|
||||
if( m_mainToolBar != NULL )
|
||||
{
|
||||
// Simple update to the list of old files.
|
||||
SetToolbars();
|
||||
return;
|
||||
}
|
||||
wxWindowUpdateLocker dummy( this );
|
||||
|
||||
m_mainToolBar = new wxAuiToolBar( this, ID_H_TOOLBAR, wxDefaultPosition, wxDefaultSize,
|
||||
KICAD_AUI_TB_STYLE | wxAUI_TB_HORZ_LAYOUT );
|
||||
if( m_mainToolBar )
|
||||
{
|
||||
m_mainToolBar->Clear();
|
||||
}
|
||||
else
|
||||
{
|
||||
m_mainToolBar = new wxAuiToolBar( this, ID_H_TOOLBAR, wxDefaultPosition, wxDefaultSize,
|
||||
KICAD_AUI_TB_STYLE | wxAUI_TB_HORZ_LAYOUT );
|
||||
}
|
||||
|
||||
// Set up toolbar
|
||||
m_mainToolBar->AddTool( ID_RELOAD3D_BOARD, wxEmptyString,
|
||||
KiBitmap( import3d_xpm ), _( "Reload board" ) );
|
||||
KiScaledBitmap( import3d_xpm, this ), _( "Reload board" ) );
|
||||
|
||||
m_mainToolBar->AddSeparator();
|
||||
KiScaledSeparator( m_mainToolBar, this );
|
||||
|
||||
m_mainToolBar->AddTool( ID_TOOL_SCREENCOPY_TOCLIBBOARD, wxEmptyString,
|
||||
KiBitmap( copy_xpm ),
|
||||
KiScaledBitmap( copy_xpm, this ),
|
||||
_( "Copy 3D image to clipboard" ) );
|
||||
|
||||
m_mainToolBar->AddSeparator();
|
||||
KiScaledSeparator( m_mainToolBar, this );
|
||||
|
||||
m_mainToolBar->AddTool( ID_TOOL_SET_VISIBLE_ITEMS, wxEmptyString,
|
||||
KiBitmap( read_setup_xpm ),
|
||||
KiScaledBitmap( read_setup_xpm, this ),
|
||||
_( "Set display options, and some layers visibility" ) );
|
||||
m_mainToolBar->AddSeparator();
|
||||
|
||||
m_mainToolBar->AddTool( ID_RENDER_CURRENT_VIEW, wxEmptyString, KiBitmap( render_mode_xpm ),
|
||||
m_mainToolBar->AddTool( ID_RENDER_CURRENT_VIEW, wxEmptyString,
|
||||
KiScaledBitmap( render_mode_xpm, this ),
|
||||
_( "Render current view using Raytracing" ), wxITEM_CHECK );
|
||||
|
||||
m_mainToolBar->AddSeparator();
|
||||
KiScaledSeparator( m_mainToolBar, this );
|
||||
|
||||
m_mainToolBar->AddTool( ID_ZOOM_IN, wxEmptyString, KiBitmap( zoom_in_xpm ),
|
||||
m_mainToolBar->AddTool( ID_ZOOM_IN, wxEmptyString,
|
||||
KiScaledBitmap( zoom_in_xpm, this ),
|
||||
_( "Zoom in" ) );
|
||||
|
||||
m_mainToolBar->AddTool( ID_ZOOM_OUT, wxEmptyString, KiBitmap( zoom_out_xpm ),
|
||||
m_mainToolBar->AddTool( ID_ZOOM_OUT, wxEmptyString,
|
||||
KiScaledBitmap( zoom_out_xpm, this ),
|
||||
_( "Zoom out" ) );
|
||||
|
||||
m_mainToolBar->AddTool( ID_ZOOM_REDRAW, wxEmptyString,
|
||||
KiBitmap( zoom_redraw_xpm ),
|
||||
KiScaledBitmap( zoom_redraw_xpm, this ),
|
||||
_( "Redraw view" ) );
|
||||
|
||||
m_mainToolBar->AddTool( ID_ZOOM_PAGE, wxEmptyString, KiBitmap( zoom_fit_in_page_xpm ),
|
||||
m_mainToolBar->AddTool( ID_ZOOM_PAGE, wxEmptyString,
|
||||
KiScaledBitmap( zoom_fit_in_page_xpm, this ),
|
||||
_( "Zoom to fit 3D model" ) );
|
||||
|
||||
m_mainToolBar->AddSeparator();
|
||||
KiScaledSeparator( m_mainToolBar, this );
|
||||
|
||||
m_mainToolBar->AddTool( ID_ROTATE3D_X_NEG, wxEmptyString,
|
||||
KiBitmap( rotate_neg_x_xpm ),
|
||||
KiScaledBitmap( rotate_neg_x_xpm, this ),
|
||||
_( "Rotate X Clockwise" ) );
|
||||
|
||||
m_mainToolBar->AddTool( ID_ROTATE3D_X_POS, wxEmptyString,
|
||||
KiBitmap( rotate_pos_x_xpm ),
|
||||
KiScaledBitmap( rotate_pos_x_xpm, this ),
|
||||
_( "Rotate X Counterclockwise" ) );
|
||||
|
||||
m_mainToolBar->AddSeparator();
|
||||
KiScaledSeparator( m_mainToolBar, this );
|
||||
|
||||
m_mainToolBar->AddTool( ID_ROTATE3D_Y_NEG, wxEmptyString,
|
||||
KiBitmap( rotate_neg_y_xpm ),
|
||||
KiScaledBitmap( rotate_neg_y_xpm, this ),
|
||||
_( "Rotate Y Clockwise" ) );
|
||||
|
||||
m_mainToolBar->AddTool( ID_ROTATE3D_Y_POS, wxEmptyString,
|
||||
KiBitmap( rotate_pos_y_xpm ),
|
||||
KiScaledBitmap( rotate_pos_y_xpm, this ),
|
||||
_( "Rotate Y Counterclockwise" ) );
|
||||
|
||||
m_mainToolBar->AddSeparator();
|
||||
KiScaledSeparator( m_mainToolBar, this );
|
||||
|
||||
m_mainToolBar->AddTool( ID_ROTATE3D_Z_NEG, wxEmptyString,
|
||||
KiBitmap( rotate_neg_z_xpm ),
|
||||
KiScaledBitmap( rotate_neg_z_xpm, this ),
|
||||
_( "Rotate Z Clockwise" ) );
|
||||
|
||||
m_mainToolBar->AddTool( ID_ROTATE3D_Z_POS, wxEmptyString,
|
||||
KiBitmap( rotate_pos_z_xpm ),
|
||||
KiScaledBitmap( rotate_pos_z_xpm, this ),
|
||||
_( "Rotate Z Counterclockwise" ) );
|
||||
|
||||
m_mainToolBar->AddSeparator();
|
||||
m_mainToolBar->AddTool( ID_MOVE3D_LEFT, wxEmptyString, KiBitmap( left_xpm ),
|
||||
KiScaledSeparator( m_mainToolBar, this );
|
||||
|
||||
m_mainToolBar->AddTool( ID_MOVE3D_LEFT, wxEmptyString,
|
||||
KiScaledBitmap( left_xpm, this ),
|
||||
_( "Move left" ) );
|
||||
|
||||
m_mainToolBar->AddTool( ID_MOVE3D_RIGHT, wxEmptyString, KiBitmap( right_xpm ),
|
||||
m_mainToolBar->AddTool( ID_MOVE3D_RIGHT, wxEmptyString,
|
||||
KiScaledBitmap( right_xpm, this ),
|
||||
_( "Move right" ) );
|
||||
|
||||
m_mainToolBar->AddTool( ID_MOVE3D_UP, wxEmptyString, KiBitmap( up_xpm ),
|
||||
m_mainToolBar->AddTool( ID_MOVE3D_UP, wxEmptyString,
|
||||
KiScaledBitmap( up_xpm, this ),
|
||||
_( "Move up" ) );
|
||||
|
||||
m_mainToolBar->AddTool( ID_MOVE3D_DOWN, wxEmptyString, KiBitmap( down_xpm ),
|
||||
m_mainToolBar->AddTool( ID_MOVE3D_DOWN, wxEmptyString,
|
||||
KiScaledBitmap( down_xpm, this ),
|
||||
_( "Move down" ) );
|
||||
|
||||
m_mainToolBar->AddSeparator();
|
||||
m_mainToolBar->AddTool( ID_ORTHO, wxEmptyString, KiBitmap( ortho_xpm ),
|
||||
KiScaledSeparator( m_mainToolBar, this );
|
||||
|
||||
m_mainToolBar->AddTool( ID_ORTHO, wxEmptyString,
|
||||
KiScaledBitmap( ortho_xpm, this ),
|
||||
_( "Enable/Disable orthographic projection" ),
|
||||
wxITEM_CHECK );
|
||||
|
||||
m_mainToolBar->Realize();
|
||||
}
|
||||
|
||||
|
||||
void EDA_3D_VIEWER::SetToolbars()
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -28,18 +28,22 @@
|
||||
*/
|
||||
|
||||
#include "eda_3d_viewer.h"
|
||||
|
||||
#include "../3d_viewer_id.h"
|
||||
#include <project.h>
|
||||
#include "../common_ogl/cogl_att_list.h"
|
||||
|
||||
#include <bitmaps.h>
|
||||
#include <dpi_scaling.h>
|
||||
#include <gestfich.h>
|
||||
#include <lru_cache.h>
|
||||
#include <pgm_base.h>
|
||||
#include <project.h>
|
||||
#include <wildcards_and_files_ext.h>
|
||||
|
||||
#include <hotkeys_basic.h>
|
||||
#include <wx/colordlg.h>
|
||||
#include <wx/colourdata.h>
|
||||
#include <lru_cache.h>
|
||||
#include "../common_ogl/cogl_att_list.h"
|
||||
#include <hotkeys_basic.h>
|
||||
#include <wx/toolbar.h>
|
||||
#include <bitmaps.h>
|
||||
#include <pgm_base.h>
|
||||
|
||||
|
||||
/**
|
||||
@@ -168,10 +172,6 @@ EDA_3D_VIEWER::EDA_3D_VIEWER( KIWAY *aKiway, PCB_BASE_FRAME *aParent,
|
||||
icon.CopyFromBitmap( KiBitmap( icon_3d_xpm ) );
|
||||
SetIcon( icon );
|
||||
|
||||
bool option;
|
||||
Pgm().CommonSettings()->Read( ENBL_MOUSEWHEEL_PAN_KEY, &option, false );
|
||||
m_settings.SetFlag( FL_MOUSEWHEEL_PANNING, option );
|
||||
|
||||
LoadSettings( config() );
|
||||
SetSize( m_FramePos.x, m_FramePos.y, m_FrameSize.x, m_FrameSize.y );
|
||||
|
||||
@@ -190,6 +190,9 @@ EDA_3D_VIEWER::EDA_3D_VIEWER( KIWAY *aKiway, PCB_BASE_FRAME *aParent,
|
||||
if( m_canvas )
|
||||
m_canvas->SetStatusBar( status_bar );
|
||||
|
||||
// Some settings need the canvas
|
||||
loadCommonSettings();
|
||||
|
||||
CreateMenuBar();
|
||||
ReCreateMainToolbar();
|
||||
|
||||
@@ -288,32 +291,62 @@ void EDA_3D_VIEWER::Process_Special_Functions( wxCommandEvent &event )
|
||||
|
||||
case ID_ROTATE3D_X_POS:
|
||||
m_settings.CameraGet().RotateX( glm::radians(ROT_ANGLE) );
|
||||
m_canvas->Request_refresh();
|
||||
|
||||
if( m_settings.RenderEngineGet() == RENDER_ENGINE_OPENGL_LEGACY )
|
||||
m_canvas->Request_refresh();
|
||||
else
|
||||
m_canvas->RenderRaytracingRequest();
|
||||
|
||||
break;
|
||||
|
||||
case ID_ROTATE3D_X_NEG:
|
||||
m_settings.CameraGet().RotateX( -glm::radians(ROT_ANGLE) );
|
||||
m_canvas->Request_refresh();
|
||||
|
||||
if( m_settings.RenderEngineGet() == RENDER_ENGINE_OPENGL_LEGACY )
|
||||
m_canvas->Request_refresh();
|
||||
else
|
||||
m_canvas->RenderRaytracingRequest();
|
||||
|
||||
break;
|
||||
|
||||
case ID_ROTATE3D_Y_POS:
|
||||
m_settings.CameraGet().RotateY( glm::radians(ROT_ANGLE) );
|
||||
m_canvas->Request_refresh();
|
||||
|
||||
if( m_settings.RenderEngineGet() == RENDER_ENGINE_OPENGL_LEGACY )
|
||||
m_canvas->Request_refresh();
|
||||
else
|
||||
m_canvas->RenderRaytracingRequest();
|
||||
|
||||
break;
|
||||
|
||||
case ID_ROTATE3D_Y_NEG:
|
||||
m_settings.CameraGet().RotateY( -glm::radians(ROT_ANGLE) );
|
||||
m_canvas->Request_refresh();
|
||||
|
||||
if( m_settings.RenderEngineGet() == RENDER_ENGINE_OPENGL_LEGACY )
|
||||
m_canvas->Request_refresh();
|
||||
else
|
||||
m_canvas->RenderRaytracingRequest();
|
||||
|
||||
break;
|
||||
|
||||
case ID_ROTATE3D_Z_POS:
|
||||
m_settings.CameraGet().RotateZ( glm::radians(ROT_ANGLE) );
|
||||
m_canvas->Request_refresh();
|
||||
|
||||
if( m_settings.RenderEngineGet() == RENDER_ENGINE_OPENGL_LEGACY )
|
||||
m_canvas->Request_refresh();
|
||||
else
|
||||
m_canvas->RenderRaytracingRequest();
|
||||
|
||||
break;
|
||||
|
||||
case ID_ROTATE3D_Z_NEG:
|
||||
m_settings.CameraGet().RotateZ( -glm::radians(ROT_ANGLE) );
|
||||
m_canvas->Request_refresh();
|
||||
|
||||
if( m_settings.RenderEngineGet() == RENDER_ENGINE_OPENGL_LEGACY )
|
||||
m_canvas->Request_refresh();
|
||||
else
|
||||
m_canvas->RenderRaytracingRequest();
|
||||
|
||||
break;
|
||||
|
||||
case ID_MOVE3D_LEFT:
|
||||
@@ -869,6 +902,22 @@ void EDA_3D_VIEWER::SaveSettings( wxConfigBase *aCfg )
|
||||
}
|
||||
|
||||
|
||||
void EDA_3D_VIEWER::CommonSettingsChanged()
|
||||
{
|
||||
wxLogTrace( m_logTrace, "EDA_3D_VIEWER::CommonSettingsChanged" );
|
||||
|
||||
// Regen menu bars, etc
|
||||
EDA_BASE_FRAME::CommonSettingsChanged();
|
||||
|
||||
// There is no base class that handles toolbars for this frame
|
||||
ReCreateMainToolbar();
|
||||
|
||||
loadCommonSettings();
|
||||
|
||||
NewDisplay( true );
|
||||
}
|
||||
|
||||
|
||||
void EDA_3D_VIEWER::OnLeftClick( wxDC *DC, const wxPoint &MousePos )
|
||||
{
|
||||
wxLogTrace( m_logTrace, "EDA_3D_VIEWER::OnLeftClick" );
|
||||
@@ -941,7 +990,7 @@ void EDA_3D_VIEWER::takeScreenshot( wxCommandEvent& event )
|
||||
}
|
||||
|
||||
// Be sure we have the latest 3D view (remember 3D view is buffered)
|
||||
Refresh();
|
||||
m_canvas->Request_refresh( true );
|
||||
wxYield();
|
||||
|
||||
// Build image from the 3D buffer
|
||||
@@ -1225,3 +1274,22 @@ void EDA_3D_VIEWER::OnUpdateUIAxis( wxUpdateUIEvent& aEvent )
|
||||
{
|
||||
aEvent.Check( m_settings.GetFlag( FL_AXIS ) );
|
||||
}
|
||||
|
||||
|
||||
void EDA_3D_VIEWER::loadCommonSettings()
|
||||
{
|
||||
wxCHECK_RET( m_canvas, "Cannot load settings to null canvas" );
|
||||
|
||||
wxConfigBase& cmnCfg = *Pgm().CommonSettings();
|
||||
|
||||
{
|
||||
const DPI_SCALING dpi{ &cmnCfg, this };
|
||||
m_canvas->SetScaleFactor( dpi.GetScaleFactor() );
|
||||
}
|
||||
|
||||
{
|
||||
bool option;
|
||||
cmnCfg.Read( ENBL_MOUSEWHEEL_PAN_KEY, &option, false );
|
||||
m_settings.SetFlag( FL_MOUSEWHEEL_PANNING, option );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -154,6 +154,15 @@ class EDA_3D_VIEWER : public KIWAY_PLAYER
|
||||
*/
|
||||
bool Set3DSilkScreenColorFromUser();
|
||||
|
||||
/**
|
||||
* Notification that common settings are updated.
|
||||
*
|
||||
* This would be private (and only called by the Kiway), but we
|
||||
* need to do this manually from the PCB frame because the 3D viewer isn't
|
||||
* updated via the #KIWAY.
|
||||
*/
|
||||
void CommonSettingsChanged() override;
|
||||
|
||||
private:
|
||||
/// Called when user press the File->Exit
|
||||
void Exit3DFrame( wxCommandEvent &event );
|
||||
@@ -188,6 +197,9 @@ class EDA_3D_VIEWER : public KIWAY_PLAYER
|
||||
DisplayHotkeyList( this, GetHotkeyConfig() );
|
||||
}
|
||||
|
||||
/**
|
||||
* Equivalent of EDA_DRAW_FRAME::ReCreateHToolbar
|
||||
*/
|
||||
void ReCreateMainToolbar();
|
||||
|
||||
void SetToolbars();
|
||||
@@ -217,6 +229,11 @@ class EDA_3D_VIEWER : public KIWAY_PLAYER
|
||||
|
||||
private:
|
||||
|
||||
/**
|
||||
* Load configuration from common settings.
|
||||
*/
|
||||
void loadCommonSettings();
|
||||
|
||||
/**
|
||||
* Filename to propose for save a screenshot
|
||||
*/
|
||||
|
||||
@@ -1,38 +1,38 @@
|
||||
#
|
||||
# This program source code file is part of KICAD, a free EDA CAD application.
|
||||
#
|
||||
#
|
||||
# This program source code file is part of KICAD, a free EDA CAD application.
|
||||
#
|
||||
# Copyright (C) 2016 Wayne Stambaugh <stambaughw@gmail.com>
|
||||
# Copyright (C) 2016 - 2018 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
|
||||
#
|
||||
|
||||
# Note: unless you are the person responsible for creating releases,
|
||||
# do *not* change these variables. This way the KiCad project
|
||||
# can maintain control over what is an official KiCad build and
|
||||
# what is not. Setting these variable that conflict with KiCad
|
||||
# releases is a shooting offense.
|
||||
#
|
||||
# This file gets included in the WriteVersionHeader.cmake file to set
|
||||
# Copyright (C) 2016 - 2019 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
|
||||
#
|
||||
|
||||
# Note: unless you are the person responsible for creating releases,
|
||||
# do *not* change these variables. This way the KiCad project
|
||||
# can maintain control over what is an official KiCad build and
|
||||
# what is not. Setting these variable that conflict with KiCad
|
||||
# releases is a shooting offense.
|
||||
#
|
||||
# This file gets included in the WriteVersionHeader.cmake file to set
|
||||
# the default KiCad version when the source is provided in an archive
|
||||
# file or git is not available on the build system. When KiCad is
|
||||
# cloned using git, the git version is used. This version string should
|
||||
# be set after each version tag is added to the git repo. This will
|
||||
# give developers a reasonable idea where which branch was used to build
|
||||
# KiCad.
|
||||
set( KICAD_VERSION "5.1.0" )
|
||||
set( KICAD_VERSION "5.1.2" )
|
||||
|
||||
@@ -70,20 +70,31 @@ Set the `git clang-format` tool to use the provided `_clang-format` file:
|
||||
|
||||
git config clangFormat.style file
|
||||
|
||||
Then, to enable the format checker, set the `KICAD_CHECK_FORMAT` environment
|
||||
variable in your shell. Without this variable, the format checker will not
|
||||
run on commit, but you can still use `git clang-format --diff` to check manually.
|
||||
Then, to enable the format checker, set the `kicad.check-format` Git config
|
||||
to "true" for the KiCad repo:
|
||||
|
||||
If enabled, when you commit a change, you will be told if you have caused any
|
||||
style violations (only in your changed code). You can fix them automatically
|
||||
with:
|
||||
git config kicad.check-format true
|
||||
|
||||
git clang-format
|
||||
Without this config, the format checker will not run on commit, but you can
|
||||
still check files staged for commit manually:
|
||||
|
||||
tools/check_coding.sh --diff
|
||||
|
||||
If the hook is enabled, when you commit a change, you will be told if you
|
||||
have caused any style violations (only in your changed code). You can fix your
|
||||
staged changes automatically with this tool:
|
||||
|
||||
tools/check_coding.sh
|
||||
|
||||
Or you can proceed anyway, if you are sure your style is correct:
|
||||
|
||||
git commit --no-verify
|
||||
|
||||
The `check_coding.sh` tool has other modes:
|
||||
|
||||
* Make (or see only) changes to files modified in the previous commit:
|
||||
* `check_coding.sh --amend [--diff]`
|
||||
|
||||
|
||||
# 2. Naming Conventions # {#naming_conventions}
|
||||
Before delving into anything as esoteric as indentation and formatting,
|
||||
|
||||
@@ -0,0 +1,255 @@
|
||||
Creative Commons Attribution-ShareAlike 4.0 International Public License
|
||||
|
||||
By exercising the Licensed Rights (defined below), You accept and agree to
|
||||
be bound by the terms and conditions of this Creative Commons
|
||||
Attribution-ShareAlike 4.0 International Public License ("Public License").
|
||||
To the extent this Public License may be interpreted as a contract, You are
|
||||
granted the Licensed Rights in consideration of Your acceptance of these
|
||||
terms and conditions, and the Licensor grants You such rights in
|
||||
consideration of benefits the Licensor receives from making the Licensed
|
||||
Material available under these terms and conditions.
|
||||
|
||||
Section 1 – Definitions.
|
||||
|
||||
a. Adapted Material means material subject to Copyright and Similar Rights
|
||||
that is derived from or based upon the Licensed Material and in which the
|
||||
Licensed Material is translated, altered, arranged, transformed, or
|
||||
otherwise modified in a manner requiring permission under the Copyright
|
||||
and Similar Rights held by the Licensor. For purposes of this Public
|
||||
License, where the Licensed Material is a musical work, performance, or
|
||||
sound recording, Adapted Material is always produced where the Licensed
|
||||
Material is synched in timed relation with a moving image.
|
||||
b. Adapter's License means the license You apply to Your Copyright and
|
||||
Similar Rights in Your contributions to Adapted Material in accordance
|
||||
with the terms and conditions of this Public License.
|
||||
c. BY-SA Compatible License means a license listed at
|
||||
creativecommons.org/compatiblelicenses, approved by Creative Commons as
|
||||
essentially the equivalent of this Public License.
|
||||
d. Copyright and Similar Rights means copyright and/or similar rights closely
|
||||
related to copyright including, without limitation, performance,
|
||||
broadcast, sound recording, and Sui Generis Database Rights, without
|
||||
regard to how the rights are labeled or categorized. For purposes of this
|
||||
Public License, the rights specified in Section 2(b)(1)-(2) are not
|
||||
Copyright and Similar Rights.
|
||||
e. Effective Technological Measures means those measures that, in the absence
|
||||
of proper authority, may not be circumvented under laws fulfilling
|
||||
obligations under Article 11 of the WIPO Copyright Treaty adopted on
|
||||
December 20, 1996, and/or similar international agreements.
|
||||
f. Exceptions and Limitations means fair use, fair dealing, and/or any other
|
||||
exception or limitation to Copyright and Similar Rights that applies to
|
||||
Your use of the Licensed Material.
|
||||
g. License Elements means the license attributes listed in the name of a
|
||||
Creative Commons Public License. The License Elements of this Public
|
||||
License are Attribution and ShareAlike.
|
||||
h. Licensed Material means the artistic or literary work, database, or other
|
||||
material to which the Licensor applied this Public License.
|
||||
i. Licensed Rights means the rights granted to You subject to the terms and
|
||||
conditions of this Public License, which are limited to all Copyright and
|
||||
Similar Rights that apply to Your use of the Licensed Material and that
|
||||
the Licensor has authority to license.
|
||||
j. Licensor means the individual(s) or entity(ies) granting rights under this
|
||||
Public License.
|
||||
k. Share means to provide material to the public by any means or process thati
|
||||
requires permission under the Licensed Rights, such as reproduction,
|
||||
public display, public performance, distribution, dissemination,
|
||||
communication, or importation, and to make material available to the
|
||||
public including in ways that members of the public may access the
|
||||
material from a place and at a time individually chosen by them.
|
||||
l. Sui Generis Database Rights means rights other than copyright resulting
|
||||
from Directive 96/9/EC of the European Parliament and of the Council of 11
|
||||
March 1996 on the legal protection of databases, as amended and/or
|
||||
succeeded, as well as other essentially equivalent rights anywhere in the
|
||||
world.
|
||||
m. You means the individual or entity exercising the Licensed Rights under
|
||||
this Public License. Your has a corresponding meaning.
|
||||
|
||||
Section 2 – Scope.
|
||||
|
||||
a. License grant.
|
||||
1. Subject to the terms and conditions of this Public License, the
|
||||
Licensor hereby grants You a worldwide, royalty-free,
|
||||
non-sublicensable, non-exclusive, irrevocable license to exercise the
|
||||
Licensed Rights in the Licensed Material to:
|
||||
A. reproduce and Share the Licensed Material, in whole or in part; and
|
||||
B. produce, reproduce, and Share Adapted Material.
|
||||
2. Exceptions and Limitations. For the avoidance of doubt, where Exceptions
|
||||
and Limitations apply to Your use, this Public License does not apply,
|
||||
and you do not need to comply with its terms and conditions.
|
||||
3. Term. The term of this Public License is specified in Section 6(a).
|
||||
4. Media and formats; technical modifications allowed. The Licensor
|
||||
authorizes You to exercise the Licensed Rights in all media and formats
|
||||
whether now known or hereafter created, and to make technical
|
||||
modifications necessary to do so. The Licensor waives and/or agrees not
|
||||
to assert any right or authority to forbid You from making technical
|
||||
modifications necessary to exercise the Licensed Rights, including
|
||||
technical modifications necessary to circumvent Effective Technological
|
||||
Measures. For purposes of this Public License, simply making
|
||||
modifications authorized by this Section 2(a)(4) never produces Adapted
|
||||
Material.
|
||||
5. Downstream recipients.
|
||||
A. Offer from the Licensor – Licensed Material. Every recipient of the
|
||||
Licensed Material automatically receives an offer from the Licensor
|
||||
to exercise the Licensed Rights under the terms and conditions of
|
||||
this Public License.
|
||||
B. Additional offer from the Licensor – Adapted Material. Every
|
||||
recipient of Adapted Material from You automatically receives an
|
||||
offer from the Licensor to exercise the Licensed Rights in the
|
||||
Adapted Material under the conditions of the Adapter’s License You
|
||||
apply.
|
||||
C. No downstream restrictions. You may not offer or impose any
|
||||
additional or different terms or conditions on, or apply any
|
||||
Effective Technological Measures to, the Licensed Material if doing
|
||||
so restricts exercise of the Licensed Rights by any recipient of
|
||||
the Licensed Material.
|
||||
6. No endorsement. Nothing in this Public License constitutes or may be
|
||||
construed as permission to assert or imply that You are, or that Your
|
||||
use of the Licensed Material is, connected with, or sponsored,
|
||||
endorsed, or granted official status by, the Licensor or others
|
||||
designated to receive attribution as provided in Section 3(a)(1)(A)(i).
|
||||
|
||||
b. Other rights.
|
||||
1. Moral rights, such as the right of integrity, are not licensed under
|
||||
this Public License, nor are publicity, privacy, and/or other similar
|
||||
personality rights; however, to the extent possible, the Licensor
|
||||
waives and/or agrees not to assert any such rights held by the Licensor
|
||||
to the limited extent necessary to allow You to exercise the Licensed
|
||||
Rights, but not otherwise.
|
||||
2. Patent and trademark rights are not licensed under this Public License.
|
||||
3. To the extent possible, the Licensor waives any right to collect
|
||||
royalties from You for the exercise of the Licensed Rights, whether
|
||||
directly or through a collecting society under any voluntary or
|
||||
waivable statutory or compulsory licensing scheme. In all other cases
|
||||
the Licensor expressly reserves any right to collect such royalties.
|
||||
|
||||
Section 3 – License Conditions.
|
||||
|
||||
Your exercise of the Licensed Rights is expressly made subject to the
|
||||
following conditions.
|
||||
|
||||
a. Attribution.
|
||||
1. If You Share the Licensed Material (including in modified form), You
|
||||
must:
|
||||
A. retain the following if it is supplied by the Licensor with the
|
||||
Licensed Material:
|
||||
i. identification of the creator(s) of the Licensed Material and any
|
||||
others designated to receive attribution, in any reasonable manner
|
||||
requested by the Licensor (including by pseudonym if designated);
|
||||
ii. a copyright notice;
|
||||
iii. a notice that refers to this Public License;
|
||||
iv. a notice that refers to the disclaimer of warranties;
|
||||
v. a URI or hyperlink to the Licensed Material to the extent
|
||||
reasonably practicable;
|
||||
B. indicate if You modified the Licensed Material and retain an
|
||||
indication of any previous modifications; and
|
||||
C. indicate the Licensed Material is licensed under this Public
|
||||
License, and include the text of, or the URI or hyperlink to, this
|
||||
Public License.
|
||||
2. You may satisfy the conditions in Section 3(a)(1) in any reasonable
|
||||
manner based on the medium, means, and context in which You Share the
|
||||
Licensed Material. For example, it may be reasonable to satisfy the
|
||||
conditions by providing a URI or hyperlink to a resource that includes
|
||||
the required information.
|
||||
3. If requested by the Licensor, You must remove any of the information
|
||||
required by Section 3(a)(1)(A) to the extent reasonably practicable.
|
||||
|
||||
b. ShareAlike.
|
||||
In addition to the conditions in Section 3(a), if You Share Adapted
|
||||
Material You produce, the following conditions also apply.
|
||||
1. The Adapter’s License You apply must be a Creative Commons license with
|
||||
the same License Elements, this version or later, or a BY-SA Compatible
|
||||
License.
|
||||
2. You must include the text of, or the URI or hyperlink to, the Adapter's
|
||||
License You apply. You may satisfy this condition in any reasonable
|
||||
manner based on the medium, means, and context in which You Share
|
||||
Adapted Material.
|
||||
3. You may not offer or impose any additional or different terms or
|
||||
conditions on, or apply any Effective Technological Measures to,
|
||||
Adapted Material that restrict exercise of the rights granted under the
|
||||
Adapter's License You apply.
|
||||
|
||||
Section 4 – Sui Generis Database Rights.
|
||||
|
||||
Where the Licensed Rights include Sui Generis Database Rights that apply to
|
||||
Your use of the Licensed Material:
|
||||
a. for the avoidance of doubt, Section 2(a)(1) grants You the right to
|
||||
extract, reuse, reproduce, and Share all or a substantial portion of the
|
||||
contents of the database;
|
||||
b. if You include all or a substantial portion of the database contents in a
|
||||
database in which You have Sui Generis Database Rights, then the database
|
||||
in which You have Sui Generis Database Rights (but not its individual
|
||||
contents) is Adapted Material, including for purposes of Section 3(b); and
|
||||
c. You must comply with the conditions in Section 3(a) if You Share all or a
|
||||
substantial portion of the contents of the database.
|
||||
|
||||
For the avoidance of doubt, this Section 4 supplements and does not replace
|
||||
Your obligations under this Public License where the Licensed Rights include
|
||||
other Copyright and Similar Rights.
|
||||
|
||||
Section 5 – Disclaimer of Warranties and Limitation of Liability.
|
||||
|
||||
a. Unless otherwise separately undertaken by the Licensor, to the extent
|
||||
possible, the Licensor offers the Licensed Material as-is and as-available,
|
||||
and makes no representations or warranties of any kind concerning the
|
||||
Licensed Material, whether express, implied, statutory, or other. This
|
||||
includes, without limitation, warranties of title, merchantability, fitness
|
||||
for a particular purpose, non-infringement, absence of latent or other
|
||||
defects, accuracy, or the presence or absence of errors, whether or not
|
||||
known or discoverable. Where disclaimers of warranties are not allowed in
|
||||
full or in part, this disclaimer may not apply to You.
|
||||
b. To the extent possible, in no event will the Licensor be liable to You on
|
||||
any legal theory (including, without limitation, negligence) or otherwise
|
||||
for any direct, special, indirect, incidental, consequential, punitive,
|
||||
exemplary, or other losses, costs, expenses, or damages arising out of
|
||||
this Public License or use of the Licensed Material, even if the Licensor
|
||||
has been advised of the possibility of such losses, costs, expenses, or
|
||||
damages. Where a limitation of liability is not allowed in full or in
|
||||
part, this limitation may not apply to You.
|
||||
c. The disclaimer of warranties and limitation of liability provided above
|
||||
shall be interpreted in a manner that, to the extent possible, most
|
||||
closely approximates an absolute disclaimer and waiver of all liability.
|
||||
|
||||
Section 6 – Term and Termination.
|
||||
|
||||
a. This Public License applies for the term of the Copyright and Similar
|
||||
Rights licensed here. However, if You fail to comply with this Public
|
||||
License, then Your rights under this Public License terminate
|
||||
automatically.
|
||||
b. Where Your right to use the Licensed Material has terminated under
|
||||
Section 6(a), it reinstates:
|
||||
1. automatically as of the date the violation is cured, provided it is
|
||||
cured within 30 days of Your discovery of the violation; or
|
||||
2. upon express reinstatement by the Licensor.
|
||||
For the avoidance of doubt, this Section 6(b) does not affect any right
|
||||
the Licensor may have to seek remedies for Your violations of this Public
|
||||
License.
|
||||
c. For the avoidance of doubt, the Licensor may also offer the Licensed
|
||||
Material under separate terms or conditions or stop distributing the
|
||||
Licensed Material at any time; however, doing so will not terminate this
|
||||
Public License.
|
||||
d. Sections 1, 5, 6, 7, and 8 survive termination of this Public License.
|
||||
|
||||
Section 7 – Other Terms and Conditions.
|
||||
|
||||
a. The Licensor shall not be bound by any additional or different terms or
|
||||
conditions communicated by You unless expressly agreed.
|
||||
b. Any arrangements, understandings, or agreements regarding the Licensed
|
||||
Material not stated herein are separate from and independent of the terms
|
||||
and conditions of this Public License.
|
||||
|
||||
Section 8 – Interpretation.
|
||||
|
||||
a. For the avoidance of doubt, this Public License does not, and shall not
|
||||
be interpreted to, reduce, limit, restrict, or impose conditions on any use
|
||||
of the Licensed Material that could lawfully be made without permission
|
||||
under this Public License.
|
||||
b. To the extent possible, if any provision of this Public License is deemed
|
||||
unenforceable, it shall be automatically reformed to the minimum extent
|
||||
necessary to make it enforceable. If the provision cannot be reformed, it
|
||||
shall be severed from this Public License without affecting the
|
||||
enforceability of the remaining terms and conditions.
|
||||
c. No term or condition of this Public License will be waived and no failure
|
||||
to comply consented to unless expressly agreed to by the Licensor.
|
||||
d. Nothing in this Public License constitutes or may be interpreted as a
|
||||
limitation upon, or waiver of, any privileges and immunities that apply to
|
||||
the Licensor or You, including from the legal processes of any jurisdiction
|
||||
or authority.
|
||||
+21
-19
@@ -1,19 +1,21 @@
|
||||
The majority of KiCad's source code is developed and distributed under the terms
|
||||
of the GPLv3 or later. However, It does include some third-party code licensed
|
||||
under AGPLv3 or later as well as sections licensed under the BOOST license v1.0
|
||||
and portions licensed under the ISC license.
|
||||
|
||||
These licenses are compatible, but a combined works as is will be governed under
|
||||
the terms of the AGPLv3 (or later). This includes any binary distribution of the
|
||||
KiCad EDA suite by the KiCad project or any third party, e.g. Linux distributor.
|
||||
|
||||
You are free to use the *sources* under the terms of their respective licenses.
|
||||
|
||||
Licensed under AGPLv3 (or later):
|
||||
- TTL [https://www.sintef.no/projectweb/geometry-toolkits/ttl/], sources in include/ttl/*
|
||||
Licensed under BOOSTv1:
|
||||
- libcontext [https://github.com/boostorg/context], sources in common/system/libcontext.cpp
|
||||
Licensed under ISC:
|
||||
- portions of code in include/geometry/polygon_triangulation.h
|
||||
Licensed under GPLv3 (or later):
|
||||
- All remaining code not listed above
|
||||
The majority of KiCad's source code is developed and distributed under the terms
|
||||
of the GPLv3 or later. However, It does include some third-party code licensed
|
||||
under AGPLv3 or later as well as sections licensed under the BOOST license v1.0
|
||||
and portions licensed under the ISC license.
|
||||
|
||||
These licenses are compatible, but a combined works as is will be governed under
|
||||
the terms of the AGPLv3 (or later). This includes any binary distribution of the
|
||||
KiCad EDA suite by the KiCad project or any third party, e.g. Linux distributor.
|
||||
|
||||
You are free to use the *sources* under the terms of their respective licenses.
|
||||
|
||||
Licensed under AGPLv3 (or later):
|
||||
- TTL [https://www.sintef.no/projectweb/geometry-toolkits/ttl/], sources in include/ttl/*
|
||||
Licensed under BOOSTv1:
|
||||
- libcontext [https://github.com/boostorg/context], sources in common/system/libcontext.cpp
|
||||
Licensed under ISC:
|
||||
- portions of code in include/geometry/polygon_triangulation.h
|
||||
Licensed under CC-BY-SA-4.0:
|
||||
- All the demo files provided in demos/*
|
||||
Licensed under GPLv3 (or later):
|
||||
- All remaining code not listed above
|
||||
|
||||
+1
-1
@@ -13,7 +13,7 @@ AllowShortIfStatementsOnASingleLine: false
|
||||
AllowShortLoopsOnASingleLine: false
|
||||
AlwaysBreakAfterReturnType: None
|
||||
AlwaysBreakBeforeMultilineStrings: true
|
||||
AlwaysBreakTemplateDeclarations: false
|
||||
AlwaysBreakTemplateDeclarations: true
|
||||
BinPackArguments: true
|
||||
BinPackParameters: true
|
||||
BreakBeforeBinaryOperators: NonAssignment
|
||||
|
||||
@@ -293,8 +293,10 @@ set( COMMON_SRCS
|
||||
config_params.cpp
|
||||
confirm.cpp
|
||||
convert_basic_shapes_to_polygon.cpp
|
||||
cursor_store.cpp
|
||||
dialog_shim.cpp
|
||||
displlst.cpp
|
||||
dpi_scaling.cpp
|
||||
draw_graphic_text.cpp
|
||||
dsnlexer.cpp
|
||||
eagle_parser.cpp
|
||||
@@ -429,6 +431,7 @@ target_link_libraries( common
|
||||
${Boost_LIBRARIES}
|
||||
${CURL_LIBRARIES}
|
||||
${OPENSSL_LIBRARIES} # empty on Apple
|
||||
${wxWidgets_LIBRARIES}
|
||||
)
|
||||
|
||||
|
||||
|
||||
+3
-3
@@ -167,12 +167,12 @@ void SelectReferenceNumber( wxTextEntry* aTextEntry )
|
||||
{
|
||||
wxString num = ref;
|
||||
|
||||
while( !num.IsEmpty() && ( !isdigit( num.Last() ) || !isdigit( num.GetChar( 0 ) ) ) )
|
||||
while( !num.IsEmpty() && ( !wxIsdigit( num.Last() ) || !wxIsdigit( num.GetChar( 0 ) ) ) )
|
||||
{
|
||||
if( !isdigit( num.Last() ) )
|
||||
if( !wxIsdigit( num.Last() ) )
|
||||
num.RemoveLast();
|
||||
|
||||
if( !isdigit( num.GetChar ( 0 ) ) )
|
||||
if( !wxIsdigit( num.GetChar ( 0 ) ) )
|
||||
num = num.Right( num.Length() - 1);
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,100 @@
|
||||
/*
|
||||
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||
*
|
||||
* Copyright (C) 2019 KiCad Developers, see CHANGELOG.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 <cursor_store.h>
|
||||
|
||||
#include <wx/bitmap.h>
|
||||
#include <wx/debug.h>
|
||||
|
||||
|
||||
/**
|
||||
* Construct a cursor for the given definition.
|
||||
*
|
||||
* How to do this depends on the platform, see
|
||||
* http://docs.wxwidgets.org/trunk/classwx_cursor.html
|
||||
*
|
||||
* @param aDef the cursor definition
|
||||
* @return a newly constructed cursor if the platform is supported,
|
||||
* else wxNullCursor
|
||||
*/
|
||||
wxCursor constructCursor( const CURSOR_STORE::CURSOR_DEF& aDef )
|
||||
{
|
||||
#if defined( __WXMSW__ ) or defined( __WXMAC__ )
|
||||
|
||||
wxBitmap img_bitmap(
|
||||
reinterpret_cast<const char*>( aDef.m_image_data ), aDef.m_size.x, aDef.m_size.y );
|
||||
wxBitmap msk_bitmap(
|
||||
reinterpret_cast<const char*>( aDef.m_mask_data ), aDef.m_size.x, aDef.m_size.y );
|
||||
img_bitmap.SetMask( new wxMask( msk_bitmap ) );
|
||||
|
||||
wxImage image( img_bitmap.ConvertToImage() );
|
||||
|
||||
#if defined( __WXMSW__ )
|
||||
image.SetMaskColour( 255, 255, 255 );
|
||||
#endif
|
||||
|
||||
image.SetOption( wxIMAGE_OPTION_CUR_HOTSPOT_X, aDef.m_hotspot.x );
|
||||
image.SetOption( wxIMAGE_OPTION_CUR_HOTSPOT_Y, aDef.m_hotspot.y );
|
||||
|
||||
return wxCursor{ image };
|
||||
|
||||
#elif defined( __WXGTK__ ) or defined( __WXMOTIF__ )
|
||||
|
||||
return wxCursor{
|
||||
reinterpret_cast<const char*>( aDef.m_image_data ),
|
||||
aDef.m_size.x,
|
||||
aDef.m_size.y,
|
||||
aDef.m_hotspot.x,
|
||||
aDef.m_hotspot.y,
|
||||
reinterpret_cast<const char*>( aDef.m_mask_data ),
|
||||
};
|
||||
|
||||
#else
|
||||
wxASSERT_MSG( false, "Unknown platform for cursor construction." );
|
||||
return wxNullCursor;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
CURSOR_STORE::CURSOR_STORE( const std::vector<CURSOR_DEF>& aDefs )
|
||||
{
|
||||
for( const auto& def : aDefs )
|
||||
{
|
||||
m_store[def.m_id_key] = constructCursor( def );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
const wxCursor& CURSOR_STORE::Get( int aIdKey ) const
|
||||
{
|
||||
const auto find_iter = m_store.find( aIdKey );
|
||||
|
||||
if( find_iter != m_store.end() )
|
||||
{
|
||||
return find_iter->second;
|
||||
}
|
||||
|
||||
wxASSERT_MSG( false,
|
||||
wxString::Format( "Could not find cursor with ID %d", static_cast<int>( aIdKey ) ) );
|
||||
return wxNullCursor;
|
||||
}
|
||||
@@ -26,6 +26,7 @@
|
||||
#include <kiway_player.h>
|
||||
#include <wx/evtloop.h>
|
||||
#include <pgm_base.h>
|
||||
#include <tool/tool_manager.h>
|
||||
#include <eda_rect.h>
|
||||
#include <wx/display.h>
|
||||
#include <wx/grid.h>
|
||||
@@ -92,6 +93,12 @@ DIALOG_SHIM::DIALOG_SHIM( wxWindow* aParent, wxWindowID id, const wxString& titl
|
||||
// Inherit units from parent
|
||||
m_units = kiwayHolder->GetUserUnits();
|
||||
|
||||
// Don't mouse-warp after a dialog run from the context menu
|
||||
TOOL_MANAGER* toolMgr = kiwayHolder->GetToolManager();
|
||||
|
||||
if( toolMgr )
|
||||
toolMgr->VetoContextMenuMouseWarp();
|
||||
|
||||
// Set up the message bus
|
||||
SetKiway( this, &kiwayHolder->Kiway() );
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// C++ code generated with wxFormBuilder (version Jul 11 2018)
|
||||
// C++ code generated with wxFormBuilder (version Mar 28 2019)
|
||||
// http://www.wxformbuilder.org/
|
||||
//
|
||||
// PLEASE DO *NOT* EDIT THIS FILE!
|
||||
@@ -12,29 +12,29 @@
|
||||
DIALOG_COLOR_PICKER_BASE::DIALOG_COLOR_PICKER_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 );
|
||||
|
||||
|
||||
wxBoxSizer* bSizerMain;
|
||||
bSizerMain = new wxBoxSizer( wxVERTICAL );
|
||||
|
||||
|
||||
wxBoxSizer* bSizerUpperMain;
|
||||
bSizerUpperMain = new wxBoxSizer( wxHORIZONTAL );
|
||||
|
||||
|
||||
m_notebook = new wxNotebook( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_panelFreeColors = new wxPanel( m_notebook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
|
||||
wxBoxSizer* bSizerUpperFreeColors;
|
||||
bSizerUpperFreeColors = new wxBoxSizer( wxVERTICAL );
|
||||
|
||||
|
||||
wxBoxSizer* bSizerPanels;
|
||||
bSizerPanels = new wxBoxSizer( wxHORIZONTAL );
|
||||
|
||||
|
||||
wxStaticBoxSizer* sbSizerViewRGB;
|
||||
sbSizerViewRGB = new wxStaticBoxSizer( new wxStaticBox( m_panelFreeColors, wxID_ANY, _("RGB") ), wxVERTICAL );
|
||||
|
||||
|
||||
m_RgbBitmap = new wxStaticBitmap( sbSizerViewRGB->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 264,264 ), 0 );
|
||||
m_RgbBitmap->SetMinSize( wxSize( 264,264 ) );
|
||||
|
||||
|
||||
sbSizerViewRGB->Add( m_RgbBitmap, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5 );
|
||||
|
||||
|
||||
wxFlexGridSizer* fgSizerRGB;
|
||||
fgSizerRGB = new wxFlexGridSizer( 0, 3, 0, 0 );
|
||||
fgSizerRGB->AddGrowableCol( 0 );
|
||||
@@ -42,109 +42,109 @@ DIALOG_COLOR_PICKER_BASE::DIALOG_COLOR_PICKER_BASE( wxWindow* parent, wxWindowID
|
||||
fgSizerRGB->AddGrowableCol( 2 );
|
||||
fgSizerRGB->SetFlexibleDirection( wxBOTH );
|
||||
fgSizerRGB->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
|
||||
|
||||
|
||||
m_staticTextR = new wxStaticText( sbSizerViewRGB->GetStaticBox(), wxID_ANY, _("Red:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticTextR->Wrap( -1 );
|
||||
fgSizerRGB->Add( m_staticTextR, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
|
||||
m_staticTextG = new wxStaticText( sbSizerViewRGB->GetStaticBox(), wxID_ANY, _("Green:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticTextG->Wrap( -1 );
|
||||
fgSizerRGB->Add( m_staticTextG, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
|
||||
m_staticTextB = new wxStaticText( sbSizerViewRGB->GetStaticBox(), wxID_ANY, _("Blue:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticTextB->Wrap( -1 );
|
||||
fgSizerRGB->Add( m_staticTextB, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
|
||||
m_spinCtrlRed = new wxSpinCtrl( sbSizerViewRGB->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 0, 255, 128 );
|
||||
m_spinCtrlRed->SetMinSize( wxSize( 80,-1 ) );
|
||||
|
||||
|
||||
fgSizerRGB->Add( m_spinCtrlRed, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
|
||||
m_spinCtrlGreen = new wxSpinCtrl( sbSizerViewRGB->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 0, 255, 128 );
|
||||
m_spinCtrlGreen->SetMinSize( wxSize( 80,-1 ) );
|
||||
|
||||
|
||||
fgSizerRGB->Add( m_spinCtrlGreen, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
|
||||
m_spinCtrlBlue = new wxSpinCtrl( sbSizerViewRGB->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 0, 255, 128 );
|
||||
m_spinCtrlBlue->SetMinSize( wxSize( 80,-1 ) );
|
||||
|
||||
|
||||
fgSizerRGB->Add( m_spinCtrlBlue, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
|
||||
|
||||
|
||||
sbSizerViewRGB->Add( fgSizerRGB, 0, wxEXPAND, 5 );
|
||||
|
||||
|
||||
|
||||
|
||||
bSizerPanels->Add( sbSizerViewRGB, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
|
||||
wxStaticBoxSizer* sbSizerViewHSV;
|
||||
sbSizerViewHSV = new wxStaticBoxSizer( new wxStaticBox( m_panelFreeColors, wxID_ANY, _("HSV") ), wxHORIZONTAL );
|
||||
|
||||
|
||||
wxBoxSizer* bSizer10;
|
||||
bSizer10 = new wxBoxSizer( wxVERTICAL );
|
||||
|
||||
|
||||
m_HsvBitmap = new wxStaticBitmap( sbSizerViewHSV->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 264,264 ), 0 );
|
||||
m_HsvBitmap->SetMinSize( wxSize( 264,264 ) );
|
||||
|
||||
|
||||
bSizer10->Add( m_HsvBitmap, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5 );
|
||||
|
||||
|
||||
wxFlexGridSizer* fgSizerHSV;
|
||||
fgSizerHSV = new wxFlexGridSizer( 0, 2, 0, 0 );
|
||||
fgSizerHSV->AddGrowableCol( 0 );
|
||||
fgSizerHSV->AddGrowableCol( 1 );
|
||||
fgSizerHSV->SetFlexibleDirection( wxBOTH );
|
||||
fgSizerHSV->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
|
||||
|
||||
|
||||
m_staticTextHue = new wxStaticText( sbSizerViewHSV->GetStaticBox(), wxID_ANY, _("Hue:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticTextHue->Wrap( -1 );
|
||||
fgSizerHSV->Add( m_staticTextHue, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
|
||||
m_staticTextSat = new wxStaticText( sbSizerViewHSV->GetStaticBox(), wxID_ANY, _("Saturation:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticTextSat->Wrap( -1 );
|
||||
fgSizerHSV->Add( m_staticTextSat, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
|
||||
m_spinCtrlHue = new wxSpinCtrl( sbSizerViewHSV->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS|wxSP_WRAP, 0, 359, 0 );
|
||||
m_spinCtrlHue->SetMinSize( wxSize( 80,-1 ) );
|
||||
|
||||
|
||||
fgSizerHSV->Add( m_spinCtrlHue, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
|
||||
m_spinCtrlSaturation = new wxSpinCtrl( sbSizerViewHSV->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 0, 255, 128 );
|
||||
m_spinCtrlSaturation->SetMinSize( wxSize( 80,-1 ) );
|
||||
|
||||
|
||||
fgSizerHSV->Add( m_spinCtrlSaturation, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
|
||||
|
||||
|
||||
bSizer10->Add( fgSizerHSV, 0, wxEXPAND, 5 );
|
||||
|
||||
|
||||
|
||||
|
||||
sbSizerViewHSV->Add( bSizer10, 0, wxEXPAND, 5 );
|
||||
|
||||
|
||||
wxBoxSizer* bSizerBright;
|
||||
bSizerBright = new wxBoxSizer( wxVERTICAL );
|
||||
|
||||
|
||||
m_staticTextBright = new wxStaticText( sbSizerViewHSV->GetStaticBox(), wxID_ANY, _("Value:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticTextBright->Wrap( -1 );
|
||||
bSizerBright->Add( m_staticTextBright, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5 );
|
||||
|
||||
m_sliderBrightness = new wxSlider( sbSizerViewHSV->GetStaticBox(), wxID_ANY, 255, 0, 255, wxDefaultPosition, wxDefaultSize, wxSL_LABELS|wxSL_LEFT|wxSL_VERTICAL );
|
||||
|
||||
m_sliderBrightness = new wxSlider( sbSizerViewHSV->GetStaticBox(), wxID_ANY, 255, 0, 255, wxDefaultPosition, wxDefaultSize, wxSL_INVERSE|wxSL_LABELS|wxSL_LEFT|wxSL_VERTICAL );
|
||||
bSizerBright->Add( m_sliderBrightness, 1, wxTOP|wxRIGHT|wxALIGN_CENTER_HORIZONTAL, 5 );
|
||||
|
||||
|
||||
|
||||
|
||||
sbSizerViewHSV->Add( bSizerBright, 0, wxEXPAND, 5 );
|
||||
|
||||
|
||||
|
||||
|
||||
bSizerPanels->Add( sbSizerViewHSV, 0, wxEXPAND|wxBOTTOM|wxRIGHT, 5 );
|
||||
|
||||
|
||||
|
||||
|
||||
bSizerUpperFreeColors->Add( bSizerPanels, 1, wxEXPAND, 5 );
|
||||
|
||||
|
||||
|
||||
|
||||
m_panelFreeColors->SetSizer( bSizerUpperFreeColors );
|
||||
m_panelFreeColors->Layout();
|
||||
bSizerUpperFreeColors->Fit( m_panelFreeColors );
|
||||
m_notebook->AddPage( m_panelFreeColors, _("Color Picker"), true );
|
||||
m_panelDefinedColors = new wxPanel( m_notebook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
|
||||
m_SizerDefinedColors = new wxBoxSizer( wxVERTICAL );
|
||||
|
||||
|
||||
m_fgridColor = new wxFlexGridSizer( 0, 10, 0, 0 );
|
||||
m_fgridColor->AddGrowableCol( 1 );
|
||||
m_fgridColor->AddGrowableCol( 3 );
|
||||
@@ -153,78 +153,78 @@ DIALOG_COLOR_PICKER_BASE::DIALOG_COLOR_PICKER_BASE( wxWindow* parent, wxWindowID
|
||||
m_fgridColor->AddGrowableCol( 9 );
|
||||
m_fgridColor->SetFlexibleDirection( wxBOTH );
|
||||
m_fgridColor->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
|
||||
|
||||
|
||||
|
||||
|
||||
m_SizerDefinedColors->Add( m_fgridColor, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL|wxTOP|wxBOTTOM, 5 );
|
||||
|
||||
|
||||
|
||||
|
||||
m_panelDefinedColors->SetSizer( m_SizerDefinedColors );
|
||||
m_panelDefinedColors->Layout();
|
||||
m_SizerDefinedColors->Fit( m_panelDefinedColors );
|
||||
m_notebook->AddPage( m_panelDefinedColors, _("Defined Colors"), false );
|
||||
|
||||
|
||||
bSizerUpperMain->Add( m_notebook, 0, wxEXPAND | wxALL, 5 );
|
||||
|
||||
|
||||
m_SizerTransparency = new wxBoxSizer( wxVERTICAL );
|
||||
|
||||
|
||||
|
||||
|
||||
m_SizerTransparency->Add( 0, 20, 0, wxTOP, 5 );
|
||||
|
||||
|
||||
m_opacityLabel = new wxStaticText( this, wxID_ANY, _("Opacity:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_opacityLabel->Wrap( -1 );
|
||||
m_SizerTransparency->Add( m_opacityLabel, 0, wxALIGN_CENTER_HORIZONTAL|wxTOP|wxLEFT, 5 );
|
||||
|
||||
m_sliderTransparency = new wxSlider( this, wxID_ANY, 80, 20, 100, wxDefaultPosition, wxDefaultSize, wxSL_LABELS|wxSL_LEFT|wxSL_VERTICAL );
|
||||
|
||||
m_sliderTransparency = new wxSlider( this, wxID_ANY, 80, 20, 100, wxDefaultPosition, wxDefaultSize, wxSL_INVERSE|wxSL_LABELS|wxSL_LEFT|wxSL_VERTICAL );
|
||||
m_SizerTransparency->Add( m_sliderTransparency, 1, wxTOP|wxBOTTOM|wxRIGHT|wxALIGN_CENTER_HORIZONTAL, 10 );
|
||||
|
||||
|
||||
|
||||
|
||||
bSizerUpperMain->Add( m_SizerTransparency, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
|
||||
|
||||
|
||||
bSizerUpperMain->Add( 0, 0, 1, wxEXPAND|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
|
||||
|
||||
|
||||
bSizerMain->Add( bSizerUpperMain, 0, wxEXPAND, 5 );
|
||||
|
||||
|
||||
m_staticline = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
|
||||
bSizerMain->Add( m_staticline, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
|
||||
wxBoxSizer* bButtonsSizer;
|
||||
bButtonsSizer = new wxBoxSizer( wxHORIZONTAL );
|
||||
|
||||
|
||||
m_staticTextOldColor = new wxStaticText( this, wxID_ANY, _("Preview (old / new):"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticTextOldColor->Wrap( -1 );
|
||||
bButtonsSizer->Add( m_staticTextOldColor, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
|
||||
m_OldColorRect = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), 0 );
|
||||
m_OldColorRect->SetMinSize( wxSize( 30,22 ) );
|
||||
|
||||
|
||||
bButtonsSizer->Add( m_OldColorRect, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
|
||||
|
||||
|
||||
m_NewColorRect = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), 0 );
|
||||
m_NewColorRect->SetMinSize( wxSize( 30,22 ) );
|
||||
|
||||
|
||||
bButtonsSizer->Add( m_NewColorRect, 0, wxALIGN_CENTER_VERTICAL, 5 );
|
||||
|
||||
|
||||
m_sdbSizer = new wxStdDialogButtonSizer();
|
||||
m_sdbSizerOK = new wxButton( this, wxID_OK );
|
||||
m_sdbSizer->AddButton( m_sdbSizerOK );
|
||||
m_sdbSizerCancel = new wxButton( this, wxID_CANCEL );
|
||||
m_sdbSizer->AddButton( m_sdbSizerCancel );
|
||||
m_sdbSizer->Realize();
|
||||
|
||||
|
||||
bButtonsSizer->Add( m_sdbSizer, 1, wxALL, 5 );
|
||||
|
||||
|
||||
|
||||
|
||||
bSizerMain->Add( bButtonsSizer, 1, wxEXPAND|wxLEFT, 10 );
|
||||
|
||||
|
||||
|
||||
|
||||
this->SetSizer( bSizerMain );
|
||||
this->Layout();
|
||||
bSizerMain->Fit( this );
|
||||
|
||||
|
||||
this->Centre( wxBOTH );
|
||||
|
||||
|
||||
// Connect Events
|
||||
m_RgbBitmap->Connect( wxEVT_LEFT_DOWN, wxMouseEventHandler( DIALOG_COLOR_PICKER_BASE::onRGBMouseClick ), NULL, this );
|
||||
m_RgbBitmap->Connect( wxEVT_MOTION, wxMouseEventHandler( DIALOG_COLOR_PICKER_BASE::onRGBMouseDrag ), NULL, this );
|
||||
@@ -285,5 +285,5 @@ DIALOG_COLOR_PICKER_BASE::~DIALOG_COLOR_PICKER_BASE()
|
||||
m_sliderTransparency->Disconnect( wxEVT_SCROLL_THUMBTRACK, wxScrollEventHandler( DIALOG_COLOR_PICKER_BASE::OnChangeAlpha ), NULL, this );
|
||||
m_sliderTransparency->Disconnect( wxEVT_SCROLL_THUMBRELEASE, wxScrollEventHandler( DIALOG_COLOR_PICKER_BASE::OnChangeAlpha ), NULL, this );
|
||||
m_sliderTransparency->Disconnect( wxEVT_SCROLL_CHANGED, wxScrollEventHandler( DIALOG_COLOR_PICKER_BASE::OnChangeAlpha ), NULL, this );
|
||||
|
||||
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,12 +1,11 @@
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// C++ code generated with wxFormBuilder (version Jul 11 2018)
|
||||
// C++ code generated with wxFormBuilder (version Mar 28 2019)
|
||||
// http://www.wxformbuilder.org/
|
||||
//
|
||||
// PLEASE DO *NOT* EDIT THIS FILE!
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef __DIALOG_COLOR_PICKER_BASE_H__
|
||||
#define __DIALOG_COLOR_PICKER_BASE_H__
|
||||
#pragma once
|
||||
|
||||
#include <wx/artprov.h>
|
||||
#include <wx/xrc/xmlres.h>
|
||||
@@ -41,7 +40,7 @@
|
||||
class DIALOG_COLOR_PICKER_BASE : public DIALOG_SHIM
|
||||
{
|
||||
private:
|
||||
|
||||
|
||||
protected:
|
||||
wxNotebook* m_notebook;
|
||||
wxPanel* m_panelFreeColors;
|
||||
@@ -72,7 +71,7 @@ class DIALOG_COLOR_PICKER_BASE : public DIALOG_SHIM
|
||||
wxStdDialogButtonSizer* m_sdbSizer;
|
||||
wxButton* m_sdbSizerOK;
|
||||
wxButton* m_sdbSizerCancel;
|
||||
|
||||
|
||||
// Virtual event handlers, overide them in your derived class
|
||||
virtual void onRGBMouseClick( wxMouseEvent& event ) { event.Skip(); }
|
||||
virtual void onRGBMouseDrag( wxMouseEvent& event ) { event.Skip(); }
|
||||
@@ -85,13 +84,12 @@ class DIALOG_COLOR_PICKER_BASE : public DIALOG_SHIM
|
||||
virtual void OnChangeEditSat( wxSpinEvent& event ) { event.Skip(); }
|
||||
virtual void OnChangeBrightness( wxScrollEvent& event ) { event.Skip(); }
|
||||
virtual void OnChangeAlpha( wxScrollEvent& event ) { event.Skip(); }
|
||||
|
||||
|
||||
|
||||
|
||||
public:
|
||||
|
||||
DIALOG_COLOR_PICKER_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Color Picker"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
|
||||
|
||||
DIALOG_COLOR_PICKER_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Color Picker"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
|
||||
~DIALOG_COLOR_PICKER_BASE();
|
||||
|
||||
|
||||
};
|
||||
|
||||
#endif //__DIALOG_COLOR_PICKER_BASE_H__
|
||||
|
||||
@@ -339,8 +339,15 @@ void DIALOG_CONFIGURE_PATHS::OnGridCellChanging( wxGridEvent& event )
|
||||
}
|
||||
else if( col == EV_NAME_COL && m_EnvVars->GetCellValue( row, EV_NAME_COL ) != text )
|
||||
{
|
||||
// Changing name; clear external flag
|
||||
m_EnvVars->SetCellValue( row, EV_FLAG_COL, wxEmptyString );
|
||||
if( text == PROJECT_VAR_NAME ) // This env var name is reserved and cannot be added here:
|
||||
{
|
||||
wxMessageBox( wxString::Format(
|
||||
_( "The name %s is reserved, and cannot be used here" ),
|
||||
PROJECT_VAR_NAME ) );
|
||||
event.Veto();
|
||||
}
|
||||
else // Changing name; clear external flag
|
||||
m_EnvVars->SetCellValue( row, EV_FLAG_COL, wxEmptyString );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
|
||||
<wxFormBuilder_Project>
|
||||
<FileVersion major="1" minor="13" />
|
||||
<FileVersion major="1" minor="15" />
|
||||
<object class="Project" expanded="1">
|
||||
<property name="class_decoration"></property>
|
||||
<property name="code_generation">C++</property>
|
||||
@@ -14,6 +14,7 @@
|
||||
<property name="file">dialog_configure_paths_base</property>
|
||||
<property name="first_id">1000</property>
|
||||
<property name="help_provider">none</property>
|
||||
<property name="indent_with_spaces"></property>
|
||||
<property name="internationalize">1</property>
|
||||
<property name="name">DIALOG_CONFIGURE_PATHS_BASE</property>
|
||||
<property name="namespace"></property>
|
||||
@@ -52,41 +53,6 @@
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<event name="OnActivate"></event>
|
||||
<event name="OnActivateApp"></event>
|
||||
<event name="OnAuiFindManager"></event>
|
||||
<event name="OnAuiPaneButton"></event>
|
||||
<event name="OnAuiPaneClose"></event>
|
||||
<event name="OnAuiPaneMaximize"></event>
|
||||
<event name="OnAuiPaneRestore"></event>
|
||||
<event name="OnAuiRender"></event>
|
||||
<event name="OnChar"></event>
|
||||
<event name="OnClose"></event>
|
||||
<event name="OnEnterWindow"></event>
|
||||
<event name="OnEraseBackground"></event>
|
||||
<event name="OnHibernate"></event>
|
||||
<event name="OnIconize"></event>
|
||||
<event name="OnIdle"></event>
|
||||
<event name="OnInitDialog"></event>
|
||||
<event name="OnKeyDown"></event>
|
||||
<event name="OnKeyUp"></event>
|
||||
<event name="OnKillFocus"></event>
|
||||
<event name="OnLeaveWindow"></event>
|
||||
<event name="OnLeftDClick"></event>
|
||||
<event name="OnLeftDown"></event>
|
||||
<event name="OnLeftUp"></event>
|
||||
<event name="OnMiddleDClick"></event>
|
||||
<event name="OnMiddleDown"></event>
|
||||
<event name="OnMiddleUp"></event>
|
||||
<event name="OnMotion"></event>
|
||||
<event name="OnMouseEvents"></event>
|
||||
<event name="OnMouseWheel"></event>
|
||||
<event name="OnPaint"></event>
|
||||
<event name="OnRightDClick"></event>
|
||||
<event name="OnRightDown"></event>
|
||||
<event name="OnRightUp"></event>
|
||||
<event name="OnSetFocus"></event>
|
||||
<event name="OnSize"></event>
|
||||
<event name="OnUpdateUI">OnUpdateUI</event>
|
||||
<object class="wxBoxSizer" expanded="1">
|
||||
<property name="minimum_size"></property>
|
||||
@@ -105,7 +71,6 @@
|
||||
<property name="orient">wxVERTICAL</property>
|
||||
<property name="parent">1</property>
|
||||
<property name="permission">none</property>
|
||||
<event name="OnUpdateUI"></event>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxEXPAND|wxBOTTOM</property>
|
||||
@@ -132,10 +97,10 @@
|
||||
<property name="cell_vert_alignment">wxALIGN_TOP</property>
|
||||
<property name="center_pane">0</property>
|
||||
<property name="close_button">1</property>
|
||||
<property name="col_label_horiz_alignment">wxALIGN_CENTRE</property>
|
||||
<property name="col_label_horiz_alignment">wxALIGN_CENTER</property>
|
||||
<property name="col_label_size">22</property>
|
||||
<property name="col_label_values">"Name" "Path"</property>
|
||||
<property name="col_label_vert_alignment">wxALIGN_CENTRE</property>
|
||||
<property name="col_label_vert_alignment">wxALIGN_CENTER</property>
|
||||
<property name="cols">2</property>
|
||||
<property name="column_sizes">150,454</property>
|
||||
<property name="context_help"></property>
|
||||
@@ -178,10 +143,10 @@
|
||||
<property name="pin_button">1</property>
|
||||
<property name="pos"></property>
|
||||
<property name="resize">Resizable</property>
|
||||
<property name="row_label_horiz_alignment">wxALIGN_CENTRE</property>
|
||||
<property name="row_label_horiz_alignment">wxALIGN_CENTER</property>
|
||||
<property name="row_label_size">0</property>
|
||||
<property name="row_label_values"></property>
|
||||
<property name="row_label_vert_alignment">wxALIGN_CENTRE</property>
|
||||
<property name="row_label_vert_alignment">wxALIGN_CENTER</property>
|
||||
<property name="row_sizes"></property>
|
||||
<property name="rows">1</property>
|
||||
<property name="show">1</property>
|
||||
@@ -192,61 +157,8 @@
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<event name="OnChar"></event>
|
||||
<event name="OnEnterWindow"></event>
|
||||
<event name="OnEraseBackground"></event>
|
||||
<event name="OnGridCellChange">OnGridCellChange</event>
|
||||
<event name="OnGridCellLeftClick"></event>
|
||||
<event name="OnGridCellLeftDClick"></event>
|
||||
<event name="OnGridCellRightClick"></event>
|
||||
<event name="OnGridCellRightDClick"></event>
|
||||
<event name="OnGridCmdCellChange"></event>
|
||||
<event name="OnGridCmdCellLeftClick"></event>
|
||||
<event name="OnGridCmdCellLeftDClick"></event>
|
||||
<event name="OnGridCmdCellRightClick"></event>
|
||||
<event name="OnGridCmdCellRightDClick"></event>
|
||||
<event name="OnGridCmdColSize"></event>
|
||||
<event name="OnGridCmdEditorCreated"></event>
|
||||
<event name="OnGridCmdEditorHidden"></event>
|
||||
<event name="OnGridCmdEditorShown"></event>
|
||||
<event name="OnGridCmdLabelLeftClick"></event>
|
||||
<event name="OnGridCmdLabelLeftDClick"></event>
|
||||
<event name="OnGridCmdLabelRightClick"></event>
|
||||
<event name="OnGridCmdLabelRightDClick"></event>
|
||||
<event name="OnGridCmdRangeSelect"></event>
|
||||
<event name="OnGridCmdRowSize"></event>
|
||||
<event name="OnGridCmdSelectCell"></event>
|
||||
<event name="OnGridColSize"></event>
|
||||
<event name="OnGridEditorCreated"></event>
|
||||
<event name="OnGridEditorHidden"></event>
|
||||
<event name="OnGridEditorShown"></event>
|
||||
<event name="OnGridLabelLeftClick"></event>
|
||||
<event name="OnGridLabelLeftDClick"></event>
|
||||
<event name="OnGridLabelRightClick"></event>
|
||||
<event name="OnGridLabelRightDClick"></event>
|
||||
<event name="OnGridRangeSelect"></event>
|
||||
<event name="OnGridRowSize"></event>
|
||||
<event name="OnGridSelectCell"></event>
|
||||
<event name="OnKeyDown"></event>
|
||||
<event name="OnKeyUp"></event>
|
||||
<event name="OnKillFocus"></event>
|
||||
<event name="OnLeaveWindow"></event>
|
||||
<event name="OnLeftDClick"></event>
|
||||
<event name="OnLeftDown"></event>
|
||||
<event name="OnLeftUp"></event>
|
||||
<event name="OnMiddleDClick"></event>
|
||||
<event name="OnMiddleDown"></event>
|
||||
<event name="OnMiddleUp"></event>
|
||||
<event name="OnMotion"></event>
|
||||
<event name="OnMouseEvents"></event>
|
||||
<event name="OnMouseWheel"></event>
|
||||
<event name="OnPaint"></event>
|
||||
<event name="OnRightDClick"></event>
|
||||
<event name="OnRightDown"></event>
|
||||
<event name="OnRightUp"></event>
|
||||
<event name="OnSetFocus"></event>
|
||||
<event name="OnSize">OnGridSize</event>
|
||||
<event name="OnUpdateUI"></event>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
@@ -280,6 +192,7 @@
|
||||
<property name="close_button">1</property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
<property name="current"></property>
|
||||
<property name="default">0</property>
|
||||
<property name="default_pane">0</property>
|
||||
<property name="disabled"></property>
|
||||
@@ -293,9 +206,10 @@
|
||||
<property name="font"></property>
|
||||
<property name="gripper">0</property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="hover"></property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">Add Environment Variable</property>
|
||||
<property name="margins"></property>
|
||||
<property name="markup">0</property>
|
||||
<property name="max_size"></property>
|
||||
<property name="maximize_button">0</property>
|
||||
<property name="maximum_size"></property>
|
||||
@@ -310,8 +224,9 @@
|
||||
<property name="permission">protected</property>
|
||||
<property name="pin_button">1</property>
|
||||
<property name="pos"></property>
|
||||
<property name="position"></property>
|
||||
<property name="pressed"></property>
|
||||
<property name="resize">Resizable</property>
|
||||
<property name="selected"></property>
|
||||
<property name="show">1</property>
|
||||
<property name="size"></property>
|
||||
<property name="style"></property>
|
||||
@@ -326,29 +241,6 @@
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<event name="OnButtonClick">OnAddEnvVar</event>
|
||||
<event name="OnChar"></event>
|
||||
<event name="OnEnterWindow"></event>
|
||||
<event name="OnEraseBackground"></event>
|
||||
<event name="OnKeyDown"></event>
|
||||
<event name="OnKeyUp"></event>
|
||||
<event name="OnKillFocus"></event>
|
||||
<event name="OnLeaveWindow"></event>
|
||||
<event name="OnLeftDClick"></event>
|
||||
<event name="OnLeftDown"></event>
|
||||
<event name="OnLeftUp"></event>
|
||||
<event name="OnMiddleDClick"></event>
|
||||
<event name="OnMiddleDown"></event>
|
||||
<event name="OnMiddleUp"></event>
|
||||
<event name="OnMotion"></event>
|
||||
<event name="OnMouseEvents"></event>
|
||||
<event name="OnMouseWheel"></event>
|
||||
<event name="OnPaint"></event>
|
||||
<event name="OnRightDClick"></event>
|
||||
<event name="OnRightDown"></event>
|
||||
<event name="OnRightUp"></event>
|
||||
<event name="OnSetFocus"></event>
|
||||
<event name="OnSize"></event>
|
||||
<event name="OnUpdateUI"></event>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
@@ -383,6 +275,7 @@
|
||||
<property name="close_button">1</property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
<property name="current"></property>
|
||||
<property name="default">0</property>
|
||||
<property name="default_pane">0</property>
|
||||
<property name="disabled"></property>
|
||||
@@ -396,9 +289,10 @@
|
||||
<property name="font"></property>
|
||||
<property name="gripper">0</property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="hover"></property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">Delete Environment Variable</property>
|
||||
<property name="margins"></property>
|
||||
<property name="markup">0</property>
|
||||
<property name="max_size"></property>
|
||||
<property name="maximize_button">0</property>
|
||||
<property name="maximum_size"></property>
|
||||
@@ -413,8 +307,9 @@
|
||||
<property name="permission">protected</property>
|
||||
<property name="pin_button">1</property>
|
||||
<property name="pos"></property>
|
||||
<property name="position"></property>
|
||||
<property name="pressed"></property>
|
||||
<property name="resize">Resizable</property>
|
||||
<property name="selected"></property>
|
||||
<property name="show">1</property>
|
||||
<property name="size"></property>
|
||||
<property name="style"></property>
|
||||
@@ -429,29 +324,6 @@
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<event name="OnButtonClick">OnRemoveEnvVar</event>
|
||||
<event name="OnChar"></event>
|
||||
<event name="OnEnterWindow"></event>
|
||||
<event name="OnEraseBackground"></event>
|
||||
<event name="OnKeyDown"></event>
|
||||
<event name="OnKeyUp"></event>
|
||||
<event name="OnKillFocus"></event>
|
||||
<event name="OnLeaveWindow"></event>
|
||||
<event name="OnLeftDClick"></event>
|
||||
<event name="OnLeftDown"></event>
|
||||
<event name="OnLeftUp"></event>
|
||||
<event name="OnMiddleDClick"></event>
|
||||
<event name="OnMiddleDown"></event>
|
||||
<event name="OnMiddleUp"></event>
|
||||
<event name="OnMotion"></event>
|
||||
<event name="OnMouseEvents"></event>
|
||||
<event name="OnMouseWheel"></event>
|
||||
<event name="OnPaint"></event>
|
||||
<event name="OnRightDClick"></event>
|
||||
<event name="OnRightDown"></event>
|
||||
<event name="OnRightUp"></event>
|
||||
<event name="OnSetFocus"></event>
|
||||
<event name="OnSize"></event>
|
||||
<event name="OnUpdateUI"></event>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
@@ -470,7 +342,6 @@
|
||||
<property name="orient">wxVERTICAL</property>
|
||||
<property name="parent">1</property>
|
||||
<property name="permission">protected</property>
|
||||
<event name="OnUpdateUI"></event>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxEXPAND|wxBOTTOM</property>
|
||||
@@ -497,10 +368,10 @@
|
||||
<property name="cell_vert_alignment">wxALIGN_TOP</property>
|
||||
<property name="center_pane">0</property>
|
||||
<property name="close_button">1</property>
|
||||
<property name="col_label_horiz_alignment">wxALIGN_CENTRE</property>
|
||||
<property name="col_label_horiz_alignment">wxALIGN_CENTER</property>
|
||||
<property name="col_label_size">22</property>
|
||||
<property name="col_label_values">"Alias" "Path" "Description"</property>
|
||||
<property name="col_label_vert_alignment">wxALIGN_CENTRE</property>
|
||||
<property name="col_label_vert_alignment">wxALIGN_CENTER</property>
|
||||
<property name="cols">3</property>
|
||||
<property name="column_sizes">150,300,154</property>
|
||||
<property name="context_help"></property>
|
||||
@@ -543,10 +414,10 @@
|
||||
<property name="pin_button">1</property>
|
||||
<property name="pos"></property>
|
||||
<property name="resize">Resizable</property>
|
||||
<property name="row_label_horiz_alignment">wxALIGN_CENTRE</property>
|
||||
<property name="row_label_horiz_alignment">wxALIGN_CENTER</property>
|
||||
<property name="row_label_size">0</property>
|
||||
<property name="row_label_values"></property>
|
||||
<property name="row_label_vert_alignment">wxALIGN_CENTRE</property>
|
||||
<property name="row_label_vert_alignment">wxALIGN_CENTER</property>
|
||||
<property name="row_sizes"></property>
|
||||
<property name="rows">1</property>
|
||||
<property name="show">1</property>
|
||||
@@ -557,61 +428,8 @@
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<event name="OnChar"></event>
|
||||
<event name="OnEnterWindow"></event>
|
||||
<event name="OnEraseBackground"></event>
|
||||
<event name="OnGridCellChange">OnGridCellChange</event>
|
||||
<event name="OnGridCellLeftClick"></event>
|
||||
<event name="OnGridCellLeftDClick"></event>
|
||||
<event name="OnGridCellRightClick">OnGridCellRightClick</event>
|
||||
<event name="OnGridCellRightDClick"></event>
|
||||
<event name="OnGridCmdCellChange"></event>
|
||||
<event name="OnGridCmdCellLeftClick"></event>
|
||||
<event name="OnGridCmdCellLeftDClick"></event>
|
||||
<event name="OnGridCmdCellRightClick"></event>
|
||||
<event name="OnGridCmdCellRightDClick"></event>
|
||||
<event name="OnGridCmdColSize"></event>
|
||||
<event name="OnGridCmdEditorCreated"></event>
|
||||
<event name="OnGridCmdEditorHidden"></event>
|
||||
<event name="OnGridCmdEditorShown"></event>
|
||||
<event name="OnGridCmdLabelLeftClick"></event>
|
||||
<event name="OnGridCmdLabelLeftDClick"></event>
|
||||
<event name="OnGridCmdLabelRightClick"></event>
|
||||
<event name="OnGridCmdLabelRightDClick"></event>
|
||||
<event name="OnGridCmdRangeSelect"></event>
|
||||
<event name="OnGridCmdRowSize"></event>
|
||||
<event name="OnGridCmdSelectCell"></event>
|
||||
<event name="OnGridColSize"></event>
|
||||
<event name="OnGridEditorCreated"></event>
|
||||
<event name="OnGridEditorHidden"></event>
|
||||
<event name="OnGridEditorShown"></event>
|
||||
<event name="OnGridLabelLeftClick"></event>
|
||||
<event name="OnGridLabelLeftDClick"></event>
|
||||
<event name="OnGridLabelRightClick"></event>
|
||||
<event name="OnGridLabelRightDClick"></event>
|
||||
<event name="OnGridRangeSelect"></event>
|
||||
<event name="OnGridRowSize"></event>
|
||||
<event name="OnGridSelectCell"></event>
|
||||
<event name="OnKeyDown"></event>
|
||||
<event name="OnKeyUp"></event>
|
||||
<event name="OnKillFocus"></event>
|
||||
<event name="OnLeaveWindow"></event>
|
||||
<event name="OnLeftDClick"></event>
|
||||
<event name="OnLeftDown"></event>
|
||||
<event name="OnLeftUp"></event>
|
||||
<event name="OnMiddleDClick"></event>
|
||||
<event name="OnMiddleDown"></event>
|
||||
<event name="OnMiddleUp"></event>
|
||||
<event name="OnMotion"></event>
|
||||
<event name="OnMouseEvents"></event>
|
||||
<event name="OnMouseWheel"></event>
|
||||
<event name="OnPaint"></event>
|
||||
<event name="OnRightDClick"></event>
|
||||
<event name="OnRightDown"></event>
|
||||
<event name="OnRightUp"></event>
|
||||
<event name="OnSetFocus"></event>
|
||||
<event name="OnSize"></event>
|
||||
<event name="OnUpdateUI"></event>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
@@ -645,6 +463,7 @@
|
||||
<property name="close_button">1</property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
<property name="current"></property>
|
||||
<property name="default">0</property>
|
||||
<property name="default_pane">0</property>
|
||||
<property name="disabled"></property>
|
||||
@@ -658,9 +477,10 @@
|
||||
<property name="font"></property>
|
||||
<property name="gripper">0</property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="hover"></property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">Add Path</property>
|
||||
<property name="margins"></property>
|
||||
<property name="markup">0</property>
|
||||
<property name="max_size"></property>
|
||||
<property name="maximize_button">0</property>
|
||||
<property name="maximum_size"></property>
|
||||
@@ -675,8 +495,9 @@
|
||||
<property name="permission">protected</property>
|
||||
<property name="pin_button">1</property>
|
||||
<property name="pos"></property>
|
||||
<property name="position"></property>
|
||||
<property name="pressed"></property>
|
||||
<property name="resize">Resizable</property>
|
||||
<property name="selected"></property>
|
||||
<property name="show">1</property>
|
||||
<property name="size"></property>
|
||||
<property name="style"></property>
|
||||
@@ -691,29 +512,6 @@
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<event name="OnButtonClick">OnAddSearchPath</event>
|
||||
<event name="OnChar"></event>
|
||||
<event name="OnEnterWindow"></event>
|
||||
<event name="OnEraseBackground"></event>
|
||||
<event name="OnKeyDown"></event>
|
||||
<event name="OnKeyUp"></event>
|
||||
<event name="OnKillFocus"></event>
|
||||
<event name="OnLeaveWindow"></event>
|
||||
<event name="OnLeftDClick"></event>
|
||||
<event name="OnLeftDown"></event>
|
||||
<event name="OnLeftUp"></event>
|
||||
<event name="OnMiddleDClick"></event>
|
||||
<event name="OnMiddleDown"></event>
|
||||
<event name="OnMiddleUp"></event>
|
||||
<event name="OnMotion"></event>
|
||||
<event name="OnMouseEvents"></event>
|
||||
<event name="OnMouseWheel"></event>
|
||||
<event name="OnPaint"></event>
|
||||
<event name="OnRightDClick"></event>
|
||||
<event name="OnRightDown"></event>
|
||||
<event name="OnRightUp"></event>
|
||||
<event name="OnSetFocus"></event>
|
||||
<event name="OnSize"></event>
|
||||
<event name="OnUpdateUI"></event>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="0">
|
||||
@@ -738,6 +536,7 @@
|
||||
<property name="close_button">1</property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
<property name="current"></property>
|
||||
<property name="default">0</property>
|
||||
<property name="default_pane">0</property>
|
||||
<property name="disabled"></property>
|
||||
@@ -751,9 +550,10 @@
|
||||
<property name="font"></property>
|
||||
<property name="gripper">0</property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="hover"></property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">Move Up</property>
|
||||
<property name="margins"></property>
|
||||
<property name="markup">0</property>
|
||||
<property name="max_size"></property>
|
||||
<property name="maximize_button">0</property>
|
||||
<property name="maximum_size"></property>
|
||||
@@ -768,8 +568,9 @@
|
||||
<property name="permission">protected</property>
|
||||
<property name="pin_button">1</property>
|
||||
<property name="pos"></property>
|
||||
<property name="position"></property>
|
||||
<property name="pressed"></property>
|
||||
<property name="resize">Resizable</property>
|
||||
<property name="selected"></property>
|
||||
<property name="show">1</property>
|
||||
<property name="size"></property>
|
||||
<property name="style"></property>
|
||||
@@ -784,29 +585,6 @@
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<event name="OnButtonClick">OnSearchPathMoveUp</event>
|
||||
<event name="OnChar"></event>
|
||||
<event name="OnEnterWindow"></event>
|
||||
<event name="OnEraseBackground"></event>
|
||||
<event name="OnKeyDown"></event>
|
||||
<event name="OnKeyUp"></event>
|
||||
<event name="OnKillFocus"></event>
|
||||
<event name="OnLeaveWindow"></event>
|
||||
<event name="OnLeftDClick"></event>
|
||||
<event name="OnLeftDown"></event>
|
||||
<event name="OnLeftUp"></event>
|
||||
<event name="OnMiddleDClick"></event>
|
||||
<event name="OnMiddleDown"></event>
|
||||
<event name="OnMiddleUp"></event>
|
||||
<event name="OnMotion"></event>
|
||||
<event name="OnMouseEvents"></event>
|
||||
<event name="OnMouseWheel"></event>
|
||||
<event name="OnPaint"></event>
|
||||
<event name="OnRightDClick"></event>
|
||||
<event name="OnRightDown"></event>
|
||||
<event name="OnRightUp"></event>
|
||||
<event name="OnSetFocus"></event>
|
||||
<event name="OnSize"></event>
|
||||
<event name="OnUpdateUI"></event>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="0">
|
||||
@@ -831,6 +609,7 @@
|
||||
<property name="close_button">1</property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
<property name="current"></property>
|
||||
<property name="default">0</property>
|
||||
<property name="default_pane">0</property>
|
||||
<property name="disabled"></property>
|
||||
@@ -844,9 +623,10 @@
|
||||
<property name="font"></property>
|
||||
<property name="gripper">0</property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="hover"></property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">Move Down</property>
|
||||
<property name="margins"></property>
|
||||
<property name="markup">0</property>
|
||||
<property name="max_size"></property>
|
||||
<property name="maximize_button">0</property>
|
||||
<property name="maximum_size"></property>
|
||||
@@ -861,8 +641,9 @@
|
||||
<property name="permission">protected</property>
|
||||
<property name="pin_button">1</property>
|
||||
<property name="pos"></property>
|
||||
<property name="position"></property>
|
||||
<property name="pressed"></property>
|
||||
<property name="resize">Resizable</property>
|
||||
<property name="selected"></property>
|
||||
<property name="show">1</property>
|
||||
<property name="size"></property>
|
||||
<property name="style"></property>
|
||||
@@ -877,29 +658,6 @@
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<event name="OnButtonClick">OnSearchPathMoveDown</event>
|
||||
<event name="OnChar"></event>
|
||||
<event name="OnEnterWindow"></event>
|
||||
<event name="OnEraseBackground"></event>
|
||||
<event name="OnKeyDown"></event>
|
||||
<event name="OnKeyUp"></event>
|
||||
<event name="OnKillFocus"></event>
|
||||
<event name="OnLeaveWindow"></event>
|
||||
<event name="OnLeftDClick"></event>
|
||||
<event name="OnLeftDown"></event>
|
||||
<event name="OnLeftUp"></event>
|
||||
<event name="OnMiddleDClick"></event>
|
||||
<event name="OnMiddleDown"></event>
|
||||
<event name="OnMiddleUp"></event>
|
||||
<event name="OnMotion"></event>
|
||||
<event name="OnMouseEvents"></event>
|
||||
<event name="OnMouseWheel"></event>
|
||||
<event name="OnPaint"></event>
|
||||
<event name="OnRightDClick"></event>
|
||||
<event name="OnRightDown"></event>
|
||||
<event name="OnRightUp"></event>
|
||||
<event name="OnSetFocus"></event>
|
||||
<event name="OnSize"></event>
|
||||
<event name="OnUpdateUI"></event>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
@@ -934,6 +692,7 @@
|
||||
<property name="close_button">1</property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
<property name="current"></property>
|
||||
<property name="default">0</property>
|
||||
<property name="default_pane">0</property>
|
||||
<property name="disabled"></property>
|
||||
@@ -947,9 +706,10 @@
|
||||
<property name="font"></property>
|
||||
<property name="gripper">0</property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="hover"></property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">Delete Path</property>
|
||||
<property name="margins"></property>
|
||||
<property name="markup">0</property>
|
||||
<property name="max_size"></property>
|
||||
<property name="maximize_button">0</property>
|
||||
<property name="maximum_size"></property>
|
||||
@@ -964,8 +724,9 @@
|
||||
<property name="permission">protected</property>
|
||||
<property name="pin_button">1</property>
|
||||
<property name="pos"></property>
|
||||
<property name="position"></property>
|
||||
<property name="pressed"></property>
|
||||
<property name="resize">Resizable</property>
|
||||
<property name="selected"></property>
|
||||
<property name="show">1</property>
|
||||
<property name="size"></property>
|
||||
<property name="style"></property>
|
||||
@@ -980,29 +741,6 @@
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<event name="OnButtonClick">OnDeleteSearchPath</event>
|
||||
<event name="OnChar"></event>
|
||||
<event name="OnEnterWindow"></event>
|
||||
<event name="OnEraseBackground"></event>
|
||||
<event name="OnKeyDown"></event>
|
||||
<event name="OnKeyUp"></event>
|
||||
<event name="OnKillFocus"></event>
|
||||
<event name="OnLeaveWindow"></event>
|
||||
<event name="OnLeftDClick"></event>
|
||||
<event name="OnLeftDown"></event>
|
||||
<event name="OnLeftUp"></event>
|
||||
<event name="OnMiddleDClick"></event>
|
||||
<event name="OnMiddleDown"></event>
|
||||
<event name="OnMiddleUp"></event>
|
||||
<event name="OnMotion"></event>
|
||||
<event name="OnMouseEvents"></event>
|
||||
<event name="OnMouseWheel"></event>
|
||||
<event name="OnPaint"></event>
|
||||
<event name="OnRightDClick"></event>
|
||||
<event name="OnRightDown"></event>
|
||||
<event name="OnRightUp"></event>
|
||||
<event name="OnSetFocus"></event>
|
||||
<event name="OnSize"></event>
|
||||
<event name="OnUpdateUI"></event>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
@@ -1025,14 +763,7 @@
|
||||
<property name="minimum_size"></property>
|
||||
<property name="name">m_sdbSizer</property>
|
||||
<property name="permission">protected</property>
|
||||
<event name="OnApplyButtonClick"></event>
|
||||
<event name="OnCancelButtonClick"></event>
|
||||
<event name="OnContextHelpButtonClick"></event>
|
||||
<event name="OnHelpButtonClick">OnHelp</event>
|
||||
<event name="OnNoButtonClick"></event>
|
||||
<event name="OnOKButtonClick"></event>
|
||||
<event name="OnSaveButtonClick"></event>
|
||||
<event name="OnYesButtonClick"></event>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
|
||||
@@ -21,20 +21,50 @@
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
#include <pgm_base.h>
|
||||
#include <dialog_shim.h>
|
||||
#include <kiface_i.h>
|
||||
#include <bitmap_types.h>
|
||||
#include <bitmaps.h>
|
||||
#include <wx/graphics.h>
|
||||
#include "panel_common_settings.h"
|
||||
|
||||
PANEL_COMMON_SETTINGS::PANEL_COMMON_SETTINGS( DIALOG_SHIM* aDialog, wxWindow* aParent ) :
|
||||
PANEL_COMMON_SETTINGS_BASE( aParent ),
|
||||
m_dialog( aDialog ),
|
||||
m_last_scale( -1 )
|
||||
#include <bitmap_types.h>
|
||||
#include <bitmaps.h>
|
||||
#include <dialog_shim.h>
|
||||
#include <dpi_scaling.h>
|
||||
#include <kiface_i.h>
|
||||
#include <pgm_base.h>
|
||||
|
||||
#include <wx/graphics.h>
|
||||
|
||||
|
||||
static constexpr int dpi_scaling_precision = 1;
|
||||
static constexpr double dpi_scaling_increment = 0.5;
|
||||
|
||||
|
||||
PANEL_COMMON_SETTINGS::PANEL_COMMON_SETTINGS( DIALOG_SHIM* aDialog, wxWindow* aParent )
|
||||
: PANEL_COMMON_SETTINGS_BASE( aParent ),
|
||||
m_dialog( aDialog ),
|
||||
m_last_scale( -1 )
|
||||
{
|
||||
m_scaleSlider->SetStep( 25 );
|
||||
m_canvasScaleCtrl->SetRange(
|
||||
DPI_SCALING::GetMinScaleFactor(), DPI_SCALING::GetMaxScaleFactor() );
|
||||
m_canvasScaleCtrl->SetDigits( dpi_scaling_precision );
|
||||
m_canvasScaleCtrl->SetIncrement( dpi_scaling_increment );
|
||||
m_canvasScaleCtrl->SetValue( DPI_SCALING::GetDefaultScaleFactor() );
|
||||
|
||||
m_canvasScaleCtrl->SetToolTip(
|
||||
_( "Set the scale for the canvas."
|
||||
"\n\n"
|
||||
"On high-DPI displays on some platforms, KiCad cannot determine the "
|
||||
"scaling factor. In this case you may need to set this to a value to "
|
||||
"match your system's DPI scaling. 2.0 is a common value. "
|
||||
"\n\n"
|
||||
"If this does not match the system DPI scaling, the canvas will "
|
||||
"not match the window size and cursor position." ) );
|
||||
|
||||
m_canvasScaleAuto->SetToolTip(
|
||||
_( "Use an automatic value for the canvas scale."
|
||||
"\n\n"
|
||||
"On some platforms, the automatic value is incorrect and should be "
|
||||
"set manually." ) );
|
||||
|
||||
m_iconScaleSlider->SetStep( 25 );
|
||||
|
||||
m_textEditorBtn->SetBitmap( KiBitmap( folder_xpm ) );
|
||||
m_pdfViewerBtn->SetBitmap( KiBitmap( folder_xpm ) );
|
||||
@@ -63,18 +93,24 @@ bool PANEL_COMMON_SETTINGS::TransferDataToWindow()
|
||||
commonSettings->Read( CAIRO_ANTIALIASING_MODE_KEY, &antialiasingMode, 0 );
|
||||
m_antialiasingFallback->SetSelection( antialiasingMode );
|
||||
|
||||
int scale_fourths;
|
||||
commonSettings->Read( ICON_SCALE_KEY, &scale_fourths );
|
||||
int icon_scale_fourths;
|
||||
commonSettings->Read( ICON_SCALE_KEY, &icon_scale_fourths );
|
||||
|
||||
if( scale_fourths <= 0 )
|
||||
if( icon_scale_fourths <= 0 )
|
||||
{
|
||||
m_scaleAuto->SetValue( true );
|
||||
m_scaleSlider->SetValue( 25 * KiIconScale( GetParent() ) );
|
||||
m_iconScaleAuto->SetValue( true );
|
||||
m_iconScaleSlider->SetValue( 25 * KiIconScale( GetParent() ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
m_scaleAuto->SetValue( false );
|
||||
m_scaleSlider->SetValue( scale_fourths * 25 );
|
||||
m_iconScaleAuto->SetValue( false );
|
||||
m_iconScaleSlider->SetValue( icon_scale_fourths * 25 );
|
||||
}
|
||||
|
||||
{
|
||||
const DPI_SCALING dpi( commonSettings, this );
|
||||
m_canvasScaleCtrl->SetValue( dpi.GetScaleFactor() );
|
||||
m_canvasScaleAuto->SetValue( dpi.GetCanvasIsAutoScaled() );
|
||||
}
|
||||
|
||||
bool option;
|
||||
@@ -111,9 +147,14 @@ bool PANEL_COMMON_SETTINGS::TransferDataFromWindow()
|
||||
|
||||
commonSettings->Write( CAIRO_ANTIALIASING_MODE_KEY, m_antialiasingFallback->GetSelection() );
|
||||
|
||||
const int scale_fourths = m_scaleAuto->GetValue() ? -1 : m_scaleSlider->GetValue() / 25;
|
||||
const int scale_fourths = m_iconScaleAuto->GetValue() ? -1 : m_iconScaleSlider->GetValue() / 25;
|
||||
commonSettings->Write( ICON_SCALE_KEY, scale_fourths );
|
||||
|
||||
{
|
||||
DPI_SCALING dpi( commonSettings, this );
|
||||
dpi.SetDpiConfig( m_canvasScaleAuto->GetValue(), m_canvasScaleCtrl->GetValue() );
|
||||
}
|
||||
|
||||
commonSettings->Write( USE_ICONS_IN_MENUS_KEY, m_checkBoxIconsInMenus->GetValue() );
|
||||
commonSettings->Write( ENBL_ZOOM_NO_CENTER_KEY, !m_ZoomCenterOpt->GetValue() );
|
||||
commonSettings->Write( ENBL_MOUSEWHEEL_PAN_KEY, m_MousewheelPANOpt->GetValue() );
|
||||
@@ -131,21 +172,42 @@ bool PANEL_COMMON_SETTINGS::TransferDataFromWindow()
|
||||
|
||||
void PANEL_COMMON_SETTINGS::OnScaleSlider( wxScrollEvent& aEvent )
|
||||
{
|
||||
m_scaleAuto->SetValue( false );
|
||||
m_iconScaleAuto->SetValue( false );
|
||||
}
|
||||
|
||||
|
||||
void PANEL_COMMON_SETTINGS::OnScaleAuto( wxCommandEvent& aEvent )
|
||||
void PANEL_COMMON_SETTINGS::OnIconScaleAuto( wxCommandEvent& aEvent )
|
||||
{
|
||||
if( m_scaleAuto->GetValue() )
|
||||
if( m_iconScaleAuto->GetValue() )
|
||||
{
|
||||
m_last_scale = m_scaleSlider->GetValue();
|
||||
m_scaleSlider->SetValue( 25 * KiIconScale( GetParent() ) );
|
||||
m_last_scale = m_iconScaleAuto->GetValue();
|
||||
m_iconScaleSlider->SetValue( 25 * KiIconScale( GetParent() ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
if( m_last_scale >= 0 )
|
||||
m_scaleSlider->SetValue( m_last_scale );
|
||||
m_iconScaleSlider->SetValue( m_last_scale );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void PANEL_COMMON_SETTINGS::OnCanvasScaleChange( wxCommandEvent& aEvent )
|
||||
{
|
||||
m_canvasScaleAuto->SetValue( false );
|
||||
}
|
||||
|
||||
|
||||
void PANEL_COMMON_SETTINGS::OnCanvasScaleAuto( wxCommandEvent& aEvent )
|
||||
{
|
||||
const bool automatic = m_canvasScaleAuto->GetValue();
|
||||
|
||||
if( automatic )
|
||||
{
|
||||
// set the scale to the auto value, without consulting the config
|
||||
DPI_SCALING dpi( nullptr, this );
|
||||
|
||||
// update the field (no events sent)
|
||||
m_canvasScaleCtrl->SetValue( dpi.GetScaleFactor() );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -40,10 +40,20 @@ protected:
|
||||
bool TransferDataToWindow() override;
|
||||
|
||||
void OnScaleSlider( wxScrollEvent& aEvent ) override;
|
||||
void OnScaleAuto( wxCommandEvent& aEvent ) override;
|
||||
void OnIconScaleAuto( wxCommandEvent& aEvent ) override;
|
||||
void OnTextEditorClick( wxCommandEvent& event ) override;
|
||||
void OnPDFViewerClick( wxCommandEvent& event ) override;
|
||||
void onUpdateUIPdfPath( wxUpdateUIEvent& event ) override;
|
||||
void onUpdateUIPdfPath( wxUpdateUIEvent& event ) override;
|
||||
|
||||
/**
|
||||
* Event fired when the canvas scale field is modified
|
||||
*/
|
||||
void OnCanvasScaleChange( wxCommandEvent& aEvent ) override;
|
||||
|
||||
/**
|
||||
* Event fired when the canvas auto-scale option is changed
|
||||
*/
|
||||
void OnCanvasScaleAuto( wxCommandEvent& aEvent ) override;
|
||||
|
||||
DIALOG_SHIM* m_dialog;
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// C++ code generated with wxFormBuilder (version Jan 5 2019)
|
||||
// C++ code generated with wxFormBuilder (version Nov 10 2018)
|
||||
// http://www.wxformbuilder.org/
|
||||
//
|
||||
// PLEASE DO *NOT* EDIT THIS FILE!
|
||||
@@ -136,25 +136,26 @@ PANEL_COMMON_SETTINGS_BASE::PANEL_COMMON_SETTINGS_BASE( wxWindow* parent, wxWind
|
||||
|
||||
m_staticTexticonscale = new wxStaticText( sbSizerIconsOpts->GetStaticBox(), wxID_ANY, _("Icon scale:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticTexticonscale->Wrap( -1 );
|
||||
fgSizer11->Add( m_staticTexticonscale, 0, wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 4 );
|
||||
fgSizer11->Add( m_staticTexticonscale, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 4 );
|
||||
|
||||
wxBoxSizer* bSizer4;
|
||||
bSizer4 = new wxBoxSizer( wxHORIZONTAL );
|
||||
m_iconScaleSlider = new STEPPED_SLIDER( sbSizerIconsOpts->GetStaticBox(), wxID_ANY, 50, 50, 275, wxDefaultPosition, wxDefaultSize, wxSL_HORIZONTAL|wxSL_LABELS );
|
||||
m_iconScaleSlider->SetMinSize( wxSize( 240,-1 ) );
|
||||
|
||||
m_scaleSlider = new STEPPED_SLIDER( sbSizerIconsOpts->GetStaticBox(), wxID_ANY, 50, 50, 275, wxDefaultPosition, wxDefaultSize, wxSL_HORIZONTAL|wxSL_LABELS );
|
||||
m_scaleSlider->SetMinSize( wxSize( 240,-1 ) );
|
||||
fgSizer11->Add( m_iconScaleSlider, 1, wxBOTTOM|wxEXPAND, 4 );
|
||||
|
||||
bSizer4->Add( m_scaleSlider, 1, wxBOTTOM|wxEXPAND, 4 );
|
||||
m_iconScaleAuto = new wxCheckBox( sbSizerIconsOpts->GetStaticBox(), wxID_ANY, _("Automatic"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
fgSizer11->Add( m_iconScaleAuto, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 25 );
|
||||
|
||||
m_staticTextPerCent = new wxStaticText( sbSizerIconsOpts->GetStaticBox(), wxID_ANY, _("%"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticTextPerCent->Wrap( -1 );
|
||||
bSizer4->Add( m_staticTextPerCent, 0, wxALIGN_CENTER_VERTICAL|wxALL, 2 );
|
||||
m_staticTextCanvasScale = new wxStaticText( sbSizerIconsOpts->GetStaticBox(), wxID_ANY, _("Canvas scale:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticTextCanvasScale->Wrap( -1 );
|
||||
fgSizer11->Add( m_staticTextCanvasScale, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
|
||||
|
||||
m_canvasScaleCtrl = new wxSpinCtrlDouble( sbSizerIconsOpts->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 0, 100, 0, 1 );
|
||||
m_canvasScaleCtrl->SetDigits( 0 );
|
||||
fgSizer11->Add( m_canvasScaleCtrl, 0, wxALL|wxEXPAND, 5 );
|
||||
|
||||
fgSizer11->Add( bSizer4, 1, wxEXPAND, 5 );
|
||||
|
||||
m_scaleAuto = new wxCheckBox( sbSizerIconsOpts->GetStaticBox(), wxID_ANY, _("Automatic"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
fgSizer11->Add( m_scaleAuto, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 25 );
|
||||
m_canvasScaleAuto = new wxCheckBox( sbSizerIconsOpts->GetStaticBox(), wxID_ANY, _("Automatic"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
fgSizer11->Add( m_canvasScaleAuto, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 25 );
|
||||
|
||||
|
||||
fgSizer11->Add( 0, 0, 0, wxEXPAND, 5 );
|
||||
@@ -202,16 +203,18 @@ PANEL_COMMON_SETTINGS_BASE::PANEL_COMMON_SETTINGS_BASE( wxWindow* parent, wxWind
|
||||
m_PDFViewerPath->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( PANEL_COMMON_SETTINGS_BASE::onUpdateUIPdfPath ), NULL, this );
|
||||
m_pdfViewerBtn->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_COMMON_SETTINGS_BASE::OnPDFViewerClick ), NULL, this );
|
||||
m_pdfViewerBtn->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( PANEL_COMMON_SETTINGS_BASE::onUpdateUIPdfPath ), NULL, this );
|
||||
m_scaleSlider->Connect( wxEVT_SCROLL_TOP, wxScrollEventHandler( PANEL_COMMON_SETTINGS_BASE::OnScaleSlider ), NULL, this );
|
||||
m_scaleSlider->Connect( wxEVT_SCROLL_BOTTOM, wxScrollEventHandler( PANEL_COMMON_SETTINGS_BASE::OnScaleSlider ), NULL, this );
|
||||
m_scaleSlider->Connect( wxEVT_SCROLL_LINEUP, wxScrollEventHandler( PANEL_COMMON_SETTINGS_BASE::OnScaleSlider ), NULL, this );
|
||||
m_scaleSlider->Connect( wxEVT_SCROLL_LINEDOWN, wxScrollEventHandler( PANEL_COMMON_SETTINGS_BASE::OnScaleSlider ), NULL, this );
|
||||
m_scaleSlider->Connect( wxEVT_SCROLL_PAGEUP, wxScrollEventHandler( PANEL_COMMON_SETTINGS_BASE::OnScaleSlider ), NULL, this );
|
||||
m_scaleSlider->Connect( wxEVT_SCROLL_PAGEDOWN, wxScrollEventHandler( PANEL_COMMON_SETTINGS_BASE::OnScaleSlider ), NULL, this );
|
||||
m_scaleSlider->Connect( wxEVT_SCROLL_THUMBTRACK, wxScrollEventHandler( PANEL_COMMON_SETTINGS_BASE::OnScaleSlider ), NULL, this );
|
||||
m_scaleSlider->Connect( wxEVT_SCROLL_THUMBRELEASE, wxScrollEventHandler( PANEL_COMMON_SETTINGS_BASE::OnScaleSlider ), NULL, this );
|
||||
m_scaleSlider->Connect( wxEVT_SCROLL_CHANGED, wxScrollEventHandler( PANEL_COMMON_SETTINGS_BASE::OnScaleSlider ), NULL, this );
|
||||
m_scaleAuto->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( PANEL_COMMON_SETTINGS_BASE::OnScaleAuto ), NULL, this );
|
||||
m_iconScaleSlider->Connect( wxEVT_SCROLL_TOP, wxScrollEventHandler( PANEL_COMMON_SETTINGS_BASE::OnScaleSlider ), NULL, this );
|
||||
m_iconScaleSlider->Connect( wxEVT_SCROLL_BOTTOM, wxScrollEventHandler( PANEL_COMMON_SETTINGS_BASE::OnScaleSlider ), NULL, this );
|
||||
m_iconScaleSlider->Connect( wxEVT_SCROLL_LINEUP, wxScrollEventHandler( PANEL_COMMON_SETTINGS_BASE::OnScaleSlider ), NULL, this );
|
||||
m_iconScaleSlider->Connect( wxEVT_SCROLL_LINEDOWN, wxScrollEventHandler( PANEL_COMMON_SETTINGS_BASE::OnScaleSlider ), NULL, this );
|
||||
m_iconScaleSlider->Connect( wxEVT_SCROLL_PAGEUP, wxScrollEventHandler( PANEL_COMMON_SETTINGS_BASE::OnScaleSlider ), NULL, this );
|
||||
m_iconScaleSlider->Connect( wxEVT_SCROLL_PAGEDOWN, wxScrollEventHandler( PANEL_COMMON_SETTINGS_BASE::OnScaleSlider ), NULL, this );
|
||||
m_iconScaleSlider->Connect( wxEVT_SCROLL_THUMBTRACK, wxScrollEventHandler( PANEL_COMMON_SETTINGS_BASE::OnScaleSlider ), NULL, this );
|
||||
m_iconScaleSlider->Connect( wxEVT_SCROLL_THUMBRELEASE, wxScrollEventHandler( PANEL_COMMON_SETTINGS_BASE::OnScaleSlider ), NULL, this );
|
||||
m_iconScaleSlider->Connect( wxEVT_SCROLL_CHANGED, wxScrollEventHandler( PANEL_COMMON_SETTINGS_BASE::OnScaleSlider ), NULL, this );
|
||||
m_iconScaleAuto->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( PANEL_COMMON_SETTINGS_BASE::OnIconScaleAuto ), NULL, this );
|
||||
m_canvasScaleCtrl->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PANEL_COMMON_SETTINGS_BASE::OnCanvasScaleChange ), NULL, this );
|
||||
m_canvasScaleAuto->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( PANEL_COMMON_SETTINGS_BASE::OnCanvasScaleAuto ), NULL, this );
|
||||
}
|
||||
|
||||
PANEL_COMMON_SETTINGS_BASE::~PANEL_COMMON_SETTINGS_BASE()
|
||||
@@ -221,15 +224,17 @@ PANEL_COMMON_SETTINGS_BASE::~PANEL_COMMON_SETTINGS_BASE()
|
||||
m_PDFViewerPath->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( PANEL_COMMON_SETTINGS_BASE::onUpdateUIPdfPath ), NULL, this );
|
||||
m_pdfViewerBtn->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_COMMON_SETTINGS_BASE::OnPDFViewerClick ), NULL, this );
|
||||
m_pdfViewerBtn->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( PANEL_COMMON_SETTINGS_BASE::onUpdateUIPdfPath ), NULL, this );
|
||||
m_scaleSlider->Disconnect( wxEVT_SCROLL_TOP, wxScrollEventHandler( PANEL_COMMON_SETTINGS_BASE::OnScaleSlider ), NULL, this );
|
||||
m_scaleSlider->Disconnect( wxEVT_SCROLL_BOTTOM, wxScrollEventHandler( PANEL_COMMON_SETTINGS_BASE::OnScaleSlider ), NULL, this );
|
||||
m_scaleSlider->Disconnect( wxEVT_SCROLL_LINEUP, wxScrollEventHandler( PANEL_COMMON_SETTINGS_BASE::OnScaleSlider ), NULL, this );
|
||||
m_scaleSlider->Disconnect( wxEVT_SCROLL_LINEDOWN, wxScrollEventHandler( PANEL_COMMON_SETTINGS_BASE::OnScaleSlider ), NULL, this );
|
||||
m_scaleSlider->Disconnect( wxEVT_SCROLL_PAGEUP, wxScrollEventHandler( PANEL_COMMON_SETTINGS_BASE::OnScaleSlider ), NULL, this );
|
||||
m_scaleSlider->Disconnect( wxEVT_SCROLL_PAGEDOWN, wxScrollEventHandler( PANEL_COMMON_SETTINGS_BASE::OnScaleSlider ), NULL, this );
|
||||
m_scaleSlider->Disconnect( wxEVT_SCROLL_THUMBTRACK, wxScrollEventHandler( PANEL_COMMON_SETTINGS_BASE::OnScaleSlider ), NULL, this );
|
||||
m_scaleSlider->Disconnect( wxEVT_SCROLL_THUMBRELEASE, wxScrollEventHandler( PANEL_COMMON_SETTINGS_BASE::OnScaleSlider ), NULL, this );
|
||||
m_scaleSlider->Disconnect( wxEVT_SCROLL_CHANGED, wxScrollEventHandler( PANEL_COMMON_SETTINGS_BASE::OnScaleSlider ), NULL, this );
|
||||
m_scaleAuto->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( PANEL_COMMON_SETTINGS_BASE::OnScaleAuto ), NULL, this );
|
||||
m_iconScaleSlider->Disconnect( wxEVT_SCROLL_TOP, wxScrollEventHandler( PANEL_COMMON_SETTINGS_BASE::OnScaleSlider ), NULL, this );
|
||||
m_iconScaleSlider->Disconnect( wxEVT_SCROLL_BOTTOM, wxScrollEventHandler( PANEL_COMMON_SETTINGS_BASE::OnScaleSlider ), NULL, this );
|
||||
m_iconScaleSlider->Disconnect( wxEVT_SCROLL_LINEUP, wxScrollEventHandler( PANEL_COMMON_SETTINGS_BASE::OnScaleSlider ), NULL, this );
|
||||
m_iconScaleSlider->Disconnect( wxEVT_SCROLL_LINEDOWN, wxScrollEventHandler( PANEL_COMMON_SETTINGS_BASE::OnScaleSlider ), NULL, this );
|
||||
m_iconScaleSlider->Disconnect( wxEVT_SCROLL_PAGEUP, wxScrollEventHandler( PANEL_COMMON_SETTINGS_BASE::OnScaleSlider ), NULL, this );
|
||||
m_iconScaleSlider->Disconnect( wxEVT_SCROLL_PAGEDOWN, wxScrollEventHandler( PANEL_COMMON_SETTINGS_BASE::OnScaleSlider ), NULL, this );
|
||||
m_iconScaleSlider->Disconnect( wxEVT_SCROLL_THUMBTRACK, wxScrollEventHandler( PANEL_COMMON_SETTINGS_BASE::OnScaleSlider ), NULL, this );
|
||||
m_iconScaleSlider->Disconnect( wxEVT_SCROLL_THUMBRELEASE, wxScrollEventHandler( PANEL_COMMON_SETTINGS_BASE::OnScaleSlider ), NULL, this );
|
||||
m_iconScaleSlider->Disconnect( wxEVT_SCROLL_CHANGED, wxScrollEventHandler( PANEL_COMMON_SETTINGS_BASE::OnScaleSlider ), NULL, this );
|
||||
m_iconScaleAuto->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( PANEL_COMMON_SETTINGS_BASE::OnIconScaleAuto ), NULL, this );
|
||||
m_canvasScaleCtrl->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PANEL_COMMON_SETTINGS_BASE::OnCanvasScaleChange ), NULL, this );
|
||||
m_canvasScaleAuto->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( PANEL_COMMON_SETTINGS_BASE::OnCanvasScaleAuto ), NULL, this );
|
||||
|
||||
}
|
||||
|
||||
@@ -1219,7 +1219,7 @@
|
||||
<property name="vgap">0</property>
|
||||
<object class="sizeritem" expanded="0">
|
||||
<property name="border">4</property>
|
||||
<property name="flag">wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL</property>
|
||||
<property name="flag">wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxStaticText" expanded="0">
|
||||
<property name="BottomDockable">1</property>
|
||||
@@ -1278,142 +1278,70 @@
|
||||
<property name="wrap">-1</property>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxEXPAND</property>
|
||||
<object class="sizeritem" expanded="0">
|
||||
<property name="border">4</property>
|
||||
<property name="flag">wxBOTTOM|wxEXPAND</property>
|
||||
<property name="proportion">1</property>
|
||||
<object class="wxBoxSizer" expanded="1">
|
||||
<property name="minimum_size"></property>
|
||||
<property name="name">bSizer4</property>
|
||||
<property name="orient">wxHORIZONTAL</property>
|
||||
<property name="permission">none</property>
|
||||
<object class="sizeritem" expanded="0">
|
||||
<property name="border">4</property>
|
||||
<property name="flag">wxBOTTOM|wxEXPAND</property>
|
||||
<property name="proportion">1</property>
|
||||
<object class="wxSlider" expanded="0">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
<property name="TopDockable">1</property>
|
||||
<property name="aui_layer"></property>
|
||||
<property name="aui_name"></property>
|
||||
<property name="aui_position"></property>
|
||||
<property name="aui_row"></property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg"></property>
|
||||
<property name="caption"></property>
|
||||
<property name="caption_visible">1</property>
|
||||
<property name="center_pane">0</property>
|
||||
<property name="close_button">1</property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
<property name="default_pane">0</property>
|
||||
<property name="dock">Dock</property>
|
||||
<property name="dock_fixed">0</property>
|
||||
<property name="docking">Left</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="floatable">1</property>
|
||||
<property name="font"></property>
|
||||
<property name="gripper">0</property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="maxValue">275</property>
|
||||
<property name="max_size"></property>
|
||||
<property name="maximize_button">0</property>
|
||||
<property name="maximum_size"></property>
|
||||
<property name="minValue">50</property>
|
||||
<property name="min_size"></property>
|
||||
<property name="minimize_button">0</property>
|
||||
<property name="minimum_size">240,-1</property>
|
||||
<property name="moveable">1</property>
|
||||
<property name="name">m_scaleSlider</property>
|
||||
<property name="pane_border">1</property>
|
||||
<property name="pane_position"></property>
|
||||
<property name="pane_size"></property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="pin_button">1</property>
|
||||
<property name="pos"></property>
|
||||
<property name="resize">Resizable</property>
|
||||
<property name="show">1</property>
|
||||
<property name="size"></property>
|
||||
<property name="style">wxSL_HORIZONTAL|wxSL_LABELS</property>
|
||||
<property name="subclass">STEPPED_SLIDER; widgets/stepped_slider.h; Not forward_declare</property>
|
||||
<property name="toolbar_pane">0</property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="validator_data_type"></property>
|
||||
<property name="validator_style">wxFILTER_NONE</property>
|
||||
<property name="validator_type">wxDefaultValidator</property>
|
||||
<property name="validator_variable"></property>
|
||||
<property name="value">50</property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<event name="OnScroll">OnScaleSlider</event>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="0">
|
||||
<property name="border">2</property>
|
||||
<property name="flag">wxALIGN_CENTER_VERTICAL|wxALL</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxStaticText" expanded="0">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
<property name="TopDockable">1</property>
|
||||
<property name="aui_layer"></property>
|
||||
<property name="aui_name"></property>
|
||||
<property name="aui_position"></property>
|
||||
<property name="aui_row"></property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg"></property>
|
||||
<property name="caption"></property>
|
||||
<property name="caption_visible">1</property>
|
||||
<property name="center_pane">0</property>
|
||||
<property name="close_button">1</property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
<property name="default_pane">0</property>
|
||||
<property name="dock">Dock</property>
|
||||
<property name="dock_fixed">0</property>
|
||||
<property name="docking">Left</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="floatable">1</property>
|
||||
<property name="font"></property>
|
||||
<property name="gripper">0</property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">%</property>
|
||||
<property name="markup">0</property>
|
||||
<property name="max_size"></property>
|
||||
<property name="maximize_button">0</property>
|
||||
<property name="maximum_size"></property>
|
||||
<property name="min_size"></property>
|
||||
<property name="minimize_button">0</property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="moveable">1</property>
|
||||
<property name="name">m_staticTextPerCent</property>
|
||||
<property name="pane_border">1</property>
|
||||
<property name="pane_position"></property>
|
||||
<property name="pane_size"></property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="pin_button">1</property>
|
||||
<property name="pos"></property>
|
||||
<property name="resize">Resizable</property>
|
||||
<property name="show">1</property>
|
||||
<property name="size"></property>
|
||||
<property name="style"></property>
|
||||
<property name="subclass">; forward_declare</property>
|
||||
<property name="toolbar_pane">0</property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<property name="wrap">-1</property>
|
||||
</object>
|
||||
</object>
|
||||
<object class="wxSlider" expanded="0">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
<property name="TopDockable">1</property>
|
||||
<property name="aui_layer"></property>
|
||||
<property name="aui_name"></property>
|
||||
<property name="aui_position"></property>
|
||||
<property name="aui_row"></property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg"></property>
|
||||
<property name="caption"></property>
|
||||
<property name="caption_visible">1</property>
|
||||
<property name="center_pane">0</property>
|
||||
<property name="close_button">1</property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
<property name="default_pane">0</property>
|
||||
<property name="dock">Dock</property>
|
||||
<property name="dock_fixed">0</property>
|
||||
<property name="docking">Left</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="floatable">1</property>
|
||||
<property name="font"></property>
|
||||
<property name="gripper">0</property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="maxValue">275</property>
|
||||
<property name="max_size"></property>
|
||||
<property name="maximize_button">0</property>
|
||||
<property name="maximum_size"></property>
|
||||
<property name="minValue">50</property>
|
||||
<property name="min_size"></property>
|
||||
<property name="minimize_button">0</property>
|
||||
<property name="minimum_size">240,-1</property>
|
||||
<property name="moveable">1</property>
|
||||
<property name="name">m_iconScaleSlider</property>
|
||||
<property name="pane_border">1</property>
|
||||
<property name="pane_position"></property>
|
||||
<property name="pane_size"></property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="pin_button">1</property>
|
||||
<property name="pos"></property>
|
||||
<property name="resize">Resizable</property>
|
||||
<property name="show">1</property>
|
||||
<property name="size"></property>
|
||||
<property name="style">wxSL_HORIZONTAL|wxSL_LABELS</property>
|
||||
<property name="subclass">STEPPED_SLIDER; widgets/stepped_slider.h; Not forward_declare</property>
|
||||
<property name="toolbar_pane">0</property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="validator_data_type"></property>
|
||||
<property name="validator_style">wxFILTER_NONE</property>
|
||||
<property name="validator_type">wxDefaultValidator</property>
|
||||
<property name="validator_variable"></property>
|
||||
<property name="value">50</property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<event name="OnScroll">OnScaleSlider</event>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="0">
|
||||
@@ -1457,7 +1385,7 @@
|
||||
<property name="minimize_button">0</property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="moveable">1</property>
|
||||
<property name="name">m_scaleAuto</property>
|
||||
<property name="name">m_iconScaleAuto</property>
|
||||
<property name="pane_border">1</property>
|
||||
<property name="pane_position"></property>
|
||||
<property name="pane_size"></property>
|
||||
@@ -1478,7 +1406,198 @@
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<event name="OnCheckBox">OnScaleAuto</event>
|
||||
<event name="OnCheckBox">OnIconScaleAuto</event>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxALIGN_CENTER_VERTICAL|wxALL</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxStaticText" expanded="1">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
<property name="TopDockable">1</property>
|
||||
<property name="aui_layer"></property>
|
||||
<property name="aui_name"></property>
|
||||
<property name="aui_position"></property>
|
||||
<property name="aui_row"></property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg"></property>
|
||||
<property name="caption"></property>
|
||||
<property name="caption_visible">1</property>
|
||||
<property name="center_pane">0</property>
|
||||
<property name="close_button">1</property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
<property name="default_pane">0</property>
|
||||
<property name="dock">Dock</property>
|
||||
<property name="dock_fixed">0</property>
|
||||
<property name="docking">Left</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="floatable">1</property>
|
||||
<property name="font"></property>
|
||||
<property name="gripper">0</property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">Canvas scale:</property>
|
||||
<property name="markup">0</property>
|
||||
<property name="max_size"></property>
|
||||
<property name="maximize_button">0</property>
|
||||
<property name="maximum_size"></property>
|
||||
<property name="min_size"></property>
|
||||
<property name="minimize_button">0</property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="moveable">1</property>
|
||||
<property name="name">m_staticTextCanvasScale</property>
|
||||
<property name="pane_border">1</property>
|
||||
<property name="pane_position"></property>
|
||||
<property name="pane_size"></property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="pin_button">1</property>
|
||||
<property name="pos"></property>
|
||||
<property name="resize">Resizable</property>
|
||||
<property name="show">1</property>
|
||||
<property name="size"></property>
|
||||
<property name="style"></property>
|
||||
<property name="subclass">; forward_declare</property>
|
||||
<property name="toolbar_pane">0</property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<property name="wrap">-1</property>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxALL|wxEXPAND</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxSpinCtrlDouble" expanded="1">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
<property name="TopDockable">1</property>
|
||||
<property name="aui_layer"></property>
|
||||
<property name="aui_name"></property>
|
||||
<property name="aui_position"></property>
|
||||
<property name="aui_row"></property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg"></property>
|
||||
<property name="caption"></property>
|
||||
<property name="caption_visible">1</property>
|
||||
<property name="center_pane">0</property>
|
||||
<property name="close_button">1</property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
<property name="default_pane">0</property>
|
||||
<property name="digits">0</property>
|
||||
<property name="dock">Dock</property>
|
||||
<property name="dock_fixed">0</property>
|
||||
<property name="docking">Left</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="floatable">1</property>
|
||||
<property name="font"></property>
|
||||
<property name="gripper">0</property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="inc">1</property>
|
||||
<property name="initial">0</property>
|
||||
<property name="max">100</property>
|
||||
<property name="max_size"></property>
|
||||
<property name="maximize_button">0</property>
|
||||
<property name="maximum_size"></property>
|
||||
<property name="min">0</property>
|
||||
<property name="min_size"></property>
|
||||
<property name="minimize_button">0</property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="moveable">1</property>
|
||||
<property name="name">m_canvasScaleCtrl</property>
|
||||
<property name="pane_border">1</property>
|
||||
<property name="pane_position"></property>
|
||||
<property name="pane_size"></property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="pin_button">1</property>
|
||||
<property name="pos"></property>
|
||||
<property name="resize">Resizable</property>
|
||||
<property name="show">1</property>
|
||||
<property name="size"></property>
|
||||
<property name="style">wxSP_ARROW_KEYS</property>
|
||||
<property name="subclass">; ; forward_declare</property>
|
||||
<property name="toolbar_pane">0</property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="value"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<event name="OnSpinCtrlText">OnCanvasScaleChange</event>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">25</property>
|
||||
<property name="flag">wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxCheckBox" expanded="1">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
<property name="TopDockable">1</property>
|
||||
<property name="aui_layer"></property>
|
||||
<property name="aui_name"></property>
|
||||
<property name="aui_position"></property>
|
||||
<property name="aui_row"></property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg"></property>
|
||||
<property name="caption"></property>
|
||||
<property name="caption_visible">1</property>
|
||||
<property name="center_pane">0</property>
|
||||
<property name="checked">0</property>
|
||||
<property name="close_button">1</property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
<property name="default_pane">0</property>
|
||||
<property name="dock">Dock</property>
|
||||
<property name="dock_fixed">0</property>
|
||||
<property name="docking">Left</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="floatable">1</property>
|
||||
<property name="font"></property>
|
||||
<property name="gripper">0</property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">Automatic</property>
|
||||
<property name="max_size"></property>
|
||||
<property name="maximize_button">0</property>
|
||||
<property name="maximum_size"></property>
|
||||
<property name="min_size"></property>
|
||||
<property name="minimize_button">0</property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="moveable">1</property>
|
||||
<property name="name">m_canvasScaleAuto</property>
|
||||
<property name="pane_border">1</property>
|
||||
<property name="pane_position"></property>
|
||||
<property name="pane_size"></property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="pin_button">1</property>
|
||||
<property name="pos"></property>
|
||||
<property name="resize">Resizable</property>
|
||||
<property name="show">1</property>
|
||||
<property name="size"></property>
|
||||
<property name="style"></property>
|
||||
<property name="subclass">; forward_declare</property>
|
||||
<property name="toolbar_pane">0</property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="validator_data_type"></property>
|
||||
<property name="validator_style">wxFILTER_NONE</property>
|
||||
<property name="validator_type">wxDefaultValidator</property>
|
||||
<property name="validator_variable"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<event name="OnCheckBox">OnCanvasScaleAuto</event>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="0">
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// C++ code generated with wxFormBuilder (version Jan 5 2019)
|
||||
// C++ code generated with wxFormBuilder (version Nov 10 2018)
|
||||
// http://www.wxformbuilder.org/
|
||||
//
|
||||
// PLEASE DO *NOT* EDIT THIS FILE!
|
||||
@@ -61,9 +61,11 @@ class PANEL_COMMON_SETTINGS_BASE : public wxPanel
|
||||
wxTextCtrl* m_PDFViewerPath;
|
||||
wxBitmapButton* m_pdfViewerBtn;
|
||||
wxStaticText* m_staticTexticonscale;
|
||||
STEPPED_SLIDER* m_scaleSlider;
|
||||
wxStaticText* m_staticTextPerCent;
|
||||
wxCheckBox* m_scaleAuto;
|
||||
STEPPED_SLIDER* m_iconScaleSlider;
|
||||
wxCheckBox* m_iconScaleAuto;
|
||||
wxStaticText* m_staticTextCanvasScale;
|
||||
wxSpinCtrlDouble* m_canvasScaleCtrl;
|
||||
wxCheckBox* m_canvasScaleAuto;
|
||||
wxCheckBox* m_checkBoxIconsInMenus;
|
||||
wxCheckBox* m_ZoomCenterOpt;
|
||||
wxCheckBox* m_MousewheelPANOpt;
|
||||
@@ -74,7 +76,9 @@ class PANEL_COMMON_SETTINGS_BASE : public wxPanel
|
||||
virtual void onUpdateUIPdfPath( wxUpdateUIEvent& event ) { event.Skip(); }
|
||||
virtual void OnPDFViewerClick( wxCommandEvent& event ) { event.Skip(); }
|
||||
virtual void OnScaleSlider( wxScrollEvent& event ) { event.Skip(); }
|
||||
virtual void OnScaleAuto( wxCommandEvent& event ) { event.Skip(); }
|
||||
virtual void OnIconScaleAuto( wxCommandEvent& event ) { event.Skip(); }
|
||||
virtual void OnCanvasScaleChange( wxCommandEvent& event ) { event.Skip(); }
|
||||
virtual void OnCanvasScaleAuto( wxCommandEvent& event ) { event.Skip(); }
|
||||
|
||||
|
||||
public:
|
||||
|
||||
@@ -0,0 +1,178 @@
|
||||
/*
|
||||
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||
*
|
||||
* Copyright (C) 2019 KiCad Developers, see CHANGELOG.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 <dpi_scaling.h>
|
||||
|
||||
#include <core/optional.h>
|
||||
|
||||
#include <env_vars.h>
|
||||
#include <pgm_base.h>
|
||||
|
||||
#include <wx/config.h>
|
||||
#include <wx/log.h>
|
||||
|
||||
|
||||
/**
|
||||
* Flag to enable trace for HiDPI scaling factors
|
||||
*
|
||||
* Use "KICAD_TRACE_HIGH_DPI" to enable.
|
||||
*
|
||||
* @ingroup trace_env_vars
|
||||
*/
|
||||
const wxChar* const traceHiDpi = wxT( "KICAD_TRACE_HIGH_DPI" );
|
||||
|
||||
|
||||
/**
|
||||
* Get a user-configured scale factor from KiCad config file
|
||||
*
|
||||
* @return the scale factor, if set
|
||||
*/
|
||||
static OPT<double> getKiCadConfiguredScale( const wxConfigBase& aConfig )
|
||||
{
|
||||
OPT<double> scale;
|
||||
double canvas_scale = 0.0;
|
||||
aConfig.Read( CANVAS_SCALE_KEY, &canvas_scale, 0.0 );
|
||||
|
||||
if( canvas_scale > 0.0 )
|
||||
{
|
||||
scale = canvas_scale;
|
||||
}
|
||||
|
||||
if( scale )
|
||||
{
|
||||
wxLogTrace( traceHiDpi, "Scale factor (configured): %f", *scale );
|
||||
}
|
||||
|
||||
return scale;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Get the toolkit scale factor from a user-set environment variable
|
||||
* (for example GDK_SCALE on GTK).
|
||||
*
|
||||
* @return the scale factor, if set
|
||||
*/
|
||||
static OPT<double> getEnviromentScale()
|
||||
{
|
||||
const wxPortId port_id = wxPlatformInfo::Get().GetPortId();
|
||||
OPT<double> scale;
|
||||
|
||||
if( port_id == wxPORT_GTK )
|
||||
{
|
||||
// Under GTK, the user can use GDK_SCALE to force the scaling
|
||||
scale = GetEnvVar<double>( "GDK_SCALE" );
|
||||
}
|
||||
|
||||
if( scale )
|
||||
{
|
||||
wxLogTrace( traceHiDpi, "Scale factor (environment): %f", *scale );
|
||||
}
|
||||
|
||||
return scale;
|
||||
}
|
||||
|
||||
|
||||
DPI_SCALING::DPI_SCALING( wxConfigBase* aConfig, const wxWindow* aWindow )
|
||||
: m_config( aConfig ), m_window( aWindow )
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
double DPI_SCALING::GetScaleFactor() const
|
||||
{
|
||||
OPT<double> val;
|
||||
|
||||
if( m_config )
|
||||
{
|
||||
val = getKiCadConfiguredScale( *m_config );
|
||||
}
|
||||
|
||||
if( !val )
|
||||
{
|
||||
val = getEnviromentScale();
|
||||
}
|
||||
|
||||
if( !val && m_window )
|
||||
{
|
||||
// Use the native WX reporting.
|
||||
// On Linux, this will not work until WX 3.2 and GTK >= 3.10
|
||||
// Otherwise it returns 1.0
|
||||
val = m_window->GetContentScaleFactor();
|
||||
wxLogTrace( traceHiDpi, "Scale factor (WX): %f", *val );
|
||||
}
|
||||
|
||||
if( !val )
|
||||
{
|
||||
// Nothing else we can do, give it a default value
|
||||
val = GetDefaultScaleFactor();
|
||||
wxLogTrace( traceHiDpi, "Scale factor (default): %f", *val );
|
||||
}
|
||||
|
||||
return *val;
|
||||
}
|
||||
|
||||
|
||||
bool DPI_SCALING::GetCanvasIsAutoScaled() const
|
||||
{
|
||||
if( m_config == nullptr )
|
||||
{
|
||||
// No configuration given, so has to be automatic scaling
|
||||
return true;
|
||||
}
|
||||
|
||||
const bool automatic = getKiCadConfiguredScale( *m_config ) == boost::none;
|
||||
wxLogTrace( traceHiDpi, "Scale is automatic: %d", automatic );
|
||||
return automatic;
|
||||
}
|
||||
|
||||
|
||||
void DPI_SCALING::SetDpiConfig( bool aAuto, double aValue )
|
||||
{
|
||||
wxCHECK_RET( m_config != nullptr, "Setting DPI config without a config store." );
|
||||
|
||||
const double value = aAuto ? 0.0 : aValue;
|
||||
|
||||
m_config->Write( CANVAS_SCALE_KEY, value );
|
||||
}
|
||||
|
||||
|
||||
double DPI_SCALING::GetMaxScaleFactor()
|
||||
{
|
||||
// displays with higher than 4.0 DPI are not really going to be useful
|
||||
// for KiCad (even an 8k display would be effectively only ~1080p at 4x)
|
||||
return 6.0;
|
||||
}
|
||||
|
||||
|
||||
double DPI_SCALING::GetMinScaleFactor()
|
||||
{
|
||||
// scales under 1.0 don't make sense from a HiDPI perspective
|
||||
return 1.0;
|
||||
}
|
||||
|
||||
double DPI_SCALING::GetDefaultScaleFactor()
|
||||
{
|
||||
// no scaling => 1.0
|
||||
return 1.0;
|
||||
}
|
||||
@@ -582,16 +582,14 @@ bool EDA_BASE_FRAME::IsWritable( const wxFileName& aFileName )
|
||||
}
|
||||
|
||||
|
||||
void EDA_BASE_FRAME::CheckForAutoSaveFile( const wxFileName& aFileName,
|
||||
const wxString& aBackupFileExtension )
|
||||
void EDA_BASE_FRAME::CheckForAutoSaveFile( const wxFileName& aFileName )
|
||||
{
|
||||
wxCHECK_RET( aFileName.IsOk(), wxT( "Invalid file name!" ) );
|
||||
wxCHECK_RET( !aBackupFileExtension.IsEmpty(), wxT( "Invalid backup file extension!" ) );
|
||||
|
||||
wxFileName autoSaveFileName = aFileName;
|
||||
|
||||
// Check for auto save file.
|
||||
autoSaveFileName.SetName( AUTOSAVE_PREFIX_FILENAME + aFileName.GetName() );
|
||||
autoSaveFileName.SetName( GetAutoSaveFilePrefix() + aFileName.GetName() );
|
||||
|
||||
wxLogTrace( traceAutoSave,
|
||||
wxT( "Checking for auto save file " ) + autoSaveFileName.GetFullPath() );
|
||||
@@ -615,18 +613,14 @@ void EDA_BASE_FRAME::CheckForAutoSaveFile( const wxFileName& aFileName,
|
||||
{
|
||||
// Get the backup file name.
|
||||
wxFileName backupFileName = aFileName;
|
||||
backupFileName.SetExt( aBackupFileExtension );
|
||||
backupFileName.SetExt( aFileName.GetExt() + GetBackupSuffix() );
|
||||
|
||||
// If an old backup file exists, delete it. If an old copy of the file exists, rename
|
||||
// it to the backup file name
|
||||
if( aFileName.FileExists() )
|
||||
{
|
||||
// Remove the old file backup file.
|
||||
if( backupFileName.FileExists() )
|
||||
wxRemoveFile( backupFileName.GetFullPath() );
|
||||
|
||||
// Rename the old file to the backup file name.
|
||||
if( !wxRenameFile( aFileName.GetFullPath(), backupFileName.GetFullPath() ) )
|
||||
if( !wxRenameFile( aFileName.GetFullPath(), backupFileName.GetFullPath(), true ) )
|
||||
{
|
||||
msg.Printf( _( "Could not create backup file \"%s\"" ),
|
||||
GetChars( backupFileName.GetFullPath() ) );
|
||||
|
||||
+12
-11
@@ -2,7 +2,7 @@
|
||||
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||
*
|
||||
* Copyright (C) 2014 Jean-Pierre Charras, jp.charras at wanadoo.fr
|
||||
* Copyright (C) 2014-2017 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
* Copyright (C) 2014-2019 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
|
||||
@@ -103,18 +103,19 @@ bool GetAssociatedDocument( wxWindow* aParent,
|
||||
wxT( "file:" )
|
||||
};
|
||||
|
||||
// Replace before resolving as we might have a URL in a variable
|
||||
docname = ResolveUriByEnvVars( aDocName );
|
||||
|
||||
for( unsigned ii = 0; ii < arrayDim(url_header); ii++ )
|
||||
{
|
||||
if( aDocName.First( url_header[ii] ) == 0 ) // looks like an internet url
|
||||
if( docname.First( url_header[ii] ) == 0 ) // looks like an internet url
|
||||
{
|
||||
wxURI uri( aDocName );
|
||||
wxURI uri( docname );
|
||||
wxLaunchDefaultBrowser( uri.BuildURI() );
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
docname = aDocName;
|
||||
|
||||
#ifdef __WINDOWS__
|
||||
docname.Replace( UNIX_STRING_DIR_SEP, WIN_STRING_DIR_SEP );
|
||||
#else
|
||||
@@ -123,17 +124,17 @@ bool GetAssociatedDocument( wxWindow* aParent,
|
||||
|
||||
|
||||
/* Compute the full file name */
|
||||
if( wxIsAbsolutePath( aDocName ) || aPaths == NULL)
|
||||
fullfilename = aDocName;
|
||||
if( wxIsAbsolutePath( docname ) || aPaths == NULL)
|
||||
fullfilename = docname;
|
||||
/* If the file exists, this is a trivial case: return the filename
|
||||
* "as this". the name can be an absolute path, or a relative path
|
||||
* like ./filename or ../<filename>
|
||||
*/
|
||||
else if( wxFileName::FileExists( aDocName ) )
|
||||
fullfilename = aDocName;
|
||||
else if( wxFileName::FileExists( docname ) )
|
||||
fullfilename = docname;
|
||||
else
|
||||
{
|
||||
fullfilename = aPaths->FindValidPath( aDocName );
|
||||
fullfilename = aPaths->FindValidPath( docname );
|
||||
}
|
||||
|
||||
wxString mask( wxT( "*" ) ), extension;
|
||||
@@ -160,7 +161,7 @@ bool GetAssociatedDocument( wxWindow* aParent,
|
||||
|
||||
if( !wxFileExists( fullfilename ) )
|
||||
{
|
||||
msg.Printf( _( "Doc File \"%s\" not found" ), GetChars( aDocName ) );
|
||||
msg.Printf( _( "Doc File \"%s\" not found" ), GetChars( docname ) );
|
||||
DisplayError( aParent, msg );
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -23,6 +23,8 @@
|
||||
|
||||
#include <common.h>
|
||||
|
||||
#include <wx/utils.h>
|
||||
|
||||
using STRING_MAP = std::map<wxString, wxString>;
|
||||
|
||||
/*
|
||||
@@ -102,4 +104,37 @@ wxString LookUpEnvVarHelp( const wxString& aEnvVar )
|
||||
initialiseEnvVarHelp( env_var_help_text );
|
||||
|
||||
return env_var_help_text[aEnvVar];
|
||||
}
|
||||
|
||||
|
||||
template<>
|
||||
OPT<double> GetEnvVar( const wxString& aEnvVarName )
|
||||
{
|
||||
OPT<double> opt_value;
|
||||
|
||||
wxString env;
|
||||
if( wxGetEnv( aEnvVarName, &env ) )
|
||||
{
|
||||
double value;
|
||||
if( env.ToDouble( &value ) )
|
||||
{
|
||||
opt_value = value;
|
||||
}
|
||||
}
|
||||
|
||||
return opt_value;
|
||||
}
|
||||
|
||||
template<>
|
||||
OPT<wxString> GetEnvVar( const wxString& aEnvVarName )
|
||||
{
|
||||
OPT<wxString> opt_value;
|
||||
|
||||
wxString env;
|
||||
if( wxGetEnv( aEnvVarName, &env ) )
|
||||
{
|
||||
opt_value = env;
|
||||
}
|
||||
|
||||
return opt_value;
|
||||
}
|
||||
@@ -245,6 +245,7 @@ void CAIRO_GAL_BASE::DrawCircle( const VECTOR2D& aCenterPoint, double aRadius )
|
||||
auto c = roundp( xform( aCenterPoint ) );
|
||||
auto r = ::roundp( xform( aRadius ) );
|
||||
|
||||
cairo_set_line_width( currentContext, std::min( 2.0 * r, lineWidthInPixels ) );
|
||||
cairo_new_sub_path( currentContext );
|
||||
cairo_arc( currentContext, c.x, c.y, r, 0.0, 2 * M_PI );
|
||||
cairo_close_path( currentContext );
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2018 CERN
|
||||
* Copyright (C) 2019 CERN
|
||||
* Author: Maciej Suminski <maciej.suminski@cern.ch>
|
||||
* Author: Tomasz Wlostowski <tomasz.wlostowski@cern.ch>
|
||||
*
|
||||
@@ -63,8 +63,14 @@ CAIRO_PRINT_CTX::CAIRO_PRINT_CTX( wxDC* aDC )
|
||||
#ifdef __WXGTK__
|
||||
m_ctx = static_cast<cairo_t*>( gctx->GetNativeContext() );
|
||||
m_surface = cairo_get_target( m_ctx );
|
||||
// Magic value: apparently for linux, all printers are 72 DPI
|
||||
m_dpi = 72.0;
|
||||
// On linux, cairo printers are 72 DPI by default. This is an ususable resolution for us.
|
||||
// A reasonable resolution is 600 DPI
|
||||
// so modify the default:
|
||||
#define DEFAULT_DPI 72.0
|
||||
#define KICAD_PRINTER_DPI 600.0
|
||||
// our device scale is DEFAULT_DPI / KICAD_PRINTER_DPI
|
||||
cairo_surface_set_device_scale( m_surface, DEFAULT_DPI/KICAD_PRINTER_DPI, DEFAULT_DPI/KICAD_PRINTER_DPI );
|
||||
m_dpi = KICAD_PRINTER_DPI;
|
||||
#endif /* __WXGTK__ */
|
||||
|
||||
#ifdef __WXMSW__
|
||||
@@ -122,6 +128,7 @@ CAIRO_PRINT_GAL::CAIRO_PRINT_GAL( GAL_DISPLAY_OPTIONS& aDisplayOptions,
|
||||
m_clearColor = COLOR4D( 1.0, 1.0, 1.0, 1.0 );
|
||||
m_hasNativeLandscapeRotation = false;
|
||||
resetContext();
|
||||
|
||||
SetScreenDPI( m_printCtx->GetNativeDPI() );
|
||||
}
|
||||
|
||||
|
||||
@@ -22,9 +22,12 @@
|
||||
*/
|
||||
|
||||
#include <gal/gal_display_options.h>
|
||||
|
||||
#include <wx/config.h>
|
||||
|
||||
#include <config_map.h>
|
||||
#include <dpi_scaling.h>
|
||||
#include <pgm_base.h>
|
||||
|
||||
using namespace KIGFX;
|
||||
|
||||
@@ -55,42 +58,76 @@ GAL_DISPLAY_OPTIONS::GAL_DISPLAY_OPTIONS()
|
||||
m_gridMinSpacing( 10.0 ),
|
||||
m_axesEnabled( false ),
|
||||
m_fullscreenCursor( false ),
|
||||
m_forceDisplayCursor( false )
|
||||
m_forceDisplayCursor( false ),
|
||||
m_scaleFactor( DPI_SCALING::GetDefaultScaleFactor() )
|
||||
{}
|
||||
|
||||
|
||||
void GAL_DISPLAY_OPTIONS::ReadConfig( wxConfigBase* aCfg, const wxString& aBaseName )
|
||||
void GAL_DISPLAY_OPTIONS::ReadAppConfig( wxConfigBase& aCfg, const wxString& aBaseName )
|
||||
{
|
||||
const wxString baseName = aBaseName + GAL_DISPLAY_OPTIONS_KEY;
|
||||
|
||||
long readLong; // Temp value buffer
|
||||
|
||||
aCfg->Read( aBaseName + GalGridStyleConfig, &readLong,
|
||||
static_cast<long>( KIGFX::GRID_STYLE::DOTS ) );
|
||||
aCfg.Read( baseName + GalGridStyleConfig, &readLong,
|
||||
static_cast<long>( KIGFX::GRID_STYLE::DOTS ) );
|
||||
m_gridStyle = UTIL::GetValFromConfig( gridStyleConfigVals, readLong );
|
||||
|
||||
aCfg->Read( aBaseName + GalGridLineWidthConfig, &m_gridLineWidth, 1.0 );
|
||||
aCfg->Read( aBaseName + GalGridMaxDensityConfig, &m_gridMinSpacing, 10 );
|
||||
aCfg->Read( aBaseName + GalGridAxesEnabledConfig, &m_axesEnabled, false );
|
||||
aCfg->Read( aBaseName + GalFullscreenCursorConfig, &m_fullscreenCursor, false );
|
||||
aCfg->Read( aBaseName + GalForceDisplayCursorConfig, &m_forceDisplayCursor, true );
|
||||
aCfg.Read( baseName + GalGridLineWidthConfig, &m_gridLineWidth, 1.0 );
|
||||
aCfg.Read( baseName + GalGridMaxDensityConfig, &m_gridMinSpacing, 10 );
|
||||
aCfg.Read( baseName + GalGridAxesEnabledConfig, &m_axesEnabled, false );
|
||||
aCfg.Read( baseName + GalFullscreenCursorConfig, &m_fullscreenCursor, false );
|
||||
aCfg.Read( baseName + GalForceDisplayCursorConfig, &m_forceDisplayCursor, true );
|
||||
|
||||
NotifyChanged();
|
||||
}
|
||||
|
||||
|
||||
void GAL_DISPLAY_OPTIONS::WriteConfig( wxConfigBase* aCfg, const wxString& aBaseName )
|
||||
void GAL_DISPLAY_OPTIONS::ReadCommonConfig( wxConfigBase& aCommonConfig, wxWindow* aWindow )
|
||||
{
|
||||
aCfg->Write( aBaseName + GalGridStyleConfig,
|
||||
int temp;
|
||||
aCommonConfig.Read(
|
||||
GAL_ANTIALIASING_MODE_KEY, &temp, (int) KIGFX::OPENGL_ANTIALIASING_MODE::NONE );
|
||||
gl_antialiasing_mode = (KIGFX::OPENGL_ANTIALIASING_MODE) temp;
|
||||
|
||||
aCommonConfig.Read(
|
||||
CAIRO_ANTIALIASING_MODE_KEY, &temp, (int) KIGFX::CAIRO_ANTIALIASING_MODE::NONE );
|
||||
cairo_antialiasing_mode = (KIGFX::CAIRO_ANTIALIASING_MODE) temp;
|
||||
|
||||
{
|
||||
const DPI_SCALING dpi{ &aCommonConfig, aWindow };
|
||||
m_scaleFactor = dpi.GetScaleFactor();
|
||||
}
|
||||
|
||||
NotifyChanged();
|
||||
}
|
||||
|
||||
|
||||
void GAL_DISPLAY_OPTIONS::ReadConfig( wxConfigBase& aCommonConfig, wxConfigBase& aAppConfig,
|
||||
const wxString& aBaseCfgName, wxWindow* aWindow )
|
||||
{
|
||||
ReadAppConfig( aAppConfig, aBaseCfgName );
|
||||
|
||||
ReadCommonConfig( aCommonConfig, aWindow );
|
||||
}
|
||||
|
||||
|
||||
void GAL_DISPLAY_OPTIONS::WriteConfig( wxConfigBase& aCfg, const wxString& aBaseName )
|
||||
{
|
||||
const wxString baseName = aBaseName + GAL_DISPLAY_OPTIONS_KEY;
|
||||
|
||||
aCfg.Write( baseName + GalGridStyleConfig,
|
||||
UTIL::GetConfigForVal( gridStyleConfigVals, m_gridStyle ) );
|
||||
|
||||
aCfg->Write( aBaseName + GalGridLineWidthConfig, m_gridLineWidth );
|
||||
aCfg->Write( aBaseName + GalGridMaxDensityConfig, m_gridMinSpacing );
|
||||
aCfg->Write( aBaseName + GalGridAxesEnabledConfig, m_axesEnabled );
|
||||
aCfg->Write( aBaseName + GalFullscreenCursorConfig, m_fullscreenCursor );
|
||||
aCfg->Write( aBaseName + GalForceDisplayCursorConfig, m_forceDisplayCursor );
|
||||
aCfg.Write( baseName + GalGridLineWidthConfig, m_gridLineWidth );
|
||||
aCfg.Write( baseName + GalGridMaxDensityConfig, m_gridMinSpacing );
|
||||
aCfg.Write( baseName + GalGridAxesEnabledConfig, m_axesEnabled );
|
||||
aCfg.Write( baseName + GalFullscreenCursorConfig, m_fullscreenCursor );
|
||||
aCfg.Write( baseName + GalForceDisplayCursorConfig, m_forceDisplayCursor );
|
||||
}
|
||||
|
||||
|
||||
void GAL_DISPLAY_OPTIONS::NotifyChanged()
|
||||
{
|
||||
Notify( &GAL_DISPLAY_OPTIONS_OBSERVER::OnGalDisplayOptionsChanged, *this );
|
||||
}
|
||||
}
|
||||
@@ -26,16 +26,14 @@
|
||||
|
||||
#include <gal/hidpi_gl_canvas.h>
|
||||
|
||||
#include <dpi_scaling.h>
|
||||
|
||||
HIDPI_GL_CANVAS::HIDPI_GL_CANVAS( wxWindow *parent,
|
||||
wxWindowID id,
|
||||
const int *attribList,
|
||||
const wxPoint& pos,
|
||||
const wxSize& size,
|
||||
long style,
|
||||
const wxString& name,
|
||||
const wxPalette& palette ) :
|
||||
wxGLCanvas( parent, id, attribList, pos, size, style, name, palette )
|
||||
|
||||
HIDPI_GL_CANVAS::HIDPI_GL_CANVAS( wxWindow* parent, wxWindowID id, const int* attribList,
|
||||
const wxPoint& pos, const wxSize& size, long style, const wxString& name,
|
||||
const wxPalette& palette )
|
||||
: wxGLCanvas( parent, id, attribList, pos, size, style, name, palette ),
|
||||
m_scale_factor( DPI_SCALING::GetDefaultScaleFactor() )
|
||||
{
|
||||
#ifdef RETINA_OPENGL_PATCH
|
||||
SetViewWantsBestResolution( true );
|
||||
@@ -47,15 +45,14 @@ wxSize HIDPI_GL_CANVAS::GetNativePixelSize() const
|
||||
{
|
||||
wxSize size = wxGLCanvas::GetClientSize();
|
||||
|
||||
#ifdef RETINA_OPENGL_PATCH
|
||||
const float scaleFactor = GetBackingScaleFactor();
|
||||
size.x *= scaleFactor;
|
||||
size.y *= scaleFactor;
|
||||
#endif
|
||||
|
||||
return size;
|
||||
}
|
||||
|
||||
|
||||
float HIDPI_GL_CANVAS::GetBackingScaleFactor() const
|
||||
{
|
||||
#ifdef RETINA_OPENGL_PATCH
|
||||
@@ -63,6 +60,20 @@ float HIDPI_GL_CANVAS::GetBackingScaleFactor() const
|
||||
// => clean up when it officially has arrived in wxWidgets
|
||||
return static_cast< wxGLCanvas* >( const_cast< HIDPI_GL_CANVAS* >( this ))->GetBackingScaleFactor();
|
||||
#else
|
||||
return 1.0f;
|
||||
|
||||
// Return the cached value (which originally was set from config or automatically)
|
||||
return m_scale_factor;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
void HIDPI_GL_CANVAS::SetScaleFactor( double aNewScaleFactor )
|
||||
{
|
||||
m_scale_factor = aNewScaleFactor;
|
||||
}
|
||||
|
||||
|
||||
double HIDPI_GL_CANVAS::GetScaleFactor() const
|
||||
{
|
||||
return m_scale_factor;
|
||||
}
|
||||
@@ -333,12 +333,11 @@ int isPixelInSegment( vec2 aCoord )
|
||||
|
||||
void strokedCircle( vec2 aCoord, float aRadius, float aWidth )
|
||||
{
|
||||
float outerRadius = max( aRadius + ( aWidth / 2 ), 0.0 );
|
||||
float innerRadius = max( aRadius - ( aWidth / 2 ), 0.0 );
|
||||
float relWidth = innerRadius / outerRadius;
|
||||
float outerRadius = max( aRadius, 0.0 );
|
||||
float innerRadius = max( aRadius - aWidth, 0.0 );
|
||||
|
||||
if( ( dot( aCoord, aCoord ) < 1.0 ) &&
|
||||
( dot( aCoord, aCoord ) > relWidth * relWidth ) )
|
||||
( dot( aCoord, aCoord ) * ( outerRadius * outerRadius ) > innerRadius * innerRadius ) )
|
||||
gl_FragColor = gl_Color;
|
||||
else
|
||||
discard;
|
||||
|
||||
@@ -336,6 +336,12 @@ bool OPENGL_GAL::updatedGalDisplayOptions( const GAL_DISPLAY_OPTIONS& aOptions )
|
||||
refresh = true;
|
||||
}
|
||||
|
||||
if( options.m_scaleFactor != GetScaleFactor() )
|
||||
{
|
||||
SetScaleFactor( options.m_scaleFactor );
|
||||
refresh = true;
|
||||
}
|
||||
|
||||
if( super::updatedGalDisplayOptions( aOptions ) || refresh )
|
||||
{
|
||||
Refresh();
|
||||
@@ -1224,7 +1230,8 @@ void OPENGL_GAL::DrawGrid()
|
||||
nonCachedManager->EnableDepthTest( false );
|
||||
|
||||
// sub-pixel lines all render the same
|
||||
float minorLineWidth = std::fmax( 1.0f, gridLineWidth ) * getWorldPixelSize();
|
||||
float minorLineWidth =
|
||||
std::fmax( 1.0f, gridLineWidth ) * getWorldPixelSize() / GetBackingScaleFactor();
|
||||
float majorLineWidth = minorLineWidth * 2.0f;
|
||||
|
||||
// Draw the axis and grid
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||
*
|
||||
* Copyright (C) 2018 Jean-Pierre Charras, jp.charras at wanadoo.fr
|
||||
* Copyright (C) 1992-2018 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
* Copyright (C) 1992-2019 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
|
||||
@@ -30,6 +30,9 @@
|
||||
#include <eda_rect.h>
|
||||
#include <geometry/geometry_utils.h>
|
||||
|
||||
// To approximate a circle by segments, a minimal seg count is mandatory
|
||||
#define MIN_SEGCOUNT_FOR_CIRCLE 6
|
||||
|
||||
int GetArcToSegmentCount( int aRadius, int aErrorMax, double aArcAngleDegree )
|
||||
{
|
||||
// calculate the number of segments to approximate a circle by segments
|
||||
@@ -38,11 +41,15 @@ int GetArcToSegmentCount( int aRadius, int aErrorMax, double aArcAngleDegree )
|
||||
// error relative to the radius value:
|
||||
double rel_error = (double)aErrorMax / aRadius;
|
||||
// minimal arc increment in degrees:
|
||||
double step = 180 / M_PI * acos( 1.0 - rel_error ) * 2;
|
||||
// the minimal seg count for a arc
|
||||
int segCount = round_nearest( fabs( aArcAngleDegree ) / step );
|
||||
double arc_increment = 180 / M_PI * acos( 1.0 - rel_error ) * 2;
|
||||
|
||||
// Ensure at least one segment is used
|
||||
// Ensure a minimal arc increment reasonable value for a circle
|
||||
// (360.0 degrees). For very small radius values, this is mandatory.
|
||||
arc_increment = std::min( 360.0/MIN_SEGCOUNT_FOR_CIRCLE, arc_increment );
|
||||
|
||||
int segCount = round_nearest( fabs( aArcAngleDegree ) / arc_increment );
|
||||
|
||||
// Ensure at least one segment is used (can happen for small arcs)
|
||||
return std::max( segCount, 1 );
|
||||
}
|
||||
|
||||
@@ -53,13 +60,13 @@ double GetCircletoPolyCorrectionFactor( int aSegCountforCircle )
|
||||
* due to the segment approx.
|
||||
* For a circle the min radius is radius * cos( 2PI / aSegCountforCircle / 2)
|
||||
* this is the distance between the center and the middle of the segment.
|
||||
* therfore, to move the middle of the segment to the circle (distance = radius)
|
||||
* therefore, to move the middle of the segment to the circle (distance = radius)
|
||||
* the correctionFactor is 1 /cos( PI/aSegCountforCircle )
|
||||
*/
|
||||
if( aSegCountforCircle < 6 )
|
||||
aSegCountforCircle = 6;
|
||||
if( 1 || aSegCountforCircle > 64 )
|
||||
return 1.0 / cos( M_PI / aSegCountforCircle );
|
||||
if( aSegCountforCircle < MIN_SEGCOUNT_FOR_CIRCLE )
|
||||
aSegCountforCircle = MIN_SEGCOUNT_FOR_CIRCLE;
|
||||
|
||||
return 1.0 / cos( M_PI / aSegCountforCircle );
|
||||
}
|
||||
|
||||
|
||||
@@ -70,16 +77,19 @@ double GetCircletoPolyCorrectionFactor( int aSegCountforCircle )
|
||||
inline int clipOutCode( const EDA_RECT *aClipBox, int x, int y )
|
||||
{
|
||||
int code;
|
||||
|
||||
if( y < aClipBox->GetY() )
|
||||
code = 2;
|
||||
else if( y > aClipBox->GetBottom() )
|
||||
code = 1;
|
||||
else
|
||||
code = 0;
|
||||
|
||||
if( x < aClipBox->GetX() )
|
||||
code |= 4;
|
||||
else if( x > aClipBox->GetRight() )
|
||||
code |= 8;
|
||||
|
||||
return code;
|
||||
}
|
||||
|
||||
@@ -98,6 +108,7 @@ bool ClipLine( const EDA_RECT *aClipBox, int &x1, int &y1, int &x2, int &y2 )
|
||||
|
||||
// Choose a side to clip
|
||||
int thisoutcode, x, y;
|
||||
|
||||
if( outcode1 )
|
||||
thisoutcode = outcode1;
|
||||
else
|
||||
|
||||
@@ -256,7 +256,11 @@ const SHAPE_LINE_CHAIN SHAPE_ARC::ConvertToPolyline( double aAccuracy ) const
|
||||
|
||||
for( int i = 0; i <= n ; i++ )
|
||||
{
|
||||
double a = sa + m_centralAngle * (double) i / (double) n;
|
||||
double a = sa;
|
||||
|
||||
if( n != 0 )
|
||||
sa += m_centralAngle * (double) i / (double) n;
|
||||
|
||||
double x = c.x + r * cos( a * M_PI / 180.0 );
|
||||
double y = c.y + r * sin( a * M_PI / 180.0 );
|
||||
|
||||
|
||||
@@ -43,6 +43,12 @@ EDA_UNITS_T KIWAY_HOLDER::GetUserUnits() const
|
||||
}
|
||||
|
||||
|
||||
TOOL_MANAGER* KIWAY_HOLDER::GetToolManager() const
|
||||
{
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
||||
// this is not speed critical, hide it out of line.
|
||||
void KIWAY_HOLDER::SetKiway( wxWindow* aDest, KIWAY* aKiway )
|
||||
{
|
||||
|
||||
@@ -294,14 +294,7 @@ void EDA_DRAW_FRAME::CommonSettingsChanged()
|
||||
settings->Read( ENBL_AUTO_PAN_KEY, &option );
|
||||
m_canvas->SetEnableAutoPan( option );
|
||||
|
||||
int tmp;
|
||||
settings->Read( GAL_ANTIALIASING_MODE_KEY, &tmp, (int) KIGFX::OPENGL_ANTIALIASING_MODE::NONE );
|
||||
m_galDisplayOptions.gl_antialiasing_mode = (KIGFX::OPENGL_ANTIALIASING_MODE) tmp;
|
||||
|
||||
settings->Read( CAIRO_ANTIALIASING_MODE_KEY, &tmp, (int) KIGFX::CAIRO_ANTIALIASING_MODE::NONE );
|
||||
m_galDisplayOptions.cairo_antialiasing_mode = (KIGFX::CAIRO_ANTIALIASING_MODE) tmp;
|
||||
|
||||
m_galDisplayOptions.NotifyChanged();
|
||||
m_galDisplayOptions.ReadCommonConfig( *settings, this );
|
||||
}
|
||||
|
||||
|
||||
@@ -843,16 +836,7 @@ void EDA_DRAW_FRAME::LoadSettings( wxConfigBase* aCfg )
|
||||
|
||||
aCfg->Read( baseCfgName + FirstRunShownKeyword, &m_firstRunDialogSetting, 0L );
|
||||
|
||||
m_galDisplayOptions.ReadConfig( aCfg, baseCfgName + GAL_DISPLAY_OPTIONS_KEY );
|
||||
|
||||
int temp;
|
||||
cmnCfg->Read( GAL_ANTIALIASING_MODE_KEY, &temp, (int) KIGFX::OPENGL_ANTIALIASING_MODE::NONE );
|
||||
m_galDisplayOptions.gl_antialiasing_mode = (KIGFX::OPENGL_ANTIALIASING_MODE) temp;
|
||||
|
||||
cmnCfg->Read( CAIRO_ANTIALIASING_MODE_KEY, &temp, (int) KIGFX::CAIRO_ANTIALIASING_MODE::NONE );
|
||||
m_galDisplayOptions.cairo_antialiasing_mode = (KIGFX::CAIRO_ANTIALIASING_MODE) temp;
|
||||
|
||||
m_galDisplayOptions.NotifyChanged();
|
||||
m_galDisplayOptions.ReadConfig( *cmnCfg, *aCfg, baseCfgName, this );
|
||||
}
|
||||
|
||||
|
||||
@@ -870,7 +854,7 @@ void EDA_DRAW_FRAME::SaveSettings( wxConfigBase* aCfg )
|
||||
if( GetScreen() )
|
||||
aCfg->Write( baseCfgName + MaxUndoItemsEntry, long( GetScreen()->GetMaxUndoItems() ) );
|
||||
|
||||
m_galDisplayOptions.WriteConfig( aCfg, baseCfgName + GAL_DISPLAY_OPTIONS_KEY );
|
||||
m_galDisplayOptions.WriteConfig( *aCfg, baseCfgName );
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -296,14 +296,7 @@ void EDA_DRAW_FRAME::CommonSettingsChanged()
|
||||
settings->Read( ENBL_AUTO_PAN_KEY, &option );
|
||||
m_canvas->SetEnableAutoPan( option );
|
||||
|
||||
int tmp;
|
||||
settings->Read( GAL_ANTIALIASING_MODE_KEY, &tmp, (int) KIGFX::OPENGL_ANTIALIASING_MODE::NONE );
|
||||
m_galDisplayOptions.gl_antialiasing_mode = (KIGFX::OPENGL_ANTIALIASING_MODE) tmp;
|
||||
|
||||
settings->Read( CAIRO_ANTIALIASING_MODE_KEY, &tmp, (int) KIGFX::CAIRO_ANTIALIASING_MODE::NONE );
|
||||
m_galDisplayOptions.cairo_antialiasing_mode = (KIGFX::CAIRO_ANTIALIASING_MODE) tmp;
|
||||
|
||||
m_galDisplayOptions.NotifyChanged();
|
||||
m_galDisplayOptions.ReadCommonConfig( *settings, this );
|
||||
}
|
||||
|
||||
|
||||
@@ -862,16 +855,7 @@ void EDA_DRAW_FRAME::LoadSettings( wxConfigBase* aCfg )
|
||||
|
||||
aCfg->Read( baseCfgName + FirstRunShownKeyword, &m_firstRunDialogSetting, 0L );
|
||||
|
||||
m_galDisplayOptions.ReadConfig( aCfg, baseCfgName + GAL_DISPLAY_OPTIONS_KEY );
|
||||
|
||||
int temp;
|
||||
cmnCfg->Read( GAL_ANTIALIASING_MODE_KEY, &temp, (int) KIGFX::OPENGL_ANTIALIASING_MODE::NONE );
|
||||
m_galDisplayOptions.gl_antialiasing_mode = (KIGFX::OPENGL_ANTIALIASING_MODE) temp;
|
||||
|
||||
cmnCfg->Read( CAIRO_ANTIALIASING_MODE_KEY, &temp, (int) KIGFX::CAIRO_ANTIALIASING_MODE::NONE );
|
||||
m_galDisplayOptions.cairo_antialiasing_mode = (KIGFX::CAIRO_ANTIALIASING_MODE) temp;
|
||||
|
||||
m_galDisplayOptions.NotifyChanged();
|
||||
m_galDisplayOptions.ReadConfig( *cmnCfg, *aCfg, baseCfgName, this );
|
||||
}
|
||||
|
||||
|
||||
@@ -891,7 +875,7 @@ void EDA_DRAW_FRAME::SaveSettings( wxConfigBase* aCfg )
|
||||
if( GetScreen() )
|
||||
aCfg->Write( baseCfgName + MaxUndoItemsEntry, long( GetScreen()->GetMaxUndoItems() ) );
|
||||
|
||||
m_galDisplayOptions.WriteConfig( aCfg, baseCfgName + GAL_DISPLAY_OPTIONS_KEY );
|
||||
m_galDisplayOptions.WriteConfig( *aCfg, baseCfgName );
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -104,7 +104,17 @@ void NUMERIC_EVALUATOR::parseOk()
|
||||
|
||||
void NUMERIC_EVALUATOR::parseSetResult( double val )
|
||||
{
|
||||
snprintf( m_token.token, m_token.OutLen, "%.10g", val );
|
||||
if( std::isnan( val ) )
|
||||
{
|
||||
// Naively printing this with %g produces "nan" on some platforms
|
||||
// and "-nan(ind)" on others (e.g. MSVC). So force a "standard" string.
|
||||
snprintf( m_token.token, m_token.OutLen, "%s", "NaN" );
|
||||
}
|
||||
else
|
||||
{
|
||||
// Can be printed as a floating point
|
||||
snprintf( m_token.token, m_token.OutLen, "%.10g", val );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -612,6 +612,12 @@ void PGM_BASE::loadCommonSettings()
|
||||
{
|
||||
wxLogTrace( traceEnvVars,
|
||||
"Enumerating over entry %s, %ld.", GetChars( entry ), index );
|
||||
|
||||
// Do not store the env var PROJECT_VAR_NAME ("KIPRJMOD") definition if for some reason
|
||||
// it is found in config. (It is reserved and defined as project path)
|
||||
if( entry == PROJECT_VAR_NAME )
|
||||
continue;
|
||||
|
||||
entries.Add( entry );
|
||||
}
|
||||
|
||||
@@ -626,7 +632,9 @@ void PGM_BASE::loadCommonSettings()
|
||||
}
|
||||
|
||||
for( ENV_VAR_MAP_ITER it = m_local_env_vars.begin(); it != m_local_env_vars.end(); ++it )
|
||||
{
|
||||
SetLocalEnvVariable( it->first, it->second.GetValue() );
|
||||
}
|
||||
|
||||
m_common_settings->SetPath( oldPath );
|
||||
}
|
||||
|
||||
+2
-2
@@ -566,7 +566,7 @@ int SplitString( wxString strToSplit,
|
||||
|
||||
for( ii = (strToSplit.length() - 1); ii >= 0; ii-- )
|
||||
{
|
||||
if( isdigit( strToSplit[ii] ) )
|
||||
if( wxIsdigit( strToSplit[ii] ) )
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -585,7 +585,7 @@ int SplitString( wxString strToSplit,
|
||||
|
||||
for( ; ii >= 0; ii-- )
|
||||
{
|
||||
if( !isdigit( strToSplit[ii] ) && separators.Find( strToSplit[ii] ) < 0 )
|
||||
if( !wxIsdigit( strToSplit[ii] ) && separators.Find( strToSplit[ii] ) < 0 )
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
@@ -703,8 +703,8 @@ void TOOL_MANAGER::dispatchContextMenu( const TOOL_EVENT& aEvent )
|
||||
if( frame )
|
||||
frame->PopupMenu( menu.get() );
|
||||
|
||||
// Warp the cursor as long as the menu wasn't clicked out of
|
||||
if( menu->GetSelected() >= 0 )
|
||||
// Warp the cursor if a menu item was selected
|
||||
if( menu->GetSelected() >= 0 && m_warpMouseAfterContextMenu )
|
||||
m_viewControls->WarpCursor( m_menuCursor, true, false );
|
||||
// Otherwise notify the tool of a cancelled menu
|
||||
else
|
||||
@@ -714,6 +714,9 @@ void TOOL_MANAGER::dispatchContextMenu( const TOOL_EVENT& aEvent )
|
||||
dispatchInternal( evt );
|
||||
}
|
||||
|
||||
// Restore setting in case it was vetoed
|
||||
m_warpMouseAfterContextMenu = true;
|
||||
|
||||
// Notify the tools that menu has been closed
|
||||
TOOL_EVENT evt( TC_COMMAND, TA_CONTEXT_MENU_CLOSED );
|
||||
evt.SetParameter( m );
|
||||
|
||||
@@ -100,7 +100,7 @@ GAL_OPTIONS_PANEL::GAL_OPTIONS_PANEL( wxWindow* aParent, KIGFX::GAL_DISPLAY_OPTI
|
||||
|
||||
m_gridLineWidthSpinBtn = new wxSpinButton( sGridSettings->GetStaticBox(),
|
||||
wxID_ANY, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS );
|
||||
sGridSettingsGrid->Add( m_gridLineWidthSpinBtn, 0, wxEXPAND | wxALL, 0 );
|
||||
sGridSettingsGrid->Add( m_gridLineWidthSpinBtn, 0, wxALL | wxALIGN_CENTER_VERTICAL, 0 );
|
||||
|
||||
l_gridLineWidthUnits = new wxStaticText( sGridSettings->GetStaticBox(),
|
||||
wxID_ANY, _( "px" ) );
|
||||
@@ -117,7 +117,7 @@ GAL_OPTIONS_PANEL::GAL_OPTIONS_PANEL( wxWindow* aParent, KIGFX::GAL_DISPLAY_OPTI
|
||||
|
||||
m_gridMinSpacingSpinBtn = new wxSpinButton( sGridSettings->GetStaticBox(),
|
||||
wxID_ANY, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS );
|
||||
sGridSettingsGrid->Add( m_gridMinSpacingSpinBtn, 0, wxEXPAND | wxALL, 0 );
|
||||
sGridSettingsGrid->Add( m_gridMinSpacingSpinBtn, 0, wxALL | wxALIGN_CENTER_VERTICAL, 0 );
|
||||
|
||||
l_gridMinSpacingUnits = new wxStaticText( sGridSettings->GetStaticBox(),
|
||||
wxID_ANY, _( "px" ) );
|
||||
|
||||
@@ -279,10 +279,7 @@ protected:
|
||||
wxString filename = GetValue();
|
||||
|
||||
if( !filename.IsEmpty() && filename != wxT( "~" ) )
|
||||
{
|
||||
wxString uri = ResolveUriByEnvVars( GetValue() );
|
||||
GetAssociatedDocument( m_dlg, uri );
|
||||
}
|
||||
GetAssociatedDocument( m_dlg, GetValue() );
|
||||
}
|
||||
|
||||
DIALOG_SHIM* m_dlg;
|
||||
|
||||
@@ -699,9 +699,6 @@ void mpFXY::Plot( wxDC& dc, mpWindow& w )
|
||||
wxCoord x0, y0;
|
||||
bool first = true;
|
||||
|
||||
wxCoord minY, maxY;
|
||||
bool minFirst = true;
|
||||
|
||||
while( GetNextXY( x, y ) )
|
||||
{
|
||||
double px = m_scaleX->TransformToPlot( x );
|
||||
@@ -713,58 +710,23 @@ void mpFXY::Plot( wxDC& dc, mpWindow& w )
|
||||
if( first )
|
||||
{
|
||||
first = false;
|
||||
x0 = x1; y0 = y1;
|
||||
minY = y1;
|
||||
maxY = y1;
|
||||
x0 = x1;
|
||||
y0 = y1;
|
||||
continue;
|
||||
}
|
||||
|
||||
if( x0 == x1 ) // continue until a new X coordinate is reached
|
||||
{
|
||||
// determine min and max, so they can also be marked on the plot
|
||||
if( y1 > maxY )
|
||||
{
|
||||
maxY = y1;
|
||||
minFirst = true;
|
||||
}
|
||||
|
||||
if( y1 < minY )
|
||||
{
|
||||
minY = y1;
|
||||
minFirst = false;
|
||||
}
|
||||
continue;
|
||||
}
|
||||
|
||||
wxCoord firstY = minFirst ? minY : maxY;
|
||||
wxCoord secondY = minFirst ? maxY : minY;
|
||||
|
||||
if( ( x0 >= startPx ) && ( x0 <= endPx ) )
|
||||
{
|
||||
bool outDown = ( y0 > maxYpx ) && ( firstY > maxYpx );
|
||||
bool outUp = ( y0 < minYpx ) && ( firstY < minYpx );
|
||||
|
||||
if( !outUp && !outDown )
|
||||
{
|
||||
dc.DrawLine( x0, y0, x0, firstY );
|
||||
// UpdateViewBoundary(x1, firstY);
|
||||
}
|
||||
}
|
||||
|
||||
bool outDown = ( firstY > maxYpx ) && ( secondY > maxYpx );
|
||||
bool outUp = ( firstY < minYpx ) && ( secondY < minYpx );
|
||||
bool outDown = ( y0 > maxYpx ) && ( y1 > maxYpx );
|
||||
bool outUp = ( y0 < minYpx ) && ( y1 < minYpx );
|
||||
bool outLeft = ( x1 < startPx ) && ( x0 < startPx );
|
||||
bool outRight = ( x1 > endPx ) && ( x0 > endPx );
|
||||
if( !( outUp || outDown || outLeft || outRight ) )
|
||||
{
|
||||
dc.DrawLine( x0, firstY, x1, secondY );
|
||||
// UpdateViewBoundary(x1, secondY);
|
||||
}
|
||||
dc.DrawLine( x0, y0, x1, y1 );
|
||||
|
||||
x0 = x1;
|
||||
y0 = secondY;
|
||||
minY = y1;
|
||||
maxY = y1;
|
||||
y0 = y1;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -811,8 +811,12 @@ void CVPCB_MAINFRAME::CreateScreenCmp()
|
||||
// So we want to put it to front, second after our CVPCB_MAINFRAME.
|
||||
// We do this by a little dance of bringing it to front then the main
|
||||
// frame back.
|
||||
wxWindow* focus = FindFocus();
|
||||
|
||||
fpframe->Raise(); // Make sure that is visible.
|
||||
Raise(); // .. but still we want the focus.
|
||||
|
||||
focus->SetFocus();
|
||||
}
|
||||
|
||||
fpframe->InitDisplay();
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
*
|
||||
* Copyright (C) 2016 Jean-Pierre Charras, jp.charras at wanadoo.fr
|
||||
* Copyright (C) 2011 Wayne Stambaugh <stambaughw@verizon.net>
|
||||
* Copyright (C) 2007-2018 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
* Copyright (C) 2007-2019 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
|
||||
@@ -67,7 +67,14 @@ void CVPCB_MAINFRAME::ReCreateHToolbar()
|
||||
KiScaledBitmap( delete_association_xpm, this ),
|
||||
_( "Delete all footprint associations" ) );
|
||||
|
||||
// Add tools for footprint names filtering:
|
||||
KiScaledSeparator( m_mainToolBar, this );
|
||||
m_mainToolBar->AddSpacer( 15 );
|
||||
wxStaticText* text = new wxStaticText( m_mainToolBar, wxID_ANY,
|
||||
_( "Footprint Filters:" ) );
|
||||
text->SetFont( m_mainToolBar->GetFont().Bold() );
|
||||
m_mainToolBar->AddControl( text );
|
||||
|
||||
m_mainToolBar->AddTool( ID_CVPCB_FOOTPRINT_DISPLAY_FILTERED_LIST,
|
||||
KiScaledBitmap( module_filtered_list_xpm, this ),
|
||||
wxNullBitmap,
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
(sym_lib_table
|
||||
(lib (name pic_programmer_schlib)(type Legacy)(uri ${KIPRJMOD}/libs/pic_programmer_schlib.lib)(options "")(descr ""))
|
||||
(lib (name Logic_74xx)(type Legacy)(uri ${KICAD_SYMBOL_DIR}/Logic_74xx.lib)(options "")(descr ""))
|
||||
)
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
(sym_lib_table
|
||||
(lib (name schematic_libspice)(type Legacy)(uri ${KIPRJMOD}/schematic_libspice.lib)(options "")(descr ""))
|
||||
(lib (name power1)(type Legacy)(uri ${KICAD_SYMBOL_DIR}/power.lib)(options "")(descr ""))
|
||||
)
|
||||
|
||||
@@ -356,6 +356,9 @@ target_link_libraries( eeschema_kiface
|
||||
${wxWidgets_LIBRARIES}
|
||||
${GDI_PLUS_LIBRARIES}
|
||||
)
|
||||
target_include_directories( eeschema_kiface PUBLIC
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
)
|
||||
|
||||
if( KICAD_SPICE )
|
||||
target_link_libraries( eeschema_kiface
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||
*
|
||||
* Copyright (C) 2004 Jean-Pierre Charras, jean-pierre.charras@gipsa-lab.inpg.fr
|
||||
* Copyright (C) 2004-2016 KiCad Developers, see change_log.txt for contributors.
|
||||
* Copyright (C) 2004-2019 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
|
||||
@@ -208,8 +208,8 @@ void SCH_EDIT_FRAME::BeginSegment( int type )
|
||||
{
|
||||
SCH_LINE* prevSegment = segment->Back();
|
||||
|
||||
// Be aware prevSegment can be null when the horizontal and vertical lines only switch is off
|
||||
// when we create the first segment.
|
||||
// Be aware prevSegment can be null when the horizontal and vertical lines only switch
|
||||
// is off when we create the first segment.
|
||||
|
||||
if( !GetForceHVLines() )
|
||||
{
|
||||
@@ -618,7 +618,10 @@ bool SCH_EDIT_FRAME::SchematicCleanUp( bool aAppend )
|
||||
SCH_LINE* line = NULL;
|
||||
bool needed = false;
|
||||
|
||||
if( !secondLine->IsParallel( firstLine ) )
|
||||
if( !secondLine->IsParallel( firstLine )
|
||||
|| secondLine->GetLineStyle() != firstLine->GetLineStyle()
|
||||
|| secondLine->GetLineColor() != firstLine->GetLineColor()
|
||||
|| secondLine->GetLineSize() != firstLine->GetLineSize() )
|
||||
continue;
|
||||
|
||||
// Remove identical lines
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
*
|
||||
* Copyright (C) 2004-2015 Jean-Pierre Charras, jp.charras at wanadoo.fr
|
||||
* Copyright (C) 2008 Wayne Stambaugh <stambaughw@gmail.com>
|
||||
* Copyright (C) 2004-2018 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
* Copyright (C) 2004-2019 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
|
||||
@@ -152,10 +152,21 @@ const EDA_RECT LIB_ALIAS::GetBoundingBox() const
|
||||
// a LIB_ALIAS does not really have a bounding box.
|
||||
// return a 0 size rect.
|
||||
EDA_RECT dummy;
|
||||
|
||||
return dummy;
|
||||
};
|
||||
|
||||
|
||||
const BOX2I LIB_ALIAS::ViewBBox() const
|
||||
{
|
||||
// LIB_ALIAS may be displayed in preview windows, so ensure that it is always
|
||||
// selected for drawing.
|
||||
BOX2I bbox;
|
||||
bbox.SetMaximum();
|
||||
return bbox;
|
||||
}
|
||||
|
||||
|
||||
wxString LIB_ALIAS::GetSearchText()
|
||||
{
|
||||
// Matches are scored by offset from front of string, so inclusion of this spacer
|
||||
@@ -975,7 +986,7 @@ bool LIB_PART::HasConversion() const
|
||||
{
|
||||
for( const LIB_ITEM& item : m_drawings )
|
||||
{
|
||||
if( item.m_Convert > 1 )
|
||||
if( item.m_Convert > LIB_ITEM::LIB_CONVERT::BASE )
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
*
|
||||
* Copyright (C) 2004-2015 Jean-Pierre Charras, jp.charras at wanadoo.fr
|
||||
* Copyright (C) 2008 Wayne Stambaugh <stambaughw@gmail.com>
|
||||
* Copyright (C) 2004-2018 KiCad Developers, see change_log.txt for contributors.
|
||||
* Copyright (C) 2004-2019 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
|
||||
@@ -106,6 +106,16 @@ public:
|
||||
// to avoid useless messages in debug mode
|
||||
const EDA_RECT GetBoundingBox() const override;
|
||||
|
||||
/**
|
||||
* Returns a default bounding box for the alias. This will be set to the full
|
||||
* bounding size, ensuring that the alias is always drawn when it is used on screen.
|
||||
*
|
||||
* N.B. This is acceptable only because there is typically only a single LIB_ALIAS
|
||||
* element being drawn (e.g. in the symbol browser)
|
||||
* @return a maximum size view bounding box
|
||||
*/
|
||||
virtual const BOX2I ViewBBox() const override;
|
||||
|
||||
/**
|
||||
* Get the shared LIB_PART.
|
||||
*
|
||||
|
||||
@@ -91,6 +91,7 @@ DIALOG_EDIT_COMPONENT_IN_LIBRARY::DIALOG_EDIT_COMPONENT_IN_LIBRARY( LIB_EDIT_FRA
|
||||
// Show/hide columns according to the user's preference
|
||||
m_config->Read( LibEditFieldsShownColumnsKey, &m_shownColumns, wxT( "0 1 2 3 4 5 6 7" ) );
|
||||
m_grid->ShowHideColumns( m_shownColumns );
|
||||
|
||||
// Hide non-overridden rows in aliases grid
|
||||
m_aliasGrid->HideRow( REFERENCE );
|
||||
m_aliasGrid->HideRow( FOOTPRINT );
|
||||
@@ -99,7 +100,8 @@ DIALOG_EDIT_COMPONENT_IN_LIBRARY::DIALOG_EDIT_COMPONENT_IN_LIBRARY( LIB_EDIT_FRA
|
||||
attr->SetReadOnly();
|
||||
m_aliasGrid->SetColAttr( FDC_NAME, attr );
|
||||
m_aliasGrid->SetCellValue( VALUE, FDC_NAME, TEMPLATE_FIELDNAME::GetDefaultFieldName( VALUE ) );
|
||||
m_aliasGrid->SetCellValue( DATASHEET, FDC_NAME, TEMPLATE_FIELDNAME::GetDefaultFieldName( DATASHEET ) );
|
||||
m_aliasGrid->SetCellValue( DATASHEET, FDC_NAME,
|
||||
TEMPLATE_FIELDNAME::GetDefaultFieldName( DATASHEET ) );
|
||||
|
||||
attr = new wxGridCellAttr;
|
||||
attr->SetEditor( new GRID_CELL_URL_EDITOR( this ) );
|
||||
@@ -125,8 +127,12 @@ DIALOG_EDIT_COMPONENT_IN_LIBRARY::DIALOG_EDIT_COMPONENT_IN_LIBRARY( LIB_EDIT_FRA
|
||||
#endif
|
||||
|
||||
// wxFormBuilder doesn't include this event...
|
||||
m_grid->Connect( wxEVT_GRID_CELL_CHANGING, wxGridEventHandler( DIALOG_EDIT_COMPONENT_IN_LIBRARY::OnGridCellChanging ), NULL, this );
|
||||
m_aliasGrid->Connect( wxEVT_GRID_CELL_CHANGING, wxGridEventHandler( DIALOG_EDIT_COMPONENT_IN_LIBRARY::OnAliasGridCellChanging ), NULL, this );
|
||||
m_grid->Connect( wxEVT_GRID_CELL_CHANGING,
|
||||
wxGridEventHandler( DIALOG_EDIT_COMPONENT_IN_LIBRARY::OnGridCellChanging ),
|
||||
NULL, this );
|
||||
m_aliasGrid->Connect( wxEVT_GRID_CELL_CHANGING,
|
||||
wxGridEventHandler( DIALOG_EDIT_COMPONENT_IN_LIBRARY::OnAliasGridCellChanging ),
|
||||
NULL, this );
|
||||
|
||||
m_grid->GetParent()->Layout();
|
||||
m_aliasGrid->GetParent()->Layout();
|
||||
@@ -145,8 +151,12 @@ DIALOG_EDIT_COMPONENT_IN_LIBRARY::~DIALOG_EDIT_COMPONENT_IN_LIBRARY()
|
||||
// Prevents crash bug in wxGrid's d'tor
|
||||
m_grid->DestroyTable( m_fields );
|
||||
|
||||
m_grid->Disconnect( wxEVT_GRID_CELL_CHANGING, wxGridEventHandler( DIALOG_EDIT_COMPONENT_IN_LIBRARY::OnGridCellChanging ), NULL, this );
|
||||
m_aliasGrid->Disconnect( wxEVT_GRID_CELL_CHANGING, wxGridEventHandler( DIALOG_EDIT_COMPONENT_IN_LIBRARY::OnAliasGridCellChanging ), NULL, this );
|
||||
m_grid->Disconnect( wxEVT_GRID_CELL_CHANGING,
|
||||
wxGridEventHandler( DIALOG_EDIT_COMPONENT_IN_LIBRARY::OnGridCellChanging ),
|
||||
NULL, this );
|
||||
m_aliasGrid->Disconnect( wxEVT_GRID_CELL_CHANGING,
|
||||
wxGridEventHandler( DIALOG_EDIT_COMPONENT_IN_LIBRARY::OnAliasGridCellChanging ),
|
||||
NULL, this );
|
||||
|
||||
// Delete the GRID_TRICKS.
|
||||
m_grid->PopEventHandler( true );
|
||||
@@ -213,12 +223,10 @@ bool DIALOG_EDIT_COMPONENT_IN_LIBRARY::TransferDataToWindow()
|
||||
}
|
||||
|
||||
if( m_aliasListBox->GetCount() )
|
||||
{
|
||||
m_aliasListBox->SetSelection( 0 );
|
||||
|
||||
wxCommandEvent dummy;
|
||||
OnSelectAlias( dummy );
|
||||
}
|
||||
wxCommandEvent dummy;
|
||||
OnSelectAlias( dummy );
|
||||
|
||||
adjustAliasGridColumns( m_aliasGrid->GetClientRect().GetWidth() - 4 );
|
||||
|
||||
@@ -293,7 +301,7 @@ bool DIALOG_EDIT_COMPONENT_IN_LIBRARY::Validate()
|
||||
|
||||
bool DIALOG_EDIT_COMPONENT_IN_LIBRARY::TransferDataFromWindow()
|
||||
{
|
||||
if( !Validate() )
|
||||
if( !wxDialog::TransferDataFromWindow() )
|
||||
return false;
|
||||
|
||||
LIB_ALIAS* rootAlias = m_libEntry->GetAlias( m_libEntry->GetName() );
|
||||
@@ -480,7 +488,7 @@ void DIALOG_EDIT_COMPONENT_IN_LIBRARY::OnMoveDown( wxCommandEvent& event )
|
||||
|
||||
int i = m_grid->GetGridCursorRow();
|
||||
|
||||
if( i >= MANDATORY_FIELDS )
|
||||
if( i >= MANDATORY_FIELDS && i + 1 < m_fields->GetNumberRows() )
|
||||
{
|
||||
LIB_FIELD tmp = m_fields->at( (unsigned) i );
|
||||
m_fields->erase( m_fields->begin() + i, m_fields->begin() + i + 1 );
|
||||
@@ -615,21 +623,29 @@ void DIALOG_EDIT_COMPONENT_IN_LIBRARY::OnSelectAlias( wxCommandEvent& event )
|
||||
|
||||
m_aliasGrid->SetCellValue( VALUE, FDC_VALUE, alias->GetName() );
|
||||
m_aliasGrid->SetCellValue( DATASHEET, FDC_VALUE, alias->GetDocFileName() );
|
||||
m_aliasGrid->Enable( true );
|
||||
|
||||
// Use ChangeValue() so we don't generate events
|
||||
m_AliasNameCtrl->ChangeValue( alias->GetName() );
|
||||
m_AliasNameCtrl->Enable( true );
|
||||
m_AliasDescCtrl->ChangeValue( alias->GetDescription() );
|
||||
m_AliasDescCtrl->Enable( true );
|
||||
m_AliasKeywordsCtrl->ChangeValue( alias->GetKeyWords() );
|
||||
m_AliasKeywordsCtrl->Enable( true );
|
||||
}
|
||||
else
|
||||
{
|
||||
m_aliasGrid->SetCellValue( VALUE, FDC_VALUE, wxEmptyString );
|
||||
m_aliasGrid->SetCellValue( DATASHEET, FDC_VALUE, wxEmptyString );
|
||||
m_aliasGrid->Enable( false );
|
||||
|
||||
// Use ChangeValue() so we don't generate events
|
||||
m_AliasNameCtrl->ChangeValue( wxEmptyString );
|
||||
m_AliasNameCtrl->Enable( false );
|
||||
m_AliasDescCtrl->ChangeValue( wxEmptyString );
|
||||
m_AliasDescCtrl->Enable( false );
|
||||
m_AliasKeywordsCtrl->ChangeValue( wxEmptyString );
|
||||
m_AliasKeywordsCtrl->Enable( false );
|
||||
}
|
||||
|
||||
m_currentAlias = newIdx;
|
||||
@@ -641,6 +657,14 @@ bool DIALOG_EDIT_COMPONENT_IN_LIBRARY::checkAliasName( const wxString& aName )
|
||||
if( aName.IsEmpty() )
|
||||
return false;
|
||||
|
||||
if( m_SymbolNameCtrl->GetValue().CmpNoCase( aName ) == 0 )
|
||||
{
|
||||
wxString msg;
|
||||
msg.Printf( _( "Alias can not have same name as symbol." ) );
|
||||
DisplayInfoMessage( this, msg );
|
||||
return false;
|
||||
}
|
||||
|
||||
for( int i = 0; i < (int)m_aliasListBox->GetCount(); ++i )
|
||||
{
|
||||
if( i == m_aliasListBox->GetSelection() )
|
||||
@@ -664,7 +688,8 @@ bool DIALOG_EDIT_COMPONENT_IN_LIBRARY::checkAliasName( const wxString& aName )
|
||||
if( existing && existing->GetPart()->GetName() != m_libEntry->GetName() )
|
||||
{
|
||||
wxString msg;
|
||||
msg.Printf( _( "Symbol name \"%s\" already exists in library \"%s\"." ), aName, library );
|
||||
msg.Printf( _( "Symbol name \"%s\" already exists in library \"%s\"." ),
|
||||
aName, library );
|
||||
DisplayErrorMessage( this, msg );
|
||||
return false;
|
||||
}
|
||||
@@ -683,7 +708,7 @@ void DIALOG_EDIT_COMPONENT_IN_LIBRARY::OnAddAlias( wxCommandEvent& event )
|
||||
wxString aliasname = _( "untitled" );
|
||||
int suffix = 1;
|
||||
|
||||
while( m_libEntry->HasAlias( aliasname ) )
|
||||
while( m_aliasListBox->FindString( aliasname ) != wxNOT_FOUND )
|
||||
aliasname = wxString::Format( _( "untitled%i" ), suffix++ );
|
||||
|
||||
LIB_ALIAS* alias = new LIB_ALIAS( aliasname, m_libEntry );
|
||||
@@ -783,6 +808,7 @@ void DIALOG_EDIT_COMPONENT_IN_LIBRARY::OnDeleteFootprintFilter( wxCommandEvent&
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void DIALOG_EDIT_COMPONENT_IN_LIBRARY::OnEditFootprintFilter( wxCommandEvent& event )
|
||||
{
|
||||
int idx = m_FootprintFilterListBox->GetSelection();
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// C++ code generated with wxFormBuilder (version Dec 1 2018)
|
||||
// C++ code generated with wxFormBuilder (version Mar 20 2019)
|
||||
// http://www.wxformbuilder.org/
|
||||
//
|
||||
// PLEASE DO *NOT* EDIT THIS FILE!
|
||||
@@ -168,7 +168,7 @@ DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE( wx
|
||||
sbSizerSymbol->Add( m_AsConvertButt, 0, wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
m_OptionPower = new wxCheckBox( sbSizerSymbol->GetStaticBox(), wxID_ANY, _("Define as power symbol"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_OptionPower->SetToolTip( _("Check this option when the symbol is a power symbol") );
|
||||
m_OptionPower->SetToolTip( _("Setting this option makes the symbol in question appear in the\n\"add power port\" dialog. It will lock the value text to protect it\nfrom editing in Eeschema. The symbol will not be included in\nthe BOM and cannot be assigned a footprint.") );
|
||||
|
||||
sbSizerSymbol->Add( m_OptionPower, 0, wxALL, 5 );
|
||||
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
<property name="file">dialog_edit_component_in_lib_base</property>
|
||||
<property name="first_id">1000</property>
|
||||
<property name="help_provider">none</property>
|
||||
<property name="image_path_wrapper_function_name"></property>
|
||||
<property name="indent_with_spaces"></property>
|
||||
<property name="internationalize">1</property>
|
||||
<property name="name">DIALOG_EDIT_COMPONENT_IN_LIBRARY_FBP</property>
|
||||
@@ -25,6 +26,7 @@
|
||||
<property name="skip_php_events">1</property>
|
||||
<property name="skip_python_events">1</property>
|
||||
<property name="ui_table">UI</property>
|
||||
<property name="use_array_enum">0</property>
|
||||
<property name="use_enum">0</property>
|
||||
<property name="use_microsoft_bom">0</property>
|
||||
<object class="Dialog" expanded="1">
|
||||
@@ -1155,7 +1157,7 @@
|
||||
<property name="style"></property>
|
||||
<property name="subclass"></property>
|
||||
<property name="toolbar_pane">0</property>
|
||||
<property name="tooltip">Check this option when the symbol is a power symbol</property>
|
||||
<property name="tooltip">Setting this option makes the symbol in question appear in the
"add power port" dialog. It will lock the value text to protect it
from editing in Eeschema. The symbol will not be included in
the BOM and cannot be assigned a footprint.</property>
|
||||
<property name="validator_data_type"></property>
|
||||
<property name="validator_style">wxFILTER_NONE</property>
|
||||
<property name="validator_type">wxDefaultValidator</property>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// C++ code generated with wxFormBuilder (version Dec 1 2018)
|
||||
// C++ code generated with wxFormBuilder (version Mar 20 2019)
|
||||
// http://www.wxformbuilder.org/
|
||||
//
|
||||
// PLEASE DO *NOT* EDIT THIS FILE!
|
||||
|
||||
@@ -175,7 +175,7 @@ bool DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::TransferDataToWindow()
|
||||
|
||||
if( m_part != nullptr && m_part->HasConversion() )
|
||||
{
|
||||
if( m_cmp->GetConvert() > 1 )
|
||||
if( m_cmp->GetConvert() > LIB_ITEM::LIB_CONVERT::BASE )
|
||||
m_cbAlternateSymbol->SetValue( true );
|
||||
}
|
||||
else
|
||||
@@ -235,11 +235,43 @@ void DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::OnBrowseLibrary( wxCommandEvent& event
|
||||
|
||||
m_libraryNameTextCtrl->SetValue( sel.LibId.Format() );
|
||||
|
||||
// Update the value field for Power symbols
|
||||
LIB_PART* entry = GetParent()->GetLibPart( sel.LibId );
|
||||
|
||||
if( entry && entry->IsPower() )
|
||||
m_grid->SetCellValue( VALUE, FDC_VALUE, sel.LibId.GetLibItemName() );
|
||||
if( entry )
|
||||
{
|
||||
// Update the value field for Power symbols
|
||||
if( entry->IsPower() )
|
||||
m_grid->SetCellValue( VALUE, FDC_VALUE, sel.LibId.GetLibItemName() );
|
||||
|
||||
// Update the units control
|
||||
int unit = m_unitChoice->GetSelection();
|
||||
m_unitChoice->Clear();
|
||||
|
||||
if( entry->GetUnitCount() > 1 )
|
||||
{
|
||||
for( int ii = 1; ii <= entry->GetUnitCount(); ii++ )
|
||||
m_unitChoice->Append( LIB_PART::SubReference( ii, false ) );
|
||||
|
||||
if( unit < 0 || static_cast<unsigned>( unit )>= m_unitChoice->GetCount() )
|
||||
unit = 0;
|
||||
|
||||
m_unitChoice->SetSelection( unit );
|
||||
m_unitLabel->Enable( true );
|
||||
m_unitChoice->Enable( true );
|
||||
}
|
||||
else
|
||||
{
|
||||
m_unitChoice->SetSelection( -1 );
|
||||
m_unitLabel->Enable( false );
|
||||
m_unitChoice->Enable( false );
|
||||
}
|
||||
|
||||
// Update the deMorgan conversion controls
|
||||
bool conversion = m_cbAlternateSymbol->GetValue();
|
||||
|
||||
m_cbAlternateSymbol->SetValue( conversion && entry->HasConversion() );
|
||||
m_cbAlternateSymbol->Enable( entry->HasConversion() );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -373,17 +405,17 @@ bool DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::TransferDataFromWindow()
|
||||
m_cmp->SetLibId( id, Prj().SchSymbolLibTable(), Prj().SchLibs()->GetCacheLibrary() );
|
||||
|
||||
// For symbols with multiple shapes (De Morgan representation) Set the selected shape:
|
||||
if( m_cbAlternateSymbol->IsEnabled() )
|
||||
m_cmp->SetConvert( m_cbAlternateSymbol->GetValue() ? 2 : 1 );
|
||||
if( m_cbAlternateSymbol->IsEnabled() && m_cbAlternateSymbol->GetValue() )
|
||||
m_cmp->SetConvert( LIB_ITEM::LIB_CONVERT::DEMORGAN );
|
||||
else
|
||||
m_cmp->SetConvert( LIB_ITEM::LIB_CONVERT::BASE );
|
||||
|
||||
//Set the part selection in multiple part per package
|
||||
if( m_cmp->GetUnitCount() > 1 )
|
||||
{
|
||||
int unit_selection = m_unitChoice->GetCurrentSelection() + 1;
|
||||
|
||||
m_cmp->SetUnitSelection( &GetParent()->GetCurrentSheet(), unit_selection );
|
||||
m_cmp->SetUnit( unit_selection );
|
||||
}
|
||||
int unit_selection = m_unitChoice->IsEnabled()
|
||||
? m_unitChoice->GetSelection() + 1
|
||||
: 1;
|
||||
m_cmp->SetUnitSelection( &GetParent()->GetCurrentSheet(), unit_selection );
|
||||
m_cmp->SetUnit( unit_selection );
|
||||
|
||||
switch( m_rbOrientation->GetSelection() )
|
||||
{
|
||||
@@ -606,6 +638,9 @@ void DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::UpdateFieldsFromLibrary( wxCommandEvent
|
||||
components.push_back( © );
|
||||
InvokeDialogUpdateFields( GetParent(), components, false );
|
||||
|
||||
wxGridTableMessage clear( m_fields, wxGRIDTABLE_NOTIFY_ROWS_DELETED, 0, m_fields->size() );
|
||||
m_grid->ProcessTableMessage( clear );
|
||||
|
||||
// Copy fields from the component copy to the dialog buffer
|
||||
m_fields->clear();
|
||||
std::set<wxString> defined;
|
||||
@@ -629,7 +664,8 @@ void DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::UpdateFieldsFromLibrary( wxCommandEvent
|
||||
}
|
||||
}
|
||||
|
||||
m_grid->ForceRefresh();
|
||||
wxGridTableMessage refresh( m_fields, wxGRIDTABLE_NOTIFY_ROWS_APPENDED, m_fields->size() );
|
||||
m_grid->ProcessTableMessage( refresh );
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -255,9 +255,10 @@ void DIALOG_ERC::OnLeftClickMarkersList( wxHtmlLinkEvent& event )
|
||||
|
||||
if( sheetList[i] != m_parent->GetCurrentSheet() )
|
||||
{
|
||||
sheetList[i].LastScreen()->SetZoom( m_parent->GetScreen()->GetZoom() );
|
||||
m_parent->SetCurrentSheet( sheetList[i] );
|
||||
m_parent->GetCurrentSheet().UpdateAllScreenReferences();
|
||||
m_parent->DisplayCurrentSheet();
|
||||
sheetList[i].LastScreen()->SetZoom( m_parent->GetScreen()->GetZoom() );
|
||||
m_parent->RedrawScreen( m_parent->GetScrollCenterPosition(), false );
|
||||
}
|
||||
|
||||
m_lastMarkerFound = marker;
|
||||
|
||||
@@ -95,7 +95,6 @@ protected:
|
||||
else if (event.GetId() == MYID_SHOW_DATASHEET )
|
||||
{
|
||||
wxString datasheet_uri = m_grid->GetCellValue( m_grid->GetGridCursorRow(), DATASHEET );
|
||||
datasheet_uri = ResolveUriByEnvVars( datasheet_uri );
|
||||
GetAssociatedDocument( m_dlg, datasheet_uri );
|
||||
}
|
||||
else
|
||||
@@ -591,26 +590,29 @@ public:
|
||||
{
|
||||
for( unsigned i = 0; i < m_componentRefs.GetCount(); ++i )
|
||||
{
|
||||
SCH_COMPONENT* comp = m_componentRefs[ i ].GetComp();
|
||||
SCH_COMPONENT& comp = *m_componentRefs[i].GetComp();
|
||||
|
||||
m_frame->SetCurrentSheet( m_componentRefs[ i ].GetSheetPath() );
|
||||
m_frame->SaveCopyInUndoList( comp, UR_CHANGED, true );
|
||||
m_frame->SetCurrentSheet( m_componentRefs[i].GetSheetPath() );
|
||||
m_frame->SaveCopyInUndoList( &comp, UR_CHANGED, true );
|
||||
|
||||
std::map<wxString, wxString>& fieldStore = m_dataStore[ comp->GetTimeStamp() ];
|
||||
const std::map<wxString, wxString>& fieldStore = m_dataStore[comp.GetTimeStamp()];
|
||||
|
||||
for( std::pair<wxString, wxString> srcData : fieldStore )
|
||||
for( const std::pair<wxString, wxString> srcData : fieldStore )
|
||||
{
|
||||
wxString srcName = srcData.first;
|
||||
wxString srcValue = srcData.second;
|
||||
SCH_FIELD* destField = comp->FindField( srcName );
|
||||
const wxString& srcName = srcData.first;
|
||||
const wxString& srcValue = srcData.second;
|
||||
SCH_FIELD* destField = comp.FindField( srcName );
|
||||
|
||||
if( !destField && !srcValue.IsEmpty() )
|
||||
destField = comp->AddField( SCH_FIELD( wxPoint( 0, 0 ), -1, comp, srcName ) );
|
||||
{
|
||||
const auto compOrigin = comp.GetPosition();
|
||||
destField = comp.AddField( SCH_FIELD( compOrigin, -1, &comp, srcName ) );
|
||||
}
|
||||
|
||||
if( destField && !srcValue.IsEmpty() )
|
||||
destField->SetText( srcValue );
|
||||
else
|
||||
comp->RemoveField( srcName );
|
||||
comp.RemoveField( srcName );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -547,6 +547,9 @@ void DIALOG_LIB_EDIT_PIN_TABLE::OnDeleteRow( wxCommandEvent& event )
|
||||
if( !m_grid->CommitPendingChanges() )
|
||||
return;
|
||||
|
||||
if( m_pins.size() == 0 ) // empty table
|
||||
return;
|
||||
|
||||
int curRow = m_grid->GetGridCursorRow();
|
||||
|
||||
if( curRow < 0 )
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// C++ code generated with wxFormBuilder (version Jul 11 2018)
|
||||
// C++ code generated with wxFormBuilder (version Feb 10 2019)
|
||||
// http://www.wxformbuilder.org/
|
||||
//
|
||||
// PLEASE DO *NOT* EDIT THIS FILE!
|
||||
@@ -12,110 +12,116 @@
|
||||
DIALOG_RESCUE_EACH_BASE::DIALOG_RESCUE_EACH_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( wxSize( 400,-1 ), wxDefaultSize );
|
||||
|
||||
|
||||
wxBoxSizer* bSizerMain;
|
||||
bSizerMain = new wxBoxSizer( wxVERTICAL );
|
||||
|
||||
|
||||
wxBoxSizer* bSizer8;
|
||||
bSizer8 = new wxBoxSizer( wxVERTICAL );
|
||||
|
||||
m_htmlPrompt = new wxHtmlWindow( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxHW_SCROLLBAR_AUTO );
|
||||
m_htmlPrompt->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_BTNFACE ) );
|
||||
m_htmlPrompt->SetMinSize( wxSize( -1,50 ) );
|
||||
|
||||
bSizerMain->Add( m_htmlPrompt, 0, wxEXPAND|wxTOP|wxBOTTOM, 5 );
|
||||
|
||||
m_htmlPrompt->SetMinSize( wxSize( -1,80 ) );
|
||||
|
||||
bSizer8->Add( m_htmlPrompt, 1, wxEXPAND|wxTOP|wxBOTTOM, 5 );
|
||||
|
||||
m_titleSymbols = new wxStaticText( this, wxID_ANY, _("Symbols to update:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_titleSymbols->Wrap( -1 );
|
||||
m_titleSymbols->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) );
|
||||
|
||||
bSizerMain->Add( m_titleSymbols, 0, wxLEFT|wxRIGHT, 10 );
|
||||
|
||||
|
||||
bSizer8->Add( m_titleSymbols, 0, wxLEFT|wxRIGHT, 10 );
|
||||
|
||||
m_ListOfConflicts = new wxDataViewListCtrl( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
|
||||
bSizerMain->Add( m_ListOfConflicts, 3, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 10 );
|
||||
|
||||
bSizer8->Add( m_ListOfConflicts, 2, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 10 );
|
||||
|
||||
m_titleInstances = new wxStaticText( this, wxID_ANY, _("Instances of this symbol:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_titleInstances->Wrap( -1 );
|
||||
m_titleInstances->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) );
|
||||
|
||||
bSizerMain->Add( m_titleInstances, 0, wxRIGHT|wxLEFT, 10 );
|
||||
|
||||
|
||||
bSizer8->Add( m_titleInstances, 0, wxRIGHT|wxLEFT, 10 );
|
||||
|
||||
m_ListOfInstances = new wxDataViewListCtrl( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
|
||||
bSizerMain->Add( m_ListOfInstances, 2, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 10 );
|
||||
|
||||
bSizer8->Add( m_ListOfInstances, 2, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 10 );
|
||||
|
||||
|
||||
bSizerMain->Add( bSizer8, 2, wxEXPAND, 5 );
|
||||
|
||||
wxBoxSizer* bSizerPreviews;
|
||||
bSizerPreviews = new wxBoxSizer( wxHORIZONTAL );
|
||||
|
||||
|
||||
wxBoxSizer* bSizerLeftPreview;
|
||||
bSizerLeftPreview = new wxBoxSizer( wxVERTICAL );
|
||||
|
||||
|
||||
m_previewOldLabel = new wxStaticText( this, wxID_ANY, _("Cached Symbol:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_previewOldLabel->Wrap( -1 );
|
||||
m_previewOldLabel->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) );
|
||||
|
||||
|
||||
bSizerLeftPreview->Add( m_previewOldLabel, 0, 0, 5 );
|
||||
|
||||
|
||||
m_previewOldPanel = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
|
||||
m_SizerOldPanel = new wxBoxSizer( wxVERTICAL );
|
||||
|
||||
|
||||
|
||||
|
||||
m_previewOldPanel->SetSizer( m_SizerOldPanel );
|
||||
m_previewOldPanel->Layout();
|
||||
m_SizerOldPanel->Fit( m_previewOldPanel );
|
||||
bSizerLeftPreview->Add( m_previewOldPanel, 1, wxEXPAND | wxALL, 5 );
|
||||
|
||||
|
||||
|
||||
|
||||
bSizerPreviews->Add( bSizerLeftPreview, 1, wxEXPAND, 5 );
|
||||
|
||||
|
||||
wxBoxSizer* bSizerRightPreview;
|
||||
bSizerRightPreview = new wxBoxSizer( wxVERTICAL );
|
||||
|
||||
|
||||
m_previewNewLabel = new wxStaticText( this, wxID_ANY, _("Library Symbol:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_previewNewLabel->Wrap( -1 );
|
||||
m_previewNewLabel->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) );
|
||||
|
||||
|
||||
bSizerRightPreview->Add( m_previewNewLabel, 0, 0, 5 );
|
||||
|
||||
|
||||
m_previewNewPanel = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
|
||||
m_SizerNewPanel = new wxBoxSizer( wxVERTICAL );
|
||||
|
||||
|
||||
|
||||
|
||||
m_previewNewPanel->SetSizer( m_SizerNewPanel );
|
||||
m_previewNewPanel->Layout();
|
||||
m_SizerNewPanel->Fit( m_previewNewPanel );
|
||||
bSizerRightPreview->Add( m_previewNewPanel, 1, wxEXPAND | wxALL, 5 );
|
||||
|
||||
|
||||
|
||||
|
||||
bSizerPreviews->Add( bSizerRightPreview, 1, wxEXPAND, 5 );
|
||||
|
||||
|
||||
bSizerMain->Add( bSizerPreviews, 3, wxEXPAND|wxRIGHT|wxLEFT, 10 );
|
||||
|
||||
|
||||
|
||||
bSizerMain->Add( bSizerPreviews, 1, wxEXPAND|wxRIGHT|wxLEFT, 10 );
|
||||
|
||||
wxBoxSizer* bSizer5;
|
||||
bSizer5 = new wxBoxSizer( wxHORIZONTAL );
|
||||
|
||||
|
||||
m_btnNeverShowAgain = new wxButton( this, wxID_ANY, _("Never Show Again"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
bSizer5->Add( m_btnNeverShowAgain, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 10 );
|
||||
|
||||
|
||||
|
||||
|
||||
bSizer5->Add( 0, 0, 1, wxEXPAND, 5 );
|
||||
|
||||
|
||||
m_stdButtons = new wxStdDialogButtonSizer();
|
||||
m_stdButtonsOK = new wxButton( this, wxID_OK );
|
||||
m_stdButtons->AddButton( m_stdButtonsOK );
|
||||
m_stdButtonsCancel = new wxButton( this, wxID_CANCEL );
|
||||
m_stdButtons->AddButton( m_stdButtonsCancel );
|
||||
m_stdButtons->Realize();
|
||||
|
||||
|
||||
bSizer5->Add( m_stdButtons, 0, wxALL|wxEXPAND, 5 );
|
||||
|
||||
|
||||
|
||||
|
||||
bSizerMain->Add( bSizer5, 0, wxEXPAND, 5 );
|
||||
|
||||
|
||||
|
||||
|
||||
this->SetSizer( bSizerMain );
|
||||
this->Layout();
|
||||
bSizerMain->Fit( this );
|
||||
|
||||
|
||||
this->Centre( wxBOTH );
|
||||
|
||||
|
||||
// Connect Events
|
||||
this->Connect( wxEVT_SIZE, wxSizeEventHandler( DIALOG_RESCUE_EACH_BASE::OnDialogResize ) );
|
||||
m_ListOfConflicts->Connect( wxEVT_COMMAND_DATAVIEW_SELECTION_CHANGED, wxDataViewEventHandler( DIALOG_RESCUE_EACH_BASE::OnConflictSelect ), NULL, this );
|
||||
@@ -130,5 +136,5 @@ DIALOG_RESCUE_EACH_BASE::~DIALOG_RESCUE_EACH_BASE()
|
||||
m_ListOfConflicts->Disconnect( wxEVT_COMMAND_DATAVIEW_SELECTION_CHANGED, wxDataViewEventHandler( DIALOG_RESCUE_EACH_BASE::OnConflictSelect ), NULL, this );
|
||||
m_btnNeverShowAgain->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_RESCUE_EACH_BASE::OnNeverShowClick ), NULL, this );
|
||||
m_stdButtonsCancel->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_RESCUE_EACH_BASE::OnCancelClick ), NULL, this );
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
|
||||
<wxFormBuilder_Project>
|
||||
<FileVersion major="1" minor="14" />
|
||||
<FileVersion major="1" minor="15" />
|
||||
<object class="Project" expanded="1">
|
||||
<property name="class_decoration"></property>
|
||||
<property name="code_generation">C++</property>
|
||||
@@ -14,6 +14,7 @@
|
||||
<property name="file">dialog_rescue_each_base</property>
|
||||
<property name="first_id">1000</property>
|
||||
<property name="help_provider">none</property>
|
||||
<property name="image_path_wrapper_function_name"></property>
|
||||
<property name="indent_with_spaces"></property>
|
||||
<property name="internationalize">1</property>
|
||||
<property name="name">dialog_rescue_each_base</property>
|
||||
@@ -25,6 +26,7 @@
|
||||
<property name="skip_php_events">1</property>
|
||||
<property name="skip_python_events">1</property>
|
||||
<property name="ui_table">UI</property>
|
||||
<property name="use_array_enum">0</property>
|
||||
<property name="use_enum">0</property>
|
||||
<property name="use_microsoft_bom">0</property>
|
||||
<object class="Dialog" expanded="1">
|
||||
@@ -53,55 +55,7 @@
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<event name="OnActivate"></event>
|
||||
<event name="OnActivateApp"></event>
|
||||
<event name="OnAuiPaneActivated"></event>
|
||||
<event name="OnAuiPaneButton"></event>
|
||||
<event name="OnAuiPaneClose"></event>
|
||||
<event name="OnAuiPaneMaximize"></event>
|
||||
<event name="OnAuiPaneRestore"></event>
|
||||
<event name="OnAuiRender"></event>
|
||||
<event name="OnAux1DClick"></event>
|
||||
<event name="OnAux1Down"></event>
|
||||
<event name="OnAux1Up"></event>
|
||||
<event name="OnAux2DClick"></event>
|
||||
<event name="OnAux2Down"></event>
|
||||
<event name="OnAux2Up"></event>
|
||||
<event name="OnChar"></event>
|
||||
<event name="OnCharHook"></event>
|
||||
<event name="OnClose"></event>
|
||||
<event name="OnEnterWindow"></event>
|
||||
<event name="OnEraseBackground"></event>
|
||||
<event name="OnHibernate"></event>
|
||||
<event name="OnIconize"></event>
|
||||
<event name="OnIdle"></event>
|
||||
<event name="OnInitDialog"></event>
|
||||
<event name="OnKeyDown"></event>
|
||||
<event name="OnKeyUp"></event>
|
||||
<event name="OnKillFocus"></event>
|
||||
<event name="OnLeaveWindow"></event>
|
||||
<event name="OnLeftDClick"></event>
|
||||
<event name="OnLeftDown"></event>
|
||||
<event name="OnLeftUp"></event>
|
||||
<event name="OnMaximize"></event>
|
||||
<event name="OnMiddleDClick"></event>
|
||||
<event name="OnMiddleDown"></event>
|
||||
<event name="OnMiddleUp"></event>
|
||||
<event name="OnMotion"></event>
|
||||
<event name="OnMouseEvents"></event>
|
||||
<event name="OnMouseWheel"></event>
|
||||
<event name="OnMove"></event>
|
||||
<event name="OnMoveEnd"></event>
|
||||
<event name="OnMoveStart"></event>
|
||||
<event name="OnMoving"></event>
|
||||
<event name="OnPaint"></event>
|
||||
<event name="OnRightDClick"></event>
|
||||
<event name="OnRightDown"></event>
|
||||
<event name="OnRightUp"></event>
|
||||
<event name="OnSetFocus"></event>
|
||||
<event name="OnShow"></event>
|
||||
<event name="OnSize">OnDialogResize</event>
|
||||
<event name="OnUpdateUI"></event>
|
||||
<object class="wxBoxSizer" expanded="1">
|
||||
<property name="minimum_size"></property>
|
||||
<property name="name">bSizerMain</property>
|
||||
@@ -109,431 +63,254 @@
|
||||
<property name="permission">none</property>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxEXPAND|wxTOP|wxBOTTOM</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxHtmlWindow" expanded="1">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
<property name="TopDockable">1</property>
|
||||
<property name="aui_layer"></property>
|
||||
<property name="aui_name"></property>
|
||||
<property name="aui_position"></property>
|
||||
<property name="aui_row"></property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg">wxSYS_COLOUR_BTNFACE</property>
|
||||
<property name="caption"></property>
|
||||
<property name="caption_visible">1</property>
|
||||
<property name="center_pane">0</property>
|
||||
<property name="close_button">1</property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
<property name="default_pane">0</property>
|
||||
<property name="dock">Dock</property>
|
||||
<property name="dock_fixed">0</property>
|
||||
<property name="docking">Left</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="floatable">1</property>
|
||||
<property name="font"></property>
|
||||
<property name="gripper">0</property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="max_size"></property>
|
||||
<property name="maximize_button">0</property>
|
||||
<property name="maximum_size"></property>
|
||||
<property name="min_size"></property>
|
||||
<property name="minimize_button">0</property>
|
||||
<property name="minimum_size">-1,80</property>
|
||||
<property name="moveable">1</property>
|
||||
<property name="name">m_htmlPrompt</property>
|
||||
<property name="pane_border">1</property>
|
||||
<property name="pane_position"></property>
|
||||
<property name="pane_size"></property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="pin_button">1</property>
|
||||
<property name="pos"></property>
|
||||
<property name="resize">Resizable</property>
|
||||
<property name="show">1</property>
|
||||
<property name="size"></property>
|
||||
<property name="style">wxHW_SCROLLBAR_AUTO</property>
|
||||
<property name="subclass">; forward_declare</property>
|
||||
<property name="toolbar_pane">0</property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<event name="OnAux1DClick"></event>
|
||||
<event name="OnAux1Down"></event>
|
||||
<event name="OnAux1Up"></event>
|
||||
<event name="OnAux2DClick"></event>
|
||||
<event name="OnAux2Down"></event>
|
||||
<event name="OnAux2Up"></event>
|
||||
<event name="OnChar"></event>
|
||||
<event name="OnCharHook"></event>
|
||||
<event name="OnEnterWindow"></event>
|
||||
<event name="OnEraseBackground"></event>
|
||||
<event name="OnHtmlCellClicked"></event>
|
||||
<event name="OnHtmlCellHover"></event>
|
||||
<event name="OnHtmlLinkClicked"></event>
|
||||
<event name="OnKeyDown"></event>
|
||||
<event name="OnKeyUp"></event>
|
||||
<event name="OnKillFocus"></event>
|
||||
<event name="OnLeaveWindow"></event>
|
||||
<event name="OnLeftDClick"></event>
|
||||
<event name="OnLeftDown"></event>
|
||||
<event name="OnLeftUp"></event>
|
||||
<event name="OnMiddleDClick"></event>
|
||||
<event name="OnMiddleDown"></event>
|
||||
<event name="OnMiddleUp"></event>
|
||||
<event name="OnMotion"></event>
|
||||
<event name="OnMouseEvents"></event>
|
||||
<event name="OnMouseWheel"></event>
|
||||
<event name="OnPaint"></event>
|
||||
<event name="OnRightDClick"></event>
|
||||
<event name="OnRightDown"></event>
|
||||
<event name="OnRightUp"></event>
|
||||
<event name="OnSetFocus"></event>
|
||||
<event name="OnSize"></event>
|
||||
<event name="OnUpdateUI"></event>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">10</property>
|
||||
<property name="flag">wxLEFT|wxRIGHT</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxStaticText" expanded="1">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
<property name="TopDockable">1</property>
|
||||
<property name="aui_layer"></property>
|
||||
<property name="aui_name"></property>
|
||||
<property name="aui_position"></property>
|
||||
<property name="aui_row"></property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg"></property>
|
||||
<property name="caption"></property>
|
||||
<property name="caption_visible">1</property>
|
||||
<property name="center_pane">0</property>
|
||||
<property name="close_button">1</property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
<property name="default_pane">0</property>
|
||||
<property name="dock">Dock</property>
|
||||
<property name="dock_fixed">0</property>
|
||||
<property name="docking">Left</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="floatable">1</property>
|
||||
<property name="font">,90,92,-1,70,0</property>
|
||||
<property name="gripper">0</property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">Symbols to update:</property>
|
||||
<property name="markup">0</property>
|
||||
<property name="max_size"></property>
|
||||
<property name="maximize_button">0</property>
|
||||
<property name="maximum_size"></property>
|
||||
<property name="min_size"></property>
|
||||
<property name="minimize_button">0</property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="moveable">1</property>
|
||||
<property name="name">m_titleSymbols</property>
|
||||
<property name="pane_border">1</property>
|
||||
<property name="pane_position"></property>
|
||||
<property name="pane_size"></property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="pin_button">1</property>
|
||||
<property name="pos"></property>
|
||||
<property name="resize">Resizable</property>
|
||||
<property name="show">1</property>
|
||||
<property name="size"></property>
|
||||
<property name="style"></property>
|
||||
<property name="subclass"></property>
|
||||
<property name="toolbar_pane">0</property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<property name="wrap">-1</property>
|
||||
<event name="OnAux1DClick"></event>
|
||||
<event name="OnAux1Down"></event>
|
||||
<event name="OnAux1Up"></event>
|
||||
<event name="OnAux2DClick"></event>
|
||||
<event name="OnAux2Down"></event>
|
||||
<event name="OnAux2Up"></event>
|
||||
<event name="OnChar"></event>
|
||||
<event name="OnCharHook"></event>
|
||||
<event name="OnEnterWindow"></event>
|
||||
<event name="OnEraseBackground"></event>
|
||||
<event name="OnKeyDown"></event>
|
||||
<event name="OnKeyUp"></event>
|
||||
<event name="OnKillFocus"></event>
|
||||
<event name="OnLeaveWindow"></event>
|
||||
<event name="OnLeftDClick"></event>
|
||||
<event name="OnLeftDown"></event>
|
||||
<event name="OnLeftUp"></event>
|
||||
<event name="OnMiddleDClick"></event>
|
||||
<event name="OnMiddleDown"></event>
|
||||
<event name="OnMiddleUp"></event>
|
||||
<event name="OnMotion"></event>
|
||||
<event name="OnMouseEvents"></event>
|
||||
<event name="OnMouseWheel"></event>
|
||||
<event name="OnPaint"></event>
|
||||
<event name="OnRightDClick"></event>
|
||||
<event name="OnRightDown"></event>
|
||||
<event name="OnRightUp"></event>
|
||||
<event name="OnSetFocus"></event>
|
||||
<event name="OnSize"></event>
|
||||
<event name="OnUpdateUI"></event>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">10</property>
|
||||
<property name="flag">wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT</property>
|
||||
<property name="proportion">3</property>
|
||||
<object class="wxDataViewListCtrl" expanded="1">
|
||||
<property name="bg"></property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="font"></property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="maximum_size"></property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="name">m_ListOfConflicts</property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="pos"></property>
|
||||
<property name="size"></property>
|
||||
<property name="style"></property>
|
||||
<property name="subclass"></property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<event name="OnAux1DClick"></event>
|
||||
<event name="OnAux1Down"></event>
|
||||
<event name="OnAux1Up"></event>
|
||||
<event name="OnAux2DClick"></event>
|
||||
<event name="OnAux2Down"></event>
|
||||
<event name="OnAux2Up"></event>
|
||||
<event name="OnChar"></event>
|
||||
<event name="OnCharHook"></event>
|
||||
<event name="OnDataViewListCtrlColumnHeaderClick"></event>
|
||||
<event name="OnDataViewListCtrlColumnHeaderRightClick"></event>
|
||||
<event name="OnDataViewListCtrlColumnReordered"></event>
|
||||
<event name="OnDataViewListCtrlColumnSorted"></event>
|
||||
<event name="OnDataViewListCtrlItemActivated"></event>
|
||||
<event name="OnDataViewListCtrlItemBeginDrag"></event>
|
||||
<event name="OnDataViewListCtrlItemCollapsed"></event>
|
||||
<event name="OnDataViewListCtrlItemCollapsing"></event>
|
||||
<event name="OnDataViewListCtrlItemContextMenu"></event>
|
||||
<event name="OnDataViewListCtrlItemDrop"></event>
|
||||
<event name="OnDataViewListCtrlItemDropPossible"></event>
|
||||
<event name="OnDataViewListCtrlItemEditingDone"></event>
|
||||
<event name="OnDataViewListCtrlItemEditingStarted"></event>
|
||||
<event name="OnDataViewListCtrlItemExpanded"></event>
|
||||
<event name="OnDataViewListCtrlItemExpanding"></event>
|
||||
<event name="OnDataViewListCtrlItemStartEditing"></event>
|
||||
<event name="OnDataViewListCtrlItemValueChanged"></event>
|
||||
<event name="OnDataViewListCtrlSelectionChanged">OnConflictSelect</event>
|
||||
<event name="OnEnterWindow"></event>
|
||||
<event name="OnEraseBackground"></event>
|
||||
<event name="OnKeyDown"></event>
|
||||
<event name="OnKeyUp"></event>
|
||||
<event name="OnKillFocus"></event>
|
||||
<event name="OnLeaveWindow"></event>
|
||||
<event name="OnLeftDClick"></event>
|
||||
<event name="OnLeftDown"></event>
|
||||
<event name="OnLeftUp"></event>
|
||||
<event name="OnMiddleDClick"></event>
|
||||
<event name="OnMiddleDown"></event>
|
||||
<event name="OnMiddleUp"></event>
|
||||
<event name="OnMotion"></event>
|
||||
<event name="OnMouseEvents"></event>
|
||||
<event name="OnMouseWheel"></event>
|
||||
<event name="OnPaint"></event>
|
||||
<event name="OnRightDClick"></event>
|
||||
<event name="OnRightDown"></event>
|
||||
<event name="OnRightUp"></event>
|
||||
<event name="OnSetFocus"></event>
|
||||
<event name="OnSize"></event>
|
||||
<event name="OnUpdateUI"></event>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">10</property>
|
||||
<property name="flag">wxRIGHT|wxLEFT</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxStaticText" expanded="1">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
<property name="TopDockable">1</property>
|
||||
<property name="aui_layer"></property>
|
||||
<property name="aui_name"></property>
|
||||
<property name="aui_position"></property>
|
||||
<property name="aui_row"></property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg"></property>
|
||||
<property name="caption"></property>
|
||||
<property name="caption_visible">1</property>
|
||||
<property name="center_pane">0</property>
|
||||
<property name="close_button">1</property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
<property name="default_pane">0</property>
|
||||
<property name="dock">Dock</property>
|
||||
<property name="dock_fixed">0</property>
|
||||
<property name="docking">Left</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="floatable">1</property>
|
||||
<property name="font">,90,92,-1,70,0</property>
|
||||
<property name="gripper">0</property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">Instances of this symbol:</property>
|
||||
<property name="markup">0</property>
|
||||
<property name="max_size"></property>
|
||||
<property name="maximize_button">0</property>
|
||||
<property name="maximum_size"></property>
|
||||
<property name="min_size"></property>
|
||||
<property name="minimize_button">0</property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="moveable">1</property>
|
||||
<property name="name">m_titleInstances</property>
|
||||
<property name="pane_border">1</property>
|
||||
<property name="pane_position"></property>
|
||||
<property name="pane_size"></property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="pin_button">1</property>
|
||||
<property name="pos"></property>
|
||||
<property name="resize">Resizable</property>
|
||||
<property name="show">1</property>
|
||||
<property name="size"></property>
|
||||
<property name="style"></property>
|
||||
<property name="subclass"></property>
|
||||
<property name="toolbar_pane">0</property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<property name="wrap">-1</property>
|
||||
<event name="OnAux1DClick"></event>
|
||||
<event name="OnAux1Down"></event>
|
||||
<event name="OnAux1Up"></event>
|
||||
<event name="OnAux2DClick"></event>
|
||||
<event name="OnAux2Down"></event>
|
||||
<event name="OnAux2Up"></event>
|
||||
<event name="OnChar"></event>
|
||||
<event name="OnCharHook"></event>
|
||||
<event name="OnEnterWindow"></event>
|
||||
<event name="OnEraseBackground"></event>
|
||||
<event name="OnKeyDown"></event>
|
||||
<event name="OnKeyUp"></event>
|
||||
<event name="OnKillFocus"></event>
|
||||
<event name="OnLeaveWindow"></event>
|
||||
<event name="OnLeftDClick"></event>
|
||||
<event name="OnLeftDown"></event>
|
||||
<event name="OnLeftUp"></event>
|
||||
<event name="OnMiddleDClick"></event>
|
||||
<event name="OnMiddleDown"></event>
|
||||
<event name="OnMiddleUp"></event>
|
||||
<event name="OnMotion"></event>
|
||||
<event name="OnMouseEvents"></event>
|
||||
<event name="OnMouseWheel"></event>
|
||||
<event name="OnPaint"></event>
|
||||
<event name="OnRightDClick"></event>
|
||||
<event name="OnRightDown"></event>
|
||||
<event name="OnRightUp"></event>
|
||||
<event name="OnSetFocus"></event>
|
||||
<event name="OnSize"></event>
|
||||
<event name="OnUpdateUI"></event>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">10</property>
|
||||
<property name="flag">wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT</property>
|
||||
<property name="flag">wxEXPAND</property>
|
||||
<property name="proportion">2</property>
|
||||
<object class="wxDataViewListCtrl" expanded="1">
|
||||
<property name="bg"></property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="font"></property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="maximum_size"></property>
|
||||
<object class="wxBoxSizer" expanded="1">
|
||||
<property name="minimum_size"></property>
|
||||
<property name="name">m_ListOfInstances</property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="pos"></property>
|
||||
<property name="size"></property>
|
||||
<property name="style"></property>
|
||||
<property name="subclass"></property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<event name="OnAux1DClick"></event>
|
||||
<event name="OnAux1Down"></event>
|
||||
<event name="OnAux1Up"></event>
|
||||
<event name="OnAux2DClick"></event>
|
||||
<event name="OnAux2Down"></event>
|
||||
<event name="OnAux2Up"></event>
|
||||
<event name="OnChar"></event>
|
||||
<event name="OnCharHook"></event>
|
||||
<event name="OnDataViewListCtrlColumnHeaderClick"></event>
|
||||
<event name="OnDataViewListCtrlColumnHeaderRightClick"></event>
|
||||
<event name="OnDataViewListCtrlColumnReordered"></event>
|
||||
<event name="OnDataViewListCtrlColumnSorted"></event>
|
||||
<event name="OnDataViewListCtrlItemActivated"></event>
|
||||
<event name="OnDataViewListCtrlItemBeginDrag"></event>
|
||||
<event name="OnDataViewListCtrlItemCollapsed"></event>
|
||||
<event name="OnDataViewListCtrlItemCollapsing"></event>
|
||||
<event name="OnDataViewListCtrlItemContextMenu"></event>
|
||||
<event name="OnDataViewListCtrlItemDrop"></event>
|
||||
<event name="OnDataViewListCtrlItemDropPossible"></event>
|
||||
<event name="OnDataViewListCtrlItemEditingDone"></event>
|
||||
<event name="OnDataViewListCtrlItemEditingStarted"></event>
|
||||
<event name="OnDataViewListCtrlItemExpanded"></event>
|
||||
<event name="OnDataViewListCtrlItemExpanding"></event>
|
||||
<event name="OnDataViewListCtrlItemStartEditing"></event>
|
||||
<event name="OnDataViewListCtrlItemValueChanged"></event>
|
||||
<event name="OnDataViewListCtrlSelectionChanged"></event>
|
||||
<event name="OnEnterWindow"></event>
|
||||
<event name="OnEraseBackground"></event>
|
||||
<event name="OnKeyDown"></event>
|
||||
<event name="OnKeyUp"></event>
|
||||
<event name="OnKillFocus"></event>
|
||||
<event name="OnLeaveWindow"></event>
|
||||
<event name="OnLeftDClick"></event>
|
||||
<event name="OnLeftDown"></event>
|
||||
<event name="OnLeftUp"></event>
|
||||
<event name="OnMiddleDClick"></event>
|
||||
<event name="OnMiddleDown"></event>
|
||||
<event name="OnMiddleUp"></event>
|
||||
<event name="OnMotion"></event>
|
||||
<event name="OnMouseEvents"></event>
|
||||
<event name="OnMouseWheel"></event>
|
||||
<event name="OnPaint"></event>
|
||||
<event name="OnRightDClick"></event>
|
||||
<event name="OnRightDown"></event>
|
||||
<event name="OnRightUp"></event>
|
||||
<event name="OnSetFocus"></event>
|
||||
<event name="OnSize"></event>
|
||||
<event name="OnUpdateUI"></event>
|
||||
<property name="name">bSizer8</property>
|
||||
<property name="orient">wxVERTICAL</property>
|
||||
<property name="permission">none</property>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxEXPAND|wxTOP|wxBOTTOM</property>
|
||||
<property name="proportion">1</property>
|
||||
<object class="wxHtmlWindow" expanded="1">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
<property name="TopDockable">1</property>
|
||||
<property name="aui_layer"></property>
|
||||
<property name="aui_name"></property>
|
||||
<property name="aui_position"></property>
|
||||
<property name="aui_row"></property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg">wxSYS_COLOUR_BTNFACE</property>
|
||||
<property name="caption"></property>
|
||||
<property name="caption_visible">1</property>
|
||||
<property name="center_pane">0</property>
|
||||
<property name="close_button">1</property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
<property name="default_pane">0</property>
|
||||
<property name="dock">Dock</property>
|
||||
<property name="dock_fixed">0</property>
|
||||
<property name="docking">Left</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="floatable">1</property>
|
||||
<property name="font"></property>
|
||||
<property name="gripper">0</property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="max_size"></property>
|
||||
<property name="maximize_button">0</property>
|
||||
<property name="maximum_size"></property>
|
||||
<property name="min_size"></property>
|
||||
<property name="minimize_button">0</property>
|
||||
<property name="minimum_size">-1,80</property>
|
||||
<property name="moveable">1</property>
|
||||
<property name="name">m_htmlPrompt</property>
|
||||
<property name="pane_border">1</property>
|
||||
<property name="pane_position"></property>
|
||||
<property name="pane_size"></property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="pin_button">1</property>
|
||||
<property name="pos"></property>
|
||||
<property name="resize">Resizable</property>
|
||||
<property name="show">1</property>
|
||||
<property name="size"></property>
|
||||
<property name="style">wxHW_SCROLLBAR_AUTO</property>
|
||||
<property name="subclass">; forward_declare</property>
|
||||
<property name="toolbar_pane">0</property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">10</property>
|
||||
<property name="flag">wxLEFT|wxRIGHT</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxStaticText" expanded="1">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
<property name="TopDockable">1</property>
|
||||
<property name="aui_layer"></property>
|
||||
<property name="aui_name"></property>
|
||||
<property name="aui_position"></property>
|
||||
<property name="aui_row"></property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg"></property>
|
||||
<property name="caption"></property>
|
||||
<property name="caption_visible">1</property>
|
||||
<property name="center_pane">0</property>
|
||||
<property name="close_button">1</property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
<property name="default_pane">0</property>
|
||||
<property name="dock">Dock</property>
|
||||
<property name="dock_fixed">0</property>
|
||||
<property name="docking">Left</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="floatable">1</property>
|
||||
<property name="font">,90,92,-1,70,0</property>
|
||||
<property name="gripper">0</property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">Symbols to update:</property>
|
||||
<property name="markup">0</property>
|
||||
<property name="max_size"></property>
|
||||
<property name="maximize_button">0</property>
|
||||
<property name="maximum_size"></property>
|
||||
<property name="min_size"></property>
|
||||
<property name="minimize_button">0</property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="moveable">1</property>
|
||||
<property name="name">m_titleSymbols</property>
|
||||
<property name="pane_border">1</property>
|
||||
<property name="pane_position"></property>
|
||||
<property name="pane_size"></property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="pin_button">1</property>
|
||||
<property name="pos"></property>
|
||||
<property name="resize">Resizable</property>
|
||||
<property name="show">1</property>
|
||||
<property name="size"></property>
|
||||
<property name="style"></property>
|
||||
<property name="subclass"></property>
|
||||
<property name="toolbar_pane">0</property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<property name="wrap">-1</property>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">10</property>
|
||||
<property name="flag">wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT</property>
|
||||
<property name="proportion">2</property>
|
||||
<object class="wxDataViewListCtrl" expanded="1">
|
||||
<property name="bg"></property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="font"></property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="maximum_size"></property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="name">m_ListOfConflicts</property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="pos"></property>
|
||||
<property name="size"></property>
|
||||
<property name="style"></property>
|
||||
<property name="subclass"></property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<event name="OnDataViewListCtrlSelectionChanged">OnConflictSelect</event>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">10</property>
|
||||
<property name="flag">wxRIGHT|wxLEFT</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxStaticText" expanded="1">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
<property name="TopDockable">1</property>
|
||||
<property name="aui_layer"></property>
|
||||
<property name="aui_name"></property>
|
||||
<property name="aui_position"></property>
|
||||
<property name="aui_row"></property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg"></property>
|
||||
<property name="caption"></property>
|
||||
<property name="caption_visible">1</property>
|
||||
<property name="center_pane">0</property>
|
||||
<property name="close_button">1</property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
<property name="default_pane">0</property>
|
||||
<property name="dock">Dock</property>
|
||||
<property name="dock_fixed">0</property>
|
||||
<property name="docking">Left</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="floatable">1</property>
|
||||
<property name="font">,90,92,-1,70,0</property>
|
||||
<property name="gripper">0</property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">Instances of this symbol:</property>
|
||||
<property name="markup">0</property>
|
||||
<property name="max_size"></property>
|
||||
<property name="maximize_button">0</property>
|
||||
<property name="maximum_size"></property>
|
||||
<property name="min_size"></property>
|
||||
<property name="minimize_button">0</property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="moveable">1</property>
|
||||
<property name="name">m_titleInstances</property>
|
||||
<property name="pane_border">1</property>
|
||||
<property name="pane_position"></property>
|
||||
<property name="pane_size"></property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="pin_button">1</property>
|
||||
<property name="pos"></property>
|
||||
<property name="resize">Resizable</property>
|
||||
<property name="show">1</property>
|
||||
<property name="size"></property>
|
||||
<property name="style"></property>
|
||||
<property name="subclass"></property>
|
||||
<property name="toolbar_pane">0</property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<property name="wrap">-1</property>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">10</property>
|
||||
<property name="flag">wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT</property>
|
||||
<property name="proportion">2</property>
|
||||
<object class="wxDataViewListCtrl" expanded="1">
|
||||
<property name="bg"></property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="font"></property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="maximum_size"></property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="name">m_ListOfInstances</property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="pos"></property>
|
||||
<property name="size"></property>
|
||||
<property name="style"></property>
|
||||
<property name="subclass"></property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">10</property>
|
||||
<property name="flag">wxEXPAND|wxRIGHT|wxLEFT</property>
|
||||
<property name="proportion">3</property>
|
||||
<property name="proportion">1</property>
|
||||
<object class="wxBoxSizer" expanded="1">
|
||||
<property name="minimum_size"></property>
|
||||
<property name="name">bSizerPreviews</property>
|
||||
@@ -607,36 +384,6 @@
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<property name="wrap">-1</property>
|
||||
<event name="OnAux1DClick"></event>
|
||||
<event name="OnAux1Down"></event>
|
||||
<event name="OnAux1Up"></event>
|
||||
<event name="OnAux2DClick"></event>
|
||||
<event name="OnAux2Down"></event>
|
||||
<event name="OnAux2Up"></event>
|
||||
<event name="OnChar"></event>
|
||||
<event name="OnCharHook"></event>
|
||||
<event name="OnEnterWindow"></event>
|
||||
<event name="OnEraseBackground"></event>
|
||||
<event name="OnKeyDown"></event>
|
||||
<event name="OnKeyUp"></event>
|
||||
<event name="OnKillFocus"></event>
|
||||
<event name="OnLeaveWindow"></event>
|
||||
<event name="OnLeftDClick"></event>
|
||||
<event name="OnLeftDown"></event>
|
||||
<event name="OnLeftUp"></event>
|
||||
<event name="OnMiddleDClick"></event>
|
||||
<event name="OnMiddleDown"></event>
|
||||
<event name="OnMiddleUp"></event>
|
||||
<event name="OnMotion"></event>
|
||||
<event name="OnMouseEvents"></event>
|
||||
<event name="OnMouseWheel"></event>
|
||||
<event name="OnPaint"></event>
|
||||
<event name="OnRightDClick"></event>
|
||||
<event name="OnRightDown"></event>
|
||||
<event name="OnRightUp"></event>
|
||||
<event name="OnSetFocus"></event>
|
||||
<event name="OnSize"></event>
|
||||
<event name="OnUpdateUI"></event>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
@@ -694,36 +441,6 @@
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style">wxTAB_TRAVERSAL</property>
|
||||
<event name="OnAux1DClick"></event>
|
||||
<event name="OnAux1Down"></event>
|
||||
<event name="OnAux1Up"></event>
|
||||
<event name="OnAux2DClick"></event>
|
||||
<event name="OnAux2Down"></event>
|
||||
<event name="OnAux2Up"></event>
|
||||
<event name="OnChar"></event>
|
||||
<event name="OnCharHook"></event>
|
||||
<event name="OnEnterWindow"></event>
|
||||
<event name="OnEraseBackground"></event>
|
||||
<event name="OnKeyDown"></event>
|
||||
<event name="OnKeyUp"></event>
|
||||
<event name="OnKillFocus"></event>
|
||||
<event name="OnLeaveWindow"></event>
|
||||
<event name="OnLeftDClick"></event>
|
||||
<event name="OnLeftDown"></event>
|
||||
<event name="OnLeftUp"></event>
|
||||
<event name="OnMiddleDClick"></event>
|
||||
<event name="OnMiddleDown"></event>
|
||||
<event name="OnMiddleUp"></event>
|
||||
<event name="OnMotion"></event>
|
||||
<event name="OnMouseEvents"></event>
|
||||
<event name="OnMouseWheel"></event>
|
||||
<event name="OnPaint"></event>
|
||||
<event name="OnRightDClick"></event>
|
||||
<event name="OnRightDown"></event>
|
||||
<event name="OnRightUp"></event>
|
||||
<event name="OnSetFocus"></event>
|
||||
<event name="OnSize"></event>
|
||||
<event name="OnUpdateUI"></event>
|
||||
<object class="wxBoxSizer" expanded="1">
|
||||
<property name="minimum_size"></property>
|
||||
<property name="name">m_SizerOldPanel</property>
|
||||
@@ -802,36 +519,6 @@
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<property name="wrap">-1</property>
|
||||
<event name="OnAux1DClick"></event>
|
||||
<event name="OnAux1Down"></event>
|
||||
<event name="OnAux1Up"></event>
|
||||
<event name="OnAux2DClick"></event>
|
||||
<event name="OnAux2Down"></event>
|
||||
<event name="OnAux2Up"></event>
|
||||
<event name="OnChar"></event>
|
||||
<event name="OnCharHook"></event>
|
||||
<event name="OnEnterWindow"></event>
|
||||
<event name="OnEraseBackground"></event>
|
||||
<event name="OnKeyDown"></event>
|
||||
<event name="OnKeyUp"></event>
|
||||
<event name="OnKillFocus"></event>
|
||||
<event name="OnLeaveWindow"></event>
|
||||
<event name="OnLeftDClick"></event>
|
||||
<event name="OnLeftDown"></event>
|
||||
<event name="OnLeftUp"></event>
|
||||
<event name="OnMiddleDClick"></event>
|
||||
<event name="OnMiddleDown"></event>
|
||||
<event name="OnMiddleUp"></event>
|
||||
<event name="OnMotion"></event>
|
||||
<event name="OnMouseEvents"></event>
|
||||
<event name="OnMouseWheel"></event>
|
||||
<event name="OnPaint"></event>
|
||||
<event name="OnRightDClick"></event>
|
||||
<event name="OnRightDown"></event>
|
||||
<event name="OnRightUp"></event>
|
||||
<event name="OnSetFocus"></event>
|
||||
<event name="OnSize"></event>
|
||||
<event name="OnUpdateUI"></event>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
@@ -889,36 +576,6 @@
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style">wxTAB_TRAVERSAL</property>
|
||||
<event name="OnAux1DClick"></event>
|
||||
<event name="OnAux1Down"></event>
|
||||
<event name="OnAux1Up"></event>
|
||||
<event name="OnAux2DClick"></event>
|
||||
<event name="OnAux2Down"></event>
|
||||
<event name="OnAux2Up"></event>
|
||||
<event name="OnChar"></event>
|
||||
<event name="OnCharHook"></event>
|
||||
<event name="OnEnterWindow"></event>
|
||||
<event name="OnEraseBackground"></event>
|
||||
<event name="OnKeyDown"></event>
|
||||
<event name="OnKeyUp"></event>
|
||||
<event name="OnKillFocus"></event>
|
||||
<event name="OnLeaveWindow"></event>
|
||||
<event name="OnLeftDClick"></event>
|
||||
<event name="OnLeftDown"></event>
|
||||
<event name="OnLeftUp"></event>
|
||||
<event name="OnMiddleDClick"></event>
|
||||
<event name="OnMiddleDown"></event>
|
||||
<event name="OnMiddleUp"></event>
|
||||
<event name="OnMotion"></event>
|
||||
<event name="OnMouseEvents"></event>
|
||||
<event name="OnMouseWheel"></event>
|
||||
<event name="OnPaint"></event>
|
||||
<event name="OnRightDClick"></event>
|
||||
<event name="OnRightDown"></event>
|
||||
<event name="OnRightUp"></event>
|
||||
<event name="OnSetFocus"></event>
|
||||
<event name="OnSize"></event>
|
||||
<event name="OnUpdateUI"></event>
|
||||
<object class="wxBoxSizer" expanded="1">
|
||||
<property name="minimum_size"></property>
|
||||
<property name="name">m_SizerNewPanel</property>
|
||||
@@ -1010,37 +667,7 @@
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<event name="OnAux1DClick"></event>
|
||||
<event name="OnAux1Down"></event>
|
||||
<event name="OnAux1Up"></event>
|
||||
<event name="OnAux2DClick"></event>
|
||||
<event name="OnAux2Down"></event>
|
||||
<event name="OnAux2Up"></event>
|
||||
<event name="OnButtonClick">OnNeverShowClick</event>
|
||||
<event name="OnChar"></event>
|
||||
<event name="OnCharHook"></event>
|
||||
<event name="OnEnterWindow"></event>
|
||||
<event name="OnEraseBackground"></event>
|
||||
<event name="OnKeyDown"></event>
|
||||
<event name="OnKeyUp"></event>
|
||||
<event name="OnKillFocus"></event>
|
||||
<event name="OnLeaveWindow"></event>
|
||||
<event name="OnLeftDClick"></event>
|
||||
<event name="OnLeftDown"></event>
|
||||
<event name="OnLeftUp"></event>
|
||||
<event name="OnMiddleDClick"></event>
|
||||
<event name="OnMiddleDown"></event>
|
||||
<event name="OnMiddleUp"></event>
|
||||
<event name="OnMotion"></event>
|
||||
<event name="OnMouseEvents"></event>
|
||||
<event name="OnMouseWheel"></event>
|
||||
<event name="OnPaint"></event>
|
||||
<event name="OnRightDClick"></event>
|
||||
<event name="OnRightDown"></event>
|
||||
<event name="OnRightUp"></event>
|
||||
<event name="OnSetFocus"></event>
|
||||
<event name="OnSize"></event>
|
||||
<event name="OnUpdateUI"></event>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
@@ -1069,14 +696,7 @@
|
||||
<property name="minimum_size"></property>
|
||||
<property name="name">m_stdButtons</property>
|
||||
<property name="permission">protected</property>
|
||||
<event name="OnApplyButtonClick"></event>
|
||||
<event name="OnCancelButtonClick">OnCancelClick</event>
|
||||
<event name="OnContextHelpButtonClick"></event>
|
||||
<event name="OnHelpButtonClick"></event>
|
||||
<event name="OnNoButtonClick"></event>
|
||||
<event name="OnOKButtonClick"></event>
|
||||
<event name="OnSaveButtonClick"></event>
|
||||
<event name="OnYesButtonClick"></event>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
|
||||
@@ -1,12 +1,11 @@
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// C++ code generated with wxFormBuilder (version Jul 11 2018)
|
||||
// C++ code generated with wxFormBuilder (version Feb 10 2019)
|
||||
// http://www.wxformbuilder.org/
|
||||
//
|
||||
// PLEASE DO *NOT* EDIT THIS FILE!
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef __DIALOG_RESCUE_EACH_BASE_H__
|
||||
#define __DIALOG_RESCUE_EACH_BASE_H__
|
||||
#pragma once
|
||||
|
||||
#include <wx/artprov.h>
|
||||
#include <wx/xrc/xmlres.h>
|
||||
@@ -37,7 +36,7 @@
|
||||
class DIALOG_RESCUE_EACH_BASE : public DIALOG_SHIM
|
||||
{
|
||||
private:
|
||||
|
||||
|
||||
protected:
|
||||
wxHtmlWindow* m_htmlPrompt;
|
||||
wxStaticText* m_titleSymbols;
|
||||
@@ -54,19 +53,18 @@ class DIALOG_RESCUE_EACH_BASE : public DIALOG_SHIM
|
||||
wxStdDialogButtonSizer* m_stdButtons;
|
||||
wxButton* m_stdButtonsOK;
|
||||
wxButton* m_stdButtonsCancel;
|
||||
|
||||
|
||||
// Virtual event handlers, overide them in your derived class
|
||||
virtual void OnDialogResize( wxSizeEvent& event ) { event.Skip(); }
|
||||
virtual void OnConflictSelect( wxDataViewEvent& event ) { event.Skip(); }
|
||||
virtual void OnNeverShowClick( wxCommandEvent& event ) { event.Skip(); }
|
||||
virtual void OnCancelClick( wxCommandEvent& event ) { event.Skip(); }
|
||||
|
||||
|
||||
|
||||
|
||||
public:
|
||||
|
||||
DIALOG_RESCUE_EACH_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Project Rescue Helper"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
|
||||
|
||||
DIALOG_RESCUE_EACH_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Project Rescue Helper"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
|
||||
~DIALOG_RESCUE_EACH_BASE();
|
||||
|
||||
|
||||
};
|
||||
|
||||
#endif //__DIALOG_RESCUE_EACH_BASE_H__
|
||||
|
||||
@@ -63,6 +63,15 @@ DIALOG_SIM_SETTINGS::DIALOG_SIM_SETTINGS( wxWindow* aParent )
|
||||
m_transFinal->SetValidator( m_spiceValidator );
|
||||
m_transInitial->SetValidator( m_spiceEmptyValidator );
|
||||
|
||||
// Hide pages that aren't fully implemented yet
|
||||
// wxPanel::Hide() isn't enough on some platforms
|
||||
m_simPages->RemovePage( m_simPages->FindPage( m_pgDistortion ) );
|
||||
m_simPages->RemovePage( m_simPages->FindPage( m_pgNoise ) );
|
||||
m_simPages->RemovePage( m_simPages->FindPage( m_pgOP ) );
|
||||
m_simPages->RemovePage( m_simPages->FindPage( m_pgPoleZero ) );
|
||||
m_simPages->RemovePage( m_simPages->FindPage( m_pgSensitivity ) );
|
||||
m_simPages->RemovePage( m_simPages->FindPage( m_pgTransferFunction ) );
|
||||
|
||||
m_sdbSizerOK->SetDefault();
|
||||
updateNetlistOpts();
|
||||
|
||||
@@ -158,6 +167,9 @@ bool DIALOG_SIM_SETTINGS::TransferDataFromWindow()
|
||||
{
|
||||
wxString dcSource = m_exporter->GetSpiceDevice( m_dcSource2->GetValue() );
|
||||
|
||||
if( m_dcEnable1->IsChecked() )
|
||||
simCmd += " ";
|
||||
|
||||
simCmd += wxString::Format( "%s %s %s %s",
|
||||
dcSource,
|
||||
SPICE_VALUE( m_dcStart2->GetValue() ).ToSpiceString(),
|
||||
|
||||
@@ -290,10 +290,10 @@ void IncrementLabelMember( wxString& name, int aIncrement )
|
||||
|
||||
ii = name.Len() - 1; nn = 0;
|
||||
|
||||
if( !isdigit( name.GetChar( ii ) ) )
|
||||
if( !wxIsdigit( name.GetChar( ii ) ) )
|
||||
return;
|
||||
|
||||
while( (ii >= 0) && isdigit( name.GetChar( ii ) ) )
|
||||
while( (ii >= 0) && wxIsdigit( name.GetChar( ii ) ) )
|
||||
{
|
||||
ii--; nn++;
|
||||
}
|
||||
|
||||
@@ -258,7 +258,7 @@ bool IFACE::OnKifaceStart( PGM_BASE* aProgram, int aCtlBits )
|
||||
|
||||
// Must be called before creating the main frame in order to
|
||||
// display the real hotkeys in menus or tool tips
|
||||
ReadHotkeyConfig( SCH_EDIT_FRAME_NAME, g_Eeschema_Hokeys_Descr );
|
||||
ReadHotkeyConfig( SCH_EDIT_FRAME_NAME, g_Eeschema_Hotkeys_Descr );
|
||||
|
||||
wxConfigLoadSetups( KifaceSettings(), cfg_params() );
|
||||
|
||||
|
||||
@@ -133,7 +133,7 @@ void LIB_EDIT_FRAME::Process_Config( wxCommandEvent& event )
|
||||
{
|
||||
case ID_PREFERENCES_HOTKEY_SHOW_CURRENT_LIST:
|
||||
// Display current hotkey list for LibEdit.
|
||||
DisplayHotkeyList( this, g_Libedit_Hokeys_Descr );
|
||||
DisplayHotkeyList( this, g_Libedit_Hotkeys_Descr );
|
||||
break;
|
||||
|
||||
default:
|
||||
@@ -158,9 +158,8 @@ void SCH_EDIT_FRAME::Process_Config( wxCommandEvent& event )
|
||||
fn = g_RootSheet->GetScreen()->GetFileName();
|
||||
fn.SetExt( ProjectFileExtension );
|
||||
|
||||
wxFileDialog dlg( this, _( "Load Project File" ), fn.GetPath(),
|
||||
fn.GetFullName(), ProjectFileWildcard(),
|
||||
wxFD_OPEN | wxFD_FILE_MUST_EXIST );
|
||||
wxFileDialog dlg( this, _( "Load Project File" ), fn.GetPath(), fn.GetFullName(),
|
||||
ProjectFileWildcard(), wxFD_OPEN | wxFD_FILE_MUST_EXIST );
|
||||
|
||||
if( dlg.ShowModal() == wxID_CANCEL )
|
||||
break;
|
||||
@@ -173,17 +172,17 @@ void SCH_EDIT_FRAME::Process_Config( wxCommandEvent& event )
|
||||
{
|
||||
// Read library list and library path list
|
||||
Prj().ConfigLoad( Kiface().KifaceSearch(), GROUP_SCH,
|
||||
GetProjectFileParametersList() );
|
||||
GetProjectFileParameters() );
|
||||
// Read schematic editor setup
|
||||
Prj().ConfigLoad( Kiface().KifaceSearch(), GROUP_SCH_EDITOR,
|
||||
GetProjectFileParametersList() );
|
||||
Prj().ConfigLoad( Kiface().KifaceSearch(), GROUP_SCH_EDIT,
|
||||
GetProjectFileParameters() );
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case ID_PREFERENCES_HOTKEY_SHOW_CURRENT_LIST:
|
||||
// Display current hotkey list for eeschema.
|
||||
DisplayHotkeyList( this, g_Schematic_Hokeys_Descr );
|
||||
DisplayHotkeyList( this, g_Schematic_Hotkeys_Descr );
|
||||
break;
|
||||
|
||||
default:
|
||||
@@ -194,7 +193,7 @@ void SCH_EDIT_FRAME::Process_Config( wxCommandEvent& event )
|
||||
|
||||
void SCH_EDIT_FRAME::OnPreferencesOptions( wxCommandEvent& event )
|
||||
{
|
||||
if( ShowPreferences( g_Eeschema_Hokeys_Descr, g_Schematic_Hokeys_Descr, wxT( "eeschema" ) ) )
|
||||
if( ShowPreferences( g_Eeschema_Hotkeys_Descr, g_Schematic_Hotkeys_Descr, wxT( "eeschema" ) ) )
|
||||
{
|
||||
SaveSettings( config() ); // save values shared by eeschema applications.
|
||||
m_canvas->Refresh( true );
|
||||
@@ -213,7 +212,7 @@ void SCH_EDIT_FRAME::InstallPreferences( PAGED_DIALOG* aParent )
|
||||
}
|
||||
|
||||
|
||||
PARAM_CFG_ARRAY& SCH_EDIT_FRAME::GetProjectFileParametersList()
|
||||
PARAM_CFG_ARRAY& SCH_EDIT_FRAME::GetProjectFileParameters()
|
||||
|
||||
{
|
||||
if( !m_projectFileParams.empty() )
|
||||
@@ -259,12 +258,10 @@ PARAM_CFG_ARRAY& SCH_EDIT_FRAME::GetProjectFileParametersList()
|
||||
bool SCH_EDIT_FRAME::LoadProjectFile()
|
||||
{
|
||||
// Read library list and library path list
|
||||
bool isRead = Prj().ConfigLoad( Kiface().KifaceSearch(),
|
||||
GROUP_SCH, GetProjectFileParametersList() );
|
||||
bool ret = Prj().ConfigLoad( Kiface().KifaceSearch(), GROUP_SCH, GetProjectFileParameters() );
|
||||
|
||||
// Read schematic editor setup
|
||||
isRead = isRead && Prj().ConfigLoad( Kiface().KifaceSearch(),
|
||||
GROUP_SCH_EDITOR, GetProjectFileParametersList() );
|
||||
ret &= Prj().ConfigLoad( Kiface().KifaceSearch(), GROUP_SCH_EDIT, GetProjectFileParameters() );
|
||||
|
||||
// Verify some values, because the config file can be edited by hand,
|
||||
// and have bad values:
|
||||
@@ -282,7 +279,7 @@ bool SCH_EDIT_FRAME::LoadProjectFile()
|
||||
|
||||
pglayout.SetPageLayout( pg_fullfilename );
|
||||
|
||||
return isRead;
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
@@ -298,8 +295,7 @@ void SCH_EDIT_FRAME::SaveProjectSettings( bool aAskForSave )
|
||||
|
||||
if( aAskForSave )
|
||||
{
|
||||
wxFileDialog dlg( this, _( "Save Project File" ),
|
||||
fn.GetPath(), fn.GetFullName(),
|
||||
wxFileDialog dlg( this, _( "Save Project File" ), fn.GetPath(), fn.GetFullName(),
|
||||
ProjectFileWildcard(), wxFD_SAVE );
|
||||
|
||||
if( dlg.ShowModal() == wxID_CANCEL )
|
||||
@@ -308,7 +304,9 @@ void SCH_EDIT_FRAME::SaveProjectSettings( bool aAskForSave )
|
||||
fn = dlg.GetPath();
|
||||
}
|
||||
|
||||
prj.ConfigSave( Kiface().KifaceSearch(), GROUP_SCH_EDITOR, GetProjectFileParametersList() );
|
||||
wxString path = fn.GetFullPath();
|
||||
|
||||
prj.ConfigSave( Kiface().KifaceSearch(), GROUP_SCH_EDIT, GetProjectFileParameters(), path );
|
||||
}
|
||||
|
||||
///@{
|
||||
@@ -390,7 +388,7 @@ void SCH_EDIT_FRAME::LoadSettings( wxConfigBase* aCfg )
|
||||
|
||||
long tmp;
|
||||
|
||||
ReadHotkeyConfig( SCH_EDIT_FRAME_NAME, g_Schematic_Hokeys_Descr );
|
||||
ReadHotkeyConfig( SCH_EDIT_FRAME_NAME, g_Schematic_Hotkeys_Descr );
|
||||
wxConfigLoadSetups( aCfg, GetConfigurationSettings() );
|
||||
|
||||
SetDefaultBusThickness( (int) aCfg->Read( DefaultBusWidthEntry, DEFAULTBUSTHICKNESS ) );
|
||||
@@ -519,7 +517,7 @@ void LIB_EDIT_FRAME::LoadSettings( wxConfigBase* aCfg )
|
||||
{
|
||||
EDA_DRAW_FRAME::LoadSettings( aCfg );
|
||||
|
||||
ReadHotkeyConfig( LIB_EDIT_FRAME_NAME, g_Libedit_Hokeys_Descr );
|
||||
ReadHotkeyConfig( LIB_EDIT_FRAME_NAME, g_Libedit_Hotkeys_Descr );
|
||||
|
||||
SetDefaultLineThickness( (int) aCfg->Read( DefaultDrawLineWidthEntry, DEFAULTDRAWLINETHICKNESS ) );
|
||||
SetDefaultPinLength( (int) aCfg->Read( DefaultPinLengthEntry, DEFAULTPINLENGTH ) );
|
||||
@@ -581,7 +579,7 @@ void LIB_EDIT_FRAME::SaveSettings( wxConfigBase* aCfg )
|
||||
|
||||
void LIB_EDIT_FRAME::OnPreferencesOptions( wxCommandEvent& event )
|
||||
{
|
||||
if( ShowPreferences( g_Eeschema_Hokeys_Descr, g_Libedit_Hokeys_Descr, wxT( "eeschema" ) ) )
|
||||
if( ShowPreferences( g_Eeschema_Hotkeys_Descr, g_Libedit_Hotkeys_Descr, wxT( "eeschema" ) ) )
|
||||
{
|
||||
SaveSettings( config() ); // save values shared by eeschema applications.
|
||||
m_canvas->Refresh( true );
|
||||
|
||||
@@ -522,7 +522,6 @@ void FIELDS_GRID_TRICKS::doPopupSelection( wxCommandEvent& event )
|
||||
else if (event.GetId() == MYID_SHOW_DATASHEET )
|
||||
{
|
||||
wxString datasheet_uri = m_grid->GetCellValue( DATASHEET, FDC_VALUE );
|
||||
datasheet_uri = ResolveUriByEnvVars( datasheet_uri );
|
||||
GetAssociatedDocument( m_dlg, datasheet_uri );
|
||||
}
|
||||
else
|
||||
|
||||
@@ -135,7 +135,7 @@ bool SCH_EDIT_FRAME::SaveEEFile( SCH_SCREEN* aScreen, bool aSaveUnderNewName,
|
||||
{
|
||||
// Delete auto save file.
|
||||
wxFileName autoSaveFileName = schematicFileName;
|
||||
autoSaveFileName.SetName( AUTOSAVE_PREFIX_FILENAME + schematicFileName.GetName() );
|
||||
autoSaveFileName.SetName( GetAutoSaveFilePrefix() + schematicFileName.GetName() );
|
||||
|
||||
if( autoSaveFileName.FileExists() )
|
||||
{
|
||||
@@ -289,6 +289,9 @@ bool SCH_EDIT_FRAME::OpenProjectFiles( const std::vector<wxString>& aFileSet, in
|
||||
g_RootSheet = NULL; // Force CreateScreens() to build new empty project on load failure.
|
||||
SCH_PLUGIN::SCH_PLUGIN_RELEASER pi( SCH_IO_MGR::FindPlugin( SCH_IO_MGR::SCH_LEGACY ) );
|
||||
|
||||
// This will rename the file if there is an autosave and the user want to recover
|
||||
CheckForAutoSaveFile( fullFileName );
|
||||
|
||||
try
|
||||
{
|
||||
g_RootSheet = pi->Load( fullFileName, &Kiway() );
|
||||
@@ -375,6 +378,8 @@ bool SCH_EDIT_FRAME::OpenProjectFiles( const std::vector<wxString>& aFileSet, in
|
||||
SyncView();
|
||||
GetScreen()->ClearDrawingState();
|
||||
|
||||
UpdateTitle();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -743,8 +748,8 @@ bool SCH_EDIT_FRAME::doAutoSave()
|
||||
|
||||
tmpFileName = fn = screen->GetFileName();
|
||||
|
||||
// Auto save file name is the normal file name prefixed with AUTOSAVE_PREFIX_FILENAME.
|
||||
fn.SetName( AUTOSAVE_PREFIX_FILENAME + fn.GetName() );
|
||||
// Auto save file name is the normal file name prefixed with GetAutoSavePrefix().
|
||||
fn.SetName( GetAutoSaveFilePrefix() + fn.GetName() );
|
||||
|
||||
screen->SetFileName( fn.GetFullPath() );
|
||||
|
||||
|
||||
@@ -372,14 +372,14 @@ void SCH_EDIT_FRAME::ConvertPart( SCH_COMPONENT* aComponent )
|
||||
|
||||
aComponent->SetConvert( aComponent->GetConvert() + 1 );
|
||||
|
||||
// ensure m_Convert = 0, 1 or 2
|
||||
// 0 and 1 = shape 1 = not converted
|
||||
// ensure m_Convert = 1 or 2
|
||||
// 1 = shape 1 = not converted
|
||||
// 2 = shape 2 = first converted shape
|
||||
// > 2 is not used but could be used for more shapes
|
||||
// like multiple shapes for a programmable component
|
||||
// When m_Convert = val max, return to the first shape
|
||||
if( aComponent->GetConvert() > 2 )
|
||||
aComponent->SetConvert( 1 );
|
||||
if( aComponent->GetConvert() > LIB_ITEM::LIB_CONVERT::DEMORGAN )
|
||||
aComponent->SetConvert( LIB_ITEM::LIB_CONVERT::BASE );
|
||||
|
||||
// The alternate symbol may cause a change in the connection status so test the
|
||||
// connections so the connection indicators are drawn correctly.
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
*
|
||||
* Copyright (C) 2004 Jean-Pierre Charras, jp.charras at wanadoo.fr
|
||||
* Copyright (C) 2008 Wayne Stambaugh <stambaughw@gmail.com>
|
||||
* Copyright (C) 2004-2017 KiCad Developers, see change_log.txt for contributors.
|
||||
* Copyright (C) 2004-2019 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
|
||||
@@ -301,5 +301,7 @@ void SCH_EDIT_FRAME::DisplayCurrentSheet()
|
||||
// Some items (wires, labels) can be highlighted. So prepare the highlight flag:
|
||||
SetCurrentSheetHighlightFlags( nullptr );
|
||||
|
||||
UpdateTitle();
|
||||
|
||||
GetCanvas()->Refresh();
|
||||
}
|
||||
|
||||
+19
-7
@@ -116,6 +116,7 @@ static EDA_HOTKEY HkZoomOut( _HKI( "Zoom Out" ), HK_ZOOM_OUT, GR_KB_CTRL + '-',
|
||||
#endif
|
||||
|
||||
static EDA_HOTKEY HkHelp( _HKI( "List Hotkeys" ), HK_HELP, GR_KB_CTRL + WXK_F1 );
|
||||
static EDA_HOTKEY HkPreferences( _HKI( "Preferences" ), HK_PREFERENCES, GR_KB_CTRL + ',', (int) wxID_PREFERENCES );
|
||||
static EDA_HOTKEY HkResetLocalCoord( _HKI( "Reset Local Coordinates" ), HK_RESET_LOCAL_COORD, ' ' );
|
||||
static EDA_HOTKEY HkLeaveSheet( _HKI( "Leave Sheet" ), HK_LEAVE_SHEET, GR_KB_ALT + WXK_BACK,
|
||||
ID_POPUP_SCH_LEAVE_SHEET );
|
||||
@@ -262,6 +263,7 @@ static EDA_HOTKEY* common_Hotkey_List[] =
|
||||
&HkUndo, &HkRedo,
|
||||
&HkEditCut, &HkEditCopy, &HkEditPaste,
|
||||
&HkHelp,
|
||||
&HkPreferences,
|
||||
&HkZoomIn,
|
||||
&HkZoomOut,
|
||||
&HkZoomRedraw,
|
||||
@@ -367,7 +369,7 @@ static wxString libEditSectionTitle( _HKI( "Library Editor" ) );
|
||||
|
||||
// list of sections and corresponding hotkey list for Eeschema (used to create
|
||||
// an hotkey config file)
|
||||
struct EDA_HOTKEY_CONFIG g_Eeschema_Hokeys_Descr[] =
|
||||
struct EDA_HOTKEY_CONFIG g_Eeschema_Hotkeys_Descr[] =
|
||||
{
|
||||
{ &g_CommonSectionTag, common_Hotkey_List, &commonSectionTitle },
|
||||
{ &schematicSectionTag, schematic_Hotkey_List, &schematicSectionTitle },
|
||||
@@ -377,7 +379,7 @@ struct EDA_HOTKEY_CONFIG g_Eeschema_Hokeys_Descr[] =
|
||||
|
||||
// list of sections and corresponding hotkey list for the schematic editor
|
||||
// (used to list current hotkeys)
|
||||
struct EDA_HOTKEY_CONFIG g_Schematic_Hokeys_Descr[] =
|
||||
struct EDA_HOTKEY_CONFIG g_Schematic_Hotkeys_Descr[] =
|
||||
{
|
||||
{ &g_CommonSectionTag, common_Hotkey_List, &commonSectionTitle },
|
||||
{ &schematicSectionTag, schematic_Hotkey_List, &schematicSectionTitle },
|
||||
@@ -386,7 +388,7 @@ struct EDA_HOTKEY_CONFIG g_Schematic_Hokeys_Descr[] =
|
||||
|
||||
// list of sections and corresponding hotkey list for the component editor
|
||||
// (used to list current hotkeys)
|
||||
struct EDA_HOTKEY_CONFIG g_Libedit_Hokeys_Descr[] =
|
||||
struct EDA_HOTKEY_CONFIG g_Libedit_Hotkeys_Descr[] =
|
||||
{
|
||||
{ &g_CommonSectionTag, common_Hotkey_List, &commonSectionTitle },
|
||||
{ &libEditSectionTag, libEdit_Hotkey_List, &libEditSectionTitle },
|
||||
@@ -395,7 +397,7 @@ struct EDA_HOTKEY_CONFIG g_Libedit_Hokeys_Descr[] =
|
||||
|
||||
// list of sections and corresponding hotkey list for the component browser
|
||||
// (used to list current hotkeys)
|
||||
struct EDA_HOTKEY_CONFIG g_Viewlib_Hokeys_Descr[] =
|
||||
struct EDA_HOTKEY_CONFIG g_Viewlib_Hotkeys_Descr[] =
|
||||
{
|
||||
{ &g_CommonSectionTag, common_basic_Hotkey_List, &commonSectionTitle },
|
||||
{ NULL, NULL, NULL }
|
||||
@@ -459,7 +461,12 @@ bool SCH_EDIT_FRAME::OnHotKey( wxDC* aDC, int aHotKey, const wxPoint& aPosition,
|
||||
return false;
|
||||
|
||||
case HK_HELP: // Display Current hotkey list
|
||||
DisplayHotkeyList( this, g_Schematic_Hokeys_Descr );
|
||||
DisplayHotkeyList( this, g_Schematic_Hotkeys_Descr );
|
||||
break;
|
||||
|
||||
case HK_PREFERENCES:
|
||||
cmd.SetId( wxID_PREFERENCES );
|
||||
GetEventHandler()->ProcessEvent( cmd );
|
||||
break;
|
||||
|
||||
case HK_RESET_LOCAL_COORD: // Reset the relative coord
|
||||
@@ -707,7 +714,12 @@ bool LIB_EDIT_FRAME::OnHotKey( wxDC* aDC, int aHotKey, const wxPoint& aPosition,
|
||||
return false;
|
||||
|
||||
case HK_HELP: // Display Current hotkey list
|
||||
DisplayHotkeyList( this, g_Libedit_Hokeys_Descr );
|
||||
DisplayHotkeyList( this, g_Libedit_Hotkeys_Descr );
|
||||
break;
|
||||
|
||||
case HK_PREFERENCES:
|
||||
cmd.SetId( wxID_PREFERENCES );
|
||||
GetEventHandler()->ProcessEvent( cmd );
|
||||
break;
|
||||
|
||||
case HK_RESET_LOCAL_COORD: // Reset the relative coord
|
||||
@@ -925,7 +937,7 @@ bool LIB_VIEW_FRAME::OnHotKey( wxDC* aDC, int aHotKey, const wxPoint& aPosition,
|
||||
return false;
|
||||
|
||||
case HK_HELP: // Display Current hotkey list
|
||||
DisplayHotkeyList( this, g_Viewlib_Hokeys_Descr );
|
||||
DisplayHotkeyList( this, g_Viewlib_Hotkeys_Descr );
|
||||
break;
|
||||
|
||||
case HK_RESET_LOCAL_COORD: // set local (relative) coordinate origin
|
||||
|
||||
+4
-4
@@ -85,15 +85,15 @@ enum hotkey_id_commnand {
|
||||
};
|
||||
|
||||
// List of hotkey descriptors for Eeschema
|
||||
extern struct EDA_HOTKEY_CONFIG g_Eeschema_Hokeys_Descr[];
|
||||
extern struct EDA_HOTKEY_CONFIG g_Eeschema_Hotkeys_Descr[];
|
||||
|
||||
// List of hotkey descriptors for the schematic editor only
|
||||
extern struct EDA_HOTKEY_CONFIG g_Schematic_Hokeys_Descr[];
|
||||
extern struct EDA_HOTKEY_CONFIG g_Schematic_Hotkeys_Descr[];
|
||||
|
||||
// List of hotkey descriptors for the lib editor only
|
||||
extern struct EDA_HOTKEY_CONFIG g_Libedit_Hokeys_Descr[];
|
||||
extern struct EDA_HOTKEY_CONFIG g_Libedit_Hotkeys_Descr[];
|
||||
|
||||
// List of hotkey descriptors for the lib browser only
|
||||
extern struct EDA_HOTKEY_CONFIG g_Viewlib_Hokeys_Descr[];
|
||||
extern struct EDA_HOTKEY_CONFIG g_Viewlib_Hotkeys_Descr[];
|
||||
|
||||
#endif // EESCHEMA_KOTKEYS_H_
|
||||
|
||||
@@ -302,8 +302,14 @@ void LIB_ARC::Plot( PLOTTER* aPlotter, const wxPoint& aOffset, bool aFill,
|
||||
}
|
||||
|
||||
bool already_filled = m_Fill == FILLED_WITH_BG_BODYCOLOR;
|
||||
aPlotter->SetColor( GetLayerColor( LAYER_DEVICE ) );
|
||||
aPlotter->Arc( pos, -t2, -t1, m_Radius, already_filled ? NO_FILL : m_Fill, GetPenSize() );
|
||||
auto pen_size = GetPenSize();
|
||||
|
||||
if( !already_filled || pen_size > 0 )
|
||||
{
|
||||
pen_size = std::max( 0, pen_size );
|
||||
aPlotter->SetColor( GetLayerColor( LAYER_DEVICE ) );
|
||||
aPlotter->Arc( pos, -t2, -t1, m_Radius, already_filled ? NO_FILL : m_Fill, GetPenSize() );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -205,8 +205,14 @@ void LIB_BEZIER::Plot( PLOTTER* aPlotter, const wxPoint& aOffset, bool aFill,
|
||||
}
|
||||
|
||||
bool already_filled = m_Fill == FILLED_WITH_BG_BODYCOLOR;
|
||||
aPlotter->SetColor( GetLayerColor( LAYER_DEVICE ) );
|
||||
aPlotter->PlotPoly( cornerList, already_filled ? NO_FILL : m_Fill, GetPenSize() );
|
||||
auto pen_size = GetPenSize();
|
||||
|
||||
if( !already_filled || pen_size > 0 )
|
||||
{
|
||||
pen_size = std::max( 0, pen_size );
|
||||
aPlotter->SetColor( GetLayerColor( LAYER_DEVICE ) );
|
||||
aPlotter->PlotPoly( cornerList, already_filled ? NO_FILL : m_Fill, GetPenSize() );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -157,8 +157,14 @@ void LIB_CIRCLE::Plot( PLOTTER* aPlotter, const wxPoint& aOffset, bool aFill,
|
||||
}
|
||||
|
||||
bool already_filled = m_Fill == FILLED_WITH_BG_BODYCOLOR;
|
||||
aPlotter->SetColor( GetLayerColor( LAYER_DEVICE ) );
|
||||
aPlotter->Circle( pos, m_Radius * 2, already_filled ? NO_FILL : m_Fill, GetPenSize() );
|
||||
auto pen_size = GetPenSize();
|
||||
|
||||
if( !already_filled || pen_size > 0 )
|
||||
{
|
||||
pen_size = std::max( 0, pen_size );
|
||||
aPlotter->SetColor( GetLayerColor( LAYER_DEVICE ) );
|
||||
aPlotter->Circle( pos, m_Radius * 2, already_filled ? NO_FILL : m_Fill, GetPenSize() );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -68,11 +68,9 @@ void LIB_ITEM::GetMsgPanelInfo( EDA_UNITS_T aUnits, MSG_PANEL_ITEMS& aList )
|
||||
|
||||
aList.push_back( MSG_PANEL_ITEM( _( "Unit" ), msg, BROWN ) );
|
||||
|
||||
if( m_Convert == 0 )
|
||||
msg = _( "All" );
|
||||
else if( m_Convert == 1 )
|
||||
if( m_Convert == LIB_ITEM::LIB_CONVERT::BASE )
|
||||
msg = _( "no" );
|
||||
else if( m_Convert == 2 )
|
||||
else if( m_Convert == LIB_ITEM::LIB_CONVERT::DEMORGAN )
|
||||
msg = _( "yes" );
|
||||
else
|
||||
msg = wxT( "?" );
|
||||
|
||||
@@ -92,7 +92,6 @@ class LIB_ITEM : public EDA_ITEM
|
||||
* @param aColor Draw color
|
||||
*/
|
||||
virtual void drawEditGraphics( EDA_RECT* aClipBox, wxDC* aDC, COLOR4D aColor ) {}
|
||||
|
||||
|
||||
friend class LIB_PART;
|
||||
|
||||
@@ -134,6 +133,10 @@ public:
|
||||
|
||||
virtual ~LIB_ITEM() { }
|
||||
|
||||
|
||||
// Define the enums for basic
|
||||
enum LIB_CONVERT : int { BASE = 1, DEMORGAN = 2 };
|
||||
|
||||
/**
|
||||
* Provide a user-consumable name of the object type. Perform localization when
|
||||
* called so that run-time language selection works.
|
||||
|
||||
@@ -163,8 +163,14 @@ void LIB_POLYLINE::Plot( PLOTTER* aPlotter, const wxPoint& aOffset, bool aFill,
|
||||
}
|
||||
|
||||
bool already_filled = m_Fill == FILLED_WITH_BG_BODYCOLOR;
|
||||
aPlotter->SetColor( GetLayerColor( LAYER_DEVICE ) );
|
||||
aPlotter->PlotPoly( cornerList, already_filled ? NO_FILL : m_Fill, GetPenSize() );
|
||||
auto pen_size = GetPenSize();
|
||||
|
||||
if( !already_filled || pen_size > 0 )
|
||||
{
|
||||
pen_size = std::max( 0, pen_size );
|
||||
aPlotter->SetColor( GetLayerColor( LAYER_DEVICE ) );
|
||||
aPlotter->PlotPoly( cornerList, already_filled ? NO_FILL : m_Fill, GetPenSize() );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -147,8 +147,14 @@ void LIB_RECTANGLE::Plot( PLOTTER* aPlotter, const wxPoint& aOffset, bool aFill,
|
||||
}
|
||||
|
||||
bool already_filled = m_Fill == FILLED_WITH_BG_BODYCOLOR;
|
||||
aPlotter->SetColor( GetLayerColor( LAYER_DEVICE ) );
|
||||
aPlotter->Rect( pos, end, already_filled ? NO_FILL : m_Fill, GetPenSize() );
|
||||
auto pen_size = GetPenSize();
|
||||
|
||||
if( !already_filled || pen_size > 0 )
|
||||
{
|
||||
pen_size = std::max( 0, pen_size );
|
||||
aPlotter->SetColor( GetLayerColor( LAYER_DEVICE ) );
|
||||
aPlotter->Rect( pos, end, already_filled ? NO_FILL : m_Fill, GetPenSize() );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -205,7 +205,7 @@ LIB_EDIT_FRAME::LIB_EDIT_FRAME( KIWAY* aKiway, wxWindow* aParent ) :
|
||||
SetShowDeMorgan( false );
|
||||
m_drawSpecificConvert = true;
|
||||
m_drawSpecificUnit = false;
|
||||
m_hotkeysDescrList = g_Libedit_Hokeys_Descr;
|
||||
m_hotkeysDescrList = g_Libedit_Hotkeys_Descr;
|
||||
m_syncPinEdit = false;
|
||||
m_repeatPinStep = DEFAULT_REPEAT_OFFSET_PIN;
|
||||
SetShowElectricalType( true );
|
||||
@@ -617,8 +617,6 @@ void LIB_EDIT_FRAME::OnViewEntryDoc( wxCommandEvent& event )
|
||||
else
|
||||
filename = part->GetAlias( 0 )->GetDocFileName();
|
||||
|
||||
filename = ResolveUriByEnvVars( filename );
|
||||
|
||||
if( !filename.IsEmpty() && filename != wxT( "~" ) )
|
||||
{
|
||||
SEARCH_STACK* lib_search = Prj().SchSearchS();
|
||||
|
||||
@@ -645,14 +645,15 @@ bool LIB_MANAGER::addLibrary( const wxString& aFilePath, bool aCreate, SYMBOL_LI
|
||||
|
||||
if( aCreate )
|
||||
{
|
||||
// CreateSymbolLib() fails if the file exists
|
||||
if( wxFileName::Exists( aFilePath ) )
|
||||
try
|
||||
{
|
||||
if( !wxRemoveFile( aFilePath ) )
|
||||
return false;
|
||||
aTable->CreateSymbolLib( libName );
|
||||
}
|
||||
catch( const IO_ERROR& e )
|
||||
{
|
||||
aTable->RemoveRow( libRow );
|
||||
return false;
|
||||
}
|
||||
|
||||
aTable->CreateSymbolLib( libName );
|
||||
}
|
||||
|
||||
m_frame.SyncLibraries( false );
|
||||
@@ -682,10 +683,12 @@ std::set<LIB_PART*> LIB_MANAGER::getOriginalParts( const wxString& aLibrary )
|
||||
LIB_ALIAS* alias = symTable()->LoadSymbol( aLibrary, aliasName );
|
||||
parts.insert( alias->GetPart() );
|
||||
}
|
||||
} catch( const IO_ERROR& e )
|
||||
}
|
||||
catch( const IO_ERROR& e )
|
||||
{
|
||||
DisplayErrorMessage( &m_frame, wxString::Format( _( "Cannot enumerate "
|
||||
"library \"%s\"" ), aLibrary ), e.What() );
|
||||
DisplayErrorMessage( &m_frame, wxString::Format( _( "Cannot enumerate library \"%s\"" ),
|
||||
aLibrary ),
|
||||
e.What() );
|
||||
}
|
||||
|
||||
return parts;
|
||||
|
||||
@@ -102,7 +102,7 @@ bool LIB_EDIT_FRAME::OnRightClick( const wxPoint& aPosition, wxMenu* PopMenu )
|
||||
{
|
||||
if( GetToolId() == ID_NO_TOOL_SELECTED )
|
||||
{
|
||||
msg = AddHotkeyName( _( "&Paste" ), g_Libedit_Hokeys_Descr, HK_EDIT_PASTE );
|
||||
msg = AddHotkeyName( _( "&Paste" ), g_Libedit_Hotkeys_Descr, HK_EDIT_PASTE );
|
||||
AddMenuItem( PopMenu, ID_POPUP_PASTE_BLOCK, msg, _( "Pastes copied item(s)" ),
|
||||
KiBitmap( paste_xpm ) );
|
||||
PopMenu->AppendSeparator();
|
||||
@@ -123,20 +123,20 @@ bool LIB_EDIT_FRAME::OnRightClick( const wxPoint& aPosition, wxMenu* PopMenu )
|
||||
case LIB_ARC_T:
|
||||
if( not_edited )
|
||||
{
|
||||
msg = AddHotkeyName( _( "Move" ), g_Libedit_Hokeys_Descr,
|
||||
msg = AddHotkeyName( _( "Move" ), g_Libedit_Hotkeys_Descr,
|
||||
HK_LIBEDIT_MOVE_GRAPHIC_ITEM );
|
||||
AddMenuItem( PopMenu, ID_POPUP_LIBEDIT_MOVE_ITEM_REQUEST, msg,
|
||||
KiBitmap( move_xpm ) );
|
||||
msg = AddHotkeyName( _( "Drag Arc Edge" ), g_Libedit_Hokeys_Descr, HK_DRAG );
|
||||
msg = AddHotkeyName( _( "Drag Arc Edge" ), g_Libedit_Hotkeys_Descr, HK_DRAG );
|
||||
AddMenuItem( PopMenu, ID_POPUP_LIBEDIT_MODIFY_ITEM, msg, KiBitmap( move_xpm ) );
|
||||
}
|
||||
|
||||
msg = AddHotkeyName( _( "Edit Arc Options" ), g_Libedit_Hokeys_Descr, HK_EDIT );
|
||||
msg = AddHotkeyName( _( "Edit Arc Options" ), g_Libedit_Hotkeys_Descr, HK_EDIT );
|
||||
AddMenuItem( PopMenu, ID_POPUP_LIBEDIT_BODY_EDIT_ITEM, msg, KiBitmap( options_arc_xpm ) );
|
||||
|
||||
if( not_edited )
|
||||
{
|
||||
msg = AddHotkeyName( _( "Delete" ), g_Libedit_Hokeys_Descr, HK_DELETE );
|
||||
msg = AddHotkeyName( _( "Delete" ), g_Libedit_Hotkeys_Descr, HK_DELETE );
|
||||
AddMenuItem( PopMenu, ID_POPUP_LIBEDIT_DELETE_ITEM, msg, KiBitmap( delete_xpm ) );
|
||||
}
|
||||
break;
|
||||
@@ -144,22 +144,22 @@ bool LIB_EDIT_FRAME::OnRightClick( const wxPoint& aPosition, wxMenu* PopMenu )
|
||||
case LIB_CIRCLE_T:
|
||||
if( not_edited )
|
||||
{
|
||||
msg = AddHotkeyName( _( "Move" ), g_Libedit_Hokeys_Descr,
|
||||
msg = AddHotkeyName( _( "Move" ), g_Libedit_Hotkeys_Descr,
|
||||
HK_LIBEDIT_MOVE_GRAPHIC_ITEM );
|
||||
AddMenuItem( PopMenu, ID_POPUP_LIBEDIT_MOVE_ITEM_REQUEST, msg,
|
||||
KiBitmap( move_xpm ) );
|
||||
msg = AddHotkeyName( _( "Drag Circle Outline" ), g_Libedit_Hokeys_Descr, HK_DRAG );
|
||||
msg = AddHotkeyName( _( "Drag Circle Outline" ), g_Libedit_Hotkeys_Descr, HK_DRAG );
|
||||
AddMenuItem( PopMenu, ID_POPUP_LIBEDIT_MODIFY_ITEM, msg,
|
||||
KiBitmap( move_rectangle_xpm ) );
|
||||
}
|
||||
|
||||
msg = AddHotkeyName( _( "Edit Circle Options..." ), g_Libedit_Hokeys_Descr, HK_EDIT );
|
||||
msg = AddHotkeyName( _( "Edit Circle Options..." ), g_Libedit_Hotkeys_Descr, HK_EDIT );
|
||||
AddMenuItem( PopMenu, ID_POPUP_LIBEDIT_BODY_EDIT_ITEM, msg,
|
||||
KiBitmap( options_circle_xpm ) );
|
||||
|
||||
if( not_edited )
|
||||
{
|
||||
msg = AddHotkeyName( _( "Delete" ), g_Libedit_Hokeys_Descr, HK_DELETE );
|
||||
msg = AddHotkeyName( _( "Delete" ), g_Libedit_Hotkeys_Descr, HK_DELETE );
|
||||
AddMenuItem( PopMenu, ID_POPUP_LIBEDIT_DELETE_ITEM, msg,
|
||||
KiBitmap( delete_circle_xpm ) );
|
||||
}
|
||||
@@ -168,22 +168,22 @@ bool LIB_EDIT_FRAME::OnRightClick( const wxPoint& aPosition, wxMenu* PopMenu )
|
||||
case LIB_RECTANGLE_T:
|
||||
if( not_edited )
|
||||
{
|
||||
msg = AddHotkeyName( _( "Move Rectangle" ), g_Libedit_Hokeys_Descr,
|
||||
msg = AddHotkeyName( _( "Move Rectangle" ), g_Libedit_Hotkeys_Descr,
|
||||
HK_LIBEDIT_MOVE_GRAPHIC_ITEM );
|
||||
AddMenuItem( PopMenu, ID_POPUP_LIBEDIT_MOVE_ITEM_REQUEST, msg,
|
||||
KiBitmap( move_rectangle_xpm ) );
|
||||
}
|
||||
|
||||
msg = AddHotkeyName( _( "Edit Rectangle Options..." ), g_Libedit_Hokeys_Descr, HK_EDIT );
|
||||
msg = AddHotkeyName( _( "Edit Rectangle Options..." ), g_Libedit_Hotkeys_Descr, HK_EDIT );
|
||||
AddMenuItem( PopMenu, ID_POPUP_LIBEDIT_BODY_EDIT_ITEM, msg,
|
||||
KiBitmap( options_rectangle_xpm ) );
|
||||
|
||||
if( not_edited )
|
||||
{
|
||||
msg = AddHotkeyName( _( "Drag Rectangle Edge" ), g_Libedit_Hokeys_Descr, HK_DRAG );
|
||||
msg = AddHotkeyName( _( "Drag Rectangle Edge" ), g_Libedit_Hotkeys_Descr, HK_DRAG );
|
||||
AddMenuItem( PopMenu, ID_POPUP_LIBEDIT_MODIFY_ITEM, msg,
|
||||
KiBitmap( move_rectangle_xpm ) );
|
||||
msg = AddHotkeyName( _( "Delete" ), g_Libedit_Hokeys_Descr, HK_DELETE );
|
||||
msg = AddHotkeyName( _( "Delete" ), g_Libedit_Hotkeys_Descr, HK_DELETE );
|
||||
AddMenuItem( PopMenu, ID_POPUP_LIBEDIT_DELETE_ITEM, msg,
|
||||
KiBitmap( delete_rectangle_xpm ) );
|
||||
}
|
||||
@@ -193,21 +193,21 @@ bool LIB_EDIT_FRAME::OnRightClick( const wxPoint& aPosition, wxMenu* PopMenu )
|
||||
case LIB_TEXT_T:
|
||||
if( not_edited )
|
||||
{
|
||||
msg = AddHotkeyName( _( "Move" ), g_Libedit_Hokeys_Descr,
|
||||
msg = AddHotkeyName( _( "Move" ), g_Libedit_Hotkeys_Descr,
|
||||
HK_LIBEDIT_MOVE_GRAPHIC_ITEM );
|
||||
AddMenuItem( PopMenu, ID_POPUP_LIBEDIT_MOVE_ITEM_REQUEST, msg,
|
||||
KiBitmap( move_xpm ) );
|
||||
}
|
||||
|
||||
msg = AddHotkeyName( _( "Edit..." ), g_Libedit_Hokeys_Descr, HK_EDIT );
|
||||
msg = AddHotkeyName( _( "Edit..." ), g_Libedit_Hotkeys_Descr, HK_EDIT );
|
||||
AddMenuItem( PopMenu, ID_POPUP_LIBEDIT_BODY_EDIT_ITEM, msg, KiBitmap( edit_text_xpm ) );
|
||||
|
||||
msg = AddHotkeyName( _( "Rotate Clockwise" ), g_Libedit_Hokeys_Descr, HK_ROTATE );
|
||||
msg = AddHotkeyName( _( "Rotate Clockwise" ), g_Libedit_Hotkeys_Descr, HK_ROTATE );
|
||||
AddMenuItem( PopMenu, ID_LIBEDIT_ROTATE_ITEM, msg, KiBitmap( rotate_cw_xpm ) );
|
||||
|
||||
if( not_edited )
|
||||
{
|
||||
msg = AddHotkeyName( _( "Delete" ), g_Libedit_Hokeys_Descr, HK_DELETE );
|
||||
msg = AddHotkeyName( _( "Delete" ), g_Libedit_Hotkeys_Descr, HK_DELETE );
|
||||
AddMenuItem( PopMenu, ID_POPUP_LIBEDIT_DELETE_ITEM, msg, KiBitmap( delete_xpm ) );
|
||||
}
|
||||
break;
|
||||
@@ -215,11 +215,11 @@ bool LIB_EDIT_FRAME::OnRightClick( const wxPoint& aPosition, wxMenu* PopMenu )
|
||||
case LIB_POLYLINE_T:
|
||||
if( not_edited )
|
||||
{
|
||||
msg = AddHotkeyName( _( "Move" ), g_Libedit_Hokeys_Descr,
|
||||
msg = AddHotkeyName( _( "Move" ), g_Libedit_Hotkeys_Descr,
|
||||
HK_LIBEDIT_MOVE_GRAPHIC_ITEM );
|
||||
AddMenuItem( PopMenu, ID_POPUP_LIBEDIT_MOVE_ITEM_REQUEST, msg,
|
||||
KiBitmap( move_xpm ) );
|
||||
msg = AddHotkeyName( _( "Drag Edge Point" ), g_Libedit_Hokeys_Descr, HK_DRAG );
|
||||
msg = AddHotkeyName( _( "Drag Edge Point" ), g_Libedit_Hotkeys_Descr, HK_DRAG );
|
||||
AddMenuItem( PopMenu, ID_POPUP_LIBEDIT_MODIFY_ITEM, msg, KiBitmap( move_exactly_xpm ) );
|
||||
}
|
||||
|
||||
@@ -229,13 +229,13 @@ bool LIB_EDIT_FRAME::OnRightClick( const wxPoint& aPosition, wxMenu* PopMenu )
|
||||
KiBitmap( checked_ok_xpm ) );
|
||||
}
|
||||
|
||||
msg = AddHotkeyName( _( "Edit Line Options..." ), g_Libedit_Hokeys_Descr, HK_EDIT );
|
||||
msg = AddHotkeyName( _( "Edit Line Options..." ), g_Libedit_Hotkeys_Descr, HK_EDIT );
|
||||
AddMenuItem( PopMenu, ID_POPUP_LIBEDIT_BODY_EDIT_ITEM, msg,
|
||||
KiBitmap( options_segment_xpm ) );
|
||||
|
||||
if( not_edited )
|
||||
{
|
||||
msg = AddHotkeyName( _( "Delete" ), g_Libedit_Hokeys_Descr, HK_DELETE );
|
||||
msg = AddHotkeyName( _( "Delete" ), g_Libedit_Hotkeys_Descr, HK_DELETE );
|
||||
AddMenuItem( PopMenu, ID_POPUP_LIBEDIT_DELETE_ITEM, msg,
|
||||
KiBitmap( delete_xpm ) );
|
||||
}
|
||||
@@ -244,7 +244,7 @@ bool LIB_EDIT_FRAME::OnRightClick( const wxPoint& aPosition, wxMenu* PopMenu )
|
||||
{
|
||||
if( ( (LIB_POLYLINE*) item )->GetCornerCount() > 2 )
|
||||
{
|
||||
msg = AddHotkeyName( _( "Delete" ), g_Libedit_Hokeys_Descr, HK_DELETE );
|
||||
msg = AddHotkeyName( _( "Delete" ), g_Libedit_Hotkeys_Descr, HK_DELETE );
|
||||
AddMenuItem( PopMenu, ID_POPUP_LIBEDIT_DELETE_CURRENT_POLY_SEGMENT,
|
||||
msg, KiBitmap( delete_xpm ) );
|
||||
}
|
||||
@@ -255,15 +255,15 @@ bool LIB_EDIT_FRAME::OnRightClick( const wxPoint& aPosition, wxMenu* PopMenu )
|
||||
case LIB_FIELD_T:
|
||||
if( not_edited )
|
||||
{
|
||||
msg = AddHotkeyName( _( "Move" ), g_Libedit_Hokeys_Descr,
|
||||
msg = AddHotkeyName( _( "Move" ), g_Libedit_Hotkeys_Descr,
|
||||
HK_LIBEDIT_MOVE_GRAPHIC_ITEM );
|
||||
AddMenuItem( PopMenu, ID_POPUP_LIBEDIT_MOVE_ITEM_REQUEST, msg,
|
||||
KiBitmap( move_xpm ) );
|
||||
}
|
||||
|
||||
msg = AddHotkeyName( _( "Rotate Clockwise" ), g_Libedit_Hokeys_Descr, HK_ROTATE );
|
||||
msg = AddHotkeyName( _( "Rotate Clockwise" ), g_Libedit_Hotkeys_Descr, HK_ROTATE );
|
||||
AddMenuItem( PopMenu, ID_LIBEDIT_ROTATE_ITEM, msg, KiBitmap( rotate_cw_xpm ) );
|
||||
msg = AddHotkeyName( _( "Edit..." ), g_Libedit_Hokeys_Descr, HK_EDIT );
|
||||
msg = AddHotkeyName( _( "Edit..." ), g_Libedit_Hotkeys_Descr, HK_EDIT );
|
||||
AddMenuItem( PopMenu, ID_POPUP_LIBEDIT_FIELD_EDIT_ITEM, msg, KiBitmap( edit_text_xpm ) );
|
||||
break;
|
||||
|
||||
@@ -287,20 +287,20 @@ void AddMenusForPin( wxMenu* PopMenu, LIB_PIN* Pin, LIB_EDIT_FRAME* frame )
|
||||
|
||||
if( not_in_move )
|
||||
{
|
||||
msg = AddHotkeyName( _( "Move" ), g_Libedit_Hokeys_Descr,
|
||||
msg = AddHotkeyName( _( "Move" ), g_Libedit_Hotkeys_Descr,
|
||||
HK_LIBEDIT_MOVE_GRAPHIC_ITEM );
|
||||
AddMenuItem( PopMenu, ID_POPUP_LIBEDIT_MOVE_ITEM_REQUEST, msg, KiBitmap( move_xpm ) );
|
||||
}
|
||||
|
||||
msg = AddHotkeyName( _( "Edit..." ), g_Libedit_Hokeys_Descr, HK_EDIT);
|
||||
msg = AddHotkeyName( _( "Edit..." ), g_Libedit_Hotkeys_Descr, HK_EDIT);
|
||||
AddMenuItem( PopMenu, ID_LIBEDIT_EDIT_PIN, msg, KiBitmap( edit_xpm ) );
|
||||
|
||||
msg = AddHotkeyName( _( "Rotate Clockwise" ), g_Libedit_Hokeys_Descr, HK_ROTATE );
|
||||
msg = AddHotkeyName( _( "Rotate Clockwise" ), g_Libedit_Hotkeys_Descr, HK_ROTATE );
|
||||
AddMenuItem( PopMenu, ID_LIBEDIT_ROTATE_ITEM, msg, KiBitmap( rotate_cw_xpm ) );
|
||||
|
||||
if( not_in_move )
|
||||
{
|
||||
msg = AddHotkeyName( _( "Delete" ), g_Libedit_Hokeys_Descr, HK_DELETE );
|
||||
msg = AddHotkeyName( _( "Delete" ), g_Libedit_Hotkeys_Descr, HK_DELETE );
|
||||
AddMenuItem( PopMenu, ID_POPUP_LIBEDIT_DELETE_ITEM, msg, KiBitmap( delete_xpm ) );
|
||||
}
|
||||
|
||||
@@ -345,25 +345,25 @@ void AddMenusForBlock( wxMenu* PopMenu, LIB_EDIT_FRAME* frame )
|
||||
AddMenuItem( PopMenu, ID_POPUP_SELECT_ITEMS_BLOCK, _( "Select Items" ),
|
||||
KiBitmap( green_xpm ) );
|
||||
|
||||
msg = AddHotkeyName( _( "Cut Block" ), g_Schematic_Hokeys_Descr, HK_EDIT_CUT );
|
||||
msg = AddHotkeyName( _( "Cut Block" ), g_Schematic_Hotkeys_Descr, HK_EDIT_CUT );
|
||||
AddMenuItem( PopMenu, ID_POPUP_CUT_BLOCK, msg, KiBitmap( cut_xpm ) );
|
||||
|
||||
msg = AddHotkeyName( _( "Copy Block" ), g_Schematic_Hokeys_Descr, HK_EDIT_COPY );
|
||||
msg = AddHotkeyName( _( "Copy Block" ), g_Schematic_Hotkeys_Descr, HK_EDIT_COPY );
|
||||
AddMenuItem( PopMenu, ID_POPUP_COPY_BLOCK, msg,
|
||||
KiBitmap( copy_xpm ) );
|
||||
|
||||
AddMenuItem( PopMenu, ID_POPUP_DUPLICATE_BLOCK, _( "Duplicate Block" ),
|
||||
KiBitmap( duplicate_xpm ) );
|
||||
|
||||
msg = AddHotkeyName( _( "Mirror Block Around Horizontal(X) Axis" ), g_Libedit_Hokeys_Descr, HK_MIRROR_X );
|
||||
msg = AddHotkeyName( _( "Mirror Block Around Horizontal(X) Axis" ), g_Libedit_Hotkeys_Descr, HK_MIRROR_X );
|
||||
AddMenuItem( PopMenu, ID_POPUP_MIRROR_X_BLOCK, msg,
|
||||
KiBitmap( mirror_v_xpm ) );
|
||||
|
||||
msg = AddHotkeyName( _( "Mirror Block Around Vertical(Y) Axis" ), g_Libedit_Hokeys_Descr, HK_MIRROR_Y );
|
||||
msg = AddHotkeyName( _( "Mirror Block Around Vertical(Y) Axis" ), g_Libedit_Hotkeys_Descr, HK_MIRROR_Y );
|
||||
AddMenuItem( PopMenu, ID_POPUP_MIRROR_Y_BLOCK, msg,
|
||||
KiBitmap( mirror_h_xpm ) );
|
||||
|
||||
msg = AddHotkeyName( _( "Rotate Counterclockwise" ), g_Libedit_Hokeys_Descr, HK_ROTATE );
|
||||
msg = AddHotkeyName( _( "Rotate Counterclockwise" ), g_Libedit_Hotkeys_Descr, HK_ROTATE );
|
||||
AddMenuItem( PopMenu, ID_POPUP_ROTATE_BLOCK, msg,
|
||||
KiBitmap( rotate_ccw_xpm ) );
|
||||
|
||||
|
||||
@@ -72,14 +72,14 @@ void LIB_EDIT_FRAME::ReCreateMenuBar()
|
||||
|
||||
fileMenu->AppendSeparator();
|
||||
|
||||
text = AddHotkeyName( _( "&Save" ), g_Libedit_Hokeys_Descr, HK_SAVE );
|
||||
text = AddHotkeyName( _( "&Save" ), g_Libedit_Hotkeys_Descr, HK_SAVE );
|
||||
AddMenuItem( fileMenu,
|
||||
ID_LIBEDIT_SAVE,
|
||||
text,
|
||||
_( "Save changes" ),
|
||||
KiBitmap( save_xpm ) );
|
||||
|
||||
text = AddHotkeyName( _( "Save &As..." ), g_Libedit_Hokeys_Descr, HK_SAVEAS );
|
||||
text = AddHotkeyName( _( "Save &As..." ), g_Libedit_Hotkeys_Descr, HK_SAVEAS );
|
||||
AddMenuItem( fileMenu,
|
||||
ID_LIBEDIT_SAVE_AS,
|
||||
text,
|
||||
@@ -135,14 +135,14 @@ void LIB_EDIT_FRAME::ReCreateMenuBar()
|
||||
// Edit menu
|
||||
wxMenu* editMenu = new wxMenu;
|
||||
|
||||
text = AddHotkeyName( _( "&Undo" ), g_Libedit_Hokeys_Descr, HK_UNDO );
|
||||
text = AddHotkeyName( _( "&Undo" ), g_Libedit_Hotkeys_Descr, HK_UNDO );
|
||||
AddMenuItem( editMenu,
|
||||
wxID_UNDO,
|
||||
text,
|
||||
_( "Undo last edit" ),
|
||||
KiBitmap( undo_xpm ) );
|
||||
|
||||
text = AddHotkeyName( _( "&Redo" ), g_Libedit_Hokeys_Descr, HK_REDO );
|
||||
text = AddHotkeyName( _( "&Redo" ), g_Libedit_Hotkeys_Descr, HK_REDO );
|
||||
AddMenuItem( editMenu,
|
||||
wxID_REDO,
|
||||
text,
|
||||
@@ -196,16 +196,16 @@ void LIB_EDIT_FRAME::ReCreateMenuBar()
|
||||
AddMenuItem( viewMenu, ID_ZOOM_OUT, text, HELP_ZOOM_OUT, KiBitmap( zoom_out_xpm ) );
|
||||
|
||||
// Fit on screen
|
||||
text = AddHotkeyName( _( "&Zoom to Fit" ), g_Libedit_Hokeys_Descr, HK_ZOOM_AUTO );
|
||||
text = AddHotkeyName( _( "&Zoom to Fit" ), g_Libedit_Hotkeys_Descr, HK_ZOOM_AUTO );
|
||||
AddMenuItem( viewMenu, ID_ZOOM_PAGE, text, _( "Zoom to fit symbol" ),
|
||||
KiBitmap( zoom_fit_in_page_xpm ) );
|
||||
|
||||
text = AddHotkeyName( _( "Zoom to Selection" ),
|
||||
g_Schematic_Hokeys_Descr, HK_ZOOM_SELECTION );
|
||||
g_Schematic_Hotkeys_Descr, HK_ZOOM_SELECTION );
|
||||
AddMenuItem( viewMenu, ID_MENU_ZOOM_SELECTION, text, KiBitmap( zoom_area_xpm ) );
|
||||
|
||||
// Redraw
|
||||
text = AddHotkeyName( _( "&Redraw" ), g_Libedit_Hokeys_Descr, HK_ZOOM_REDRAW );
|
||||
text = AddHotkeyName( _( "&Redraw" ), g_Libedit_Hotkeys_Descr, HK_ZOOM_REDRAW );
|
||||
AddMenuItem( viewMenu, ID_ZOOM_REDRAW, text, HELP_ZOOM_REDRAW, KiBitmap( zoom_redraw_xpm ) );
|
||||
|
||||
viewMenu->AppendSeparator();
|
||||
@@ -296,7 +296,7 @@ void LIB_EDIT_FRAME::ReCreateMenuBar()
|
||||
wxMenu* inspectMenu = new wxMenu;
|
||||
|
||||
|
||||
text = AddHotkeyName( _( "Show Datasheet" ), g_Libedit_Hokeys_Descr, HK_LIBEDIT_VIEW_DOC );
|
||||
text = AddHotkeyName( _( "Show Datasheet" ), g_Libedit_Hotkeys_Descr, HK_LIBEDIT_VIEW_DOC );
|
||||
AddMenuItem( inspectMenu,
|
||||
ID_LIBEDIT_VIEW_DOC,
|
||||
text,
|
||||
@@ -329,9 +329,8 @@ void LIB_EDIT_FRAME::ReCreateMenuBar()
|
||||
preferencesMenu->AppendSeparator();
|
||||
|
||||
// Default values and options
|
||||
AddMenuItem( preferencesMenu,
|
||||
wxID_PREFERENCES,
|
||||
_( "&Preferences..." ),
|
||||
text = AddHotkeyName( _( "&Preferences..." ), g_Libedit_Hotkeys_Descr, HK_PREFERENCES );
|
||||
AddMenuItem( preferencesMenu, wxID_PREFERENCES, text,
|
||||
_( "Show preferences for all open tools" ),
|
||||
KiBitmap( preference_xpm ) );
|
||||
|
||||
@@ -340,13 +339,13 @@ void LIB_EDIT_FRAME::ReCreateMenuBar()
|
||||
|
||||
preferencesMenu->AppendSeparator();
|
||||
|
||||
text = AddHotkeyName( _( "Modern Toolset (&Accelerated)" ), g_Libedit_Hokeys_Descr,
|
||||
text = AddHotkeyName( _( "Modern Toolset (&Accelerated)" ), g_Libedit_Hotkeys_Descr,
|
||||
HK_CANVAS_OPENGL );
|
||||
AddMenuItem( preferencesMenu, ID_MENU_CANVAS_OPENGL, text,
|
||||
_( "Use Modern Toolset with hardware-accelerated graphics (recommended)" ),
|
||||
KiBitmap( tools_xpm ), wxITEM_RADIO );
|
||||
|
||||
text = AddHotkeyName( _( "Modern Toolset (Fallba&ck)" ), g_Libedit_Hokeys_Descr,
|
||||
text = AddHotkeyName( _( "Modern Toolset (Fallba&ck)" ), g_Libedit_Hotkeys_Descr,
|
||||
HK_CANVAS_CAIRO );
|
||||
AddMenuItem( preferencesMenu, ID_MENU_CANVAS_CAIRO, text,
|
||||
_( "Use Modern Toolset with software graphics (fall-back)" ),
|
||||
@@ -370,7 +369,7 @@ void LIB_EDIT_FRAME::ReCreateMenuBar()
|
||||
_( "Open the \"Getting Started in KiCad\" guide for beginners" ),
|
||||
KiBitmap( help_xpm ) );
|
||||
|
||||
text = AddHotkeyName( _( "&List Hotkeys..." ), g_Libedit_Hokeys_Descr, HK_HELP );
|
||||
text = AddHotkeyName( _( "&List Hotkeys..." ), g_Libedit_Hotkeys_Descr, HK_HELP );
|
||||
AddMenuItem( helpMenu,
|
||||
ID_PREFERENCES_HOTKEY_SHOW_CURRENT_LIST,
|
||||
text,
|
||||
|
||||
@@ -121,25 +121,25 @@ void LIB_EDIT_FRAME::ReCreateHToolbar()
|
||||
|
||||
KiScaledSeparator( m_mainToolBar, this );
|
||||
|
||||
msg = AddHotkeyName( HELP_UNDO, g_Libedit_Hokeys_Descr, HK_UNDO, IS_COMMENT );
|
||||
msg = AddHotkeyName( HELP_UNDO, g_Libedit_Hotkeys_Descr, HK_UNDO, IS_COMMENT );
|
||||
m_mainToolBar->AddTool( wxID_UNDO, wxEmptyString, KiScaledBitmap( undo_xpm, this ), msg );
|
||||
|
||||
msg = AddHotkeyName( HELP_REDO, g_Libedit_Hokeys_Descr, HK_REDO, IS_COMMENT );
|
||||
msg = AddHotkeyName( HELP_REDO, g_Libedit_Hotkeys_Descr, HK_REDO, IS_COMMENT );
|
||||
m_mainToolBar->AddTool( wxID_REDO, wxEmptyString, KiScaledBitmap( redo_xpm, this ), msg );
|
||||
|
||||
KiScaledSeparator( m_mainToolBar, this );
|
||||
|
||||
msg = AddHotkeyName( HELP_ZOOM_REDRAW, g_Libedit_Hokeys_Descr, HK_ZOOM_REDRAW, IS_COMMENT );
|
||||
msg = AddHotkeyName( HELP_ZOOM_REDRAW, g_Libedit_Hotkeys_Descr, HK_ZOOM_REDRAW, IS_COMMENT );
|
||||
m_mainToolBar->AddTool( ID_ZOOM_REDRAW, wxEmptyString,
|
||||
KiScaledBitmap( zoom_redraw_xpm, this ), msg );
|
||||
|
||||
msg = AddHotkeyName( HELP_ZOOM_IN, g_Libedit_Hokeys_Descr, HK_ZOOM_IN, IS_COMMENT );
|
||||
msg = AddHotkeyName( HELP_ZOOM_IN, g_Libedit_Hotkeys_Descr, HK_ZOOM_IN, IS_COMMENT );
|
||||
m_mainToolBar->AddTool( ID_ZOOM_IN, wxEmptyString, KiScaledBitmap( zoom_in_xpm, this ), msg );
|
||||
|
||||
msg = AddHotkeyName( HELP_ZOOM_OUT, g_Libedit_Hokeys_Descr, HK_ZOOM_OUT, IS_COMMENT );
|
||||
msg = AddHotkeyName( HELP_ZOOM_OUT, g_Libedit_Hotkeys_Descr, HK_ZOOM_OUT, IS_COMMENT );
|
||||
m_mainToolBar->AddTool( ID_ZOOM_OUT, wxEmptyString, KiScaledBitmap( zoom_out_xpm, this ), msg );
|
||||
|
||||
msg = AddHotkeyName( _( "Zoom to fit symbol" ), g_Libedit_Hokeys_Descr,
|
||||
msg = AddHotkeyName( _( "Zoom to fit symbol" ), g_Libedit_Hotkeys_Descr,
|
||||
HK_ZOOM_AUTO, IS_COMMENT );
|
||||
m_mainToolBar->AddTool( ID_ZOOM_PAGE, wxEmptyString,
|
||||
KiScaledBitmap( zoom_fit_in_page_xpm, this ), msg );
|
||||
|
||||
+38
-37
@@ -140,7 +140,7 @@ void prepareViewMenu( wxMenu* aParentMenu )
|
||||
_( "Navigate schematic hierarchy" ),
|
||||
KiBitmap( hierarchy_nav_xpm ) );
|
||||
|
||||
text = AddHotkeyName( _( "&Leave Sheet" ), g_Schematic_Hokeys_Descr, HK_LEAVE_SHEET );
|
||||
text = AddHotkeyName( _( "&Leave Sheet" ), g_Schematic_Hotkeys_Descr, HK_LEAVE_SHEET );
|
||||
AddMenuItem( aParentMenu,
|
||||
ID_POPUP_SCH_LEAVE_SHEET, text,
|
||||
_( "Return to parent schematic sheet" ),
|
||||
@@ -163,24 +163,24 @@ void prepareViewMenu( wxMenu* aParentMenu )
|
||||
* using in AddHotkeyName call the option "false" (not a shortcut)
|
||||
*/
|
||||
|
||||
text = AddHotkeyName( _( "Zoom &In" ), g_Schematic_Hokeys_Descr,
|
||||
text = AddHotkeyName( _( "Zoom &In" ), g_Schematic_Hotkeys_Descr,
|
||||
HK_ZOOM_IN, IS_ACCELERATOR ); // add an accelerator, not a shortcut
|
||||
AddMenuItem( aParentMenu, ID_ZOOM_IN, text, HELP_ZOOM_IN, KiBitmap( zoom_in_xpm ) );
|
||||
|
||||
text = AddHotkeyName( _( "Zoom &Out" ), g_Schematic_Hokeys_Descr,
|
||||
text = AddHotkeyName( _( "Zoom &Out" ), g_Schematic_Hotkeys_Descr,
|
||||
HK_ZOOM_OUT, IS_ACCELERATOR ); // add accelerator, not a shortcut
|
||||
AddMenuItem( aParentMenu, ID_ZOOM_OUT, text, HELP_ZOOM_OUT, KiBitmap( zoom_out_xpm ) );
|
||||
|
||||
text = AddHotkeyName( _( "&Zoom to Fit" ), g_Schematic_Hokeys_Descr, HK_ZOOM_AUTO );
|
||||
text = AddHotkeyName( _( "&Zoom to Fit" ), g_Schematic_Hotkeys_Descr, HK_ZOOM_AUTO );
|
||||
|
||||
AddMenuItem( aParentMenu, ID_ZOOM_PAGE, text,
|
||||
HELP_ZOOM_FIT, KiBitmap( zoom_fit_in_page_xpm ) );
|
||||
|
||||
text = AddHotkeyName( _( "Zoom to Selection" ), g_Eeschema_Hokeys_Descr, HK_ZOOM_SELECTION );
|
||||
text = AddHotkeyName( _( "Zoom to Selection" ), g_Eeschema_Hotkeys_Descr, HK_ZOOM_SELECTION );
|
||||
|
||||
AddMenuItem( aParentMenu, ID_MENU_ZOOM_SELECTION, text, KiBitmap( zoom_area_xpm ) );
|
||||
|
||||
text = AddHotkeyName( _( "&Redraw" ), g_Schematic_Hokeys_Descr, HK_ZOOM_REDRAW );
|
||||
text = AddHotkeyName( _( "&Redraw" ), g_Schematic_Hotkeys_Descr, HK_ZOOM_REDRAW );
|
||||
|
||||
AddMenuItem( aParentMenu, ID_ZOOM_REDRAW, text,
|
||||
HELP_ZOOM_REDRAW, KiBitmap( zoom_redraw_xpm ) );
|
||||
@@ -232,59 +232,59 @@ void preparePlaceMenu( wxMenu* aParentMenu )
|
||||
{
|
||||
wxString text;
|
||||
|
||||
text = AddHotkeyName( _( "&Symbol" ), g_Schematic_Hokeys_Descr,
|
||||
text = AddHotkeyName( _( "&Symbol" ), g_Schematic_Hotkeys_Descr,
|
||||
HK_ADD_NEW_COMPONENT, IS_ACCELERATOR ); // add an accelerator, not a shortcut
|
||||
AddMenuItem( aParentMenu, ID_MENU_PLACE_COMPONENT, text,
|
||||
HELP_PLACE_COMPONENTS,
|
||||
KiBitmap( add_component_xpm ) );
|
||||
|
||||
text = AddHotkeyName( _( "&Power Port" ), g_Schematic_Hokeys_Descr,
|
||||
text = AddHotkeyName( _( "&Power Port" ), g_Schematic_Hotkeys_Descr,
|
||||
HK_ADD_NEW_POWER, IS_ACCELERATOR ); // add an accelerator, not a shortcut
|
||||
AddMenuItem( aParentMenu, ID_MENU_PLACE_POWER_BUTT, text,
|
||||
HELP_PLACE_POWERPORT,
|
||||
KiBitmap( add_power_xpm ) );
|
||||
|
||||
text = AddHotkeyName( _( "&Wire" ), g_Schematic_Hokeys_Descr,
|
||||
text = AddHotkeyName( _( "&Wire" ), g_Schematic_Hotkeys_Descr,
|
||||
HK_BEGIN_WIRE, IS_ACCELERATOR ); // add an accelerator, not a shortcut
|
||||
AddMenuItem( aParentMenu, ID_MENU_WIRE_BUTT, text,
|
||||
HELP_PLACE_WIRE,
|
||||
KiBitmap( add_line_xpm ) );
|
||||
|
||||
text = AddHotkeyName( _( "&Bus" ), g_Schematic_Hokeys_Descr,
|
||||
text = AddHotkeyName( _( "&Bus" ), g_Schematic_Hotkeys_Descr,
|
||||
HK_BEGIN_BUS, IS_ACCELERATOR ); // add an accelerator, not a shortcut
|
||||
AddMenuItem( aParentMenu, ID_MENU_BUS_BUTT, text,
|
||||
HELP_PLACE_BUS,
|
||||
KiBitmap( add_bus_xpm ) );
|
||||
|
||||
text = AddHotkeyName( _( "Wire to Bus &Entry" ), g_Schematic_Hokeys_Descr,
|
||||
text = AddHotkeyName( _( "Wire to Bus &Entry" ), g_Schematic_Hotkeys_Descr,
|
||||
HK_ADD_WIRE_ENTRY, IS_ACCELERATOR ); // add an accelerator, not a shortcut
|
||||
AddMenuItem( aParentMenu, ID_MENU_WIRETOBUS_ENTRY_BUTT, text,
|
||||
HELP_PLACE_WIRE2BUS_ENTRY,
|
||||
KiBitmap( add_line2bus_xpm ) );
|
||||
|
||||
text = AddHotkeyName( _( "Bus &to Bus Entry" ), g_Schematic_Hokeys_Descr,
|
||||
text = AddHotkeyName( _( "Bus &to Bus Entry" ), g_Schematic_Hotkeys_Descr,
|
||||
HK_ADD_BUS_ENTRY, IS_ACCELERATOR ); // add an accelerator, not a shortcut
|
||||
AddMenuItem( aParentMenu, ID_MENU_BUSTOBUS_ENTRY_BUTT, text,
|
||||
HELP_PLACE_BUS2BUS_ENTRY,
|
||||
KiBitmap( add_bus2bus_xpm ) );
|
||||
|
||||
text = AddHotkeyName( _( "&No Connect Flag" ), g_Schematic_Hokeys_Descr,
|
||||
text = AddHotkeyName( _( "&No Connect Flag" ), g_Schematic_Hotkeys_Descr,
|
||||
HK_ADD_NOCONN_FLAG, IS_ACCELERATOR ); // add an accelerator, not a shortcut
|
||||
AddMenuItem( aParentMenu, ID_MENU_NOCONN_BUTT, text, HELP_PLACE_NC_FLAG, KiBitmap( noconn_xpm ) );
|
||||
|
||||
text = AddHotkeyName( _( "&Junction" ), g_Schematic_Hokeys_Descr,
|
||||
text = AddHotkeyName( _( "&Junction" ), g_Schematic_Hotkeys_Descr,
|
||||
HK_ADD_JUNCTION, IS_ACCELERATOR ); // add an accelerator, not a shortcut
|
||||
AddMenuItem( aParentMenu, ID_MENU_JUNCTION_BUTT, text,
|
||||
HELP_PLACE_JUNCTION,
|
||||
KiBitmap( add_junction_xpm ) );
|
||||
|
||||
text = AddHotkeyName( _( "&Label" ), g_Schematic_Hokeys_Descr,
|
||||
text = AddHotkeyName( _( "&Label" ), g_Schematic_Hotkeys_Descr,
|
||||
HK_ADD_LABEL, IS_ACCELERATOR ); // add an accelerator, not a shortcut
|
||||
AddMenuItem( aParentMenu, ID_MENU_LABEL_BUTT, text,
|
||||
HELP_PLACE_NETLABEL,
|
||||
KiBitmap( add_line_label_xpm ) );
|
||||
|
||||
text = AddHotkeyName( _( "Gl&obal Label" ), g_Schematic_Hokeys_Descr,
|
||||
text = AddHotkeyName( _( "Gl&obal Label" ), g_Schematic_Hotkeys_Descr,
|
||||
HK_ADD_GLABEL, IS_ACCELERATOR ); // add an accelerator, not a shortcut
|
||||
AddMenuItem( aParentMenu, ID_MENU_GLABEL_BUTT, text,
|
||||
HELP_PLACE_GLOBALLABEL,
|
||||
@@ -292,14 +292,14 @@ void preparePlaceMenu( wxMenu* aParentMenu )
|
||||
|
||||
aParentMenu->AppendSeparator();
|
||||
|
||||
text = AddHotkeyName( _( "&Hierarchical Label" ), g_Schematic_Hokeys_Descr,
|
||||
text = AddHotkeyName( _( "&Hierarchical Label" ), g_Schematic_Hotkeys_Descr,
|
||||
HK_ADD_HLABEL, IS_ACCELERATOR ); // add an accelerator, not a shortcut
|
||||
AddMenuItem( aParentMenu, ID_MENU_HIERLABEL_BUTT,
|
||||
text, HELP_PLACE_HIER_LABEL,
|
||||
KiBitmap( add_hierarchical_label_xpm ) );
|
||||
|
||||
|
||||
text = AddHotkeyName( _( "Hierar&chical Sheet" ), g_Schematic_Hokeys_Descr,
|
||||
text = AddHotkeyName( _( "Hierar&chical Sheet" ), g_Schematic_Hotkeys_Descr,
|
||||
HK_ADD_HIER_SHEET, IS_ACCELERATOR ); // add an accelerator, not a shortcut
|
||||
AddMenuItem( aParentMenu, ID_MENU_SHEET_SYMBOL_BUTT, text,
|
||||
HELP_PLACE_SHEET,
|
||||
@@ -319,13 +319,13 @@ void preparePlaceMenu( wxMenu* aParentMenu )
|
||||
|
||||
aParentMenu->AppendSeparator();
|
||||
|
||||
text = AddHotkeyName( _( "Graphic Pol&yline" ), g_Schematic_Hokeys_Descr,
|
||||
text = AddHotkeyName( _( "Graphic Pol&yline" ), g_Schematic_Hotkeys_Descr,
|
||||
HK_ADD_GRAPHIC_POLYLINE, IS_ACCELERATOR ); // add an accelerator, not a shortcut
|
||||
AddMenuItem( aParentMenu, ID_MENU_LINE_COMMENT_BUTT, text,
|
||||
HELP_PLACE_GRAPHICLINES,
|
||||
KiBitmap( add_dashed_line_xpm ) );
|
||||
|
||||
text = AddHotkeyName( _( "&Graphic Text" ), g_Schematic_Hokeys_Descr,
|
||||
text = AddHotkeyName( _( "&Graphic Text" ), g_Schematic_Hotkeys_Descr,
|
||||
HK_ADD_GRAPHIC_TEXT, IS_ACCELERATOR ); // add an accelerator, not a shortcut
|
||||
AddMenuItem( aParentMenu, ID_MENU_TEXT_COMMENT_BUTT, text,
|
||||
HELP_PLACE_GRAPHICTEXTS,
|
||||
@@ -358,12 +358,12 @@ void prepareFilesMenu( wxMenu* aParentMenu, bool aIsOutsideProject )
|
||||
|
||||
if( aIsOutsideProject ) // not when under a project mgr
|
||||
{
|
||||
text = AddHotkeyName( _( "&New..." ), g_Schematic_Hokeys_Descr, HK_NEW );
|
||||
text = AddHotkeyName( _( "&New..." ), g_Schematic_Hotkeys_Descr, HK_NEW );
|
||||
AddMenuItem( aParentMenu, ID_NEW_PROJECT, text,
|
||||
_( "Start new schematic root sheet" ),
|
||||
KiBitmap( new_document_xpm ) );
|
||||
|
||||
text = AddHotkeyName( _( "&Open..." ), g_Schematic_Hokeys_Descr, HK_OPEN );
|
||||
text = AddHotkeyName( _( "&Open..." ), g_Schematic_Hotkeys_Descr, HK_OPEN );
|
||||
AddMenuItem( aParentMenu, ID_LOAD_PROJECT, text,
|
||||
_( "Open existing schematic" ),
|
||||
KiBitmap( open_document_xpm ) );
|
||||
@@ -375,7 +375,7 @@ void prepareFilesMenu( wxMenu* aParentMenu, bool aIsOutsideProject )
|
||||
aParentMenu->AppendSeparator();
|
||||
}
|
||||
|
||||
text = AddHotkeyName( _( "&Save" ), g_Schematic_Hokeys_Descr, HK_SAVE );
|
||||
text = AddHotkeyName( _( "&Save" ), g_Schematic_Hotkeys_Descr, HK_SAVE );
|
||||
AddMenuItem( aParentMenu, ID_SAVE_PROJECT, text,
|
||||
_( "Save changes" ),
|
||||
KiBitmap( save_xpm ) );
|
||||
@@ -384,7 +384,7 @@ void prepareFilesMenu( wxMenu* aParentMenu, bool aIsOutsideProject )
|
||||
_( "Save only the current sheet" ),
|
||||
KiBitmap( save_xpm ) );
|
||||
|
||||
text = AddHotkeyName( _( "Save C&urrent Sheet As..." ), g_Schematic_Hokeys_Descr, HK_SAVEAS );
|
||||
text = AddHotkeyName( _( "Save C&urrent Sheet As..." ), g_Schematic_Hotkeys_Descr, HK_SAVEAS );
|
||||
AddMenuItem( aParentMenu, ID_SAVE_ONE_SHEET_UNDER_NEW_NAME, text,
|
||||
_( "Save a copy of the current sheet" ),
|
||||
KiBitmap( save_as_xpm ) );
|
||||
@@ -431,7 +431,7 @@ void prepareFilesMenu( wxMenu* aParentMenu, bool aIsOutsideProject )
|
||||
_( "Settings for sheet size and frame references" ),
|
||||
KiBitmap( sheetset_xpm ) );
|
||||
|
||||
text = AddHotkeyName( _( "&Print..." ), g_Schematic_Hokeys_Descr, HK_PRINT );
|
||||
text = AddHotkeyName( _( "&Print..." ), g_Schematic_Hotkeys_Descr, HK_PRINT );
|
||||
AddMenuItem( aParentMenu, wxID_PRINT, text,
|
||||
_( "Print schematic sheet" ),
|
||||
KiBitmap( print_button_xpm ) );
|
||||
@@ -454,28 +454,28 @@ void prepareEditMenu( wxMenu* aParentMenu )
|
||||
wxString text;
|
||||
|
||||
// Undo
|
||||
text = AddHotkeyName( _( "&Undo" ), g_Schematic_Hokeys_Descr, HK_UNDO );
|
||||
text = AddHotkeyName( _( "&Undo" ), g_Schematic_Hotkeys_Descr, HK_UNDO );
|
||||
|
||||
AddMenuItem( aParentMenu, wxID_UNDO, text, HELP_UNDO, KiBitmap( undo_xpm ) );
|
||||
|
||||
// Redo
|
||||
text = AddHotkeyName( _( "&Redo" ), g_Schematic_Hokeys_Descr, HK_REDO );
|
||||
text = AddHotkeyName( _( "&Redo" ), g_Schematic_Hotkeys_Descr, HK_REDO );
|
||||
|
||||
AddMenuItem( aParentMenu, wxID_REDO, text, HELP_REDO, KiBitmap( redo_xpm ) );
|
||||
|
||||
aParentMenu->AppendSeparator();
|
||||
|
||||
text = AddHotkeyName( _( "&Cut" ), g_Schematic_Hokeys_Descr, HK_EDIT_CUT );
|
||||
text = AddHotkeyName( _( "&Cut" ), g_Schematic_Hotkeys_Descr, HK_EDIT_CUT );
|
||||
AddMenuItem( aParentMenu, wxID_CUT, text,
|
||||
_( "Cuts the selected item(s) to the Clipboard" ),
|
||||
KiBitmap( cut_xpm ) );
|
||||
|
||||
text = AddHotkeyName( _( "&Copy" ), g_Schematic_Hokeys_Descr, HK_EDIT_COPY );
|
||||
text = AddHotkeyName( _( "&Copy" ), g_Schematic_Hotkeys_Descr, HK_EDIT_COPY );
|
||||
AddMenuItem( aParentMenu, wxID_COPY, text,
|
||||
_( "Copies the selected item(s) to the Clipboard" ),
|
||||
KiBitmap( copy_xpm ) );
|
||||
|
||||
text = AddHotkeyName( _( "&Paste" ), g_Schematic_Hokeys_Descr, HK_EDIT_PASTE );
|
||||
text = AddHotkeyName( _( "&Paste" ), g_Schematic_Hotkeys_Descr, HK_EDIT_PASTE );
|
||||
AddMenuItem( aParentMenu, wxID_PASTE, text,
|
||||
_( "Pastes item(s) from the Clipboard" ),
|
||||
KiBitmap( paste_xpm ) );
|
||||
@@ -488,11 +488,11 @@ void prepareEditMenu( wxMenu* aParentMenu )
|
||||
|
||||
// Find
|
||||
aParentMenu->AppendSeparator();
|
||||
text = AddHotkeyName( _( "&Find..." ), g_Schematic_Hokeys_Descr, HK_FIND_ITEM );
|
||||
text = AddHotkeyName( _( "&Find..." ), g_Schematic_Hotkeys_Descr, HK_FIND_ITEM );
|
||||
AddMenuItem( aParentMenu, ID_FIND_ITEMS, text, HELP_FIND, KiBitmap( find_xpm ) );
|
||||
|
||||
// Find/Replace
|
||||
text = AddHotkeyName( _( "Find and Re&place..." ), g_Schematic_Hokeys_Descr,
|
||||
text = AddHotkeyName( _( "Find and Re&place..." ), g_Schematic_Hotkeys_Descr,
|
||||
HK_FIND_REPLACE );
|
||||
AddMenuItem( aParentMenu, wxID_REPLACE, text, HELP_REPLACE,
|
||||
KiBitmap( find_replace_xpm ) );
|
||||
@@ -520,7 +520,7 @@ void prepareToolsMenu( wxMenu* aParentMenu )
|
||||
{
|
||||
wxString text;
|
||||
|
||||
text = AddHotkeyName( _( "Update PCB from Schematic..." ), g_Schematic_Hokeys_Descr,
|
||||
text = AddHotkeyName( _( "Update PCB from Schematic..." ), g_Schematic_Hotkeys_Descr,
|
||||
HK_UPDATE_PCB_FROM_SCH );
|
||||
|
||||
AddMenuItem( aParentMenu,
|
||||
@@ -600,7 +600,7 @@ void prepareHelpMenu( wxMenu* aParentMenu )
|
||||
_( "Open \"Getting Started in KiCad\" guide for beginners" ),
|
||||
KiBitmap( help_xpm ) );
|
||||
|
||||
wxString text = AddHotkeyName( _( "&List Hotkeys..." ), g_Eeschema_Hokeys_Descr, HK_HELP );
|
||||
wxString text = AddHotkeyName( _( "&List Hotkeys..." ), g_Eeschema_Hotkeys_Descr, HK_HELP );
|
||||
AddMenuItem( aParentMenu, ID_PREFERENCES_HOTKEY_SHOW_CURRENT_LIST, text,
|
||||
_( "Displays current hotkeys table and corresponding commands" ),
|
||||
KiBitmap( hotkeys_xpm ) );
|
||||
@@ -628,7 +628,8 @@ static void preparePreferencesMenu( SCH_EDIT_FRAME* aFrame, wxMenu* aParentMenu
|
||||
KiBitmap( library_table_xpm ) );
|
||||
|
||||
// Options (Preferences on WXMAC)
|
||||
AddMenuItem( aParentMenu, wxID_PREFERENCES, _( "Preferences..." ),
|
||||
wxString text = AddHotkeyName( _( "&Preferences..." ), g_Eeschema_Hotkeys_Descr, HK_PREFERENCES );
|
||||
AddMenuItem( aParentMenu, wxID_PREFERENCES, text,
|
||||
_( "Show preferences for all open tools" ),
|
||||
KiBitmap( preference_xpm ) );
|
||||
|
||||
@@ -639,13 +640,13 @@ static void preparePreferencesMenu( SCH_EDIT_FRAME* aFrame, wxMenu* aParentMenu
|
||||
|
||||
aParentMenu->AppendSeparator();
|
||||
|
||||
wxString text = AddHotkeyName( _( "Modern Toolset (&Accelerated)" ), g_Eeschema_Hokeys_Descr,
|
||||
text = AddHotkeyName( _( "Modern Toolset (&Accelerated)" ), g_Eeschema_Hotkeys_Descr,
|
||||
HK_CANVAS_OPENGL );
|
||||
AddMenuItem( aParentMenu, ID_MENU_CANVAS_OPENGL, text,
|
||||
_( "Use Modern Toolset with hardware-accelerated graphics (recommended)" ),
|
||||
KiBitmap( tools_xpm ), wxITEM_RADIO );
|
||||
|
||||
text = AddHotkeyName( _( "Modern Toolset (Fallba&ck)" ), g_Eeschema_Hokeys_Descr,
|
||||
text = AddHotkeyName( _( "Modern Toolset (Fallba&ck)" ), g_Eeschema_Hotkeys_Descr,
|
||||
HK_CANVAS_CAIRO );
|
||||
AddMenuItem( aParentMenu, ID_MENU_CANVAS_CAIRO, text,
|
||||
_( "Use Modern Toolset with software graphics (fall-back)" ),
|
||||
|
||||
@@ -150,6 +150,15 @@ bool NETLIST_EXPORTER_PSPICE::Format( OUTPUTFORMATTER* aFormatter, unsigned aCtl
|
||||
// Replace parenthesis with underscore to prevent parse issues with simulators
|
||||
ReplaceForbiddenChars( netName );
|
||||
|
||||
// Add quotes to nets containing slashes. This isn't added to ReplaceForbidenChars
|
||||
// because this is only necessary for file writing; nets with slashes can be
|
||||
// handled by ngspice after loading.
|
||||
if( netName.Contains( "/" ) )
|
||||
{
|
||||
netName.Prepend( '"' );
|
||||
netName.Append( '"' );
|
||||
}
|
||||
|
||||
// Borrow LTSpice's nomenclature for unconnected nets
|
||||
if( netName.IsEmpty() )
|
||||
netName = wxString::Format( wxT( "NC_%.2u" ), NC_counter++ );
|
||||
|
||||
+84
-84
@@ -101,33 +101,33 @@ bool SCH_EDIT_FRAME::OnRightClick( const wxPoint& aPosition, wxMenu* PopMenu )
|
||||
break;
|
||||
|
||||
case SCH_TEXT_T:
|
||||
msg = AddHotkeyName( _( "Edit Text..." ), g_Schematic_Hokeys_Descr, HK_EDIT );
|
||||
msg = AddHotkeyName( _( "Edit Text..." ), g_Schematic_Hotkeys_Descr, HK_EDIT );
|
||||
AddMenuItem( PopMenu, ID_SCH_EDIT_ITEM, msg, KiBitmap( edit_text_xpm ) );
|
||||
PopMenu->AppendSeparator();
|
||||
break;
|
||||
|
||||
case SCH_LABEL_T:
|
||||
msg = AddHotkeyName( _( "Edit Label..." ), g_Schematic_Hokeys_Descr, HK_EDIT );
|
||||
msg = AddHotkeyName( _( "Edit Label..." ), g_Schematic_Hotkeys_Descr, HK_EDIT );
|
||||
AddMenuItem( PopMenu, ID_SCH_EDIT_ITEM, msg, KiBitmap( edit_text_xpm ) );
|
||||
PopMenu->AppendSeparator();
|
||||
break;
|
||||
|
||||
case SCH_GLOBAL_LABEL_T:
|
||||
msg = AddHotkeyName( _( "Edit Global Label..." ), g_Schematic_Hokeys_Descr,
|
||||
msg = AddHotkeyName( _( "Edit Global Label..." ), g_Schematic_Hotkeys_Descr,
|
||||
HK_EDIT );
|
||||
AddMenuItem( PopMenu, ID_SCH_EDIT_ITEM, msg, KiBitmap( edit_text_xpm ) );
|
||||
PopMenu->AppendSeparator();
|
||||
break;
|
||||
|
||||
case SCH_HIERARCHICAL_LABEL_T:
|
||||
msg = AddHotkeyName( _( "Edit Hierarchical Label..." ), g_Schematic_Hokeys_Descr,
|
||||
msg = AddHotkeyName( _( "Edit Hierarchical Label..." ), g_Schematic_Hotkeys_Descr,
|
||||
HK_EDIT );
|
||||
AddMenuItem( PopMenu, ID_SCH_EDIT_ITEM, msg, KiBitmap( edit_text_xpm ) );
|
||||
PopMenu->AppendSeparator();
|
||||
break;
|
||||
|
||||
case SCH_BITMAP_T:
|
||||
msg = AddHotkeyName( _( "Edit Image..." ), g_Schematic_Hokeys_Descr, HK_EDIT );
|
||||
msg = AddHotkeyName( _( "Edit Image..." ), g_Schematic_Hotkeys_Descr, HK_EDIT );
|
||||
AddMenuItem( PopMenu, ID_SCH_EDIT_ITEM, msg, KiBitmap( image_xpm ) );
|
||||
PopMenu->AppendSeparator();
|
||||
break;
|
||||
@@ -201,7 +201,7 @@ bool SCH_EDIT_FRAME::OnRightClick( const wxPoint& aPosition, wxMenu* PopMenu )
|
||||
{
|
||||
if( GetToolId() == ID_NO_TOOL_SELECTED && m_blockItems.GetCount() > 0 )
|
||||
{
|
||||
msg = AddHotkeyName( _( "&Paste" ), g_Schematic_Hokeys_Descr, HK_EDIT_PASTE );
|
||||
msg = AddHotkeyName( _( "&Paste" ), g_Schematic_Hotkeys_Descr, HK_EDIT_PASTE );
|
||||
AddMenuItem( PopMenu, wxID_PASTE, msg,
|
||||
_( "Pastes item(s) from the Clipboard" ),
|
||||
KiBitmap( paste_xpm ) );
|
||||
@@ -210,7 +210,7 @@ bool SCH_EDIT_FRAME::OnRightClick( const wxPoint& aPosition, wxMenu* PopMenu )
|
||||
|
||||
if( m_CurrentSheet->Last() != g_RootSheet )
|
||||
{
|
||||
msg = AddHotkeyName( _( "Leave Sheet" ), g_Schematic_Hokeys_Descr, HK_LEAVE_SHEET );
|
||||
msg = AddHotkeyName( _( "Leave Sheet" ), g_Schematic_Hotkeys_Descr, HK_LEAVE_SHEET );
|
||||
AddMenuItem( PopMenu, ID_POPUP_SCH_LEAVE_SHEET, msg,
|
||||
KiBitmap( leave_sheet_xpm ) );
|
||||
PopMenu->AppendSeparator();
|
||||
@@ -326,7 +326,7 @@ void AddMenusForComponentField( wxMenu* PopMenu, SCH_FIELD* Field )
|
||||
default: name = _( "Move Field" ); break;
|
||||
}
|
||||
|
||||
msg = AddHotkeyName( name, g_Schematic_Hokeys_Descr,
|
||||
msg = AddHotkeyName( name, g_Schematic_Hotkeys_Descr,
|
||||
HK_MOVE_COMPONENT_OR_ITEM );
|
||||
AddMenuItem( PopMenu, ID_SCH_MOVE_ITEM, msg, KiBitmap( move_xpm ) );
|
||||
}
|
||||
@@ -339,7 +339,7 @@ void AddMenusForComponentField( wxMenu* PopMenu, SCH_FIELD* Field )
|
||||
default: name = _( "Rotate Field" ); break;
|
||||
}
|
||||
|
||||
msg = AddHotkeyName( name, g_Schematic_Hokeys_Descr, HK_ROTATE );
|
||||
msg = AddHotkeyName( name, g_Schematic_Hotkeys_Descr, HK_ROTATE );
|
||||
AddMenuItem( PopMenu, ID_SCH_ROTATE_CLOCKWISE, msg, KiBitmap( rotate_cw_xpm ) );
|
||||
|
||||
// Ref, value and footprint have specific hotkeys. Show the specific hotkey:
|
||||
@@ -367,7 +367,7 @@ void AddMenusForComponentField( wxMenu* PopMenu, SCH_FIELD* Field )
|
||||
name = _( "Edit Field..." );
|
||||
break;
|
||||
}
|
||||
msg = AddHotkeyName( name, g_Schematic_Hokeys_Descr, id );
|
||||
msg = AddHotkeyName( name, g_Schematic_Hotkeys_Descr, id );
|
||||
AddMenuItem( PopMenu, ID_SCH_EDIT_ITEM, msg, KiBitmap( edit_text_xpm ) );
|
||||
}
|
||||
|
||||
@@ -385,24 +385,24 @@ void AddMenusForComponent( wxMenu* PopMenu, SCH_COMPONENT* Component, SYMBOL_LIB
|
||||
if( !Component->GetFlags() )
|
||||
{
|
||||
msg.Printf( _( "Move %s" ), Component->GetField( REFERENCE )->GetText() );
|
||||
msg = AddHotkeyName( msg, g_Schematic_Hokeys_Descr, HK_MOVE_COMPONENT_OR_ITEM );
|
||||
msg = AddHotkeyName( msg, g_Schematic_Hotkeys_Descr, HK_MOVE_COMPONENT_OR_ITEM );
|
||||
AddMenuItem( PopMenu, ID_SCH_MOVE_ITEM, msg, KiBitmap( move_xpm ) );
|
||||
msg = AddHotkeyName( _( "Drag" ), g_Schematic_Hokeys_Descr, HK_DRAG );
|
||||
msg = AddHotkeyName( _( "Drag" ), g_Schematic_Hotkeys_Descr, HK_DRAG );
|
||||
AddMenuItem( PopMenu, ID_SCH_DRAG_ITEM, msg, KiBitmap( drag_xpm ) );
|
||||
}
|
||||
|
||||
wxMenu* orientmenu = new wxMenu;
|
||||
msg = AddHotkeyName( _( "Rotate Clockwise" ), g_Schematic_Hokeys_Descr, HK_ROTATE );
|
||||
msg = AddHotkeyName( _( "Rotate Clockwise" ), g_Schematic_Hotkeys_Descr, HK_ROTATE );
|
||||
AddMenuItem( orientmenu, ID_SCH_ROTATE_CLOCKWISE, msg, KiBitmap( rotate_cw_xpm ) );
|
||||
AddMenuItem( orientmenu, ID_SCH_ROTATE_COUNTERCLOCKWISE, _( "Rotate Counterclockwise" ),
|
||||
KiBitmap( rotate_ccw_xpm ) );
|
||||
msg = AddHotkeyName( _( "Mirror Around Horizontal(X) Axis" ), g_Schematic_Hokeys_Descr,
|
||||
msg = AddHotkeyName( _( "Mirror Around Horizontal(X) Axis" ), g_Schematic_Hotkeys_Descr,
|
||||
HK_MIRROR_X );
|
||||
AddMenuItem( orientmenu, ID_SCH_MIRROR_X, msg, KiBitmap( mirror_v_xpm ) );
|
||||
msg = AddHotkeyName( _( "Mirror Around Vertical(Y) Axis" ), g_Schematic_Hokeys_Descr,
|
||||
msg = AddHotkeyName( _( "Mirror Around Vertical(Y) Axis" ), g_Schematic_Hotkeys_Descr,
|
||||
HK_MIRROR_Y );
|
||||
AddMenuItem( orientmenu, ID_SCH_MIRROR_Y, msg, KiBitmap( mirror_h_xpm ) );
|
||||
msg = AddHotkeyName( _( "Reset to Default" ), g_Schematic_Hokeys_Descr,
|
||||
msg = AddHotkeyName( _( "Reset to Default" ), g_Schematic_Hotkeys_Descr,
|
||||
HK_ORIENT_NORMAL_COMPONENT );
|
||||
AddMenuItem( orientmenu, ID_SCH_ORIENT_NORMAL, msg, KiBitmap( normal_xpm ) );
|
||||
AddMenuItem( PopMenu, orientmenu, ID_POPUP_SCH_GENERIC_ORIENT_CMP,
|
||||
@@ -412,14 +412,14 @@ void AddMenusForComponent( wxMenu* PopMenu, SCH_COMPONENT* Component, SYMBOL_LIB
|
||||
|
||||
if( !Component->GetFlags() )
|
||||
{
|
||||
msg = AddHotkeyName( _( "Duplicate" ), g_Schematic_Hokeys_Descr,
|
||||
msg = AddHotkeyName( _( "Duplicate" ), g_Schematic_Hotkeys_Descr,
|
||||
HK_DUPLICATE_ITEM );
|
||||
AddMenuItem( PopMenu, ID_POPUP_SCH_DUPLICATE_ITEM, msg, KiBitmap( duplicate_xpm ) );
|
||||
msg = AddHotkeyName( _( "Delete" ), g_Schematic_Hokeys_Descr, HK_DELETE );
|
||||
msg = AddHotkeyName( _( "Delete" ), g_Schematic_Hotkeys_Descr, HK_DELETE );
|
||||
AddMenuItem( PopMenu, ID_POPUP_SCH_DELETE_CMP, msg, KiBitmap( delete_xpm ) );
|
||||
}
|
||||
|
||||
msg = AddHotkeyName( _( "Autoplace Fields" ), g_Schematic_Hokeys_Descr, HK_AUTOPLACE_FIELDS );
|
||||
msg = AddHotkeyName( _( "Autoplace Fields" ), g_Schematic_Hotkeys_Descr, HK_AUTOPLACE_FIELDS );
|
||||
AddMenuItem( PopMenu, ID_AUTOPLACE_FIELDS, msg, KiBitmap( autoplace_fields_xpm ) );
|
||||
|
||||
if( !Component->GetField( DATASHEET )->GetFullyQualifiedText().IsEmpty() )
|
||||
@@ -452,27 +452,27 @@ void AddMenusForEditComponent( wxMenu* PopMenu, SCH_COMPONENT* Component, SYMBOL
|
||||
part = alias->GetPart();
|
||||
|
||||
wxMenu* editmenu = new wxMenu;
|
||||
msg = AddHotkeyName( _( "Edit Properties..." ), g_Schematic_Hokeys_Descr, HK_EDIT );
|
||||
msg = AddHotkeyName( _( "Edit Properties..." ), g_Schematic_Hotkeys_Descr, HK_EDIT );
|
||||
AddMenuItem( editmenu, ID_SCH_EDIT_ITEM, msg, KiBitmap( config_xpm ) );
|
||||
|
||||
if( part && part->IsNormal() )
|
||||
{
|
||||
msg = AddHotkeyName( _( "Edit Value..." ), g_Schematic_Hokeys_Descr,
|
||||
msg = AddHotkeyName( _( "Edit Value..." ), g_Schematic_Hotkeys_Descr,
|
||||
HK_EDIT_COMPONENT_VALUE );
|
||||
AddMenuItem( editmenu, ID_SCH_EDIT_COMPONENT_VALUE, msg,
|
||||
KiBitmap( edit_comp_value_xpm ) );
|
||||
|
||||
msg = AddHotkeyName( _( "Edit Reference..." ), g_Schematic_Hokeys_Descr,
|
||||
msg = AddHotkeyName( _( "Edit Reference..." ), g_Schematic_Hotkeys_Descr,
|
||||
HK_EDIT_COMPONENT_REFERENCE );
|
||||
AddMenuItem( editmenu, ID_SCH_EDIT_COMPONENT_REFERENCE, msg,
|
||||
KiBitmap( edit_comp_ref_xpm ) );
|
||||
|
||||
msg = AddHotkeyName( _( "Edit Footprint..." ), g_Schematic_Hokeys_Descr,
|
||||
msg = AddHotkeyName( _( "Edit Footprint..." ), g_Schematic_Hotkeys_Descr,
|
||||
HK_EDIT_COMPONENT_FOOTPRINT );
|
||||
AddMenuItem( editmenu, ID_SCH_EDIT_COMPONENT_FOOTPRINT, msg,
|
||||
KiBitmap( edit_comp_footprint_xpm ) );
|
||||
|
||||
msg = AddHotkeyName( _( "Show Datasheet" ), g_Schematic_Hokeys_Descr,
|
||||
msg = AddHotkeyName( _( "Show Datasheet" ), g_Schematic_Hotkeys_Descr,
|
||||
HK_SHOW_COMPONENT_DATASHEET );
|
||||
AddMenuItem( editmenu, ID_POPUP_SCH_DISPLAYDOC_CMP, msg,
|
||||
KiBitmap( datasheet_xpm ) );
|
||||
@@ -509,7 +509,7 @@ void AddMenusForEditComponent( wxMenu* PopMenu, SCH_COMPONENT* Component, SYMBOL
|
||||
|
||||
if( !Component->GetFlags() )
|
||||
{
|
||||
msg = AddHotkeyName( _( "Edit with Library Editor" ), g_Schematic_Hokeys_Descr,
|
||||
msg = AddHotkeyName( _( "Edit with Library Editor" ), g_Schematic_Hotkeys_Descr,
|
||||
HK_EDIT_COMPONENT_WITH_LIBEDIT );
|
||||
AddMenuItem( editmenu, ID_POPUP_SCH_CALL_LIBEDIT_AND_LOAD_CMP,
|
||||
msg, KiBitmap( libedit_xpm ) );
|
||||
@@ -527,22 +527,22 @@ void AddMenusForGLabel( wxMenu* PopMenu, SCH_GLOBALLABEL* GLabel )
|
||||
|
||||
if( !GLabel->GetFlags() )
|
||||
{
|
||||
msg = AddHotkeyName( _( "Move" ), g_Schematic_Hokeys_Descr,
|
||||
msg = AddHotkeyName( _( "Move" ), g_Schematic_Hotkeys_Descr,
|
||||
HK_MOVE_COMPONENT_OR_ITEM );
|
||||
AddMenuItem( PopMenu, ID_SCH_MOVE_ITEM, msg, KiBitmap( move_xpm ) );
|
||||
msg = AddHotkeyName( _( "Drag" ), g_Schematic_Hokeys_Descr,
|
||||
msg = AddHotkeyName( _( "Drag" ), g_Schematic_Hotkeys_Descr,
|
||||
HK_DRAG );
|
||||
AddMenuItem( PopMenu, ID_SCH_DRAG_ITEM, msg, KiBitmap( drag_xpm ) );
|
||||
msg = AddHotkeyName( _( "Duplicate" ), g_Schematic_Hokeys_Descr,
|
||||
msg = AddHotkeyName( _( "Duplicate" ), g_Schematic_Hotkeys_Descr,
|
||||
HK_DUPLICATE_ITEM );
|
||||
AddMenuItem( PopMenu, ID_POPUP_SCH_DUPLICATE_ITEM, msg, KiBitmap( duplicate_xpm ) );
|
||||
}
|
||||
|
||||
msg = AddHotkeyName( _( "Rotate Clockwise" ), g_Schematic_Hokeys_Descr, HK_ROTATE );
|
||||
msg = AddHotkeyName( _( "Rotate Clockwise" ), g_Schematic_Hotkeys_Descr, HK_ROTATE );
|
||||
AddMenuItem( PopMenu, ID_SCH_ROTATE_CLOCKWISE, msg, KiBitmap( rotate_cw_xpm ) );
|
||||
msg = AddHotkeyName( _( "Edit..." ), g_Schematic_Hokeys_Descr, HK_EDIT );
|
||||
msg = AddHotkeyName( _( "Edit..." ), g_Schematic_Hotkeys_Descr, HK_EDIT );
|
||||
AddMenuItem( PopMenu, ID_SCH_EDIT_ITEM, msg, KiBitmap( edit_text_xpm ) );
|
||||
msg = AddHotkeyName( _( "Delete" ), g_Schematic_Hokeys_Descr, HK_DELETE );
|
||||
msg = AddHotkeyName( _( "Delete" ), g_Schematic_Hotkeys_Descr, HK_DELETE );
|
||||
AddMenuItem( PopMenu, ID_POPUP_SCH_DELETE, msg, KiBitmap( delete_xpm ) );
|
||||
|
||||
// add menu change type text (to label, glabel, text):
|
||||
@@ -564,21 +564,21 @@ void AddMenusForHLabel( wxMenu* PopMenu, SCH_HIERLABEL* HLabel )
|
||||
|
||||
if( !HLabel->GetFlags() )
|
||||
{
|
||||
msg = AddHotkeyName( _( "Move" ), g_Schematic_Hokeys_Descr,
|
||||
msg = AddHotkeyName( _( "Move" ), g_Schematic_Hotkeys_Descr,
|
||||
HK_MOVE_COMPONENT_OR_ITEM );
|
||||
AddMenuItem( PopMenu, ID_SCH_MOVE_ITEM, msg, KiBitmap( move_xpm ) );
|
||||
msg = AddHotkeyName( _( "Drag" ), g_Schematic_Hokeys_Descr, HK_DRAG );
|
||||
msg = AddHotkeyName( _( "Drag" ), g_Schematic_Hotkeys_Descr, HK_DRAG );
|
||||
AddMenuItem( PopMenu, ID_SCH_DRAG_ITEM, msg, KiBitmap( drag_xpm ) );
|
||||
msg = AddHotkeyName( _( "Copy" ), g_Schematic_Hokeys_Descr,
|
||||
msg = AddHotkeyName( _( "Copy" ), g_Schematic_Hotkeys_Descr,
|
||||
HK_DUPLICATE_ITEM );
|
||||
AddMenuItem( PopMenu, ID_POPUP_SCH_DUPLICATE_ITEM, msg, KiBitmap( copy_xpm ) );
|
||||
}
|
||||
|
||||
msg = AddHotkeyName( _( "Rotate Clockwise" ), g_Schematic_Hokeys_Descr, HK_ROTATE );
|
||||
msg = AddHotkeyName( _( "Rotate Clockwise" ), g_Schematic_Hotkeys_Descr, HK_ROTATE );
|
||||
AddMenuItem( PopMenu, ID_SCH_ROTATE_CLOCKWISE, msg, KiBitmap( rotate_cw_xpm ) );
|
||||
msg = AddHotkeyName( _( "Edit..." ), g_Schematic_Hokeys_Descr, HK_EDIT );
|
||||
msg = AddHotkeyName( _( "Edit..." ), g_Schematic_Hotkeys_Descr, HK_EDIT );
|
||||
AddMenuItem( PopMenu, ID_SCH_EDIT_ITEM, msg, KiBitmap( edit_text_xpm ) );
|
||||
msg = AddHotkeyName( _( "Delete" ), g_Schematic_Hokeys_Descr, HK_DELETE );
|
||||
msg = AddHotkeyName( _( "Delete" ), g_Schematic_Hotkeys_Descr, HK_DELETE );
|
||||
AddMenuItem( PopMenu, ID_POPUP_SCH_DELETE, msg, KiBitmap( delete_xpm ) );
|
||||
|
||||
// add menu change type text (to label, glabel, text):
|
||||
@@ -600,19 +600,19 @@ void AddMenusForLabel( wxMenu* PopMenu, SCH_LABEL* Label )
|
||||
|
||||
if( !Label->GetFlags() )
|
||||
{
|
||||
msg = AddHotkeyName( _( "Move" ), g_Schematic_Hokeys_Descr, HK_MOVE_COMPONENT_OR_ITEM );
|
||||
msg = AddHotkeyName( _( "Move" ), g_Schematic_Hotkeys_Descr, HK_MOVE_COMPONENT_OR_ITEM );
|
||||
AddMenuItem( PopMenu, ID_SCH_MOVE_ITEM, msg, KiBitmap( move_xpm ) );
|
||||
msg = AddHotkeyName( _( "Drag" ), g_Schematic_Hokeys_Descr, HK_DRAG );
|
||||
msg = AddHotkeyName( _( "Drag" ), g_Schematic_Hotkeys_Descr, HK_DRAG );
|
||||
AddMenuItem( PopMenu, ID_SCH_DRAG_ITEM, msg, KiBitmap( drag_xpm ) );
|
||||
msg = AddHotkeyName( _( "Duplicate" ), g_Schematic_Hokeys_Descr, HK_DUPLICATE_ITEM );
|
||||
msg = AddHotkeyName( _( "Duplicate" ), g_Schematic_Hotkeys_Descr, HK_DUPLICATE_ITEM );
|
||||
AddMenuItem( PopMenu, ID_POPUP_SCH_DUPLICATE_ITEM, msg, KiBitmap( duplicate_xpm ) );
|
||||
}
|
||||
|
||||
msg = AddHotkeyName( _( "Rotate Counterclockwise" ), g_Schematic_Hokeys_Descr, HK_ROTATE );
|
||||
msg = AddHotkeyName( _( "Rotate Counterclockwise" ), g_Schematic_Hotkeys_Descr, HK_ROTATE );
|
||||
AddMenuItem( PopMenu, ID_SCH_ROTATE_CLOCKWISE, msg, KiBitmap( rotate_ccw_xpm ) );
|
||||
msg = AddHotkeyName( _( "Edit..." ), g_Schematic_Hokeys_Descr, HK_EDIT );
|
||||
msg = AddHotkeyName( _( "Edit..." ), g_Schematic_Hotkeys_Descr, HK_EDIT );
|
||||
AddMenuItem( PopMenu, ID_SCH_EDIT_ITEM, msg, KiBitmap( edit_text_xpm ) );
|
||||
msg = AddHotkeyName( _( "Delete" ), g_Schematic_Hokeys_Descr, HK_DELETE );
|
||||
msg = AddHotkeyName( _( "Delete" ), g_Schematic_Hotkeys_Descr, HK_DELETE );
|
||||
AddMenuItem( PopMenu, ID_POPUP_SCH_DELETE, msg, KiBitmap( delete_xpm ) );
|
||||
|
||||
// add menu change type text (to label, glabel, text):
|
||||
@@ -634,17 +634,17 @@ void AddMenusForText( wxMenu* PopMenu, SCH_TEXT* Text )
|
||||
|
||||
if( !Text->GetFlags() )
|
||||
{
|
||||
msg = AddHotkeyName( _( "Move" ), g_Schematic_Hokeys_Descr, HK_MOVE_COMPONENT_OR_ITEM );
|
||||
msg = AddHotkeyName( _( "Move" ), g_Schematic_Hotkeys_Descr, HK_MOVE_COMPONENT_OR_ITEM );
|
||||
AddMenuItem( PopMenu, ID_SCH_MOVE_ITEM, msg, KiBitmap( move_xpm ) );
|
||||
msg = AddHotkeyName( _( "Duplicate" ), g_Schematic_Hokeys_Descr, HK_DUPLICATE_ITEM );
|
||||
msg = AddHotkeyName( _( "Duplicate" ), g_Schematic_Hotkeys_Descr, HK_DUPLICATE_ITEM );
|
||||
AddMenuItem( PopMenu, ID_POPUP_SCH_DUPLICATE_ITEM, msg, KiBitmap( duplicate_xpm ) );
|
||||
}
|
||||
|
||||
msg = AddHotkeyName( _( "Rotate Counterclockwise" ), g_Schematic_Hokeys_Descr, HK_ROTATE );
|
||||
msg = AddHotkeyName( _( "Rotate Counterclockwise" ), g_Schematic_Hotkeys_Descr, HK_ROTATE );
|
||||
AddMenuItem( PopMenu, ID_SCH_ROTATE_CLOCKWISE, msg, KiBitmap( rotate_ccw_xpm ) );
|
||||
msg = AddHotkeyName( _( "Edit..." ), g_Schematic_Hokeys_Descr, HK_EDIT );
|
||||
msg = AddHotkeyName( _( "Edit..." ), g_Schematic_Hotkeys_Descr, HK_EDIT );
|
||||
AddMenuItem( PopMenu, ID_SCH_EDIT_ITEM, msg, KiBitmap( edit_text_xpm ) );
|
||||
msg = AddHotkeyName( _( "Delete" ), g_Schematic_Hokeys_Descr, HK_DELETE );
|
||||
msg = AddHotkeyName( _( "Delete" ), g_Schematic_Hotkeys_Descr, HK_DELETE );
|
||||
AddMenuItem( PopMenu, ID_POPUP_SCH_DELETE, msg, KiBitmap( delete_xpm ) );
|
||||
|
||||
/* add menu change type text (to label, glabel, text),
|
||||
@@ -669,7 +669,7 @@ void SCH_EDIT_FRAME::addJunctionMenuEntries( wxMenu* aMenu, SCH_JUNCTION* aJunct
|
||||
wxString msg;
|
||||
SCH_SCREEN* screen = GetScreen();
|
||||
|
||||
msg = AddHotkeyName( _( "Delete Junction" ), g_Schematic_Hokeys_Descr, HK_DELETE );
|
||||
msg = AddHotkeyName( _( "Delete Junction" ), g_Schematic_Hotkeys_Descr, HK_DELETE );
|
||||
AddMenuItem( aMenu, ID_POPUP_SCH_DELETE, msg, KiBitmap( delete_xpm ) );
|
||||
|
||||
if( !aJunction->IsNew() )
|
||||
@@ -700,22 +700,22 @@ void AddMenusForWire( wxMenu* PopMenu, SCH_LINE* Wire, SCH_EDIT_FRAME* frame )
|
||||
|
||||
if( Wire == NULL )
|
||||
{
|
||||
msg = AddHotkeyName( _( "Begin Wire" ), g_Schematic_Hokeys_Descr, HK_BEGIN_WIRE );
|
||||
msg = AddHotkeyName( _( "Begin Wire" ), g_Schematic_Hotkeys_Descr, HK_BEGIN_WIRE );
|
||||
AddMenuItem( PopMenu, ID_POPUP_SCH_BEGIN_WIRE, msg, KiBitmap( add_line_xpm ) );
|
||||
return;
|
||||
}
|
||||
|
||||
if( Wire->IsNew() )
|
||||
{
|
||||
msg = AddHotkeyName( _( "Wire End" ), g_Schematic_Hokeys_Descr, HK_END_CURR_LINEWIREBUS );
|
||||
msg = AddHotkeyName( _( "Wire End" ), g_Schematic_Hotkeys_Descr, HK_END_CURR_LINEWIREBUS );
|
||||
AddMenuItem( PopMenu, ID_POPUP_END_LINE, msg, KiBitmap( checked_ok_xpm ) );
|
||||
return;
|
||||
}
|
||||
|
||||
msg = AddHotkeyName( _( "Drag Wire" ), g_Schematic_Hokeys_Descr, HK_DRAG );
|
||||
msg = AddHotkeyName( _( "Drag Wire" ), g_Schematic_Hotkeys_Descr, HK_DRAG );
|
||||
AddMenuItem( PopMenu, ID_SCH_DRAG_ITEM, msg, KiBitmap( drag_xpm ) );
|
||||
PopMenu->AppendSeparator();
|
||||
msg = AddHotkeyName( _( "Delete Wire" ), g_Schematic_Hokeys_Descr, HK_DELETE );
|
||||
msg = AddHotkeyName( _( "Delete Wire" ), g_Schematic_Hotkeys_Descr, HK_DELETE );
|
||||
AddMenuItem( PopMenu, ID_POPUP_SCH_DELETE, msg, KiBitmap( delete_xpm ) );
|
||||
AddMenuItem( PopMenu, ID_POPUP_SCH_DELETE_NODE, _( "Delete Node" ),
|
||||
KiBitmap( delete_node_xpm ) );
|
||||
@@ -730,9 +730,9 @@ void AddMenusForWire( wxMenu* PopMenu, SCH_LINE* Wire, SCH_EDIT_FRAME* frame )
|
||||
|
||||
PopMenu->AppendSeparator();
|
||||
|
||||
msg = AddHotkeyName( _( "Add Junction" ), g_Schematic_Hokeys_Descr, HK_ADD_JUNCTION );
|
||||
msg = AddHotkeyName( _( "Add Junction" ), g_Schematic_Hotkeys_Descr, HK_ADD_JUNCTION );
|
||||
AddMenuItem( PopMenu, ID_POPUP_SCH_ADD_JUNCTION, msg, KiBitmap( add_junction_xpm ) );
|
||||
msg = AddHotkeyName( _( "Add Label..." ), g_Schematic_Hokeys_Descr, HK_ADD_LABEL );
|
||||
msg = AddHotkeyName( _( "Add Label..." ), g_Schematic_Hotkeys_Descr, HK_ADD_LABEL );
|
||||
AddMenuItem( PopMenu, ID_POPUP_SCH_ADD_LABEL, msg, KiBitmap( add_line_label_xpm ) );
|
||||
|
||||
// Add global label command only if the cursor is over one end of the wire.
|
||||
@@ -749,27 +749,27 @@ void AddMenusForBus( wxMenu* PopMenu, SCH_LINE* Bus, SCH_EDIT_FRAME* frame )
|
||||
|
||||
if( Bus == NULL )
|
||||
{
|
||||
msg = AddHotkeyName( _( "Begin Bus" ), g_Schematic_Hokeys_Descr, HK_BEGIN_BUS );
|
||||
msg = AddHotkeyName( _( "Begin Bus" ), g_Schematic_Hotkeys_Descr, HK_BEGIN_BUS );
|
||||
AddMenuItem( PopMenu, ID_POPUP_SCH_BEGIN_BUS, msg, KiBitmap( add_bus_xpm ) );
|
||||
return;
|
||||
}
|
||||
|
||||
if( Bus->IsNew() )
|
||||
{
|
||||
msg = AddHotkeyName( _( "Bus End" ), g_Schematic_Hokeys_Descr, HK_END_CURR_LINEWIREBUS );
|
||||
msg = AddHotkeyName( _( "Bus End" ), g_Schematic_Hotkeys_Descr, HK_END_CURR_LINEWIREBUS );
|
||||
AddMenuItem( PopMenu, ID_POPUP_END_LINE, msg, KiBitmap( checked_ok_xpm ) );
|
||||
return;
|
||||
}
|
||||
|
||||
msg = AddHotkeyName( _( "Delete Bus" ), g_Schematic_Hokeys_Descr, HK_DELETE );
|
||||
msg = AddHotkeyName( _( "Delete Bus" ), g_Schematic_Hotkeys_Descr, HK_DELETE );
|
||||
AddMenuItem( PopMenu, ID_POPUP_SCH_DELETE, msg, KiBitmap( delete_bus_xpm ) );
|
||||
|
||||
AddMenuItem( PopMenu, ID_POPUP_SCH_BREAK_WIRE, _( "Break Bus" ), KiBitmap( break_bus_xpm ) );
|
||||
|
||||
PopMenu->AppendSeparator();
|
||||
msg = AddHotkeyName( _( "Add Junction" ), g_Schematic_Hokeys_Descr, HK_ADD_JUNCTION );
|
||||
msg = AddHotkeyName( _( "Add Junction" ), g_Schematic_Hotkeys_Descr, HK_ADD_JUNCTION );
|
||||
AddMenuItem( PopMenu, ID_POPUP_SCH_ADD_JUNCTION, msg, KiBitmap( add_junction_xpm ) );
|
||||
msg = AddHotkeyName( _( "Add Label..." ), g_Schematic_Hokeys_Descr, HK_ADD_LABEL );
|
||||
msg = AddHotkeyName( _( "Add Label..." ), g_Schematic_Hotkeys_Descr, HK_ADD_LABEL );
|
||||
AddMenuItem( PopMenu, ID_POPUP_SCH_ADD_LABEL, msg, KiBitmap( add_line_label_xpm ) );
|
||||
|
||||
// Add global label command only if the cursor is over one end of the bus.
|
||||
@@ -788,30 +788,30 @@ void AddMenusForHierchicalSheet( wxMenu* PopMenu, SCH_SHEET* Sheet )
|
||||
AddMenuItem( PopMenu, ID_POPUP_SCH_ENTER_SHEET, _( "Enter Sheet" ),
|
||||
KiBitmap( enter_sheet_xpm ) );
|
||||
PopMenu->AppendSeparator();
|
||||
msg = AddHotkeyName( _( "Move" ), g_Schematic_Hokeys_Descr,
|
||||
msg = AddHotkeyName( _( "Move" ), g_Schematic_Hotkeys_Descr,
|
||||
HK_MOVE_COMPONENT_OR_ITEM );
|
||||
AddMenuItem( PopMenu, ID_SCH_MOVE_ITEM, msg, KiBitmap( move_xpm ) );
|
||||
|
||||
msg = AddHotkeyName( _( "Drag" ), g_Schematic_Hokeys_Descr, HK_DRAG );
|
||||
msg = AddHotkeyName( _( "Drag" ), g_Schematic_Hotkeys_Descr, HK_DRAG );
|
||||
AddMenuItem( PopMenu, ID_SCH_DRAG_ITEM, msg, KiBitmap( drag_xpm ) );
|
||||
|
||||
PopMenu->AppendSeparator();
|
||||
msg = AddHotkeyName( _( "Select Items On PCB" ), g_Schematic_Hokeys_Descr,
|
||||
msg = AddHotkeyName( _( "Select Items On PCB" ), g_Schematic_Hotkeys_Descr,
|
||||
HK_SELECT_ITEMS_ON_PCB );
|
||||
AddMenuItem( PopMenu, ID_POPUP_SCH_SELECT_ON_PCB, msg, KiBitmap( select_same_sheet_xpm ) );
|
||||
PopMenu->AppendSeparator();
|
||||
|
||||
wxMenu* orientmenu = new wxMenu;
|
||||
msg = AddHotkeyName( _( "Rotate Clockwise" ), g_Schematic_Hokeys_Descr, HK_ROTATE );
|
||||
msg = AddHotkeyName( _( "Rotate Clockwise" ), g_Schematic_Hotkeys_Descr, HK_ROTATE );
|
||||
AddMenuItem( orientmenu, ID_SCH_ROTATE_CLOCKWISE, msg, KiBitmap( rotate_cw_xpm ) );
|
||||
|
||||
AddMenuItem( orientmenu, ID_SCH_ROTATE_COUNTERCLOCKWISE, _( "Rotate Counterclockwise" ),
|
||||
KiBitmap( rotate_ccw_xpm ) );
|
||||
|
||||
msg = AddHotkeyName( _( "Mirror Around Horizontal(X) Axis" ), g_Schematic_Hokeys_Descr,
|
||||
msg = AddHotkeyName( _( "Mirror Around Horizontal(X) Axis" ), g_Schematic_Hotkeys_Descr,
|
||||
HK_MIRROR_X );
|
||||
AddMenuItem( orientmenu, ID_SCH_MIRROR_X, msg, KiBitmap( mirror_v_xpm ) );
|
||||
msg = AddHotkeyName( _( "Mirror Around Vertical(Y) Axis" ), g_Schematic_Hokeys_Descr,
|
||||
msg = AddHotkeyName( _( "Mirror Around Vertical(Y) Axis" ), g_Schematic_Hotkeys_Descr,
|
||||
HK_MIRROR_Y );
|
||||
AddMenuItem( orientmenu, ID_SCH_MIRROR_Y, msg, KiBitmap( mirror_h_xpm ) );
|
||||
|
||||
@@ -825,7 +825,7 @@ void AddMenusForHierchicalSheet( wxMenu* PopMenu, SCH_SHEET* Sheet )
|
||||
}
|
||||
else
|
||||
{
|
||||
msg = AddHotkeyName( _( "Edit..." ), g_Schematic_Hokeys_Descr, HK_EDIT );
|
||||
msg = AddHotkeyName( _( "Edit..." ), g_Schematic_Hotkeys_Descr, HK_EDIT );
|
||||
AddMenuItem( PopMenu, ID_SCH_EDIT_ITEM, msg, KiBitmap( editor_xpm ) );
|
||||
|
||||
AddMenuItem( PopMenu, ID_POPUP_SCH_RESIZE_SHEET, _( "Resize" ),
|
||||
@@ -839,7 +839,7 @@ void AddMenusForHierchicalSheet( wxMenu* PopMenu, SCH_SHEET* Sheet )
|
||||
KiBitmap( options_pinsheet_xpm ) );
|
||||
|
||||
PopMenu->AppendSeparator();
|
||||
msg = AddHotkeyName( _( "Delete" ), g_Schematic_Hokeys_Descr, HK_DELETE );
|
||||
msg = AddHotkeyName( _( "Delete" ), g_Schematic_Hotkeys_Descr, HK_DELETE );
|
||||
AddMenuItem( PopMenu, ID_POPUP_SCH_DELETE, msg, KiBitmap( delete_sheet_xpm ) );
|
||||
}
|
||||
}
|
||||
@@ -851,7 +851,7 @@ void AddMenusForSheetPin( wxMenu* PopMenu, SCH_SHEET_PIN* PinSheet )
|
||||
|
||||
if( !PinSheet->GetFlags() )
|
||||
{
|
||||
msg = AddHotkeyName( _( "Move" ), g_Schematic_Hokeys_Descr, HK_MOVE_COMPONENT_OR_ITEM );
|
||||
msg = AddHotkeyName( _( "Move" ), g_Schematic_Hotkeys_Descr, HK_MOVE_COMPONENT_OR_ITEM );
|
||||
AddMenuItem( PopMenu, ID_SCH_MOVE_ITEM, msg, KiBitmap( move_xpm ) );
|
||||
}
|
||||
|
||||
@@ -880,26 +880,26 @@ void AddMenusForBlock( wxMenu* PopMenu, SCH_EDIT_FRAME* frame )
|
||||
// a block function.
|
||||
if( frame->GetScreen()->m_BlockLocate.GetCommand() == BLOCK_MOVE )
|
||||
{
|
||||
msg = AddHotkeyName( _( "Cut Block" ), g_Schematic_Hokeys_Descr,
|
||||
msg = AddHotkeyName( _( "Cut Block" ), g_Schematic_Hotkeys_Descr,
|
||||
HK_EDIT_CUT );
|
||||
AddMenuItem( PopMenu, ID_POPUP_CUT_BLOCK, msg, KiBitmap( cut_xpm ) );
|
||||
msg = AddHotkeyName( _( "Copy Block" ), g_Schematic_Hokeys_Descr,
|
||||
msg = AddHotkeyName( _( "Copy Block" ), g_Schematic_Hotkeys_Descr,
|
||||
HK_EDIT_COPY );
|
||||
AddMenuItem( PopMenu, ID_POPUP_COPY_BLOCK, msg, KiBitmap( copy_xpm ) );
|
||||
AddMenuItem( PopMenu, ID_POPUP_DUPLICATE_BLOCK, _( "Duplicate Block" ),
|
||||
KiBitmap( duplicate_xpm ) );
|
||||
msg = AddHotkeyName( _( "Drag Block" ), g_Schematic_Hokeys_Descr,
|
||||
msg = AddHotkeyName( _( "Drag Block" ), g_Schematic_Hotkeys_Descr,
|
||||
HK_MOVEBLOCK_TO_DRAGBLOCK );
|
||||
AddMenuItem( PopMenu, ID_POPUP_DRAG_BLOCK, msg, KiBitmap( drag_xpm ) );
|
||||
msg = AddHotkeyName( _( "Delete Block" ), g_Schematic_Hokeys_Descr, HK_DELETE );
|
||||
msg = AddHotkeyName( _( "Delete Block" ), g_Schematic_Hotkeys_Descr, HK_DELETE );
|
||||
AddMenuItem( PopMenu, ID_POPUP_DELETE_BLOCK, msg, KiBitmap( delete_xpm ) );
|
||||
msg = AddHotkeyName( _( "Mirror Block Around Vertical(Y) Axis" ), g_Schematic_Hokeys_Descr,
|
||||
msg = AddHotkeyName( _( "Mirror Block Around Vertical(Y) Axis" ), g_Schematic_Hotkeys_Descr,
|
||||
HK_MIRROR_Y );
|
||||
AddMenuItem( PopMenu, ID_SCH_MIRROR_Y, msg, KiBitmap( mirror_h_xpm ) );
|
||||
msg = AddHotkeyName( _( "Mirror Block Around Horizontal(X) Axis" ),
|
||||
g_Schematic_Hokeys_Descr, HK_MIRROR_X );
|
||||
g_Schematic_Hotkeys_Descr, HK_MIRROR_X );
|
||||
AddMenuItem( PopMenu, ID_SCH_MIRROR_X, msg, KiBitmap( mirror_v_xpm ) );
|
||||
msg = AddHotkeyName( _( "Rotate Block CCW" ), g_Schematic_Hokeys_Descr, HK_ROTATE );
|
||||
msg = AddHotkeyName( _( "Rotate Block CCW" ), g_Schematic_Hotkeys_Descr, HK_ROTATE );
|
||||
AddMenuItem( PopMenu, ID_SCH_ROTATE_CLOCKWISE, msg, KiBitmap( rotate_ccw_xpm ) );
|
||||
|
||||
#if 0
|
||||
@@ -926,26 +926,26 @@ void AddMenusForBitmap( wxMenu* aPopMenu, SCH_BITMAP * aBitmap )
|
||||
|
||||
if( aBitmap->GetFlags() == 0 )
|
||||
{
|
||||
msg = AddHotkeyName( _( "Move" ), g_Schematic_Hokeys_Descr,
|
||||
msg = AddHotkeyName( _( "Move" ), g_Schematic_Hotkeys_Descr,
|
||||
HK_MOVE_COMPONENT_OR_ITEM );
|
||||
AddMenuItem( aPopMenu, ID_SCH_MOVE_ITEM, msg, KiBitmap( move_xpm ) );
|
||||
}
|
||||
|
||||
msg = AddHotkeyName( _( "Rotate Counterclockwise" ), g_Schematic_Hokeys_Descr, HK_ROTATE );
|
||||
msg = AddHotkeyName( _( "Rotate Counterclockwise" ), g_Schematic_Hotkeys_Descr, HK_ROTATE );
|
||||
AddMenuItem( aPopMenu, ID_SCH_ROTATE_CLOCKWISE, msg, KiBitmap( rotate_ccw_xpm ) );
|
||||
msg = AddHotkeyName( _( "Mirror Around Horizontal(X) Axis" ), g_Schematic_Hokeys_Descr,
|
||||
msg = AddHotkeyName( _( "Mirror Around Horizontal(X) Axis" ), g_Schematic_Hotkeys_Descr,
|
||||
HK_MIRROR_X );
|
||||
AddMenuItem( aPopMenu, ID_SCH_MIRROR_X, msg, KiBitmap( mirror_v_xpm ) );
|
||||
msg = AddHotkeyName( _( "Mirror Around Vertical(Y) Axis" ), g_Schematic_Hokeys_Descr,
|
||||
msg = AddHotkeyName( _( "Mirror Around Vertical(Y) Axis" ), g_Schematic_Hotkeys_Descr,
|
||||
HK_MIRROR_Y );
|
||||
AddMenuItem( aPopMenu, ID_SCH_MIRROR_Y, msg, KiBitmap( mirror_h_xpm ) );
|
||||
msg = AddHotkeyName( _( "Edit Image..." ), g_Schematic_Hokeys_Descr, HK_EDIT );
|
||||
msg = AddHotkeyName( _( "Edit Image..." ), g_Schematic_Hotkeys_Descr, HK_EDIT );
|
||||
AddMenuItem( aPopMenu, ID_SCH_EDIT_ITEM, msg, KiBitmap( image_xpm ) );
|
||||
|
||||
if( aBitmap->GetFlags() == 0 )
|
||||
{
|
||||
aPopMenu->AppendSeparator();
|
||||
msg = AddHotkeyName( _( "Delete" ), g_Schematic_Hokeys_Descr, HK_DELETE );
|
||||
msg = AddHotkeyName( _( "Delete" ), g_Schematic_Hotkeys_Descr, HK_DELETE );
|
||||
AddMenuItem( aPopMenu, ID_POPUP_SCH_DELETE, msg, KiBitmap( delete_xpm ) );
|
||||
}
|
||||
}
|
||||
@@ -957,7 +957,7 @@ void AddMenusForBusEntry( wxMenu* aPopMenu, SCH_BUS_ENTRY_BASE* aBusEntry )
|
||||
|
||||
if( !aBusEntry->GetFlags() )
|
||||
{
|
||||
msg = AddHotkeyName( _( "Move Bus Entry" ), g_Schematic_Hokeys_Descr,
|
||||
msg = AddHotkeyName( _( "Move Bus Entry" ), g_Schematic_Hotkeys_Descr,
|
||||
HK_MOVE_COMPONENT_OR_ITEM );
|
||||
AddMenuItem( aPopMenu, ID_SCH_MOVE_ITEM, msg, KiBitmap( move_xpm ) );
|
||||
}
|
||||
@@ -969,6 +969,6 @@ void AddMenusForBusEntry( wxMenu* aPopMenu, SCH_BUS_ENTRY_BASE* aBusEntry )
|
||||
AddMenuItem( aPopMenu, ID_POPUP_SCH_ENTRY_SELECT_ANTISLASH,
|
||||
_( "Set Bus Entry Shape \\" ), KiBitmap( change_entry_orient_xpm ) );
|
||||
|
||||
msg = AddHotkeyName( _( "Delete Bus Entry" ), g_Schematic_Hokeys_Descr, HK_DELETE );
|
||||
msg = AddHotkeyName( _( "Delete Bus Entry" ), g_Schematic_Hotkeys_Descr, HK_DELETE );
|
||||
AddMenuItem( aPopMenu, ID_POPUP_SCH_DELETE, msg, KiBitmap( delete_xpm ) );
|
||||
}
|
||||
|
||||
+10
-9
@@ -23,6 +23,7 @@
|
||||
*/
|
||||
|
||||
#include "pin_number.h"
|
||||
#include <wx/crt.h>
|
||||
|
||||
namespace {
|
||||
|
||||
@@ -33,16 +34,16 @@ wxString GetNextComponent( const wxString& str, wxString::size_type& cursor )
|
||||
|
||||
wxString::size_type begin = cursor;
|
||||
|
||||
wxUniChar c = str[cursor];
|
||||
wxChar c = str[cursor];
|
||||
|
||||
if( isdigit( c ) || c == '+' || c == '-' )
|
||||
if( wxIsdigit( c ) || c == '+' || c == '-' )
|
||||
{
|
||||
// number, possibly with sign
|
||||
while( ++cursor < str.size() )
|
||||
{
|
||||
c = str[cursor];
|
||||
|
||||
if( isdigit( c ) || c == 'v' || c == 'V' )
|
||||
if( wxIsdigit( c ) || c == 'v' || c == 'V' )
|
||||
continue;
|
||||
else
|
||||
break;
|
||||
@@ -54,7 +55,7 @@ wxString GetNextComponent( const wxString& str, wxString::size_type& cursor )
|
||||
{
|
||||
c = str[cursor];
|
||||
|
||||
if( isdigit( c ) )
|
||||
if( wxIsdigit( c ) )
|
||||
break;
|
||||
else
|
||||
continue;
|
||||
@@ -128,12 +129,12 @@ int PinNumbers::Compare( const PinNumber& lhs, const PinNumber& rhs )
|
||||
if( comp2.empty() )
|
||||
return 2;
|
||||
|
||||
wxUniChar c1 = comp1[0];
|
||||
wxUniChar c2 = comp2[0];
|
||||
wxChar c1 = comp1[0];
|
||||
wxChar c2 = comp2[0];
|
||||
|
||||
if( isdigit( c1 ) || c1 == '-' || c1 == '+' )
|
||||
if( wxIsdigit( c1 ) || c1 == '-' || c1 == '+' )
|
||||
{
|
||||
if( isdigit( c2 ) || c2 == '-' || c2 == '+' )
|
||||
if( wxIsdigit( c2 ) || c2 == '-' || c2 == '+' )
|
||||
{
|
||||
// numeric comparison
|
||||
wxString::size_type v1 = comp1.find_first_of( "vV" );
|
||||
@@ -172,7 +173,7 @@ int PinNumbers::Compare( const PinNumber& lhs, const PinNumber& rhs )
|
||||
}
|
||||
else
|
||||
{
|
||||
if( isdigit( c2 ) || c2 == '-' || c2 == '+' )
|
||||
if( wxIsdigit( c2 ) || c2 == '-' || c2 == '+' )
|
||||
return 2;
|
||||
|
||||
int res = comp1.Cmp( comp2 );
|
||||
|
||||
@@ -162,8 +162,10 @@ void SCH_BUS_ENTRY_BASE::Draw( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPoint&
|
||||
|
||||
if( aColor != COLOR4D::UNSPECIFIED )
|
||||
color = aColor;
|
||||
else if( aPanel->GetScreen() && !aPanel->GetScreen()->m_IsPrinting && GetState( BRIGHTENED ) )
|
||||
color = GetLayerColor( LAYER_BRIGHTENED );
|
||||
else
|
||||
color = GetLayerColor( GetState( BRIGHTENED ) ? LAYER_BRIGHTENED : m_Layer );
|
||||
color = GetLayerColor( m_Layer );
|
||||
|
||||
GRSetDrawMode( aDC, aDrawMode );
|
||||
|
||||
|
||||
@@ -135,6 +135,7 @@ const KICAD_T SCH_COLLECTOR::MovableItems[] = {
|
||||
|
||||
const KICAD_T SCH_COLLECTOR::DraggableItems[] = {
|
||||
SCH_JUNCTION_T,
|
||||
SCH_NO_CONNECT_T,
|
||||
SCH_BUS_BUS_ENTRY_T,
|
||||
SCH_BUS_WIRE_ENTRY_T,
|
||||
SCH_LINE_T,
|
||||
|
||||
@@ -193,8 +193,8 @@ SCH_COMPONENT::SCH_COMPONENT( const SCH_COMPONENT& aComponent ) :
|
||||
void SCH_COMPONENT::Init( const wxPoint& pos )
|
||||
{
|
||||
m_Pos = pos;
|
||||
m_unit = 0; // In multi unit chip - which unit to draw.
|
||||
m_convert = 0; // De Morgan Handling
|
||||
m_unit = 1; // In multi unit chip - which unit to draw.
|
||||
m_convert = LIB_ITEM::LIB_CONVERT::BASE; // De Morgan Handling
|
||||
|
||||
// The rotation/mirror transformation matrix. pos normal
|
||||
m_transform = TRANSFORM();
|
||||
@@ -732,7 +732,7 @@ bool SCH_COMPONENT::IsReferenceStringValid( const wxString& aReferenceString )
|
||||
bool ok = true;
|
||||
|
||||
// Try to unannotate this reference
|
||||
while( !text.IsEmpty() && ( text.Last() == '?' || std::isdigit( text.Last().GetValue() ) ) )
|
||||
while( !text.IsEmpty() && ( text.Last() == '?' || wxIsdigit( text.Last() ) ) )
|
||||
text.RemoveLast();
|
||||
|
||||
if( text.IsEmpty() )
|
||||
@@ -795,7 +795,7 @@ void SCH_COMPONENT::SetRef( const SCH_SHEET_PATH* sheet, const wxString& ref )
|
||||
|
||||
if( IsReferenceStringValid( prefix ) )
|
||||
{
|
||||
while( prefix.Last() == '?' || std::isdigit( prefix.Last().GetValue() ) )
|
||||
while( prefix.Last() == '?' || wxIsdigit( prefix.Last() ) )
|
||||
prefix.RemoveLast();
|
||||
}
|
||||
else
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
*
|
||||
* Copyright (C) 2014-2019 CERN
|
||||
* @author Maciej Suminski <maciej.suminski@cern.ch>
|
||||
* Copyright (C) 2019 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
|
||||
@@ -626,9 +627,8 @@ void SCH_DRAW_PANEL::OnCharHook( wxKeyEvent& event )
|
||||
|
||||
void SCH_DRAW_PANEL::OnKeyEvent( wxKeyEvent& event )
|
||||
{
|
||||
int localkey;
|
||||
|
||||
localkey = event.GetKeyCode();
|
||||
int localkey = event.GetKeyCode();
|
||||
bool keyWasHandled = false;
|
||||
|
||||
switch( localkey )
|
||||
{
|
||||
@@ -642,6 +642,8 @@ void SCH_DRAW_PANEL::OnKeyEvent( wxKeyEvent& event )
|
||||
EndMouseCapture();
|
||||
else
|
||||
EndMouseCapture( ID_NO_TOOL_SELECTED, 0 /*m_defaultCursor*/, wxEmptyString );
|
||||
|
||||
keyWasHandled = true; // The key is captured: the key event will be not skipped
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -683,14 +685,15 @@ void SCH_DRAW_PANEL::OnKeyEvent( wxKeyEvent& event )
|
||||
|
||||
GetParent()->SetMousePosition( pos );
|
||||
|
||||
if( !GetParent()->GeneralControl( nullptr, pos, localkey ) )
|
||||
// a Key event has to be skipped only if it is not handled:
|
||||
if( !GetParent()->GeneralControl( nullptr, pos, localkey ) && !keyWasHandled )
|
||||
event.Skip();
|
||||
}
|
||||
|
||||
|
||||
void SCH_DRAW_PANEL::onPaint( wxPaintEvent& aEvent )
|
||||
{
|
||||
if( !m_gal->IsInitialized() )
|
||||
if( !m_gal->IsInitialized() || !m_gal->IsVisible() )
|
||||
// The first wxPaintEvent can be fired at startup before the GAL engine is fully initialized
|
||||
// (depending on platforms). Do nothing in this case
|
||||
return;
|
||||
|
||||
@@ -380,7 +380,7 @@ SCH_EDIT_FRAME::SCH_EDIT_FRAME( KIWAY* aKiway, wxWindow* aParent ):
|
||||
m_printMonochrome = true;
|
||||
m_printSheetReference = true;
|
||||
SetShowPageLimits( true );
|
||||
m_hotkeysDescrList = g_Schematic_Hokeys_Descr;
|
||||
m_hotkeysDescrList = g_Schematic_Hotkeys_Descr;
|
||||
m_dlgFindReplace = NULL;
|
||||
m_findReplaceData = new wxFindReplaceData( wxFR_DOWN );
|
||||
m_findReplaceStatus = new wxString( wxEmptyString );
|
||||
@@ -444,6 +444,8 @@ SCH_EDIT_FRAME::SCH_EDIT_FRAME( KIWAY* aKiway, wxWindow* aParent ):
|
||||
|
||||
Bind( wxEVT_COMMAND_MENU_SELECTED, &SCH_EDIT_FRAME::OnEditSymbolLibTable, this,
|
||||
ID_EDIT_SYM_LIB_TABLE );
|
||||
|
||||
UpdateTitle();
|
||||
}
|
||||
|
||||
|
||||
@@ -687,8 +689,8 @@ void SCH_EDIT_FRAME::OnCloseWindow( wxCloseEvent& aEvent )
|
||||
{
|
||||
fn = Prj().AbsolutePath( screen->GetFileName() );
|
||||
|
||||
// Auto save file name is the normal file name prepended with AUTOSAVE_PREFIX_FILENAME.
|
||||
fn.SetName( AUTOSAVE_PREFIX_FILENAME + fn.GetName() );
|
||||
// Auto save file name is the normal file name prepended with GetAutoSaveFilePrefix().
|
||||
fn.SetName( GetAutoSaveFilePrefix() + fn.GetName() );
|
||||
|
||||
if( fn.FileExists() && fn.IsFileWritable() )
|
||||
wxRemoveFile( fn.GetFullPath() );
|
||||
@@ -1291,11 +1293,7 @@ void SCH_EDIT_FRAME::OnPrint( wxCommandEvent& event )
|
||||
wxFileName fn = Prj().AbsolutePath( g_RootSheet->GetScreen()->GetFileName() );
|
||||
|
||||
if( fn.GetName() != NAMELESS_PROJECT )
|
||||
{
|
||||
// was: wxGetApp().WriteProjectConfig( fn.GetFullPath(), GROUP, GetProjectFileParametersList() );
|
||||
Prj().ConfigSave( Kiface().KifaceSearch(), GROUP_SCH_EDITOR,
|
||||
GetProjectFileParametersList() );
|
||||
}
|
||||
Prj().ConfigSave( Kiface().KifaceSearch(), GROUP_SCH_EDIT, GetProjectFileParameters() );
|
||||
}
|
||||
|
||||
|
||||
@@ -1478,7 +1476,7 @@ void SCH_EDIT_FRAME::UpdateTitle()
|
||||
|
||||
if( GetScreen()->GetFileName() == m_DefaultSchematicFileName )
|
||||
{
|
||||
title.Printf( _( "Eeschema" ) + wxT( " \u2014 %s" ), GetChars( GetScreen()->GetFileName() ) );
|
||||
title.Printf( _( "Eeschema" ) + wxT( " \u2014 %s" ), GetScreen()->GetFileName() );
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1486,9 +1484,8 @@ void SCH_EDIT_FRAME::UpdateTitle()
|
||||
wxFileName fn = fileName;
|
||||
|
||||
title.Printf( _( "Eeschema" ) + wxT( " \u2014 %s [%s] \u2014 %s" ),
|
||||
GetChars( fn.GetName() ),
|
||||
GetChars( m_CurrentSheet->PathHumanReadable() ),
|
||||
GetChars( fn.GetPath() ) );
|
||||
fn.GetFullName(), m_CurrentSheet->PathHumanReadable(),
|
||||
fn.GetPath() );
|
||||
|
||||
if( fn.FileExists() )
|
||||
{
|
||||
@@ -1560,4 +1557,3 @@ const BOX2I SCH_EDIT_FRAME::GetDocumentExtents() const
|
||||
|
||||
return BOX2I( VECTOR2I(0, 0), VECTOR2I( sizeX, sizeY ) );
|
||||
}
|
||||
|
||||
|
||||
@@ -261,7 +261,7 @@ public:
|
||||
* already been populated and return a reference to the array to the caller.
|
||||
* </p>
|
||||
*/
|
||||
PARAM_CFG_ARRAY& GetProjectFileParametersList();
|
||||
PARAM_CFG_ARRAY& GetProjectFileParameters();
|
||||
|
||||
/**
|
||||
* Save changes to the project settings to the project (.pro) file.
|
||||
@@ -1506,12 +1506,6 @@ public:
|
||||
|
||||
virtual const BOX2I GetDocumentExtents() const override;
|
||||
|
||||
///> Probe cursor, used by circuit simulator
|
||||
const static wxCursor CURSOR_PROBE;
|
||||
|
||||
///> Tuner cursor, used by circuit simulator
|
||||
const static wxCursor CURSOR_TUNE;
|
||||
|
||||
DECLARE_EVENT_TABLE()
|
||||
};
|
||||
|
||||
|
||||
@@ -98,8 +98,10 @@ void SCH_JUNCTION::Draw( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPoint& aOffs
|
||||
|
||||
if( aColor != COLOR4D::UNSPECIFIED )
|
||||
color = aColor;
|
||||
else if( aPanel->GetScreen() && !aPanel->GetScreen()->m_IsPrinting && GetState( BRIGHTENED ) )
|
||||
color = GetLayerColor( LAYER_BRIGHTENED );
|
||||
else
|
||||
color = GetLayerColor( GetState( BRIGHTENED ) ? LAYER_BRIGHTENED : m_Layer );
|
||||
color = GetLayerColor( m_Layer );
|
||||
|
||||
GRSetDrawMode( aDC, aDrawMode );
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user