39 m_listFp->AppendColumn(
_(
"Schematic assignment" ) );
40 m_listFp->AppendColumn( wxT(
"<=" ) );
41 m_listFp->AppendColumn( wxT(
"=>" ) );
42 m_listFp->AppendColumn(
_(
"Cmp file assignment" ) );
48 const wxString& aFpCmpName )
63 for(
int ii = 0; ii <
m_listFp->GetItemCount(); ii++ )
83 int column =
event.GetColumn();
102 for(
int i = 0; i <
m_listFp->GetItemCount(); i++ )
104 m_listFp->SetItem( i, colclr, wxT(
"") );
105 m_listFp->SetItem( i, colset, wxT(
"X") );
111 wxPoint pos =
event.GetPosition();
112 int flgs = wxLIST_HITTEST_ONITEMLABEL;
113 long idx =
m_listFp->HitTest( pos, flgs );
116 int colclr = -1, colset = -1;
118 int maxpx = minpx +
m_listFp->GetColumnWidth( 2 );
120 if( pos.x > minpx && pos.x < maxpx )
129 maxpx = minpx +
m_listFp->GetColumnWidth( 3 );
131 if( pos.x > minpx && pos.x < maxpx )
143 m_listFp->SetItem( idx, colclr, wxT(
"") );
144 m_listFp->SetItem( idx, colset, wxT(
"X") );
159 const int margin = 16;
164 sel_length += margin;
169 for(
int i = 0; i <
m_listFp->GetItemCount(); i++ )
173 if( length > maxRefLength )
174 maxRefLength = length;
180 maxRefLength += margin;
181 totalLength = maxRefLength + sel_length + sel_length;
183 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.