forge
Explore
Log in

Don't you dare go Hollow

layout/scrolling: Add active_column()

Browse files at this commit

4a77aaf14179243bb3585d51eee586b5142805fbIvan MolodetskikhParent: f37231a
src/layout/scrolling.rsmodified+8 -0
@@ -1163,6 +1163,14 @@ impl<W: LayoutElement> ScrollingSpace<W> {
1163 tile1163 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;