Update Zone Manager for look & feel and coding stds.
This commit is contained in:
parent
d163a72d49
commit
efd3cb115b
|
@ -21,10 +21,9 @@
|
||||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include <zone_manager/dialog_zone_manager.h>
|
||||||
#include <footprint.h>
|
#include <footprint.h>
|
||||||
#include <pcb_track.h>
|
#include <pcb_track.h>
|
||||||
#include <zone.h>
|
|
||||||
#include <zones.h>
|
|
||||||
#include <tool/tool_manager.h>
|
#include <tool/tool_manager.h>
|
||||||
#include <tools/pcb_actions.h>
|
#include <tools/pcb_actions.h>
|
||||||
#include <tools/edit_tool.h>
|
#include <tools/edit_tool.h>
|
||||||
|
@ -33,10 +32,9 @@
|
||||||
#include <dialogs/dialog_swap_layers.h>
|
#include <dialogs/dialog_swap_layers.h>
|
||||||
#include <dialogs/dialog_unused_pad_layers.h>
|
#include <dialogs/dialog_unused_pad_layers.h>
|
||||||
#include <tools/global_edit_tool.h>
|
#include <tools/global_edit_tool.h>
|
||||||
#include <board_commit.h>
|
|
||||||
#include <dialogs/dialog_cleanup_graphics.h>
|
#include <dialogs/dialog_cleanup_graphics.h>
|
||||||
#include <tools/pcb_actions.h>
|
|
||||||
#include <board_design_settings.h>
|
#include <board_design_settings.h>
|
||||||
|
#include <zone_manager/zone_manager_preference.h>
|
||||||
|
|
||||||
|
|
||||||
GLOBAL_EDIT_TOOL::GLOBAL_EDIT_TOOL() :
|
GLOBAL_EDIT_TOOL::GLOBAL_EDIT_TOOL() :
|
||||||
|
@ -230,15 +228,19 @@ int GLOBAL_EDIT_TOOL::RemoveUnusedPads( const TOOL_EVENT& aEvent )
|
||||||
int GLOBAL_EDIT_TOOL::ZonesManager( const TOOL_EVENT& aEvent )
|
int GLOBAL_EDIT_TOOL::ZonesManager( const TOOL_EVENT& aEvent )
|
||||||
{
|
{
|
||||||
PCB_EDIT_FRAME* editFrame = getEditFrame<PCB_EDIT_FRAME>();
|
PCB_EDIT_FRAME* editFrame = getEditFrame<PCB_EDIT_FRAME>();
|
||||||
|
BOARD_COMMIT commit( editFrame );
|
||||||
BOARD_COMMIT commit( editFrame );
|
BOARD* board = editFrame->GetBoard();
|
||||||
BOARD* board = editFrame->GetBoard();
|
|
||||||
|
|
||||||
for( ZONE* zone : board->Zones() )
|
for( ZONE* zone : board->Zones() )
|
||||||
commit.Modify( zone );
|
commit.Modify( zone );
|
||||||
|
|
||||||
ZONE_SETTINGS zoneInfo = board->GetDesignSettings().GetDefaultZoneSettings();
|
ZONE_SETTINGS zoneInfo = board->GetDesignSettings().GetDefaultZoneSettings();
|
||||||
int dialogResult = InvokeZonesManager( editFrame, &zoneInfo );
|
DIALOG_ZONE_MANAGER dlg( editFrame, &zoneInfo );
|
||||||
|
|
||||||
|
int dialogResult = dlg.ShowQuasiModal();
|
||||||
|
|
||||||
|
if( dialogResult == wxID_OK && ZONE_MANAGER_PREFERENCE::GetRepourOnClose() )
|
||||||
|
dialogResult = ZONE_MANAGER_REPOUR;
|
||||||
|
|
||||||
if( dialogResult == wxID_CANCEL )
|
if( dialogResult == wxID_CANCEL )
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
@ -26,19 +26,18 @@
|
||||||
#include "layer_ids.h"
|
#include "layer_ids.h"
|
||||||
|
|
||||||
|
|
||||||
BOARD_EDGES_BOUNDING_ITEM::BOARD_EDGES_BOUNDING_ITEM( BOX2I box ) : m_box( std::move( box ) )
|
BOARD_EDGES_BOUNDING_ITEM::BOARD_EDGES_BOUNDING_ITEM( BOX2I box ) :
|
||||||
|
m_box( std::move( box ) )
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
BOARD_EDGES_BOUNDING_ITEM::~BOARD_EDGES_BOUNDING_ITEM()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
const BOX2I BOARD_EDGES_BOUNDING_ITEM::ViewBBox() const
|
const BOX2I BOARD_EDGES_BOUNDING_ITEM::ViewBBox() const
|
||||||
{
|
{
|
||||||
return m_box;
|
return m_box;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void BOARD_EDGES_BOUNDING_ITEM::ViewGetLayers( int aLayers[], int& aCount ) const
|
void BOARD_EDGES_BOUNDING_ITEM::ViewGetLayers( int aLayers[], int& aCount ) const
|
||||||
{
|
{
|
||||||
// Basic fallback
|
// Basic fallback
|
||||||
|
|
|
@ -30,13 +30,12 @@ class BOARD_EDGES_BOUNDING_ITEM : public KIGFX::VIEW_ITEM
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
BOARD_EDGES_BOUNDING_ITEM( BOX2I aBox );
|
BOARD_EDGES_BOUNDING_ITEM( BOX2I aBox );
|
||||||
~BOARD_EDGES_BOUNDING_ITEM() override;
|
~BOARD_EDGES_BOUNDING_ITEM() override {};
|
||||||
|
|
||||||
const BOX2I ViewBBox() const override;
|
const BOX2I ViewBBox() const override;
|
||||||
|
|
||||||
void ViewGetLayers( int aLayers[], int& aCount ) const override;
|
void ViewGetLayers( int aLayers[], int& aCount ) const override;
|
||||||
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
BOX2I m_box;
|
BOX2I m_box;
|
||||||
};
|
};
|
||||||
|
|
|
@ -28,23 +28,17 @@
|
||||||
#include <wx/debug.h>
|
#include <wx/debug.h>
|
||||||
#include <wx/event.h>
|
#include <wx/event.h>
|
||||||
#include <wx/gdicmn.h>
|
#include <wx/gdicmn.h>
|
||||||
#include <wx/radiobut.h>
|
|
||||||
#include <kiface_base.h>
|
#include <kiface_base.h>
|
||||||
#include <confirm.h>
|
|
||||||
#include <pcb_edit_frame.h>
|
#include <pcb_edit_frame.h>
|
||||||
#include <pcbnew_settings.h>
|
#include <pcbnew_settings.h>
|
||||||
#include <wx/string.h>
|
#include <wx/string.h>
|
||||||
#include <zones.h>
|
|
||||||
#include <board_commit.h>
|
#include <board_commit.h>
|
||||||
#include <widgets/unit_binder.h>
|
#include <widgets/std_bitmap_button.h>
|
||||||
#include <zone.h>
|
#include <zone.h>
|
||||||
#include <pad.h>
|
#include <pad.h>
|
||||||
#include <board.h>
|
#include <board.h>
|
||||||
#include <trigo.h>
|
|
||||||
#include <bitmaps.h>
|
#include <bitmaps.h>
|
||||||
#include <eda_pattern_match.h>
|
|
||||||
#include <string_utils.h>
|
#include <string_utils.h>
|
||||||
#include <bitmaps.h>
|
|
||||||
#include <zone_filler.h>
|
#include <zone_filler.h>
|
||||||
|
|
||||||
#include "dialog_zone_manager_base.h"
|
#include "dialog_zone_manager_base.h"
|
||||||
|
@ -61,14 +55,89 @@
|
||||||
#include "zone_manager_preference.h"
|
#include "zone_manager_preference.h"
|
||||||
|
|
||||||
|
|
||||||
inline void DIALOG_ZONE_MANAGER::FitCanvasToScreen()
|
DIALOG_ZONE_MANAGER::DIALOG_ZONE_MANAGER( PCB_BASE_FRAME* aParent, ZONE_SETTINGS* aZoneInfo ) :
|
||||||
|
DIALOG_ZONE_MANAGER_BASE( aParent ),
|
||||||
|
m_pcbFrame( aParent ),
|
||||||
|
m_zoneInfo( aZoneInfo ),
|
||||||
|
m_zonesContainer( std::make_unique<ZONES_CONTAINER>( aParent->GetBoard() ) ),
|
||||||
|
m_priorityDragIndex( {} ),
|
||||||
|
m_needZoomGAL( true ),
|
||||||
|
m_isFillingZones( false ),
|
||||||
|
m_zoneFillComplete( false )
|
||||||
|
{
|
||||||
|
#ifdef __APPLE__
|
||||||
|
m_sizerZoneOP->InsertSpacer( m_sizerZoneOP->GetItemCount(), 5 );
|
||||||
|
#endif
|
||||||
|
|
||||||
|
m_btnMoveUp->SetBitmap( KiBitmapBundle( BITMAPS::small_up ) );
|
||||||
|
m_btnMoveDown->SetBitmap( KiBitmapBundle( BITMAPS::small_down ) );
|
||||||
|
|
||||||
|
m_panelZoneProperties = new PANEL_ZONE_PROPERTIES( this, aParent, *m_zonesContainer );
|
||||||
|
m_sizerProperties->Add( m_panelZoneProperties, 1, wxTOP | wxEXPAND, 5 );
|
||||||
|
|
||||||
|
m_zoneViewer = new PANE_ZONE_VIEWER( this, aParent );
|
||||||
|
m_sizerTop->Add( m_zoneViewer, 1, wxBOTTOM | wxLEFT | wxEXPAND, 10 );
|
||||||
|
|
||||||
|
m_checkRepour->SetValue( ZONE_MANAGER_PREFERENCE::GetRepourOnClose() );
|
||||||
|
m_zoneViewer->SetId( ZONE_VIEWER );
|
||||||
|
|
||||||
|
for( const auto& [k, v] : MODEL_ZONES_OVERVIEW_TABLE::GetColumnNames() )
|
||||||
|
{
|
||||||
|
if( k == MODEL_ZONES_OVERVIEW_TABLE::LAYERS )
|
||||||
|
m_viewZonesOverview->AppendIconTextColumn( v, k );
|
||||||
|
else
|
||||||
|
m_viewZonesOverview->AppendTextColumn( v, k );
|
||||||
|
}
|
||||||
|
|
||||||
|
m_modelZoneOverviewTable = new MODEL_ZONES_OVERVIEW_TABLE( m_zonesContainer->GetZonesPriorityContainers(),
|
||||||
|
aParent->GetBoard(), aParent, this );
|
||||||
|
m_viewZonesOverview->AssociateModel( m_modelZoneOverviewTable.get() );
|
||||||
|
|
||||||
|
#if wxUSE_DRAG_AND_DROP
|
||||||
|
m_viewZonesOverview->EnableDragSource( wxDF_UNICODETEXT );
|
||||||
|
m_viewZonesOverview->EnableDropTarget( wxDF_UNICODETEXT );
|
||||||
|
|
||||||
|
Bind( wxEVT_DATAVIEW_ITEM_BEGIN_DRAG, &DIALOG_ZONE_MANAGER::OnBeginDrag, this,
|
||||||
|
VIEW_ZONE_TABLE );
|
||||||
|
Bind( wxEVT_DATAVIEW_ITEM_DROP_POSSIBLE, &DIALOG_ZONE_MANAGER::OnDropPossible, this,
|
||||||
|
VIEW_ZONE_TABLE );
|
||||||
|
Bind( wxEVT_DATAVIEW_ITEM_DROP, &DIALOG_ZONE_MANAGER::OnDrop, this, VIEW_ZONE_TABLE );
|
||||||
|
#endif // wxUSE_DRAG_AND_DROP
|
||||||
|
|
||||||
|
Bind( wxEVT_BUTTON, &DIALOG_ZONE_MANAGER::OnOk, this, wxID_OK );
|
||||||
|
Bind( EVT_ZONE_NAME_UPDATE, &DIALOG_ZONE_MANAGER::OnZoneNameUpdate, this );
|
||||||
|
Bind( EVT_ZONES_OVERVIEW_COUNT_CHANGE, &DIALOG_ZONE_MANAGER::OnZonesTableRowCountChange, this );
|
||||||
|
Bind( wxEVT_CHECKBOX, &DIALOG_ZONE_MANAGER::OnCheckBoxClicked, this );
|
||||||
|
Bind( wxEVT_IDLE, &DIALOG_ZONE_MANAGER::OnIdle, this );
|
||||||
|
Bind( wxEVT_BOOKCTRL_PAGE_CHANGED,
|
||||||
|
[this]( wxNotebookEvent& aEvent )
|
||||||
|
{
|
||||||
|
Layout();
|
||||||
|
},
|
||||||
|
ZONE_VIEWER );
|
||||||
|
|
||||||
|
if( m_modelZoneOverviewTable->GetCount() )
|
||||||
|
SelectZoneTableItem( m_modelZoneOverviewTable->GetItem( 0 ) );
|
||||||
|
|
||||||
|
Layout();
|
||||||
|
m_MainBoxSizer->Fit( this );
|
||||||
|
|
||||||
|
//NOTE - Works on Windows and MacOS , need further handling in IDLE on Ubuntu
|
||||||
|
FitCanvasToScreen();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
DIALOG_ZONE_MANAGER::~DIALOG_ZONE_MANAGER() = default;
|
||||||
|
|
||||||
|
|
||||||
|
void DIALOG_ZONE_MANAGER::FitCanvasToScreen()
|
||||||
{
|
{
|
||||||
if( PANEL_ZONE_GAL* canvas = m_zoneViewer->GetZoneGAL() )
|
if( PANEL_ZONE_GAL* canvas = m_zoneViewer->GetZoneGAL() )
|
||||||
canvas->ZoomFitScreen();
|
canvas->ZoomFitScreen();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
inline void DIALOG_ZONE_MANAGER::PostProcessZoneViewSelectionChange( wxDataViewItem const& aItem )
|
void DIALOG_ZONE_MANAGER::PostProcessZoneViewSelectionChange( wxDataViewItem const& aItem )
|
||||||
{
|
{
|
||||||
bool textCtrlHasFocus = m_filterCtrl->HasFocus();
|
bool textCtrlHasFocus = m_filterCtrl->HasFocus();
|
||||||
long filterInsertPos = m_filterCtrl->GetInsertionPoint();
|
long filterInsertPos = m_filterCtrl->GetInsertionPoint();
|
||||||
|
@ -101,14 +170,12 @@ inline void DIALOG_ZONE_MANAGER::PostProcessZoneViewSelectionChange( wxDataViewI
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
inline void DIALOG_ZONE_MANAGER::GenericProcessChar( wxKeyEvent& aEvent )
|
void DIALOG_ZONE_MANAGER::GenericProcessChar( wxKeyEvent& aEvent )
|
||||||
{
|
{
|
||||||
aEvent.Skip();
|
aEvent.Skip();
|
||||||
|
|
||||||
if( aEvent.GetKeyCode() == WXK_DOWN || aEvent.GetKeyCode() == WXK_UP )
|
if( aEvent.GetKeyCode() == WXK_DOWN || aEvent.GetKeyCode() == WXK_UP )
|
||||||
{
|
Bind( wxEVT_IDLE, &DIALOG_ZONE_MANAGER::OnIdle, this );
|
||||||
Bind( wxEVT_IDLE, &DIALOG_ZONE_MANAGER::OnIDle, this );
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -124,11 +191,11 @@ void DIALOG_ZONE_MANAGER::OnTableCharHook( wxKeyEvent& aEvent )
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void DIALOG_ZONE_MANAGER::OnIDle( wxIdleEvent& aEvent )
|
void DIALOG_ZONE_MANAGER::OnIdle( wxIdleEvent& aEvent )
|
||||||
{
|
{
|
||||||
WXUNUSED( aEvent )
|
WXUNUSED( aEvent )
|
||||||
m_viewZonesOverview->SetFocus();
|
m_viewZonesOverview->SetFocus();
|
||||||
Unbind( wxEVT_IDLE, &DIALOG_ZONE_MANAGER::OnIDle, this );
|
Unbind( wxEVT_IDLE, &DIALOG_ZONE_MANAGER::OnIdle, this );
|
||||||
|
|
||||||
if( !m_needZoomGAL )
|
if( !m_needZoomGAL )
|
||||||
return;
|
return;
|
||||||
|
@ -138,94 +205,6 @@ void DIALOG_ZONE_MANAGER::OnIDle( wxIdleEvent& aEvent )
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
DIALOG_ZONE_MANAGER::DIALOG_ZONE_MANAGER( PCB_BASE_FRAME* aParent, ZONE_SETTINGS* aZoneInfo ) :
|
|
||||||
DIALOG_ZONE_MANAGER_BASE( aParent ), m_pcbFrame( aParent ), m_zoneInfo( aZoneInfo ),
|
|
||||||
m_zonesContainer( std::make_unique<ZONES_CONTAINER>( aParent->GetBoard() ) ),
|
|
||||||
m_panelZoneProperties( new PANEL_ZONE_PROPERTIES( this, aParent, *m_zonesContainer ) ),
|
|
||||||
m_modelZoneOverviewTable(
|
|
||||||
new MODEL_ZONES_OVERVIEW_TABLE( m_zonesContainer->GetZonesPriorityContainers(),
|
|
||||||
aParent->GetBoard(), aParent, this ) ),
|
|
||||||
m_zoneViewer( new PANE_ZONE_VIEWER( this, aParent ) ), m_priorityDragIndex( {} ),
|
|
||||||
m_needZoomGAL( true ), m_isFillingZones( false ), m_zoneFillComplete( false )
|
|
||||||
{
|
|
||||||
#ifdef __APPLE__
|
|
||||||
m_sizerZoneOP->InsertSpacer( m_sizerZoneOP->GetItemCount(), 5 );
|
|
||||||
#endif
|
|
||||||
|
|
||||||
m_btnMoveUp->SetBitmap( KiBitmapBundle( BITMAPS::small_up ) );
|
|
||||||
m_btnMoveDown->SetBitmap( KiBitmapBundle( BITMAPS::small_down ) );
|
|
||||||
m_sizerProperties->Add( m_panelZoneProperties, 1, wxALL | wxEXPAND );
|
|
||||||
m_sizerTop->Add( m_zoneViewer, 1, wxBOTTOM | wxTOP | wxRIGHT | wxEXPAND, 5 );
|
|
||||||
m_checkRepour->SetValue( ZONE_MANAGER_PREFERENCE::GetRepourOnClose() );
|
|
||||||
m_zoneViewer->SetId( ZONE_VIEWER );
|
|
||||||
|
|
||||||
for( const auto& [k, v] : MODEL_ZONES_OVERVIEW_TABLE::GetColumnNames() )
|
|
||||||
{
|
|
||||||
if( k == MODEL_ZONES_OVERVIEW_TABLE::LAYERS )
|
|
||||||
m_viewZonesOverview->AppendIconTextColumn( v, k );
|
|
||||||
else
|
|
||||||
m_viewZonesOverview->AppendTextColumn( v, k );
|
|
||||||
}
|
|
||||||
|
|
||||||
m_viewZonesOverview->AssociateModel( m_modelZoneOverviewTable.get() );
|
|
||||||
|
|
||||||
#if wxUSE_DRAG_AND_DROP
|
|
||||||
|
|
||||||
m_viewZonesOverview->EnableDragSource( wxDF_UNICODETEXT );
|
|
||||||
m_viewZonesOverview->EnableDropTarget( wxDF_UNICODETEXT );
|
|
||||||
|
|
||||||
Bind( wxEVT_DATAVIEW_ITEM_BEGIN_DRAG, &DIALOG_ZONE_MANAGER::OnBeginDrag, this,
|
|
||||||
VIEW_ZONE_TABLE );
|
|
||||||
Bind( wxEVT_DATAVIEW_ITEM_DROP_POSSIBLE, &DIALOG_ZONE_MANAGER::OnDropPossible, this,
|
|
||||||
VIEW_ZONE_TABLE );
|
|
||||||
Bind( wxEVT_DATAVIEW_ITEM_DROP, &DIALOG_ZONE_MANAGER::OnDrop, this, VIEW_ZONE_TABLE );
|
|
||||||
|
|
||||||
#endif // wxUSE_DRAG_AND_DROP
|
|
||||||
|
|
||||||
Bind( wxEVT_BUTTON, &DIALOG_ZONE_MANAGER::OnOk, this, wxID_OK );
|
|
||||||
Bind( EVT_ZONE_NAME_UPDATE, &DIALOG_ZONE_MANAGER::OnZoneNameUpdate, this );
|
|
||||||
Bind( EVT_ZONES_OVERVIEW_COUNT_CHANGE, &DIALOG_ZONE_MANAGER::OnZonesTableRowCountChange, this );
|
|
||||||
Bind( wxEVT_CHECKBOX, &DIALOG_ZONE_MANAGER::OnCheckBoxClicked, this );
|
|
||||||
Bind( wxEVT_IDLE, &DIALOG_ZONE_MANAGER::OnIDle, this );
|
|
||||||
Bind( wxEVT_BUTTON, &DIALOG_ZONE_MANAGER::OnMoveUpClick, this, BTN_MOVE_UP );
|
|
||||||
Bind( wxEVT_BUTTON, &DIALOG_ZONE_MANAGER::OnMoveDownClick, this, BTN_MOVE_DOWN );
|
|
||||||
Bind(
|
|
||||||
wxEVT_BOOKCTRL_PAGE_CHANGED,
|
|
||||||
[this]( wxNotebookEvent& aEvent )
|
|
||||||
{
|
|
||||||
Layout();
|
|
||||||
},
|
|
||||||
ZONE_VIEWER );
|
|
||||||
|
|
||||||
bool foundZone = m_modelZoneOverviewTable->GetCount();
|
|
||||||
|
|
||||||
if( foundZone )
|
|
||||||
SelectZoneTableItem( m_modelZoneOverviewTable->GetItem( 0 ) );
|
|
||||||
|
|
||||||
Layout();
|
|
||||||
m_MainBoxSizer->Fit( this );
|
|
||||||
|
|
||||||
//NOTE - Works on Windows and MacOS , need further handling in IDLE on Ubuntu
|
|
||||||
FitCanvasToScreen();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
DIALOG_ZONE_MANAGER::~DIALOG_ZONE_MANAGER() = default;
|
|
||||||
|
|
||||||
|
|
||||||
int InvokeZonesManager( PCB_BASE_FRAME* aCaller, ZONE_SETTINGS* aZoneInfo )
|
|
||||||
{
|
|
||||||
DIALOG_ZONE_MANAGER dlg( aCaller, aZoneInfo );
|
|
||||||
|
|
||||||
const int res = dlg.ShowQuasiModal();
|
|
||||||
|
|
||||||
if( res == wxID_OK && ZONE_MANAGER_PREFERENCE::GetRepourOnClose() )
|
|
||||||
return ZONE_MANAGER_REPOUR;
|
|
||||||
|
|
||||||
return res;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void DIALOG_ZONE_MANAGER::onDialogResize( wxSizeEvent& event )
|
void DIALOG_ZONE_MANAGER::onDialogResize( wxSizeEvent& event )
|
||||||
{
|
{
|
||||||
event.Skip();
|
event.Skip();
|
||||||
|
@ -247,7 +226,7 @@ void DIALOG_ZONE_MANAGER::OnZoneSelectionChanged( ZONE* zone )
|
||||||
|
|
||||||
void DIALOG_ZONE_MANAGER::OnViewZonesOverviewOnLeftUp( wxMouseEvent& aEvent )
|
void DIALOG_ZONE_MANAGER::OnViewZonesOverviewOnLeftUp( wxMouseEvent& aEvent )
|
||||||
{
|
{
|
||||||
Bind( wxEVT_IDLE, &DIALOG_ZONE_MANAGER::OnIDle, this );
|
Bind( wxEVT_IDLE, &DIALOG_ZONE_MANAGER::OnIdle, this );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -286,6 +265,12 @@ void DIALOG_ZONE_MANAGER::OnOk( wxCommandEvent& aEvt )
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void DIALOG_ZONE_MANAGER::OnRepourCheck( wxCommandEvent& aEvent )
|
||||||
|
{
|
||||||
|
ZONE_MANAGER_PREFERENCE::SetRefillOnClose( m_checkRepour->IsChecked() );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
#if wxUSE_DRAG_AND_DROP
|
#if wxUSE_DRAG_AND_DROP
|
||||||
|
|
||||||
void DIALOG_ZONE_MANAGER::OnBeginDrag( wxDataViewEvent& aEvent )
|
void DIALOG_ZONE_MANAGER::OnBeginDrag( wxDataViewEvent& aEvent )
|
||||||
|
@ -307,12 +292,6 @@ void DIALOG_ZONE_MANAGER::OnDropPossible( wxDataViewEvent& aEvent )
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void DIALOG_ZONE_MANAGER::OnRepourCheck( wxCommandEvent& aEvent )
|
|
||||||
{
|
|
||||||
ZONE_MANAGER_PREFERENCE::SetRepourOnClose( m_checkRepour->IsChecked() );
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void DIALOG_ZONE_MANAGER::OnDrop( wxDataViewEvent& aEvent )
|
void DIALOG_ZONE_MANAGER::OnDrop( wxDataViewEvent& aEvent )
|
||||||
{
|
{
|
||||||
if( aEvent.GetDataFormat() != wxDF_UNICODETEXT )
|
if( aEvent.GetDataFormat() != wxDF_UNICODETEXT )
|
||||||
|
@ -349,14 +328,12 @@ void DIALOG_ZONE_MANAGER::OnDrop( wxDataViewEvent& aEvent )
|
||||||
|
|
||||||
void DIALOG_ZONE_MANAGER::OnMoveUpClick( wxCommandEvent& aEvent )
|
void DIALOG_ZONE_MANAGER::OnMoveUpClick( wxCommandEvent& aEvent )
|
||||||
{
|
{
|
||||||
WXUNUSED( aEvent );
|
|
||||||
MoveSelectedZonePriority( ZONE_INDEX_MOVEMENT::MOVE_UP );
|
MoveSelectedZonePriority( ZONE_INDEX_MOVEMENT::MOVE_UP );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void DIALOG_ZONE_MANAGER::OnMoveDownClick( wxCommandEvent& aEvent )
|
void DIALOG_ZONE_MANAGER::OnMoveDownClick( wxCommandEvent& aEvent )
|
||||||
{
|
{
|
||||||
WXUNUSED( aEvent );
|
|
||||||
MoveSelectedZonePriority( ZONE_INDEX_MOVEMENT::MOVE_DOWN );
|
MoveSelectedZonePriority( ZONE_INDEX_MOVEMENT::MOVE_DOWN );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -422,7 +399,7 @@ void DIALOG_ZONE_MANAGER::OnButtonApplyClick( wxCommandEvent& aEvent )
|
||||||
board->BuildConnectivity();
|
board->BuildConnectivity();
|
||||||
const_cast<ZONES&>( board->Zones() ) = m_zonesContainer->GetOriginalZoneList();
|
const_cast<ZONES&>( board->Zones() ) = m_zonesContainer->GetOriginalZoneList();
|
||||||
|
|
||||||
if( auto gal = m_zoneViewer->GetZoneGAL() )
|
if( PANEL_ZONE_GAL* gal = m_zoneViewer->GetZoneGAL() )
|
||||||
{
|
{
|
||||||
gal->RedrawRatsnest();
|
gal->RedrawRatsnest();
|
||||||
gal->GetView()->UpdateItems();
|
gal->GetView()->UpdateItems();
|
||||||
|
|
|
@ -55,6 +55,7 @@ class ZONE_FILLER;
|
||||||
class COMMIT;
|
class COMMIT;
|
||||||
class PANEL_ZONE_GAL;
|
class PANEL_ZONE_GAL;
|
||||||
enum class ZONE_INDEX_MOVEMENT;
|
enum class ZONE_INDEX_MOVEMENT;
|
||||||
|
|
||||||
class DIALOG_ZONE_MANAGER : public DIALOG_ZONE_MANAGER_BASE
|
class DIALOG_ZONE_MANAGER : public DIALOG_ZONE_MANAGER_BASE
|
||||||
{
|
{
|
||||||
enum
|
enum
|
||||||
|
@ -76,58 +77,41 @@ protected:
|
||||||
void OnViewZonesOverviewOnLeftUp( wxMouseEvent& aEvent ) override;
|
void OnViewZonesOverviewOnLeftUp( wxMouseEvent& aEvent ) override;
|
||||||
void onDialogResize( wxSizeEvent& event ) override;
|
void onDialogResize( wxSizeEvent& event ) override;
|
||||||
|
|
||||||
|
|
||||||
void OnOk( wxCommandEvent& aEvt );
|
void OnOk( wxCommandEvent& aEvt );
|
||||||
|
|
||||||
|
|
||||||
#if wxUSE_DRAG_AND_DROP
|
#if wxUSE_DRAG_AND_DROP
|
||||||
|
|
||||||
void OnBeginDrag( wxDataViewEvent& aEvent );
|
void OnBeginDrag( wxDataViewEvent& aEvent );
|
||||||
|
|
||||||
void OnDropPossible( wxDataViewEvent& aEvent );
|
void OnDropPossible( wxDataViewEvent& aEvent );
|
||||||
|
|
||||||
void OnDrop( wxDataViewEvent& aEvent );
|
void OnDrop( wxDataViewEvent& aEvent );
|
||||||
|
|
||||||
#endif // wxUSE_DRAG_AND_DROP
|
#endif // wxUSE_DRAG_AND_DROP
|
||||||
|
|
||||||
void OnZoneNameUpdate( wxCommandEvent& aEvent );
|
void OnZoneNameUpdate( wxCommandEvent& aEvent );
|
||||||
|
|
||||||
void OnZonesTableRowCountChange( wxCommandEvent& aEvent );
|
void OnZonesTableRowCountChange( wxCommandEvent& aEvent );
|
||||||
|
|
||||||
void OnCheckBoxClicked( wxCommandEvent& aEvent );
|
void OnCheckBoxClicked( wxCommandEvent& aEvent );
|
||||||
|
|
||||||
void MoveSelectedZonePriority( ZONE_INDEX_MOVEMENT aMove );
|
void MoveSelectedZonePriority( ZONE_INDEX_MOVEMENT aMove );
|
||||||
|
|
||||||
void OnMoveUpClick( wxCommandEvent& aEvent );
|
void OnMoveUpClick( wxCommandEvent& aEvent ) override;
|
||||||
|
void OnMoveDownClick( wxCommandEvent& aEvent ) override;
|
||||||
void OnMoveDownClick( wxCommandEvent& aEvent );
|
|
||||||
|
|
||||||
void OnFilterCtrlCancel( wxCommandEvent& aEvent ) override;
|
void OnFilterCtrlCancel( wxCommandEvent& aEvent ) override;
|
||||||
|
|
||||||
void OnFilterCtrlSearch( wxCommandEvent& aEvent ) override;
|
void OnFilterCtrlSearch( wxCommandEvent& aEvent ) override;
|
||||||
|
|
||||||
void OnFilterCtrlTextChange( wxCommandEvent& aEvent ) override;
|
void OnFilterCtrlTextChange( wxCommandEvent& aEvent ) override;
|
||||||
|
|
||||||
void OnFilterCtrlEnter( wxCommandEvent& aEvent ) override;
|
void OnFilterCtrlEnter( wxCommandEvent& aEvent ) override;
|
||||||
|
|
||||||
void OnRepourCheck( wxCommandEvent& aEvent ) override;
|
void OnRepourCheck( wxCommandEvent& aEvent ) override;
|
||||||
|
|
||||||
void OnButtonApplyClick( wxCommandEvent& aEvent ) override;
|
void OnButtonApplyClick( wxCommandEvent& aEvent ) override;
|
||||||
|
|
||||||
void PostProcessZoneViewSelectionChange( wxDataViewItem const& item );
|
void PostProcessZoneViewSelectionChange( wxDataViewItem const& item );
|
||||||
|
|
||||||
void OnTableChar( wxKeyEvent& event ) override;
|
void OnTableChar( wxKeyEvent& event ) override;
|
||||||
|
|
||||||
void OnTableCharHook( wxKeyEvent& event ) override;
|
void OnTableCharHook( wxKeyEvent& event ) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void GenericProcessChar( wxKeyEvent& event );
|
void GenericProcessChar( wxKeyEvent& event );
|
||||||
|
|
||||||
void OnIDle( wxIdleEvent& aEvent );
|
void OnIdle( wxIdleEvent& aEvent );
|
||||||
|
|
||||||
void FitCanvasToScreen();
|
void FitCanvasToScreen();
|
||||||
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
PCB_BASE_FRAME* m_pcbFrame;
|
PCB_BASE_FRAME* m_pcbFrame;
|
||||||
ZONE_SETTINGS* m_zoneInfo;
|
ZONE_SETTINGS* m_zoneInfo;
|
||||||
|
|
|
@ -1,10 +1,12 @@
|
||||||
///////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////
|
||||||
// C++ code generated with wxFormBuilder (version 4.0.0-0-g0efcecf02)
|
// C++ code generated with wxFormBuilder (version 4.0.0-0-g0efcecf)
|
||||||
// http://www.wxformbuilder.org/
|
// http://www.wxformbuilder.org/
|
||||||
//
|
//
|
||||||
// PLEASE DO *NOT* EDIT THIS FILE!
|
// PLEASE DO *NOT* EDIT THIS FILE!
|
||||||
///////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
#include "widgets/std_bitmap_button.h"
|
||||||
|
|
||||||
#include "dialog_zone_manager_base.h"
|
#include "dialog_zone_manager_base.h"
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////
|
||||||
|
@ -15,74 +17,73 @@ DIALOG_ZONE_MANAGER_BASE::DIALOG_ZONE_MANAGER_BASE( wxWindow* parent, wxWindowID
|
||||||
|
|
||||||
m_MainBoxSizer = new wxBoxSizer( wxVERTICAL );
|
m_MainBoxSizer = new wxBoxSizer( wxVERTICAL );
|
||||||
|
|
||||||
wxBoxSizer* bSizer12;
|
|
||||||
bSizer12 = new wxBoxSizer( wxVERTICAL );
|
|
||||||
|
|
||||||
m_sizerTop = new wxBoxSizer( wxHORIZONTAL );
|
m_sizerTop = new wxBoxSizer( wxHORIZONTAL );
|
||||||
|
|
||||||
wxBoxSizer* bSizer7;
|
wxBoxSizer* leftColumn;
|
||||||
bSizer7 = new wxBoxSizer( wxVERTICAL );
|
leftColumn = new wxBoxSizer( wxVERTICAL );
|
||||||
|
|
||||||
m_viewZonesOverview = new wxDataViewCtrl( this, VIEW_ZONE_TABLE, wxDefaultPosition, wxSize( -1,240 ), wxDV_HORIZ_RULES|wxDV_ROW_LINES|wxDV_SINGLE|wxDV_VERT_RULES );
|
wxBoxSizer* searchSizer;
|
||||||
m_viewZonesOverview->SetMinSize( wxSize( -1,240 ) );
|
searchSizer = new wxBoxSizer( wxHORIZONTAL );
|
||||||
|
|
||||||
bSizer7->Add( m_viewZonesOverview, 1, wxALL|wxEXPAND, 0 );
|
|
||||||
|
|
||||||
m_sizerZoneOP = new wxBoxSizer( wxHORIZONTAL );
|
|
||||||
|
|
||||||
m_btnMoveUp = new STD_BITMAP_BUTTON( this, BTN_MOVE_UP, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
|
|
||||||
m_btnMoveUp->SetToolTip( _("Top zone has the highest priority. When a zone is inside another zone, if its priority is higher, its outlines are removed from the other zone.") );
|
|
||||||
|
|
||||||
m_sizerZoneOP->Add( m_btnMoveUp, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
|
|
||||||
|
|
||||||
m_btnMoveDown = new STD_BITMAP_BUTTON( this, BTN_MOVE_DOWN, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
|
|
||||||
m_btnMoveDown->SetToolTip( _("Top zone has the highest priority. When a zone is inside another zone, if its priority is higher, its outlines are removed from the other zone.") );
|
|
||||||
|
|
||||||
m_sizerZoneOP->Add( m_btnMoveDown, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
|
|
||||||
|
|
||||||
|
|
||||||
m_sizerZoneOP->Add( 0, 0, 0, wxEXPAND, 5 );
|
|
||||||
|
|
||||||
m_checkName = new wxCheckBox( this, CHECK_NAME, _("Name"), wxDefaultPosition, wxDefaultSize, 0 );
|
|
||||||
m_checkName->SetValue(true);
|
|
||||||
m_sizerZoneOP->Add( m_checkName, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
|
|
||||||
|
|
||||||
m_checkNet = new wxCheckBox( this, CHECK_NET, _("Net"), wxDefaultPosition, wxDefaultSize, 0 );
|
|
||||||
m_checkNet->SetValue(true);
|
|
||||||
m_sizerZoneOP->Add( m_checkNet, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
|
|
||||||
|
|
||||||
m_filterCtrl = new wxSearchCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_PROCESS_ENTER );
|
m_filterCtrl = new wxSearchCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_PROCESS_ENTER );
|
||||||
#ifndef __WXMAC__
|
#ifndef __WXMAC__
|
||||||
m_filterCtrl->ShowSearchButton( true );
|
m_filterCtrl->ShowSearchButton( true );
|
||||||
#endif
|
#endif
|
||||||
m_filterCtrl->ShowCancelButton( true );
|
m_filterCtrl->ShowCancelButton( true );
|
||||||
m_sizerZoneOP->Add( m_filterCtrl, 1, wxEXPAND, 5 );
|
searchSizer->Add( m_filterCtrl, 1, wxEXPAND|wxBOTTOM, 1 );
|
||||||
|
|
||||||
|
|
||||||
bSizer7->Add( m_sizerZoneOP, 0, wxEXPAND|wxLEFT|wxTOP, 5 );
|
searchSizer->Add( 10, 0, 0, wxEXPAND, 5 );
|
||||||
|
|
||||||
|
m_checkName = new wxCheckBox( this, CHECK_NAME, _("Name"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
|
m_checkName->SetValue(true);
|
||||||
|
searchSizer->Add( m_checkName, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
|
||||||
|
|
||||||
|
m_checkNet = new wxCheckBox( this, CHECK_NET, _("Net"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
|
m_checkNet->SetValue(true);
|
||||||
|
searchSizer->Add( m_checkNet, 0, wxALIGN_CENTER_VERTICAL, 5 );
|
||||||
|
|
||||||
|
|
||||||
m_sizerTop->Add( bSizer7, 1, wxALL|wxEXPAND, 5 );
|
leftColumn->Add( searchSizer, 0, wxEXPAND|wxTOP|wxBOTTOM, 3 );
|
||||||
|
|
||||||
|
m_viewZonesOverview = new wxDataViewCtrl( this, VIEW_ZONE_TABLE, wxDefaultPosition, wxSize( -1,240 ), wxDV_HORIZ_RULES|wxDV_SINGLE|wxDV_VERT_RULES );
|
||||||
|
m_viewZonesOverview->SetMinSize( wxSize( -1,240 ) );
|
||||||
|
|
||||||
|
leftColumn->Add( m_viewZonesOverview, 1, wxEXPAND, 0 );
|
||||||
|
|
||||||
|
m_sizerZoneOP = new wxBoxSizer( wxHORIZONTAL );
|
||||||
|
|
||||||
|
m_btnMoveUp = new STD_BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
|
||||||
|
m_btnMoveUp->SetToolTip( _("Top zone has the highest priority. When a zone is inside another zone, if its priority is higher, its outlines are removed from the other zone.") );
|
||||||
|
|
||||||
|
m_sizerZoneOP->Add( m_btnMoveUp, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
|
||||||
|
|
||||||
|
m_btnMoveDown = new STD_BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
|
||||||
|
m_btnMoveDown->SetToolTip( _("Top zone has the highest priority. When a zone is inside another zone, if its priority is higher, its outlines are removed from the other zone.") );
|
||||||
|
|
||||||
|
m_sizerZoneOP->Add( m_btnMoveDown, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
|
||||||
|
|
||||||
|
|
||||||
bSizer12->Add( m_sizerTop, 1, wxEXPAND, 5 );
|
leftColumn->Add( m_sizerZoneOP, 0, wxEXPAND|wxTOP, 5 );
|
||||||
|
|
||||||
m_sizerProperties = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Properties") ), wxVERTICAL );
|
|
||||||
|
|
||||||
|
|
||||||
bSizer12->Add( m_sizerProperties, 0, wxALL|wxEXPAND, 5 );
|
m_sizerTop->Add( leftColumn, 1, wxEXPAND|wxTOP|wxRIGHT, 5 );
|
||||||
|
|
||||||
|
|
||||||
m_MainBoxSizer->Add( bSizer12, 1, wxEXPAND, 0 );
|
m_MainBoxSizer->Add( m_sizerTop, 1, wxEXPAND|wxRIGHT|wxLEFT, 10 );
|
||||||
|
|
||||||
wxBoxSizer* bSizer61;
|
m_sizerProperties = new wxBoxSizer( wxVERTICAL );
|
||||||
bSizer61 = new wxBoxSizer( wxHORIZONTAL );
|
|
||||||
|
|
||||||
m_checkRepour = new wxCheckBox( this, wxID_ANY, _("Repour"), wxDefaultPosition, wxDefaultSize, 0 );
|
|
||||||
bSizer61->Add( m_checkRepour, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 10 );
|
|
||||||
|
|
||||||
|
|
||||||
bSizer61->Add( 0, 0, 1, wxEXPAND, 5 );
|
m_MainBoxSizer->Add( m_sizerProperties, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
|
||||||
|
|
||||||
|
m_sizerBottom = new wxBoxSizer( wxHORIZONTAL );
|
||||||
|
|
||||||
|
m_checkRepour = new wxCheckBox( this, wxID_ANY, _("Refill zones"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
|
m_sizerBottom->Add( m_checkRepour, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 10 );
|
||||||
|
|
||||||
|
|
||||||
|
m_sizerBottom->Add( 25, 0, 1, wxEXPAND, 5 );
|
||||||
|
|
||||||
m_sdbSizer = new wxStdDialogButtonSizer();
|
m_sdbSizer = new wxStdDialogButtonSizer();
|
||||||
m_sdbSizerOK = new wxButton( this, wxID_OK );
|
m_sdbSizerOK = new wxButton( this, wxID_OK );
|
||||||
|
@ -93,10 +94,10 @@ DIALOG_ZONE_MANAGER_BASE::DIALOG_ZONE_MANAGER_BASE( wxWindow* parent, wxWindowID
|
||||||
m_sdbSizer->AddButton( m_sdbSizerCancel );
|
m_sdbSizer->AddButton( m_sdbSizerCancel );
|
||||||
m_sdbSizer->Realize();
|
m_sdbSizer->Realize();
|
||||||
|
|
||||||
bSizer61->Add( m_sdbSizer, 0, wxALL|wxEXPAND, 5 );
|
m_sizerBottom->Add( m_sdbSizer, 0, wxALL|wxEXPAND, 5 );
|
||||||
|
|
||||||
|
|
||||||
m_MainBoxSizer->Add( bSizer61, 0, wxEXPAND, 5 );
|
m_MainBoxSizer->Add( m_sizerBottom, 0, wxEXPAND, 5 );
|
||||||
|
|
||||||
|
|
||||||
this->SetSizer( m_MainBoxSizer );
|
this->SetSizer( m_MainBoxSizer );
|
||||||
|
@ -105,14 +106,16 @@ DIALOG_ZONE_MANAGER_BASE::DIALOG_ZONE_MANAGER_BASE( wxWindow* parent, wxWindowID
|
||||||
|
|
||||||
// Connect Events
|
// Connect Events
|
||||||
this->Connect( wxEVT_SIZE, wxSizeEventHandler( DIALOG_ZONE_MANAGER_BASE::onDialogResize ) );
|
this->Connect( wxEVT_SIZE, wxSizeEventHandler( DIALOG_ZONE_MANAGER_BASE::onDialogResize ) );
|
||||||
m_viewZonesOverview->Connect( wxEVT_CHAR, wxKeyEventHandler( DIALOG_ZONE_MANAGER_BASE::OnTableChar ), NULL, this );
|
|
||||||
m_viewZonesOverview->Connect( wxEVT_CHAR_HOOK, wxKeyEventHandler( DIALOG_ZONE_MANAGER_BASE::OnTableCharHook ), NULL, this );
|
|
||||||
m_viewZonesOverview->Connect( wxEVT_COMMAND_DATAVIEW_SELECTION_CHANGED, wxDataViewEventHandler( DIALOG_ZONE_MANAGER_BASE::OnDataViewCtrlSelectionChanged ), NULL, this );
|
|
||||||
m_viewZonesOverview->Connect( wxEVT_LEFT_UP, wxMouseEventHandler( DIALOG_ZONE_MANAGER_BASE::OnViewZonesOverviewOnLeftUp ), NULL, this );
|
|
||||||
m_filterCtrl->Connect( wxEVT_COMMAND_SEARCHCTRL_CANCEL_BTN, wxCommandEventHandler( DIALOG_ZONE_MANAGER_BASE::OnFilterCtrlCancel ), NULL, this );
|
m_filterCtrl->Connect( wxEVT_COMMAND_SEARCHCTRL_CANCEL_BTN, wxCommandEventHandler( DIALOG_ZONE_MANAGER_BASE::OnFilterCtrlCancel ), NULL, this );
|
||||||
m_filterCtrl->Connect( wxEVT_COMMAND_SEARCHCTRL_SEARCH_BTN, wxCommandEventHandler( DIALOG_ZONE_MANAGER_BASE::OnFilterCtrlSearch ), NULL, this );
|
m_filterCtrl->Connect( wxEVT_COMMAND_SEARCHCTRL_SEARCH_BTN, wxCommandEventHandler( DIALOG_ZONE_MANAGER_BASE::OnFilterCtrlSearch ), NULL, this );
|
||||||
m_filterCtrl->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_ZONE_MANAGER_BASE::OnFilterCtrlTextChange ), NULL, this );
|
m_filterCtrl->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_ZONE_MANAGER_BASE::OnFilterCtrlTextChange ), NULL, this );
|
||||||
m_filterCtrl->Connect( wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler( DIALOG_ZONE_MANAGER_BASE::OnFilterCtrlEnter ), NULL, this );
|
m_filterCtrl->Connect( wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler( DIALOG_ZONE_MANAGER_BASE::OnFilterCtrlEnter ), NULL, this );
|
||||||
|
m_viewZonesOverview->Connect( wxEVT_CHAR, wxKeyEventHandler( DIALOG_ZONE_MANAGER_BASE::OnTableChar ), NULL, this );
|
||||||
|
m_viewZonesOverview->Connect( wxEVT_CHAR_HOOK, wxKeyEventHandler( DIALOG_ZONE_MANAGER_BASE::OnTableCharHook ), NULL, this );
|
||||||
|
m_viewZonesOverview->Connect( wxEVT_COMMAND_DATAVIEW_SELECTION_CHANGED, wxDataViewEventHandler( DIALOG_ZONE_MANAGER_BASE::OnDataViewCtrlSelectionChanged ), NULL, this );
|
||||||
|
m_viewZonesOverview->Connect( wxEVT_LEFT_UP, wxMouseEventHandler( DIALOG_ZONE_MANAGER_BASE::OnViewZonesOverviewOnLeftUp ), NULL, this );
|
||||||
|
m_btnMoveUp->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_ZONE_MANAGER_BASE::OnMoveUpClick ), NULL, this );
|
||||||
|
m_btnMoveDown->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_ZONE_MANAGER_BASE::OnMoveDownClick ), NULL, this );
|
||||||
m_checkRepour->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_ZONE_MANAGER_BASE::OnRepourCheck ), NULL, this );
|
m_checkRepour->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_ZONE_MANAGER_BASE::OnRepourCheck ), NULL, this );
|
||||||
m_sdbSizerApply->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_ZONE_MANAGER_BASE::OnButtonApplyClick ), NULL, this );
|
m_sdbSizerApply->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_ZONE_MANAGER_BASE::OnButtonApplyClick ), NULL, this );
|
||||||
}
|
}
|
||||||
|
@ -121,14 +124,16 @@ DIALOG_ZONE_MANAGER_BASE::~DIALOG_ZONE_MANAGER_BASE()
|
||||||
{
|
{
|
||||||
// Disconnect Events
|
// Disconnect Events
|
||||||
this->Disconnect( wxEVT_SIZE, wxSizeEventHandler( DIALOG_ZONE_MANAGER_BASE::onDialogResize ) );
|
this->Disconnect( wxEVT_SIZE, wxSizeEventHandler( DIALOG_ZONE_MANAGER_BASE::onDialogResize ) );
|
||||||
m_viewZonesOverview->Disconnect( wxEVT_CHAR, wxKeyEventHandler( DIALOG_ZONE_MANAGER_BASE::OnTableChar ), NULL, this );
|
|
||||||
m_viewZonesOverview->Disconnect( wxEVT_CHAR_HOOK, wxKeyEventHandler( DIALOG_ZONE_MANAGER_BASE::OnTableCharHook ), NULL, this );
|
|
||||||
m_viewZonesOverview->Disconnect( wxEVT_COMMAND_DATAVIEW_SELECTION_CHANGED, wxDataViewEventHandler( DIALOG_ZONE_MANAGER_BASE::OnDataViewCtrlSelectionChanged ), NULL, this );
|
|
||||||
m_viewZonesOverview->Disconnect( wxEVT_LEFT_UP, wxMouseEventHandler( DIALOG_ZONE_MANAGER_BASE::OnViewZonesOverviewOnLeftUp ), NULL, this );
|
|
||||||
m_filterCtrl->Disconnect( wxEVT_COMMAND_SEARCHCTRL_CANCEL_BTN, wxCommandEventHandler( DIALOG_ZONE_MANAGER_BASE::OnFilterCtrlCancel ), NULL, this );
|
m_filterCtrl->Disconnect( wxEVT_COMMAND_SEARCHCTRL_CANCEL_BTN, wxCommandEventHandler( DIALOG_ZONE_MANAGER_BASE::OnFilterCtrlCancel ), NULL, this );
|
||||||
m_filterCtrl->Disconnect( wxEVT_COMMAND_SEARCHCTRL_SEARCH_BTN, wxCommandEventHandler( DIALOG_ZONE_MANAGER_BASE::OnFilterCtrlSearch ), NULL, this );
|
m_filterCtrl->Disconnect( wxEVT_COMMAND_SEARCHCTRL_SEARCH_BTN, wxCommandEventHandler( DIALOG_ZONE_MANAGER_BASE::OnFilterCtrlSearch ), NULL, this );
|
||||||
m_filterCtrl->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_ZONE_MANAGER_BASE::OnFilterCtrlTextChange ), NULL, this );
|
m_filterCtrl->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_ZONE_MANAGER_BASE::OnFilterCtrlTextChange ), NULL, this );
|
||||||
m_filterCtrl->Disconnect( wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler( DIALOG_ZONE_MANAGER_BASE::OnFilterCtrlEnter ), NULL, this );
|
m_filterCtrl->Disconnect( wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler( DIALOG_ZONE_MANAGER_BASE::OnFilterCtrlEnter ), NULL, this );
|
||||||
|
m_viewZonesOverview->Disconnect( wxEVT_CHAR, wxKeyEventHandler( DIALOG_ZONE_MANAGER_BASE::OnTableChar ), NULL, this );
|
||||||
|
m_viewZonesOverview->Disconnect( wxEVT_CHAR_HOOK, wxKeyEventHandler( DIALOG_ZONE_MANAGER_BASE::OnTableCharHook ), NULL, this );
|
||||||
|
m_viewZonesOverview->Disconnect( wxEVT_COMMAND_DATAVIEW_SELECTION_CHANGED, wxDataViewEventHandler( DIALOG_ZONE_MANAGER_BASE::OnDataViewCtrlSelectionChanged ), NULL, this );
|
||||||
|
m_viewZonesOverview->Disconnect( wxEVT_LEFT_UP, wxMouseEventHandler( DIALOG_ZONE_MANAGER_BASE::OnViewZonesOverviewOnLeftUp ), NULL, this );
|
||||||
|
m_btnMoveUp->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_ZONE_MANAGER_BASE::OnMoveUpClick ), NULL, this );
|
||||||
|
m_btnMoveDown->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_ZONE_MANAGER_BASE::OnMoveDownClick ), NULL, this );
|
||||||
m_checkRepour->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_ZONE_MANAGER_BASE::OnRepourCheck ), NULL, this );
|
m_checkRepour->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_ZONE_MANAGER_BASE::OnRepourCheck ), NULL, this );
|
||||||
m_sdbSizerApply->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_ZONE_MANAGER_BASE::OnButtonApplyClick ), NULL, this );
|
m_sdbSizerApply->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_ZONE_MANAGER_BASE::OnButtonApplyClick ), NULL, this );
|
||||||
|
|
||||||
|
|
|
@ -64,429 +64,450 @@
|
||||||
<property name="orient">wxVERTICAL</property>
|
<property name="orient">wxVERTICAL</property>
|
||||||
<property name="permission">protected</property>
|
<property name="permission">protected</property>
|
||||||
<object class="sizeritem" expanded="true">
|
<object class="sizeritem" expanded="true">
|
||||||
<property name="border">0</property>
|
<property name="border">10</property>
|
||||||
<property name="flag">wxEXPAND</property>
|
<property name="flag">wxEXPAND|wxRIGHT|wxLEFT</property>
|
||||||
<property name="proportion">1</property>
|
<property name="proportion">1</property>
|
||||||
<object class="wxBoxSizer" expanded="true">
|
<object class="wxBoxSizer" expanded="true">
|
||||||
<property name="minimum_size"></property>
|
<property name="minimum_size"></property>
|
||||||
<property name="name">bSizer12</property>
|
<property name="name">m_sizerTop</property>
|
||||||
<property name="orient">wxVERTICAL</property>
|
<property name="orient">wxHORIZONTAL</property>
|
||||||
<property name="permission">none</property>
|
<property name="permission">protected</property>
|
||||||
<object class="sizeritem" expanded="true">
|
<object class="sizeritem" expanded="true">
|
||||||
<property name="border">5</property>
|
<property name="border">5</property>
|
||||||
<property name="flag">wxEXPAND</property>
|
<property name="flag">wxEXPAND|wxTOP|wxRIGHT</property>
|
||||||
<property name="proportion">1</property>
|
<property name="proportion">1</property>
|
||||||
<object class="wxBoxSizer" expanded="true">
|
<object class="wxBoxSizer" expanded="true">
|
||||||
<property name="minimum_size"></property>
|
<property name="minimum_size"></property>
|
||||||
<property name="name">m_sizerTop</property>
|
<property name="name">leftColumn</property>
|
||||||
<property name="orient">wxHORIZONTAL</property>
|
<property name="orient">wxVERTICAL</property>
|
||||||
<property name="permission">protected</property>
|
<property name="permission">none</property>
|
||||||
<object class="sizeritem" expanded="true">
|
<object class="sizeritem" expanded="true">
|
||||||
<property name="border">5</property>
|
<property name="border">3</property>
|
||||||
<property name="flag">wxALL|wxEXPAND</property>
|
<property name="flag">wxEXPAND|wxTOP|wxBOTTOM</property>
|
||||||
<property name="proportion">1</property>
|
<property name="proportion">0</property>
|
||||||
<object class="wxBoxSizer" expanded="true">
|
<object class="wxBoxSizer" expanded="true">
|
||||||
<property name="minimum_size"></property>
|
<property name="minimum_size"></property>
|
||||||
<property name="name">bSizer7</property>
|
<property name="name">searchSizer</property>
|
||||||
<property name="orient">wxVERTICAL</property>
|
<property name="orient">wxHORIZONTAL</property>
|
||||||
<property name="permission">none</property>
|
<property name="permission">none</property>
|
||||||
<object class="sizeritem" expanded="false">
|
<object class="sizeritem" expanded="false">
|
||||||
<property name="border">0</property>
|
<property name="border">1</property>
|
||||||
<property name="flag">wxALL|wxEXPAND</property>
|
<property name="flag">wxEXPAND|wxBOTTOM</property>
|
||||||
<property name="proportion">1</property>
|
<property name="proportion">1</property>
|
||||||
<object class="wxDataViewCtrl" expanded="false">
|
<object class="wxSearchCtrl" expanded="false">
|
||||||
|
<property name="BottomDockable">1</property>
|
||||||
|
<property name="LeftDockable">1</property>
|
||||||
|
<property name="RightDockable">1</property>
|
||||||
|
<property name="TopDockable">1</property>
|
||||||
|
<property name="aui_layer"></property>
|
||||||
|
<property name="aui_name"></property>
|
||||||
|
<property name="aui_position"></property>
|
||||||
|
<property name="aui_row"></property>
|
||||||
|
<property name="best_size"></property>
|
||||||
<property name="bg"></property>
|
<property name="bg"></property>
|
||||||
|
<property name="cancel_button">1</property>
|
||||||
|
<property name="caption"></property>
|
||||||
|
<property name="caption_visible">1</property>
|
||||||
|
<property name="center_pane">0</property>
|
||||||
|
<property name="close_button">1</property>
|
||||||
<property name="context_help"></property>
|
<property name="context_help"></property>
|
||||||
<property name="context_menu">1</property>
|
<property name="context_menu">1</property>
|
||||||
|
<property name="default_pane">0</property>
|
||||||
|
<property name="dock">Dock</property>
|
||||||
|
<property name="dock_fixed">0</property>
|
||||||
|
<property name="docking">Left</property>
|
||||||
<property name="drag_accept_files">0</property>
|
<property name="drag_accept_files">0</property>
|
||||||
<property name="enabled">1</property>
|
<property name="enabled">1</property>
|
||||||
<property name="fg"></property>
|
<property name="fg"></property>
|
||||||
|
<property name="floatable">1</property>
|
||||||
<property name="font"></property>
|
<property name="font"></property>
|
||||||
|
<property name="gripper">0</property>
|
||||||
<property name="hidden">0</property>
|
<property name="hidden">0</property>
|
||||||
<property name="id">VIEW_ZONE_TABLE</property>
|
<property name="id">wxID_ANY</property>
|
||||||
|
<property name="max_size"></property>
|
||||||
|
<property name="maximize_button">0</property>
|
||||||
<property name="maximum_size"></property>
|
<property name="maximum_size"></property>
|
||||||
<property name="minimum_size">-1,240</property>
|
<property name="min_size"></property>
|
||||||
<property name="name">m_viewZonesOverview</property>
|
<property name="minimize_button">0</property>
|
||||||
|
<property name="minimum_size"></property>
|
||||||
|
<property name="moveable">1</property>
|
||||||
|
<property name="name">m_filterCtrl</property>
|
||||||
|
<property name="pane_border">1</property>
|
||||||
|
<property name="pane_position"></property>
|
||||||
|
<property name="pane_size"></property>
|
||||||
<property name="permission">protected</property>
|
<property name="permission">protected</property>
|
||||||
|
<property name="pin_button">1</property>
|
||||||
<property name="pos"></property>
|
<property name="pos"></property>
|
||||||
<property name="size">-1,240</property>
|
<property name="resize">Resizable</property>
|
||||||
<property name="style">wxDV_HORIZ_RULES|wxDV_ROW_LINES|wxDV_SINGLE|wxDV_VERT_RULES</property>
|
<property name="search_button">1</property>
|
||||||
|
<property name="show">1</property>
|
||||||
|
<property name="size"></property>
|
||||||
|
<property name="style">wxTE_PROCESS_ENTER</property>
|
||||||
<property name="subclass">; ; forward_declare</property>
|
<property name="subclass">; ; forward_declare</property>
|
||||||
|
<property name="toolbar_pane">0</property>
|
||||||
<property name="tooltip"></property>
|
<property name="tooltip"></property>
|
||||||
|
<property name="validator_data_type"></property>
|
||||||
|
<property name="validator_style">wxFILTER_NONE</property>
|
||||||
|
<property name="validator_type">wxDefaultValidator</property>
|
||||||
|
<property name="validator_variable"></property>
|
||||||
|
<property name="value"></property>
|
||||||
<property name="window_extra_style"></property>
|
<property name="window_extra_style"></property>
|
||||||
<property name="window_name"></property>
|
<property name="window_name"></property>
|
||||||
<property name="window_style"></property>
|
<property name="window_style"></property>
|
||||||
<event name="OnChar">OnTableChar</event>
|
<event name="OnCancelButton">OnFilterCtrlCancel</event>
|
||||||
<event name="OnCharHook">OnTableCharHook</event>
|
<event name="OnSearchButton">OnFilterCtrlSearch</event>
|
||||||
<event name="OnDataViewCtrlSelectionChanged">OnDataViewCtrlSelectionChanged</event>
|
<event name="OnText">OnFilterCtrlTextChange</event>
|
||||||
<event name="OnLeftUp">OnViewZonesOverviewOnLeftUp</event>
|
<event name="OnTextEnter">OnFilterCtrlEnter</event>
|
||||||
</object>
|
</object>
|
||||||
</object>
|
</object>
|
||||||
<object class="sizeritem" expanded="true">
|
<object class="sizeritem" expanded="true">
|
||||||
<property name="border">5</property>
|
<property name="border">5</property>
|
||||||
<property name="flag">wxEXPAND|wxLEFT|wxTOP</property>
|
<property name="flag">wxEXPAND</property>
|
||||||
<property name="proportion">0</property>
|
<property name="proportion">0</property>
|
||||||
<object class="wxBoxSizer" expanded="true">
|
<object class="spacer" expanded="true">
|
||||||
<property name="minimum_size"></property>
|
<property name="height">0</property>
|
||||||
<property name="name">m_sizerZoneOP</property>
|
|
||||||
<property name="orient">wxHORIZONTAL</property>
|
|
||||||
<property name="permission">protected</property>
|
<property name="permission">protected</property>
|
||||||
<object class="sizeritem" expanded="true">
|
<property name="width">10</property>
|
||||||
<property name="border">5</property>
|
</object>
|
||||||
<property name="flag">wxALIGN_CENTER_VERTICAL|wxRIGHT</property>
|
</object>
|
||||||
<property name="proportion">0</property>
|
<object class="sizeritem" expanded="false">
|
||||||
<object class="CustomControl" expanded="true">
|
<property name="border">5</property>
|
||||||
<property name="BottomDockable">1</property>
|
<property name="flag">wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT</property>
|
||||||
<property name="LeftDockable">1</property>
|
<property name="proportion">0</property>
|
||||||
<property name="RightDockable">1</property>
|
<object class="wxCheckBox" expanded="false">
|
||||||
<property name="TopDockable">1</property>
|
<property name="BottomDockable">1</property>
|
||||||
<property name="aui_layer"></property>
|
<property name="LeftDockable">1</property>
|
||||||
<property name="aui_name"></property>
|
<property name="RightDockable">1</property>
|
||||||
<property name="aui_position"></property>
|
<property name="TopDockable">1</property>
|
||||||
<property name="aui_row"></property>
|
<property name="aui_layer"></property>
|
||||||
<property name="best_size"></property>
|
<property name="aui_name"></property>
|
||||||
<property name="bg"></property>
|
<property name="aui_position"></property>
|
||||||
<property name="caption"></property>
|
<property name="aui_row"></property>
|
||||||
<property name="caption_visible">1</property>
|
<property name="best_size"></property>
|
||||||
<property name="center_pane">0</property>
|
<property name="bg"></property>
|
||||||
<property name="class">STD_BITMAP_BUTTON</property>
|
<property name="caption"></property>
|
||||||
<property name="close_button">1</property>
|
<property name="caption_visible">1</property>
|
||||||
<property name="construction">m_btnMoveUp = new STD_BITMAP_BUTTON( this, BTN_MOVE_UP, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );</property>
|
<property name="center_pane">0</property>
|
||||||
<property name="context_help"></property>
|
<property name="checked">1</property>
|
||||||
<property name="context_menu">1</property>
|
<property name="close_button">1</property>
|
||||||
<property name="declaration"></property>
|
<property name="context_help"></property>
|
||||||
<property name="default_pane">0</property>
|
<property name="context_menu">1</property>
|
||||||
<property name="dock">Dock</property>
|
<property name="default_pane">0</property>
|
||||||
<property name="dock_fixed">0</property>
|
<property name="dock">Dock</property>
|
||||||
<property name="docking">Left</property>
|
<property name="dock_fixed">0</property>
|
||||||
<property name="drag_accept_files">0</property>
|
<property name="docking">Left</property>
|
||||||
<property name="enabled">1</property>
|
<property name="drag_accept_files">0</property>
|
||||||
<property name="fg"></property>
|
<property name="enabled">1</property>
|
||||||
<property name="floatable">1</property>
|
<property name="fg"></property>
|
||||||
<property name="font"></property>
|
<property name="floatable">1</property>
|
||||||
<property name="gripper">0</property>
|
<property name="font"></property>
|
||||||
<property name="hidden">0</property>
|
<property name="gripper">0</property>
|
||||||
<property name="id">BTN_MOVE_UP</property>
|
<property name="hidden">0</property>
|
||||||
<property name="include">#include "widgets/std_bitmap_button.h"</property>
|
<property name="id">CHECK_NAME</property>
|
||||||
<property name="max_size"></property>
|
<property name="label">Name</property>
|
||||||
<property name="maximize_button">0</property>
|
<property name="max_size"></property>
|
||||||
<property name="maximum_size"></property>
|
<property name="maximize_button">0</property>
|
||||||
<property name="min_size"></property>
|
<property name="maximum_size"></property>
|
||||||
<property name="minimize_button">0</property>
|
<property name="min_size"></property>
|
||||||
<property name="minimum_size"></property>
|
<property name="minimize_button">0</property>
|
||||||
<property name="moveable">1</property>
|
<property name="minimum_size"></property>
|
||||||
<property name="name">m_btnMoveUp</property>
|
<property name="moveable">1</property>
|
||||||
<property name="pane_border">1</property>
|
<property name="name">m_checkName</property>
|
||||||
<property name="pane_position"></property>
|
<property name="pane_border">1</property>
|
||||||
<property name="pane_size"></property>
|
<property name="pane_position"></property>
|
||||||
<property name="permission">protected</property>
|
<property name="pane_size"></property>
|
||||||
<property name="pin_button">1</property>
|
<property name="permission">protected</property>
|
||||||
<property name="pos"></property>
|
<property name="pin_button">1</property>
|
||||||
<property name="resize">Resizable</property>
|
<property name="pos"></property>
|
||||||
<property name="settings"></property>
|
<property name="resize">Resizable</property>
|
||||||
<property name="show">1</property>
|
<property name="show">1</property>
|
||||||
<property name="size"></property>
|
<property name="size"></property>
|
||||||
<property name="subclass">; ; forward_declare</property>
|
<property name="style"></property>
|
||||||
<property name="toolbar_pane">0</property>
|
<property name="subclass">; ; forward_declare</property>
|
||||||
<property name="tooltip">Top zone has the highest priority. When a zone is inside another zone, if its priority is higher, its outlines are removed from the other zone.</property>
|
<property name="toolbar_pane">0</property>
|
||||||
<property name="window_extra_style"></property>
|
<property name="tooltip"></property>
|
||||||
<property name="window_name"></property>
|
<property name="validator_data_type"></property>
|
||||||
<property name="window_style"></property>
|
<property name="validator_style">wxFILTER_NONE</property>
|
||||||
</object>
|
<property name="validator_type">wxDefaultValidator</property>
|
||||||
</object>
|
<property name="validator_variable"></property>
|
||||||
<object class="sizeritem" expanded="true">
|
<property name="window_extra_style"></property>
|
||||||
<property name="border">5</property>
|
<property name="window_name"></property>
|
||||||
<property name="flag">wxALIGN_CENTER_VERTICAL|wxRIGHT</property>
|
<property name="window_style"></property>
|
||||||
<property name="proportion">0</property>
|
</object>
|
||||||
<object class="CustomControl" expanded="true">
|
</object>
|
||||||
<property name="BottomDockable">1</property>
|
<object class="sizeritem" expanded="false">
|
||||||
<property name="LeftDockable">1</property>
|
<property name="border">5</property>
|
||||||
<property name="RightDockable">1</property>
|
<property name="flag">wxALIGN_CENTER_VERTICAL</property>
|
||||||
<property name="TopDockable">1</property>
|
<property name="proportion">0</property>
|
||||||
<property name="aui_layer"></property>
|
<object class="wxCheckBox" expanded="false">
|
||||||
<property name="aui_name"></property>
|
<property name="BottomDockable">1</property>
|
||||||
<property name="aui_position"></property>
|
<property name="LeftDockable">1</property>
|
||||||
<property name="aui_row"></property>
|
<property name="RightDockable">1</property>
|
||||||
<property name="best_size"></property>
|
<property name="TopDockable">1</property>
|
||||||
<property name="bg"></property>
|
<property name="aui_layer"></property>
|
||||||
<property name="caption"></property>
|
<property name="aui_name"></property>
|
||||||
<property name="caption_visible">1</property>
|
<property name="aui_position"></property>
|
||||||
<property name="center_pane">0</property>
|
<property name="aui_row"></property>
|
||||||
<property name="class">STD_BITMAP_BUTTON</property>
|
<property name="best_size"></property>
|
||||||
<property name="close_button">1</property>
|
<property name="bg"></property>
|
||||||
<property name="construction">m_btnMoveDown = new STD_BITMAP_BUTTON( this, BTN_MOVE_DOWN, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );</property>
|
<property name="caption"></property>
|
||||||
<property name="context_help"></property>
|
<property name="caption_visible">1</property>
|
||||||
<property name="context_menu">1</property>
|
<property name="center_pane">0</property>
|
||||||
<property name="declaration"></property>
|
<property name="checked">1</property>
|
||||||
<property name="default_pane">0</property>
|
<property name="close_button">1</property>
|
||||||
<property name="dock">Dock</property>
|
<property name="context_help"></property>
|
||||||
<property name="dock_fixed">0</property>
|
<property name="context_menu">1</property>
|
||||||
<property name="docking">Left</property>
|
<property name="default_pane">0</property>
|
||||||
<property name="drag_accept_files">0</property>
|
<property name="dock">Dock</property>
|
||||||
<property name="enabled">1</property>
|
<property name="dock_fixed">0</property>
|
||||||
<property name="fg"></property>
|
<property name="docking">Left</property>
|
||||||
<property name="floatable">1</property>
|
<property name="drag_accept_files">0</property>
|
||||||
<property name="font"></property>
|
<property name="enabled">1</property>
|
||||||
<property name="gripper">0</property>
|
<property name="fg"></property>
|
||||||
<property name="hidden">0</property>
|
<property name="floatable">1</property>
|
||||||
<property name="id">BTN_MOVE_DOWN</property>
|
<property name="font"></property>
|
||||||
<property name="include">#include "widgets/std_bitmap_button.h"</property>
|
<property name="gripper">0</property>
|
||||||
<property name="max_size"></property>
|
<property name="hidden">0</property>
|
||||||
<property name="maximize_button">0</property>
|
<property name="id">CHECK_NET</property>
|
||||||
<property name="maximum_size"></property>
|
<property name="label">Net</property>
|
||||||
<property name="min_size"></property>
|
<property name="max_size"></property>
|
||||||
<property name="minimize_button">0</property>
|
<property name="maximize_button">0</property>
|
||||||
<property name="minimum_size"></property>
|
<property name="maximum_size"></property>
|
||||||
<property name="moveable">1</property>
|
<property name="min_size"></property>
|
||||||
<property name="name">m_btnMoveDown</property>
|
<property name="minimize_button">0</property>
|
||||||
<property name="pane_border">1</property>
|
<property name="minimum_size"></property>
|
||||||
<property name="pane_position"></property>
|
<property name="moveable">1</property>
|
||||||
<property name="pane_size"></property>
|
<property name="name">m_checkNet</property>
|
||||||
<property name="permission">protected</property>
|
<property name="pane_border">1</property>
|
||||||
<property name="pin_button">1</property>
|
<property name="pane_position"></property>
|
||||||
<property name="pos"></property>
|
<property name="pane_size"></property>
|
||||||
<property name="resize">Resizable</property>
|
<property name="permission">protected</property>
|
||||||
<property name="settings"></property>
|
<property name="pin_button">1</property>
|
||||||
<property name="show">1</property>
|
<property name="pos"></property>
|
||||||
<property name="size"></property>
|
<property name="resize">Resizable</property>
|
||||||
<property name="subclass">; ; forward_declare</property>
|
<property name="show">1</property>
|
||||||
<property name="toolbar_pane">0</property>
|
<property name="size"></property>
|
||||||
<property name="tooltip">Top zone has the highest priority. When a zone is inside another zone, if its priority is higher, its outlines are removed from the other zone.</property>
|
<property name="style"></property>
|
||||||
<property name="window_extra_style"></property>
|
<property name="subclass">; ; forward_declare</property>
|
||||||
<property name="window_name"></property>
|
<property name="toolbar_pane">0</property>
|
||||||
<property name="window_style"></property>
|
<property name="tooltip"></property>
|
||||||
</object>
|
<property name="validator_data_type"></property>
|
||||||
</object>
|
<property name="validator_style">wxFILTER_NONE</property>
|
||||||
<object class="sizeritem" expanded="false">
|
<property name="validator_type">wxDefaultValidator</property>
|
||||||
<property name="border">5</property>
|
<property name="validator_variable"></property>
|
||||||
<property name="flag">wxEXPAND</property>
|
<property name="window_extra_style"></property>
|
||||||
<property name="proportion">0</property>
|
<property name="window_name"></property>
|
||||||
<object class="spacer" expanded="false">
|
<property name="window_style"></property>
|
||||||
<property name="height">0</property>
|
</object>
|
||||||
<property name="permission">protected</property>
|
</object>
|
||||||
<property name="width">0</property>
|
</object>
|
||||||
</object>
|
</object>
|
||||||
</object>
|
<object class="sizeritem" expanded="false">
|
||||||
<object class="sizeritem" expanded="false">
|
<property name="border">0</property>
|
||||||
<property name="border">5</property>
|
<property name="flag">wxEXPAND</property>
|
||||||
<property name="flag">wxALIGN_CENTER_VERTICAL|wxRIGHT</property>
|
<property name="proportion">1</property>
|
||||||
<property name="proportion">0</property>
|
<object class="wxDataViewCtrl" expanded="false">
|
||||||
<object class="wxCheckBox" expanded="false">
|
<property name="bg"></property>
|
||||||
<property name="BottomDockable">1</property>
|
<property name="context_help"></property>
|
||||||
<property name="LeftDockable">1</property>
|
<property name="context_menu">1</property>
|
||||||
<property name="RightDockable">1</property>
|
<property name="drag_accept_files">0</property>
|
||||||
<property name="TopDockable">1</property>
|
<property name="enabled">1</property>
|
||||||
<property name="aui_layer"></property>
|
<property name="fg"></property>
|
||||||
<property name="aui_name"></property>
|
<property name="font"></property>
|
||||||
<property name="aui_position"></property>
|
<property name="hidden">0</property>
|
||||||
<property name="aui_row"></property>
|
<property name="id">VIEW_ZONE_TABLE</property>
|
||||||
<property name="best_size"></property>
|
<property name="maximum_size"></property>
|
||||||
<property name="bg"></property>
|
<property name="minimum_size">-1,240</property>
|
||||||
<property name="caption"></property>
|
<property name="name">m_viewZonesOverview</property>
|
||||||
<property name="caption_visible">1</property>
|
<property name="permission">protected</property>
|
||||||
<property name="center_pane">0</property>
|
<property name="pos"></property>
|
||||||
<property name="checked">1</property>
|
<property name="size">-1,240</property>
|
||||||
<property name="close_button">1</property>
|
<property name="style">wxDV_HORIZ_RULES|wxDV_SINGLE|wxDV_VERT_RULES</property>
|
||||||
<property name="context_help"></property>
|
<property name="subclass">; ; forward_declare</property>
|
||||||
<property name="context_menu">1</property>
|
<property name="tooltip"></property>
|
||||||
<property name="default_pane">0</property>
|
<property name="window_extra_style"></property>
|
||||||
<property name="dock">Dock</property>
|
<property name="window_name"></property>
|
||||||
<property name="dock_fixed">0</property>
|
<property name="window_style"></property>
|
||||||
<property name="docking">Left</property>
|
<event name="OnChar">OnTableChar</event>
|
||||||
<property name="drag_accept_files">0</property>
|
<event name="OnCharHook">OnTableCharHook</event>
|
||||||
<property name="enabled">1</property>
|
<event name="OnDataViewCtrlSelectionChanged">OnDataViewCtrlSelectionChanged</event>
|
||||||
<property name="fg"></property>
|
<event name="OnLeftUp">OnViewZonesOverviewOnLeftUp</event>
|
||||||
<property name="floatable">1</property>
|
</object>
|
||||||
<property name="font"></property>
|
</object>
|
||||||
<property name="gripper">0</property>
|
<object class="sizeritem" expanded="true">
|
||||||
<property name="hidden">0</property>
|
<property name="border">5</property>
|
||||||
<property name="id">CHECK_NAME</property>
|
<property name="flag">wxEXPAND|wxTOP</property>
|
||||||
<property name="label">Name</property>
|
<property name="proportion">0</property>
|
||||||
<property name="max_size"></property>
|
<object class="wxBoxSizer" expanded="true">
|
||||||
<property name="maximize_button">0</property>
|
<property name="minimum_size"></property>
|
||||||
<property name="maximum_size"></property>
|
<property name="name">m_sizerZoneOP</property>
|
||||||
<property name="min_size"></property>
|
<property name="orient">wxHORIZONTAL</property>
|
||||||
<property name="minimize_button">0</property>
|
<property name="permission">protected</property>
|
||||||
<property name="minimum_size"></property>
|
<object class="sizeritem" expanded="true">
|
||||||
<property name="moveable">1</property>
|
<property name="border">5</property>
|
||||||
<property name="name">m_checkName</property>
|
<property name="flag">wxALIGN_CENTER_VERTICAL|wxRIGHT</property>
|
||||||
<property name="pane_border">1</property>
|
<property name="proportion">0</property>
|
||||||
<property name="pane_position"></property>
|
<object class="wxBitmapButton" expanded="true">
|
||||||
<property name="pane_size"></property>
|
<property name="BottomDockable">1</property>
|
||||||
<property name="permission">protected</property>
|
<property name="LeftDockable">1</property>
|
||||||
<property name="pin_button">1</property>
|
<property name="RightDockable">1</property>
|
||||||
<property name="pos"></property>
|
<property name="TopDockable">1</property>
|
||||||
<property name="resize">Resizable</property>
|
<property name="aui_layer"></property>
|
||||||
<property name="show">1</property>
|
<property name="aui_name"></property>
|
||||||
<property name="size"></property>
|
<property name="aui_position"></property>
|
||||||
<property name="style"></property>
|
<property name="aui_row"></property>
|
||||||
<property name="subclass">; ; forward_declare</property>
|
<property name="auth_needed">0</property>
|
||||||
<property name="toolbar_pane">0</property>
|
<property name="best_size"></property>
|
||||||
<property name="tooltip"></property>
|
<property name="bg"></property>
|
||||||
<property name="validator_data_type"></property>
|
<property name="bitmap"></property>
|
||||||
<property name="validator_style">wxFILTER_NONE</property>
|
<property name="caption"></property>
|
||||||
<property name="validator_type">wxDefaultValidator</property>
|
<property name="caption_visible">1</property>
|
||||||
<property name="validator_variable"></property>
|
<property name="center_pane">0</property>
|
||||||
<property name="window_extra_style"></property>
|
<property name="close_button">1</property>
|
||||||
<property name="window_name"></property>
|
<property name="context_help"></property>
|
||||||
<property name="window_style"></property>
|
<property name="context_menu">1</property>
|
||||||
</object>
|
<property name="current"></property>
|
||||||
</object>
|
<property name="default">0</property>
|
||||||
<object class="sizeritem" expanded="false">
|
<property name="default_pane">0</property>
|
||||||
<property name="border">5</property>
|
<property name="disabled"></property>
|
||||||
<property name="flag">wxALIGN_CENTER_VERTICAL|wxRIGHT</property>
|
<property name="dock">Dock</property>
|
||||||
<property name="proportion">0</property>
|
<property name="dock_fixed">0</property>
|
||||||
<object class="wxCheckBox" expanded="false">
|
<property name="docking">Left</property>
|
||||||
<property name="BottomDockable">1</property>
|
<property name="drag_accept_files">0</property>
|
||||||
<property name="LeftDockable">1</property>
|
<property name="enabled">1</property>
|
||||||
<property name="RightDockable">1</property>
|
<property name="fg"></property>
|
||||||
<property name="TopDockable">1</property>
|
<property name="floatable">1</property>
|
||||||
<property name="aui_layer"></property>
|
<property name="focus"></property>
|
||||||
<property name="aui_name"></property>
|
<property name="font"></property>
|
||||||
<property name="aui_position"></property>
|
<property name="gripper">0</property>
|
||||||
<property name="aui_row"></property>
|
<property name="hidden">0</property>
|
||||||
<property name="best_size"></property>
|
<property name="id">wxID_ANY</property>
|
||||||
<property name="bg"></property>
|
<property name="label">Move Up</property>
|
||||||
<property name="caption"></property>
|
<property name="margins"></property>
|
||||||
<property name="caption_visible">1</property>
|
<property name="markup">0</property>
|
||||||
<property name="center_pane">0</property>
|
<property name="max_size"></property>
|
||||||
<property name="checked">1</property>
|
<property name="maximize_button">0</property>
|
||||||
<property name="close_button">1</property>
|
<property name="maximum_size"></property>
|
||||||
<property name="context_help"></property>
|
<property name="min_size"></property>
|
||||||
<property name="context_menu">1</property>
|
<property name="minimize_button">0</property>
|
||||||
<property name="default_pane">0</property>
|
<property name="minimum_size"></property>
|
||||||
<property name="dock">Dock</property>
|
<property name="moveable">1</property>
|
||||||
<property name="dock_fixed">0</property>
|
<property name="name">m_btnMoveUp</property>
|
||||||
<property name="docking">Left</property>
|
<property name="pane_border">1</property>
|
||||||
<property name="drag_accept_files">0</property>
|
<property name="pane_position"></property>
|
||||||
<property name="enabled">1</property>
|
<property name="pane_size"></property>
|
||||||
<property name="fg"></property>
|
<property name="permission">protected</property>
|
||||||
<property name="floatable">1</property>
|
<property name="pin_button">1</property>
|
||||||
<property name="font"></property>
|
<property name="pos"></property>
|
||||||
<property name="gripper">0</property>
|
<property name="position"></property>
|
||||||
<property name="hidden">0</property>
|
<property name="pressed"></property>
|
||||||
<property name="id">CHECK_NET</property>
|
<property name="resize">Resizable</property>
|
||||||
<property name="label">Net</property>
|
<property name="show">1</property>
|
||||||
<property name="max_size"></property>
|
<property name="size"></property>
|
||||||
<property name="maximize_button">0</property>
|
<property name="style"></property>
|
||||||
<property name="maximum_size"></property>
|
<property name="subclass">STD_BITMAP_BUTTON; widgets/std_bitmap_button.h; forward_declare</property>
|
||||||
<property name="min_size"></property>
|
<property name="toolbar_pane">0</property>
|
||||||
<property name="minimize_button">0</property>
|
<property name="tooltip">Top zone has the highest priority. When a zone is inside another zone, if its priority is higher, its outlines are removed from the other zone.</property>
|
||||||
<property name="minimum_size"></property>
|
<property name="validator_data_type"></property>
|
||||||
<property name="moveable">1</property>
|
<property name="validator_style">wxFILTER_NONE</property>
|
||||||
<property name="name">m_checkNet</property>
|
<property name="validator_type">wxDefaultValidator</property>
|
||||||
<property name="pane_border">1</property>
|
<property name="validator_variable"></property>
|
||||||
<property name="pane_position"></property>
|
<property name="window_extra_style"></property>
|
||||||
<property name="pane_size"></property>
|
<property name="window_name"></property>
|
||||||
<property name="permission">protected</property>
|
<property name="window_style"></property>
|
||||||
<property name="pin_button">1</property>
|
<event name="OnButtonClick">OnMoveUpClick</event>
|
||||||
<property name="pos"></property>
|
</object>
|
||||||
<property name="resize">Resizable</property>
|
</object>
|
||||||
<property name="show">1</property>
|
<object class="sizeritem" expanded="true">
|
||||||
<property name="size"></property>
|
<property name="border">5</property>
|
||||||
<property name="style"></property>
|
<property name="flag">wxALIGN_CENTER_VERTICAL|wxRIGHT</property>
|
||||||
<property name="subclass">; ; forward_declare</property>
|
<property name="proportion">0</property>
|
||||||
<property name="toolbar_pane">0</property>
|
<object class="wxBitmapButton" expanded="true">
|
||||||
<property name="tooltip"></property>
|
<property name="BottomDockable">1</property>
|
||||||
<property name="validator_data_type"></property>
|
<property name="LeftDockable">1</property>
|
||||||
<property name="validator_style">wxFILTER_NONE</property>
|
<property name="RightDockable">1</property>
|
||||||
<property name="validator_type">wxDefaultValidator</property>
|
<property name="TopDockable">1</property>
|
||||||
<property name="validator_variable"></property>
|
<property name="aui_layer"></property>
|
||||||
<property name="window_extra_style"></property>
|
<property name="aui_name"></property>
|
||||||
<property name="window_name"></property>
|
<property name="aui_position"></property>
|
||||||
<property name="window_style"></property>
|
<property name="aui_row"></property>
|
||||||
</object>
|
<property name="auth_needed">0</property>
|
||||||
</object>
|
<property name="best_size"></property>
|
||||||
<object class="sizeritem" expanded="false">
|
<property name="bg"></property>
|
||||||
<property name="border">5</property>
|
<property name="bitmap"></property>
|
||||||
<property name="flag">wxEXPAND</property>
|
<property name="caption"></property>
|
||||||
<property name="proportion">1</property>
|
<property name="caption_visible">1</property>
|
||||||
<object class="wxSearchCtrl" expanded="false">
|
<property name="center_pane">0</property>
|
||||||
<property name="BottomDockable">1</property>
|
<property name="close_button">1</property>
|
||||||
<property name="LeftDockable">1</property>
|
<property name="context_help"></property>
|
||||||
<property name="RightDockable">1</property>
|
<property name="context_menu">1</property>
|
||||||
<property name="TopDockable">1</property>
|
<property name="current"></property>
|
||||||
<property name="aui_layer"></property>
|
<property name="default">0</property>
|
||||||
<property name="aui_name"></property>
|
<property name="default_pane">0</property>
|
||||||
<property name="aui_position"></property>
|
<property name="disabled"></property>
|
||||||
<property name="aui_row"></property>
|
<property name="dock">Dock</property>
|
||||||
<property name="best_size"></property>
|
<property name="dock_fixed">0</property>
|
||||||
<property name="bg"></property>
|
<property name="docking">Left</property>
|
||||||
<property name="cancel_button">1</property>
|
<property name="drag_accept_files">0</property>
|
||||||
<property name="caption"></property>
|
<property name="enabled">1</property>
|
||||||
<property name="caption_visible">1</property>
|
<property name="fg"></property>
|
||||||
<property name="center_pane">0</property>
|
<property name="floatable">1</property>
|
||||||
<property name="close_button">1</property>
|
<property name="focus"></property>
|
||||||
<property name="context_help"></property>
|
<property name="font"></property>
|
||||||
<property name="context_menu">1</property>
|
<property name="gripper">0</property>
|
||||||
<property name="default_pane">0</property>
|
<property name="hidden">0</property>
|
||||||
<property name="dock">Dock</property>
|
<property name="id">wxID_ANY</property>
|
||||||
<property name="dock_fixed">0</property>
|
<property name="label">Move Down</property>
|
||||||
<property name="docking">Left</property>
|
<property name="margins"></property>
|
||||||
<property name="drag_accept_files">0</property>
|
<property name="markup">0</property>
|
||||||
<property name="enabled">1</property>
|
<property name="max_size"></property>
|
||||||
<property name="fg"></property>
|
<property name="maximize_button">0</property>
|
||||||
<property name="floatable">1</property>
|
<property name="maximum_size"></property>
|
||||||
<property name="font"></property>
|
<property name="min_size"></property>
|
||||||
<property name="gripper">0</property>
|
<property name="minimize_button">0</property>
|
||||||
<property name="hidden">0</property>
|
<property name="minimum_size"></property>
|
||||||
<property name="id">wxID_ANY</property>
|
<property name="moveable">1</property>
|
||||||
<property name="max_size"></property>
|
<property name="name">m_btnMoveDown</property>
|
||||||
<property name="maximize_button">0</property>
|
<property name="pane_border">1</property>
|
||||||
<property name="maximum_size"></property>
|
<property name="pane_position"></property>
|
||||||
<property name="min_size"></property>
|
<property name="pane_size"></property>
|
||||||
<property name="minimize_button">0</property>
|
<property name="permission">protected</property>
|
||||||
<property name="minimum_size"></property>
|
<property name="pin_button">1</property>
|
||||||
<property name="moveable">1</property>
|
<property name="pos"></property>
|
||||||
<property name="name">m_filterCtrl</property>
|
<property name="position"></property>
|
||||||
<property name="pane_border">1</property>
|
<property name="pressed"></property>
|
||||||
<property name="pane_position"></property>
|
<property name="resize">Resizable</property>
|
||||||
<property name="pane_size"></property>
|
<property name="show">1</property>
|
||||||
<property name="permission">protected</property>
|
<property name="size"></property>
|
||||||
<property name="pin_button">1</property>
|
<property name="style"></property>
|
||||||
<property name="pos"></property>
|
<property name="subclass">STD_BITMAP_BUTTON; widgets/std_bitmap_button.h; forward_declare</property>
|
||||||
<property name="resize">Resizable</property>
|
<property name="toolbar_pane">0</property>
|
||||||
<property name="search_button">1</property>
|
<property name="tooltip">Top zone has the highest priority. When a zone is inside another zone, if its priority is higher, its outlines are removed from the other zone.</property>
|
||||||
<property name="show">1</property>
|
<property name="validator_data_type"></property>
|
||||||
<property name="size"></property>
|
<property name="validator_style">wxFILTER_NONE</property>
|
||||||
<property name="style">wxTE_PROCESS_ENTER</property>
|
<property name="validator_type">wxDefaultValidator</property>
|
||||||
<property name="subclass">; ; forward_declare</property>
|
<property name="validator_variable"></property>
|
||||||
<property name="toolbar_pane">0</property>
|
<property name="window_extra_style"></property>
|
||||||
<property name="tooltip"></property>
|
<property name="window_name"></property>
|
||||||
<property name="validator_data_type"></property>
|
<property name="window_style"></property>
|
||||||
<property name="validator_style">wxFILTER_NONE</property>
|
<event name="OnButtonClick">OnMoveDownClick</event>
|
||||||
<property name="validator_type">wxDefaultValidator</property>
|
|
||||||
<property name="validator_variable"></property>
|
|
||||||
<property name="value"></property>
|
|
||||||
<property name="window_extra_style"></property>
|
|
||||||
<property name="window_name"></property>
|
|
||||||
<property name="window_style"></property>
|
|
||||||
<event name="OnCancelButton">OnFilterCtrlCancel</event>
|
|
||||||
<event name="OnSearchButton">OnFilterCtrlSearch</event>
|
|
||||||
<event name="OnText">OnFilterCtrlTextChange</event>
|
|
||||||
<event name="OnTextEnter">OnFilterCtrlEnter</event>
|
|
||||||
</object>
|
|
||||||
</object>
|
|
||||||
</object>
|
</object>
|
||||||
</object>
|
</object>
|
||||||
</object>
|
</object>
|
||||||
</object>
|
</object>
|
||||||
</object>
|
</object>
|
||||||
</object>
|
</object>
|
||||||
<object class="sizeritem" expanded="false">
|
</object>
|
||||||
<property name="border">5</property>
|
</object>
|
||||||
<property name="flag">wxALL|wxEXPAND</property>
|
<object class="sizeritem" expanded="true">
|
||||||
<property name="proportion">0</property>
|
<property name="border">5</property>
|
||||||
<object class="wxStaticBoxSizer" expanded="false">
|
<property name="flag">wxEXPAND|wxTOP|wxRIGHT|wxLEFT</property>
|
||||||
<property name="id">wxID_ANY</property>
|
<property name="proportion">0</property>
|
||||||
<property name="label">Properties</property>
|
<object class="wxBoxSizer" expanded="true">
|
||||||
<property name="minimum_size"></property>
|
<property name="minimum_size"></property>
|
||||||
<property name="name">m_sizerProperties</property>
|
<property name="name">m_sizerProperties</property>
|
||||||
<property name="orient">wxVERTICAL</property>
|
<property name="orient">wxVERTICAL</property>
|
||||||
<property name="parent">1</property>
|
<property name="permission">protected</property>
|
||||||
<property name="permission">protected</property>
|
|
||||||
</object>
|
|
||||||
</object>
|
|
||||||
</object>
|
</object>
|
||||||
</object>
|
</object>
|
||||||
<object class="sizeritem" expanded="true">
|
<object class="sizeritem" expanded="true">
|
||||||
|
@ -495,9 +516,9 @@
|
||||||
<property name="proportion">0</property>
|
<property name="proportion">0</property>
|
||||||
<object class="wxBoxSizer" expanded="true">
|
<object class="wxBoxSizer" expanded="true">
|
||||||
<property name="minimum_size"></property>
|
<property name="minimum_size"></property>
|
||||||
<property name="name">bSizer61</property>
|
<property name="name">m_sizerBottom</property>
|
||||||
<property name="orient">wxHORIZONTAL</property>
|
<property name="orient">wxHORIZONTAL</property>
|
||||||
<property name="permission">none</property>
|
<property name="permission">protected</property>
|
||||||
<object class="sizeritem" expanded="true">
|
<object class="sizeritem" expanded="true">
|
||||||
<property name="border">10</property>
|
<property name="border">10</property>
|
||||||
<property name="flag">wxALIGN_CENTER_VERTICAL|wxLEFT</property>
|
<property name="flag">wxALIGN_CENTER_VERTICAL|wxLEFT</property>
|
||||||
|
@ -532,7 +553,7 @@
|
||||||
<property name="gripper">0</property>
|
<property name="gripper">0</property>
|
||||||
<property name="hidden">0</property>
|
<property name="hidden">0</property>
|
||||||
<property name="id">wxID_ANY</property>
|
<property name="id">wxID_ANY</property>
|
||||||
<property name="label">Repour</property>
|
<property name="label">Refill zones</property>
|
||||||
<property name="max_size"></property>
|
<property name="max_size"></property>
|
||||||
<property name="maximize_button">0</property>
|
<property name="maximize_button">0</property>
|
||||||
<property name="maximum_size"></property>
|
<property name="maximum_size"></property>
|
||||||
|
@ -571,7 +592,7 @@
|
||||||
<object class="spacer" expanded="true">
|
<object class="spacer" expanded="true">
|
||||||
<property name="height">0</property>
|
<property name="height">0</property>
|
||||||
<property name="permission">protected</property>
|
<property name="permission">protected</property>
|
||||||
<property name="width">0</property>
|
<property name="width">25</property>
|
||||||
</object>
|
</object>
|
||||||
</object>
|
</object>
|
||||||
<object class="sizeritem" expanded="false">
|
<object class="sizeritem" expanded="false">
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
///////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////
|
||||||
// C++ code generated with wxFormBuilder (version 4.0.0-0-g0efcecf02)
|
// C++ code generated with wxFormBuilder (version 4.0.0-0-g0efcecf)
|
||||||
// http://www.wxformbuilder.org/
|
// http://www.wxformbuilder.org/
|
||||||
//
|
//
|
||||||
// PLEASE DO *NOT* EDIT THIS FILE!
|
// PLEASE DO *NOT* EDIT THIS FILE!
|
||||||
|
@ -10,18 +10,22 @@
|
||||||
#include <wx/artprov.h>
|
#include <wx/artprov.h>
|
||||||
#include <wx/xrc/xmlres.h>
|
#include <wx/xrc/xmlres.h>
|
||||||
#include <wx/intl.h>
|
#include <wx/intl.h>
|
||||||
|
class STD_BITMAP_BUTTON;
|
||||||
|
|
||||||
#include "dialog_shim.h"
|
#include "dialog_shim.h"
|
||||||
#include <wx/dataview.h>
|
#include <wx/string.h>
|
||||||
|
#include <wx/srchctrl.h>
|
||||||
#include <wx/gdicmn.h>
|
#include <wx/gdicmn.h>
|
||||||
#include <wx/font.h>
|
#include <wx/font.h>
|
||||||
#include <wx/colour.h>
|
#include <wx/colour.h>
|
||||||
#include <wx/settings.h>
|
#include <wx/settings.h>
|
||||||
#include <wx/string.h>
|
|
||||||
#include "widgets/std_bitmap_button.h"
|
|
||||||
#include <wx/checkbox.h>
|
#include <wx/checkbox.h>
|
||||||
#include <wx/srchctrl.h>
|
|
||||||
#include <wx/sizer.h>
|
#include <wx/sizer.h>
|
||||||
#include <wx/statbox.h>
|
#include <wx/dataview.h>
|
||||||
|
#include <wx/bmpbuttn.h>
|
||||||
|
#include <wx/bitmap.h>
|
||||||
|
#include <wx/image.h>
|
||||||
|
#include <wx/icon.h>
|
||||||
#include <wx/button.h>
|
#include <wx/button.h>
|
||||||
#include <wx/dialog.h>
|
#include <wx/dialog.h>
|
||||||
|
|
||||||
|
@ -38,23 +42,22 @@ class DIALOG_ZONE_MANAGER_BASE : public DIALOG_SHIM
|
||||||
enum
|
enum
|
||||||
{
|
{
|
||||||
ID_DIALOG_COPPER_ZONE_BASE = 1000,
|
ID_DIALOG_COPPER_ZONE_BASE = 1000,
|
||||||
VIEW_ZONE_TABLE,
|
|
||||||
BTN_MOVE_UP,
|
|
||||||
BTN_MOVE_DOWN,
|
|
||||||
CHECK_NAME,
|
CHECK_NAME,
|
||||||
CHECK_NET
|
CHECK_NET,
|
||||||
|
VIEW_ZONE_TABLE
|
||||||
};
|
};
|
||||||
|
|
||||||
wxBoxSizer* m_MainBoxSizer;
|
wxBoxSizer* m_MainBoxSizer;
|
||||||
wxBoxSizer* m_sizerTop;
|
wxBoxSizer* m_sizerTop;
|
||||||
|
wxSearchCtrl* m_filterCtrl;
|
||||||
|
wxCheckBox* m_checkName;
|
||||||
|
wxCheckBox* m_checkNet;
|
||||||
wxDataViewCtrl* m_viewZonesOverview;
|
wxDataViewCtrl* m_viewZonesOverview;
|
||||||
wxBoxSizer* m_sizerZoneOP;
|
wxBoxSizer* m_sizerZoneOP;
|
||||||
STD_BITMAP_BUTTON* m_btnMoveUp;
|
STD_BITMAP_BUTTON* m_btnMoveUp;
|
||||||
STD_BITMAP_BUTTON* m_btnMoveDown;
|
STD_BITMAP_BUTTON* m_btnMoveDown;
|
||||||
wxCheckBox* m_checkName;
|
wxBoxSizer* m_sizerProperties;
|
||||||
wxCheckBox* m_checkNet;
|
wxBoxSizer* m_sizerBottom;
|
||||||
wxSearchCtrl* m_filterCtrl;
|
|
||||||
wxStaticBoxSizer* m_sizerProperties;
|
|
||||||
wxCheckBox* m_checkRepour;
|
wxCheckBox* m_checkRepour;
|
||||||
wxStdDialogButtonSizer* m_sdbSizer;
|
wxStdDialogButtonSizer* m_sdbSizer;
|
||||||
wxButton* m_sdbSizerOK;
|
wxButton* m_sdbSizerOK;
|
||||||
|
@ -63,14 +66,16 @@ class DIALOG_ZONE_MANAGER_BASE : public DIALOG_SHIM
|
||||||
|
|
||||||
// Virtual event handlers, override them in your derived class
|
// Virtual event handlers, override them in your derived class
|
||||||
virtual void onDialogResize( wxSizeEvent& event ) { event.Skip(); }
|
virtual void onDialogResize( wxSizeEvent& event ) { event.Skip(); }
|
||||||
virtual void OnTableChar( wxKeyEvent& event ) { event.Skip(); }
|
|
||||||
virtual void OnTableCharHook( wxKeyEvent& event ) { event.Skip(); }
|
|
||||||
virtual void OnDataViewCtrlSelectionChanged( wxDataViewEvent& event ) { event.Skip(); }
|
|
||||||
virtual void OnViewZonesOverviewOnLeftUp( wxMouseEvent& event ) { event.Skip(); }
|
|
||||||
virtual void OnFilterCtrlCancel( wxCommandEvent& event ) { event.Skip(); }
|
virtual void OnFilterCtrlCancel( wxCommandEvent& event ) { event.Skip(); }
|
||||||
virtual void OnFilterCtrlSearch( wxCommandEvent& event ) { event.Skip(); }
|
virtual void OnFilterCtrlSearch( wxCommandEvent& event ) { event.Skip(); }
|
||||||
virtual void OnFilterCtrlTextChange( wxCommandEvent& event ) { event.Skip(); }
|
virtual void OnFilterCtrlTextChange( wxCommandEvent& event ) { event.Skip(); }
|
||||||
virtual void OnFilterCtrlEnter( wxCommandEvent& event ) { event.Skip(); }
|
virtual void OnFilterCtrlEnter( wxCommandEvent& event ) { event.Skip(); }
|
||||||
|
virtual void OnTableChar( wxKeyEvent& event ) { event.Skip(); }
|
||||||
|
virtual void OnTableCharHook( wxKeyEvent& event ) { event.Skip(); }
|
||||||
|
virtual void OnDataViewCtrlSelectionChanged( wxDataViewEvent& event ) { event.Skip(); }
|
||||||
|
virtual void OnViewZonesOverviewOnLeftUp( wxMouseEvent& event ) { event.Skip(); }
|
||||||
|
virtual void OnMoveUpClick( wxCommandEvent& event ) { event.Skip(); }
|
||||||
|
virtual void OnMoveDownClick( wxCommandEvent& event ) { event.Skip(); }
|
||||||
virtual void OnRepourCheck( wxCommandEvent& event ) { event.Skip(); }
|
virtual void OnRepourCheck( wxCommandEvent& event ) { event.Skip(); }
|
||||||
virtual void OnButtonApplyClick( wxCommandEvent& event ) { event.Skip(); }
|
virtual void OnButtonApplyClick( wxCommandEvent& event ) { event.Skip(); }
|
||||||
|
|
||||||
|
|
|
@ -36,7 +36,7 @@
|
||||||
|
|
||||||
wxDEFINE_EVENT( EVT_ZONES_OVERVIEW_COUNT_CHANGE, wxCommandEvent );
|
wxDEFINE_EVENT( EVT_ZONES_OVERVIEW_COUNT_CHANGE, wxCommandEvent );
|
||||||
|
|
||||||
inline void MODEL_ZONES_OVERVIEW_TABLE::SortZoneContainers()
|
void MODEL_ZONES_OVERVIEW_TABLE::SortZoneContainers()
|
||||||
{
|
{
|
||||||
std::sort( m_filteredZoneContainers.begin(), m_filteredZoneContainers.end(),
|
std::sort( m_filteredZoneContainers.begin(), m_filteredZoneContainers.end(),
|
||||||
[]( std::shared_ptr<ZONE_PRIORITY_CONTAINER> const& l,
|
[]( std::shared_ptr<ZONE_PRIORITY_CONTAINER> const& l,
|
||||||
|
@ -48,13 +48,15 @@ inline void MODEL_ZONES_OVERVIEW_TABLE::SortZoneContainers()
|
||||||
} );
|
} );
|
||||||
}
|
}
|
||||||
|
|
||||||
inline void MODEL_ZONES_OVERVIEW_TABLE::OnRowCountChange()
|
|
||||||
|
void MODEL_ZONES_OVERVIEW_TABLE::OnRowCountChange()
|
||||||
{
|
{
|
||||||
wxCommandEvent rowCountChange( EVT_ZONES_OVERVIEW_COUNT_CHANGE );
|
wxCommandEvent rowCountChange( EVT_ZONES_OVERVIEW_COUNT_CHANGE );
|
||||||
rowCountChange.SetInt( GetCount() );
|
rowCountChange.SetInt( GetCount() );
|
||||||
wxPostEvent( m_dialog, rowCountChange );
|
wxPostEvent( m_dialog, rowCountChange );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static wxBitmap MakeBitmapForLayers( LSEQ const& layers, COLOR_SETTINGS const& settings,
|
static wxBitmap MakeBitmapForLayers( LSEQ const& layers, COLOR_SETTINGS const& settings,
|
||||||
const wxSize& aSize )
|
const wxSize& aSize )
|
||||||
{
|
{
|
||||||
|
@ -99,14 +101,20 @@ MODEL_ZONES_OVERVIEW_TABLE::MODEL_ZONES_OVERVIEW_TABLE( ZONE_PRIORITY_CONTAINER_
|
||||||
BOARD* a_pcb, PCB_BASE_FRAME* aPCB_FRAME,
|
BOARD* a_pcb, PCB_BASE_FRAME* aPCB_FRAME,
|
||||||
wxWindow* a_dialog ) :
|
wxWindow* a_dialog ) :
|
||||||
m_allZoneContainers( aZones ),
|
m_allZoneContainers( aZones ),
|
||||||
m_filteredZoneContainers( std::move( aZones ) ), m_pcb( a_pcb ), m_PCB_FRAME( aPCB_FRAME ),
|
m_filteredZoneContainers( std::move( aZones ) ),
|
||||||
m_dialog( a_dialog ), m_sortByName( true ), m_sortByNet( true )
|
m_pcb( a_pcb ),
|
||||||
|
m_PCB_FRAME( aPCB_FRAME ),
|
||||||
|
m_dialog( a_dialog ),
|
||||||
|
m_sortByName( true ),
|
||||||
|
m_sortByNet( true )
|
||||||
{
|
{
|
||||||
Reset( m_filteredZoneContainers.size() );
|
Reset( m_filteredZoneContainers.size() );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
MODEL_ZONES_OVERVIEW_TABLE::~MODEL_ZONES_OVERVIEW_TABLE() = default;
|
MODEL_ZONES_OVERVIEW_TABLE::~MODEL_ZONES_OVERVIEW_TABLE() = default;
|
||||||
|
|
||||||
|
|
||||||
void MODEL_ZONES_OVERVIEW_TABLE::GetValueByRow( wxVariant& aVariant, unsigned aRow,
|
void MODEL_ZONES_OVERVIEW_TABLE::GetValueByRow( wxVariant& aVariant, unsigned aRow,
|
||||||
unsigned aCol ) const
|
unsigned aCol ) const
|
||||||
{
|
{
|
||||||
|
@ -117,8 +125,14 @@ void MODEL_ZONES_OVERVIEW_TABLE::GetValueByRow( wxVariant& aVariant, unsigned aR
|
||||||
|
|
||||||
switch( aCol )
|
switch( aCol )
|
||||||
{
|
{
|
||||||
case NAME: aVariant = cur.GetZoneName(); break;
|
case NAME:
|
||||||
case NET: aVariant = cur.GetNet()->GetNetname(); break;
|
aVariant = cur.GetZoneName();
|
||||||
|
break;
|
||||||
|
|
||||||
|
case NET:
|
||||||
|
aVariant = cur.GetNet()->GetNetname();
|
||||||
|
break;
|
||||||
|
|
||||||
case LAYERS:
|
case LAYERS:
|
||||||
{
|
{
|
||||||
wxArrayString layers;
|
wxArrayString layers;
|
||||||
|
@ -131,49 +145,54 @@ void MODEL_ZONES_OVERVIEW_TABLE::GetValueByRow( wxVariant& aVariant, unsigned aR
|
||||||
MakeBitmapForLayers(
|
MakeBitmapForLayers(
|
||||||
cur.GetLayerSet().Seq(), *m_PCB_FRAME->GetColorSettings(),
|
cur.GetLayerSet().Seq(), *m_PCB_FRAME->GetColorSettings(),
|
||||||
{ LAYER_BAR_WIDTH, ZONE_MANAGER_PREFERENCE::LAYER_ICON_SIZE::HEIGHT } ) );
|
{ LAYER_BAR_WIDTH, ZONE_MANAGER_PREFERENCE::LAYER_ICON_SIZE::HEIGHT } ) );
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
break;
|
|
||||||
default: break;
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void MODEL_ZONES_OVERVIEW_TABLE::EnableFitterByName( bool aEnable )
|
void MODEL_ZONES_OVERVIEW_TABLE::EnableFitterByName( bool aEnable )
|
||||||
{
|
{
|
||||||
m_sortByName = aEnable;
|
m_sortByName = aEnable;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void MODEL_ZONES_OVERVIEW_TABLE::EnableFitterByNet( bool aEnable )
|
void MODEL_ZONES_OVERVIEW_TABLE::EnableFitterByNet( bool aEnable )
|
||||||
{
|
{
|
||||||
m_sortByNet = aEnable;
|
m_sortByNet = aEnable;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
bool MODEL_ZONES_OVERVIEW_TABLE::SetValueByRow( const wxVariant& aVariant, unsigned aRow,
|
bool MODEL_ZONES_OVERVIEW_TABLE::SetValueByRow( const wxVariant& aVariant, unsigned aRow,
|
||||||
unsigned aCol )
|
unsigned aCol )
|
||||||
{
|
{
|
||||||
WXUNUSED( aVariant )
|
|
||||||
WXUNUSED( aRow )
|
|
||||||
WXUNUSED( aCol )
|
|
||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
unsigned int MODEL_ZONES_OVERVIEW_TABLE::GetCount() const
|
unsigned int MODEL_ZONES_OVERVIEW_TABLE::GetCount() const
|
||||||
{
|
{
|
||||||
return m_filteredZoneContainers.size();
|
return m_filteredZoneContainers.size();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
ZONE* MODEL_ZONES_OVERVIEW_TABLE::GetZone( wxDataViewItem const& aItem ) const
|
ZONE* MODEL_ZONES_OVERVIEW_TABLE::GetZone( wxDataViewItem const& aItem ) const
|
||||||
{
|
{
|
||||||
if( !aItem.IsOk() )
|
if( !aItem.IsOk() )
|
||||||
return {};
|
return nullptr;
|
||||||
|
|
||||||
unsigned int aRow = GetRow( aItem );
|
unsigned int aRow = GetRow( aItem );
|
||||||
|
|
||||||
if( aRow + 1 > GetCount() )
|
if( aRow + 1 > GetCount() )
|
||||||
return {};
|
return nullptr;
|
||||||
|
|
||||||
return &m_filteredZoneContainers[aRow]->GetZone();
|
return &m_filteredZoneContainers[aRow]->GetZone();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
wxDataViewItem MODEL_ZONES_OVERVIEW_TABLE::GetItemByZone( ZONE* aZone ) const
|
wxDataViewItem MODEL_ZONES_OVERVIEW_TABLE::GetItemByZone( ZONE* aZone ) const
|
||||||
{
|
{
|
||||||
if( !aZone )
|
if( !aZone )
|
||||||
|
@ -195,19 +214,22 @@ std::optional<unsigned> MODEL_ZONES_OVERVIEW_TABLE::MoveZoneIndex( unsigned
|
||||||
switch( aMovement )
|
switch( aMovement )
|
||||||
{
|
{
|
||||||
case ZONE_INDEX_MOVEMENT::MOVE_UP:
|
case ZONE_INDEX_MOVEMENT::MOVE_UP:
|
||||||
{
|
if( aIndex >= 1 && GetCount() > 1 )
|
||||||
return aIndex >= 1 && GetCount() > 1 ? SwapZonePriority( aIndex, aIndex - 1 )
|
return SwapZonePriority( aIndex, aIndex - 1 );
|
||||||
: std::optional<unsigned>{};
|
|
||||||
}
|
break;
|
||||||
|
|
||||||
case ZONE_INDEX_MOVEMENT::MOVE_DOWN:
|
case ZONE_INDEX_MOVEMENT::MOVE_DOWN:
|
||||||
{
|
if( aIndex + 1 < GetCount() )
|
||||||
return aIndex + 1 < GetCount() ? SwapZonePriority( aIndex, aIndex + 1 )
|
return SwapZonePriority( aIndex, aIndex + 1 );
|
||||||
: std::optional<unsigned>{};
|
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
return {};
|
return std::optional<unsigned>{};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
std::optional<unsigned> MODEL_ZONES_OVERVIEW_TABLE::SwapZonePriority( unsigned aDragIndex,
|
std::optional<unsigned> MODEL_ZONES_OVERVIEW_TABLE::SwapZonePriority( unsigned aDragIndex,
|
||||||
unsigned aDropIndex )
|
unsigned aDropIndex )
|
||||||
{
|
{
|
||||||
|
@ -255,12 +277,14 @@ wxDataViewItem MODEL_ZONES_OVERVIEW_TABLE::ApplyFilter( wxString const& aFilterT
|
||||||
m_filteredZoneContainers.push_back( container );
|
m_filteredZoneContainers.push_back( container );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
SortZoneContainers();
|
SortZoneContainers();
|
||||||
Reset( GetCount() );
|
Reset( GetCount() );
|
||||||
OnRowCountChange();
|
OnRowCountChange();
|
||||||
return GetItemByZone( selected_zone );
|
return GetItemByZone( selected_zone );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
wxDataViewItem MODEL_ZONES_OVERVIEW_TABLE::ClearFilter( wxDataViewItem aSelection )
|
wxDataViewItem MODEL_ZONES_OVERVIEW_TABLE::ClearFilter( wxDataViewItem aSelection )
|
||||||
{
|
{
|
||||||
if( !GetAllZonesCount() )
|
if( !GetAllZonesCount() )
|
||||||
|
|
|
@ -43,12 +43,14 @@ wxDECLARE_EVENT( EVT_ZONES_OVERVIEW_COUNT_CHANGE, wxCommandEvent );
|
||||||
|
|
||||||
using ZONE_PRIORITY_CONTAINER_LIST = std::vector<std::shared_ptr<ZONE_PRIORITY_CONTAINER>>;
|
using ZONE_PRIORITY_CONTAINER_LIST = std::vector<std::shared_ptr<ZONE_PRIORITY_CONTAINER>>;
|
||||||
|
|
||||||
|
|
||||||
enum class ZONE_INDEX_MOVEMENT
|
enum class ZONE_INDEX_MOVEMENT
|
||||||
{
|
{
|
||||||
MOVE_UP,
|
MOVE_UP,
|
||||||
MOVE_DOWN
|
MOVE_DOWN
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
class MODEL_ZONES_OVERVIEW_TABLE : public wxDataViewVirtualListModel
|
class MODEL_ZONES_OVERVIEW_TABLE : public wxDataViewVirtualListModel
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
@ -64,10 +66,7 @@ public:
|
||||||
enum WIDTH_SETTING
|
enum WIDTH_SETTING
|
||||||
{
|
{
|
||||||
NAME_WIDTH = 128,
|
NAME_WIDTH = 128,
|
||||||
LAYER_BAR_WIDTH = 16,
|
LAYER_BAR_WIDTH = 16
|
||||||
//NOTE - Prevent the hor scroll bar
|
|
||||||
RESERVED = 10,
|
|
||||||
MINIMAL_WIDTH = NAME_WIDTH + LAYER_BAR_WIDTH + RESERVED
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -75,9 +74,9 @@ public:
|
||||||
{
|
{
|
||||||
//NOTE - Build the column name dynamicly in case the display language changed
|
//NOTE - Build the column name dynamicly in case the display language changed
|
||||||
const std::map<int, wxString> ColNames = std::map<int, wxString>{
|
const std::map<int, wxString> ColNames = std::map<int, wxString>{
|
||||||
std::make_pair( NAME, _( "Name" ) ), std::make_pair( NET, _( "Net" ) ),
|
std::make_pair( NAME, _( "Name" ) ),
|
||||||
|
std::make_pair( NET, _( "Net" ) ),
|
||||||
std::make_pair( LAYERS, _( "Layers" ) )
|
std::make_pair( LAYERS, _( "Layers" ) )
|
||||||
|
|
||||||
};
|
};
|
||||||
return ColNames;
|
return ColNames;
|
||||||
}
|
}
|
||||||
|
@ -140,7 +139,6 @@ private:
|
||||||
|
|
||||||
void OnRowCountChange();
|
void OnRowCountChange();
|
||||||
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
ZONE_PRIORITY_CONTAINER_LIST m_allZoneContainers;
|
ZONE_PRIORITY_CONTAINER_LIST m_allZoneContainers;
|
||||||
ZONE_PRIORITY_CONTAINER_LIST m_filteredZoneContainers;
|
ZONE_PRIORITY_CONTAINER_LIST m_filteredZoneContainers;
|
||||||
|
|
|
@ -24,7 +24,6 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "panel_zone_properties.h"
|
#include "panel_zone_properties.h"
|
||||||
#include "zone_manager/panel_zone_properties_base.h"
|
|
||||||
#include "zone_manager/zones_container.h"
|
#include "zone_manager/zones_container.h"
|
||||||
|
|
||||||
#include <wx/radiobut.h>
|
#include <wx/radiobut.h>
|
||||||
|
@ -33,13 +32,9 @@
|
||||||
#include <pcb_edit_frame.h>
|
#include <pcb_edit_frame.h>
|
||||||
#include <pcbnew_settings.h>
|
#include <pcbnew_settings.h>
|
||||||
#include <wx/string.h>
|
#include <wx/string.h>
|
||||||
#include <zones.h>
|
|
||||||
#include <widgets/unit_binder.h>
|
#include <widgets/unit_binder.h>
|
||||||
#include <zone.h>
|
|
||||||
#include <pad.h>
|
#include <pad.h>
|
||||||
#include <board.h>
|
|
||||||
#include <trigo.h>
|
#include <trigo.h>
|
||||||
#include <eda_pattern_match.h>
|
|
||||||
|
|
||||||
#include <dialog_copper_zones_base.h>
|
#include <dialog_copper_zones_base.h>
|
||||||
#include <string_utils.h>
|
#include <string_utils.h>
|
||||||
|
@ -49,7 +44,8 @@ wxDEFINE_EVENT( EVT_ZONE_NAME_UPDATE, wxCommandEvent );
|
||||||
PANEL_ZONE_PROPERTIES::PANEL_ZONE_PROPERTIES( wxWindow* aParent, PCB_BASE_FRAME* aPCB_FRAME,
|
PANEL_ZONE_PROPERTIES::PANEL_ZONE_PROPERTIES( wxWindow* aParent, PCB_BASE_FRAME* aPCB_FRAME,
|
||||||
ZONES_CONTAINER& aZoneContainer ) :
|
ZONES_CONTAINER& aZoneContainer ) :
|
||||||
PANEL_ZONE_PROPERTIES_BASE( aParent ),
|
PANEL_ZONE_PROPERTIES_BASE( aParent ),
|
||||||
m_ZoneContainer( aZoneContainer ), m_PCB_Frame( aPCB_FRAME ),
|
m_ZoneContainer( aZoneContainer ),
|
||||||
|
m_PCB_Frame( aPCB_FRAME ),
|
||||||
m_cornerSmoothingType( ZONE_SETTINGS::SMOOTHING_UNDEFINED ),
|
m_cornerSmoothingType( ZONE_SETTINGS::SMOOTHING_UNDEFINED ),
|
||||||
m_outlineHatchPitch( aPCB_FRAME, m_stBorderHatchPitchText, m_outlineHatchPitchCtrl,
|
m_outlineHatchPitch( aPCB_FRAME, m_stBorderHatchPitchText, m_outlineHatchPitchCtrl,
|
||||||
m_outlineHatchUnits ),
|
m_outlineHatchUnits ),
|
||||||
|
@ -97,6 +93,7 @@ bool PANEL_ZONE_PROPERTIES::TransferZoneSettingsToWindow()
|
||||||
{
|
{
|
||||||
if( !m_settings )
|
if( !m_settings )
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
m_cbLocked->SetValue( m_settings->m_Locked );
|
m_cbLocked->SetValue( m_settings->m_Locked );
|
||||||
m_cornerSmoothingChoice->SetSelection( m_settings->GetCornerSmoothingType() );
|
m_cornerSmoothingChoice->SetSelection( m_settings->GetCornerSmoothingType() );
|
||||||
m_cornerRadius.SetValue( m_settings->GetCornerRadius() );
|
m_cornerRadius.SetValue( m_settings->GetCornerRadius() );
|
||||||
|
@ -210,6 +207,7 @@ bool PANEL_ZONE_PROPERTIES::TransferZoneSettingsFromWindow()
|
||||||
{
|
{
|
||||||
if( !m_settings )
|
if( !m_settings )
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if( m_GridStyleCtrl->GetSelection() > 0 )
|
if( m_GridStyleCtrl->GetSelection() > 0 )
|
||||||
m_settings->m_FillMode = ZONE_FILL_MODE::HATCH_PATTERN;
|
m_settings->m_FillMode = ZONE_FILL_MODE::HATCH_PATTERN;
|
||||||
else
|
else
|
||||||
|
@ -217,9 +215,10 @@ bool PANEL_ZONE_PROPERTIES::TransferZoneSettingsFromWindow()
|
||||||
|
|
||||||
if( !AcceptOptions() )
|
if( !AcceptOptions() )
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
m_settings->m_HatchOrientation = m_gridStyleRotation.GetAngleValue();
|
m_settings->m_HatchOrientation = m_gridStyleRotation.GetAngleValue();
|
||||||
m_settings->m_HatchThickness = m_gridStyleThickness.GetValue();
|
m_settings->m_HatchThickness = m_gridStyleThickness.GetIntValue();
|
||||||
m_settings->m_HatchGap = m_gridStyleGap.GetValue();
|
m_settings->m_HatchGap = m_gridStyleGap.GetIntValue();
|
||||||
m_settings->m_HatchSmoothingLevel = m_spinCtrlSmoothLevel->GetValue();
|
m_settings->m_HatchSmoothingLevel = m_spinCtrlSmoothLevel->GetValue();
|
||||||
m_settings->m_HatchSmoothingValue = m_spinCtrlSmoothValue->GetValue();
|
m_settings->m_HatchSmoothingValue = m_spinCtrlSmoothValue->GetValue();
|
||||||
|
|
||||||
|
@ -245,7 +244,7 @@ bool PANEL_ZONE_PROPERTIES::AcceptOptions( bool aUseExportableSetupOnly )
|
||||||
|
|
||||||
if( m_settings->m_FillMode == ZONE_FILL_MODE::HATCH_PATTERN )
|
if( m_settings->m_FillMode == ZONE_FILL_MODE::HATCH_PATTERN )
|
||||||
{
|
{
|
||||||
int minThickness = m_minThickness.GetValue();
|
int minThickness = m_minThickness.GetIntValue();
|
||||||
|
|
||||||
if( !m_gridStyleThickness.Validate( minThickness, INT_MAX ) )
|
if( !m_gridStyleThickness.Validate( minThickness, INT_MAX ) )
|
||||||
return false;
|
return false;
|
||||||
|
@ -273,17 +272,17 @@ bool PANEL_ZONE_PROPERTIES::AcceptOptions( bool aUseExportableSetupOnly )
|
||||||
pcbIUScale.mmToIU( ZONE_BORDER_HATCH_MAXDIST_MM ) ) )
|
pcbIUScale.mmToIU( ZONE_BORDER_HATCH_MAXDIST_MM ) ) )
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
m_settings->m_BorderHatchPitch = m_outlineHatchPitch.GetValue();
|
m_settings->m_BorderHatchPitch = m_outlineHatchPitch.GetIntValue();
|
||||||
|
|
||||||
m_settings->m_ZoneClearance = m_clearance.GetValue();
|
m_settings->m_ZoneClearance = m_clearance.GetIntValue();
|
||||||
m_settings->m_ZoneMinThickness = m_minThickness.GetValue();
|
m_settings->m_ZoneMinThickness = m_minThickness.GetIntValue();
|
||||||
|
|
||||||
m_settings->SetCornerSmoothingType( m_cornerSmoothingChoice->GetSelection() );
|
m_settings->SetCornerSmoothingType( m_cornerSmoothingChoice->GetSelection() );
|
||||||
|
|
||||||
m_settings->SetCornerRadius( m_settings->GetCornerSmoothingType()
|
if( m_settings->GetCornerSmoothingType() == ZONE_SETTINGS::SMOOTHING_NONE )
|
||||||
== ZONE_SETTINGS::SMOOTHING_NONE
|
m_settings->SetCornerRadius( 0 );
|
||||||
? 0
|
else
|
||||||
: m_cornerRadius.GetValue() );
|
m_settings->SetCornerRadius( m_cornerRadius.GetIntValue() );
|
||||||
|
|
||||||
m_settings->m_Locked = m_cbLocked->GetValue();
|
m_settings->m_Locked = m_cbLocked->GetValue();
|
||||||
|
|
||||||
|
|
|
@ -197,7 +197,7 @@ PANEL_ZONE_PROPERTIES_BASE::PANEL_ZONE_PROPERTIES_BASE( wxWindow* parent, wxWind
|
||||||
bMiddleColumn->Add( sbSizer5, 1, wxEXPAND|wxRIGHT, 5 );
|
bMiddleColumn->Add( sbSizer5, 1, wxEXPAND|wxRIGHT, 5 );
|
||||||
|
|
||||||
|
|
||||||
bSizerMiddle->Add( bMiddleColumn, 1, wxBOTTOM|wxEXPAND|wxTOP, 5 );
|
bSizerMiddle->Add( bMiddleColumn, 1, wxEXPAND|wxALL, 5 );
|
||||||
|
|
||||||
wxStaticBoxSizer* sbSizerZoneStyle;
|
wxStaticBoxSizer* sbSizerZoneStyle;
|
||||||
sbSizerZoneStyle = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Fill") ), wxVERTICAL );
|
sbSizerZoneStyle = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Fill") ), wxVERTICAL );
|
||||||
|
|
|
@ -1055,7 +1055,7 @@
|
||||||
</object>
|
</object>
|
||||||
<object class="sizeritem" expanded="true">
|
<object class="sizeritem" expanded="true">
|
||||||
<property name="border">5</property>
|
<property name="border">5</property>
|
||||||
<property name="flag">wxBOTTOM|wxEXPAND|wxTOP</property>
|
<property name="flag">wxEXPAND|wxALL</property>
|
||||||
<property name="proportion">1</property>
|
<property name="proportion">1</property>
|
||||||
<object class="wxBoxSizer" expanded="true">
|
<object class="wxBoxSizer" expanded="true">
|
||||||
<property name="minimum_size"></property>
|
<property name="minimum_size"></property>
|
||||||
|
|
|
@ -27,13 +27,15 @@
|
||||||
|
|
||||||
|
|
||||||
//NOTE - Is recording in the setting file needed ?
|
//NOTE - Is recording in the setting file needed ?
|
||||||
static bool RepourOnClose = false;
|
static bool s_refillOnClose = false;
|
||||||
|
|
||||||
|
|
||||||
bool ZONE_MANAGER_PREFERENCE::GetRepourOnClose()
|
bool ZONE_MANAGER_PREFERENCE::GetRepourOnClose()
|
||||||
{
|
{
|
||||||
return RepourOnClose;
|
return s_refillOnClose;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
wxColour ZONE_MANAGER_PREFERENCE::GetCanvasBackgroundColor()
|
wxColour ZONE_MANAGER_PREFERENCE::GetCanvasBackgroundColor()
|
||||||
{
|
{
|
||||||
if( KIPLATFORM::UI::IsDarkTheme() )
|
if( KIPLATFORM::UI::IsDarkTheme() )
|
||||||
|
@ -42,6 +44,7 @@ wxColour ZONE_MANAGER_PREFERENCE::GetCanvasBackgroundColor()
|
||||||
return wxColour( 238, 243, 243 );
|
return wxColour( 238, 243, 243 );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
wxColour ZONE_MANAGER_PREFERENCE::GetBoundBoundingFillColor()
|
wxColour ZONE_MANAGER_PREFERENCE::GetBoundBoundingFillColor()
|
||||||
{
|
{
|
||||||
if( KIPLATFORM::UI::IsDarkTheme() )
|
if( KIPLATFORM::UI::IsDarkTheme() )
|
||||||
|
@ -49,7 +52,9 @@ wxColour ZONE_MANAGER_PREFERENCE::GetBoundBoundingFillColor()
|
||||||
|
|
||||||
return wxColour( 84, 84, 84, 40 );
|
return wxColour( 84, 84, 84, 40 );
|
||||||
}
|
}
|
||||||
void ZONE_MANAGER_PREFERENCE::SetRepourOnClose( bool aRepour )
|
|
||||||
|
|
||||||
|
void ZONE_MANAGER_PREFERENCE::SetRefillOnClose( bool aRepour )
|
||||||
{
|
{
|
||||||
RepourOnClose = aRepour;
|
s_refillOnClose = aRepour;
|
||||||
}
|
}
|
||||||
|
|
|
@ -45,7 +45,7 @@ public:
|
||||||
* @brief Should all the zones be re-poured on dialog close
|
* @brief Should all the zones be re-poured on dialog close
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
static void SetRepourOnClose( bool aRepour );
|
static void SetRefillOnClose( bool aRepour );
|
||||||
|
|
||||||
static bool GetRepourOnClose();
|
static bool GetRepourOnClose();
|
||||||
};
|
};
|
||||||
|
|
|
@ -40,29 +40,26 @@ class ZONE_PRIORITY_CONTAINER : public ZONE_MANAGEMENT_BASE
|
||||||
|
|
||||||
public:
|
public:
|
||||||
ZONE_PRIORITY_CONTAINER( std::shared_ptr<ZONE> aZone, unsigned aInitialIndex ) :
|
ZONE_PRIORITY_CONTAINER( std::shared_ptr<ZONE> aZone, unsigned aInitialIndex ) :
|
||||||
m_zone( std::move( aZone ) ), m_initialPriority( aInitialIndex ),
|
m_zone( std::move( aZone ) ),
|
||||||
|
m_initialPriority( aInitialIndex ),
|
||||||
m_currentPriority( aInitialIndex )
|
m_currentPriority( aInitialIndex )
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
ZONE_PRIORITY_CONTAINER() = delete;
|
ZONE_PRIORITY_CONTAINER() = delete;
|
||||||
|
|
||||||
~ZONE_PRIORITY_CONTAINER() override = default;
|
~ZONE_PRIORITY_CONTAINER() override = default;
|
||||||
|
|
||||||
bool PriorityChanged() const { return m_initialPriority != m_currentPriority; }
|
bool PriorityChanged() const { return m_initialPriority != m_currentPriority; }
|
||||||
|
|
||||||
void SetCurrentPriority( unsigned aPriority ) { m_currentPriority = aPriority; }
|
|
||||||
|
|
||||||
unsigned GetCurrentPriority() const { return m_currentPriority; }
|
unsigned GetCurrentPriority() const { return m_currentPriority; }
|
||||||
|
|
||||||
unsigned GetInitialPriority() const { return m_initialPriority; }
|
|
||||||
|
|
||||||
void OnUserConfirmChange() override { m_zone->SetAssignedPriority( m_currentPriority ); }
|
void OnUserConfirmChange() override { m_zone->SetAssignedPriority( m_currentPriority ); }
|
||||||
|
|
||||||
ZONE const& GetZone() const { return *m_zone; }
|
ZONE const& GetZone() const { return *m_zone; }
|
||||||
|
|
||||||
ZONE& GetZone() { return *m_zone; }
|
ZONE& GetZone() { return *m_zone; }
|
||||||
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
std::shared_ptr<ZONE> m_zone;
|
std::shared_ptr<ZONE> m_zone;
|
||||||
const unsigned m_initialPriority;
|
const unsigned m_initialPriority;
|
||||||
|
|
|
@ -56,7 +56,6 @@ public:
|
||||||
protected:
|
protected:
|
||||||
virtual void ActivateSelectedZone( ZONE* new_zone ) = 0;
|
virtual void ActivateSelectedZone( ZONE* new_zone ) = 0;
|
||||||
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
ZONE* m_zone{};
|
ZONE* m_zone{};
|
||||||
};
|
};
|
||||||
|
|
|
@ -42,7 +42,7 @@ ZONES_CONTAINER::ZONES_CONTAINER( BOARD* aBoard ) : m_originalZoneList( aBoard->
|
||||||
{
|
{
|
||||||
std::shared_ptr<ZONE> zone_clone =
|
std::shared_ptr<ZONE> zone_clone =
|
||||||
std::shared_ptr<ZONE>( static_cast<ZONE*>( zone->Clone() ) );
|
std::shared_ptr<ZONE>( static_cast<ZONE*>( zone->Clone() ) );
|
||||||
m_zonesColoneMap.try_emplace( zone, zone_clone );
|
m_zonesCloneMap.try_emplace( zone, zone_clone );
|
||||||
m_clonedZoneList.push_back( zone_clone.get() );
|
m_clonedZoneList.push_back( zone_clone.get() );
|
||||||
clonedZones.push_back( std::move( zone_clone ) );
|
clonedZones.push_back( std::move( zone_clone ) );
|
||||||
}
|
}
|
||||||
|
@ -84,10 +84,8 @@ void ZONES_CONTAINER::OnUserConfirmChange()
|
||||||
FlushZoneSettingsChange();
|
FlushZoneSettingsChange();
|
||||||
FlushPriorityChange();
|
FlushPriorityChange();
|
||||||
|
|
||||||
for( auto& [c, v] : m_zonesColoneMap )
|
for( auto& [ zone, zoneClone ] : m_zonesCloneMap )
|
||||||
{
|
*zone = *zoneClone;
|
||||||
*c = *v;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void ZONES_CONTAINER::FlushZoneSettingsChange()
|
void ZONES_CONTAINER::FlushZoneSettingsChange()
|
||||||
|
@ -115,9 +113,7 @@ bool ZONES_CONTAINER::FlushPriorityChange()
|
||||||
if( priorityChanged )
|
if( priorityChanged )
|
||||||
{
|
{
|
||||||
for( std::shared_ptr<ZONE_PRIORITY_CONTAINER>& c : m_zonesPriorityContainer )
|
for( std::shared_ptr<ZONE_PRIORITY_CONTAINER>& c : m_zonesPriorityContainer )
|
||||||
{
|
|
||||||
c->OnUserConfirmChange();
|
c->OnUserConfirmChange();
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return priorityChanged;
|
return priorityChanged;
|
||||||
|
|
|
@ -73,7 +73,7 @@ public:
|
||||||
void OnUserConfirmChange() override;
|
void OnUserConfirmChange() override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
std::unordered_map<ZONE*, std::shared_ptr<ZONE>> m_zonesColoneMap;
|
std::unordered_map<ZONE*, std::shared_ptr<ZONE>> m_zonesCloneMap;
|
||||||
std::unordered_map<ZONE*, std::shared_ptr<ZONE_SETTINGS>> m_zoneSettings;
|
std::unordered_map<ZONE*, std::shared_ptr<ZONE_SETTINGS>> m_zoneSettings;
|
||||||
std::vector<std::shared_ptr<ZONE_PRIORITY_CONTAINER>> m_zonesPriorityContainer;
|
std::vector<std::shared_ptr<ZONE_PRIORITY_CONTAINER>> m_zonesPriorityContainer;
|
||||||
std::vector<ZONE*> m_clonedZoneList;
|
std::vector<ZONE*> m_clonedZoneList;
|
||||||
|
|
|
@ -107,14 +107,4 @@ int InvokeCopperZonesEditor( PCB_BASE_FRAME* aCaller, ZONE_SETTINGS* aSettings,
|
||||||
int InvokeRuleAreaEditor( PCB_BASE_FRAME* aCaller, ZONE_SETTINGS* aSettings,
|
int InvokeRuleAreaEditor( PCB_BASE_FRAME* aCaller, ZONE_SETTINGS* aSettings,
|
||||||
CONVERT_SETTINGS* aConvertSettings = nullptr );
|
CONVERT_SETTINGS* aConvertSettings = nullptr );
|
||||||
|
|
||||||
/**
|
|
||||||
* Function InvokeZonesManager
|
|
||||||
* invokes up a modal dialog window for zones manager.
|
|
||||||
*
|
|
||||||
* @param aCaller is the PCB_BASE_FRAME calling parent window for the modal dialog,
|
|
||||||
* and it gives access to the BOARD through PCB_BASE_FRAME::GetBoard().
|
|
||||||
* @return int - tells if user aborted, or edited the zones
|
|
||||||
*/
|
|
||||||
int InvokeZonesManager( PCB_BASE_FRAME* aCall, ZONE_SETTINGS* aSettings );
|
|
||||||
|
|
||||||
#endif // ZONES_H_
|
#endif // ZONES_H_
|
||||||
|
|
Loading…
Reference in New Issue