39 m_listFp->AppendColumn(
_(
"Schematic assignment" ) );
40 m_listFp->AppendColumn( wxT(
"<=" ) );
41 m_listFp->AppendColumn( wxT(
"=>" ) );
42 m_listFp->AppendColumn(
_(
"Cmp file assignment" ) );
49 const wxString& aFpCmpName )
65 for(
int ii = 0; ii <
m_listFp->GetItemCount(); ii++ )
86 int column =
event.GetColumn();
105 for(
int i = 0; i <
m_listFp->GetItemCount(); i++ )
107 m_listFp->SetItem( i, colclr, wxT(
"" ) );
108 m_listFp->SetItem( i, colset, wxT(
"X" ) );
115 wxPoint pos =
event.GetPosition();
116 int flgs = wxLIST_HITTEST_ONITEMLABEL;
117 long idx =
m_listFp->HitTest( pos, flgs );
120 int colclr = -1, colset = -1;
122 int maxpx = minpx +
m_listFp->GetColumnWidth( 2 );
124 if( pos.x > minpx && pos.x < maxpx )
133 maxpx = minpx +
m_listFp->GetColumnWidth( 3 );
135 if( pos.x > minpx && pos.x < maxpx )
147 m_listFp->SetItem( idx, colclr, wxT(
"" ) );
148 m_listFp->SetItem( idx, colset, wxT(
"X" ) );
163 const int margin = 16;
168 sel_length += margin;
173 for(
int i = 0; i <
m_listFp->GetItemCount(); i++ )
177 if( length > maxRefLength )
178 maxRefLength = length;
184 maxRefLength += margin;
185 totalLength = maxRefLength + sel_length + sel_length;
187 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)
KICOMMON_API 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...
Functions to provide common constants and other functions to assist in making a consistent UI.