Commit 8a71b1ae authored by charras's avatar charras
Browse files

minor changes

parent a6006ef3
Loading
Loading
Loading
Loading
+179 −78
Original line number Original line Diff line number Diff line
/////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////

// Name:        dialog_freeroute_exchange.cpp
// Name:        dialog_freeroute_exchange.cpp
// Purpose:
// Purpose:
// Author:      jean-pierre Charras
// Author:      jean-pierre Charras
@@ -34,18 +35,23 @@
////@begin XPM images
////@begin XPM images
////@end XPM images
////@end XPM images


#define FREEROUTE_URL_KEY wxT( "freeroute_url" )
#define FREEROUTE_RUN_KEY wxT( "freeroute_command" )




/**********************************************************************/
/**********************************************************************/
void WinEDA_PcbFrame::Access_to_External_Tool( wxCommandEvent& event )
void WinEDA_PcbFrame::Access_to_External_Tool( wxCommandEvent& event )
/**********************************************************************/
/**********************************************************************/

/* Run an external tool (currently, only freeroute)
/* Run an external tool (currently, only freeroute)
 */
 */
{
{
    dialog_freeroute_exchange dialog( this );
    dialog_freeroute_exchange dialog( this );

    dialog.ShowModal();
    dialog.ShowModal();
}
}



/*!
/*!
 * dialog_freeroute_exchange type definition
 * dialog_freeroute_exchange type definition
 */
 */
@@ -60,6 +66,8 @@ IMPLEMENT_DYNAMIC_CLASS( dialog_freeroute_exchange, wxDialog )
BEGIN_EVENT_TABLE( dialog_freeroute_exchange, wxDialog )
BEGIN_EVENT_TABLE( dialog_freeroute_exchange, wxDialog )


////@begin dialog_freeroute_exchange event table entries
////@begin dialog_freeroute_exchange event table entries
EVT_CLOSE( dialog_freeroute_exchange::OnCloseWindow )

EVT_BUTTON( ID_CREATE_EXPORT_DSN_FILE, dialog_freeroute_exchange::OnCreateExportDsnFileClick )
EVT_BUTTON( ID_CREATE_EXPORT_DSN_FILE, dialog_freeroute_exchange::OnCreateExportDsnFileClick )


EVT_BUTTON( ID_RUN_FREEROUTE, dialog_freeroute_exchange::OnRunFreerouteClick )
EVT_BUTTON( ID_RUN_FREEROUTE, dialog_freeroute_exchange::OnRunFreerouteClick )
@@ -70,6 +78,10 @@ BEGIN_EVENT_TABLE( dialog_freeroute_exchange, wxDialog )


EVT_BUTTON( ID_GOTO_FREEROUTE_WEB_SITE, dialog_freeroute_exchange::OnGotoFreerouteWebSiteClick )
EVT_BUTTON( ID_GOTO_FREEROUTE_WEB_SITE, dialog_freeroute_exchange::OnGotoFreerouteWebSiteClick )


EVT_TEXT( ID_TEXT_EDIT_FR_URL, dialog_freeroute_exchange::OnTextEditFrUrlUpdated )

EVT_TEXT( ID_TEXT_EDIT_FR_CMD, dialog_freeroute_exchange::OnTextEditFrCmdUpdated )

////@end dialog_freeroute_exchange event table entries
////@end dialog_freeroute_exchange event table entries


END_EVENT_TABLE()
END_EVENT_TABLE()
@@ -84,7 +96,13 @@ dialog_freeroute_exchange::dialog_freeroute_exchange()
    Init();
    Init();
}
}


dialog_freeroute_exchange::dialog_freeroute_exchange( WinEDA_PcbFrame* parent, wxWindowID id, const wxString& caption, const wxPoint& pos, const wxSize& size, long style )

