Move towards selection section inventory management
This commit is contained in:
@@ -30,19 +30,14 @@ data SelectionList a = SelectionList
|
||||
}
|
||||
--deriving (Eq, Ord, Show, Read) --Generic, Flat)
|
||||
|
||||
data Regex = NoRegex
|
||||
| Regex
|
||||
{ _regString :: String
|
||||
, _regInput :: Bool
|
||||
}
|
||||
|
||||
data SelectionSections a = SelectionSections
|
||||
{ _sssSections :: IntMap (SelectionSection a)
|
||||
, _sssSelPos :: Maybe Int
|
||||
}
|
||||
|
||||
data SectionCursor = SectionCursor
|
||||
{ _scurPos :: Int
|
||||
{ _scurSel :: Int
|
||||
, _scurPos :: Int
|
||||
, _scurSize :: Int
|
||||
, _scurColor :: Color
|
||||
}
|
||||
@@ -50,6 +45,7 @@ data SectionCursor = SectionCursor
|
||||
data SelectionSection a = SelectionSection
|
||||
{ _ssItems :: IntMap (SelectionItem a)
|
||||
, _ssCursor :: Maybe SectionCursor
|
||||
, _ssRegex :: Regex
|
||||
-- , _ssSelPos :: Maybe Int
|
||||
-- , _ssSelSize :: Maybe Int
|
||||
-- , _ssSelColor :: Maybe Color
|
||||
@@ -61,11 +57,10 @@ data SelectionSection a = SelectionSection
|
||||
, _ssDescriptor :: String
|
||||
}
|
||||
|
||||
data SMRegex = NoSMRegex
|
||||
| SMRegex
|
||||
{ _smrString :: String
|
||||
, _smrInput :: Bool
|
||||
}
|
||||
|
||||
data Regex = UnavailableRegex
|
||||
| EmptyRegex
|
||||
| Regex {_regexString :: String}
|
||||
deriving (Show)
|
||||
|
||||
data SelectionIntMap a = SelectionIntMap
|
||||
@@ -115,6 +110,5 @@ makeLenses ''SelectionSection
|
||||
makeLenses ''SelectionSections
|
||||
makeLenses ''SectionCursor
|
||||
makeLenses ''Regex
|
||||
makeLenses ''SMRegex
|
||||
--deriveJSON defaultOptions ''SelectionItem
|
||||
--deriveJSON defaultOptions ''SelectionList
|
||||
|
||||
Reference in New Issue
Block a user