~pierre-parent-k/kicad/length-tunning

« back to all changes in this revision

Viewing changes to kicad/pgm_kicad.h

  • Committer: Pierre Parent
  • Date: 2014-07-06 10:32:13 UTC
  • mfrom: (4798.1.179 kicad)
  • Revision ID: pierre.parent@insa-rouen.fr-20140706103213-wjsdy0hc9q6wbz5v
Merge with lp:kicad 4977

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#ifndef PGM_KICAD_H_
2
 
#define PGM_KICAD_H_
3
 
/*
4
 
 * This program source code file is part of KiCad, a free EDA CAD application.
5
 
 *
6
 
 * Copyright (C) 2014 SoftPLC Corporation, Dick Hollenbeck <dick@softplc.com>
7
 
 * Copyright (C) 2014 KiCad Developers, see CHANGELOG.TXT for contributors.
8
 
 *
9
 
 * This program is free software; you can redistribute it and/or
10
 
 * modify it under the terms of the GNU General Public License
11
 
 * as published by the Free Software Foundation; either version 2
12
 
 * of the License, or (at your option) any later version.
13
 
 *
14
 
 * This program is distributed in the hope that it will be useful,
15
 
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16
 
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17
 
 * GNU General Public License for more details.
18
 
 *
19
 
 * You should have received a copy of the GNU General Public License
20
 
 * along with this program; if not, you may find one here:
21
 
 * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
22
 
 * or you may search the http://www.gnu.org website for the version 2 license,
23
 
 * or you may write to the Free Software Foundation, Inc.,
24
 
 * 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
25
 
 */
26
 
 
27
 
 
28
 
#include <pgm_base.h>
29
 
#include <bin_mod.h>
30
 
 
31
 
 
32
 
/**
33
 
 * Class PGM_KICAD
34
 
 * extends PGM_BASE to bring in FileHistory() and PdfBrowser() which were moved
35
 
 * from EDA_APP into KIFACE_I.  KIFACE_I is not applicable in the project manager
36
 
 * since it is not a KIFACE.  This header is in the kicad directory since nobody
37
 
 * else needs to know about it.
38
 
 */
39
 
class PGM_KICAD : public PGM_BASE
40
 
{
41
 
public:
42
 
    PGM_KICAD() :
43
 
        m_bm( "kicad" )     // indicates a "$HOME/.kicad wxConfig like" config file.
44
 
    {}
45
 
 
46
 
    ~PGM_KICAD()
47
 
    {
48
 
        destroy();
49
 
    }
50
 
 
51
 
    bool OnPgmInit( wxApp* aWxApp );                // overload PGM_BASE virtual
52
 
    void OnPgmExit();                               // overload PGM_BASE virtual
53
 
    void MacOpenFile( const wxString& aFileName );  // overload PGM_BASE virtual
54
 
 
55
 
    wxFileHistory&  GetFileHistory()            { return m_bm.m_history; }
56
 
 
57
 
    wxConfigBase*   PgmSettings()               { return m_bm.m_config; }
58
 
 
59
 
    SEARCH_STACK&   SysSearch()                 { return m_bm.m_search; }
60
 
 
61
 
protected:
62
 
 
63
 
    // The PGM_* classes can have difficulties at termination if they
64
 
    // are not destroyed soon enough.  Relying on a static destructor can be
65
 
    // too late for contained objects like wxSingleInstanceChecker.
66
 
    void destroy();
67
 
 
68
 
    BIN_MOD         m_bm;
69
 
};
70
 
 
71
 
 
72
 
extern PGM_KICAD&  Pgm();
73
 
 
74
 
#endif  // PGM_KICAD_H_