dialog_freeroute_exchange::dialog_freeroute_exchange( WinEDA_PcbFrame* parent,
                                                      wxWindowID id,
                                                      const wxString& caption,
                                                      const wxPoint& pos,
                                                      const wxSize& size,
                                                      long style )
{
{
    m_Parent = parent;
    m_Parent = parent;
    Init();
    Init();
@@ -96,7 +114,12 @@ dialog_freeroute_exchange::dialog_freeroute_exchange( WinEDA_PcbFrame* parent, w
 * dialog_freeroute_exchange creator
 * dialog_freeroute_exchange creator
 */
 */


bool dialog_freeroute_exchange::Create( wxWindow* parent, wxWindowID id, const wxString& caption, const wxPoint& pos, const wxSize& size, long style )
bool dialog_freeroute_exchange::Create( wxWindow* parent,
                                        wxWindowID id,
                                        const wxString& caption,
                                        const wxPoint& pos,
                                        const wxSize& size,
                                        long style )
{
{
////@begin dialog_freeroute_exchange creation
////@begin dialog_freeroute_exchange creation
    SetExtraStyle( wxWS_EX_BLOCK_EVENTS );
    SetExtraStyle( wxWS_EX_BLOCK_EVENTS );
@@ -108,6 +131,7 @@ bool dialog_freeroute_exchange::Create( wxWindow* parent, wxWindowID id, const w
        GetSizer()->SetSizeHints( this );
        GetSizer()->SetSizeHints( this );
    }
    }
    Centre();
    Centre();

////@end dialog_freeroute_exchange creation
////@end dialog_freeroute_exchange creation
    return true;
    return true;
}
}
@@ -131,8 +155,10 @@ dialog_freeroute_exchange::~dialog_freeroute_exchange()
void dialog_freeroute_exchange::Init()
void dialog_freeroute_exchange::Init()
{
{
////@begin dialog_freeroute_exchange member initialisation
////@begin dialog_freeroute_exchange member initialisation
    m_FreeRouteSetupChanged = false;
    m_FreerouteURLName = NULL;
    m_FreerouteURLName = NULL;
    m_FreerouteURLCommandString = NULL;
    m_FreerouteURLCommandString = NULL;

////@end dialog_freeroute_exchange member initialisation
////@end dialog_freeroute_exchange member initialisation
}
}


@@ -144,62 +170,94 @@ void dialog_freeroute_exchange::Init()
void dialog_freeroute_exchange::CreateControls()
void dialog_freeroute_exchange::CreateControls()
{
{
////@begin dialog_freeroute_exchange content construction
////@begin dialog_freeroute_exchange content construction
    // Generated by DialogBlocks, 14/03/2008 10:20:02 (unregistered)
    // Generated by DialogBlocks, 14/03/2008 16:00:48 (unregistered)


    dialog_freeroute_exchange* itemDialog1 = this;
    dialog_freeroute_exchange* itemDialog1 = this;


    wxBoxSizer* itemBoxSizer2 = new wxBoxSizer( wxHORIZONTAL );
    wxBoxSizer* itemBoxSizer2 = new wxBoxSizer( wxHORIZONTAL );

    itemDialog1->SetSizer( itemBoxSizer2 );
    itemDialog1->SetSizer( itemBoxSizer2 );


    wxBoxSizer* itemBoxSizer3 = new wxBoxSizer( wxVERTICAL );
    wxBoxSizer* itemBoxSizer3 = new wxBoxSizer( wxVERTICAL );
    itemBoxSizer2->Add(itemBoxSizer3, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
    itemBoxSizer2->Add( itemBoxSizer3, 0, wxGROW | wxALL, 5 );


    wxButton* itemButton4 = new wxButton( itemDialog1, ID_CREATE_EXPORT_DSN_FILE, _("Create Export Dsn File"), wxDefaultPosition, wxDefaultSize, 0 );
    wxButton*   itemButton4 = new wxButton( itemDialog1, ID_CREATE_EXPORT_DSN_FILE,
                                            _(
                                                "Create Export Dsn File" ), wxDefaultPosition,
                                            wxDefaultSize, 0 );
    itemButton4->SetHelpText( _( "Create an export DNS file to freeroute" ) );
    itemButton4->SetHelpText( _( "Create an export DNS file to freeroute" ) );
    if( dialog_freeroute_exchange::ShowToolTips() )
    if( dialog_freeroute_exchange::ShowToolTips() )
        itemButton4->SetToolTip( _( "Create an export DNS file to freeroute" ) );
        itemButton4->SetToolTip( _( "Create an export DNS file to freeroute" ) );
    itemBoxSizer3->Add( itemButton4, 0, wxGROW | wxALL, 5 );
    itemBoxSizer3->Add( itemButton4, 0, wxGROW | wxALL, 5 );


    wxButton* itemButton5 = new wxButton( itemDialog1, ID_RUN_FREEROUTE, _("Connect to FreeROUTE"), wxDefaultPosition, wxDefaultSize, 0 );
    wxButton* itemButton5 = new wxButton( itemDialog1, ID_RUN_FREEROUTE, _(
                                              "Connect to FreeROUTE" ), wxDefaultPosition,
                                          wxDefaultSize, 0 );
    itemButton5->SetHelpText( _( "Run the WEb Based Freeroute Router" ) );
    itemButton5->SetHelpText( _( "Run the WEb Based Freeroute Router" ) );
    if( dialog_freeroute_exchange::ShowToolTips() )
    if( dialog_freeroute_exchange::ShowToolTips() )
        itemButton5->SetToolTip( _( "Run the WEb Based Freeroute Router" ) );
        itemButton5->SetToolTip( _( "Run the WEb Based Freeroute Router" ) );
    itemBoxSizer3->Add( itemButton5, 0, wxGROW | wxALL, 5 );
    itemBoxSizer3->Add( itemButton5, 0, wxGROW | wxALL, 5 );


    wxButton* itemButton6 = new wxButton( itemDialog1, ID_IMPORT_FREEROUTE_DSN_FILE, _("Read Design File"), wxDefaultPosition, wxDefaultSize, 0 );
    wxButton* itemButton6 = new wxButton( itemDialog1, ID_IMPORT_FREEROUTE_DSN_FILE,
                                          _(
                                              "Read Design File" ), wxDefaultPosition,
                                          wxDefaultSize, 0 );
    itemButton6->SetHelpText( _( "Read the design file created by freeroute" ) );
    itemButton6->SetHelpText( _( "Read the design file created by freeroute" ) );
    if( dialog_freeroute_exchange::ShowToolTips() )
    if( dialog_freeroute_exchange::ShowToolTips() )
        itemButton6->SetToolTip( _( "Read the design file created by freeroute" ) );
        itemButton6->SetToolTip( _( "Read the design file created by freeroute" ) );
    itemBoxSizer3->Add( itemButton6, 0, wxGROW | wxALL, 5 );
    itemBoxSizer3->Add( itemButton6, 0, wxGROW | wxALL, 5 );


    wxButton* itemButton7 = new wxButton( itemDialog1, wxID_CLOSE, _("&Close"), wxDefaultPosition, wxDefaultSize, 0 );
    wxButton*   itemButton7 = new wxButton( itemDialog1, wxID_CLOSE, _(
                                                "&Close" ), wxDefaultPosition, wxDefaultSize, 0 );
    itemBoxSizer3->Add( itemButton7, 0, wxGROW | wxALL, 5 );
    itemBoxSizer3->Add( itemButton7, 0, wxGROW | wxALL, 5 );


    wxBoxSizer* itemBoxSizer8 = new wxBoxSizer( wxVERTICAL );
    wxBoxSizer* itemBoxSizer8 = new wxBoxSizer( wxVERTICAL );
    itemBoxSizer2->Add(itemBoxSizer8, 0, wxGROW|wxALL, 5);
    itemBoxSizer2->Add( itemBoxSizer8, 1, wxGROW | wxALL, 5 );


    wxButton* itemButton9 = new wxButton( itemDialog1, ID_GOTO_FREEROUTE_WEB_SITE, _("Access to FreeROUTE Web Site"), wxDefaultPosition, wxDefaultSize, 0 );
    wxButton*   itemButton9 = new wxButton( itemDialog1, ID_GOTO_FREEROUTE_WEB_SITE,
                                            _(
                                                "Access to FreeROUTE Web Site" ),
                                            wxDefaultPosition, wxDefaultSize, 0 );
    itemButton9->SetHelpText( _( "Run the WEb Based Freeroute Router" ) );
    itemButton9->SetHelpText( _( "Run the WEb Based Freeroute Router" ) );
    if( dialog_freeroute_exchange::ShowToolTips() )
    if( dialog_freeroute_exchange::ShowToolTips() )
        itemButton9->SetToolTip( _( "Run the WEb Based Freeroute Router" ) );
        itemButton9->SetToolTip( _( "Run the WEb Based Freeroute Router" ) );
    itemBoxSizer8->Add( itemButton9, 0, wxGROW | wxALL, 5 );
    itemBoxSizer8->Add( itemButton9, 0, wxGROW | wxALL, 5 );


    wxStaticText* itemStaticText10 = new wxStaticText( itemDialog1, wxID_STATIC, _("FreeRoute URL"), wxDefaultPosition, wxDefaultSize, 0 );
    wxStaticText* itemStaticText10 = new wxStaticText( itemDialog1, wxID_STATIC,
                                                       _(
                                                           "FreeRoute URL" ), wxDefaultPosition,
                                                       wxDefaultSize, 0 );
    itemBoxSizer8->Add( itemStaticText10, 0, wxGROW | wxLEFT | wxRIGHT | wxTOP, 5 );
    itemBoxSizer8->Add( itemStaticText10, 0, wxGROW | wxLEFT | wxRIGHT | wxTOP, 5 );


    m_FreerouteURLName = new wxTextCtrl( itemDialog1, ID_TEXTCTRL1, _T(""), wxDefaultPosition, wxDefaultSize, 0 );
    m_FreerouteURLName = new wxTextCtrl( itemDialog1, ID_TEXT_EDIT_FR_URL, _T(
                                             "" ), wxDefaultPosition, wxDefaultSize, 0 );
    itemBoxSizer8->Add( m_FreerouteURLName, 0, wxGROW | wxLEFT | wxRIGHT | wxBOTTOM, 5 );
    itemBoxSizer8->Add( m_FreerouteURLName, 0, wxGROW | wxLEFT | wxRIGHT | wxBOTTOM, 5 );


    wxStaticText* itemStaticText12 = new wxStaticText( itemDialog1, wxID_STATIC, _("FreeRoute Command"), wxDefaultPosition, wxDefaultSize, 0 );
    wxStaticText* itemStaticText12 = new wxStaticText( itemDialog1, wxID_STATIC,
                                                       _(
                                                           "FreeRoute Command" ),
                                                       wxDefaultPosition, wxDefaultSize, 0 );
    itemBoxSizer8->Add( itemStaticText12, 0, wxGROW | wxLEFT | wxRIGHT | wxTOP, 5 );
    itemBoxSizer8->Add( itemStaticText12, 0, wxGROW | wxLEFT | wxRIGHT | wxTOP, 5 );


    m_FreerouteURLCommandString = new wxTextCtrl( itemDialog1, ID_TEXTCTRL, _T(""), wxDefaultPosition, wxDefaultSize, 0 );
    m_FreerouteURLCommandString = new wxTextCtrl( itemDialog1, ID_TEXT_EDIT_FR_CMD, _T(
                                                      "" ), wxDefaultPosition, wxDefaultSize, 0 );
    itemBoxSizer8->Add( m_FreerouteURLCommandString, 0, wxGROW | wxLEFT | wxRIGHT | wxBOTTOM, 5 );
    itemBoxSizer8->Add( m_FreerouteURLCommandString, 0, wxGROW | wxLEFT | wxRIGHT | wxBOTTOM, 5 );


////@end dialog_freeroute_exchange content construction
////@end dialog_freeroute_exchange content construction


    wxString msg;
    m_Parent->m_Parent->m_EDA_Config->Read( FREEROUTE_URL_KEY, &msg );
    if( msg.IsEmpty() )
        m_FreerouteURLName->SetValue( wxT( "http://www.freerouting.net/" ) );
        m_FreerouteURLName->SetValue( wxT( "http://www.freerouting.net/" ) );
	m_FreerouteURLCommandString->SetValue(wxT("http://www.freerouting.net/java/freeroute.jnlp"));
    else
        m_FreerouteURLName->SetValue( msg );
    msg.Empty();
    m_Parent->m_Parent->m_EDA_Config->Read( FREEROUTE_RUN_KEY, &msg );
    if( msg.IsEmpty() )
        m_FreerouteURLCommandString->SetValue( wxT(
                                                  "http://www.freerouting.net/java/freeroute.jnlp" ) );
    else
        m_FreerouteURLCommandString->SetValue( msg );
}
}




@@ -212,6 +270,7 @@ bool dialog_freeroute_exchange::ShowToolTips()
    return true;
    return true;
}
}



/*!
/*!
 * Get bitmap resources
 * Get bitmap resources
 */
 */
@@ -222,9 +281,11 @@ wxBitmap dialog_freeroute_exchange::GetBitmapResource( const wxString& name )
////@begin dialog_freeroute_exchange bitmap retrieval
////@begin dialog_freeroute_exchange bitmap retrieval
    wxUnusedVar( name );
    wxUnusedVar( name );
    return wxNullBitmap;
    return wxNullBitmap;

////@end dialog_freeroute_exchange bitmap retrieval
////@end dialog_freeroute_exchange bitmap retrieval
}
}



