/////////////////////////////////////////////////////////////////////////////
// Name:        win_eda_cleaningoptionsframe.cpp
// Purpose:     
// Author:      jean-pierre Charras
// Modified by: 
// Created:     25/05/2007 13:39:29
// RCS-ID:      
// Copyright:   GNU License
// Licence:     
/////////////////////////////////////////////////////////////////////////////

// Generated by DialogBlocks (unregistered), 25/05/2007 13:39:29

#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
#pragma implementation "win_eda_cleaningoptionsframe.h"
#endif

// For compilers that support precompilation, includes "wx/wx.h".
#include "wx/wxprec.h"

#ifdef __BORLANDC__
#pragma hdrstop
#endif

#ifndef WX_PRECOMP
#include "wx/wx.h"
#endif

////@begin includes
////@end includes

#include "win_eda_cleaningoptionsframe.h"

////@begin XPM images
////@end XPM images


/*!
 * Win_EDA_CleaningOptionsFrame type definition
 */

IMPLEMENT_DYNAMIC_CLASS( Win_EDA_CleaningOptionsFrame, wxDialog )


/*!
 * Win_EDA_CleaningOptionsFrame event table definition
 */

BEGIN_EVENT_TABLE( Win_EDA_CleaningOptionsFrame, wxDialog )

////@begin Win_EDA_CleaningOptionsFrame event table entries
////@end Win_EDA_CleaningOptionsFrame event table entries

END_EVENT_TABLE()


/*!
 * Win_EDA_CleaningOptionsFrame constructors
 */

Win_EDA_CleaningOptionsFrame::Win_EDA_CleaningOptionsFrame()
{
    Init();
}

Win_EDA_CleaningOptionsFrame::Win_EDA_CleaningOptionsFrame( wxWindow* parent, wxWindowID id, const wxString& caption, const wxPoint& pos, const wxSize& size, long style )
{
    Init();
    Create(parent, id, caption, pos, size, style);
}


/*!
 * Win_EDA_CleaningOptionsFrame creator
 */

bool Win_EDA_CleaningOptionsFrame::Create( wxWindow* parent, wxWindowID id, const wxString& caption, const wxPoint& pos, const wxSize& size, long style )
{
////@begin Win_EDA_CleaningOptionsFrame creation
    SetExtraStyle(wxWS_EX_BLOCK_EVENTS);
    wxDialog::Create( parent, id, caption, pos, size, style );

    CreateControls();
    if (GetSizer())
    {
        GetSizer()->SetSizeHints(this);
    }
    Centre();
////@end Win_EDA_CleaningOptionsFrame creation
    return true;
}


/*!
 * Win_EDA_CleaningOptionsFrame destructor
 */

Win_EDA_CleaningOptionsFrame::~Win_EDA_CleaningOptionsFrame()
{
////@begin Win_EDA_CleaningOptionsFrame destruction
////@end Win_EDA_CleaningOptionsFrame destruction
}


/*!
 * Member initialisation
 */

void Win_EDA_CleaningOptionsFrame::Init()
{
////@begin Win_EDA_CleaningOptionsFrame member initialisation
    m_CleanViasOpt = NULL;
    m_MergetSegmOpt = NULL;
    m_DeleteNullSegmOpt = NULL;
    m_DeleteunconnectedOpt = NULL;
    m_ConnectToPadsOpt = NULL;
////@end Win_EDA_CleaningOptionsFrame member initialisation
}


/*!
 * Control creation for Win_EDA_CleaningOptionsFrame
 */

