31#include <wx/listctrl.h>
32#include <wx/dragimag.h>
35#include "Configuration.h"
39#ifndef TABLEOFCONTENTS_H
40#define TABLEOFCONTENTS_H
44 structure_ctrl_id = 4,
60 void OnMouseRightDown(wxListEvent &event);
79 {
return m_cellRightClickedOn; }
81 GroupCell *DNDStart() {
return m_dndStartCell;}
82 GroupCell *DNDEnd() {
return m_dndEndCell;}
97 std::size_t numberOfCaptionsDragged);
99 void OnSize(wxSizeEvent &event);
100 void OnDragStart(wxListEvent &evt);
101 void OnMouseUp(wxMouseEvent &evt);
102 void OnMouseCaptureLost(wxMouseCaptureLostEvent &event);
103 void OnMouseMotion(wxMouseEvent &event);
104 void OnTimer(wxTimerEvent &event);
106 wxString TocEntryString(
GroupCell *cell);
109 std::unique_ptr<GroupCell> *m_tree;
117 wxTimer m_scrollUpTimer;
118 wxTimer m_scrollDownTimer;
119 wxDragImage *m_dragImage = NULL;
124 std::vector<CellPtr<GroupCell>> m_displayedGroupCells;
126 std::size_t m_numberOfCaptionsDragged = 0;
129 long m_dragStart = -1;
130 long m_dragStop = -1;
131 signed long m_dragCurrentPos = -1;
133 int m_dragFeedback_Last = -1;
135 long m_lastSelection;
138 void UpdateDisplay();
140 wxListCtrl *m_displayedItems;
143 wxArrayString m_items_old;
147 std::vector<CellPtr<GroupCell>> m_structure;
This file defines the class GroupCell that bundles input and output in the worksheet.
A weak non-owning pointer that becomes null whenever the observed object is destroyed.
Definition: CellPtr.h:539
The configuration storage for the current worksheet.
Definition: Configuration.h:98
A cell grouping input (and, if there is one, also the output) cell to a foldable item.
Definition: GroupCell.h:88
A BTextCtrl that allows to input a regex.
Definition: RegexCtrl.h:36
This class generates a pane containing the table of contents.
Definition: TableOfContents.h:52
GroupCell * GetCell(std::size_t index)
Get the nth Cell in the table of contents.
Definition: TableOfContents.cpp:440
void OnRegExEvent(wxCommandEvent &ev)
What happens if someone changes the search box contents.
Definition: TableOfContents.cpp:488
GroupCell * RightClickedOn()
Returns the cell that was last right-clicked on.
Definition: TableOfContents.h:78
void UpdateTableOfContents(GroupCell *pos)
Update the structure information from the tree.
Definition: TableOfContents.cpp:253
static long ClampDropIndex(long hitIndex, int itemCount, std::size_t numberOfCaptionsDragged)
Clamp a hit-tested drop position to a valid target.
Definition: TableOfContents.cpp:94