/*!
/*!
 * Get icon resources
 * Get icon resources
 */
 */
@@ -235,6 +296,7 @@ wxIcon dialog_freeroute_exchange::GetIconResource( const wxString& name )
////@begin dialog_freeroute_exchange icon retrieval
////@begin dialog_freeroute_exchange icon retrieval
    wxUnusedVar( name );
    wxUnusedVar( name );
    return wxNullIcon;
    return wxNullIcon;

////@end dialog_freeroute_exchange icon retrieval
////@end dialog_freeroute_exchange icon retrieval
}
}


@@ -266,6 +328,7 @@ void dialog_freeroute_exchange::OnImportFreerouteDsnFileClick( wxCommandEvent& e
void dialog_freeroute_exchange::OnRunFreerouteClick( wxCommandEvent& event )
void dialog_freeroute_exchange::OnRunFreerouteClick( wxCommandEvent& event )
{
{
    wxString command = m_FreerouteURLCommandString->GetValue();
    wxString command = m_FreerouteURLCommandString->GetValue();

    wxLaunchDefaultBrowser( command );
    wxLaunchDefaultBrowser( command );
}
}


@@ -277,6 +340,7 @@ void dialog_freeroute_exchange::OnRunFreerouteClick( wxCommandEvent& event )
void dialog_freeroute_exchange::OnGotoFreerouteWebSiteClick( wxCommandEvent& event )
void dialog_freeroute_exchange::OnGotoFreerouteWebSiteClick( wxCommandEvent& event )
{
{
    wxString command = m_FreerouteURLName->GetValue();
    wxString command = m_FreerouteURLName->GetValue();

    wxLaunchDefaultBrowser( command );
    wxLaunchDefaultBrowser( command );
}
}


@@ -290,3 +354,40 @@ void dialog_freeroute_exchange::OnCloseClick( wxCommandEvent& event )
    Close();
    Close();
}
}



