mirror of
https://github.com/jtdaugherty/brick.git
synced 2024-09-17 18:59:07 +03:00
Focus: add focusRingToList function
This commit is contained in:
parent
ed86fcb8f8
commit
f97943c8ea
@ -10,6 +10,7 @@ module Brick.Focus
|
||||
, focusGetCurrent
|
||||
, focusSetCurrent
|
||||
, focusRingLength
|
||||
, focusRingToList
|
||||
, focusRingCursor
|
||||
, withFocusRing
|
||||
, focusRingModify
|
||||
@ -81,6 +82,11 @@ focusSetCurrent n r@(FocusRing l) =
|
||||
focusRingLength :: FocusRing n -> Int
|
||||
focusRingLength (FocusRing l) = C.size l
|
||||
|
||||
-- | Starting with the currently-focused, go right and accumulate all
|
||||
-- resource names of the FocusRing in a list.
|
||||
focusRingToList :: FocusRing n -> [n]
|
||||
focusRingToList (FocusRing l) = C.rightElements l
|
||||
|
||||
-- | Modify the internal circular list structure of a focus ring
|
||||
-- directly. This function permits modification of the circular list
|
||||
-- using the rich Data.CircularList API.
|
||||
|
Loading…
Reference in New Issue
Block a user