mirror of
https://github.com/jtdaugherty/brick.git
synced 2024-12-02 11:05:10 +03:00
Merge pull request #258 from 4eUeP/master
Focus: add focusRingToList function
This commit is contained in:
commit
3fd5a2af07
@ -10,6 +10,7 @@ module Brick.Focus
|
|||||||
, focusGetCurrent
|
, focusGetCurrent
|
||||||
, focusSetCurrent
|
, focusSetCurrent
|
||||||
, focusRingLength
|
, focusRingLength
|
||||||
|
, focusRingToList
|
||||||
, focusRingCursor
|
, focusRingCursor
|
||||||
, withFocusRing
|
, withFocusRing
|
||||||
, focusRingModify
|
, focusRingModify
|
||||||
@ -81,6 +82,11 @@ focusSetCurrent n r@(FocusRing l) =
|
|||||||
focusRingLength :: FocusRing n -> Int
|
focusRingLength :: FocusRing n -> Int
|
||||||
focusRingLength (FocusRing l) = C.size l
|
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
|
-- | Modify the internal circular list structure of a focus ring
|
||||||
-- directly. This function permits modification of the circular list
|
-- directly. This function permits modification of the circular list
|
||||||
-- using the rich Data.CircularList API.
|
-- using the rich Data.CircularList API.
|
||||||
|
Loading…
Reference in New Issue
Block a user