{- |
If you add a new option,
please mind to add a default value to FrameOptionSet.deflt, too.
-}
module Graphics.Gnuplot.Private.FrameOption where

{- |
Every option represents an internal state in gnuplot.
It is altered with gnuplot's set command.
The first field in 'T' is the name of the option
and the name of the according internal state in gnuplot.

Sometimes the addressed state is not explicitly mentioned
but is expressed by the syntax of the values.
E.g. you can write @set grid xtics@ and @set grid noxtics@,
but both commands refer to the same internal boolean variable,
that we like to call @xtics@.
It is important that the gnuplot Haskell bindings know
that these two set commands refer to the same gnuplot state,
since we want to simulate a stateless functional interface
in front of a stateful imperative one.

In case of a such a hidden state,
we manage an identifier in the second field of 'T'.
It is mainly used for distinguishing different hidden states,
that are accessed by the same @set@ variable.
This second field may not contain valid gnuplot identifiers,
however you might use the field for formatting boolean options
using 'Graphics.Gnuplot.Frame.OptionSet.addBool'.
-}
data T = Cons String String
   deriving (T -> T -> Bool
(T -> T -> Bool) -> (T -> T -> Bool) -> Eq T
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: T -> T -> Bool
$c/= :: T -> T -> Bool
== :: T -> T -> Bool
$c== :: T -> T -> Bool
Eq, Eq T
Eq T
-> (T -> T -> Ordering)
-> (T -> T -> Bool)
-> (T -> T -> Bool)
-> (T -> T -> Bool)
-> (T -> T -> Bool)
-> (T -> T -> T)
-> (T -> T -> T)
-> Ord T
T -> T -> Bool
T -> T -> Ordering
T -> T -> T
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: T -> T -> T
$cmin :: T -> T -> T
max :: T -> T -> T
$cmax :: T -> T -> T
>= :: T -> T -> Bool
$c>= :: T -> T -> Bool
> :: T -> T -> Bool
$c> :: T -> T -> Bool
<= :: T -> T -> Bool
$c<= :: T -> T -> Bool
< :: T -> T -> Bool
$c< :: T -> T -> Bool
compare :: T -> T -> Ordering
$ccompare :: T -> T -> Ordering
$cp1Ord :: Eq T
Ord, Int -> T -> ShowS
[T] -> ShowS
T -> String
(Int -> T -> ShowS) -> (T -> String) -> ([T] -> ShowS) -> Show T
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [T] -> ShowS
$cshowList :: [T] -> ShowS
show :: T -> String
$cshow :: T -> String
showsPrec :: Int -> T -> ShowS
$cshowsPrec :: Int -> T -> ShowS
Show)

{- |
Constructs a generic option from Strings for the first and second field of 'T'.

This is very flexible, but not very safe.
Use it only as fall-back,
if there is no specific setter function in "Graphics.Gnuplot.Frame.OptionSet".
-}
custom :: String -> String -> T
custom :: String -> String -> T
custom = String -> String -> T
Cons

grid   :: String -> T; grid :: String -> T
grid   = String -> String -> T
Cons String
"grid"
size   :: String -> T; size :: String -> T
size   = String -> String -> T
Cons String
"size"
key    :: String -> T; key :: String -> T
key    = String -> String -> T
Cons String
"key"
border :: String -> T; border :: String -> T
border = String -> String -> T
Cons String
"border"
pm3d   :: String -> T; pm3d :: String -> T
pm3d   = String -> String -> T
Cons String
"pm3d"

xRange :: String -> T; xRange :: String -> T
xRange = String -> String -> T
Cons String
"xrange"
yRange :: String -> T; yRange :: String -> T
yRange = String -> String -> T
Cons String
"yrange"
zRange :: String -> T; zRange :: String -> T
zRange = String -> String -> T
Cons String
"zrange"

