From 73f8222109c3091d5119ed47eac5cad4a55b2212 Mon Sep 17 00:00:00 2001 From: Jan-Marek Glogowski Date: Fri, 17 May 2019 02:38:43 +0200 Subject: tdf#65587 SM handle page keys in the ElementControl The page handling implementation is a little bit tricky, because the elemnt list is not handled like a grid but a list. Normally one would keep the horizontal cell and just scroll vertically. Instead this implements a kind of circle. Vertical offset is consistet, so you have the same amount of steps for up and down, but up runs left and down runs right. Change-Id: I296a46e98f7e00a59fd0a0ba358c981b49ac86cd Reviewed-on: https://gerrit.libreoffice.org/72793 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski --- starmath/inc/ElementsDockingWindow.hxx | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'starmath/inc') diff --git a/starmath/inc/ElementsDockingWindow.hxx b/starmath/inc/ElementsDockingWindow.hxx index e102250652c0..874735a8a44f 100644 --- a/starmath/inc/ElementsDockingWindow.hxx +++ b/starmath/inc/ElementsDockingWindow.hxx @@ -99,7 +99,12 @@ class SmElementsControl : public Control void addElements(const std::pair aElementsArray[], sal_uInt16 size); SmElement* current() const; bool hasRollover() const { return m_nCurrentRolloverElement != SAL_MAX_UINT16; } + void stepFocus(const bool bBackward); + void pageFocus(const bool bBackward); + // common code of page and step focus + inline void scrollToElement(const bool, const SmElement*); + inline sal_uInt16 nextElement(const bool, const sal_uInt16, const sal_uInt16); void build(); -- cgit