Improved keepout zone properties dialog
- Checkboxes next to layers - OK button is disabled if no layers are selected
This commit is contained in:
parent
c977c88a10
commit
42be6bb966
|
@ -61,9 +61,6 @@ private:
|
|||
ZONE_SETTINGS m_zonesettings;
|
||||
ZONE_SETTINGS* m_ptr;
|
||||
|
||||
std::vector<LAYER_NUM> m_layerId; ///< Handle the real layer number from layer
|
||||
///< name position in m_LayerSelectionCtrl
|
||||
|
||||
/**
|
||||
* Function initDialog
|
||||
* fills in the dialog controls using the current settings.
|
||||
|
@ -72,6 +69,8 @@ private:
|
|||
|
||||
virtual void OnOkClick( wxCommandEvent& event ) override;
|
||||
|
||||
virtual void OnLayerSelection( wxDataViewEvent& event ) override;
|
||||
|
||||
/**
|
||||
* Function AcceptOptionsForKeepOut
|
||||
* Test validity of options, and copy options in m_zonesettings, for keepout zones
|
||||
|
@ -80,15 +79,15 @@ private:
|
|||
bool AcceptOptionsForKeepOut();
|
||||
|
||||
/**
|
||||
* Function makeLayerBitmap
|
||||
* creates the colored rectangle bitmaps used in the layer selection widget.
|
||||
* Function makeLayerIcon
|
||||
* creates the colored rectangle icons used in the layer selection widget.
|
||||
* @param aColor is the color to fill the rectangle with.
|
||||
*/
|
||||
wxBitmap makeLayerBitmap( COLOR4D aColor );
|
||||
wxIcon makeLayerIcon( COLOR4D aColor );
|
||||
};
|
||||
|
||||
|
||||
#define LAYER_BITMAP_SIZE_X 20
|
||||
#define LAYER_BITMAP_SIZE_X 25
|
||||
#define LAYER_BITMAP_SIZE_Y 15
|
||||
|
||||
ZONE_EDIT_T InvokeKeepoutAreaEditor( PCB_BASE_FRAME* aCaller, ZONE_SETTINGS* aSettings )
|
||||
|
@ -145,52 +144,50 @@ void DIALOG_KEEPOUT_AREA_PROPERTIES::initDialog()
|
|||
break;
|
||||
}
|
||||
|
||||
// Create one column in m_LayerSelectionCtrl
|
||||
wxListItem column0;
|
||||
column0.SetId( 0 );
|
||||
m_LayerSelectionCtrl->InsertColumn( 0, column0 );
|
||||
|
||||
wxImageList* imageList = new wxImageList( LAYER_BITMAP_SIZE_X, LAYER_BITMAP_SIZE_Y );
|
||||
m_LayerSelectionCtrl->AssignImageList( imageList, wxIMAGE_LIST_SMALL );
|
||||
|
||||
// Build copper layer list and append to layer widget
|
||||
LSET show = LSET::AllCuMask( board->GetCopperLayerCount() );
|
||||
|
||||
auto* checkColumn = m_layers->AppendToggleColumn( wxEmptyString );
|
||||
auto* layerColumn = m_layers->AppendIconTextColumn( wxEmptyString );
|
||||
|
||||
wxVector<wxVariant> row;
|
||||
|
||||
int imgIdx = 0;
|
||||
|
||||
for( LSEQ cu_stack = show.UIOrder(); cu_stack; ++cu_stack, imgIdx++ )
|
||||
{
|
||||
PCB_LAYER_ID layer = *cu_stack;
|
||||
|
||||
m_layerId.push_back( layer );
|
||||
|
||||
msg = board->GetLayerName( layer );
|
||||
|
||||
COLOR4D layerColor = m_parent->Settings().Colors().GetLayerColor( layer );
|
||||
|
||||
imageList->Add( makeLayerBitmap( layerColor ) );
|
||||
row.clear();
|
||||
|
||||
int itemIndex = m_LayerSelectionCtrl->InsertItem(
|
||||
m_LayerSelectionCtrl->GetItemCount(), msg, imgIdx );
|
||||
row.push_back( m_zonesettings.m_Layers.test( layer ) );
|
||||
|
||||
if( m_zonesettings.m_CurrentZone_Layer == layer )
|
||||
{
|
||||
//m_LayerSelectionCtrl->Select( itemIndex );
|
||||
}
|
||||
auto iconItem = wxDataViewIconText( msg, makeLayerIcon( layerColor ) );
|
||||
|
||||
if( m_zonesettings.m_Layers.test( layer ) )
|
||||
{
|
||||
m_LayerSelectionCtrl->Select( itemIndex );
|
||||
}
|
||||
row.push_back( wxVariant( iconItem ) );
|
||||
|
||||
m_layers->AppendItem( row );
|
||||
|
||||
}
|
||||
|
||||
m_LayerSelectionCtrl->SetColumnWidth( 0, wxLIST_AUTOSIZE);
|
||||
|
||||
// Init keepout parameters:
|
||||
m_cbTracksCtrl->SetValue( m_zonesettings.GetDoNotAllowTracks() );
|
||||
m_cbViasCtrl->SetValue( m_zonesettings.GetDoNotAllowVias() );
|
||||
m_cbCopperPourCtrl->SetValue( m_zonesettings.GetDoNotAllowCopperPour() );
|
||||
|
||||
checkColumn->SetWidth( wxCOL_WIDTH_AUTOSIZE );
|
||||
checkColumn->SetMinWidth( 50 );
|
||||
layerColumn->SetMinWidth( 350 );
|
||||
|
||||
m_layers->SetExpanderColumn( layerColumn );
|
||||
|
||||
m_layers->Update();
|
||||
|
||||
Update();
|
||||
}
|
||||
|
||||
|
||||
|
@ -204,6 +201,31 @@ void DIALOG_KEEPOUT_AREA_PROPERTIES::OnOkClick( wxCommandEvent& event )
|
|||
}
|
||||
|
||||
|
||||
void DIALOG_KEEPOUT_AREA_PROPERTIES::OnLayerSelection( wxDataViewEvent& event )
|
||||
{
|
||||
if( event.GetColumn() != 0 )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
wxDataViewItem item = event.GetItem();
|
||||
|
||||
int row = m_layers->ItemToRow( item );
|
||||
|
||||
bool selected = m_layers->GetToggleValue( row, 0 );
|
||||
|
||||
BOARD* board = m_parent->GetBoard();
|
||||
LSEQ cu_stack = LSET::AllCuMask( board->GetCopperLayerCount() ).UIOrder();
|
||||
|
||||
if( row < cu_stack.size() )
|
||||
{
|
||||
m_zonesettings.m_Layers.set( cu_stack[ row ], selected );
|
||||
}
|
||||
|
||||
m_sdbSizerButtonsOK->Enable( m_zonesettings.m_Layers.count() > 0 );
|
||||
}
|
||||
|
||||
|
||||
bool DIALOG_KEEPOUT_AREA_PROPERTIES::AcceptOptionsForKeepOut()
|
||||
{
|
||||
// Init keepout parameters:
|
||||
|
@ -222,38 +244,12 @@ bool DIALOG_KEEPOUT_AREA_PROPERTIES::AcceptOptionsForKeepOut()
|
|||
return false;
|
||||
}
|
||||
|
||||
// Copy the layers across
|
||||
LSET layers;
|
||||
|
||||
for( int ii = 0; ii < m_LayerSelectionCtrl->GetItemCount(); ii++ )
|
||||
{
|
||||
if( m_LayerSelectionCtrl->IsSelected( ii ) )
|
||||
{
|
||||
layers.set( ToLAYER_ID( m_layerId[ii] ) );
|
||||
}
|
||||
}
|
||||
|
||||
if( layers.count() == 0 )
|
||||
if( m_zonesettings.m_Layers.count() == 0 )
|
||||
{
|
||||
DisplayError( NULL, _( "No layers selected." ) );
|
||||
return false;
|
||||
}
|
||||
|
||||
m_zonesettings.m_Layers = layers;
|
||||
|
||||
// Get the layer selection for this zone
|
||||
int ii = m_LayerSelectionCtrl->GetFirstSelected();
|
||||
|
||||
if( ii < 0 )
|
||||
{
|
||||
DisplayError( NULL, _( "No layer selected." ) );
|
||||
return false;
|
||||
}
|
||||
|
||||
m_zonesettings.m_CurrentZone_Layer = ToLAYER_ID( m_layerId[ii] );
|
||||
|
||||
// Set zone layers
|
||||
|
||||
switch( m_OutlineAppearanceCtrl->GetSelection() )
|
||||
{
|
||||
case 0:
|
||||
|
@ -286,7 +282,7 @@ bool DIALOG_KEEPOUT_AREA_PROPERTIES::AcceptOptionsForKeepOut()
|
|||
}
|
||||
|
||||
|
||||
wxBitmap DIALOG_KEEPOUT_AREA_PROPERTIES::makeLayerBitmap( COLOR4D aColor )
|
||||
wxIcon DIALOG_KEEPOUT_AREA_PROPERTIES::makeLayerIcon( COLOR4D aColor )
|
||||
{
|
||||
wxBitmap bitmap( LAYER_BITMAP_SIZE_X, LAYER_BITMAP_SIZE_Y );
|
||||
wxBrush brush;
|
||||
|
@ -299,5 +295,9 @@ wxBitmap DIALOG_KEEPOUT_AREA_PROPERTIES::makeLayerBitmap( COLOR4D aColor )
|
|||
iconDC.SetBrush( brush );
|
||||
iconDC.DrawRectangle( 0, 0, LAYER_BITMAP_SIZE_X, LAYER_BITMAP_SIZE_Y );
|
||||
|
||||
return bitmap;
|
||||
wxIcon icon;
|
||||
|
||||
icon.CopyFromBitmap( bitmap );
|
||||
|
||||
return icon;
|
||||
}
|
||||
|
|
|
@ -10,12 +10,13 @@
|
|||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
BEGIN_EVENT_TABLE( DIALOG_KEEPOUT_AREA_PROPERTIES_BASE, DIALOG_SHIM )
|
||||
EVT_DATAVIEW_ITEM_VALUE_CHANGED( wxID_ANY, DIALOG_KEEPOUT_AREA_PROPERTIES_BASE::_wxFB_OnLayerSelection )
|
||||
EVT_BUTTON( wxID_OK, DIALOG_KEEPOUT_AREA_PROPERTIES_BASE::_wxFB_OnOkClick )
|
||||
END_EVENT_TABLE()
|
||||
|
||||
DIALOG_KEEPOUT_AREA_PROPERTIES_BASE::DIALOG_KEEPOUT_AREA_PROPERTIES_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : DIALOG_SHIM( parent, id, title, pos, size, style )
|
||||
{
|
||||
this->SetSizeHints( wxDefaultSize, wxDefaultSize );
|
||||
this->SetSizeHints( wxSize( 500,-1 ), wxDefaultSize );
|
||||
|
||||
wxBoxSizer* m_MainSizer;
|
||||
m_MainSizer = new wxBoxSizer( wxVERTICAL );
|
||||
|
@ -26,12 +27,12 @@ DIALOG_KEEPOUT_AREA_PROPERTIES_BASE::DIALOG_KEEPOUT_AREA_PROPERTIES_BASE( wxWind
|
|||
wxBoxSizer* m_layersListSizer;
|
||||
m_layersListSizer = new wxBoxSizer( wxVERTICAL );
|
||||
|
||||
m_staticTextLayerSelection = new wxStaticText( this, wxID_ANY, _("Keepout Zone Layers"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticTextLayerSelection = new wxStaticText( this, wxID_ANY, _("Keepout Area Layers:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticTextLayerSelection->Wrap( -1 );
|
||||
m_layersListSizer->Add( m_staticTextLayerSelection, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
m_LayerSelectionCtrl = new wxListView( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_ALIGN_LEFT|wxLC_HRULES|wxLC_NO_HEADER|wxLC_REPORT );
|
||||
m_layersListSizer->Add( m_LayerSelectionCtrl, 1, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 );
|
||||
m_layers = new wxDataViewListCtrl( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxDV_HORIZ_RULES|wxDV_NO_HEADER );
|
||||
m_layersListSizer->Add( m_layers, 1, wxALL|wxEXPAND, 5 );
|
||||
|
||||
|
||||
m_UpperSizer->Add( m_layersListSizer, 1, wxEXPAND, 5 );
|
||||
|
@ -91,7 +92,6 @@ DIALOG_KEEPOUT_AREA_PROPERTIES_BASE::DIALOG_KEEPOUT_AREA_PROPERTIES_BASE( wxWind
|
|||
|
||||
this->SetSizer( m_MainSizer );
|
||||
this->Layout();
|
||||
m_MainSizer->Fit( this );
|
||||
|
||||
this->Centre( wxBOTH );
|
||||
}
|
||||
|
|
|
@ -41,10 +41,10 @@
|
|||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="maximum_size"></property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="minimum_size">500,-1</property>
|
||||
<property name="name">DIALOG_KEEPOUT_AREA_PROPERTIES_BASE</property>
|
||||
<property name="pos"></property>
|
||||
<property name="size">-1,-1</property>
|
||||
<property name="size">650,402</property>
|
||||
<property name="style">wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER</property>
|
||||
<property name="subclass">DIALOG_SHIM; dialog_shim.h</property>
|
||||
<property name="title">Keepout Area Properties</property>
|
||||
|
@ -88,34 +88,34 @@
|
|||
<event name="OnSetFocus"></event>
|
||||
<event name="OnSize"></event>
|
||||
<event name="OnUpdateUI"></event>
|
||||
<object class="wxBoxSizer" expanded="1">
|
||||
<object class="wxBoxSizer" expanded="0">
|
||||
<property name="minimum_size"></property>
|
||||
<property name="name">m_MainSizer</property>
|
||||
<property name="orient">wxVERTICAL</property>
|
||||
<property name="permission">none</property>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<object class="sizeritem" expanded="0">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxEXPAND</property>
|
||||
<property name="proportion">1</property>
|
||||
<object class="wxBoxSizer" expanded="1">
|
||||
<object class="wxBoxSizer" expanded="0">
|
||||
<property name="minimum_size"></property>
|
||||
<property name="name">m_UpperSizer</property>
|
||||
<property name="orient">wxHORIZONTAL</property>
|
||||
<property name="permission">none</property>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<object class="sizeritem" expanded="0">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxEXPAND</property>
|
||||
<property name="proportion">1</property>
|
||||
<object class="wxBoxSizer" expanded="1">
|
||||
<object class="wxBoxSizer" expanded="0">
|
||||
<property name="minimum_size"></property>
|
||||
<property name="name">m_layersListSizer</property>
|
||||
<property name="orient">wxVERTICAL</property>
|
||||
<property name="permission">none</property>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<object class="sizeritem" expanded="0">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxTOP|wxRIGHT|wxLEFT</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxStaticText" expanded="1">
|
||||
<object class="wxStaticText" expanded="0">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
|
@ -143,7 +143,7 @@
|
|||
<property name="gripper">0</property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">Keepout Zone Layers</property>
|
||||
<property name="label">Keepout Area Layers:</property>
|
||||
<property name="max_size"></property>
|
||||
<property name="maximize_button">0</property>
|
||||
<property name="maximum_size"></property>
|
||||
|
@ -194,67 +194,50 @@
|
|||
<event name="OnUpdateUI"></event>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<object class="sizeritem" expanded="0">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND</property>
|
||||
<property name="flag">wxALL|wxEXPAND</property>
|
||||
<property name="proportion">1</property>
|
||||
<object class="wxListCtrl" expanded="1">
|
||||
<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>
|
||||
<object class="wxDataViewListCtrl" expanded="0">
|
||||
<property name="bg"></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_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="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="floatable">1</property>
|
||||
<property name="font"></property>
|
||||
<property name="gripper">0</property>
|
||||
<property name="hidden">0</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="min_size"></property>
|
||||
<property name="minimize_button">0</property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="moveable">1</property>
|
||||
<property name="name">m_LayerSelectionCtrl</property>
|
||||
<property name="pane_border">1</property>
|
||||
<property name="pane_position"></property>
|
||||
<property name="pane_size"></property>
|
||||
<property name="name">m_layers</property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="pin_button">1</property>
|
||||
<property name="pos"></property>
|
||||
<property name="resize">Resizable</property>
|
||||
<property name="show">1</property>
|
||||
<property name="size"></property>
|
||||
<property name="style">wxLC_ALIGN_LEFT|wxLC_HRULES|wxLC_NO_HEADER|wxLC_REPORT</property>
|
||||
<property name="subclass">wxListView; </property>
|
||||
<property name="toolbar_pane">0</property>
|
||||
<property name="style">wxDV_HORIZ_RULES|wxDV_NO_HEADER</property>
|
||||
<property name="subclass"></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="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<event name="OnChar"></event>
|
||||
<event name="OnDataViewListCtrlColumnHeaderClick"></event>
|
||||
<event name="OnDataViewListCtrlColumnHeaderRightClick"></event>
|
||||
<event name="OnDataViewListCtrlColumnReordered"></event>
|
||||
<event name="OnDataViewListCtrlColumnSorted"></event>
|
||||
<event name="OnDataViewListCtrlItemActivated"></event>
|
||||
<event name="OnDataViewListCtrlItemBeginDrag"></event>
|
||||
<event name="OnDataViewListCtrlItemCollapsed"></event>
|
||||
<event name="OnDataViewListCtrlItemCollapsing"></event>
|
||||
<event name="OnDataViewListCtrlItemContextMenu"></event>
|
||||
<event name="OnDataViewListCtrlItemDrop"></event>
|
||||
<event name="OnDataViewListCtrlItemDropPossible"></event>
|
||||
<event name="OnDataViewListCtrlItemEditingDone"></event>
|
||||
<event name="OnDataViewListCtrlItemEditingStarted"></event>
|
||||
<event name="OnDataViewListCtrlItemExpanded"></event>
|
||||
<event name="OnDataViewListCtrlItemExpanding"></event>
|
||||
<event name="OnDataViewListCtrlItemStartEditing"></event>
|
||||
<event name="OnDataViewListCtrlItemValueChanged">OnLayerSelection</event>
|
||||
<event name="OnDataViewListCtrlSelectionChanged"></event>
|
||||
<event name="OnEnterWindow"></event>
|
||||
<event name="OnEraseBackground"></event>
|
||||
<event name="OnKeyDown"></event>
|
||||
|
@ -264,26 +247,6 @@
|
|||
<event name="OnLeftDClick"></event>
|
||||
<event name="OnLeftDown"></event>
|
||||
<event name="OnLeftUp"></event>
|
||||
<event name="OnListBeginDrag"></event>
|
||||
<event name="OnListBeginLabelEdit"></event>
|
||||
<event name="OnListBeginRDrag"></event>
|
||||
<event name="OnListCacheHint"></event>
|
||||
<event name="OnListColBeginDrag"></event>
|
||||
<event name="OnListColClick"></event>
|
||||
<event name="OnListColDragging"></event>
|
||||
<event name="OnListColEndDrag"></event>
|
||||
<event name="OnListColRightClick"></event>
|
||||
<event name="OnListDeleteAllItems"></event>
|
||||
<event name="OnListDeleteItem"></event>
|
||||
<event name="OnListEndLabelEdit"></event>
|
||||
<event name="OnListInsertItem"></event>
|
||||
<event name="OnListItemActivated"></event>
|
||||
<event name="OnListItemDeselected"></event>
|
||||
<event name="OnListItemFocused"></event>
|
||||
<event name="OnListItemMiddleClick"></event>
|
||||
<event name="OnListItemRightClick"></event>
|
||||
<event name="OnListItemSelected"></event>
|
||||
<event name="OnListKeyDown"></event>
|
||||
<event name="OnMiddleDClick"></event>
|
||||
<event name="OnMiddleDown"></event>
|
||||
<event name="OnMiddleUp"></event>
|
||||
|
@ -301,20 +264,20 @@
|
|||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<object class="sizeritem" expanded="0">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxEXPAND</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxBoxSizer" expanded="1">
|
||||
<object class="wxBoxSizer" expanded="0">
|
||||
<property name="minimum_size"></property>
|
||||
<property name="name">bSizerRight</property>
|
||||
<property name="orient">wxVERTICAL</property>
|
||||
<property name="permission">none</property>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<object class="sizeritem" expanded="0">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxTOP|wxRIGHT|wxLEFT</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxStaticText" expanded="1">
|
||||
<object class="wxStaticText" expanded="0">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
|
@ -393,11 +356,11 @@
|
|||
<event name="OnUpdateUI"></event>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<object class="sizeritem" expanded="0">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxRadioBox" expanded="1">
|
||||
<object class="wxRadioBox" expanded="0">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
|
@ -483,11 +446,11 @@
|
|||
<event name="OnUpdateUI"></event>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<object class="sizeritem" expanded="0">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxALL|wxEXPAND</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxRadioBox" expanded="1">
|
||||
<object class="wxRadioBox" expanded="0">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
|
@ -573,11 +536,11 @@
|
|||
<event name="OnUpdateUI"></event>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<object class="sizeritem" expanded="0">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxEXPAND|wxALL</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxStaticBoxSizer" expanded="1">
|
||||
<object class="wxStaticBoxSizer" expanded="0">
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">Keepout Options:</property>
|
||||
<property name="minimum_size"></property>
|
||||
|
@ -586,11 +549,11 @@
|
|||
<property name="parent">1</property>
|
||||
<property name="permission">none</property>
|
||||
<event name="OnUpdateUI"></event>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<object class="sizeritem" expanded="0">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxTOP|wxRIGHT|wxLEFT|wxEXPAND</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxCheckBox" expanded="1">
|
||||
<object class="wxCheckBox" expanded="0">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
|
@ -674,11 +637,11 @@
|
|||
<event name="OnUpdateUI"></event>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<object class="sizeritem" expanded="0">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxTOP|wxRIGHT|wxLEFT|wxEXPAND</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxCheckBox" expanded="1">
|
||||
<object class="wxCheckBox" expanded="0">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
|
@ -762,11 +725,11 @@
|
|||
<event name="OnUpdateUI"></event>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<object class="sizeritem" expanded="0">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxALL|wxEXPAND</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxCheckBox" expanded="1">
|
||||
<object class="wxCheckBox" expanded="0">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
|
@ -856,11 +819,11 @@
|
|||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<object class="sizeritem" expanded="0">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxEXPAND | wxALL</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxStaticLine" expanded="1">
|
||||
<object class="wxStaticLine" expanded="0">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
|
@ -937,11 +900,11 @@
|
|||
<event name="OnUpdateUI"></event>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<object class="sizeritem" expanded="0">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxEXPAND|wxALL</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxStdDialogButtonSizer" expanded="1">
|
||||
<object class="wxStdDialogButtonSizer" expanded="0">
|
||||
<property name="Apply">0</property>
|
||||
<property name="Cancel">1</property>
|
||||
<property name="ContextHelp">0</property>
|
||||
|
|
|
@ -12,7 +12,6 @@
|
|||
#include <wx/xrc/xmlres.h>
|
||||
#include <wx/intl.h>
|
||||
class DIALOG_SHIM;
|
||||
class wxListView;
|
||||
|
||||
#include "dialog_shim.h"
|
||||
#include <wx/string.h>
|
||||
|
@ -21,7 +20,7 @@ class wxListView;
|
|||
#include <wx/font.h>
|
||||
#include <wx/colour.h>
|
||||
#include <wx/settings.h>
|
||||
#include <wx/listctrl.h>
|
||||
#include <wx/dataview.h>
|
||||
#include <wx/sizer.h>
|
||||
#include <wx/radiobox.h>
|
||||
#include <wx/checkbox.h>
|
||||
|
@ -42,12 +41,13 @@ class DIALOG_KEEPOUT_AREA_PROPERTIES_BASE : public DIALOG_SHIM
|
|||
private:
|
||||
|
||||
// Private event handlers
|
||||
void _wxFB_OnLayerSelection( wxDataViewEvent& event ){ OnLayerSelection( event ); }
|
||||
void _wxFB_OnOkClick( wxCommandEvent& event ){ OnOkClick( event ); }
|
||||
|
||||
|
||||
protected:
|
||||
wxStaticText* m_staticTextLayerSelection;
|
||||
wxListView* m_LayerSelectionCtrl;
|
||||
wxDataViewListCtrl* m_layers;
|
||||
wxStaticText* m_staticTextprops;
|
||||
wxRadioBox* m_OrientEdgesOpt;
|
||||
wxRadioBox* m_OutlineAppearanceCtrl;
|
||||
|
@ -60,12 +60,13 @@ class DIALOG_KEEPOUT_AREA_PROPERTIES_BASE : public DIALOG_SHIM
|
|||
wxButton* m_sdbSizerButtonsCancel;
|
||||
|
||||
// Virtual event handlers, overide them in your derived class
|
||||
virtual void OnLayerSelection( wxDataViewEvent& event ) { event.Skip(); }
|
||||
virtual void OnOkClick( wxCommandEvent& event ) { event.Skip(); }
|
||||
|
||||
|
||||
public:
|
||||
|
||||
DIALOG_KEEPOUT_AREA_PROPERTIES_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Keepout Area Properties"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER|wxFULL_REPAINT_ON_RESIZE|wxSUNKEN_BORDER );
|
||||
DIALOG_KEEPOUT_AREA_PROPERTIES_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Keepout Area Properties"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 650,402 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER|wxFULL_REPAINT_ON_RESIZE|wxSUNKEN_BORDER );
|
||||
~DIALOG_KEEPOUT_AREA_PROPERTIES_BASE();
|
||||
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue