26#include <wx/srchctrl.h>
39 void OnScroll(wxScrollWinEvent &event);
40 void OnToggleHorizontalSync(wxCommandEvent &event);
41 void OnToggleVerticalSync(wxCommandEvent &event);
42 void OnSearch(wxCommandEvent &event);
43 void OnSearchCancel(wxCommandEvent &event);
44 void OnDiffNext(wxCommandEvent &event);
45 void OnDiffPrev(wxCommandEvent &event);
50 int CurrentScrollY(
size_t idx)
const;
54 void SyncScrollFrom(
int src_idx,
int y_new_src);
56 std::vector<Worksheet *> m_worksheets;
57 std::vector<std::unique_ptr<Configuration>> m_worksheetConfigurations;
59 wxSearchCtrl *m_searchCtrl =
nullptr;
60 wxRadioButton *m_searchDownRadio =
nullptr;
61 wxRadioButton *m_searchUpRadio =
nullptr;
62 int m_currentDiffIdx = -1;
63 bool m_syncing =
false;
64 bool m_syncHorizontal =
true;
65 bool m_syncVertical =
true;
66 bool m_searchDown =
true;
68 void LoadFiles(
const wxArrayString &files);
74 std::vector<DiffEntry> m_diffEntries;
75 std::vector<int> m_lastScrollY;
79 bool IsDiffEntry(
const DiffEntry &e)
const;
84 void UpdateDiffNavUI();
85 void OnIdle(wxIdleEvent &event);
89 int FindAdjacentDiff(
int direction)
const;
92 void SetCurrentDiff(
int idx);
97 struct DiffMark {
int docY;
bool current; };
99 std::vector<DiffMark> DiffMarksForPane(
size_t paneIdx)
const;
102 void JumpToNearestDiff(
size_t paneIdx,
int docY);
104 std::vector<DiffMarkerBar *> m_markerBars;
107 int m_lastBarViewTop = -1;
108 int m_lastBarCurrent = -2;
114 std::vector<int> m_lastBarDocHeights;
116 wxToolBar *m_toolBar =
nullptr;
118 wxStaticText *m_diffStatus =
nullptr;
121 int m_shownPrevEnabled = -1;
122 int m_shownNextEnabled = -1;
129 wxTimer m_resizeTimer;
130 void RelayoutWorksheets();
135 int m_lastLayoutWidth = -1;
This file defines the class Worksheet.
The configuration storage for the current worksheet.
Definition: Configuration.h:97
Definition: DiffFrame.h:33
Definition: DiffFrame.cpp:42
A cell grouping input (and, if there is one, also the output) cell to a foldable item.
Definition: GroupCell.h:87