~andrew-plumb/kicad/kicad

« back to all changes in this revision

Viewing changes to include/fp_lib_table.h

  • Committer: Dick Hollenbeck
  • Date: 2013-10-03 22:12:56 UTC
  • Revision ID: dick@softplc.com-20131003221256-ny7xs3ucnjlj12j1
DIALOG_FP_LIB_TABLE does not use wxSplitterWindow, it would not obey.
Paste popup menu in this dialog now allows pasting a (fp_lib_table)
s-expression element holding (lib) elements.  This provides an 
opportunity for GITHUB library publishers to put the table description
into their README.md file as a (fp_lib_table) element where it can
be quickly copied to clipboard and pasted into the fp lib table dialog.
This is a paste operation, and overwrites from the initial cursor position.

Show diffs side-by-side

added added

removed removed

Lines of Context:
202
202
        /**
203
203
         * Function SetOptions
204
204
         */
205
 
        void SetOptions( const wxString& aOptions ) { options = aOptions; }
 
205
        void SetOptions( const wxString& aOptions )
 
206
        {
 
207
            options = aOptions;
 
208
 
 
209
            // set PROPERTIES* from options
 
210
            setProperties( ParseOptions( TO_UTF8( aOptions ) ) );
 
211
        }
206
212
 
207
213
        /**
208
214
         * Function GetDescr
223
229
         */
224
230
        const PROPERTIES* GetProperties() const     { return properties; }
225
231
 
226
 
        /**
227
 
         * Function SetProperties
228
 
         * sets this ROW's PROPERTIES by taking ownership of @a aProperties.
229
 
         * @param aProperties ownership is given over to this ROW.
230
 
         */
231
 
        void SetProperties( const PROPERTIES* aProperties )
232
 
        {
233
 
            delete properties;
234
 
            properties = aProperties;
235
 
        }
236
 
 
237
232
        //-----</accessors>-----------------------------------------------------
238
233
 
239
234
        /**
249
244
 
250
245
    private:
251
246
 
 
247
        /**
 
248
         * Function setProperties
 
249
         * sets this ROW's PROPERTIES by taking ownership of @a aProperties.
 
250
         * @param aProperties ownership is given over to this ROW.
 
251
         */
 
252
        void setProperties( const PROPERTIES* aProperties )
 
253
        {
 
254
            delete properties;
 
255
            properties = aProperties;
 
256
        }
 
257
 
252
258
        wxString        nickName;
253
259
        wxString        uri;
254
260
        LIB_T           type;
258
264
        PROPERTIES*     properties;
259
265
    };
260
266
 
261
 
 
262
267
    /**
263
268
     * Constructor FP_LIB_TABLE
264
269
     * builds a library table by pre-pending this table fragment in front of
395
400
        return row ? &row->options : 0;
396
401
    }
397
402
#endif
398
 
 
399
403
    //----</read accessors>---------------------------------------------------
400
404
 
401
 
#if 1 || defined(DEBUG)
402
 
    /// implement the tests in here so we can honor the privilege levels of the
403
 
    /// accessors, something difficult to do from int main(int, char**)
404
 
    void Test();
405
 
#endif
406
 
 
407
405
    /**
408
406
     * Function InsertRow
409
407
     * adds aRow if it does not already exist or if doReplace is true.  If doReplace
444
442
    bool IsEmpty() const;
445
443
 
446
444
    /**
 
445
     * Function Assign
 
446
     * assigns new contents to ROWs of this table by copying ALL rows from aOther,
 
447
     * and modifying the size of this table if necessary.
 
448
     * @param aDestNdx is the starting index into this table.
 
449
    void Assign( const FP_LIB_TABLE& aOther, int aDestNdx );
 
450
     */
 
451
 
 
452
    /**
447
453
     * Function MissingLegacyLibs
448
454
     * tests the list of \a aLibNames by URI to determine if any of them are missing from
449
455
     * the #FP_LIB_TABLE.