38 m_listFp->AppendColumn(
_(
"Schematic assignment" ) );
39 m_listFp->AppendColumn( wxT(
"<=" ) );
40 m_listFp->AppendColumn( wxT(
"=>" ) );
41 m_listFp->AppendColumn(
_(
"Cmp file assignment" ) );
47 const wxString& aFpCmpName )
62 for(
int ii = 0; ii <
m_listFp->GetItemCount(); ii++ )
82 int column =
event.GetColumn();
101 for(
int i = 0; i <
m_listFp->GetItemCount(); i++ )
103 m_listFp->SetItem( i, colclr, wxT(
"") );
104 m_listFp->SetItem( i, colset, wxT(
"X") );
110 wxPoint pos =
event.GetPosition();
111 int flgs = wxLIST_HITTEST_ONITEMLABEL;
112 long idx =
m_listFp->HitTest( pos, flgs );
115 int colclr = -1, colset = -1;
117 int maxpx = minpx +
m_listFp->GetColumnWidth( 2 );
119 if( pos.x > minpx && pos.x < maxpx )
128 maxpx = minpx +
m_listFp->GetColumnWidth( 3 );
130 if( pos.x > minpx && pos.x < maxpx )
142 m_listFp->SetItem( idx, colclr, wxT(
"") );
143 m_listFp->SetItem( idx, colset, wxT(
"X") );
158 const int margin = 16;
163 sel_length += margin;
168 for(
int i = 0; i <
m_listFp->GetItemCount(); i++ )
172 if( length > maxRefLength )
173 maxRefLength = length;
179 maxRefLength += margin;
180 totalLength = maxRefLength + sel_length + sel_length;
182 int cwidth = (GetClientSize().x - totalLength) / 2;
Class DIALOG_FP_CONFLICT_ASSIGNMENT_SELECTOR_BASE.
void OnColumnClick(wxListEvent &event) override
void OnItemClicked(wxMouseEvent &event) override
DIALOG_FP_CONFLICT_ASSIGNMENT_SELECTOR(wxWindow *parent)
void Add(const wxString &aRef, const wxString &aFpSchName, const wxString &aFpCmpName)
Add a line to the selection list.
void OnSize(wxSizeEvent &event) override
void recalculateColumns()
int GetSelection(const wxString &aReference)
wxSize GetTextSize(const wxString &aSingleLine, wxWindow *aWindow)
Return the size of aSingleLine of text when it is rendered in aWindow using whatever font is currentl...