|
KiCad PCB EDA Suite
|
A checkable list of files, grouped into sections. More...
#include <file_checklist_ctrl.h>
Public Member Functions | |
| FILE_CHECKLIST_CTRL (wxWindow *aParent, wxWindowID aId=wxID_ANY) | |
| ~FILE_CHECKLIST_CTRL () override | |
| void | SetEntries (const std::vector< FILE_CHECKLIST_ENTRY > &aEntries) |
| void | SetAllChecked (bool aChecked) |
| std::vector< wxString > | GetCheckedPaths () const |
| wxString | GetItemPath (const wxDataViewItem &aItem) const |
| Path of the file row for aItem, or empty for a section header or invalid item. | |
| bool | AssociateModel (wxDataViewModel *aModel) override |
Install a WX_ENSURE_VISIBLE_CANCELLER on aModel so deferred scrolls are dropped automatically when it frees items, then associate it as usual. | |
| wxDataViewItem | GetPrevItem (wxDataViewItem const &aItem) |
| Get the previous item in list order. | |
| wxDataViewItem | GetNextItem (wxDataViewItem const &aItem) |
| Get the next item in list order. | |
| wxDataViewItem | GetPrevSibling (wxDataViewItem const &aItem) |
| Get the previous sibling of an item. | |
| wxDataViewItem | GetNextSibling (wxDataViewItem const &aItem) |
| Get the next sibling of an item. | |
| void | DoSetToolTipText (const wxString &tip) override |
| void | ExpandAll () |
| void | CollapseAll () |
| void | CancelPendingEnsureVisible () |
| Cancel any pending deferred EnsureVisible request. | |
Private Attributes | |
| wxObjectDataPtr< FILE_CHECKLIST_MODEL > | m_model |
| wxDataViewModelNotifier * | m_ensureVisibleCanceller = nullptr |
A checkable list of files, grouped into sections.
Each row has a checkbox, a status icon, a name, and a status word. Section header rows carry a checkbox that ticks or clears every row in the section.
The control is git-agnostic. Callers describe rows with FILE_CHECKLIST_ENTRY and ask back for the checked paths.
Definition at line 94 of file file_checklist_ctrl.h.
| FILE_CHECKLIST_CTRL::FILE_CHECKLIST_CTRL | ( | wxWindow * | aParent, |
| wxWindowID | aId = wxID_ANY ) |
Definition at line 320 of file file_checklist_ctrl.cpp.
References _, WX_DATAVIEWCTRL::AssociateModel(), FILE_CHECKLIST_MODEL::COL_CHECK, FILE_CHECKLIST_MODEL::COL_NAME, FILE_CHECKLIST_MODEL::COL_STATUS, and m_model.
|
override |
Definition at line 335 of file file_checklist_ctrl.cpp.
|
overrideinherited |
Install a WX_ENSURE_VISIBLE_CANCELLER on aModel so deferred scrolls are dropped automatically when it frees items, then associate it as usual.
Definition at line 187 of file wx_dataviewctrl.cpp.
References CancelPendingEnsureVisible(), and m_ensureVisibleCanceller.
Referenced by FILE_CHECKLIST_CTRL::FILE_CHECKLIST_CTRL().
|
inherited |
Cancel any pending deferred EnsureVisible request.
On GTK, wxDataViewCtrl::EnsureVisible() records the target item and re-scrolls to it during the next idle cycle (in OnInternalIdle). If the model is rebuilt and the underlying item is freed before that idle runs, OnInternalIdle dereferences the stale pointer in ExpandAncestors and crashes. The installed WX_ENSURE_VISIBLE_CANCELLER invokes this automatically when the model frees items, so call sites normally do not need to. This is a no-op on platforms that do not defer the scroll.
Definition at line 164 of file wx_dataviewctrl.cpp.
Referenced by AssociateModel().
|
inherited |
Definition at line 158 of file wx_dataviewctrl.cpp.
References recursiveDescent().
|
inlineoverrideinherited |
Definition at line 131 of file wx_dataviewctrl.h.
|
inherited |
Definition at line 152 of file wx_dataviewctrl.cpp.
References recursiveDescent().
Referenced by FILE_CHECKLIST_CTRL::SetEntries().
| std::vector< wxString > FILE_CHECKLIST_CTRL::GetCheckedPaths | ( | ) | const |
Definition at line 353 of file file_checklist_ctrl.cpp.
References m_model.
| wxString FILE_CHECKLIST_CTRL::GetItemPath | ( | const wxDataViewItem & | aItem | ) | const |
Path of the file row for aItem, or empty for a section header or invalid item.
Definition at line 359 of file file_checklist_ctrl.cpp.
References m_model.
|
inherited |
Get the next item in list order.
| aItem | a valid item in the control's model. |
Definition at line 44 of file wx_dataviewctrl.cpp.
References GetNextSibling().
|
inherited |
Get the next sibling of an item.
| aItem | a valid item in the control's model. |
Definition at line 110 of file wx_dataviewctrl.cpp.
Referenced by GetNextItem().
|
inherited |
Get the previous item in list order.
| aItem | a valid item in the control's model. |
Definition at line 23 of file wx_dataviewctrl.cpp.
References GetPrevSibling().
|
inherited |
Get the previous sibling of an item.
| aItem | a valid item in the control's model. |
Definition at line 87 of file wx_dataviewctrl.cpp.
Referenced by GetPrevItem().
| void FILE_CHECKLIST_CTRL::SetAllChecked | ( | bool | aChecked | ) |
Definition at line 347 of file file_checklist_ctrl.cpp.
References m_model.
| void FILE_CHECKLIST_CTRL::SetEntries | ( | const std::vector< FILE_CHECKLIST_ENTRY > & | aEntries | ) |
Definition at line 340 of file file_checklist_ctrl.cpp.
References WX_DATAVIEWCTRL::ExpandAll(), and m_model.
|
privateinherited |
Definition at line 150 of file wx_dataviewctrl.h.
Referenced by AssociateModel(), and ~WX_DATAVIEWCTRL().
|
private |
Definition at line 110 of file file_checklist_ctrl.h.
Referenced by FILE_CHECKLIST_CTRL(), GetCheckedPaths(), GetItemPath(), SetAllChecked(), and SetEntries().