xLabel :: String -> T; xLabel :: String -> T
xLabel = String -> String -> T
Cons String
"xlabel"
yLabel :: String -> T; yLabel :: String -> T
yLabel = String -> String -> T
Cons String
"ylabel"
zLabel :: String -> T; zLabel :: String -> T
zLabel = String -> String -> T
Cons String
"zlabel"

xTicks :: String -> T; xTicks :: String -> T
xTicks = String -> String -> T
Cons String
"xtics"
yTicks :: String -> T; yTicks :: String -> T
yTicks = String -> String -> T
Cons String
"ytics"
zTicks :: String -> T; zTicks :: String -> T
zTicks = String -> String -> T
Cons String
"ztics"

xLogScale :: T; xLogScale :: T
xLogScale = String -> String -> T
Cons String
"logscale x" String
""
yLogScale :: T; yLogScale :: T
yLogScale = String -> String -> T
Cons String
"logscale y" String
""
zLogScale :: T; zLogScale :: T
zLogScale = String -> String -> T
Cons String
"logscale z" String
""


title :: T; title :: T
title = String -> String -> T
Cons String
"title" String
""
view  :: T; view :: T
view  = String -> String -> T
Cons String
"view" String
""

xFormat :: T; xFormat :: T
xFormat = String -> String -> T
Cons String
"format x" String
""
yFormat :: T; yFormat :: T
yFormat = String -> String -> T
Cons String
"format y" String
""
zFormat :: T; zFormat :: T
zFormat = String -> String -> T
Cons String
"format z" String
""

timeFmt :: T; timeFmt :: T
timeFmt = String -> String -> T
Cons String
"timefmt" String
""

xData :: T; xData :: T
xData = String -> String -> T
Cons String
"xdata" String
""
yData :: T; yData :: T
yData = String -> String -> T
Cons String
"ydata" String
""
zData :: T; zData :: T
zData = String -> String -> T
Cons String
"zdata" String
""


sizeScale :: T; sizeScale :: T
sizeScale = String -> T
size String
"scale"
sizeRatio :: T; sizeRatio :: T
sizeRatio = String -> T
size String
"ratio"
keyShow     :: T; keyShow :: T
keyShow     = String -> T
key String
"show"
keyPosition :: T; keyPosition :: T
keyPosition = String -> T
key String
"position"

xRangeBounds :: T; xRangeBounds :: T
xRangeBounds = String -> T
xRange String
"bounds"
yRangeBounds :: T; yRangeBounds :: T
yRangeBounds = String -> T
yRange String
"bounds"
zRangeBounds :: T; zRangeBounds :: T
zRangeBounds = String -> T
zRange String
"bounds"

xLabelText :: T; xLabelText :: T
xLabelText = String -> T
xLabel String
"text"
yLabelText :: T; yLabelText :: T
yLabelText = String -> T
yLabel String
"text"
zLabelText :: T; zLabelText :: T
zLabelText = String -> T
zLabel String
"text"

xTickLabels :: T; xTickLabels :: T
xTickLabels = String -> T
xTicks String
"labels"
yTickLabels :: T; yTickLabels :: T
yTickLabels = String -> T
yTicks String
"labels"
zTickLabels :: T; zTickLabels :: T
zTickLabels = String -> T
zTicks String
"labels"

gridXTicks :: T; gridXTicks :: T
gridXTicks = String -> T
grid String
"xtics"
gridYTicks :: T; gridYTicks :: T
gridYTicks = String -> T
grid String
"ytics"
gridZTicks :: T; gridZTicks :: T
gridZTicks = String -> T
grid String
"ztics"

boxwidth :: T; boxwidth :: T
boxwidth = String -> String -> T
Cons String
"boxwidth" String
""

styleFillSolid  :: T; styleFillSolid :: T
styleFillSolid  = String -> String -> T
Cons String
"style fill" String
"solid"
styleFillBorder :: T; styleFillBorder :: T
styleFillBorder = String -> String -> T
Cons String
"style fill" String
"border"
styleHistogram  :: T; styleHistogram :: T
styleHistogram  = String -> String -> T
Cons String
"style histogram" String
""