2008-11-14 22:40:31 +00:00
|
|
|
/* dialog_copper_zones.h */
|
|
|
|
|
2011-08-27 23:31:56 +00:00
|
|
|
#ifndef DIALOG_COPPER_ZONES_
|
|
|
|
#define DIALOG_COPPER_ZONES_
|
2008-11-14 22:40:31 +00:00
|
|
|
|
2011-02-19 10:13:09 +00:00
|
|
|
#include <wx/wx.h>
|
2011-02-19 11:44:19 +00:00
|
|
|
#include <wx/listctrl.h>
|
2008-11-14 22:40:31 +00:00
|
|
|
#include "dialog_copper_zones_base.h"
|
|
|
|
|
2011-08-27 23:31:56 +00:00
|
|
|
/**
|
|
|
|
* Class DIALOG_COPPER_ZONE
|
|
|
|
* is the derivated class from dialog_copper_zone_frame created by wxFormBuilder
|
2009-08-23 15:22:44 +00:00
|
|
|
*/
|
2011-03-01 22:36:38 +00:00
|
|
|
class DIALOG_COPPER_ZONE : public DIALOG_COPPER_ZONE_BASE
|
2008-11-14 22:40:31 +00:00
|
|
|
{
|
2010-02-03 17:38:32 +00:00
|
|
|
private:
|
2011-08-27 23:31:56 +00:00
|
|
|
PCB_EDIT_FRAME* m_Parent;
|
|
|
|
wxConfig* m_Config; ///< Current config
|
|
|
|
|
|
|
|
int m_OnExitCode; ///< exit code: ZONE_ABORT if no change,
|
|
|
|
///< ZONE_OK if new values accepted
|
|
|
|
///< ZONE_EXPORT_VALUES if values are exported to others zones
|
2009-08-23 15:22:44 +00:00
|
|
|
|
2010-08-23 12:13:48 +00:00
|
|
|
ZONE_SETTING* m_Zone_Setting;
|
2011-08-27 23:31:56 +00:00
|
|
|
|
|
|
|
bool m_NetSortingByPadCount; ///< false = alphabetic sort.
|
|
|
|
///< true = pad count sort.
|
|
|
|
|
2010-08-23 12:13:48 +00:00
|
|
|
long m_NetFiltering;
|
2011-08-27 23:31:56 +00:00
|
|
|
std::vector<int> m_LayerId; ///< Handle the real layer number from layer
|
|
|
|
///< name position in m_LayerSelectionCtrl
|
|
|
|
|
|
|
|
static wxString m_netNameShowFilter; ///< the filter to show nets (default * "*").
|
|
|
|
///< static to keep this pattern for an entire pcbnew session
|
|
|
|
|
2011-02-19 10:13:09 +00:00
|
|
|
wxListView* m_LayerSelectionCtrl;
|
2008-11-14 22:40:31 +00:00
|
|
|
|
2011-08-27 23:31:56 +00:00
|
|
|
static wxPoint prevPosition; ///< Dialog position & size
|
2011-02-23 22:38:01 +00:00
|
|
|
static wxSize prevSize;
|
|
|
|
|
2008-11-14 22:40:31 +00:00
|
|
|
public:
|
2011-03-01 22:36:38 +00:00
|
|
|
DIALOG_COPPER_ZONE( PCB_EDIT_FRAME* parent, ZONE_SETTING* zone_setting );
|
2010-02-03 17:38:32 +00:00
|
|
|
private:
|
2011-03-01 22:36:38 +00:00
|
|
|
|
2011-08-27 23:31:56 +00:00
|
|
|
/**
|
|
|
|
* Function initDialog
|
2011-03-01 22:36:38 +00:00
|
|
|
* fills in the dialog controls using the current settings.
|
|
|
|
*/
|
2010-08-23 12:13:48 +00:00
|
|
|
void initDialog();
|
2011-08-27 23:31:56 +00:00
|
|
|
|
2009-08-23 15:22:44 +00:00
|
|
|
void OnButtonOkClick( wxCommandEvent& event );
|
|
|
|
void OnButtonCancelClick( wxCommandEvent& event );
|
2011-02-19 10:13:09 +00:00
|
|
|
void OnClose( wxCloseEvent& event );
|
2011-02-23 22:38:01 +00:00
|
|
|
void OnSize( wxSizeEvent& event );
|
2011-02-21 19:43:59 +00:00
|
|
|
void OnCornerSmoothingModeChoice( wxCommandEvent& event );
|
2011-03-01 22:36:38 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Function AcceptOptions
|
|
|
|
* @param aPromptForErrors is true to prompt user on incorrect params.
|
|
|
|
* @param aUseExportableSetupOnly is true to use exportable parametres only (used to export this setup to other zones).
|
|
|
|
* @return bool - false if incorrect options, true if ok.
|
|
|
|
*/
|
2009-08-23 15:22:44 +00:00
|
|
|
bool AcceptOptions( bool aPromptForErrors, bool aUseExportableSetupOnly = false );
|
2011-08-27 23:31:56 +00:00
|
|
|
|
2008-11-14 22:40:31 +00:00
|
|
|
void OnNetSortingOptionSelected( wxCommandEvent& event );
|
2009-08-23 15:22:44 +00:00
|
|
|
void ExportSetupToOtherCopperZones( wxCommandEvent& event );
|
|
|
|
void OnPadsInZoneClick( wxCommandEvent& event );
|
2010-08-23 12:13:48 +00:00
|
|
|
void OnRunFiltersButtonClick( wxCommandEvent& event );
|
2011-08-27 23:31:56 +00:00
|
|
|
|
|
|
|
|
2010-08-23 12:13:48 +00:00
|
|
|
void buildAvailableListOfNets();
|
2011-03-01 22:36:38 +00:00
|
|
|
|
2011-08-27 23:31:56 +00:00
|
|
|
/**
|
|
|
|
* Function initListNetsParams
|
2011-03-01 22:36:38 +00:00
|
|
|
* initializes m_NetSortingByPadCount and m_NetFiltering values
|
|
|
|
* according to m_NetDisplayOption selection.
|
|
|
|
*/
|
2010-08-23 12:13:48 +00:00
|
|
|
void initListNetsParams();
|
2011-03-01 22:36:38 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Function makeLayerBitmap
|
|
|
|
* creates the colored rectangle bitmaps used in the layer selection widget.
|
|
|
|
* @param aColor is the color to fill the rectangle with.
|
|
|
|
*/
|
2011-02-19 10:13:09 +00:00
|
|
|
wxBitmap makeLayerBitmap( int aColor );
|
2008-11-14 22:40:31 +00:00
|
|
|
};
|
2011-08-27 23:31:56 +00:00
|
|
|
|
|
|
|
#endif // DIALOG_COPPER_ZONES_
|