/*!
 * wxEVT_CLOSE_WINDOW event handler for ID_DIALOG_FREEROUTE_EXCHANGE
 */

void dialog_freeroute_exchange::OnCloseWindow( wxCloseEvent& event )
{
    if( m_FreeRouteSetupChanged )  // Save new config
    {
        m_Parent->m_Parent->m_EDA_Config->Write( FREEROUTE_URL_KEY,
                                                m_FreerouteURLName->GetValue() );
        m_Parent->m_Parent->m_EDA_Config->Write( FREEROUTE_RUN_KEY,
                                                m_FreerouteURLCommandString->GetValue() );
    }

    event.Skip();
}


/*!
 * wxEVT_COMMAND_TEXT_UPDATED event handler for ID_TEXT_EDIT_FR_URL
 */

void dialog_freeroute_exchange::OnTextEditFrUrlUpdated( wxCommandEvent& event )
{
    m_FreeRouteSetupChanged = true;
}


/*!
 * wxEVT_COMMAND_TEXT_UPDATED event handler for ID_TEXT_EDIT_FR_CMD
 */

void dialog_freeroute_exchange::OnTextEditFrCmdUpdated( wxCommandEvent& event )
{
    m_FreeRouteSetupChanged = true;
}
+62 −32
Original line number Original line Diff line number Diff line
/////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////

