Scroll to navigation



tickit_window_scroll, tickit_window_scrollrect - scroll the area of a window


#include <tickit.h>

bool tickit_window_scroll(TickitWindow *win, int downward, int rightward);
bool tickit_window_scrollrect(TickitWindow *win, const TickitRect *rect,
         int downward, int rightward, TickitPen *pen);

bool tickit_window_scroll_with_children(TickitWindow *win,
         int downward, int rightward);

Link with -ltickit.


tickit_window_scroll() requests that the underlying terminal scroll the contents of the area corresponding to the visible region (or regions) of the given window by the given amount. This takes into account aspects of the visiblity of the window, such as being obscured by siblings or siblings of ancestors, child windows, or whether the window or any parent is hidden. It returns true if it managed to perform the required scrolling, or false if not.

tickit_window_scrollrect() requests that the terminal scroll the contents of the area corresponding to the given rectangle within the window, and otherwise works analogously to tickit_window_scroll(). If the pen argument is non-NULL then it is applied to the terminal before any erase operations within the window are performed, allowing a different background colour if set.

tickit_window_scroll_with_children() is similar again, except that it does not consider obscuring regions by child windows; only siblings or siblings of ancestors. This is intended for scrolling a container of windows, which will move all of the sub-windows too. Note that this function does not actually move the child windows, it simply requests a scrolling operation on the underlying terminal.


These functions all return a boolean.


tickit_window_new(3), tickit_window_set_geometry(3), tickit_window_expose(3), tickit_window(7), tickit(7)