mirror of
https://gitlab.com/sheaf/metabrush.git
synced 2024-12-26 15:24:07 +00:00
39 lines
817 B
Haskell
39 lines
817 B
Haskell
module MetaBrush.UI.FileBar
|
|
( FileBar(..), createFileBar, newFileTab
|
|
, TabLocation(..)
|
|
)
|
|
where
|
|
|
|
-- gi-gtk
|
|
import qualified GI.Gtk as GTK
|
|
|
|
-- MetaBrush
|
|
import {-# SOURCE #-} MetaBrush.Context
|
|
( Variables, UIElements )
|
|
import MetaBrush.Document
|
|
( Document )
|
|
import {-# SOURCE #-} MetaBrush.UI.InfoBar
|
|
( InfoBar )
|
|
|
|
--------------------------------------------------------------------------------
|
|
|
|
data FileBar
|
|
= FileBar
|
|
{ fileBarBox :: !GTK.Box
|
|
, fileTabsBox :: !GTK.Box
|
|
, fileBarPhantomRadioButton :: !GTK.RadioButton
|
|
}
|
|
|
|
data TabLocation
|
|
= AfterCurrentTab
|
|
| LastTab
|
|
|
|
instance Show TabLocation
|
|
|
|
createFileBar
|
|
:: Variables
|
|
-> GTK.Window -> GTK.Box -> GTK.Label -> GTK.DrawingArea -> InfoBar
|
|
-> IO FileBar
|
|
|
|
newFileTab :: Variables -> UIElements -> Maybe Document -> TabLocation -> IO ()
|