// Name:        dialog_freeroute_exchange.h
// Name:        dialog_freeroute_exchange.h
// Purpose:
// Purpose:
// Author:      jean-pierre Charras
// Author:      jean-pierre Charras
@@ -39,13 +40,15 @@
#define ID_RUN_FREEROUTE                          10002
#define ID_RUN_FREEROUTE                          10002
#define ID_IMPORT_FREEROUTE_DSN_FILE              10003
#define ID_IMPORT_FREEROUTE_DSN_FILE              10003
#define ID_GOTO_FREEROUTE_WEB_SITE                10004
#define ID_GOTO_FREEROUTE_WEB_SITE                10004
#define ID_TEXTCTRL1 10005
#define ID_TEXT_EDIT_FR_URL                       10005
#define ID_TEXTCTRL 10006
#define ID_TEXT_EDIT_FR_CMD                       10006
#define SYMBOL_DIALOG_FREEROUTE_EXCHANGE_STYLE wxCAPTION|wxRESIZE_BORDER|wxSYSTEM_MENU|wxCLOSE_BOX|wxTAB_TRAVERSAL
#define SYMBOL_DIALOG_FREEROUTE_EXCHANGE_STYLE    wxCAPTION | wxRESIZE_BORDER | wxTHICK_FRAME |\
    wxSYSTEM_MENU | wxCLOSE_BOX | wxTAB_TRAVERSAL
#define SYMBOL_DIALOG_FREEROUTE_EXCHANGE_TITLE    _( "dialog_freeroute_exchange" )
#define SYMBOL_DIALOG_FREEROUTE_EXCHANGE_TITLE    _( "dialog_freeroute_exchange" )
#define SYMBOL_DIALOG_FREEROUTE_EXCHANGE_IDNAME   ID_DIALOG_FREEROUTE_EXCHANGE
#define SYMBOL_DIALOG_FREEROUTE_EXCHANGE_IDNAME   ID_DIALOG_FREEROUTE_EXCHANGE
#define SYMBOL_DIALOG_FREEROUTE_EXCHANGE_SIZE     wxSize( 400, 300 )
#define SYMBOL_DIALOG_FREEROUTE_EXCHANGE_SIZE     wxSize( 400, 300 )
#define SYMBOL_DIALOG_FREEROUTE_EXCHANGE_POSITION wxDefaultPosition
#define SYMBOL_DIALOG_FREEROUTE_EXCHANGE_POSITION wxDefaultPosition

