|
wxMaxima
|
This class generates a pane containing the table of contents. More...
#include <TableOfContents.h>
Public Member Functions | |
| TableOfContents (wxWindow *parent, int id, Configuration *config, std::unique_ptr< GroupCell > *tree) | |
| void | OnMouseRightDown (wxListEvent &event) |
| void | OnRegExEvent (wxCommandEvent &ev) |
| What happens if someone changes the search box contents. | |
| void | UpdateTableOfContents (GroupCell *pos) |
| Update the structure information from the tree. | |
| GroupCell * | GetCell (std::size_t index) |
| Get the nth Cell in the table of contents. | |
| GroupCell * | RightClickedOn () |
| Returns the cell that was last right-clicked on. | |
| GroupCell * | DNDStart () |
| GroupCell * | DNDEnd () |
Static Public Member Functions | |
| static long | ClampDropIndex (long hitIndex, int itemCount, std::size_t numberOfCaptionsDragged) |
| Clamp a hit-tested drop position to a valid target. | |
Protected Member Functions | |
| void | OnSize (wxSizeEvent &event) |
| void | OnDragStart (wxListEvent &evt) |
| void | OnMouseUp (wxMouseEvent &evt) |
| void | OnMouseCaptureLost (wxMouseCaptureLostEvent &event) |
| void | OnMouseMotion (wxMouseEvent &event) |
| void | OnTimer (wxTimerEvent &event) |
| wxString | TocEntryString (GroupCell *cell) |
This class generates a pane containing the table of contents.
|
static |
Clamp a hit-tested drop position to a valid target.
hitIndex is tested against the pre-drop item count: once the dragged block of numberOfCaptionsDragged items is removed, only itemCount - numberOfCaptionsDragged "other" items are left, so dropping at or past that many means "move to the end of the list" – clamp to that boundary itself. (A negative hitIndex, meaning HitTest() found no item there, passes through unchanged.) Shared by OnMouseMotion() and OnMouseUp(), and exposed as a pure function so it can be unit-tested without needing to synthesize real mouse events – see test_TableOfContentsDnD.cpp.
| void TableOfContents::UpdateTableOfContents | ( | GroupCell * | pos | ) |
Update the structure information from the tree.
Since this function traverses the tree and we don't want it to impact the performance too much