layout/scrolling: Add active_column()
Browse files at this commit4a77aaf14179243bb3585d51eee586b5142805fbParent: f37231a1 changed file +8 -0
- src/layout/scrolling.rs +8 -0
src/layout/scrolling.rsmodified+8 -0
| @@ -1163,6 +1163,14 @@ impl<W: LayoutElement> ScrollingSpace<W> { | |||
| 1163 | tile | 1163 | tile |
| 1164 | } | 1164 | } |
| 1165 | 1165 | ||
| 1166 | + pub fn active_column(&self) -> Option<&Column<W>> { | ||
| 1167 | + if self.columns.is_empty() { | ||
| 1168 | + return None; | ||
| 1169 | + } | ||
| 1170 | + | ||
| 1171 | + Some(&self.columns[self.active_column_idx]) | ||
| 1172 | + } | ||
| 1173 | + | ||
| 1166 | pub fn remove_active_column(&mut self) -> Option<Column<W>> { | 1174 | pub fn remove_active_column(&mut self) -> Option<Column<W>> { |
| 1167 | if self.columns.is_empty() { | 1175 | if self.columns.is_empty() { |
| 1168 | return None; | 1176 | return None; |