////@end control identifiers
////@end control identifiers




@@ -59,12 +62,23 @@ class dialog_freeroute_exchange: public wxDialog
    DECLARE_EVENT_TABLE()
    DECLARE_EVENT_TABLE()


public:
public:

    /// Constructors
    /// Constructors
    dialog_freeroute_exchange();
    dialog_freeroute_exchange();
    dialog_freeroute_exchange( WinEDA_PcbFrame* parent, wxWindowID id = SYMBOL_DIALOG_FREEROUTE_EXCHANGE_IDNAME, const wxString& caption = SYMBOL_DIALOG_FREEROUTE_EXCHANGE_TITLE, const wxPoint& pos = SYMBOL_DIALOG_FREEROUTE_EXCHANGE_POSITION, const wxSize& size = SYMBOL_DIALOG_FREEROUTE_EXCHANGE_SIZE, long style = SYMBOL_DIALOG_FREEROUTE_EXCHANGE_STYLE );
    dialog_freeroute_exchange( WinEDA_PcbFrame* parent,
                               wxWindowID id = SYMBOL_DIALOG_FREEROUTE_EXCHANGE_IDNAME,
                               const wxString& caption = SYMBOL_DIALOG_FREEROUTE_EXCHANGE_TITLE,
                               const wxPoint& pos = SYMBOL_DIALOG_FREEROUTE_EXCHANGE_POSITION,
                               const wxSize& size = SYMBOL_DIALOG_FREEROUTE_EXCHANGE_SIZE,
                               long style = SYMBOL_DIALOG_FREEROUTE_EXCHANGE_STYLE );


    /// Creation
    /// Creation
    bool Create( wxWindow* parent, wxWindowID id = SYMBOL_DIALOG_FREEROUTE_EXCHANGE_IDNAME, const wxString& caption = SYMBOL_DIALOG_FREEROUTE_EXCHANGE_TITLE, const wxPoint& pos = SYMBOL_DIALOG_FREEROUTE_EXCHANGE_POSITION, const wxSize& size = SYMBOL_DIALOG_FREEROUTE_EXCHANGE_SIZE, long style = SYMBOL_DIALOG_FREEROUTE_EXCHANGE_STYLE );
    bool Create( wxWindow* parent,
                 wxWindowID id = SYMBOL_DIALOG_FREEROUTE_EXCHANGE_IDNAME,
                 const wxString& caption = SYMBOL_DIALOG_FREEROUTE_EXCHANGE_TITLE,
                 const wxPoint& pos = SYMBOL_DIALOG_FREEROUTE_EXCHANGE_POSITION,
                 const wxSize& size = SYMBOL_DIALOG_FREEROUTE_EXCHANGE_SIZE,
                 long style = SYMBOL_DIALOG_FREEROUTE_EXCHANGE_STYLE );


    /// Destructor
    /// Destructor
    ~dialog_freeroute_exchange();
    ~dialog_freeroute_exchange();
@@ -77,6 +91,9 @@ public:


////@begin dialog_freeroute_exchange event handler declarations
////@begin dialog_freeroute_exchange event handler declarations


    /// wxEVT_CLOSE_WINDOW event handler for ID_DIALOG_FREEROUTE_EXCHANGE
    void    OnCloseWindow( wxCloseEvent& event );

    /// wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_CREATE_EXPORT_DSN_FILE
    /// wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_CREATE_EXPORT_DSN_FILE
    void    OnCreateExportDsnFileClick( wxCommandEvent& event );
    void    OnCreateExportDsnFileClick( wxCommandEvent& event );


@@ -92,15 +109,25 @@ public:
    /// wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_GOTO_FREEROUTE_WEB_SITE
    /// wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_GOTO_FREEROUTE_WEB_SITE
    void    OnGotoFreerouteWebSiteClick( wxCommandEvent& event );
    void    OnGotoFreerouteWebSiteClick( wxCommandEvent& event );


    /// wxEVT_COMMAND_TEXT_UPDATED event handler for ID_TEXT_EDIT_FR_URL
    void    OnTextEditFrUrlUpdated( wxCommandEvent& event );

    /// wxEVT_COMMAND_TEXT_UPDATED event handler for ID_TEXT_EDIT_FR_CMD
    void    OnTextEditFrCmdUpdated( wxCommandEvent& event );