void Win_EDA_CleaningOptionsFrame::CreateControls()
{    
////@begin Win_EDA_CleaningOptionsFrame content construction
    // Generated by DialogBlocks, 25/05/2007 13:58:52 (unregistered)

    Win_EDA_CleaningOptionsFrame* itemDialog1 = this;

    wxBoxSizer* itemBoxSizer2 = new wxBoxSizer(wxVERTICAL);
    itemDialog1->SetSizer(itemBoxSizer2);

    wxBoxSizer* itemBoxSizer3 = new wxBoxSizer(wxHORIZONTAL);
    itemBoxSizer2->Add(itemBoxSizer3, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);

    wxStaticBox* itemStaticBoxSizer4Static = new wxStaticBox(itemDialog1, wxID_ANY, _("Static"));
    wxStaticBoxSizer* itemStaticBoxSizer4 = new wxStaticBoxSizer(itemStaticBoxSizer4Static, wxVERTICAL);
    itemBoxSizer3->Add(itemStaticBoxSizer4, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);

    m_CleanViasOpt = new wxCheckBox( itemDialog1, ID_CHECKBOX_CLEAN_VIAS, _("Delete redundant vias"), wxDefaultPosition, wxDefaultSize, 0 );
    m_CleanViasOpt->SetValue(true);
    itemStaticBoxSizer4->Add(m_CleanViasOpt, 0, wxALIGN_LEFT|wxALL, 5);

    m_MergetSegmOpt = new wxCheckBox( itemDialog1, ID_CHECKBOX_MERGE_SEGMENTS, _("Merge segments"), wxDefaultPosition, wxDefaultSize, 0 );
    m_MergetSegmOpt->SetValue(true);
    itemStaticBoxSizer4->Add(m_MergetSegmOpt, 0, wxALIGN_LEFT|wxALL, 5);

    m_DeleteNullSegmOpt = new wxCheckBox( itemDialog1, ID_CHECKBOX_DELETE_NULL_SEGM, _("Delete 0 lenght segments"), wxDefaultPosition, wxDefaultSize, 0 );
    m_DeleteNullSegmOpt->SetValue(true);
    itemStaticBoxSizer4->Add(m_DeleteNullSegmOpt, 0, wxALIGN_LEFT|wxALL, 5);

    m_DeleteunconnectedOpt = new wxCheckBox( itemDialog1, ID_CHECKBOX1, _("Delete unconnected tracks"), wxDefaultPosition, wxDefaultSize, 0 );
    m_DeleteunconnectedOpt->SetValue(true);
    itemStaticBoxSizer4->Add(m_DeleteunconnectedOpt, 0, wxALIGN_LEFT|wxALL, 5);

    m_ConnectToPadsOpt = new wxCheckBox( itemDialog1, ID_CHECKBOX, _("Connect to Pads"), wxDefaultPosition, wxDefaultSize, 0 );
    m_ConnectToPadsOpt->SetValue(false);
    itemStaticBoxSizer4->Add(m_ConnectToPadsOpt, 0, wxALIGN_LEFT|wxALL, 5);

    wxStaticBox* itemStaticBoxSizer10Static = new wxStaticBox(itemDialog1, wxID_ANY, _("Static"));
    wxStaticBoxSizer* itemStaticBoxSizer10 = new wxStaticBoxSizer(itemStaticBoxSizer10Static, wxVERTICAL);
    itemBoxSizer3->Add(itemStaticBoxSizer10, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);

    wxButton* itemButton11 = new wxButton( itemDialog1, ID_BUTTON_EXECUTE, _("Clean pcb"), wxDefaultPosition, wxDefaultSize, 0 );
    itemButton11->SetDefault();
    itemStaticBoxSizer10->Add(itemButton11, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);

    itemBoxSizer2->Add(5, 5, 0, wxGROW|wxALL, 5);

    wxStaticText* itemStaticText13 = new wxStaticText( itemDialog1, wxID_STATIC, _("Infos:"), wxDefaultPosition, wxDefaultSize, 0 );
    itemBoxSizer2->Add(itemStaticText13, 0, wxALIGN_LEFT|wxLEFT|wxRIGHT|wxTOP|wxADJUST_MINSIZE, 5);

    wxTextCtrl* itemTextCtrl14 = new wxTextCtrl( itemDialog1, ID_TEXTCTRL1, _T(""), wxDefaultPosition, wxSize(-1, 120), wxTE_MULTILINE );
    itemBoxSizer2->Add(itemTextCtrl14, 0, wxGROW|wxALL, 5);

    // Set validators
    m_CleanViasOpt->SetValidator( wxGenericValidator(& s_CleanVias) );
    m_MergetSegmOpt->SetValidator( wxGenericValidator(& s_MergeSegments) );
    m_DeleteNullSegmOpt->SetValidator( wxGenericValidator(& s_Delete0lenSegm) );
    m_DeleteunconnectedOpt->SetValidator( wxGenericValidator(& s_DeleteUnconnectedSegm) );
////@end Win_EDA_CleaningOptionsFrame content construction
}


/*!
 * Should we show tooltips?
 */

bool Win_EDA_CleaningOptionsFrame::ShowToolTips()
{
    return true;
}

/*!
 * Get bitmap resources
 */

wxBitmap Win_EDA_CleaningOptionsFrame::GetBitmapResource( const wxString& name )
{
    // Bitmap retrieval
////@begin Win_EDA_CleaningOptionsFrame bitmap retrieval
    wxUnusedVar(name);
    return wxNullBitmap;
////@end Win_EDA_CleaningOptionsFrame bitmap retrieval
}

/*!
 * Get icon resources
 */

wxIcon Win_EDA_CleaningOptionsFrame::GetIconResource( const wxString& name )
{
    // Icon retrieval
////@begin Win_EDA_CleaningOptionsFrame icon retrieval
    wxUnusedVar(name);
    return wxNullIcon;
////@end Win_EDA_CleaningOptionsFrame icon retrieval
}
