Definition at line 100 of file wrappers.py.
◆ __init__()
None python.iconfTool.gui.wrappers.DoublePad.__init__ |
( |
|
self, |
|
|
ComponentsDiffFileLoader |
data_loader |
|
) |
| |
Definition at line 101 of file wrappers.py.
101 def __init__(self, data_loader: ComponentsDiffFileLoader) ->
None:
102 self.data_loader: ComponentsDiffFileLoader = data_loader
103 self.data_structure: ComponentsStructure
104 self.diff_structure: ComponentsStructure
105 self.data_structure, self.diff_structure = self.data_loader.get_data()
108 self.pad_height: int = 0
111 self.current_pad: Pad
112 self.inactive_pad: Pad
113 self.actual_offset: int = 0
115 self.show_diff_only: bool =
False
◆ _initialize()
None python.iconfTool.gui.wrappers.DoublePad._initialize |
( |
|
self, |
|
|
|
stdscreen |
|
) |
| |
|
private |
Definition at line 135 of file wrappers.py.
135 def _initialize(self, stdscreen) -> None:
136 self.screen = stdscreen
137 self.screen.refresh()
138 self._initialize_window()
139 self._start_event_loop()
◆ _initialize_window()
None python.iconfTool.gui.wrappers.DoublePad._initialize_window |
( |
|
self | ) |
|
|
private |
Definition at line 117 of file wrappers.py.
117 def _initialize_window(self) -> None:
118 self.height, self.width = self.screen.getmaxyx()
119 self.window = curses.newwin(self.height, self.width, 0, 0)
121 self.data_structure,
int(self.width / 2 - 1), self.height
125 int(self.width / 2) - 1,
127 int(self.width / 2) + 2,
129 self.pad_height = self.height - 1
130 self.current_pad, self.inactive_pad = self.pad, self.diff_pad
131 self.diff_pad.hide_cursor()
132 self.diff_pad.refresh()
◆ _start_event_loop()
None python.iconfTool.gui.wrappers.DoublePad._start_event_loop |
( |
|
self | ) |
|
|
private |
Definition at line 190 of file wrappers.py.
190 def _start_event_loop(self) -> None:
193 event = self.screen.getch()
194 logger.debug(f
"Key pressed: [{event}, {chr(event)}]")
195 if event == ord(
"q"):
197 elif event == ord(
"\t"):
198 self.change_actual_pad()
199 elif event == ord(
"h"):
201 elif event == ord(
"m"):
203 elif event == ord(
"r"):
205 self.diff_pad.
clear()
209 ) = self.data_loader.get_data()
210 self.pad.reload_data(self.data_structure)
211 self.diff_pad.reload_data(self.diff_structure)
214 self.diff_pad.redraw()
217 self.current_pad.handle_event(event)
◆ change_actual_pad()
None python.iconfTool.gui.wrappers.DoublePad.change_actual_pad |
( |
|
self | ) |
|
Definition at line 164 of file wrappers.py.
164 def change_actual_pad(self) -> None:
165 if self.inactive_pad.lines_empty():
167 self.current_pad.hide_cursor()
168 self.current_pad, self.inactive_pad = (
172 self.inactive_pad.refresh()
173 self.current_pad.refresh()
174 self.current_pad.show_cursor()
◆ load_gui()
None python.iconfTool.gui.wrappers.DoublePad.load_gui |
( |
|
self | ) |
|
Definition at line 141 of file wrappers.py.
141 def load_gui(self) -> None:
142 curses.wrapper(self._initialize)
◆ refresh_whole_screen()
None python.iconfTool.gui.wrappers.DoublePad.refresh_whole_screen |
( |
|
self | ) |
|
Definition at line 159 of file wrappers.py.
159 def refresh_whole_screen(self) -> None:
160 self.window.refresh()
161 self.current_pad.refresh()
162 self.inactive_pad.refresh()
◆ search()
def python.iconfTool.gui.wrappers.DoublePad.search |
( |
|
self | ) |
|
Definition at line 144 of file wrappers.py.
145 search_size: int = 50
147 b_startx: int = self.width - search_size - 2
148 b_width: int = search_size
150 cursor_pos: Tuple[int, int] = curses.getsyx()
151 search: SearchModal = SearchModal(
152 b_startx, b_starty, b_width, b_height
154 text: str = search.edit()
155 curses.setsyx(cursor_pos[0], cursor_pos[1])
156 self.current_pad.
filter(text)
157 self.inactive_pad.
filter(text)
◆ show_help()
def python.iconfTool.gui.wrappers.DoublePad.show_help |
( |
|
self | ) |
|
Definition at line 176 of file wrappers.py.
177 search_size: int = 60
178 b_width: int = search_size
180 b_starty: int = self.screen.getmaxyx()[0] - b_height
181 b_startx: int = self.width - search_size - 2
182 cursor_pos: Tuple[int, int] = curses.getsyx()
183 search: DoubleHelpModal = DoubleHelpModal(
184 b_startx, b_starty, b_width, b_height
186 curses.setsyx(*cursor_pos)
188 self.current_pad.initialize_cursor()
◆ diff_pad
python.iconfTool.gui.wrappers.DoublePad.diff_pad |
◆ diff_structure
python.iconfTool.gui.wrappers.DoublePad.diff_structure |
◆ inactive_pad
python.iconfTool.gui.wrappers.DoublePad.inactive_pad |
◆ pad
python.iconfTool.gui.wrappers.DoublePad.pad |
◆ pad_height
python.iconfTool.gui.wrappers.DoublePad.pad_height |
◆ screen
python.iconfTool.gui.wrappers.DoublePad.screen |
◆ width
python.iconfTool.gui.wrappers.DoublePad.width |
◆ window
python.iconfTool.gui.wrappers.DoublePad.window |
The documentation for this class was generated from the following file:
void search(TDirectory *td, const std::string &s, std::string cwd, node *n)
recursive directory search for TH1 and TH2 and TProfiles