Merge lp:~michal-jahelka/kicad/kicad into lp:kicad/product

Proposed by Michal Jahelka
Status: Merged
Merged at revision: 4182
Proposed branch: lp:~michal-jahelka/kicad/kicad
Merge into: lp:kicad/product
Diff against target: 970 lines (+676/-4)
19 files modified
bitmaps_png/CMakeLists.txt (+1/-0)
bitmaps_png/cpp_26/module_library_list.cpp (+83/-0)
bitmaps_png/sources/module_library_list.svg (+172/-0)
cvpcb/CMakeLists.txt (+1/-0)
cvpcb/class_components_listbox.cpp (+5/-2)
cvpcb/class_footprints_listbox.cpp (+38/-0)
cvpcb/class_library_listbox.cpp (+204/-0)
cvpcb/cvframe.cpp (+28/-1)
cvpcb/cvpcb.cpp (+1/-0)
cvpcb/cvpcb_id.h (+3/-1)
cvpcb/cvpcb_mainframe.h (+4/-0)
cvpcb/cvstruct.h (+34/-0)
cvpcb/dialogs/dialog_cvpcb_config.cpp (+1/-0)
cvpcb/dialogs/dialog_display_options.cpp (+1/-0)
cvpcb/listboxes.cpp (+26/-0)
cvpcb/readwrite_dlgs.cpp (+1/-0)
cvpcb/tool_cvpcb.cpp (+7/-0)
include/bitmaps.h (+1/-0)
include/library_select.h (+65/-0)
To merge this branch: bzr merge lp:~michal-jahelka/kicad/kicad
Reviewer Review Type Date Requested Status
KiCad Lead Developers Pending
Review via email: mp+156331@code.launchpad.net

Description of the change

Implements library selection in CVPCB. I Added new icon with L (library) symbol (between filtred by pincount and full list). New column i9s on left and contains selected libraries. When is library icon active I can see only footprints from selected library from left column. Now is possible to select from libraries such as inductors,resistors, diodes, mechanical,etc.

To post a comment you must log in.
Revision history for this message
Wayne Stambaugh (stambaughw) wrote :

This merge request no longer applies cleanly to the head of the testing branch. If you would like me to consider this merge request, please update your branch and fix any conflicts. I will soon be working on the footprint library table code for CvPcb so if you do not update this reasonably soon, I suspect there will be some considerable divergence from the current CvPcb code which will make maintaining your changes more difficult. Also, I noticed a few issues with this merge request. Doxygen comments should be placed in the header file (LIBRARY_LISTBOX::OnChar()) and your editor appears to be leaving trailing white space. Thank you for your interest in help KiCad.

Wayne

Revision history for this message
Michal Jahelka (michal-jahelka) wrote :

Hello,

my branch is done.

But I am not programmer (i only program microcontrollers), so i do not
understand what did you mean with doxygen. I tried to program it in the
same style like other source code in kicad (taken for example
class_footprint_listbox, copied to class_library_listbox and
rename/rewrite parts of code). I tried to repair some spaces, what i saw
in kdiff. KiCAD programming was my first c++ and first wx programming
(first branch taken 4 months).

Branch is in
https://code.launchpad.net/~michal-jahelka/kicad/LibrarySelect, sending
patch too.
Should I delete old branch, or you do? When tried update it didnt want,
wrote different. So I had to make new branch, it is 4176.

Second thing, I created some libraries, modules and 3D packages. Is
something similar like launchpad to put it there? I know about
kicadlib.org, but it has no member access, like bzr.

Michal Jahelka

Dne 24.5.2013 17:12, Wayne Stambaugh napsal(a):
> This merge request no longer applies cleanly to the head of the testing branch. If you would like me to consider this merge request, please update your branch and fix any conflicts. I will soon be working on the footprint library table code for CvPcb so if you do not update this reasonably soon, I suspect there will be some considerable divergence from the current CvPcb code which will make maintaining your changes more difficult. Also, I noticed a few issues with this merge request. Doxygen comments should be placed in the header file (LIBRARY_LISTBOX::OnChar()) and your editor appears to be leaving trailing white space. Thank you for your interest in help KiCad.
>
> Wayne