////@end dialog_freeroute_exchange event handler declarations
////@end dialog_freeroute_exchange event handler declarations


////@begin dialog_freeroute_exchange member function declarations
////@begin dialog_freeroute_exchange member function declarations


    bool GetFreeRouteSetupChanged() const { return m_FreeRouteSetupChanged; }
    void SetFreeRouteSetupChanged( bool value ) { m_FreeRouteSetupChanged = value; }

    /// Retrieves bitmap resources
    /// Retrieves bitmap resources
    wxBitmap    GetBitmapResource( const wxString& name );
    wxBitmap    GetBitmapResource( const wxString& name );


    /// Retrieves icon resources
    /// Retrieves icon resources
    wxIcon      GetIconResource( const wxString& name );
    wxIcon      GetIconResource( const wxString& name );

////@end dialog_freeroute_exchange member function declarations
////@end dialog_freeroute_exchange member function declarations


    /// Should we show tooltips?
    /// Should we show tooltips?
@@ -109,10 +136,13 @@ public:
////@begin dialog_freeroute_exchange member variables
////@begin dialog_freeroute_exchange member variables
    wxTextCtrl*      m_FreerouteURLName;
    wxTextCtrl*      m_FreerouteURLName;
    wxTextCtrl*      m_FreerouteURLCommandString;
    wxTextCtrl*      m_FreerouteURLCommandString;
private:
    bool             m_FreeRouteSetupChanged; // Flag set to true if Freeroute config changed
////@end dialog_freeroute_exchange member variables
////@end dialog_freeroute_exchange member variables


    WinEDA_PcbFrame* m_Parent;
    WinEDA_PcbFrame* m_Parent;
};
};


#endif
#endif

// _DIALOG_FREEROUTE_EXCHANGE_H_
// _DIALOG_FREEROUTE_EXCHANGE_H_
+11 −6
Original line number Original line Diff line number Diff line
@@ -210,6 +210,8 @@
          <string name="id-suffix">""</string>
          <string name="id-suffix">""</string>
          <long name="use-xrc">0</long>
          <long name="use-xrc">0</long>
          <long name="working-mode">0</long>
          <long name="working-mode">0</long>
          <string name="variable-0">"m_FreeRouteSetupChanged|bool|FreeRouteSetupChanged|false|2|0|Flag set to true if Freeroute config changed"</string>
          <string name="event-handler-0">"wxEVT_CLOSE_WINDOW|OnCloseWindow|NONE||"</string>
          <string name="proxy-Id name">"ID_DIALOG_FREEROUTE_EXCHANGE"</string>
          <string name="proxy-Id name">"ID_DIALOG_FREEROUTE_EXCHANGE"</string>
          <long name="proxy-Id value">10000</long>
          <long name="proxy-Id value">10000</long>
          <string name="proxy-Class">"dialog_freeroute_exchange"</string>
          <string name="proxy-Class">"dialog_freeroute_exchange"</string>
@@ -240,6 +242,7 @@
          <bool name="proxy-wxDEFAULT_DIALOG_STYLE">0</bool>
          <bool name="proxy-wxDEFAULT_DIALOG_STYLE">0</bool>
          <bool name="proxy-wxCAPTION">1</bool>
          <bool name="proxy-wxCAPTION">1</bool>
          <bool name="proxy-wxRESIZE_BORDER">1</bool>
          <bool name="proxy-wxRESIZE_BORDER">1</bool>
          <bool name="proxy-wxTHICK_FRAME">1</bool>
          <bool name="proxy-wxSYSTEM_MENU">1</bool>
          <bool name="proxy-wxSYSTEM_MENU">1</bool>
          <bool name="proxy-wxSTAY_ON_TOP">0</bool>
          <bool name="proxy-wxSTAY_ON_TOP">0</bool>
          <bool name="proxy-wxDIALOG_NO_PARENT">0</bool>
          <bool name="proxy-wxDIALOG_NO_PARENT">0</bool>
