MCPcopy Create free account
hub / github.com/NPP-JSONViewer/JSON-Viewer / ContextMenuExpand

Method ContextMenuExpand

src/NppJsonViewer/JsonViewDlg.cpp:808–822  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

806}
807
808void JsonViewDlg::ContextMenuExpand(bool bExpand)
809{
810 HTREEITEM htiSelected = m_pTreeView->GetSelection();
811 if (htiSelected == NULL)
812 return;
813
814 HTREEITEM htiRoot = m_pTreeView->GetRoot();
815 HTREEITEM htiNext = htiSelected;
816 while (htiNext != NULL)
817 {
818 if (!(htiNext == htiRoot && !bExpand))
819 bExpand ? m_pTreeView->Expand(htiNext) : m_pTreeView->Collapse(htiNext);
820 htiNext = m_pTreeView->NextItem(htiNext, htiSelected);
821 }
822}
823
824auto JsonViewDlg::CopyName() const -> std::wstring
825{

Callers

nothing calls this directly

Calls 5

GetSelectionMethod · 0.80
GetRootMethod · 0.80
ExpandMethod · 0.80
CollapseMethod · 0.80
NextItemMethod · 0.45

Tested by

no test coverage detected