=== modified file 'bitmaps_png/CMakeLists.txt'
--- bitmaps_png/CMakeLists.txt 2013-03-01 19:59:29 +0000
+++ bitmaps_png/CMakeLists.txt 2013-05-29 09:23:32 +0000
@@ -359,6 +359,7 @@
359 module_full_list359 module_full_list
360 module_options360 module_options
361 module_pin_filtered_list361 module_pin_filtered_list
362 module_library_list
362 module_ratsnest363 module_ratsnest
363 module364 module
364 modview_icon365 modview_icon
365366
=== added file 'bitmaps_png/cpp_26/module_library_list.cpp'
--- bitmaps_png/cpp_26/module_library_list.cpp 1970-01-01 00:00:00 +0000
+++ bitmaps_png/cpp_26/module_library_list.cpp 2013-05-29 08:23:09 +0000
@@ -0,0 +1,83 @@
1
2/* Do not modify this file, it was automatically generated by the
3 * PNG2cpp CMake script, using a *.png file as input.
4 */
5
6#include <bitmaps.h>
7
8static const unsigned char png[] = {
9 0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d, 0x49, 0x48, 0x44, 0x52,
10 0x00, 0x00, 0x00, 0x1a, 0x00, 0x00, 0x00, 0x1a, 0x08, 0x06, 0x00, 0x00, 0x00, 0xa9, 0x4a, 0x4c,
11 0xce, 0x00, 0x00, 0x00, 0x04, 0x73, 0x42, 0x49, 0x54, 0x08, 0x08, 0x08, 0x08, 0x7c, 0x08, 0x64,
12 0x88, 0x00, 0x00, 0x00, 0x09, 0x70, 0x48, 0x59, 0x73, 0x00, 0x00, 0x0d, 0xd7, 0x00, 0x00, 0x0d,
13 0xd7, 0x01, 0x42, 0x28, 0x9b, 0x78, 0x00, 0x00, 0x00, 0x19, 0x74, 0x45, 0x58, 0x74, 0x53, 0x6f,
14 0x66, 0x74, 0x77, 0x61, 0x72, 0x65, 0x00, 0x77, 0x77, 0x77, 0x2e, 0x69, 0x6e, 0x6b, 0x73, 0x63,
15 0x61, 0x70, 0x65, 0x2e, 0x6f, 0x72, 0x67, 0x9b, 0xee, 0x3c, 0x1a, 0x00, 0x00, 0x03, 0xd2, 0x49,
16 0x44, 0x41, 0x54, 0x48, 0x89, 0xbd, 0x96, 0x5d, 0x48, 0x5b, 0x67, 0x18, 0xc7, 0x7f, 0xe7, 0x23,
17 0x59, 0xac, 0x4e, 0x4f, 0xac, 0x46, 0x11, 0xa9, 0xab, 0x8d, 0xd2, 0xb1, 0xd1, 0x3b, 0xc7, 0x7a,
18 0xb1, 0x3a, 0xb5, 0x89, 0x66, 0xcd, 0x56, 0x99, 0x05, 0xe9, 0x10, 0xec, 0xcd, 0xae, 0xa4, 0x20,
19 0x82, 0xd7, 0xcd, 0x95, 0x17, 0xdd, 0xc5, 0x7a, 0xd1, 0x1b, 0x19, 0x42, 0x07, 0x19, 0x63, 0x5e,
20 0x18, 0xd3, 0xe9, 0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, 0x36, 0x3a, 0xa8, 0xc4, 0x37, 0xe2, 0x02, 0xfc,
77 0x0f, 0xfd, 0x66, 0x6b, 0x49, 0xc9, 0xd5, 0xed, 0x5a, 0x00, 0x00, 0x00, 0x00, 0x49, 0x45, 0x4e,
78 0x44, 0xae, 0x42, 0x60, 0x82
79};
80
81const BITMAP_OPAQUE module_library_list_xpm[1] = {{ png, sizeof( png ), "module_library_list_xpm" }};
82
83//EOF
084
=== added file 'bitmaps_png/sources/module_library_list.svg'
--- bitmaps_png/sources/module_library_list.svg 1970-01-01 00:00:00 +0000
+++ bitmaps_png/sources/module_library_list.svg 2013-05-29 08:26:21 +0000
@@ -0,0 +1,172 @@
1<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2<svg
3 xmlns:dc="http://purl.org/dc/elements/1.1/"
4 xmlns:cc="http://creativecommons.org/ns#"
5 xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
6 xmlns:svg="http://www.w3.org/2000/svg"
7 xmlns="http://www.w3.org/2000/svg"
8 xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
9 xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
10 height="26"
11 width="26"
12 version="1.1"
13 viewBox="0 0 26 26"
14 id="svg2"
15 inkscape:version="0.48.4 r9939"
16 sodipodi:docname="module_filtered_list.svg">
17 <metadata
18 id="metadata56">
19 <rdf:RDF>
20 <cc:Work
21 rdf:about="">
22 <dc:format>image/svg+xml</dc:format>
23 <dc:type
24 rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
25 <dc:title />
26 </cc:Work>
27 </rdf:RDF>
28 </metadata>
29 <defs
30 id="defs54" />
31 <sodipodi:namedview
32 pagecolor="#ffffff"
33 bordercolor="#666666"
34 borderopacity="1"
35 objecttolerance="10"
36 gridtolerance="10"
37 guidetolerance="10"
38 inkscape:pageopacity="0"
39 inkscape:pageshadow="2"
40 inkscape:window-width="1920"
41 inkscape:window-height="1015"
42 id="namedview52"
43 showgrid="true"
44 inkscape:zoom="13.906434"
45 inkscape:cx="19.918756"
46 inkscape:cy="24.624712"
47 inkscape:window-x="-4"
48 inkscape:window-y="-4"
49 inkscape:window-maximized="1"
50 inkscape:current-layer="svg2"
51 inkscape:snap-to-guides="false"
52 inkscape:snap-grids="false">
53 <inkscape:grid
54 type="xygrid"
55 id="grid3033"
56 empspacing="5"
57 visible="true"
58 enabled="true"
59 snapvisiblegridlinesonly="true" />
60 </sodipodi:namedview>
61 <rect
62 transform="matrix(0,-1,1,0,0,0)"
63 height="21.994465"
64 width="12.99073"
65 y="1.5596062"
66 x="-17.520231"
67 id="rect8"
68 style="fill:#ffffff;stroke:#484848;stroke-width:0.99127513000000000;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
69 <path
70 d="m 1.5927632,8.9410802 a 2.0341261,1.8090857 0 1 1 0.012585,3.6181538"
71 id="path10"
72 inkscape:connector-curvature="0"
73 style="fill:none;stroke:#484848;stroke-width:0.99127518999999997;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
74 <rect
75 transform="matrix(0,-1,1,0,0,0)"
76 height="3.9761357"
77 width="5.9874525"
78 y="3.5188339"
79 x="-20.502354"
80 id="rect30"
81 style="fill:#ff7800;stroke:#484848;stroke-width:1;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
82 <path
83 d="m 5.5071146,16.522119 a 0.98526485,0.92342205 0 0 1 0,1.846844 0.98526485,0.92342205 0 1 1 0,-1.846844 z"
84 id="path32"
85 inkscape:connector-curvature="0"
86 style="fill:#ffede0;stroke:#484848;stroke-width:1;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
87 <rect
88 transform="matrix(0,-1,1,0,0,0)"
89 height="3.9761357"
90 width="5.9874525"
91 y="10.507601"
92 x="-20.513519"
93 id="rect30-5"
94 style="fill:#ff7800;stroke:#484848;stroke-width:1;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
95 <path
96 d="m 12.495882,16.533284 a 0.98526485,0.92342205 0 0 1 0,1.846845 0.98526485,0.92342205 0 1 1 0,-1.846845 z"
97 id="path32-4"
98 inkscape:connector-curvature="0"
99 style="fill:#ffede0;stroke:#484848;stroke-width:1;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
100 <rect
101 transform="matrix(0,-1,1,0,0,0)"
102 height="3.9761357"
103 width="5.9874525"
104 y="17.499128"
105 x="-20.488094"
106 id="rect30-2"
107 style="fill:#ff7800;stroke:#484848;stroke-width:1;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
108 <path
109 d="m 19.487408,16.507861 a 0.98526485,0.92342205 0 0 1 0,1.846844 0.98526485,0.92342205 0 1 1 0,-1.846844 z"
110 id="path32-0"
111 inkscape:connector-curvature="0"
112 style="fill:#ffede0;stroke:#484848;stroke-width:1;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
113 <rect
114 transform="matrix(0,-1,1,0,0,0)"
115 height="3.9761357"
116 width="5.9874525"
117 y="3.5339792"
118 x="-7.5303874"
119 id="rect30-1"
120 style="fill:#ff7800;stroke:#484848;stroke-width:1;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
121 <path
122 d="m 5.5222603,3.5501532 a 0.98526485,0.92342205 0 0 1 0,1.8468441 0.98526485,0.92342205 0 1 1 0,-1.8468441 z"
123 id="path32-3"
124 inkscape:connector-curvature="0"
125 style="fill:#ffede0;stroke:#484848;stroke-width:1;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
126 <rect
127 transform="matrix(0,-1,1,0,0,0)"
128 height="3.9761357"
129 width="5.9874525"
130 y="10.522747"
131 x="-7.5415525"
132 id="rect30-5-6"
133 style="fill:#ff7800;stroke:#484848;stroke-width:1;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
134 <path
135 d="m 12.511028,3.5613187 a 0.98526485,0.92342205 0 0 1 0,1.8468441 0.98526485,0.92342205 0 1 1 0,-1.8468441 z"
136 id="path32-4-0"
137 inkscape:connector-curvature="0"
138 style="fill:#ffede0;stroke:#484848;stroke-width:1;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
139 <rect
140 transform="matrix(0,-1,1,0,0,0)"
141 height="3.9761357"
142 width="5.9874525"
143 y="17.514275"
144 x="-7.516129"
145 id="rect30-2-8"
146 style="fill:#ff7800;stroke:#484848;stroke-width:1;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
147 <path
148 d="m 19.502554,3.535895 a 0.98526485,0.92342205 0 0 1 0,1.8468441 0.98526485,0.92342205 0 1 1 0,-1.8468441 z"
149 id="path32-0-4"
150 inkscape:connector-curvature="0"
151 style="fill:#ffede0;stroke:#484848;stroke-width:1;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
152 <rect
153 ry="0.95373797"
154 height="13.958503"
155 width="11.03963"
156 y="10.016949"
157 x="13.978938"
158 id="rect42"
159 style="fill:#3e3e3e" />
160 <rect
161 style="color:#000000;fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
162 id="rect3003"
163 width="8.413372"
164 height="11.649284"
165 x="15.316651"
166 y="11.114803" />
167 <path
168 style="fill:none;stroke:#008000;stroke-width:1.5;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:none"
169 d="m 17.97729,13.415897 0,7.119007 3.523549,0"
170 id="path3005"
171 inkscape:connector-curvature="0" />
172</svg>
0173
=== modified file 'cvpcb/CMakeLists.txt'
--- cvpcb/CMakeLists.txt 2013-05-01 19:01:14 +0000
+++ cvpcb/CMakeLists.txt 2013-05-28 08:25:47 +0000
@@ -34,6 +34,7 @@
34 class_components_listbox.cpp34 class_components_listbox.cpp
35 class_DisplayFootprintsFrame.cpp35 class_DisplayFootprintsFrame.cpp
36 class_footprints_listbox.cpp36 class_footprints_listbox.cpp
37 class_library_listbox.cpp
37 cvframe.cpp38 cvframe.cpp
38 cvpcb.cpp39 cvpcb.cpp
39 listboxes.cpp40 listboxes.cpp
4041
=== modified file 'cvpcb/class_components_listbox.cpp'
--- cvpcb/class_components_listbox.cpp 2012-11-28 15:24:53 +0000
+++ cvpcb/class_components_listbox.cpp 2013-05-28 08:16:44 +0000
@@ -113,13 +113,16 @@
113 {113 {
114 case WXK_HOME:114 case WXK_HOME:
115 case WXK_END:115 case WXK_END:
116 case WXK_UP:116 case WXK_UP:
117 case WXK_DOWN:117 case WXK_DOWN:
118 case WXK_PAGEUP:118 case WXK_PAGEUP:
119 case WXK_PAGEDOWN:119 case WXK_PAGEDOWN:
120 event.Skip();
121 return;
122
120 case WXK_LEFT:123 case WXK_LEFT:
121 case WXK_NUMPAD_LEFT:124 case WXK_NUMPAD_LEFT:
122 event.Skip();125 GetParent()->m_LibraryList->SetFocus();
123 return;126 return;
124127
125 case WXK_RIGHT:128 case WXK_RIGHT:
126129
=== modified file 'cvpcb/class_footprints_listbox.cpp'
--- cvpcb/class_footprints_listbox.cpp 2013-04-25 16:29:35 +0000
+++ cvpcb/class_footprints_listbox.cpp 2013-05-29 10:04:49 +0000
@@ -30,6 +30,8 @@
30#include <fctsys.h>30#include <fctsys.h>
31#include <wxstruct.h>31#include <wxstruct.h>
32#include <macros.h>32#include <macros.h>
33#include <appl_wxstruct.h>
34#include <wildcards_and_files_ext.h>
3335
34#include <cvpcb.h>36#include <cvpcb.h>
35#include <cvpcb_mainframe.h>37#include <cvpcb_mainframe.h>
@@ -233,7 +235,49 @@
233 Refresh();235 Refresh();
234}236}
235237
236238void FOOTPRINTS_LISTBOX::SetFootprintFilteredByLibraryList( FOOTPRINT_LIST& list,
239 wxString SelectedLibrary ) {
240 wxString msg;
241 int oldSelection = GetSelection();
242 bool hasItem = false;
243
244 wxFileName filename = SelectedLibrary;
245 filename.SetExt( LegacyFootprintLibPathExtension );
246 wxString FullLibraryName = wxGetApp().FindLibraryPath( filename );
247
248 m_FilteredFootprintList.Clear();
249
250 for( unsigned ii = 0; ii < list.GetCount(); ii++ )
251 {
252 FOOTPRINT_INFO& footprint = list.GetItem(ii);
253 wxString LibName = footprint.m_libPath;
254 if( LibName.Matches( FullLibraryName ) )
255 {
256 msg.Printf( wxT( "%3d %s" ), m_FilteredFootprintList.GetCount() + 1,
257 footprint.m_Module.GetData() );
258 m_FilteredFootprintList.Add( msg );
259 hasItem = true;
260 }
261 }
262
263 if( hasItem )
264 SetActiveFootprintList( false );
265 else
266 SetActiveFootprintList( true );
267
268 if( ( GetCount() == 0 ) || ( oldSelection >= GetCount() ) )
269 SetSelection( 0, true );
270
271 Refresh();
272}
273
274/** Set the footprint list. We can have 2 footprint list:
275 * The full footprint list
276 * The filtered footprint list (if the current selected component has a
277 * filter for footprints)
278 * @param FullList true = full footprint list, false = filtered footprint list
279 * @param Redraw = true to redraw the window
280 */
237void FOOTPRINTS_LISTBOX::SetActiveFootprintList( bool FullList, bool Redraw )281void FOOTPRINTS_LISTBOX::SetActiveFootprintList( bool FullList, bool Redraw )
238{282{
239 bool old_selection = m_UseFootprintFullList;283 bool old_selection = m_UseFootprintFullList;
240284
=== added file 'cvpcb/class_library_listbox.cpp'
--- cvpcb/class_library_listbox.cpp 1970-01-01 00:00:00 +0000
+++ cvpcb/class_library_listbox.cpp 2013-05-28 07:23:23 +0000
@@ -0,0 +1,204 @@
1/**
2 * @file class_library_listbox.cpp
3 * class to display used library and selecting it
4 */
5
6#include <fctsys.h>
7#include <wxstruct.h>
8#include <macros.h>
9
10#include <cvpcb.h>
11#include <cvpcb_mainframe.h>
12#include <cvstruct.h>
13
14
15/***************************************/
16/* ListBox handling the library list */
17/***************************************/
18
19LIBRARY_LISTBOX::LIBRARY_LISTBOX( CVPCB_MAINFRAME* parent,
20 wxWindowID id, const wxPoint& loc,
21 const wxSize& size,
22 int nbitems, wxString choice[] ) :
23 ITEMS_LISTBOX_BASE( parent, id, loc, size )
24{
25 //ListLibraries();
26}
27
28
29LIBRARY_LISTBOX::~LIBRARY_LISTBOX()
30{
31}
32
33
34/*
35 * Return number of items
36 */
37int LIBRARY_LISTBOX::GetCount()
38{
39 return m_LibraryList.Count();
40}
41
42
43/*
44 * Change an item text
45 */
46void LIBRARY_LISTBOX::SetString( unsigned linecount, const wxString& text )
47{
48 if( linecount >= m_LibraryList.Count() )
49 linecount = m_LibraryList.Count() - 1;
50 if( linecount >= 0 )
51 m_LibraryList[linecount] = text;
52}
53
54
55wxString LIBRARY_LISTBOX::GetSelectedLibrary()
56{
57 wxString libraryName;
58 int ii = GetFirstSelected();
59
60 if( ii >= 0 )
61 {
62 libraryName = m_LibraryList[ii];
63 }
64
65 return libraryName;
66}
67
68
69void LIBRARY_LISTBOX::AppendLine( const wxString& text )
70{
71 m_LibraryList.Add( text );
72 SetItemCount( m_LibraryList.Count() );
73}
74
75
76/*
77 * Overlaid function: MUST be provided in wxLC_VIRTUAL mode
78 * because real data is not handled by ITEMS_LISTBOX_BASE
79 */
80wxString LIBRARY_LISTBOX::OnGetItemText( long item, long column ) const
81{
82 return m_LibraryList.Item( item );
83}
84
85/*
86 * Enable or disable an item
87 */
88void LIBRARY_LISTBOX::SetSelection( unsigned index, bool State )
89{
90 if( (int) index >= GetCount() )
91 index = GetCount() - 1;
92
93 if( (index >= 0) && (GetCount() > 0) )
94 {
95#ifndef __WXMAC__
96 Select( index, State );
97#endif
98 EnsureVisible( index );
99#ifdef __WXMAC__
100 Refresh();
101#endif
102 }
103}
104
105
106void LIBRARY_LISTBOX::SetLibraryList( wxArrayString list )
107{
108 wxString msg;
109 int oldSelection = GetSelection();
110
111 m_LibraryList.Clear();
112
113 for( unsigned ii = 0; ii < list.GetCount(); ii++ )
114 {
115 msg = list.Item(ii);
116 m_LibraryList.Add( msg );
117 }
118
119 SetItemCount(list.GetCount());
120
121 if( GetCount() == 0 || oldSelection < 0 || oldSelection >= GetCount() )
122 SetSelection( 0, true );
123 Refresh();
124}
125
126
127/**************************************/
128/* Event table for the library list */
129/**************************************/
130
131BEGIN_EVENT_TABLE( LIBRARY_LISTBOX, ITEMS_LISTBOX_BASE )
132EVT_SIZE( ITEMS_LISTBOX_BASE::OnSize )
133EVT_CHAR( LIBRARY_LISTBOX::OnChar )
134END_EVENT_TABLE()
135
136
137/**
138 * Function OnChar
139 * called on a key pressed
140 * Call default handler for some special keys,
141 * and for "ascii" keys, select the first footprint
142 * that the name starts by the letter.
143 * This is the defaut behaviour of a listbox, but because we use
144 * virtual lists, the listbox does not know anything to what is displayed,
145 * we must handle this behaviour here.
146 * Furthermore the footprint name is not at the beginning of
147 * displayed lines (the first word is the line number)
148 */
149void LIBRARY_LISTBOX::OnChar( wxKeyEvent& event )
150{
151 int key = event.GetKeyCode();
152 switch( key )
153 {
154 case WXK_RIGHT:
155 case WXK_NUMPAD_RIGHT:
156 GetParent()->m_ListCmp->SetFocus();
157 return;
158
159 case WXK_HOME:
160 case WXK_END:
161 case WXK_UP:
162 case WXK_DOWN:
163 case WXK_PAGEUP:
164 case WXK_PAGEDOWN:
165 case WXK_LEFT:
166 case WXK_NUMPAD_LEFT:
167 event.Skip();
168 return;
169
170 default:
171 break;
172 }
173 // Search for an item name starting by the key code:
174 key = toupper(key);
175 for( unsigned ii = 0; ii < m_LibraryList.GetCount(); ii++ )
176 {
177 wxString text = m_LibraryList.Item(ii);
178 /* search for the start char of the footprint name.
179 * we must skip the line number
180 */
181 text.Trim(false); // Remove leading spaces in line
182 unsigned jj = 0;
183 for( ; jj < text.Len(); jj++ )
184 {
185 // skip line number
186 if( text[jj] == ' ' )
187 break;
188 }
189
190 for( ; jj < text.Len(); jj++ )
191 { // skip blanks
192 if( text[jj] != ' ' )
193 break;
194 }
195
196 int start_char = toupper( text[jj] );
197 if( key == start_char )
198 {
199 Focus( ii );
200 SetSelection( ii, true ); // Ensure visible
201 break;
202 }
203 }
204}
0205
=== modified file 'cvpcb/cvframe.cpp'
--- cvpcb/cvframe.cpp 2013-05-25 10:41:24 +0000
+++ cvpcb/cvframe.cpp 2013-05-28 08:33:00 +0000
@@ -85,6 +85,8 @@
85 CVPCB_MAINFRAME::OnSelectFilteringFootprint )85 CVPCB_MAINFRAME::OnSelectFilteringFootprint )
86 EVT_TOOL( ID_CVPCB_FOOTPRINT_DISPLAY_PIN_FILTERED_LIST,86 EVT_TOOL( ID_CVPCB_FOOTPRINT_DISPLAY_PIN_FILTERED_LIST,
87 CVPCB_MAINFRAME::OnSelectFilteringFootprint )87 CVPCB_MAINFRAME::OnSelectFilteringFootprint )
88 EVT_TOOL( ID_CVPCB_FOOTPRINT_DISPLAY_BY_LIBRARY_LIST,
89 CVPCB_MAINFRAME::OnSelectFilteringFootprint )
88 EVT_TOOL( ID_CVPCB_FOOTPRINT_DISPLAY_FULL_LIST,90 EVT_TOOL( ID_CVPCB_FOOTPRINT_DISPLAY_FULL_LIST,
89 CVPCB_MAINFRAME::OnSelectFilteringFootprint )91 CVPCB_MAINFRAME::OnSelectFilteringFootprint )
9092
@@ -97,6 +99,7 @@
97 EVT_LIST_ITEM_SELECTED( ID_CVPCB_FOOTPRINT_LIST, CVPCB_MAINFRAME::OnLeftClick )99 EVT_LIST_ITEM_SELECTED( ID_CVPCB_FOOTPRINT_LIST, CVPCB_MAINFRAME::OnLeftClick )
98 EVT_LIST_ITEM_ACTIVATED( ID_CVPCB_FOOTPRINT_LIST, CVPCB_MAINFRAME::OnLeftDClick )100 EVT_LIST_ITEM_ACTIVATED( ID_CVPCB_FOOTPRINT_LIST, CVPCB_MAINFRAME::OnLeftDClick )
99 EVT_LIST_ITEM_SELECTED( ID_CVPCB_COMPONENT_LIST, CVPCB_MAINFRAME::OnSelectComponent )101 EVT_LIST_ITEM_SELECTED( ID_CVPCB_COMPONENT_LIST, CVPCB_MAINFRAME::OnSelectComponent )
102 EVT_LIST_ITEM_SELECTED( ID_CVPCB_LIBRARY_LIST, CVPCB_MAINFRAME::OnSelectComponent )
100103
101 EVT_UPDATE_UI( ID_CVPCB_CONFIG_KEEP_OPEN_ON_SAVE, CVPCB_MAINFRAME::OnUpdateKeepOpenOnSave )104 EVT_UPDATE_UI( ID_CVPCB_CONFIG_KEEP_OPEN_ON_SAVE, CVPCB_MAINFRAME::OnUpdateKeepOpenOnSave )
102END_EVENT_TABLE()105END_EVENT_TABLE()
@@ -112,6 +115,7 @@
112115
113 m_ListCmp = NULL;116 m_ListCmp = NULL;
114 m_FootprintList = NULL;117 m_FootprintList = NULL;
118 m_LibraryList = NULL;
115 m_DisplayFootprintFrame = NULL;119 m_DisplayFootprintFrame = NULL;
116 m_mainToolBar = NULL;120 m_mainToolBar = NULL;
117 m_modified = false;121 m_modified = false;
@@ -160,6 +164,7 @@
160 // Create list of available modules and components of the schematic164 // Create list of available modules and components of the schematic
161 BuildCmpListBox();165 BuildCmpListBox();
162 BuildFOOTPRINTS_LISTBOX();166 BuildFOOTPRINTS_LISTBOX();
167 BuildLIBRARY_LISTBOX();
163168
164 m_auimgr.SetManagedWindow( this );169 m_auimgr.SetManagedWindow( this );
165170
@@ -179,10 +184,15 @@
179 m_auimgr.AddPane( m_ListCmp,184 m_auimgr.AddPane( m_ListCmp,
180 wxAuiPaneInfo( horiz ).Name( wxT( "m_ListCmp" ) ).CentrePane() );185 wxAuiPaneInfo( horiz ).Name( wxT( "m_ListCmp" ) ).CentrePane() );
181186
187 if( m_LibraryList)
188 m_auimgr.AddPane( m_LibraryList,
189 wxAuiPaneInfo( info ).Name( wxT( "m_LibraryList" ) ).
190 Left().BestSize( (int) ( m_FrameSize.x * 0.20 ), m_FrameSize.y ) );
191
182 if( m_FootprintList )192 if( m_FootprintList )
183 m_auimgr.AddPane( m_FootprintList,193 m_auimgr.AddPane( m_FootprintList,
184 wxAuiPaneInfo( info ).Name( wxT( "m_FootprintList" ) ).194 wxAuiPaneInfo( info ).Name( wxT( "m_FootprintList" ) ).
185 Right().BestSize( (int) ( m_FrameSize.x * 0.36 ), m_FrameSize.y ) );195 Right().BestSize( (int) ( m_FrameSize.x * 0.30 ), m_FrameSize.y ) );
186196
187 m_auimgr.Update();197 m_auimgr.Update();
188}198}
@@ -523,9 +533,11 @@
523 #define REDRAW_LIST true533 #define REDRAW_LIST true
524 #define SELECT_FULL_LIST true534 #define SELECT_FULL_LIST true
525 int selection = -1;535 int selection = -1;
536 wxString SelectedLibrary;
526537
527 if( !m_mainToolBar->GetToolToggled( ID_CVPCB_FOOTPRINT_DISPLAY_FILTERED_LIST )538 if( !m_mainToolBar->GetToolToggled( ID_CVPCB_FOOTPRINT_DISPLAY_FILTERED_LIST )
528 && !m_mainToolBar->GetToolToggled( ID_CVPCB_FOOTPRINT_DISPLAY_PIN_FILTERED_LIST )539 && !m_mainToolBar->GetToolToggled( ID_CVPCB_FOOTPRINT_DISPLAY_PIN_FILTERED_LIST )
540 && !m_mainToolBar->GetToolToggled( ID_CVPCB_FOOTPRINT_DISPLAY_BY_LIBRARY_LIST )
529 )541 )
530 m_FootprintList->SetActiveFootprintList( SELECT_FULL_LIST, REDRAW_LIST );542 m_FootprintList->SetActiveFootprintList( SELECT_FULL_LIST, REDRAW_LIST );
531543
@@ -548,6 +560,12 @@
548 m_footprints );560 m_footprints );
549 }561 }
550 else562 else
563 if( m_mainToolBar->GetToolToggled( ID_CVPCB_FOOTPRINT_DISPLAY_BY_LIBRARY_LIST ) )
564 {
565 SelectedLibrary=m_LibraryList->GetSelectedLibrary();
566 m_FootprintList->SetFootprintFilteredByLibraryList( m_footprints, SelectedLibrary );
567 }
568 else
551 {569 {
552 m_FootprintList->SetFootprintFilteredList( m_netlist.GetComponent( selection ),570 m_FootprintList->SetFootprintFilteredList( m_netlist.GetComponent( selection ),
553 m_footprints );571 m_footprints );
@@ -610,16 +628,25 @@
610 case ID_CVPCB_FOOTPRINT_DISPLAY_PIN_FILTERED_LIST:628 case ID_CVPCB_FOOTPRINT_DISPLAY_PIN_FILTERED_LIST:
611 m_mainToolBar->ToggleTool( ID_CVPCB_FOOTPRINT_DISPLAY_FULL_LIST, false );629 m_mainToolBar->ToggleTool( ID_CVPCB_FOOTPRINT_DISPLAY_FULL_LIST, false );
612 m_mainToolBar->ToggleTool( ID_CVPCB_FOOTPRINT_DISPLAY_FILTERED_LIST, false );630 m_mainToolBar->ToggleTool( ID_CVPCB_FOOTPRINT_DISPLAY_FILTERED_LIST, false );
631 m_mainToolBar->ToggleTool( ID_CVPCB_FOOTPRINT_DISPLAY_BY_LIBRARY_LIST, false );
613 break;632 break;
614633
615 case ID_CVPCB_FOOTPRINT_DISPLAY_FILTERED_LIST:634 case ID_CVPCB_FOOTPRINT_DISPLAY_FILTERED_LIST:
616 m_mainToolBar->ToggleTool( ID_CVPCB_FOOTPRINT_DISPLAY_FULL_LIST, false );635 m_mainToolBar->ToggleTool( ID_CVPCB_FOOTPRINT_DISPLAY_FULL_LIST, false );
617 m_mainToolBar->ToggleTool( ID_CVPCB_FOOTPRINT_DISPLAY_PIN_FILTERED_LIST, false );636 m_mainToolBar->ToggleTool( ID_CVPCB_FOOTPRINT_DISPLAY_PIN_FILTERED_LIST, false );
637 m_mainToolBar->ToggleTool( ID_CVPCB_FOOTPRINT_DISPLAY_BY_LIBRARY_LIST, false );
618 break;638 break;
619639
620 case ID_CVPCB_FOOTPRINT_DISPLAY_FULL_LIST:640 case ID_CVPCB_FOOTPRINT_DISPLAY_FULL_LIST:
621 m_mainToolBar->ToggleTool( ID_CVPCB_FOOTPRINT_DISPLAY_FILTERED_LIST, false );641 m_mainToolBar->ToggleTool( ID_CVPCB_FOOTPRINT_DISPLAY_FILTERED_LIST, false );
622 m_mainToolBar->ToggleTool( ID_CVPCB_FOOTPRINT_DISPLAY_PIN_FILTERED_LIST, false );642 m_mainToolBar->ToggleTool( ID_CVPCB_FOOTPRINT_DISPLAY_PIN_FILTERED_LIST, false );
643 m_mainToolBar->ToggleTool( ID_CVPCB_FOOTPRINT_DISPLAY_BY_LIBRARY_LIST, false );
644 break;
645
646 case ID_CVPCB_FOOTPRINT_DISPLAY_BY_LIBRARY_LIST:
647 m_mainToolBar->ToggleTool( ID_CVPCB_FOOTPRINT_DISPLAY_FULL_LIST, false );
648 m_mainToolBar->ToggleTool( ID_CVPCB_FOOTPRINT_DISPLAY_FILTERED_LIST, false );
649 m_mainToolBar->ToggleTool( ID_CVPCB_FOOTPRINT_DISPLAY_PIN_FILTERED_LIST, false );
623 break;650 break;
624651
625 default:652 default:
626653
=== modified file 'cvpcb/cvpcb.cpp'
--- cvpcb/cvpcb.cpp 2013-04-09 17:49:01 +0000
+++ cvpcb/cvpcb.cpp 2013-05-28 08:33:50 +0000
@@ -101,6 +101,7 @@
101 frame->LoadProjectFile( filename.GetFullPath() );101 frame->LoadProjectFile( filename.GetFullPath() );
102 frame->Show( true );102 frame->Show( true );
103 frame->BuildFOOTPRINTS_LISTBOX();103 frame->BuildFOOTPRINTS_LISTBOX();
104 frame->BuildLIBRARY_LISTBOX();
104105
105 if( filename.IsOk() && filename.FileExists() )106 if( filename.IsOk() && filename.FileExists() )
106 {107 {
107108
=== modified file 'cvpcb/cvpcb_id.h'
--- cvpcb/cvpcb_id.h 2013-05-26 04:36:44 +0000
+++ cvpcb/cvpcb_id.h 2013-05-29 08:20:09 +0000
@@ -1,34 +1,36 @@
1/**1/**
2 * @file cvpcb_id.h2 * @file cvpcb_id.h
3 */3 */
4/*4/*
5 * Command IDs for CvPcb.5 * Command IDs for CvPcb.
6 *6 *
7 * Please add IDs that are unique to the component library viewer here and7 * Please add IDs that are unique to the component library viewer here and
8 * not in the global id.h file. This will prevent the entire project from8 * not in the global id.h file. This will prevent the entire project from
9 * being rebuilt when adding new commands to the component library viewer.9 * being rebuilt when adding new commands to the component library viewer.
10 */10 */
1111
12// Generic IDs:12// Generic IDs:
13#include <id.h>13#include <id.h>
1414
15// specific IDs15// specific IDs
16enum id_cvpcb_frm16enum id_cvpcb_frm
17{17{
18 ID_CVPCB_QUIT = ID_END_LIST,18 ID_CVPCB_QUIT = ID_END_LIST,
19 ID_CVPCB_READ_INPUT_NETLIST,19 ID_CVPCB_READ_INPUT_NETLIST,
20 ID_CVPCB_SAVEQUITCVPCB,20 ID_CVPCB_SAVEQUITCVPCB,
21 ID_CVPCB_CREATE_CONFIGWINDOW,21 ID_CVPCB_CREATE_CONFIGWINDOW,
22 ID_CVPCB_CREATE_SCREENCMP,22 ID_CVPCB_CREATE_SCREENCMP,
23 ID_CVPCB_GOTO_FIRSTNA,23 ID_CVPCB_GOTO_FIRSTNA,
24 ID_CVPCB_GOTO_PREVIOUSNA,24 ID_CVPCB_GOTO_PREVIOUSNA,
25 ID_CVPCB_DEL_ASSOCIATIONS,25 ID_CVPCB_DEL_ASSOCIATIONS,
26 ID_CVPCB_AUTO_ASSOCIE,26 ID_CVPCB_AUTO_ASSOCIE,
27 ID_CVPCB_COMPONENT_LIST,27 ID_CVPCB_COMPONENT_LIST,
28 ID_CVPCB_FOOTPRINT_LIST,28 ID_CVPCB_FOOTPRINT_LIST,
29 ID_CVPCB_SHOW3D_FRAME,29 ID_CVPCB_SHOW3D_FRAME,
30 ID_CVPCB_FOOTPRINT_DISPLAY_FULL_LIST,30 ID_CVPCB_FOOTPRINT_DISPLAY_FULL_LIST,
31 ID_CVPCB_FOOTPRINT_DISPLAY_FILTERED_LIST,31 ID_CVPCB_FOOTPRINT_DISPLAY_FILTERED_LIST,
32 ID_CVPCB_FOOTPRINT_DISPLAY_PIN_FILTERED_LIST,32 ID_CVPCB_FOOTPRINT_DISPLAY_PIN_FILTERED_LIST,
33 ID_CVPCB_CONFIG_KEEP_OPEN_ON_SAVE33 ID_CVPCB_FOOTPRINT_DISPLAY_BY_LIBRARY_LIST,
34};34 ID_CVPCB_CONFIG_KEEP_OPEN_ON_SAVE,
35 ID_CVPCB_LIBRARY_LIST
36};
3537
=== modified file 'cvpcb/cvpcb_mainframe.h'
--- cvpcb/cvpcb_mainframe.h 2013-04-26 15:11:52 +0000
+++ cvpcb/cvpcb_mainframe.h 2013-05-29 06:57:38 +0000
@@ -37,12 +37,14 @@
37#include <param_config.h>37#include <param_config.h>
38#include <cvpcb.h>38#include <cvpcb.h>
39#include <footprint_info.h>39#include <footprint_info.h>
40#include <library_select.h>
4041
4142
42/* Forward declarations of all top-level window classes. */43/* Forward declarations of all top-level window classes. */
43class wxAuiToolBar;44class wxAuiToolBar;
44class FOOTPRINTS_LISTBOX;45class FOOTPRINTS_LISTBOX;
45class COMPONENTS_LISTBOX;46class COMPONENTS_LISTBOX;
47class LIBRARY_LISTBOX;
46class DISPLAY_FOOTPRINTS_FRAME;48class DISPLAY_FOOTPRINTS_FRAME;
4749
4850
@@ -55,6 +57,7 @@
5557
56 bool m_KeepCvpcbOpen;58 bool m_KeepCvpcbOpen;
57 FOOTPRINTS_LISTBOX* m_FootprintList;59 FOOTPRINTS_LISTBOX* m_FootprintList;
60 LIBRARY_LISTBOX* m_LibraryList;
58 COMPONENTS_LISTBOX* m_ListCmp;61 COMPONENTS_LISTBOX* m_ListCmp;
59 DISPLAY_FOOTPRINTS_FRAME* m_DisplayFootprintFrame;62 DISPLAY_FOOTPRINTS_FRAME* m_DisplayFootprintFrame;
60 wxAuiToolBar* m_mainToolBar;63 wxAuiToolBar* m_mainToolBar;
@@ -156,6 +159,7 @@
156 void SetNewPkg( const wxString& aFootprintName );159 void SetNewPkg( const wxString& aFootprintName );
157 void BuildCmpListBox();160 void BuildCmpListBox();
158 void BuildFOOTPRINTS_LISTBOX();161 void BuildFOOTPRINTS_LISTBOX();
162 void BuildLIBRARY_LISTBOX();
159163
160 /**164 /**
161 * Create or Update the frame showing the current highlighted footprint165 * Create or Update the frame showing the current highlighted footprint
162166
=== modified file 'cvpcb/cvstruct.h'
--- cvpcb/cvstruct.h 2013-04-25 16:29:35 +0000
+++ cvpcb/cvstruct.h 2013-05-28 08:42:14 +0000
@@ -82,6 +82,8 @@
82 FOOTPRINT_LIST& aList );82 FOOTPRINT_LIST& aList );
83 void SetFootprintFilteredByPinCount( COMPONENT* aComponent,83 void SetFootprintFilteredByPinCount( COMPONENT* aComponent,
84 FOOTPRINT_LIST& aList );84 FOOTPRINT_LIST& aList );
85 void SetFootprintFilteredByLibraryList( FOOTPRINT_LIST& list,
86 wxString SelectedLibrary );
8587
86 /**88 /**
87 * Set the footprint list. We can have 2 footprint list:89 * Set the footprint list. We can have 2 footprint list:
@@ -99,19 +101,38 @@
99 // Events functions:101 // Events functions:
100 void OnLeftClick( wxListEvent& event );102 void OnLeftClick( wxListEvent& event );
101 void OnLeftDClick( wxListEvent& event );103 void OnLeftDClick( wxListEvent& event );
102104 void OnChar( wxKeyEvent& event );
103 /**105
104 * Function OnChar106 DECLARE_EVENT_TABLE()
105 * called on a key pressed107};
106 * Call default handler for some special keys,108
107 * and for "ascii" keys, select the first footprint109/******************************************/
108 * that the name starts by the letter.110/* ListBox showing the list of library */
109 * This is the default behavior of a listbox, but because we use111/******************************************/
110 * virtual lists, the listbox does not know anything to what is displayed,112
111 * we must handle this behavior here.113class LIBRARY_LISTBOX : public ITEMS_LISTBOX_BASE
112 * Furthermore the footprint name is not at the beginning of114{
113 * displayed lines (the first word is the line number)115//private:
114 */116
117public:
118 wxArrayString m_LibraryList;
119public:
120 LIBRARY_LISTBOX( CVPCB_MAINFRAME* parent, wxWindowID id,
121 const wxPoint& loc, const wxSize& size,
122 int nbitems, wxString choice[] );
123 ~LIBRARY_LISTBOX();
124
125 int GetCount();
126 void SetSelection( unsigned index, bool State = true );
127 void SetString( unsigned linecount, const wxString& text );
128 void AppendLine( const wxString& text );
129 void SetLibraryList( wxArrayString list );
130
131 wxString GetSelectedLibrary();
132 wxString OnGetItemText( long item, long column ) const;
133
134 // Events functions:
135 void OnLeftClick( wxListEvent& event );
115 void OnChar( wxKeyEvent& event );136 void OnChar( wxKeyEvent& event );
116137
117 DECLARE_EVENT_TABLE()138 DECLARE_EVENT_TABLE()
118139
=== modified file 'cvpcb/dialogs/dialog_cvpcb_config.cpp'
--- cvpcb/dialogs/dialog_cvpcb_config.cpp 2013-04-09 17:49:01 +0000
+++ cvpcb/dialogs/dialog_cvpcb_config.cpp 2013-05-28 08:02:33 +0000
@@ -156,6 +156,7 @@
156156
157 m_Parent->LoadFootprintFiles();157 m_Parent->LoadFootprintFiles();
158 m_Parent->BuildFOOTPRINTS_LISTBOX();158 m_Parent->BuildFOOTPRINTS_LISTBOX();
159 m_Parent->BuildLIBRARY_LISTBOX();
159 }160 }
160161
161 wxCommandEvent evt( ID_SAVE_PROJECT );162 wxCommandEvent evt( ID_SAVE_PROJECT );
162163
=== modified file 'cvpcb/dialogs/dialog_display_options.cpp'
--- cvpcb/dialogs/dialog_display_options.cpp 2013-02-02 19:10:48 +0000
+++ cvpcb/dialogs/dialog_display_options.cpp 2013-05-28 08:07:57 +0000
@@ -32,6 +32,7 @@
32#include <cvpcb.h>32#include <cvpcb.h>
33#include <class_drawpanel.h>33#include <class_drawpanel.h>
34#include <footprint_info.h>34#include <footprint_info.h>
35#include <library_select.h>
35#include <cvstruct.h>36#include <cvstruct.h>
36#include <class_DisplayFootprintsFrame.h>37#include <class_DisplayFootprintsFrame.h>
3738
3839
=== modified file 'cvpcb/listboxes.cpp'
--- cvpcb/listboxes.cpp 2013-04-28 20:20:40 +0000
+++ cvpcb/listboxes.cpp 2013-05-28 08:43:18 +0000
@@ -151,3 +151,29 @@
151 m_FootprintList->SetFootprintFullList( m_footprints );151 m_FootprintList->SetFootprintFullList( m_footprints );
152 DisplayStatus();152 DisplayStatus();
153}153}
154
155/*
156 * Create or update the library list.
157 */
158void CVPCB_MAINFRAME::BuildLIBRARY_LISTBOX()
159{
160 wxString msg;
161 wxSize size( 10, 10 );
162 wxFont guiFont = wxSystemSettings::GetFont( wxSYS_DEFAULT_GUI_FONT );
163
164 if( m_LibraryList == NULL )
165 {
166 m_LibraryList = new LIBRARY_LISTBOX( this, ID_CVPCB_LIBRARY_LIST,
167 wxDefaultPosition, size,
168 0 , NULL );
169 m_LibraryList->SetBackgroundColour( wxColour( 255, 255, 255 ) );
170 m_LibraryList->SetForegroundColour( wxColour( 0, 0, 0 ) );
171 m_LibraryList->SetFont( wxFont( guiFont.GetPointSize(),
172 wxFONTFAMILY_MODERN,
173 wxFONTSTYLE_NORMAL,
174 wxFONTWEIGHT_NORMAL ) );
175 //m_LibraryList->SetSingleStyle(wxLC_SINGLE_SEL,0); Does not work? Causes empty list. Why?
176 }
177
178 m_LibraryList->SetLibraryList(m_ModuleLibNames);
179}
154180
=== modified file 'cvpcb/readwrite_dlgs.cpp'
--- cvpcb/readwrite_dlgs.cpp 2013-04-29 16:50:10 +0000
+++ cvpcb/readwrite_dlgs.cpp 2013-05-29 10:15:05 +0000
@@ -124,6 +124,7 @@
124 LoadProjectFile( m_NetlistFileName.GetFullPath() );124 LoadProjectFile( m_NetlistFileName.GetFullPath() );
125 LoadFootprintFiles();125 LoadFootprintFiles();
126 BuildFOOTPRINTS_LISTBOX();126 BuildFOOTPRINTS_LISTBOX();
127 BuildLIBRARY_LISTBOX();
127128
128 m_ListCmp->Clear();129 m_ListCmp->Clear();
129 m_undefinedComponentCnt = 0;130 m_undefinedComponentCnt = 0;
130131
=== modified file 'cvpcb/tool_cvpcb.cpp'
--- cvpcb/tool_cvpcb.cpp 2013-02-02 17:39:59 +0000
+++ cvpcb/tool_cvpcb.cpp 2013-05-28 08:45:44 +0000
@@ -104,6 +104,12 @@
104 _( "Display the filtered footprint list by pin count for the current component" ),104 _( "Display the filtered footprint list by pin count for the current component" ),
105 wxEmptyString );105 wxEmptyString );
106106
107 m_mainToolBar->AddTool( ID_CVPCB_FOOTPRINT_DISPLAY_BY_LIBRARY_LIST,
108 KiBitmap( module_library_list_xpm ),
109 wxNullBitmap, true, NULL,
110 _( "Display the footprint list from selected library" ),
111 wxEmptyString );
112
107 m_mainToolBar->AddTool( ID_CVPCB_FOOTPRINT_DISPLAY_FULL_LIST,113 m_mainToolBar->AddTool( ID_CVPCB_FOOTPRINT_DISPLAY_FULL_LIST,
108 KiBitmap( module_full_list_xpm ),114 KiBitmap( module_full_list_xpm ),
109 wxNullBitmap, true, NULL,115 wxNullBitmap, true, NULL,
@@ -114,6 +120,7 @@
114 {120 {
115 wxString key = wxT( FILTERFOOTPRINTKEY );121 wxString key = wxT( FILTERFOOTPRINTKEY );
116 int opt = config->Read( key, (long) 1 );122 int opt = config->Read( key, (long) 1 );
123 m_mainToolBar->ToggleTool( ID_CVPCB_FOOTPRINT_DISPLAY_BY_LIBRARY_LIST, opt == 3 );
117 m_mainToolBar->ToggleTool( ID_CVPCB_FOOTPRINT_DISPLAY_PIN_FILTERED_LIST, opt == 2 );124 m_mainToolBar->ToggleTool( ID_CVPCB_FOOTPRINT_DISPLAY_PIN_FILTERED_LIST, opt == 2 );
118 m_mainToolBar->ToggleTool( ID_CVPCB_FOOTPRINT_DISPLAY_FILTERED_LIST, opt == 1 );125 m_mainToolBar->ToggleTool( ID_CVPCB_FOOTPRINT_DISPLAY_FILTERED_LIST, opt == 1 );
119 m_mainToolBar->ToggleTool( ID_CVPCB_FOOTPRINT_DISPLAY_FULL_LIST, opt == 0 );126 m_mainToolBar->ToggleTool( ID_CVPCB_FOOTPRINT_DISPLAY_FULL_LIST, opt == 0 );
120127
=== modified file 'include/bitmaps.h'
--- include/bitmaps.h 2013-03-01 19:59:29 +0000
+++ include/bitmaps.h 2013-05-29 08:34:00 +0000
@@ -279,6 +279,7 @@
279EXTERN_BITMAP( module_wizard_xpm )279EXTERN_BITMAP( module_wizard_xpm )
280EXTERN_BITMAP( module_filtered_list_xpm )280EXTERN_BITMAP( module_filtered_list_xpm )
281EXTERN_BITMAP( module_pin_filtered_list_xpm )281EXTERN_BITMAP( module_pin_filtered_list_xpm )
282EXTERN_BITMAP( module_library_list_xpm )
282EXTERN_BITMAP( module_full_list_xpm )283EXTERN_BITMAP( module_full_list_xpm )
283EXTERN_BITMAP( module_options_xpm )284EXTERN_BITMAP( module_options_xpm )
284EXTERN_BITMAP( module_ratsnest_xpm )285EXTERN_BITMAP( module_ratsnest_xpm )
285286
=== modified file 'include/footprint_info.h'
--- include/footprint_info.h 2013-05-28 16:54:59 +0000
+++ include/footprint_info.h 2013-05-29 08:16:02 +0000
@@ -45,10 +45,9 @@
45 */45 */
46class FOOTPRINT_INFO46class FOOTPRINT_INFO
47{47{
48public:
48 wxString m_libName; ///< Name of the library containing this module excluding path and ext.49 wxString m_libName; ///< Name of the library containing this module excluding path and ext.
49 wxString m_libPath; ///< The full library name and path associated the footprint.50 wxString m_libPath; ///< The full library name and path associated the footprint.
50
51public:
52 wxString m_Module; ///< Module name.51 wxString m_Module; ///< Module name.
53 int m_Num; ///< Order number in the display list.52 int m_Num; ///< Order number in the display list.
54 wxString m_Doc; ///< Footprint description.53 wxString m_Doc; ///< Footprint description.
5554
=== added file 'include/library_select.h'
--- include/library_select.h 1970-01-01 00:00:00 +0000
+++ include/library_select.h 2013-05-29 06:35:40 +0000
@@ -0,0 +1,65 @@
1/*
2 * @file library_select.h
3 */
4
5#ifndef LIBRARY_SELECT_H_
6#define LIBRARY_SELECT_H_
7
8#include <boost/ptr_container/ptr_vector.hpp>
9#include <boost/foreach.hpp>
10
11#include <kicad_string.h>
12
13/*
14 * Class LIBRARY_SELECT
15 * is a helper class to handle the list of libraries
16 */
17
18class LIBRARY_INFO
19{
20public:
21 wxString m_LibName; ///< Full name (with path) of the library
22 int m_Num; ///< Order number in the display list.
23 LIBRARY_INFO()
24 {
25 m_Num = 0;
26 }
27};
28
29class LIBRARY_LIST
30{
31public:
32 boost::ptr_vector< LIBRARY_INFO > m_List;
33 wxString m_filesNotFound;
34 wxString m_filesInvalid;
35
36public:
37
38 /**
39 * Function GetCount
40 * @return the number of items stored in list
41 */
42 unsigned GetCount() const { return m_List.size(); }
43
44 /**
45 * Function GetItem
46 * @return the aIdx item in list
47 * @param aIdx = index of the given item
48 */
49 LIBRARY_INFO & GetItem( unsigned aIdx )
50 {
51 return m_List[aIdx];
52 }
53
54 /**
55 * Function AddItem
56 * add aItem in list
57 * @param aItem = item to add
58 */
59 void AddItem( LIBRARY_INFO* aItem )
60 {
61 m_List.push_back( aItem);
62 }
63};
64
65#endif // LIBRARY_SELECT_H_
Revision history for this message
Wayne Stambaugh (stambaughw) wrote :

On 5/29/2013 10:43 AM, Michal Jahelka wrote:
> Hello,
>
> my branch is done.
>
> But I am not programmer (i only program microcontrollers), so i do not
> understand what did you mean with doxygen. I tried to program it in the
> same style like other source code in kicad (taken for example
> class_footprint_listbox, copied to class_library_listbox and
> rename/rewrite parts of code). I tried to repair some spaces, what i saw
> in kdiff. KiCAD programming was my first c++ and first wx programming
> (first branch taken 4 months).

Doxygen comments are used to create the developers documentation in
HTML. The coding policy which can be found in the KiCad sources states
that Doxygen comments should be put in the header file. The only
exception is for static functions that are only defined in the source
file. Since you copied them from another file to create your patch, you
get a free pass this time :)

>
> Branch is in
> https://code.launchpad.net/~michal-jahelka/kicad/LibrarySelect, sending
> patch too.
> Should I delete old branch, or you do? When tried update it didnt want,
> wrote different. So I had to make new branch, it is 4176.

Once the patch is committed, you can delete your branch from Launchpad
if your not going to use it for anything else.

>
> Second thing, I created some libraries, modules and 3D packages. Is
> something similar like launchpad to put it there? I know about
> kicadlib.org, but it has no member access, like bzr.

You can create a patch and hopefully one of the library maintainers will
review and apply your patch.

>
> Michal Jahelka
>
>
>
>
>
> Dne 24.5.2013 17:12, Wayne Stambaugh napsal(a):
>> This merge request no longer applies cleanly to the head of the testing branch. If you would like me to consider this merge request, please update your branch and fix any conflicts. I will soon be working on the footprint library table code for CvPcb so if you do not update this reasonably soon, I suspect there will be some considerable divergence from the current CvPcb code which will make maintaining your changes more difficult. Also, I noticed a few issues with this merge request. Doxygen comments should be placed in the header file (LIBRARY_LISTBOX::OnChar()) and your editor appears to be leaving trailing white space. Thank you for your interest in help KiCad.
>>
>> Wayne
>
>

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'bitmaps_png/CMakeLists.txt'
--- bitmaps_png/CMakeLists.txt 2013-03-01 19:59:29 +0000
+++ bitmaps_png/CMakeLists.txt 2013-04-01 07:55:27 +0000
@@ -359,6 +359,7 @@
359 module_full_list359 module_full_list
360 module_options360 module_options
361 module_pin_filtered_list361 module_pin_filtered_list
362 module_library_list
362 module_ratsnest363 module_ratsnest
363 module364 module
364 modview_icon365 modview_icon
365366
=== added file 'bitmaps_png/cpp_26/module_library_list.cpp'
--- bitmaps_png/cpp_26/module_library_list.cpp 1970-01-01 00:00:00 +0000
+++ bitmaps_png/cpp_26/module_library_list.cpp 2013-04-01 07:55:27 +0000
@@ -0,0 +1,83 @@
1
2/* Do not modify this file, it was automatically generated by the
3 * PNG2cpp CMake script, using a *.png file as input.
4 */
5
6#include <bitmaps.h>
7
8static const unsigned char png[] = {
9 0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d, 0x49, 0x48, 0x44, 0x52,
10 0x00, 0x00, 0x00, 0x1a, 0x00, 0x00, 0x00, 0x1a, 0x08, 0x06, 0x00, 0x00, 0x00, 0xa9, 0x4a, 0x4c,
11 0xce, 0x00, 0x00, 0x00, 0x04, 0x73, 0x42, 0x49, 0x54, 0x08, 0x08, 0x08, 0x08, 0x7c, 0x08, 0x64,
12 0x88, 0x00, 0x00, 0x00, 0x09, 0x70, 0x48, 0x59, 0x73, 0x00, 0x00, 0x0d, 0xd7, 0x00, 0x00, 0x0d,
13 0xd7, 0x01, 0x42, 0x28, 0x9b, 0x78, 0x00, 0x00, 0x00, 0x19, 0x74, 0x45, 0x58, 0x74, 0x53, 0x6f,
14 0x66, 0x74, 0x77, 0x61, 0x72, 0x65, 0x00, 0x77, 0x77, 0x77, 0x2e, 0x69, 0x6e, 0x6b, 0x73, 0x63,
15 0x61, 0x70, 0x65, 0x2e, 0x6f, 0x72, 0x67, 0x9b, 0xee, 0x3c, 0x1a, 0x00, 0x00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 0x51, 0x5f, 0x79, 0x72, 0xdc, 0xd0, 0xd0, 0x60, 0x02, 0x5e, 0x24, 0xe3, 0x6b, 0x2d, 0xd7,
73 0x58, 0x8f, 0xae, 0xeb, 0xb9, 0xd6, 0x62, 0x2b, 0xbb, 0x95, 0xf1, 0xd4, 0x1d, 0x44, 0x8b, 0x8b,
74 0x8b, 0x14, 0x14, 0x14, 0x60, 0xc2, 0x44, 0x39, 0xfa, 0xff, 0x60, 0x73, 0x73, 0x93, 0xc0, 0x52,
75 0x80, 0x85, 0x85, 0x05, 0xfd, 0x9a, 0x70, 0xd8, 0xcf, 0xad, 0xfa, 0xfa, 0x7a, 0x1f, 0x70, 0x66,
76 0x1f, 0xa9, 0xf7, 0x26, 0x26, 0x26, 0xec, 0x87, 0x36, 0x3a, 0xa8, 0xc4, 0x37, 0xe2, 0x02, 0xfc,
77 0x0f, 0xfd, 0x66, 0x6b, 0x49, 0xc9, 0xd5, 0xed, 0x5a, 0x00, 0x00, 0x00, 0x00, 0x49, 0x45, 0x4e,
78 0x44, 0xae, 0x42, 0x60, 0x82
79};
80
81const BITMAP_OPAQUE module_library_list_xpm[1] = {{ png, sizeof( png ), "module_library_list_xpm" }};
82
83//EOF
084
=== added file 'bitmaps_png/sources/module_library_list.svg'
--- bitmaps_png/sources/module_library_list.svg 1970-01-01 00:00:00 +0000
+++ bitmaps_png/sources/module_library_list.svg 2013-04-01 07:55:27 +0000
@@ -0,0 +1,172 @@
1<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2<svg
3 xmlns:dc="http://purl.org/dc/elements/1.1/"
4 xmlns:cc="http://creativecommons.org/ns#"
5 xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
6 xmlns:svg="http://www.w3.org/2000/svg"
7 xmlns="http://www.w3.org/2000/svg"
8 xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
9 xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
10 height="26"
11 width="26"
12 version="1.1"
13 viewBox="0 0 26 26"
14 id="svg2"
15 inkscape:version="0.48.4 r9939"
16 sodipodi:docname="module_filtered_list.svg">
17 <metadata
18 id="metadata56">
19 <rdf:RDF>
20 <cc:Work
21 rdf:about="">
22 <dc:format>image/svg+xml</dc:format>
23 <dc:type
24 rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
25 <dc:title />
26 </cc:Work>
27 </rdf:RDF>
28 </metadata>
29 <defs
30 id="defs54" />
31 <sodipodi:namedview
32 pagecolor="#ffffff"
33 bordercolor="#666666"
34 borderopacity="1"
35 objecttolerance="10"
36 gridtolerance="10"
37 guidetolerance="10"
38 inkscape:pageopacity="0"
39 inkscape:pageshadow="2"
40 inkscape:window-width="1920"
41 inkscape:window-height="1015"
42 id="namedview52"
43 showgrid="true"
44 inkscape:zoom="13.906434"
45 inkscape:cx="19.918756"
46 inkscape:cy="24.624712"
47 inkscape:window-x="-4"
48 inkscape:window-y="-4"
49 inkscape:window-maximized="1"
50 inkscape:current-layer="svg2"
51 inkscape:snap-to-guides="false"
52 inkscape:snap-grids="false">
53 <inkscape:grid
54 type="xygrid"
55 id="grid3033"
56 empspacing="5"
57 visible="true"
58 enabled="true"
59 snapvisiblegridlinesonly="true" />
60 </sodipodi:namedview>
61 <rect
62 transform="matrix(0,-1,1,0,0,0)"
63 height="21.994465"
64 width="12.99073"
65 y="1.5596062"
66 x="-17.520231"
67 id="rect8"
68 style="fill:#ffffff;stroke:#484848;stroke-width:0.99127513000000000;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
69 <path
70 d="m 1.5927632,8.9410802 a 2.0341261,1.8090857 0 1 1 0.012585,3.6181538"
71 id="path10"
72 inkscape:connector-curvature="0"
73 style="fill:none;stroke:#484848;stroke-width:0.99127518999999997;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
74 <rect
75 transform="matrix(0,-1,1,0,0,0)"
76 height="3.9761357"
77 width="5.9874525"
78 y="3.5188339"
79 x="-20.502354"
80 id="rect30"
81 style="fill:#ff7800;stroke:#484848;stroke-width:1;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
82 <path
83 d="m 5.5071146,16.522119 a 0.98526485,0.92342205 0 0 1 0,1.846844 0.98526485,0.92342205 0 1 1 0,-1.846844 z"
84 id="path32"
85 inkscape:connector-curvature="0"
86 style="fill:#ffede0;stroke:#484848;stroke-width:1;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
87 <rect
88 transform="matrix(0,-1,1,0,0,0)"
89 height="3.9761357"
90 width="5.9874525"
91 y="10.507601"
92 x="-20.513519"
93 id="rect30-5"
94 style="fill:#ff7800;stroke:#484848;stroke-width:1;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
95 <path
96 d="m 12.495882,16.533284 a 0.98526485,0.92342205 0 0 1 0,1.846845 0.98526485,0.92342205 0 1 1 0,-1.846845 z"
97 id="path32-4"
98 inkscape:connector-curvature="0"
99 style="fill:#ffede0;stroke:#484848;stroke-width:1;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
100 <rect
101 transform="matrix(0,-1,1,0,0,0)"
102 height="3.9761357"
103 width="5.9874525"
104 y="17.499128"
105 x="-20.488094"
106 id="rect30-2"
107 style="fill:#ff7800;stroke:#484848;stroke-width:1;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
108 <path
109 d="m 19.487408,16.507861 a 0.98526485,0.92342205 0 0 1 0,1.846844 0.98526485,0.92342205 0 1 1 0,-1.846844 z"
110 id="path32-0"
111 inkscape:connector-curvature="0"
112 style="fill:#ffede0;stroke:#484848;stroke-width:1;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
113 <rect
114 transform="matrix(0,-1,1,0,0,0)"
115 height="3.9761357"
116 width="5.9874525"
117 y="3.5339792"
118 x="-7.5303874"
119 id="rect30-1"
120 style="fill:#ff7800;stroke:#484848;stroke-width:1;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
121 <path
122 d="m 5.5222603,3.5501532 a 0.98526485,0.92342205 0 0 1 0,1.8468441 0.98526485,0.92342205 0 1 1 0,-1.8468441 z"
123 id="path32-3"
124 inkscape:connector-curvature="0"
125 style="fill:#ffede0;stroke:#484848;stroke-width:1;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
126 <rect
127 transform="matrix(0,-1,1,0,0,0)"
128 height="3.9761357"
129 width="5.9874525"
130 y="10.522747"
131 x="-7.5415525"
132 id="rect30-5-6"
133 style="fill:#ff7800;stroke:#484848;stroke-width:1;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
134 <path
135 d="m 12.511028,3.5613187 a 0.98526485,0.92342205 0 0 1 0,1.8468441 0.98526485,0.92342205 0 1 1 0,-1.8468441 z"
136 id="path32-4-0"
137 inkscape:connector-curvature="0"
138 style="fill:#ffede0;stroke:#484848;stroke-width:1;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
139 <rect
140 transform="matrix(0,-1,1,0,0,0)"
141 height="3.9761357"
142 width="5.9874525"
143 y="17.514275"
144 x="-7.516129"
145 id="rect30-2-8"
146 style="fill:#ff7800;stroke:#484848;stroke-width:1;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
147 <path
148 d="m 19.502554,3.535895 a 0.98526485,0.92342205 0 0 1 0,1.8468441 0.98526485,0.92342205 0 1 1 0,-1.8468441 z"
149 id="path32-0-4"
150 inkscape:connector-curvature="0"
151 style="fill:#ffede0;stroke:#484848;stroke-width:1;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
152 <rect
153 ry="0.95373797"
154 height="13.958503"
155 width="11.03963"
156 y="10.016949"
157 x="13.978938"
158 id="rect42"
159 style="fill:#3e3e3e" />
160 <rect
161 style="color:#000000;fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
162 id="rect3003"
163 width="8.413372"
164 height="11.649284"
165 x="15.316651"
166 y="11.114803" />
167 <path
168 style="fill:none;stroke:#008000;stroke-width:1.5;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:none"
169 d="m 17.97729,13.415897 0,7.119007 3.523549,0"
170 id="path3005"
171 inkscape:connector-curvature="0" />
172</svg>
0173
=== modified file 'cvpcb/CMakeLists.txt'
--- cvpcb/CMakeLists.txt 2012-12-29 09:54:25 +0000
+++ cvpcb/CMakeLists.txt 2013-04-01 07:55:27 +0000
@@ -36,6 +36,7 @@
36 class_components_listbox.cpp36 class_components_listbox.cpp
37 class_DisplayFootprintsFrame.cpp37 class_DisplayFootprintsFrame.cpp
38 class_footprints_listbox.cpp38 class_footprints_listbox.cpp
39 class_library_listbox.cpp
39 cvframe.cpp40 cvframe.cpp
40 cvpcb.cpp41 cvpcb.cpp
41 listboxes.cpp42 listboxes.cpp
4243
=== modified file 'cvpcb/class_components_listbox.cpp'
--- cvpcb/class_components_listbox.cpp 2012-11-28 15:24:53 +0000
+++ cvpcb/class_components_listbox.cpp 2013-04-01 07:55:27 +0000
@@ -113,13 +113,16 @@
113 {113 {
114 case WXK_HOME:114 case WXK_HOME:
115 case WXK_END:115 case WXK_END:
116 case WXK_UP:116 case WXK_UP:
117 case WXK_DOWN:117 case WXK_DOWN:
118 case WXK_PAGEUP:118 case WXK_PAGEUP:
119 case WXK_PAGEDOWN:119 case WXK_PAGEDOWN:
120 event.Skip();
121 return;
122
120 case WXK_LEFT:123 case WXK_LEFT:
121 case WXK_NUMPAD_LEFT:124 case WXK_NUMPAD_LEFT:
122 event.Skip();125 GetParent()->m_LibraryList->SetFocus();
123 return;126 return;
124127
125 case WXK_RIGHT:128 case WXK_RIGHT:
126129
=== modified file 'cvpcb/class_footprints_listbox.cpp'
--- cvpcb/class_footprints_listbox.cpp 2012-05-25 06:58:52 +0000
+++ cvpcb/class_footprints_listbox.cpp 2013-04-01 07:55:27 +0000
@@ -6,6 +6,8 @@
6#include <fctsys.h>6#include <fctsys.h>
7#include <wxstruct.h>7#include <wxstruct.h>
8#include <macros.h>8#include <macros.h>
9#include <appl_wxstruct.h>
10#include <wildcards_and_files_ext.h>
911
10#include <cvpcb.h>12#include <cvpcb.h>
11#include <cvpcb_mainframe.h>13#include <cvpcb_mainframe.h>
@@ -204,6 +206,42 @@
204 Refresh();206 Refresh();
205}207}
206208
209void FOOTPRINTS_LISTBOX::SetFootprintFilteredByLibraryList( FOOTPRINT_LIST& list,
210 wxString SelectedLibrary ) {
211 wxString msg;
212 int oldSelection = GetSelection();
213 bool hasItem = false;
214
215 wxFileName filename = SelectedLibrary;
216 filename.SetExt( LegacyFootprintLibPathExtension );
217 wxString FullLibraryName = wxGetApp().FindLibraryPath( filename );
218
219 m_FilteredFootprintList.Clear();
220
221 for( unsigned ii = 0; ii < list.GetCount(); ii++ )
222 {
223 FOOTPRINT_INFO& footprint = list.GetItem(ii);
224 wxString LibName = footprint.m_LibName;
225 if( LibName.Matches( FullLibraryName ) )
226 {
227 msg.Printf( wxT( "%3d %s" ), m_FilteredFootprintList.GetCount() + 1,
228 footprint.m_Module.GetData() );
229 m_FilteredFootprintList.Add( msg );
230 hasItem = true;
231 }
232 }
233
234 if( hasItem )
235 SetActiveFootprintList( false );
236 else
237 SetActiveFootprintList( true );
238
239 if( ( GetCount() == 0 ) || ( oldSelection >= GetCount() ) )
240 SetSelection( 0, true );
241
242 Refresh();
243}
244
207/** Set the footprint list. We can have 2 footprint list:245/** Set the footprint list. We can have 2 footprint list:
208 * The full footprint list246 * The full footprint list
209 * The filtered footprint list (if the current selected component has a247 * The filtered footprint list (if the current selected component has a
210248
=== added file 'cvpcb/class_library_listbox.cpp'
--- cvpcb/class_library_listbox.cpp 1970-01-01 00:00:00 +0000
+++ cvpcb/class_library_listbox.cpp 2013-04-01 07:55:27 +0000
@@ -0,0 +1,204 @@
1/**
2 * @file class_library_listbox.cpp
3 * class to display used library and selecting it
4 */
5
6#include <fctsys.h>
7#include <wxstruct.h>
8#include <macros.h>
9
10#include <cvpcb.h>
11#include <cvpcb_mainframe.h>
12#include <cvstruct.h>
13
14
15/***************************************/
16/* ListBox handling the library list */
17/***************************************/
18
19LIBRARY_LISTBOX::LIBRARY_LISTBOX( CVPCB_MAINFRAME* parent,
20 wxWindowID id, const wxPoint& loc,
21 const wxSize& size,
22 int nbitems, wxString choice[] ) :
23 ITEMS_LISTBOX_BASE( parent, id, loc, size )
24{
25 //ListLibraries();
26}
27
28
29LIBRARY_LISTBOX::~LIBRARY_LISTBOX()
30{
31}
32
33
34/*
35 * Return number of items
36 */
37int LIBRARY_LISTBOX::GetCount()
38{
39 return m_LibraryList.Count();
40}
41
42
43/*
44 * Change an item text
45 */
46void LIBRARY_LISTBOX::SetString( unsigned linecount, const wxString& text )
47{
48 if( linecount >= m_LibraryList.Count() )
49 linecount = m_LibraryList.Count() - 1;
50 if( linecount >= 0 )
51 m_LibraryList[linecount] = text;
52}
53
54
55wxString LIBRARY_LISTBOX::GetSelectedLibrary()
56{
57 wxString libraryName;
58 int ii = GetFirstSelected();
59
60 if( ii >= 0 )
61 {
62 libraryName = m_LibraryList[ii];
63 }
64
65 return libraryName;
66}
67
68
69void LIBRARY_LISTBOX::AppendLine( const wxString& text )
70{
71 m_LibraryList.Add( text );
72 SetItemCount( m_LibraryList.Count() );
73}
74
75
76/*
77 * Overlaid function: MUST be provided in wxLC_VIRTUAL mode
78 * because real data is not handled by ITEMS_LISTBOX_BASE
79 */
80wxString LIBRARY_LISTBOX::OnGetItemText( long item, long column ) const
81{
82 return m_LibraryList.Item( item );
83}
84
85/*
86 * Enable or disable an item
87 */
88void LIBRARY_LISTBOX::SetSelection( unsigned index, bool State )
89{
90 if( (int) index >= GetCount() )
91 index = GetCount() - 1;
92
93 if( (index >= 0) && (GetCount() > 0) )
94 {
95#ifndef __WXMAC__
96 Select( index, State );
97#endif
98 EnsureVisible( index );
99#ifdef __WXMAC__
100 Refresh();
101#endif
102 }
103}
104
105
106void LIBRARY_LISTBOX::SetLibraryList( wxArrayString list )
107{
108 wxString msg;
109 int oldSelection = GetSelection();
110
111 m_LibraryList.Clear();
112
113 for( unsigned ii = 0; ii < list.GetCount(); ii++ )
114 {
115 msg = list.Item(ii);
116 m_LibraryList.Add( msg );
117 }
118
119 SetItemCount(list.GetCount());
120
121 if( GetCount() == 0 || oldSelection < 0 || oldSelection >= GetCount() )
122 SetSelection( 0, true );
123 Refresh();
124}
125
126
127/**************************************/
128/* Event table for the library list */
129/**************************************/
130
131BEGIN_EVENT_TABLE( LIBRARY_LISTBOX, ITEMS_LISTBOX_BASE )
132EVT_SIZE( ITEMS_LISTBOX_BASE::OnSize )
133EVT_CHAR( LIBRARY_LISTBOX::OnChar )
134END_EVENT_TABLE()
135
136
137/**
138 * Function OnChar
139 * called on a key pressed
140 * Call default handler for some special keys,
141 * and for "ascii" keys, select the first footprint
142 * that the name starts by the letter.
143 * This is the defaut behaviour of a listbox, but because we use
144 * virtual lists, the listbox does not know anything to what is displayed,
145 * we must handle this behaviour here.
146 * Furthermore the footprint name is not at the beginning of
147 * displayed lines (the first word is the line number)
148 */
149void LIBRARY_LISTBOX::OnChar( wxKeyEvent& event )
150{
151 int key = event.GetKeyCode();
152 switch( key )
153 {
154 case WXK_RIGHT:
155 case WXK_NUMPAD_RIGHT:
156 GetParent()->m_ListCmp->SetFocus();
157 return;
158
159 case WXK_HOME:
160 case WXK_END:
161 case WXK_UP:
162 case WXK_DOWN:
163 case WXK_PAGEUP:
164 case WXK_PAGEDOWN:
165 case WXK_LEFT:
166 case WXK_NUMPAD_LEFT:
167 event.Skip();
168 return;
169
170 default:
171 break;
172 }
173 // Search for an item name starting by the key code:
174 key = toupper(key);
175 for( unsigned ii = 0; ii < m_LibraryList.GetCount(); ii++ )
176 {
177 wxString text = m_LibraryList.Item(ii);
178 /* search for the start char of the footprint name.
179 * we must skip the line number
180 */
181 text.Trim(false); // Remove leading spaces in line
182 unsigned jj = 0;
183 for( ; jj < text.Len(); jj++ )
184 {
185 // skip line number
186 if( text[jj] == ' ' )
187 break;
188 }
189
190 for( ; jj < text.Len(); jj++ )
191 { // skip blanks
192 if( text[jj] != ' ' )
193 break;
194 }
195
196 int start_char = toupper( text[jj] );
197 if( key == start_char )
198 {
199 Focus( ii );
200 SetSelection( ii, true ); // Ensure visible
201 break;
202 }
203 }
204}
0205
=== modified file 'cvpcb/cvframe.cpp'
--- cvpcb/cvframe.cpp 2013-02-02 17:39:59 +0000
+++ cvpcb/cvframe.cpp 2013-04-01 07:55:27 +0000
@@ -85,6 +85,8 @@
85 CVPCB_MAINFRAME::OnSelectFilteringFootprint )85 CVPCB_MAINFRAME::OnSelectFilteringFootprint )
86 EVT_TOOL( ID_CVPCB_FOOTPRINT_DISPLAY_PIN_FILTERED_LIST,86 EVT_TOOL( ID_CVPCB_FOOTPRINT_DISPLAY_PIN_FILTERED_LIST,
87 CVPCB_MAINFRAME::OnSelectFilteringFootprint )87 CVPCB_MAINFRAME::OnSelectFilteringFootprint )
88 EVT_TOOL( ID_CVPCB_FOOTPRINT_DISPLAY_BY_LIBRARY_LIST,
89 CVPCB_MAINFRAME::OnSelectFilteringFootprint )
88 EVT_TOOL( ID_CVPCB_FOOTPRINT_DISPLAY_FULL_LIST,90 EVT_TOOL( ID_CVPCB_FOOTPRINT_DISPLAY_FULL_LIST,
89 CVPCB_MAINFRAME::OnSelectFilteringFootprint )91 CVPCB_MAINFRAME::OnSelectFilteringFootprint )
9092
@@ -97,6 +99,7 @@
97 EVT_LIST_ITEM_SELECTED( ID_CVPCB_FOOTPRINT_LIST, CVPCB_MAINFRAME::OnLeftClick )99 EVT_LIST_ITEM_SELECTED( ID_CVPCB_FOOTPRINT_LIST, CVPCB_MAINFRAME::OnLeftClick )
98 EVT_LIST_ITEM_ACTIVATED( ID_CVPCB_FOOTPRINT_LIST, CVPCB_MAINFRAME::OnLeftDClick )100 EVT_LIST_ITEM_ACTIVATED( ID_CVPCB_FOOTPRINT_LIST, CVPCB_MAINFRAME::OnLeftDClick )
99 EVT_LIST_ITEM_SELECTED( ID_CVPCB_COMPONENT_LIST, CVPCB_MAINFRAME::OnSelectComponent )101 EVT_LIST_ITEM_SELECTED( ID_CVPCB_COMPONENT_LIST, CVPCB_MAINFRAME::OnSelectComponent )
102 EVT_LIST_ITEM_SELECTED( ID_CVPCB_LIBRARY_LIST, CVPCB_MAINFRAME::OnSelectComponent )
100103
101 EVT_UPDATE_UI( ID_CVPCB_CONFIG_KEEP_OPEN_ON_SAVE, CVPCB_MAINFRAME::OnUpdateKeepOpenOnSave )104 EVT_UPDATE_UI( ID_CVPCB_CONFIG_KEEP_OPEN_ON_SAVE, CVPCB_MAINFRAME::OnUpdateKeepOpenOnSave )
102END_EVENT_TABLE()105END_EVENT_TABLE()
@@ -112,6 +115,7 @@
112115
113 m_ListCmp = NULL;116 m_ListCmp = NULL;
114 m_FootprintList = NULL;117 m_FootprintList = NULL;
118 m_LibraryList = NULL;
115 m_DisplayFootprintFrame = NULL;119 m_DisplayFootprintFrame = NULL;
116 m_mainToolBar = NULL;120 m_mainToolBar = NULL;
117 m_modified = false;121 m_modified = false;
@@ -160,6 +164,7 @@
160 // Create list of available modules and components of the schematic164 // Create list of available modules and components of the schematic
161 BuildCmpListBox();165 BuildCmpListBox();
162 BuildFOOTPRINTS_LISTBOX();166 BuildFOOTPRINTS_LISTBOX();
167 BuildLIBRARY_LISTBOX();
163168
164 m_auimgr.SetManagedWindow( this );169 m_auimgr.SetManagedWindow( this );
165170
@@ -179,10 +184,15 @@
179 m_auimgr.AddPane( m_ListCmp,184 m_auimgr.AddPane( m_ListCmp,
180 wxAuiPaneInfo( horiz ).Name( wxT( "m_ListCmp" ) ).CentrePane() );185 wxAuiPaneInfo( horiz ).Name( wxT( "m_ListCmp" ) ).CentrePane() );
181186
187 if( m_LibraryList)
188 m_auimgr.AddPane( m_LibraryList,
189 wxAuiPaneInfo( info ).Name( wxT( "m_LibraryList" ) ).
190 Left().BestSize( (int) ( m_FrameSize.x * 0.20 ), m_FrameSize.y ) );
191
182 if( m_FootprintList )192 if( m_FootprintList )
183 m_auimgr.AddPane( m_FootprintList,193 m_auimgr.AddPane( m_FootprintList,
184 wxAuiPaneInfo( info ).Name( wxT( "m_FootprintList" ) ).194 wxAuiPaneInfo( info ).Name( wxT( "m_FootprintList" ) ).
185 Right().BestSize( (int) ( m_FrameSize.x * 0.36 ), m_FrameSize.y ) );195 Right().BestSize( (int) ( m_FrameSize.x * 0.30 ), m_FrameSize.y ) );
186196
187 m_auimgr.Update();197 m_auimgr.Update();
188}198}
@@ -523,9 +533,11 @@
523 #define REDRAW_LIST true533 #define REDRAW_LIST true
524 #define SELECT_FULL_LIST true534 #define SELECT_FULL_LIST true
525 int selection = -1;535 int selection = -1;
536 wxString SelectedLibrary;
526537
527 if( !m_mainToolBar->GetToolToggled( ID_CVPCB_FOOTPRINT_DISPLAY_FILTERED_LIST )538 if( !m_mainToolBar->GetToolToggled( ID_CVPCB_FOOTPRINT_DISPLAY_FILTERED_LIST )
528 && !m_mainToolBar->GetToolToggled( ID_CVPCB_FOOTPRINT_DISPLAY_PIN_FILTERED_LIST )539 && !m_mainToolBar->GetToolToggled( ID_CVPCB_FOOTPRINT_DISPLAY_PIN_FILTERED_LIST )
540 && !m_mainToolBar->GetToolToggled( ID_CVPCB_FOOTPRINT_DISPLAY_BY_LIBRARY_LIST )
529 )541 )
530 m_FootprintList->SetActiveFootprintList( SELECT_FULL_LIST, REDRAW_LIST );542 m_FootprintList->SetActiveFootprintList( SELECT_FULL_LIST, REDRAW_LIST );
531543
@@ -548,6 +560,12 @@
548 m_footprints );560 m_footprints );
549 }561 }
550 else562 else
563 if( m_mainToolBar->GetToolToggled( ID_CVPCB_FOOTPRINT_DISPLAY_BY_LIBRARY_LIST ) )
564 {
565 SelectedLibrary=m_LibraryList->GetSelectedLibrary();
566 m_FootprintList->SetFootprintFilteredByLibraryList( m_footprints, SelectedLibrary );
567 }
568 else
551 {569 {
552 m_FootprintList->SetFootprintFilteredList( &m_components[ selection ],570 m_FootprintList->SetFootprintFilteredList( &m_components[ selection ],
553 m_footprints );571 m_footprints );
@@ -610,16 +628,25 @@
610 case ID_CVPCB_FOOTPRINT_DISPLAY_PIN_FILTERED_LIST:628 case ID_CVPCB_FOOTPRINT_DISPLAY_PIN_FILTERED_LIST:
611 m_mainToolBar->ToggleTool( ID_CVPCB_FOOTPRINT_DISPLAY_FULL_LIST, false );629 m_mainToolBar->ToggleTool( ID_CVPCB_FOOTPRINT_DISPLAY_FULL_LIST, false );
612 m_mainToolBar->ToggleTool( ID_CVPCB_FOOTPRINT_DISPLAY_FILTERED_LIST, false );630 m_mainToolBar->ToggleTool( ID_CVPCB_FOOTPRINT_DISPLAY_FILTERED_LIST, false );
631 m_mainToolBar->ToggleTool( ID_CVPCB_FOOTPRINT_DISPLAY_BY_LIBRARY_LIST, false );
613 break;632 break;
614633
615 case ID_CVPCB_FOOTPRINT_DISPLAY_FILTERED_LIST:634 case ID_CVPCB_FOOTPRINT_DISPLAY_FILTERED_LIST:
616 m_mainToolBar->ToggleTool( ID_CVPCB_FOOTPRINT_DISPLAY_FULL_LIST, false );635 m_mainToolBar->ToggleTool( ID_CVPCB_FOOTPRINT_DISPLAY_FULL_LIST, false );
617 m_mainToolBar->ToggleTool( ID_CVPCB_FOOTPRINT_DISPLAY_PIN_FILTERED_LIST, false );636 m_mainToolBar->ToggleTool( ID_CVPCB_FOOTPRINT_DISPLAY_PIN_FILTERED_LIST, false );
637 m_mainToolBar->ToggleTool( ID_CVPCB_FOOTPRINT_DISPLAY_BY_LIBRARY_LIST, false );
618 break;638 break;
619639
620 case ID_CVPCB_FOOTPRINT_DISPLAY_FULL_LIST:640 case ID_CVPCB_FOOTPRINT_DISPLAY_FULL_LIST:
621 m_mainToolBar->ToggleTool( ID_CVPCB_FOOTPRINT_DISPLAY_FILTERED_LIST, false );641 m_mainToolBar->ToggleTool( ID_CVPCB_FOOTPRINT_DISPLAY_FILTERED_LIST, false );
622 m_mainToolBar->ToggleTool( ID_CVPCB_FOOTPRINT_DISPLAY_PIN_FILTERED_LIST, false );642 m_mainToolBar->ToggleTool( ID_CVPCB_FOOTPRINT_DISPLAY_PIN_FILTERED_LIST, false );
643 m_mainToolBar->ToggleTool( ID_CVPCB_FOOTPRINT_DISPLAY_BY_LIBRARY_LIST, false );
644 break;
645
646 case ID_CVPCB_FOOTPRINT_DISPLAY_BY_LIBRARY_LIST:
647 m_mainToolBar->ToggleTool( ID_CVPCB_FOOTPRINT_DISPLAY_FULL_LIST, false );
648 m_mainToolBar->ToggleTool( ID_CVPCB_FOOTPRINT_DISPLAY_FILTERED_LIST, false );
649 m_mainToolBar->ToggleTool( ID_CVPCB_FOOTPRINT_DISPLAY_PIN_FILTERED_LIST, false );
623 break;650 break;
624651
625 default:652 default:
626653
=== modified file 'cvpcb/cvpcb.cpp'
--- cvpcb/cvpcb.cpp 2012-05-10 06:25:27 +0000
+++ cvpcb/cvpcb.cpp 2013-04-01 07:55:27 +0000
@@ -102,6 +102,7 @@
102 frame->LoadProjectFile( filename.GetFullPath() );102 frame->LoadProjectFile( filename.GetFullPath() );
103 frame->Show( true );103 frame->Show( true );
104 frame->BuildFOOTPRINTS_LISTBOX();104 frame->BuildFOOTPRINTS_LISTBOX();
105 frame->BuildLIBRARY_LISTBOX();
105106
106 if( filename.IsOk() && filename.FileExists() )107 if( filename.IsOk() && filename.FileExists() )
107 {108 {
108109
=== modified file 'cvpcb/cvpcb_id.h'
--- cvpcb/cvpcb_id.h 2013-02-02 17:39:59 +0000
+++ cvpcb/cvpcb_id.h 2013-04-01 07:55:27 +0000
@@ -30,5 +30,7 @@
30 ID_CVPCB_FOOTPRINT_DISPLAY_FULL_LIST,30 ID_CVPCB_FOOTPRINT_DISPLAY_FULL_LIST,
31 ID_CVPCB_FOOTPRINT_DISPLAY_FILTERED_LIST,31 ID_CVPCB_FOOTPRINT_DISPLAY_FILTERED_LIST,
32 ID_CVPCB_FOOTPRINT_DISPLAY_PIN_FILTERED_LIST,32 ID_CVPCB_FOOTPRINT_DISPLAY_PIN_FILTERED_LIST,
33 ID_CVPCB_CONFIG_KEEP_OPEN_ON_SAVE33 ID_CVPCB_FOOTPRINT_DISPLAY_BY_LIBRARY_LIST,
34 ID_CVPCB_CONFIG_KEEP_OPEN_ON_SAVE,
35 ID_CVPCB_LIBRARY_LIST
34};36};
3537
=== modified file 'cvpcb/cvpcb_mainframe.h'
--- cvpcb/cvpcb_mainframe.h 2013-02-02 17:39:59 +0000
+++ cvpcb/cvpcb_mainframe.h 2013-04-01 07:55:27 +0000
@@ -12,12 +12,14 @@
12#include <param_config.h>12#include <param_config.h>
13#include <cvpcb.h>13#include <cvpcb.h>
14#include <footprint_info.h>14#include <footprint_info.h>
15#include <library_select.h>
1516
1617
17/* Forward declarations of all top-level window classes. */18/* Forward declarations of all top-level window classes. */
18class wxAuiToolBar;19class wxAuiToolBar;
19class FOOTPRINTS_LISTBOX;20class FOOTPRINTS_LISTBOX;
20class COMPONENTS_LISTBOX;21class COMPONENTS_LISTBOX;
22class LIBRARY_LISTBOX;
21class DISPLAY_FOOTPRINTS_FRAME;23class DISPLAY_FOOTPRINTS_FRAME;
2224
2325
@@ -30,6 +32,7 @@
3032
31 bool m_KeepCvpcbOpen;33 bool m_KeepCvpcbOpen;
32 FOOTPRINTS_LISTBOX* m_FootprintList;34 FOOTPRINTS_LISTBOX* m_FootprintList;
35 LIBRARY_LISTBOX* m_LibraryList;
33 COMPONENTS_LISTBOX* m_ListCmp;36 COMPONENTS_LISTBOX* m_ListCmp;
34 DISPLAY_FOOTPRINTS_FRAME* m_DisplayFootprintFrame;37 DISPLAY_FOOTPRINTS_FRAME* m_DisplayFootprintFrame;
35 wxAuiToolBar* m_mainToolBar;38 wxAuiToolBar* m_mainToolBar;
@@ -131,6 +134,7 @@
131 void SetNewPkg( const wxString& aFootprintName );134 void SetNewPkg( const wxString& aFootprintName );
132 void BuildCmpListBox();135 void BuildCmpListBox();
133 void BuildFOOTPRINTS_LISTBOX();136 void BuildFOOTPRINTS_LISTBOX();
137 void BuildLIBRARY_LISTBOX();
134 void CreateScreenCmp();138 void CreateScreenCmp();
135139
136 /**140 /**
137141
=== modified file 'cvpcb/cvstruct.h'
--- cvpcb/cvstruct.h 2012-09-26 15:36:48 +0000
+++ cvpcb/cvstruct.h 2013-04-01 07:55:27 +0000
@@ -57,6 +57,8 @@
57 FOOTPRINT_LIST& list );57 FOOTPRINT_LIST& list );
58 void SetFootprintFilteredByPinCount( COMPONENT_INFO* Component,58 void SetFootprintFilteredByPinCount( COMPONENT_INFO* Component,
59 FOOTPRINT_LIST& list );59 FOOTPRINT_LIST& list );
60 void SetFootprintFilteredByLibraryList( FOOTPRINT_LIST& list,
61 wxString SelectedLibrary );
60 void SetActiveFootprintList( bool FullList, bool Redraw = false );62 void SetActiveFootprintList( bool FullList, bool Redraw = false );
6163
62 wxString GetSelectedFootprint();64 wxString GetSelectedFootprint();
@@ -70,6 +72,38 @@
70 DECLARE_EVENT_TABLE()72 DECLARE_EVENT_TABLE()
71};73};
7274
75/******************************************/
76/* ListBox showing the list of library */
77/******************************************/
78
79class LIBRARY_LISTBOX : public ITEMS_LISTBOX_BASE
80{
81//private:
82
83public:
84 wxArrayString m_LibraryList;
85public:
86 LIBRARY_LISTBOX( CVPCB_MAINFRAME* parent, wxWindowID id,
87 const wxPoint& loc, const wxSize& size,
88 int nbitems, wxString choice[] );
89 ~LIBRARY_LISTBOX();
90
91 int GetCount();
92 void SetSelection( unsigned index, bool State = true );
93 void SetString( unsigned linecount, const wxString& text );
94 void AppendLine( const wxString& text );
95 void SetLibraryList( wxArrayString list );
96
97 wxString GetSelectedLibrary();
98 wxString OnGetItemText( long item, long column ) const;
99
100 // Events functions:
101 void OnLeftClick( wxListEvent& event );
102 void OnChar( wxKeyEvent& event );
103
104 DECLARE_EVENT_TABLE()
105};
106
73/****************************************************/107/****************************************************/
74/* ListBox showing the list of schematic components */108/* ListBox showing the list of schematic components */
75/****************************************************/109/****************************************************/
76110
=== modified file 'cvpcb/dialogs/dialog_cvpcb_config.cpp'
--- cvpcb/dialogs/dialog_cvpcb_config.cpp 2012-11-19 16:19:38 +0000
+++ cvpcb/dialogs/dialog_cvpcb_config.cpp 2013-04-01 07:55:27 +0000
@@ -156,6 +156,7 @@
156156
157 m_Parent->LoadFootprintFiles();157 m_Parent->LoadFootprintFiles();
158 m_Parent->BuildFOOTPRINTS_LISTBOX();158 m_Parent->BuildFOOTPRINTS_LISTBOX();
159 m_Parent->BuildLIBRARY_LISTBOX();
159 }160 }
160161
161 wxCommandEvent evt( ID_SAVE_PROJECT );162 wxCommandEvent evt( ID_SAVE_PROJECT );
162163
=== modified file 'cvpcb/dialogs/dialog_display_options.cpp'
--- cvpcb/dialogs/dialog_display_options.cpp 2013-02-02 19:10:48 +0000
+++ cvpcb/dialogs/dialog_display_options.cpp 2013-04-01 07:55:27 +0000
@@ -32,6 +32,7 @@
32#include <cvpcb.h>32#include <cvpcb.h>
33#include <class_drawpanel.h>33#include <class_drawpanel.h>
34#include <footprint_info.h>34#include <footprint_info.h>
35#include <library_select.h>
35#include <cvstruct.h>36#include <cvstruct.h>
36#include <class_DisplayFootprintsFrame.h>37#include <class_DisplayFootprintsFrame.h>
3738
3839
=== modified file 'cvpcb/listboxes.cpp'
--- cvpcb/listboxes.cpp 2012-11-19 21:34:25 +0000
+++ cvpcb/listboxes.cpp 2013-04-01 07:55:27 +0000
@@ -124,3 +124,29 @@
124 m_FootprintList->SetFootprintFullList( m_footprints );124 m_FootprintList->SetFootprintFullList( m_footprints );
125 DisplayStatus();125 DisplayStatus();
126}126}
127
128/*
129 * Create or update the library list.
130 */
131void CVPCB_MAINFRAME::BuildLIBRARY_LISTBOX()
132{
133 wxString msg;
134 wxSize size( 10, 10 );
135 wxFont guiFont = wxSystemSettings::GetFont( wxSYS_DEFAULT_GUI_FONT );
136
137 if( m_LibraryList == NULL )
138 {
139 m_LibraryList = new LIBRARY_LISTBOX( this, ID_CVPCB_LIBRARY_LIST,
140 wxDefaultPosition, size,
141 0 , NULL );
142 m_LibraryList->SetBackgroundColour( wxColour( 255, 255, 255 ) );
143 m_LibraryList->SetForegroundColour( wxColour( 0, 0, 0 ) );
144 m_LibraryList->SetFont( wxFont( guiFont.GetPointSize(),
145 wxFONTFAMILY_MODERN,
146 wxFONTSTYLE_NORMAL,
147 wxFONTWEIGHT_NORMAL ) );
148 //m_LibraryList->SetSingleStyle(wxLC_SINGLE_SEL,0); Does not work? Causes empty list. Why?
149 }
150
151 m_LibraryList->SetLibraryList(m_ModuleLibNames);
152}
127153
=== modified file 'cvpcb/readwrite_dlgs.cpp'
--- cvpcb/readwrite_dlgs.cpp 2013-02-02 17:39:59 +0000
+++ cvpcb/readwrite_dlgs.cpp 2013-04-01 07:55:27 +0000
@@ -136,6 +136,7 @@
136 LoadProjectFile( m_NetlistFileName.GetFullPath() );136 LoadProjectFile( m_NetlistFileName.GetFullPath() );
137 LoadFootprintFiles();137 LoadFootprintFiles();
138 BuildFOOTPRINTS_LISTBOX();138 BuildFOOTPRINTS_LISTBOX();
139 BuildLIBRARY_LISTBOX();
139140
140 m_ListCmp->Clear();141 m_ListCmp->Clear();
141 m_undefinedComponentCnt = 0;142 m_undefinedComponentCnt = 0;
142143
=== modified file 'cvpcb/tool_cvpcb.cpp'
--- cvpcb/tool_cvpcb.cpp 2013-02-02 17:39:59 +0000
+++ cvpcb/tool_cvpcb.cpp 2013-04-01 07:55:27 +0000
@@ -103,6 +103,12 @@
103 true, NULL,103 true, NULL,
104 _( "Display the filtered footprint list by pin count for the current component" ),104 _( "Display the filtered footprint list by pin count for the current component" ),
105 wxEmptyString );105 wxEmptyString );
106
107 m_mainToolBar->AddTool( ID_CVPCB_FOOTPRINT_DISPLAY_BY_LIBRARY_LIST,
108 KiBitmap( module_library_list_xpm ),
109 wxNullBitmap, true, NULL,
110 _( "Display the footprint list from selected library" ),
111 wxEmptyString );
106112
107 m_mainToolBar->AddTool( ID_CVPCB_FOOTPRINT_DISPLAY_FULL_LIST,113 m_mainToolBar->AddTool( ID_CVPCB_FOOTPRINT_DISPLAY_FULL_LIST,
108 KiBitmap( module_full_list_xpm ),114 KiBitmap( module_full_list_xpm ),
@@ -114,6 +120,7 @@
114 {120 {
115 wxString key = wxT( FILTERFOOTPRINTKEY );121 wxString key = wxT( FILTERFOOTPRINTKEY );
116 int opt = config->Read( key, (long) 1 );122 int opt = config->Read( key, (long) 1 );
123 m_mainToolBar->ToggleTool( ID_CVPCB_FOOTPRINT_DISPLAY_BY_LIBRARY_LIST, opt == 3 );
117 m_mainToolBar->ToggleTool( ID_CVPCB_FOOTPRINT_DISPLAY_PIN_FILTERED_LIST, opt == 2 );124 m_mainToolBar->ToggleTool( ID_CVPCB_FOOTPRINT_DISPLAY_PIN_FILTERED_LIST, opt == 2 );
118 m_mainToolBar->ToggleTool( ID_CVPCB_FOOTPRINT_DISPLAY_FILTERED_LIST, opt == 1 );125 m_mainToolBar->ToggleTool( ID_CVPCB_FOOTPRINT_DISPLAY_FILTERED_LIST, opt == 1 );
119 m_mainToolBar->ToggleTool( ID_CVPCB_FOOTPRINT_DISPLAY_FULL_LIST, opt == 0 );126 m_mainToolBar->ToggleTool( ID_CVPCB_FOOTPRINT_DISPLAY_FULL_LIST, opt == 0 );
120127
=== modified file 'include/bitmaps.h'
--- include/bitmaps.h 2013-03-01 19:59:29 +0000
+++ include/bitmaps.h 2013-04-01 07:55:27 +0000
@@ -279,6 +279,7 @@
279EXTERN_BITMAP( module_wizard_xpm )279EXTERN_BITMAP( module_wizard_xpm )
280EXTERN_BITMAP( module_filtered_list_xpm )280EXTERN_BITMAP( module_filtered_list_xpm )
281EXTERN_BITMAP( module_pin_filtered_list_xpm )281EXTERN_BITMAP( module_pin_filtered_list_xpm )
282EXTERN_BITMAP( module_library_list_xpm )
282EXTERN_BITMAP( module_full_list_xpm )283EXTERN_BITMAP( module_full_list_xpm )
283EXTERN_BITMAP( module_options_xpm )284EXTERN_BITMAP( module_options_xpm )
284EXTERN_BITMAP( module_ratsnest_xpm )285EXTERN_BITMAP( module_ratsnest_xpm )
285286
=== added file 'include/library_select.h'
--- include/library_select.h 1970-01-01 00:00:00 +0000
+++ include/library_select.h 2013-04-01 07:55:27 +0000
@@ -0,0 +1,65 @@
1/*
2 * @file library_select.h
3 */
4
5#ifndef LIBRARY_SELECT_H_
6#define LIBRARY_SELECT_H_
7
8#include <boost/ptr_container/ptr_vector.hpp>
9#include <boost/foreach.hpp>
10
11#include <kicad_string.h>
12
13/*
14 * Class LIBRARY_SELECT
15 * is a helper class to handle the list of libraries
16 */
17
18class LIBRARY_INFO
19{
20public:
21 wxString m_LibName; ///< Full name (with path) of the library
22 int m_Num; ///< Order number in the display list.
23 LIBRARY_INFO()
24 {
25 m_Num = 0;
26 }
27};
28
29class LIBRARY_LIST
30{
31public:
32 boost::ptr_vector< LIBRARY_INFO > m_List;
33 wxString m_filesNotFound;
34 wxString m_filesInvalid;
35
36public:
37
38 /**
39 * Function GetCount
40 * @return the number of items stored in list
41 */
42 unsigned GetCount() const { return m_List.size(); }
43
44 /**
45 * Function GetItem
46 * @return the aIdx item in list
47 * @param aIdx = index of the given item
48 */
49 LIBRARY_INFO & GetItem( unsigned aIdx )
50 {
51 return m_List[aIdx];
52 }
53
54 /**
55 * Function AddItem
56 * add aItem in list
57 * @param aItem = item to add
58 */
59 void AddItem( LIBRARY_INFO* aItem )
60 {
61 m_List.push_back( aItem);
62 }
63};
64
65#endif // LIBRARY_SELECT_H_