Remove canonical name column from view and make sash more obvious.
Fixes https://gitlab.com/kicad/code/kicad/issues/6693
This commit is contained in:
parent
f08b7f098f
commit
7186a0c621
|
@ -187,7 +187,6 @@ protected:
|
||||||
// A map of compID : fieldSet, where fieldSet is a map of fieldName : fieldValue
|
// A map of compID : fieldSet, where fieldSet is a map of fieldName : fieldValue
|
||||||
std::map< KIID, std::map<wxString, wxString> > m_dataStore;
|
std::map< KIID, std::map<wxString, wxString> > m_dataStore;
|
||||||
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
FIELDS_EDITOR_GRID_DATA_MODEL( SCH_EDIT_FRAME* aFrame, SCH_REFERENCE_LIST& aSymbolsList ) :
|
FIELDS_EDITOR_GRID_DATA_MODEL( SCH_EDIT_FRAME* aFrame, SCH_REFERENCE_LIST& aSymbolsList ) :
|
||||||
m_frame( aFrame ),
|
m_frame( aFrame ),
|
||||||
|
@ -199,7 +198,6 @@ public:
|
||||||
m_symbolsList.SplitReferences();
|
m_symbolsList.SplitReferences();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void AddColumn( const wxString& aFieldName )
|
void AddColumn( const wxString& aFieldName )
|
||||||
{
|
{
|
||||||
m_fieldNames.push_back( aFieldName );
|
m_fieldNames.push_back( aFieldName );
|
||||||
|
@ -211,13 +209,11 @@ public:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int GetNumberRows() override { return m_rows.size(); }
|
int GetNumberRows() override { return m_rows.size(); }
|
||||||
|
|
||||||
// Columns are fieldNames + quantity column
|
// Columns are fieldNames + quantity column
|
||||||
int GetNumberCols() override { return (int) m_fieldNames.size() + 1; }
|
int GetNumberCols() override { return (int) m_fieldNames.size() + 1; }
|
||||||
|
|
||||||
|
|
||||||
wxString GetColLabelValue( int aCol ) override
|
wxString GetColLabelValue( int aCol ) override
|
||||||
{
|
{
|
||||||
if( aCol == QUANTITY_COLUMN )
|
if( aCol == QUANTITY_COLUMN )
|
||||||
|
@ -228,7 +224,6 @@ public:
|
||||||
return m_fieldNames[ aCol ];
|
return m_fieldNames[ aCol ];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
wxString GetCanonicalColLabel( int aCol )
|
wxString GetCanonicalColLabel( int aCol )
|
||||||
{
|
{
|
||||||
if( aCol == QUANTITY_COLUMN )
|
if( aCol == QUANTITY_COLUMN )
|
||||||
|
@ -237,13 +232,11 @@ public:
|
||||||
return m_fieldNames[ aCol ];
|
return m_fieldNames[ aCol ];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
bool IsEmptyCell( int aRow, int aCol ) override
|
bool IsEmptyCell( int aRow, int aCol ) override
|
||||||
{
|
{
|
||||||
return false; // don't allow adjacent cell overflow, even if we are actually empty
|
return false; // don't allow adjacent cell overflow, even if we are actually empty
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
wxString GetValue( int aRow, int aCol ) override
|
wxString GetValue( int aRow, int aCol ) override
|
||||||
{
|
{
|
||||||
if( aCol == REFERENCE_FIELD )
|
if( aCol == REFERENCE_FIELD )
|
||||||
|
@ -283,8 +276,8 @@ public:
|
||||||
{
|
{
|
||||||
const KIID& symbolID = ref.GetSymbol()->m_Uuid;
|
const KIID& symbolID = ref.GetSymbol()->m_Uuid;
|
||||||
|
|
||||||
if( !m_dataStore.count( symbolID ) ||
|
if( !m_dataStore.count( symbolID )
|
||||||
!m_dataStore[ symbolID ].count( m_fieldNames[ aCol ] ) )
|
|| !m_dataStore[ symbolID ].count( m_fieldNames[ aCol ] ) )
|
||||||
{
|
{
|
||||||
return INDETERMINATE_STATE;
|
return INDETERMINATE_STATE;
|
||||||
}
|
}
|
||||||
|
@ -323,6 +316,7 @@ public:
|
||||||
wxString r_ref( r.GetRef() << r.GetRefNumber() );
|
wxString r_ref( r.GetRef() << r.GetRefNumber() );
|
||||||
return l_ref == r_ref;
|
return l_ref == r_ref;
|
||||||
} );
|
} );
|
||||||
|
|
||||||
references.erase( logicalEnd, references.end() );
|
references.erase( logicalEnd, references.end() );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -338,7 +332,6 @@ public:
|
||||||
return fieldValue;
|
return fieldValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void SetValue( int aRow, int aCol, const wxString &aValue ) override
|
void SetValue( int aRow, int aCol, const wxString &aValue ) override
|
||||||
{
|
{
|
||||||
if( aCol == REFERENCE_FIELD || aCol == QUANTITY_COLUMN )
|
if( aCol == REFERENCE_FIELD || aCol == QUANTITY_COLUMN )
|
||||||
|
@ -353,7 +346,6 @@ public:
|
||||||
m_edited = true;
|
m_edited = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static bool cmp( const DATA_MODEL_ROW& lhGroup, const DATA_MODEL_ROW& rhGroup,
|
static bool cmp( const DATA_MODEL_ROW& lhGroup, const DATA_MODEL_ROW& rhGroup,
|
||||||
FIELDS_EDITOR_GRID_DATA_MODEL* dataModel, int sortCol, bool ascending )
|
FIELDS_EDITOR_GRID_DATA_MODEL* dataModel, int sortCol, bool ascending )
|
||||||
{
|
{
|
||||||
|
@ -365,7 +357,8 @@ public:
|
||||||
|
|
||||||
// N.B. To meet the iterator sort conditions, we cannot simply invert the truth
|
// N.B. To meet the iterator sort conditions, we cannot simply invert the truth
|
||||||
// to get the opposite sort. i.e. ~(a<b) != (a>b)
|
// to get the opposite sort. i.e. ~(a<b) != (a>b)
|
||||||
auto local_cmp = [ ascending ]( const auto a, const auto b )
|
auto local_cmp =
|
||||||
|
[ ascending ]( const auto a, const auto b )
|
||||||
{
|
{
|
||||||
if( ascending )
|
if( ascending )
|
||||||
return a < b;
|
return a < b;
|
||||||
|
@ -385,9 +378,10 @@ public:
|
||||||
return local_cmp( UTIL::RefDesStringCompare( lhRef, rhRef ), 0 );
|
return local_cmp( UTIL::RefDesStringCompare( lhRef, rhRef ), 0 );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
return local_cmp( ValueStringCompare( lhs, rhs ), 0 );
|
return local_cmp( ValueStringCompare( lhs, rhs ), 0 );
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void Sort( int aColumn, bool ascending )
|
void Sort( int aColumn, bool ascending )
|
||||||
{
|
{
|
||||||
|
@ -408,7 +402,6 @@ public:
|
||||||
ExpandAfterSort();
|
ExpandAfterSort();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
bool unitMatch( const SCH_REFERENCE& lhRef, const SCH_REFERENCE& rhRef )
|
bool unitMatch( const SCH_REFERENCE& lhRef, const SCH_REFERENCE& rhRef )
|
||||||
{
|
{
|
||||||
// If items are unannotated then we can't tell if they're units of the same symbol or not
|
// If items are unannotated then we can't tell if they're units of the same symbol or not
|
||||||
|
@ -418,7 +411,6 @@ public:
|
||||||
return ( lhRef.GetRef() == rhRef.GetRef() && lhRef.GetRefNumber() == rhRef.GetRefNumber() );
|
return ( lhRef.GetRef() == rhRef.GetRef() && lhRef.GetRefNumber() == rhRef.GetRefNumber() );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
bool groupMatch( const SCH_REFERENCE& lhRef, const SCH_REFERENCE& rhRef,
|
bool groupMatch( const SCH_REFERENCE& lhRef, const SCH_REFERENCE& rhRef,
|
||||||
wxDataViewListCtrl* fieldsCtrl )
|
wxDataViewListCtrl* fieldsCtrl )
|
||||||
{
|
{
|
||||||
|
@ -456,7 +448,6 @@ public:
|
||||||
return matchFound;
|
return matchFound;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void RebuildRows( wxCheckBox* aGroupSymbolsBox, wxDataViewListCtrl* aFieldsCtrl )
|
void RebuildRows( wxCheckBox* aGroupSymbolsBox, wxDataViewListCtrl* aFieldsCtrl )
|
||||||
{
|
{
|
||||||
if ( GetView() )
|
if ( GetView() )
|
||||||
|
@ -477,7 +468,7 @@ public:
|
||||||
bool matchFound = false;
|
bool matchFound = false;
|
||||||
|
|
||||||
// See if we already have a row which this symbol fits into
|
// See if we already have a row which this symbol fits into
|
||||||
for( auto& row : m_rows )
|
for( DATA_MODEL_ROW& row : m_rows )
|
||||||
{
|
{
|
||||||
// all group members must have identical refs so just use the first one
|
// all group members must have identical refs so just use the first one
|
||||||
SCH_REFERENCE rowRef = row.m_Refs[ 0 ];
|
SCH_REFERENCE rowRef = row.m_Refs[ 0 ];
|
||||||
|
@ -508,17 +499,16 @@ public:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void ExpandRow( int aRow )
|
void ExpandRow( int aRow )
|
||||||
{
|
{
|
||||||
std::vector<DATA_MODEL_ROW> children;
|
std::vector<DATA_MODEL_ROW> children;
|
||||||
|
|
||||||
for( auto& ref : m_rows[ aRow ].m_Refs )
|
for( SCH_REFERENCE& ref : m_rows[ aRow ].m_Refs )
|
||||||
{
|
{
|
||||||
bool matchFound = false;
|
bool matchFound = false;
|
||||||
|
|
||||||
// See if we already have a child group which this symbol fits into
|
// See if we already have a child group which this symbol fits into
|
||||||
for( auto& child : children )
|
for( DATA_MODEL_ROW& child : children )
|
||||||
{
|
{
|
||||||
// group members are by definition all matching, so just check
|
// group members are by definition all matching, so just check
|
||||||
// against the first member
|
// against the first member
|
||||||
|
@ -550,7 +540,6 @@ public:
|
||||||
GetView()->ProcessTableMessage( msg );
|
GetView()->ProcessTableMessage( msg );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void CollapseRow( int aRow )
|
void CollapseRow( int aRow )
|
||||||
{
|
{
|
||||||
auto firstChild = m_rows.begin() + aRow + 1;
|
auto firstChild = m_rows.begin() + aRow + 1;
|
||||||
|
@ -570,7 +559,6 @@ public:
|
||||||
GetView()->ProcessTableMessage( msg );
|
GetView()->ProcessTableMessage( msg );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void ExpandCollapseRow( int aRow )
|
void ExpandCollapseRow( int aRow )
|
||||||
{
|
{
|
||||||
DATA_MODEL_ROW& group = m_rows[ aRow ];
|
DATA_MODEL_ROW& group = m_rows[ aRow ];
|
||||||
|
@ -581,7 +569,6 @@ public:
|
||||||
CollapseRow( aRow );
|
CollapseRow( aRow );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void CollapseForSort()
|
void CollapseForSort()
|
||||||
{
|
{
|
||||||
for( size_t i = 0; i < m_rows.size(); ++i )
|
for( size_t i = 0; i < m_rows.size(); ++i )
|
||||||
|
@ -594,7 +581,6 @@ public:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void ExpandAfterSort()
|
void ExpandAfterSort()
|
||||||
{
|
{
|
||||||
for( size_t i = 0; i < m_rows.size(); ++i )
|
for( size_t i = 0; i < m_rows.size(); ++i )
|
||||||
|
@ -604,7 +590,6 @@ public:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void ApplyData()
|
void ApplyData()
|
||||||
{
|
{
|
||||||
for( unsigned i = 0; i < m_symbolsList.GetCount(); ++i )
|
for( unsigned i = 0; i < m_symbolsList.GetCount(); ++i )
|
||||||
|
@ -656,7 +641,6 @@ public:
|
||||||
m_edited = false;
|
m_edited = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int GetDataWidth( int aCol )
|
int GetDataWidth( int aCol )
|
||||||
{
|
{
|
||||||
int width = 0;
|
int width = 0;
|
||||||
|
@ -703,11 +687,15 @@ DIALOG_FIELDS_EDITOR_GLOBAL::DIALOG_FIELDS_EDITOR_GLOBAL( SCH_EDIT_FRAME* parent
|
||||||
|
|
||||||
m_bRefresh->SetBitmap( KiBitmap( refresh_xpm ) );
|
m_bRefresh->SetBitmap( KiBitmap( refresh_xpm ) );
|
||||||
|
|
||||||
m_fieldsCtrl->AppendTextColumn( _( "Field" ), wxDATAVIEW_CELL_INERT, 0, wxALIGN_LEFT, 0 );
|
m_fieldsCtrl->AppendTextColumn( _( "Field" ), wxDATAVIEW_CELL_INERT, 0,
|
||||||
m_fieldsCtrl->AppendToggleColumn( _( "Show" ), wxDATAVIEW_CELL_ACTIVATABLE, 0, wxALIGN_CENTER,
|
wxALIGN_LEFT, 0 );
|
||||||
0 );
|
m_fieldsCtrl->AppendToggleColumn( _( "Show" ), wxDATAVIEW_CELL_ACTIVATABLE, 0,
|
||||||
|
wxALIGN_CENTER, 0 );
|
||||||
m_fieldsCtrl->AppendToggleColumn( _( "Group By" ), wxDATAVIEW_CELL_ACTIVATABLE, 0,
|
m_fieldsCtrl->AppendToggleColumn( _( "Group By" ), wxDATAVIEW_CELL_ACTIVATABLE, 0,
|
||||||
wxALIGN_CENTER, 0 );
|
wxALIGN_CENTER, 0 );
|
||||||
|
|
||||||
|
// GTK asserts if the number of columns doesn't match the data, but we still don't want
|
||||||
|
// to display the canonical names. So we'll insert a column for them, but keep it 0 width.
|
||||||
m_fieldsCtrl->AppendTextColumn( _( "Name" ), wxDATAVIEW_CELL_INERT, 0, wxALIGN_LEFT, 0 );
|
m_fieldsCtrl->AppendTextColumn( _( "Name" ), wxDATAVIEW_CELL_INERT, 0, wxALIGN_LEFT, 0 );
|
||||||
|
|
||||||
// SetWidth( wxCOL_WIDTH_AUTOSIZE ) fails here on GTK, so we calculate the title sizes and
|
// SetWidth( wxCOL_WIDTH_AUTOSIZE ) fails here on GTK, so we calculate the title sizes and
|
||||||
|
@ -731,24 +719,19 @@ DIALOG_FIELDS_EDITOR_GLOBAL::DIALOG_FIELDS_EDITOR_GLOBAL( SCH_EDIT_FRAME* parent
|
||||||
// Now that the fields are loaded we can set the initial location of the splitter
|
// Now that the fields are loaded we can set the initial location of the splitter
|
||||||
// based on the list width. Again, SetWidth( wxCOL_WIDTH_AUTOSIZE ) fails us on GTK.
|
// based on the list width. Again, SetWidth( wxCOL_WIDTH_AUTOSIZE ) fails us on GTK.
|
||||||
int nameColWidth = 0;
|
int nameColWidth = 0;
|
||||||
m_canonicalNameColWidth = 0;
|
|
||||||
|
|
||||||
for( int row = 0; row < m_fieldsCtrl->GetItemCount(); ++row )
|
for( int row = 0; row < m_fieldsCtrl->GetItemCount(); ++row )
|
||||||
{
|
{
|
||||||
const wxString& fieldName = m_fieldsCtrl->GetTextValue( row, DISPLAY_NAME_COLUMN );
|
const wxString& fieldName = m_fieldsCtrl->GetTextValue( row, DISPLAY_NAME_COLUMN );
|
||||||
nameColWidth = std::max( nameColWidth, KIUI::GetTextSize( fieldName, m_fieldsCtrl ).x );
|
nameColWidth = std::max( nameColWidth, KIUI::GetTextSize( fieldName, m_fieldsCtrl ).x );
|
||||||
const wxString& canon_Name = m_fieldsCtrl->GetTextValue( row, CANONICAL_NAME_COLUMN );
|
|
||||||
m_canonicalNameColWidth = std::max( m_canonicalNameColWidth,
|
|
||||||
KIUI::GetTextSize( canon_Name, m_fieldsCtrl ).x );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
m_canonicalNameColWidth += COLUMN_MARGIN;
|
int fieldsMinWidth = nameColWidth + m_groupByColWidth + m_showColWidth;
|
||||||
|
|
||||||
int fieldsMinWidth = nameColWidth + m_canonicalNameColWidth +
|
|
||||||
m_groupByColWidth + m_showColWidth;
|
|
||||||
|
|
||||||
m_fieldsCtrl->GetColumn( DISPLAY_NAME_COLUMN )->SetWidth( nameColWidth );
|
m_fieldsCtrl->GetColumn( DISPLAY_NAME_COLUMN )->SetWidth( nameColWidth );
|
||||||
m_fieldsCtrl->GetColumn( CANONICAL_NAME_COLUMN )->SetWidth( m_canonicalNameColWidth );
|
|
||||||
|
// This is used for data only. Don't show it to the user.
|
||||||
|
m_fieldsCtrl->GetColumn( CANONICAL_NAME_COLUMN )->SetWidth( 0 );
|
||||||
|
|
||||||
m_splitterMainWindow->SetMinimumPaneSize( fieldsMinWidth );
|
m_splitterMainWindow->SetMinimumPaneSize( fieldsMinWidth );
|
||||||
m_splitterMainWindow->SetSashPosition( fieldsMinWidth + 40 );
|
m_splitterMainWindow->SetSashPosition( fieldsMinWidth + 40 );
|
||||||
|
@ -1111,14 +1094,18 @@ void DIALOG_FIELDS_EDITOR_GLOBAL::OnColSort( wxGridEvent& aEvent )
|
||||||
int sortCol = aEvent.GetCol();
|
int sortCol = aEvent.GetCol();
|
||||||
bool ascending;
|
bool ascending;
|
||||||
|
|
||||||
// This is bonkers, but wxWidgets doesn't tell us ascending/descending in the
|
// This is bonkers, but wxWidgets doesn't tell us ascending/descending in the event, and
|
||||||
// event, and if we ask it will give us pre-event info.
|
// if we ask it will give us pre-event info.
|
||||||
if( m_grid->IsSortingBy( sortCol ) )
|
if( m_grid->IsSortingBy( sortCol ) )
|
||||||
|
{
|
||||||
// same column; invert ascending
|
// same column; invert ascending
|
||||||
ascending = !m_grid->IsSortOrderAscending();
|
ascending = !m_grid->IsSortOrderAscending();
|
||||||
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
// different column; start with ascending
|
// different column; start with ascending
|
||||||
ascending = true;
|
ascending = true;
|
||||||
|
}
|
||||||
|
|
||||||
m_dataModel->Sort( sortCol, ascending );
|
m_dataModel->Sort( sortCol, ascending );
|
||||||
m_grid->ForceRefresh();
|
m_grid->ForceRefresh();
|
||||||
|
@ -1188,14 +1175,13 @@ void DIALOG_FIELDS_EDITOR_GLOBAL::OnTableItemContextMenu( wxGridEvent& event )
|
||||||
|
|
||||||
void DIALOG_FIELDS_EDITOR_GLOBAL::OnSizeFieldList( wxSizeEvent& event )
|
void DIALOG_FIELDS_EDITOR_GLOBAL::OnSizeFieldList( wxSizeEvent& event )
|
||||||
{
|
{
|
||||||
int nameColWidth = event.GetSize().GetX() - m_showColWidth
|
int nameColWidth = event.GetSize().GetX() - m_showColWidth - m_groupByColWidth - 8;
|
||||||
- m_groupByColWidth - m_canonicalNameColWidth - 8;
|
|
||||||
|
|
||||||
// GTK loses its head and messes these up when resizing the splitter bar:
|
// GTK loses its head and messes these up when resizing the splitter bar:
|
||||||
m_fieldsCtrl->GetColumn( SHOW_FIELD_COLUMN )->SetWidth( m_showColWidth );
|
m_fieldsCtrl->GetColumn( SHOW_FIELD_COLUMN )->SetWidth( m_showColWidth );
|
||||||
m_fieldsCtrl->GetColumn( GROUP_BY_COLUMN )->SetWidth( m_groupByColWidth );
|
m_fieldsCtrl->GetColumn( GROUP_BY_COLUMN )->SetWidth( m_groupByColWidth );
|
||||||
|
|
||||||
m_fieldsCtrl->GetColumn( CANONICAL_NAME_COLUMN )->SetWidth( m_canonicalNameColWidth );
|
m_fieldsCtrl->GetColumn( CANONICAL_NAME_COLUMN )->SetWidth( 0 );
|
||||||
m_fieldsCtrl->GetColumn( DISPLAY_NAME_COLUMN )->SetWidth( nameColWidth );
|
m_fieldsCtrl->GetColumn( DISPLAY_NAME_COLUMN )->SetWidth( nameColWidth );
|
||||||
|
|
||||||
event.Skip();
|
event.Skip();
|
||||||
|
@ -1223,7 +1209,10 @@ void DIALOG_FIELDS_EDITOR_GLOBAL::OnClose( wxCloseEvent& event )
|
||||||
if( m_dataModel->IsEdited() )
|
if( m_dataModel->IsEdited() )
|
||||||
{
|
{
|
||||||
if( !HandleUnsavedChanges( this, _( "Save changes?" ),
|
if( !HandleUnsavedChanges( this, _( "Save changes?" ),
|
||||||
[&]()->bool { return TransferDataFromWindow(); } ) )
|
[&]()->bool
|
||||||
|
{
|
||||||
|
return TransferDataFromWindow();
|
||||||
|
} ) )
|
||||||
{
|
{
|
||||||
event.Veto();
|
event.Veto();
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -47,7 +47,6 @@ private:
|
||||||
SCH_EDIT_FRAME* m_parent;
|
SCH_EDIT_FRAME* m_parent;
|
||||||
int m_showColWidth;
|
int m_showColWidth;
|
||||||
int m_groupByColWidth;
|
int m_groupByColWidth;
|
||||||
int m_canonicalNameColWidth;
|
|
||||||
|
|
||||||
SCH_REFERENCE_LIST m_symbolsList;
|
SCH_REFERENCE_LIST m_symbolsList;
|
||||||
FIELDS_EDITOR_GRID_DATA_MODEL* m_dataModel;
|
FIELDS_EDITOR_GRID_DATA_MODEL* m_dataModel;
|
||||||
|
|
|
@ -18,7 +18,7 @@ DIALOG_FIELDS_EDITOR_GLOBAL_BASE::DIALOG_FIELDS_EDITOR_GLOBAL_BASE( wxWindow* pa
|
||||||
wxBoxSizer* bMainSizer;
|
wxBoxSizer* bMainSizer;
|
||||||
bMainSizer = new wxBoxSizer( wxVERTICAL );
|
bMainSizer = new wxBoxSizer( wxVERTICAL );
|
||||||
|
|
||||||
m_splitterMainWindow = new wxSplitterWindow( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxSP_LIVE_UPDATE );
|
m_splitterMainWindow = new wxSplitterWindow( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxSP_3DSASH|wxSP_LIVE_UPDATE|wxSP_NO_XP_THEME );
|
||||||
m_splitterMainWindow->SetMinimumPaneSize( 200 );
|
m_splitterMainWindow->SetMinimumPaneSize( 200 );
|
||||||
|
|
||||||
m_leftPanel = new wxPanel( m_splitterMainWindow, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
|
m_leftPanel = new wxPanel( m_splitterMainWindow, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
|
||||||
|
@ -30,7 +30,7 @@ DIALOG_FIELDS_EDITOR_GLOBAL_BASE::DIALOG_FIELDS_EDITOR_GLOBAL_BASE( wxWindow* pa
|
||||||
|
|
||||||
m_groupSymbolsBox = new wxCheckBox( m_leftPanel, OPT_GROUP_COMPONENTS, _("Group symbols"), wxDefaultPosition, wxDefaultSize, 0 );
|
m_groupSymbolsBox = new wxCheckBox( m_leftPanel, OPT_GROUP_COMPONENTS, _("Group symbols"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
m_groupSymbolsBox->SetValue(true);
|
m_groupSymbolsBox->SetValue(true);
|
||||||
m_groupSymbolsBox->SetToolTip( _( "Group components together based on common properties") );
|
m_groupSymbolsBox->SetToolTip( _("Group symbols together based on common properties") );
|
||||||
|
|
||||||
bGroupSizer->Add( m_groupSymbolsBox, 0, wxALL|wxEXPAND, 5 );
|
bGroupSizer->Add( m_groupSymbolsBox, 0, wxALL|wxEXPAND, 5 );
|
||||||
|
|
||||||
|
@ -43,15 +43,15 @@ DIALOG_FIELDS_EDITOR_GLOBAL_BASE::DIALOG_FIELDS_EDITOR_GLOBAL_BASE( wxWindow* pa
|
||||||
bGroupSizer->Add( m_bRefresh, 0, wxALIGN_CENTER_VERTICAL, 5 );
|
bGroupSizer->Add( m_bRefresh, 0, wxALIGN_CENTER_VERTICAL, 5 );
|
||||||
|
|
||||||
|
|
||||||
bLeftSizer->Add( bGroupSizer, 0, wxALL|wxBOTTOM|wxEXPAND|wxTOP, 2 );
|
bLeftSizer->Add( bGroupSizer, 0, wxEXPAND|wxTOP|wxBOTTOM|wxLEFT, 2 );
|
||||||
|
|
||||||
m_fieldsCtrl = new wxDataViewListCtrl( m_leftPanel, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
|
m_fieldsCtrl = new wxDataViewListCtrl( m_leftPanel, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
m_fieldsCtrl->SetMinSize( wxSize( -1,220 ) );
|
m_fieldsCtrl->SetMinSize( wxSize( -1,220 ) );
|
||||||
|
|
||||||
bLeftSizer->Add( m_fieldsCtrl, 1, wxALL|wxEXPAND, 5 );
|
bLeftSizer->Add( m_fieldsCtrl, 1, wxEXPAND|wxTOP|wxBOTTOM|wxLEFT, 5 );
|
||||||
|
|
||||||
m_addFieldButton = new wxButton( m_leftPanel, wxID_ANY, _("Add Field..."), wxDefaultPosition, wxDefaultSize, 0 );
|
m_addFieldButton = new wxButton( m_leftPanel, wxID_ANY, _("Add Field..."), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
bLeftSizer->Add( m_addFieldButton, 0, wxALL|wxEXPAND, 5 );
|
bLeftSizer->Add( m_addFieldButton, 0, wxEXPAND|wxTOP|wxBOTTOM|wxLEFT, 5 );
|
||||||
|
|
||||||
|
|
||||||
m_leftPanel->SetSizer( bLeftSizer );
|
m_leftPanel->SetSizer( bLeftSizer );
|
||||||
|
@ -87,7 +87,7 @@ DIALOG_FIELDS_EDITOR_GLOBAL_BASE::DIALOG_FIELDS_EDITOR_GLOBAL_BASE( wxWindow* pa
|
||||||
m_grid->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_TOP );
|
m_grid->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_TOP );
|
||||||
m_grid->SetMinSize( wxSize( 400,240 ) );
|
m_grid->SetMinSize( wxSize( 400,240 ) );
|
||||||
|
|
||||||
bRightSizer->Add( m_grid, 1, wxALL|wxEXPAND, 5 );
|
bRightSizer->Add( m_grid, 1, wxEXPAND|wxTOP|wxBOTTOM|wxRIGHT, 5 );
|
||||||
|
|
||||||
|
|
||||||
m_rightPanel->SetSizer( bRightSizer );
|
m_rightPanel->SetSizer( bRightSizer );
|
||||||
|
|
|
@ -113,7 +113,7 @@
|
||||||
<property name="show">1</property>
|
<property name="show">1</property>
|
||||||
<property name="size"></property>
|
<property name="size"></property>
|
||||||
<property name="splitmode">wxSPLIT_VERTICAL</property>
|
<property name="splitmode">wxSPLIT_VERTICAL</property>
|
||||||
<property name="style">wxSP_LIVE_UPDATE</property>
|
<property name="style">wxSP_3DSASH|wxSP_LIVE_UPDATE|wxSP_NO_XP_THEME</property>
|
||||||
<property name="subclass"></property>
|
<property name="subclass"></property>
|
||||||
<property name="toolbar_pane">0</property>
|
<property name="toolbar_pane">0</property>
|
||||||
<property name="tooltip"></property>
|
<property name="tooltip"></property>
|
||||||
|
@ -179,7 +179,7 @@
|
||||||
<property name="permission">none</property>
|
<property name="permission">none</property>
|
||||||
<object class="sizeritem" expanded="1">
|
<object class="sizeritem" expanded="1">
|
||||||
<property name="border">2</property>
|
<property name="border">2</property>
|
||||||
<property name="flag">wxALL|wxBOTTOM|wxEXPAND|wxTOP</property>
|
<property name="flag">wxEXPAND|wxTOP|wxBOTTOM|wxLEFT</property>
|
||||||
<property name="proportion">0</property>
|
<property name="proportion">0</property>
|
||||||
<object class="wxBoxSizer" expanded="1">
|
<object class="wxBoxSizer" expanded="1">
|
||||||
<property name="minimum_size"></property>
|
<property name="minimum_size"></property>
|
||||||
|
@ -338,7 +338,7 @@
|
||||||
</object>
|
</object>
|
||||||
<object class="sizeritem" expanded="0">
|
<object class="sizeritem" expanded="0">
|
||||||
<property name="border">5</property>
|
<property name="border">5</property>
|
||||||
<property name="flag">wxALL|wxEXPAND</property>
|
<property name="flag">wxEXPAND|wxTOP|wxBOTTOM|wxLEFT</property>
|
||||||
<property name="proportion">1</property>
|
<property name="proportion">1</property>
|
||||||
<object class="wxDataViewListCtrl" expanded="0">
|
<object class="wxDataViewListCtrl" expanded="0">
|
||||||
<property name="bg"></property>
|
<property name="bg"></property>
|
||||||
|
@ -367,7 +367,7 @@
|
||||||
</object>
|
</object>
|
||||||
<object class="sizeritem" expanded="1">
|
<object class="sizeritem" expanded="1">
|
||||||
<property name="border">5</property>
|
<property name="border">5</property>
|
||||||
<property name="flag">wxALL|wxEXPAND</property>
|
<property name="flag">wxEXPAND|wxTOP|wxBOTTOM|wxLEFT</property>
|
||||||
<property name="proportion">0</property>
|
<property name="proportion">0</property>
|
||||||
<object class="wxButton" expanded="1">
|
<object class="wxButton" expanded="1">
|
||||||
<property name="BottomDockable">1</property>
|
<property name="BottomDockable">1</property>
|
||||||
|
@ -500,7 +500,7 @@
|
||||||
<property name="permission">none</property>
|
<property name="permission">none</property>
|
||||||
<object class="sizeritem" expanded="0">
|
<object class="sizeritem" expanded="0">
|
||||||
<property name="border">5</property>
|
<property name="border">5</property>
|
||||||
<property name="flag">wxALL|wxEXPAND</property>
|
<property name="flag">wxEXPAND|wxTOP|wxBOTTOM|wxRIGHT</property>
|
||||||
<property name="proportion">1</property>
|
<property name="proportion">1</property>
|
||||||
<object class="wxGrid" expanded="0">
|
<object class="wxGrid" expanded="0">
|
||||||
<property name="BottomDockable">1</property>
|
<property name="BottomDockable">1</property>
|
||||||
|
|
Loading…
Reference in New Issue