@@ -300,7 +303,7 @@
              <string name="proxy-Orientation">"Vertical"</string>
              <string name="proxy-Orientation">"Vertical"</string>
              <string name="proxy-Member variable name">""</string>
              <string name="proxy-Member variable name">""</string>
              <string name="proxy-AlignH">"Centre"</string>
              <string name="proxy-AlignH">"Centre"</string>
              <string name="proxy-AlignV">"Centre"</string>
              <string name="proxy-AlignV">"Expand"</string>
              <long name="proxy-Stretch factor">0</long>
              <long name="proxy-Stretch factor">0</long>
              <long name="proxy-Border">5</long>
              <long name="proxy-Border">5</long>
              <bool name="proxy-wxLEFT">1</bool>
              <bool name="proxy-wxLEFT">1</bool>
@@ -595,7 +598,7 @@
              <string name="proxy-Member variable name">""</string>
              <string name="proxy-Member variable name">""</string>
              <string name="proxy-AlignH">"Centre"</string>
              <string name="proxy-AlignH">"Centre"</string>
              <string name="proxy-AlignV">"Expand"</string>
              <string name="proxy-AlignV">"Expand"</string>
              <long name="proxy-Stretch factor">0</long>
              <long name="proxy-Stretch factor">1</long>
              <long name="proxy-Border">5</long>
              <long name="proxy-Border">5</long>
              <bool name="proxy-wxLEFT">1</bool>
              <bool name="proxy-wxLEFT">1</bool>
              <bool name="proxy-wxRIGHT">1</bool>
              <bool name="proxy-wxRIGHT">1</bool>
@@ -743,7 +746,7 @@
                <string name="proxy-Custom ctor arguments">""</string>
                <string name="proxy-Custom ctor arguments">""</string>
              </document>
              </document>
              <document>
              <document>
                <string name="title">"wxTextCtrl: ID_TEXTCTRL1"</string>
                <string name="title">"wxTextCtrl: ID_TEXT_EDIT_FR_URL"</string>
                <string name="type">"dialog-control-document"</string>
                <string name="type">"dialog-control-document"</string>
                <string name="filename">""</string>
                <string name="filename">""</string>
                <string name="icon-name">"textctrl"</string>
                <string name="icon-name">"textctrl"</string>
@@ -753,7 +756,8 @@
                <long name="locked">0</long>
                <long name="locked">0</long>
                <string name="created">"14/3/2008"</string>
                <string name="created">"14/3/2008"</string>
                <string name="proxy-type">"wbTextCtrlProxy"</string>
                <string name="proxy-type">"wbTextCtrlProxy"</string>
                <string name="proxy-Id name">"ID_TEXTCTRL1"</string>
                <string name="event-handler-0">"wxEVT_COMMAND_TEXT_UPDATED|OnTextEditFrUrlUpdated|NONE||dialog_freeroute_exchange"</string>
                <string name="proxy-Id name">"ID_TEXT_EDIT_FR_URL"</string>
                <long name="proxy-Id value">10005</long>
                <long name="proxy-Id value">10005</long>
                <string name="proxy-Name">""</string>
                <string name="proxy-Name">""</string>
                <string name="proxy-Class">"wxTextCtrl"</string>
                <string name="proxy-Class">"wxTextCtrl"</string>
@@ -895,7 +899,7 @@
                <string name="proxy-Custom ctor arguments">""</string>
                <string name="proxy-Custom ctor arguments">""</string>
              </document>
              </document>
              <document>
              <document>
                <string name="title">"wxTextCtrl: ID_TEXTCTRL"</string>
                <string name="title">"wxTextCtrl: ID_TEXT_EDIT_FR_CMD"</string>
                <string name="type">"dialog-control-document"</string>
                <string name="type">"dialog-control-document"</string>
                <string name="filename">""</string>
                <string name="filename">""</string>
                <string name="icon-name">"textctrl"</string>
                <string name="icon-name">"textctrl"</string>
@@ -905,7 +909,8 @@
                <long name="locked">0</long>
                <long name="locked">0</long>
                <string name="created">"14/3/2008"</string>
                <string name="created">"14/3/2008"</string>
                <string name="proxy-type">"wbTextCtrlProxy"</string>
                <string name="proxy-type">"wbTextCtrlProxy"</string>
                <string name="proxy-Id name">"ID_TEXTCTRL"</string>
                <string name="event-handler-0">"wxEVT_COMMAND_TEXT_UPDATED|OnTextEditFrCmdUpdated|NONE||dialog_freeroute_exchange"</string>
                <string name="proxy-Id name">"ID_TEXT_EDIT_FR_CMD"</string>
                <long name="proxy-Id value">10006</long>
                <long name="proxy-Id value">10006</long>
                <string name="proxy-Name">""</string>
                <string name="proxy-Name">""</string>
                <string name="proxy-Class">"wxTextCtrl"</string>
                <string name="proxy-Class">"wxTextCtrl"</string>