~cern-kicad/kicad/kicad-pns-tom

« back to all changes in this revision

Viewing changes to include/common.h

  • Committer: Maciej Suminski
  • Date: 2013-08-02 13:57:24 UTC
  • mfrom: (4024.1.238 kicad)
  • mto: This revision was merged to the branch mainline in revision 4221.
  • Revision ID: maciej.suminski@cern.ch-20130802135724-gix6orezshkukodv
Upstream merge.

Show diffs side-by-side

added added

removed removed

Lines of Context:
83
83
#define GERBVIEW_EXE        wxT( "gerbview.exe" )
84
84
#define BITMAPCONVERTER_EXE wxT( "bitmap2component.exe" )
85
85
#define PCB_CALCULATOR_EXE  wxT( "pcb_calculator.exe" )
 
86
#define PL_EDITOR_EXE       wxT( "pl_editor.exe" )
86
87
#else
87
88
#ifndef __WXMAC__
88
89
#define CVPCB_EXE           wxT( "cvpcb" )
91
92
#define GERBVIEW_EXE        wxT( "gerbview" )
92
93
#define BITMAPCONVERTER_EXE wxT( "bitmap2component" )
93
94
#define PCB_CALCULATOR_EXE  wxT( "pcb_calculator" )
 
95
#define PL_EDITOR_EXE       wxT( "pl_editor" )
94
96
#else
95
97
#define CVPCB_EXE           wxT( "cvpcb.app/Contents/MacOS/cvpcb" )
96
98
#define PCBNEW_EXE          wxT( "pcbnew.app/Contents/MacOS/pcbnew" )
98
100
#define GERBVIEW_EXE        wxT( "gerbview.app/Contents/MacOS/gerbview" )
99
101
#define BITMAPCONVERTER_EXE wxT( "bitmap2component.app/Contents/MacOS/bitmap2component" )
100
102
#define PCB_CALCULATOR_EXE  wxT( "pcb_calculator.app/Contents/MacOS/pcb_calculator" )
 
103
#define PL_EDITOR_EXE  wxT( "pcb_calculator.app/Contents/MacOS/pl_editor" )
101
104
# endif
102
105
#endif
103
106
 
167
170
 
168
171
 
169
172
/// Return whether GOST is in play
170
 
bool IsGOST();
 
173
inline bool IsGOST()
 
174
{
 
175
#if defined(KICAD_GOST)
 
176
    return true;
 
177
#else
 
178
    return false;
 
179
#endif
 
180
}
171
181
 
172
182
 
173
183
enum EDA_UNITS_T {
286
296
 
287
297
    // Accessors returning "Internal Units (IU)".  IUs are mils in EESCHEMA,
288
298
    // and either deci-mils or nanometers in PCBNew.
289
 
#if defined(PCBNEW) || defined(EESCHEMA) || defined(GERBVIEW)
 
299
#if defined(PCBNEW) || defined(EESCHEMA) || defined(GERBVIEW) || defined(PL_EDITOR)
290
300
    int GetWidthIU() const  { return IU_PER_MILS * GetWidthMils();  }
291
301
    int GetHeightIU() const { return IU_PER_MILS * GetHeightMils(); }
292
302
    const wxSize GetSizeIU() const  { return wxSize( GetWidthIU(), GetHeightIU() ); }
293
303
#endif
294
304
 
295
305
    /**
296
 
     * Function GetLeftMarginMils.
297
 
     * @return int - logical page left margin in mils.
298
 
     */
299
 
    int GetLeftMarginMils() const           { return m_left_margin; }
300
 
 
301
 
    /**
302
 
     * Function GetLeftMarginMils.
303
 
     * @return int - logical page right margin in mils.
304
 
     */
305
 
    int GetRightMarginMils() const          { return m_right_margin; }
306
 
 
307
 
    /**
308
 
     * Function GetLeftMarginMils.
309
 
     * @return int - logical page top margin in mils.
310
 
     */
311
 
    int GetTopMarginMils() const            { return m_top_margin; }
312
 
 
313
 
    /**
314
 
     * Function GetBottomMarginMils.
315
 
     * @return int - logical page bottom margin in mils.
316
 
     */
317
 
    int GetBottomMarginMils() const         { return m_bottom_margin; }
318
 
 
319
 
    /**
320
 
     * Function SetLeftMarginMils
321
 
     * sets left page margin to @a aMargin in mils.
322
 
     */
323
 
    void SetLeftMarginMils( int aMargin )   { m_left_margin = aMargin; }
324
 
 
325
 
    /**
326
 
     * Function SetRightMarginMils
327
 
     * sets right page margin to @a aMargin in mils.
328
 
     */
329
 
    void SetRightMarginMils( int aMargin )  { m_right_margin = aMargin; }
330
 
 
331
 
    /**
332
 
     * Function SetTopMarginMils
333
 
     * sets top page margin to @a aMargin in mils.
334
 
     */
335
 
    void SetTopMarginMils( int aMargin )    { m_top_margin = aMargin; }
336
 
 
337
 
    /**
338
 
     * Function SetBottomMarginMils
339
 
     * sets bottom page margin to @a aMargin in mils.
340
 
     */
341
 
    void SetBottomMarginMils( int aMargin ) { m_bottom_margin = aMargin; }
342
 
 
343
 
    /**
344
306
     * Function SetCustomWidthMils
345
307
     * sets the width of Custom page in mils, for any custom page
346
308
     * constructed or made via SetType() after making this call.
419
381
#define MIN_PAGE_SIZE   4000
420
382
#define MAX_PAGE_SIZE   48000
421
383
 
422
 
 
423
 
    int         m_left_margin;
424
 
    int         m_right_margin;
425
 
    int         m_top_margin;
426
 
    int         m_bottom_margin;
427
 
 
428
384
    bool        m_portrait;         ///< true if portrait, false if landscape
429
385
 
430
386
    wxPaperSize m_paper_id;         ///< wx' style paper id.