53 changed files with 3164 additions and 147 deletions
-
3bitmaps_png/CMakeLists.txt
-
37bitmaps_png/cpp_26/duplicate_line.cpp
-
50bitmaps_png/cpp_26/duplicate_pad.cpp
-
40bitmaps_png/cpp_26/duplicate_text.cpp
-
95bitmaps_png/sources/duplicate_line.svg
-
70bitmaps_png/sources/duplicate_pad.svg
-
90bitmaps_png/sources/duplicate_text.svg
-
49common/base_units.cpp
-
1common/block_commande.cpp
-
12common/common.cpp
-
23common/tool/tool_manager.cpp
-
3eeschema/block_libedit.cpp
-
5eeschema/sch_base_frame.cpp
-
8gerbview/gerbview_frame.cpp
-
13include/base_units.h
-
3include/bitmaps.h
-
1include/block_commande.h
-
10include/class_board_item.h
-
3include/common.h
-
1include/id.h
-
26include/tool/tool_manager.h
-
4pagelayout_editor/pl_editor_frame.cpp
-
2pcbnew/CMakeLists.txt
-
10pcbnew/basepcbframe.cpp
-
102pcbnew/block_module_editor.cpp
-
68pcbnew/class_drawsegment.cpp
-
2pcbnew/class_drawsegment.h
-
98pcbnew/class_module.cpp
-
13pcbnew/class_module.h
-
10pcbnew/class_pad.cpp
-
10pcbnew/class_pad.h
-
208pcbnew/dialogs/dialog_move_exact.cpp
-
1281pcbnew/dialogs/dialog_move_exact.fbp
-
87pcbnew/dialogs/dialog_move_exact.h
-
114pcbnew/dialogs/dialog_move_exact_base.cpp
-
77pcbnew/dialogs/dialog_move_exact_base.h
-
5pcbnew/hotkeys.cpp
-
3pcbnew/hotkeys.h
-
1pcbnew/hotkeys_board_editor.cpp
-
188pcbnew/hotkeys_module_editor.cpp
-
107pcbnew/modedit.cpp
-
42pcbnew/modedit_onclick.cpp
-
13pcbnew/module_editor_frame.h
-
1pcbnew/moduleframe.cpp
-
4pcbnew/pcbnew_id.h
-
12pcbnew/tools/common_actions.cpp
-
9pcbnew/tools/common_actions.h
-
124pcbnew/tools/edit_tool.cpp
-
14pcbnew/tools/edit_tool.h
-
130pcbnew/tools/module_tools.cpp
-
3pcbnew/tools/module_tools.h
-
24pcbnew/tools/selection_tool.cpp
-
2pcbnew/tools/selection_tool.h
@ -0,0 +1,37 @@ |
|||
|
|||
/* Do not modify this file, it was automatically generated by the
|
|||
* PNG2cpp CMake script, using a *.png file as input. |
|||
*/ |
|||
|
|||
#include <bitmaps.h>
|
|||
|
|||
static const unsigned char png[] = { |
|||
0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d, 0x49, 0x48, 0x44, 0x52, |
|||
0x00, 0x00, 0x00, 0x1a, 0x00, 0x00, 0x00, 0x1a, 0x08, 0x06, 0x00, 0x00, 0x00, 0xa9, 0x4a, 0x4c, |
|||
0xce, 0x00, 0x00, 0x01, 0x41, 0x49, 0x44, 0x41, 0x54, 0x48, 0xc7, 0xed, 0x96, 0xb1, 0x4a, 0x03, |
|||
0x41, 0x14, 0x45, 0xcf, 0xbc, 0x59, 0x0d, 0xc4, 0x08, 0xb1, 0x90, 0x4d, 0x0c, 0x6c, 0x61, 0xb0, |
|||
0x88, 0xda, 0xa7, 0x16, 0x0b, 0xc1, 0xc2, 0x0f, 0xf0, 0x23, 0xfc, 0x06, 0xbb, 0x94, 0xd6, 0x62, |
|||
0x21, 0x6c, 0x76, 0x9d, 0xd5, 0x14, 0x42, 0x2c, 0x2c, 0x44, 0x44, 0xd2, 0x07, 0x2b, 0x2d, 0x52, |
|||
0x08, 0x62, 0x61, 0x11, 0x14, 0x4c, 0xc2, 0x82, 0x1a, 0xc7, 0x4f, 0x50, 0x21, 0x93, 0xc2, 0x58, |
|||
0x9c, 0xfa, 0xf0, 0x86, 0xfb, 0xde, 0x1d, 0xac, 0xb5, 0x8c, 0x03, 0xc6, 0x2e, 0xe2, 0x00, 0xeb, |
|||
0x82, 0x09, 0x10, 0x7d, 0xc7, 0x15, 0x78, 0x11, 0x6c, 0x1b, 0x58, 0x70, 0x1a, 0x86, 0x18, 0x96, |
|||
0x62, 0xa5, 0xd2, 0x08, 0x6c, 0x22, 0x72, 0x1f, 0xc3, 0x86, 0xb3, 0xd4, 0x85, 0x50, 0x35, 0x4a, |
|||
0xf5, 0xae, 0xf3, 0xf9, 0xcf, 0x86, 0xe7, 0xf5, 0x13, 0xad, 0xc3, 0x10, 0x66, 0x9c, 0xc4, 0x3b, |
|||
0x84, 0x55, 0x23, 0xf2, 0xdc, 0xf6, 0xfd, 0xe1, 0x45, 0x2e, 0x97, 0x26, 0x4a, 0x35, 0x9d, 0xed, |
|||
0x51, 0x02, 0x65, 0x23, 0xf2, 0xd4, 0xf6, 0xfd, 0x8f, 0xd3, 0xe9, 0xe9, 0xbe, 0x11, 0xd9, 0x71, |
|||
0xb6, 0xb0, 0x47, 0xb0, 0x72, 0x2c, 0x32, 0x78, 0x58, 0x5c, 0xb4, 0x46, 0xa9, 0xc1, 0x09, 0xcc, |
|||
0x3b, 0xbb, 0x0c, 0x89, 0xd6, 0x57, 0x37, 0x85, 0xc2, 0x67, 0x6b, 0x6e, 0x2e, 0x4d, 0x44, 0x6a, |
|||
0xce, 0x44, 0x31, 0xac, 0x35, 0x3c, 0xaf, 0xff, 0x58, 0x2e, 0x5b, 0x23, 0xd2, 0x8b, 0x61, 0x33, |
|||
0x82, 0xbd, 0x43, 0xc8, 0x8f, 0x54, 0x54, 0x87, 0x62, 0xac, 0x54, 0xf7, 0xb6, 0x54, 0xb2, 0x97, |
|||
0xb3, 0xb3, 0x69, 0x22, 0xf2, 0x76, 0xac, 0x75, 0x6b, 0xa4, 0x13, 0x45, 0xb0, 0x1e, 0x43, 0xda, |
|||
0xd0, 0xfa, 0xbd, 0x13, 0x04, 0xf6, 0xa5, 0x52, 0xb1, 0xcd, 0x4c, 0xe6, 0xb5, 0x0e, 0x5b, 0x23, |
|||
0x7f, 0xba, 0x08, 0x96, 0x8d, 0xc8, 0xdd, 0x79, 0x36, 0xdb, 0xef, 0x04, 0x81, 0x35, 0x22, 0xdd, |
|||
0x13, 0xd0, 0x4e, 0x6a, 0x62, 0x1f, 0xa6, 0x8e, 0x44, 0x6a, 0x11, 0x0c, 0x63, 0x91, 0x5d, 0xe7, |
|||
0x7d, 0x14, 0x42, 0xb5, 0x0e, 0xc5, 0x9f, 0xf4, 0xd1, 0x99, 0x0b, 0x26, 0x40, 0xf4, 0xf7, 0x3e, |
|||
0x27, 0xff, 0xa2, 0xdf, 0xf2, 0x05, 0x63, 0x00, 0xb0, 0xc1, 0xf1, 0xcc, 0x65, 0x5d, 0x00, 0x00, |
|||
0x00, 0x00, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82, |
|||
}; |
|||
|
|||
const BITMAP_OPAQUE duplicate_line_xpm[1] = {{ png, sizeof( png ), "duplicate_line_xpm" }}; |
|||
|
|||
//EOF
|
@ -0,0 +1,50 @@ |
|||
|
|||
/* Do not modify this file, it was automatically generated by the
|
|||
* PNG2cpp CMake script, using a *.png file as input. |
|||
*/ |
|||
|
|||
#include <bitmaps.h>
|
|||
|
|||
static const unsigned char png[] = { |
|||
0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d, 0x49, 0x48, 0x44, 0x52, |
|||
0x00, 0x00, 0x00, 0x1a, 0x00, 0x00, 0x00, 0x1a, 0x08, 0x06, 0x00, 0x00, 0x00, 0xa9, 0x4a, 0x4c, |
|||
0xce, 0x00, 0x00, 0x02, 0x12, 0x49, 0x44, 0x41, 0x54, 0x48, 0xc7, 0xd5, 0x54, 0x4d, 0x48, 0x54, |
|||
0x51, 0x18, 0x3d, 0xef, 0x4e, 0xf8, 0x83, 0x0c, 0x31, 0x9a, 0x1b, 0x45, 0x66, 0xd1, 0x6a, 0x60, |
|||
0xda, 0xb6, 0x69, 0xe1, 0xaa, 0x89, 0x36, 0x41, 0x20, 0x41, 0xab, 0x20, 0xc6, 0xa5, 0xd0, 0xc2, |
|||
0xad, 0x36, 0x69, 0x30, 0xd0, 0x66, 0x08, 0x5d, 0xd8, 0x22, 0x06, 0x52, 0xf3, 0xe9, 0x4a, 0x26, |
|||
0xa9, 0x45, 0x42, 0x09, 0xea, 0xea, 0x6d, 0x24, 0x10, 0x8d, 0x76, 0x12, 0x21, 0x44, 0x8c, 0xe2, |
|||
0x28, 0xa2, 0xf5, 0x3a, 0xdf, 0x7d, 0xdf, 0x44, 0x0c, 0x09, 0xce, 0xcc, 0xf3, 0x41, 0x8b, 0xc3, |
|||
0x7d, 0xef, 0xfb, 0xee, 0x3d, 0xe7, 0x9e, 0xef, 0xbb, 0xf7, 0xc2, 0xf7, 0x7d, 0x44, 0x81, 0x9a, |
|||
0x1f, 0x38, 0xc8, 0x21, 0x8b, 0x27, 0xf8, 0xc8, 0xb1, 0x6c, 0x11, 0x7c, 0x67, 0x25, 0x17, 0x8a, |
|||
0x10, 0xc9, 0x7a, 0x88, 0x35, 0x62, 0x87, 0xf0, 0x88, 0x65, 0x85, 0xa7, 0x31, 0xc9, 0xf5, 0x34, |
|||
0x25, 0xa4, 0x4e, 0x84, 0x68, 0x8b, 0x28, 0x9d, 0x81, 0x2d, 0x3b, 0xa7, 0x41, 0x67, 0x55, 0x37, |
|||
0x59, 0xdd, 0x75, 0x09, 0x8f, 0xf1, 0x86, 0xe3, 0x06, 0xb1, 0xab, 0xd8, 0xd0, 0x98, 0x88, 0xed, |
|||
0xc4, 0x46, 0x31, 0xf8, 0x0a, 0x48, 0xb9, 0xc0, 0xd5, 0x05, 0xe0, 0x72, 0x7d, 0x42, 0x41, 0x1f, |
|||
0x3c, 0x25, 0x13, 0x91, 0x4f, 0x18, 0x43, 0xbf, 0x85, 0x7c, 0x33, 0x96, 0x18, 0xc6, 0xbb, 0xfb, |
|||
0x37, 0x9c, 0xaf, 0x2f, 0x3b, 0xcc, 0xf1, 0x0c, 0x97, 0xb9, 0xc6, 0x1c, 0xbd, 0x76, 0x9c, 0xc3, |
|||
0x69, 0xe0, 0x4e, 0x3d, 0x8e, 0xca, 0xda, 0x8f, 0x92, 0x75, 0x41, 0x81, 0x3f, 0x13, 0x02, 0xb1, |
|||
0xdd, 0xf4, 0x03, 0xac, 0x3c, 0xef, 0x32, 0x07, 0xe3, 0x49, 0x73, 0xb2, 0x10, 0x8b, 0xad, 0xce, |
|||
0x39, 0xce, 0xd1, 0x6a, 0x22, 0xf1, 0x6b, 0xde, 0x98, 0x43, 0x0a, 0x0f, 0x84, 0x26, 0xa4, 0x39, |
|||
0x99, 0x53, 0x96, 0x38, 0xc9, 0xaf, 0xd1, 0x55, 0x65, 0xb3, 0xb7, 0x57, 0xdc, 0x7d, 0xfb, 0x00, |
|||
0x5c, 0x0a, 0xa5, 0x74, 0x9a, 0xf3, 0x64, 0x6e, 0x75, 0x31, 0x05, 0x8a, 0x5e, 0x77, 0xf7, 0xcf, |
|||
0xa5, 0xf6, 0xf6, 0x03, 0x0a, 0x0f, 0xb1, 0x8c, 0xf7, 0x38, 0xde, 0x0d, 0xe5, 0x30, 0xc8, 0xdc, |
|||
0xea, 0x62, 0x92, 0x3e, 0x5c, 0x6c, 0x69, 0xd9, 0xfb, 0x92, 0x4c, 0xfa, 0xec, 0xd7, 0xa9, 0xf4, |
|||
0x6e, 0x16, 0xb8, 0x1e, 0xda, 0xf1, 0x7e, 0x0b, 0xb4, 0x92, 0x74, 0x49, 0x88, 0x97, 0xe3, 0xf1, |
|||
0xe3, 0x1f, 0xa9, 0x94, 0xbf, 0xdd, 0xd7, 0x27, 0x25, 0xfc, 0x1c, 0xfa, 0x85, 0x2d, 0x02, 0x6d, |
|||
0x24, 0x7e, 0xc1, 0x83, 0x51, 0x11, 0x47, 0xef, 0xe3, 0xf1, 0x7d, 0x0a, 0x0f, 0x5e, 0xd8, 0x13, |
|||
0xc4, 0xbe, 0xdc, 0x9c, 0x33, 0xe6, 0xfb, 0xac, 0xe3, 0x54, 0x78, 0xbf, 0x3a, 0xce, 0x25, 0x54, |
|||
0xff, 0x6d, 0xb7, 0x1b, 0xcb, 0x5c, 0x79, 0x84, 0xc2, 0xed, 0x5b, 0x58, 0xe7, 0xb7, 0x4b, 0xe4, |
|||
0x25, 0x56, 0xbb, 0xb1, 0xc6, 0x45, 0x72, 0xe8, 0x24, 0x9e, 0x11, 0x45, 0xa2, 0x40, 0x3c, 0x55, |
|||
0x14, 0x34, 0x26, 0xb9, 0xce, 0xa6, 0x84, 0xd4, 0x89, 0x10, 0x4d, 0x61, 0x14, 0x23, 0xff, 0x84, |
|||
0xe4, 0x64, 0x8e, 0x3a, 0x6b, 0xd4, 0x4d, 0xc6, 0xee, 0x5a, 0x08, 0x85, 0x36, 0x87, 0x09, 0x62, |
|||
0x46, 0x31, 0x61, 0x63, 0x81, 0x98, 0x38, 0xcb, 0x34, 0x23, 0x94, 0xb7, 0x25, 0x0a, 0xc8, 0x44, |
|||
0x64, 0x92, 0x48, 0x2b, 0x26, 0x6d, 0x2c, 0xc8, 0x49, 0x19, 0xf3, 0xcd, 0x08, 0xb9, 0xb6, 0x1f, |
|||
0x01, 0x99, 0xb8, 0x48, 0xff, 0x95, 0x4b, 0xdb, 0x58, 0x90, 0x93, 0x9e, 0xb9, 0xff, 0x85, 0x50, |
|||
0x64, 0xa5, 0x8b, 0xe8, 0x30, 0x44, 0x75, 0xbc, 0x23, 0xbb, 0xb0, 0xb5, 0x4f, 0x90, 0xf6, 0xcc, |
|||
0xbd, 0x90, 0x27, 0xa8, 0x5e, 0xfc, 0x06, 0x78, 0x64, 0xb7, 0x0e, 0x00, 0x4c, 0xaa, 0xda, 0x00, |
|||
0x00, 0x00, 0x00, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82, |
|||
}; |
|||
|
|||
const BITMAP_OPAQUE duplicate_pad_xpm[1] = {{ png, sizeof( png ), "duplicate_pad_xpm" }}; |
|||
|
|||
//EOF
|
@ -0,0 +1,40 @@ |
|||
|
|||
/* Do not modify this file, it was automatically generated by the
|
|||
* PNG2cpp CMake script, using a *.png file as input. |
|||
*/ |
|||
|
|||
#include <bitmaps.h>
|
|||
|
|||
static const unsigned char png[] = { |
|||
0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d, 0x49, 0x48, 0x44, 0x52, |
|||
0x00, 0x00, 0x00, 0x1a, 0x00, 0x00, 0x00, 0x1a, 0x08, 0x06, 0x00, 0x00, 0x00, 0xa9, 0x4a, 0x4c, |
|||
0xce, 0x00, 0x00, 0x01, 0x6e, 0x49, 0x44, 0x41, 0x54, 0x48, 0xc7, 0x63, 0xf8, 0xff, 0xff, 0x3f, |
|||
0x03, 0x3d, 0x30, 0x84, 0x60, 0x98, 0xfd, 0x9f, 0x54, 0xbc, 0x98, 0x81, 0x41, 0x65, 0x19, 0x03, |
|||
0x83, 0x3d, 0x90, 0xd6, 0x5f, 0xc5, 0xc0, 0xc0, 0x49, 0x75, 0x8b, 0x0c, 0x18, 0xf2, 0xfe, 0xb7, |
|||
0x31, 0x29, 0xfd, 0x5f, 0x02, 0xd4, 0xba, 0x94, 0x81, 0xe1, 0xdf, 0x6a, 0x16, 0x96, 0xaf, 0x2b, |
|||
0x98, 0x98, 0x6e, 0x00, 0x2d, 0x94, 0x24, 0xc5, 0xa2, 0x06, 0xb8, 0x04, 0x92, 0xe1, 0x48, 0x62, |
|||
0x0d, 0x91, 0x4c, 0x5e, 0xff, 0x2b, 0x98, 0x0c, 0xfe, 0x03, 0x0d, 0x9f, 0xb1, 0x92, 0x89, 0xe9, |
|||
0xd2, 0x2a, 0x16, 0x96, 0xef, 0x87, 0x05, 0x05, 0x7f, 0x2f, 0x63, 0x64, 0x7c, 0x39, 0x97, 0x81, |
|||
0x81, 0x97, 0x18, 0x8b, 0x1a, 0x50, 0x24, 0xb0, 0x58, 0x04, 0xb3, 0x0c, 0x59, 0x0c, 0x68, 0xe1, |
|||
0xb4, 0x7d, 0xfc, 0xfc, 0x5f, 0x77, 0xf3, 0xf0, 0x7c, 0x5d, 0xc6, 0xc4, 0x54, 0x8d, 0xd7, 0x22, |
|||
0xac, 0x12, 0x38, 0x2c, 0x42, 0xc7, 0xc0, 0x20, 0xe4, 0x03, 0xfa, 0xe6, 0xfb, 0x3d, 0x05, 0x85, |
|||
0xff, 0xcb, 0x99, 0x98, 0x3e, 0x02, 0x83, 0xd3, 0x0b, 0x28, 0xd6, 0x3f, 0x9f, 0x81, 0x41, 0x80, |
|||
0xaa, 0x16, 0x81, 0xe2, 0x66, 0x39, 0x23, 0xe3, 0xb5, 0x2b, 0x52, 0x52, 0xff, 0xf7, 0xf2, 0xf2, |
|||
0x7e, 0x03, 0xfa, 0xf0, 0xd7, 0x4a, 0x66, 0xe6, 0xc3, 0x54, 0xf5, 0x11, 0xd0, 0xe5, 0xce, 0x40, |
|||
0x1f, 0x7c, 0x5f, 0xcd, 0xcc, 0xfc, 0xfb, 0x8e, 0xbc, 0xfc, 0xff, 0xf7, 0x9a, 0x9a, 0xff, 0x37, |
|||
0xb1, 0xb3, 0x7f, 0x02, 0x5a, 0xee, 0x47, 0x8b, 0xa0, 0xd3, 0x02, 0x06, 0xd9, 0xf5, 0xed, 0x5c, |
|||
0x5c, 0x5f, 0x6e, 0xcb, 0xc9, 0x81, 0x82, 0xef, 0x0d, 0x30, 0xb9, 0x33, 0x53, 0xdd, 0x22, 0x10, |
|||
0x9e, 0xc9, 0xc0, 0xc0, 0x0a, 0x4c, 0x08, 0xed, 0x40, 0x4b, 0xff, 0x2e, 0x65, 0x62, 0x6a, 0xa0, |
|||
0x49, 0x62, 0x40, 0xc6, 0x8b, 0x18, 0x18, 0xcc, 0x71, 0xe5, 0x27, 0x92, 0x2d, 0x02, 0xf2, 0x37, |
|||
0x93, 0x8a, 0x07, 0xd6, 0x22, 0xa0, 0x84, 0x03, 0x10, 0x1f, 0x40, 0x2b, 0x7a, 0x40, 0x7c, 0x07, |
|||
0x54, 0x8b, 0xe6, 0x44, 0x61, 0xb3, 0x1c, 0x21, 0x36, 0x27, 0x8a, 0x90, 0x45, 0x38, 0xcb, 0x39, |
|||
0x84, 0xa1, 0x08, 0x4b, 0x70, 0x59, 0x84, 0x6c, 0x19, 0xde, 0xa0, 0x23, 0xa9, 0x0a, 0xc0, 0x61, |
|||
0x11, 0x51, 0x89, 0x61, 0xd4, 0xa2, 0x51, 0x8b, 0x46, 0xb8, 0x45, 0x0c, 0x0c, 0x33, 0x75, 0x81, |
|||
0x86, 0xb7, 0xa3, 0x15, 0x39, 0xed, 0x20, 0x71, 0x2a, 0x5b, 0x84, 0xbf, 0x7c, 0xa3, 0x7a, 0xd0, |
|||
0x11, 0x83, 0x01, 0xfa, 0xc4, 0x94, 0x7d, 0x09, 0xb7, 0x71, 0x10, 0x00, 0x00, 0x00, 0x00, 0x49, |
|||
0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82, |
|||
}; |
|||
|
|||
const BITMAP_OPAQUE duplicate_text_xpm[1] = {{ png, sizeof( png ), "duplicate_text_xpm" }}; |
|||
|
|||
//EOF
|
@ -0,0 +1,95 @@ |
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?> |
|||
<svg |
|||
xmlns:dc="http://purl.org/dc/elements/1.1/" |
|||
xmlns:cc="http://creativecommons.org/ns#" |
|||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" |
|||
xmlns:svg="http://www.w3.org/2000/svg" |
|||
xmlns="http://www.w3.org/2000/svg" |
|||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" |
|||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" |
|||
height="26" |
|||
width="26" |
|||
version="1.1" |
|||
id="svg18970" |
|||
inkscape:version="0.48.4 r9939" |
|||
sodipodi:docname="duplicate_line.svg"> |
|||
<metadata |
|||
id="metadata18987"> |
|||
<rdf:RDF> |
|||
<cc:Work |
|||
rdf:about=""> |
|||
<dc:format>image/svg+xml</dc:format> |
|||
<dc:type |
|||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> |
|||
<dc:title /> |
|||
</cc:Work> |
|||
</rdf:RDF> |
|||
</metadata> |
|||
<sodipodi:namedview |
|||
pagecolor="#ffffff" |
|||
bordercolor="#666666" |
|||
borderopacity="1" |
|||
objecttolerance="10" |
|||
gridtolerance="10" |
|||
guidetolerance="10" |
|||
inkscape:pageopacity="0" |
|||
inkscape:pageshadow="2" |
|||
inkscape:window-width="1920" |
|||
inkscape:window-height="996" |
|||
id="namedview18985" |
|||
showgrid="false" |
|||
inkscape:zoom="16" |
|||
inkscape:cx="21.793817" |
|||
inkscape:cy="19.733911" |
|||
inkscape:window-x="0" |
|||
inkscape:window-y="28" |
|||
inkscape:window-maximized="1" |
|||
inkscape:current-layer="svg18970" |
|||
inkscape:object-paths="true" |
|||
inkscape:object-nodes="true"> |
|||
<inkscape:grid |
|||
type="xygrid" |
|||
id="grid3029" |
|||
empspacing="5" |
|||
visible="true" |
|||
enabled="true" |
|||
snapvisiblegridlinesonly="true" /> |
|||
</sodipodi:namedview> |
|||
<defs |
|||
id="defs18972" /> |
|||
<g |
|||
id="g18103" |
|||
transform="matrix(0.92021476,-0.39141384,0.39141384,0.92021476,-3.5098229,-2.4696189)"> |
|||
<path |
|||
sodipodi:nodetypes="ccccccc" |
|||
inkscape:connector-curvature="0" |
|||
d="m 14.365778,23.401859 c 0.202438,-4.960549 -0.864872,-7.852869 -4.328751,-9.928645 2.506618,4.326299 2.740146,6.262366 2.389978,9.710201 l -1.626346,-0.20242 2.198044,3.513613 2.945419,-2.915713 z" |
|||
style="fill:#ef2929;fill-opacity:1;stroke:#a40000;stroke-width:1" |
|||
id="path17320" /> |
|||
</g> |
|||
<g |
|||
transform="matrix(0.92443,0,0,1,54.5375,-34.419499)" |
|||
id="g18878"> |
|||
<rect |
|||
width="23.798449" |
|||
height="3.0000014" |
|||
ry="0" |
|||
x="-56.832317" |
|||
y="36.419498" |
|||
id="rect18882" |
|||
style="fill:#009b00" /> |
|||
</g> |
|||
<g |
|||
id="g3096" |
|||
transform="matrix(0.92443,0,0,1,54.5375,-18.419498)" |
|||
style="opacity:0.7"> |
|||
<rect |
|||
style="fill:#009b00" |
|||
id="rect3098" |
|||
y="36.419498" |
|||
x="-56.832317" |
|||
ry="0" |
|||
height="3.0000014" |
|||
width="23.798449" /> |
|||
</g> |
|||
</svg> |
@ -0,0 +1,70 @@ |
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?> |
|||
<!-- Created with Inkscape (http://www.inkscape.org/) --> |
|||
|
|||
<svg |
|||
xmlns:dc="http://purl.org/dc/elements/1.1/" |
|||
xmlns:cc="http://creativecommons.org/ns#" |
|||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" |
|||
xmlns:svg="http://www.w3.org/2000/svg" |
|||
xmlns="http://www.w3.org/2000/svg" |
|||
xmlns:xlink="http://www.w3.org/1999/xlink" |
|||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" |
|||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" |
|||
version="1.1" |
|||
width="26" |
|||
height="26" |
|||
id="svg8431" |
|||
inkscape:version="0.48.4 r9939" |
|||
sodipodi:docname="duplicate_pad.svg"> |
|||
<sodipodi:namedview |
|||
pagecolor="#ffffff" |
|||
bordercolor="#666666" |
|||
borderopacity="1" |
|||
objecttolerance="10" |
|||
gridtolerance="10" |
|||
guidetolerance="10" |
|||
inkscape:pageopacity="0" |
|||
inkscape:pageshadow="2" |
|||
inkscape:window-width="640" |
|||
inkscape:window-height="480" |
|||
id="namedview3013" |
|||
showgrid="false" |
|||
inkscape:zoom="9.0769231" |
|||
inkscape:cx="13" |
|||
inkscape:cy="12.173729" |
|||
inkscape:window-x="0" |
|||
inkscape:window-y="28" |
|||
inkscape:window-maximized="0" |
|||
inkscape:current-layer="svg8431" /> |
|||
<metadata |
|||
id="metadata8454"> |
|||
<rdf:RDF> |
|||
<cc:Work |
|||
rdf:about=""> |
|||
<dc:format>image/svg+xml</dc:format> |
|||
<dc:type |
|||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> |
|||
<dc:title /> |
|||
</cc:Work> |
|||
</rdf:RDF> |
|||
</metadata> |
|||
<defs |
|||
id="defs8433" /> |
|||
<path |
|||
d="m 7.0000002,1.4999999 c -3.0387414,0 -5.5000003,2.4612576 -5.5000003,5.4999999 C 1.4999999,10.038741 3.9612588,12.5 7.0000002,12.5 10.038743,12.5 12.5,10.038741 12.5,6.9999998 12.5,3.9612575 10.038743,1.4999999 7.0000002,1.4999999 z m 0,3.0000001 C 8.354733,4.5 9.5,5.6452668 9.5,7 9.5,8.3547332 8.354733,9.5 7.0000002,9.5 5.6452663,9.5 4.5,8.354733 4.5,6.9999998 4.5,5.6452666 5.6452663,4.5 7.0000002,4.5 z" |
|||
id="path3763" |
|||
style="fill:#008000;fill-opacity:0.69803922;stroke:#008000;stroke-width:0.99999994;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" /> |
|||
<use |
|||
transform="translate(12,12)" |
|||
id="use3206" |
|||
style="opacity:0.7" |
|||
x="0" |
|||
y="0" |
|||
width="26" |
|||
height="26" |
|||
xlink:href="#path3763" /> |
|||
<path |
|||
d="M 18.334055,9.5305414 C 16.578714,4.886534 14.749271,4.2773887 10.82266,6.330495 c 4.402043,-0.7545299 4.614505,0.4480843 5.641806,3.757893 l -1.575818,0.450305 3.397949,2.372933 1.569168,-3.8359591 z" |
|||
id="path17320" |
|||
style="fill:#ef2929;fill-opacity:1;stroke:#a40000;stroke-width:1" /> |
|||
</svg> |
@ -0,0 +1,90 @@ |
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?> |
|||
<svg |
|||
xmlns:dc="http://purl.org/dc/elements/1.1/" |
|||
xmlns:cc="http://creativecommons.org/ns#" |
|||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" |
|||
xmlns:svg="http://www.w3.org/2000/svg" |
|||
xmlns="http://www.w3.org/2000/svg" |
|||
xmlns:xlink="http://www.w3.org/1999/xlink" |
|||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" |
|||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" |
|||
height="26" |
|||
width="26" |
|||
version="1.1" |
|||
id="svg18970" |
|||
inkscape:version="0.48.4 r9939" |
|||
sodipodi:docname="duplicate_text.svg"> |
|||
<metadata |
|||
id="metadata18987"> |
|||
<rdf:RDF> |
|||
<cc:Work |
|||
rdf:about=""> |
|||
<dc:format>image/svg+xml</dc:format> |
|||
<dc:type |
|||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> |
|||
<dc:title /> |
|||
</cc:Work> |
|||
</rdf:RDF> |
|||
</metadata> |
|||
<sodipodi:namedview |
|||
pagecolor="#ffffff" |
|||
bordercolor="#666666" |
|||
borderopacity="1" |
|||
objecttolerance="10" |
|||
gridtolerance="10" |
|||
guidetolerance="10" |
|||
inkscape:pageopacity="0" |
|||
inkscape:pageshadow="2" |
|||
inkscape:window-width="1920" |
|||
inkscape:window-height="996" |
|||
id="namedview18985" |
|||
showgrid="false" |
|||
inkscape:zoom="16" |
|||
inkscape:cx="13.659451" |
|||
inkscape:cy="12.783886" |
|||
inkscape:window-x="0" |
|||
inkscape:window-y="28" |
|||
inkscape:window-maximized="1" |
|||
inkscape:current-layer="g18103" |
|||
inkscape:object-paths="true" |
|||
inkscape:object-nodes="true"> |
|||
<inkscape:grid |
|||
type="xygrid" |
|||
id="grid3029" |
|||
empspacing="5" |
|||
visible="true" |
|||
enabled="true" |
|||
snapvisiblegridlinesonly="true" /> |
|||
</sodipodi:namedview> |
|||
<defs |
|||
id="defs18972" /> |
|||
<g |
|||
style="fill-rule:evenodd" |
|||
transform="matrix(1.1098933,0,0,1.075965,-25.392974,-45.041873)" |
|||
id="g19009"> |
|||
<path |
|||
style="fill:#00009b" |
|||
d="M 1 1 L 1 5 L 2 5 L 4 3 L 6 3 L 6 13 L 4 14 L 4 15 L 7 15 L 8 15 L 11 15 L 11 14 L 9 13 L 9 3 L 11 3 L 13 5 L 14 5 L 14 1 L 8 1 L 7 1 L 1 1 z " |
|||
transform="matrix(0.90098751,0,0,0.92939826,22.878752,41.861838)" |
|||
id="path19013" /> |
|||
</g> |
|||
<g |
|||
id="g18103" |
|||
transform="matrix(0.92021476,-0.39141384,0.39141384,0.92021476,-2.5098229,-9.469619)"> |
|||
<path |
|||
sodipodi:nodetypes="ccccccc" |
|||
inkscape:connector-curvature="0" |
|||
d="m 14.365778,23.401859 c 0.202438,-4.960549 -1.242615,-6.237163 -5.6595543,-5.884794 4.3461583,1.028691 4.0709493,2.218515 3.7207813,5.66635 l -1.626346,-0.20242 2.198044,3.513613 2.945419,-2.915713 z" |
|||
style="fill:#ef2929;fill-opacity:1;stroke:#a40000;stroke-width:1" |
|||
id="path17320" /> |
|||
</g> |
|||
<use |
|||
x="0" |
|||
y="0" |
|||
xlink:href="#g19009" |
|||
id="use3037" |
|||
transform="translate(11,10)" |
|||
width="26" |
|||
height="26" |
|||
style="opacity:0.7" /> |
|||
</svg> |
@ -0,0 +1,208 @@ |
|||
/*
|
|||
* This program source code file is part of KiCad, a free EDA CAD application. |
|||
* |
|||
* Copyright (C) 2014 John Beard, john.j.beard@gmail.com |
|||
* Copyright (C) 1992-2014 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 |
|||
*/ |
|||
|
|||
#include <wxPcbStruct.h>
|
|||
#include <base_units.h>
|
|||
|
|||
#include <module_editor_frame.h>
|
|||
|
|||
#include "dialog_move_exact.h"
|
|||
|
|||
// initialise statics
|
|||
DIALOG_MOVE_EXACT::MOVE_EXACT_OPTIONS DIALOG_MOVE_EXACT::m_options; |
|||
|
|||
|
|||
DIALOG_MOVE_EXACT::DIALOG_MOVE_EXACT( PCB_BASE_FRAME* aParent, |
|||
wxPoint& translation, double& rotation ): |
|||
DIALOG_MOVE_EXACT_BASE( aParent ), |
|||
m_translation( translation ), |
|||
m_rotation( rotation ) |
|||
{ |
|||
// set the unit labels
|
|||
m_xUnit->SetLabelText( GetAbbreviatedUnitsLabel( g_UserUnit ) ); |
|||
m_yUnit->SetLabelText( GetAbbreviatedUnitsLabel( g_UserUnit ) ); |
|||
// rotation is always degrees
|
|||
m_rotUnit->SetLabelText( _( "deg" ) ); |
|||
|
|||
// tabbing goes through the entries in sequence
|
|||
m_yEntry->MoveAfterInTabOrder( m_xEntry ); |
|||
m_rotEntry->MoveAfterInTabOrder( m_yEntry ); |
|||
|
|||
// and set up the entries according to the saved options
|
|||
m_polarCoords->SetValue( m_options.polarCoords ); |
|||
m_xEntry->SetValue( wxString::FromDouble( m_options.entry1 ) ); |
|||
m_yEntry->SetValue( wxString::FromDouble( m_options.entry2 ) ); |
|||
m_rotEntry->SetValue( wxString::FromDouble( m_options.entryRotation ) ); |
|||
} |
|||
|
|||
|
|||
DIALOG_MOVE_EXACT::~DIALOG_MOVE_EXACT() |
|||
{ |
|||
} |
|||
|
|||
|
|||
/*!
|
|||
* Convert a given Cartesian point into a polar representation. |
|||
* |
|||
* Linear units are not considered, the answer is in the same units as given |
|||
* Angle is returned in degrees |
|||
*/ |
|||
void DIALOG_MOVE_EXACT::ToPolarDeg( double x, double y, double& r, double& q ) |
|||
{ |
|||
// convert to polar coordinates
|
|||
r = hypot ( x, y ); |
|||
|
|||
q = ( r != 0) ? RAD2DEG( atan2( y, x ) ) : 0; |
|||
} |
|||
|
|||
|
|||
/*!
|
|||
* Get the (Cartesian) translation described by the text entries |
|||
* @param val output translation vector |
|||
* @param polar interpret as polar coords |
|||
* @return false if error (though the text conversion functions don't report errors) |
|||
*/ |
|||
bool DIALOG_MOVE_EXACT::GetTranslationInIU ( wxPoint& val, bool polar ) |
|||
{ |
|||
if( polar ) |
|||
{ |
|||
const int r = ValueFromTextCtrl( *m_xEntry ); |
|||
const double q = DoubleValueFromString( DEGREES, m_yEntry->GetValue() ); |
|||
|
|||
val.x = r * cos( DEG2RAD( q / 10.0 ) ); |
|||
val.y = r * sin( DEG2RAD( q / 10.0 ) ); |
|||
} |
|||
else |
|||
{ |
|||
// direct read
|
|||
val.x = ValueFromTextCtrl( *m_xEntry ); |
|||
val.y = ValueFromTextCtrl( *m_yEntry ); |
|||
} |
|||
|
|||
// no validation to do here, but in future, you could return false here
|
|||
return true; |
|||
} |
|||
|
|||
|
|||
void DIALOG_MOVE_EXACT::OnPolarChanged( wxCommandEvent& event ) |
|||
{ |
|||
bool newPolar = m_polarCoords->IsChecked(); |
|||
wxPoint val; |
|||
|
|||
// get the value as previously stored
|
|||
GetTranslationInIU( val, !newPolar ); |
|||
|
|||
if( newPolar ) |
|||
{ |
|||
// convert to polar coordinates
|
|||
double r, q; |
|||
ToPolarDeg( val.x, val.y, r, q); |
|||
|
|||
PutValueInLocalUnits( *m_xEntry, round( r / 10.0) * 10 ); |
|||
m_xLabel->SetLabelText( wxT( "r:" ) ); |
|||
|
|||
m_yEntry->SetValue( wxString::FromDouble( q ) ); |
|||
m_yLabel->SetLabelText( wxT( "\u03b8:" ) ); // theta
|
|||
|
|||
m_yUnit->SetLabelText( GetAbbreviatedUnitsLabel( DEGREES ) ); |
|||
} |
|||
else |
|||
{ |
|||
// vector is already in Cartesian, so just render out
|
|||
|
|||
// note - round off the last decimal place (10nm) to prevent
|
|||
// (some) rounding causing errors when round-tripping
|
|||
// you can never eliminate entirely, however
|
|||
PutValueInLocalUnits( *m_xEntry, round( val.x / 10.0) * 10 ); |
|||
m_xLabel->SetLabelText( wxT( "x:" ) ); |
|||
|
|||
PutValueInLocalUnits( *m_yEntry, round( val.y / 10.0) * 10 ); |
|||
m_yLabel->SetLabelText( wxT( "y:" ) ); |
|||
|
|||
m_yUnit->SetLabelText( GetAbbreviatedUnitsLabel( g_UserUnit ) ); |
|||
} |
|||
} |
|||
|
|||
|
|||
void DIALOG_MOVE_EXACT::OnClear( wxCommandEvent& event ) |
|||
{ |
|||
wxObject* obj = event.GetEventObject(); |
|||
wxTextCtrl* entry = NULL; |
|||
|
|||
if( obj == m_clearX ) |
|||
{ |
|||
entry = m_xEntry; |
|||
} |
|||
else if( obj == m_clearY ) |
|||
{ |
|||
entry = m_yEntry; |
|||
} |
|||
else if( obj == m_clearRot ) |
|||
{ |
|||
entry = m_rotEntry; |
|||
} |
|||
|
|||
if( entry ) |
|||
entry->SetValue( "0" ); |
|||
} |
|||
|
|||
|
|||
void DIALOG_MOVE_EXACT::OnCancelClick( wxCommandEvent& event ) |
|||
{ |
|||
EndModal( MOVE_ABORT ); |
|||
} |
|||
|
|||
|
|||
void DIALOG_MOVE_EXACT::OnOkClick( wxCommandEvent& event ) |
|||
{ |
|||
m_rotation = DoubleValueFromString( DEGREES, m_rotEntry->GetValue() ); |
|||
|
|||
// for the output, we only deliver a Cartesian vector
|
|||
bool ok = GetTranslationInIU( m_translation, m_polarCoords->IsChecked() ); |
|||
|
|||
if ( ok ) |
|||
{ |
|||
// save the settings
|
|||
m_options.polarCoords = m_polarCoords->GetValue(); |
|||
m_xEntry->GetValue().ToDouble( &m_options.entry1 ); |
|||
m_yEntry->GetValue().ToDouble( &m_options.entry2 ); |
|||
m_rotEntry->GetValue().ToDouble( &m_options.entryRotation ); |
|||
|
|||
EndModal( MOVE_OK ); |
|||
} |
|||
} |
|||
|
|||
|
|||
/*!
|
|||
* Reset a text field to be 0 if it was exited while blank |
|||
*/ |
|||
void DIALOG_MOVE_EXACT::OnTextFocusLost( wxFocusEvent& event ) |
|||
{ |
|||
wxTextCtrl* obj = static_cast<wxTextCtrl*>( event.GetEventObject() ); |
|||
|
|||
if( obj->GetValue().IsEmpty() ) |
|||
{ |
|||
obj->SetValue("0"); |
|||
} |
|||
} |
1281
pcbnew/dialogs/dialog_move_exact.fbp
File diff suppressed because it is too large
View File
File diff suppressed because it is too large
View File
@ -0,0 +1,87 @@ |
|||
/* |
|||
* This program source code file is part of KiCad, a free EDA CAD application. |
|||
* |
|||
* Copyright (C) 2014 John Beard, john.j.beard@gmail.com |
|||
* Copyright (C) 1992-2014 KiCad Developers, see AUTHORS.txt for contributors. |
|||
* |
|||
* This program is free software; you can redistribute it and/or |
|||
* modify it under the terms of the GNU General Public License |
|||
* as published by the Free Software Foundation; either version 2 |
|||
* of the License, or (at your option) any later version. |
|||
* |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program; if not, you may find one here: |
|||
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html |
|||
* or you may search the http://www.gnu.org website for the version 2 license, |
|||
* or you may write to the Free Software Foundation, Inc., |
|||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA |
|||
*/ |
|||
|
|||
#ifndef __DIALOG_MOVE_EXACT__ |
|||
#define __DIALOG_MOVE_EXACT__ |
|||
|
|||
// Include the wxFormBuider header base: |
|||
#include <vector> |
|||
#include <dialog_move_exact_base.h> |
|||
|
|||
class DIALOG_MOVE_EXACT : public DIALOG_MOVE_EXACT_BASE |
|||
{ |
|||
private: |
|||
|
|||
wxPoint& m_translation; |
|||
double& m_rotation; |
|||
|
|||
public: |
|||
|
|||
enum MOVE_EDIT_T |
|||
{ |
|||
MOVE_ABORT, ///< if not changed or error |
|||
MOVE_OK, ///< if successfully changed |
|||
}; |
|||
|
|||
// Constructor and destructor |
|||
DIALOG_MOVE_EXACT( PCB_BASE_FRAME* aParent, wxPoint& translation, |
|||
double& rotation ); |
|||
~DIALOG_MOVE_EXACT(); |
|||
|
|||
private: |
|||
|
|||
void OnTextFocusLost( wxFocusEvent& event ); |
|||
void OnPolarChanged( wxCommandEvent& event ); |
|||
void OnClear( wxCommandEvent& event ); |
|||
|
|||
void OnCancelClick( wxCommandEvent& event ); |
|||
void OnOkClick( wxCommandEvent& event ); |
|||
|
|||
void ToPolarDeg( double x, double y, double& r, double& q ); |
|||
bool GetTranslationInIU ( wxPoint& val, bool polar ); |
|||
|
|||
/** |
|||
* Persistent dialog options |
|||
*/ |
|||
struct MOVE_EXACT_OPTIONS |
|||
{ |
|||
bool polarCoords; |
|||
double entry1; |
|||
double entry2; |
|||
double entryRotation; |
|||
|
|||
MOVE_EXACT_OPTIONS(): |
|||
polarCoords(false), |
|||
entry1(0), |
|||
entry2(0), |
|||
entryRotation(0) |
|||
{ |
|||
} |
|||
}; |
|||
|
|||
// persistent settings |
|||
static MOVE_EXACT_OPTIONS m_options; |
|||
}; |
|||
|
|||
#endif // __DIALOG_MOVE_EXACT__ |
@ -0,0 +1,114 @@ |
|||
///////////////////////////////////////////////////////////////////////////
|
|||
// C++ code generated with wxFormBuilder (version Jun 6 2014)
|
|||
// http://www.wxformbuilder.org/
|
|||
//
|
|||
// PLEASE DO "NOT" EDIT THIS FILE!
|
|||
///////////////////////////////////////////////////////////////////////////
|
|||
|
|||
#include "dialog_move_exact_base.h"
|
|||
|
|||
///////////////////////////////////////////////////////////////////////////
|
|||
|
|||
DIALOG_MOVE_EXACT_BASE::DIALOG_MOVE_EXACT_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( -1,-1 ), wxDefaultSize ); |
|||
|
|||
wxBoxSizer* bMainSizer; |
|||
bMainSizer = new wxBoxSizer( wxVERTICAL ); |
|||
|
|||
m_polarCoords = new wxCheckBox( this, wxID_ANY, _("Polar coordinates"), wxDefaultPosition, wxDefaultSize, 0 ); |
|||
bMainSizer->Add( m_polarCoords, 0, wxALL|wxEXPAND, 5 ); |
|||
|
|||
wxFlexGridSizer* fgSizer2; |
|||
fgSizer2 = new wxFlexGridSizer( 0, 4, 0, 0 ); |
|||
fgSizer2->AddGrowableCol( 1 ); |
|||
fgSizer2->SetFlexibleDirection( wxBOTH ); |
|||
fgSizer2->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); |
|||
|
|||
m_xLabel = new wxStaticText( this, wxID_ANY, _("x:"), wxDefaultPosition, wxSize( -1,-1 ), 0 ); |
|||
m_xLabel->Wrap( -1 ); |
|||
fgSizer2->Add( m_xLabel, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxALL, 5 ); |
|||
|
|||
m_xEntry = new wxTextCtrl( this, wxID_ANY, _("0"), wxDefaultPosition, wxDefaultSize, 0 ); |
|||
fgSizer2->Add( m_xEntry, 0, wxALL|wxEXPAND, 5 ); |
|||
|
|||
m_xUnit = new wxStaticText( this, wxID_ANY, _("mm"), wxDefaultPosition, wxDefaultSize, 0 ); |
|||
m_xUnit->Wrap( -1 ); |
|||
fgSizer2->Add( m_xUnit, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_LEFT|wxALL, 5 ); |
|||
|
|||
m_clearX = new wxBitmapButton( this, wxID_CLEAR, wxArtProvider::GetBitmap( wxART_DELETE, wxART_BUTTON ), wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW ); |
|||
fgSizer2->Add( m_clearX, 0, wxALL, 5 ); |
|||
|
|||
m_yLabel = new wxStaticText( this, wxID_ANY, _("y:"), wxDefaultPosition, wxDefaultSize, 0 ); |
|||
m_yLabel->Wrap( -1 ); |
|||
fgSizer2->Add( m_yLabel, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxALL, 5 ); |
|||
|
|||
m_yEntry = new wxTextCtrl( this, wxID_ANY, _("0"), wxDefaultPosition, wxDefaultSize, 0 ); |
|||
fgSizer2->Add( m_yEntry, 0, wxALL|wxEXPAND, 5 ); |
|||
|
|||
m_yUnit = new wxStaticText( this, wxID_ANY, _("mm"), wxDefaultPosition, wxDefaultSize, 0 ); |
|||
m_yUnit->Wrap( -1 ); |
|||
fgSizer2->Add( m_yUnit, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 ); |
|||
|
|||
m_clearY = new wxBitmapButton( this, wxID_CLEAR, wxArtProvider::GetBitmap( wxART_DELETE, wxART_BUTTON ), wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW ); |
|||
fgSizer2->Add( m_clearY, 0, wxALL, 5 ); |
|||
|
|||
m_rotLabel = new wxStaticText( this, wxID_ANY, _("Rotate:"), wxDefaultPosition, wxDefaultSize, 0 ); |
|||
m_rotLabel->Wrap( -1 ); |
|||
fgSizer2->Add( m_rotLabel, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxALL, 5 ); |
|||
|
|||
m_rotEntry = new wxTextCtrl( this, wxID_ANY, _("0"), wxDefaultPosition, wxDefaultSize, 0 ); |
|||
fgSizer2->Add( m_rotEntry, 0, wxALL|wxEXPAND, 5 ); |
|||
|
|||
m_rotUnit = new wxStaticText( this, wxID_ANY, _("deg"), wxDefaultPosition, wxDefaultSize, 0 ); |
|||
m_rotUnit->Wrap( -1 ); |
|||
fgSizer2->Add( m_rotUnit, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 ); |
|||
|
|||
m_clearRot = new wxBitmapButton( this, wxID_CLEAR, wxArtProvider::GetBitmap( wxART_DELETE, wxART_BUTTON ), wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW ); |
|||
fgSizer2->Add( m_clearRot, 0, wxALL, 5 ); |
|||
|
|||
|
|||
bMainSizer->Add( fgSizer2, 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(); |
|||
|
|||
bMainSizer->Add( m_stdButtons, 0, wxALL|wxEXPAND, 5 ); |
|||
|
|||
|
|||
this->SetSizer( bMainSizer ); |
|||
this->Layout(); |
|||
bMainSizer->Fit( this ); |
|||
|
|||
// Connect Events
|
|||
this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_MOVE_EXACT_BASE::OnClose ) ); |
|||
m_polarCoords->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_MOVE_EXACT_BASE::OnPolarChanged ), NULL, this ); |
|||
m_xEntry->Connect( wxEVT_KILL_FOCUS, wxFocusEventHandler( DIALOG_MOVE_EXACT_BASE::OnTextFocusLost ), NULL, this ); |
|||
m_clearX->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_MOVE_EXACT_BASE::OnClear ), NULL, this ); |
|||
m_yEntry->Connect( wxEVT_KILL_FOCUS, wxFocusEventHandler( DIALOG_MOVE_EXACT_BASE::OnTextFocusLost ), NULL, this ); |
|||
m_clearY->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_MOVE_EXACT_BASE::OnClear ), NULL, this ); |
|||
m_rotEntry->Connect( wxEVT_KILL_FOCUS, wxFocusEventHandler( DIALOG_MOVE_EXACT_BASE::OnTextFocusLost ), NULL, this ); |
|||
m_clearRot->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_MOVE_EXACT_BASE::OnClear ), NULL, this ); |
|||
m_stdButtonsCancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_MOVE_EXACT_BASE::OnCancelClick ), NULL, this ); |
|||
m_stdButtonsOK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_MOVE_EXACT_BASE::OnOkClick ), NULL, this ); |
|||
} |
|||
|
|||
DIALOG_MOVE_EXACT_BASE::~DIALOG_MOVE_EXACT_BASE() |
|||
{ |
|||
// Disconnect Events
|
|||
this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_MOVE_EXACT_BASE::OnClose ) ); |
|||
m_polarCoords->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_MOVE_EXACT_BASE::OnPolarChanged ), NULL, this ); |
|||
m_xEntry->Disconnect( wxEVT_KILL_FOCUS, wxFocusEventHandler( DIALOG_MOVE_EXACT_BASE::OnTextFocusLost ), NULL, this ); |
|||
m_clearX->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_MOVE_EXACT_BASE::OnClear ), NULL, this ); |
|||
m_yEntry->Disconnect( wxEVT_KILL_FOCUS, wxFocusEventHandler( DIALOG_MOVE_EXACT_BASE::OnTextFocusLost ), NULL, this ); |
|||
m_clearY->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_MOVE_EXACT_BASE::OnClear ), NULL, this ); |
|||
m_rotEntry->Disconnect( wxEVT_KILL_FOCUS, wxFocusEventHandler( DIALOG_MOVE_EXACT_BASE::OnTextFocusLost ), NULL, this ); |
|||
m_clearRot->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_MOVE_EXACT_BASE::OnClear ), NULL, this ); |
|||
m_stdButtonsCancel->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_MOVE_EXACT_BASE::OnCancelClick ), NULL, this ); |
|||
m_stdButtonsOK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_MOVE_EXACT_BASE::OnOkClick ), NULL, this ); |
|||
|
|||
} |
@ -0,0 +1,77 @@ |
|||
/////////////////////////////////////////////////////////////////////////// |
|||
// C++ code generated with wxFormBuilder (version Jun 6 2014) |
|||
// http://www.wxformbuilder.org/ |
|||
// |
|||
// PLEASE DO "NOT" EDIT THIS FILE! |
|||
/////////////////////////////////////////////////////////////////////////// |
|||
|
|||
#ifndef __DIALOG_MOVE_EXACT_BASE_H__ |
|||
#define __DIALOG_MOVE_EXACT_BASE_H__ |
|||
|
|||
#include <wx/artprov.h> |
|||
#include <wx/xrc/xmlres.h> |
|||
#include <wx/intl.h> |
|||
class DIALOG_SHIM; |
|||
|
|||
#include "dialog_shim.h" |
|||
#include <wx/string.h> |
|||
#include <wx/checkbox.h> |
|||
#include <wx/gdicmn.h> |
|||
#include <wx/font.h> |
|||
#include <wx/colour.h> |
|||
#include <wx/settings.h> |
|||
#include <wx/stattext.h> |
|||
#include <wx/textctrl.h> |
|||
#include <wx/bitmap.h> |
|||
#include <wx/image.h> |
|||
#include <wx/icon.h> |
|||
#include <wx/bmpbuttn.h> |
|||
#include <wx/button.h> |
|||
#include <wx/sizer.h> |
|||
#include <wx/dialog.h> |
|||
|
|||
/////////////////////////////////////////////////////////////////////////// |
|||
|
|||
|
|||
/////////////////////////////////////////////////////////////////////////////// |
|||
/// Class DIALOG_MOVE_EXACT_BASE |
|||
/////////////////////////////////////////////////////////////////////////////// |
|||
class DIALOG_MOVE_EXACT_BASE : public DIALOG_SHIM |
|||
{ |
|||
private: |
|||
|
|||
protected: |
|||
wxCheckBox* m_polarCoords; |
|||
wxStaticText* m_xLabel; |
|||
wxTextCtrl* m_xEntry; |
|||
wxStaticText* m_xUnit; |
|||
wxBitmapButton* m_clearX; |
|||
wxStaticText* m_yLabel; |
|||
wxTextCtrl* m_yEntry; |
|||
wxStaticText* m_yUnit; |
|||
wxBitmapButton* m_clearY; |
|||
wxStaticText* m_rotLabel; |
|||
wxTextCtrl* m_rotEntry; |
|||
wxStaticText* m_rotUnit; |
|||
wxBitmapButton* m_clearRot; |
|||
wxStdDialogButtonSizer* m_stdButtons; |
|||
wxButton* m_stdButtonsOK; |
|||
wxButton* m_stdButtonsCancel; |
|||
|
|||
// Virtual event handlers, overide them in your derived class |
|||
virtual void OnClose( wxCloseEvent& event ) { event.Skip(); } |
|||
virtual void OnPolarChanged( wxCommandEvent& event ) { event.Skip(); } |
|||
virtual void OnTextFocusLost( wxFocusEvent& event ) { event.Skip(); } |
|||
virtual void OnClear( wxCommandEvent& event ) { event.Skip(); } |
|||
virtual void OnCancelClick( wxCommandEvent& event ) { event.Skip(); } |
|||
virtual void OnOkClick( wxCommandEvent& event ) { event.Skip(); } |
|||
|
|||
|
|||
public: |
|||
|
|||
DIALOG_MOVE_EXACT_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Move item"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); |
|||
~DIALOG_MOVE_EXACT_BASE(); |
|||
|
|||
}; |
|||
|
|||
#endif //__DIALOG_MOVE_EXACT_BASE_H__ |
Write
Preview
Loading…
Cancel
Save
Reference in new issue