Commit d33c90f9 authored by John van Groningen's avatar John van Groningen

Merge branch 'interface-bytecode-options' into 'master'

Move project options related to bytecode generation to new separate pane

See merge request !10
parents 97ed2178 c552d693
Pipeline #18431 passed with stage
in 46 seconds
......@@ -124,13 +124,14 @@ where
:+: objectsPane
:+: slibsPane
:+: dlibsPane
) [ControlPos (Left,zero)]
:+: bytecodePane
) (Columns 3) [ControlPos (Left,zero)]
panesDefaults = TabControl
( applicationPane
:+: compilerPane
:+: diagnosticsPane
:+: linkerPane
) [ControlPos (Left,zero)]
) (Columns 2) [ControlPos (Left,zero)]
buttons
= ButtonControl "OK"
[ControlFunction okfun,ControlPos (Right,zero), ControlId okId]
......@@ -320,14 +321,6 @@ where
:+: CheckControl
[("Generate descriptors and export labels",Nothing,toMark ao.desc_exl,noPS (\l->{l & ao.desc_exl = not l.ao.desc_exl}))]
(Columns 1) [ControlPos (Left,zero)]
:+: CheckControl
[("Optimise ABC",Nothing,toMark cgo.optimise_abc,noPS (\l->{l & cgo.optimise_abc = not l.cgo.optimise_abc}))]
(Columns 1) [ControlPos (Left,zero)]
:+: CheckControl
[("Generate bytecode",Nothing,toMark cgo.generate_bytecode,noPS (\l->{l & cgo.generate_bytecode = not l.cgo.generate_bytecode}))]
(Columns 1) [ControlPos (Left,zero)]
:+: TextControl ("Bytecode produced as: "+++bytecodepath) [ControlId bytecodepathId,ControlPos (Left,zero):if actualProject [] [ControlHide]]
:+: ButtonControl "Set bytecode file..." [ControlFunction setbytecodepath,ControlPos (Left,zero):if actualProject [] [ControlHide]]
)
diagnosticsPane = Pane "Diagnostics"
( TextControl "Diagnostics Options" []
......@@ -394,6 +387,20 @@ where
)
NilLS
)
bytecodePane = Pane "Bytecode"
( TextControl "Bytecode options" []
:+: CheckControl
[("Generate bytecode",Nothing,toMark cgo.generate_bytecode,\l ps->{l & cgo.generate_bytecode = not l.cgo.generate_bytecode}))]
(Columns 1) [ControlPos (Left,zero)]
:+: CheckControl
[("Use optimised ABC code",Nothing,toMark cgo.optimise_abc,noPS (\l->{l & cgo.optimise_abc = not l.cgo.optimise_abc}))]
(Columns 1) [ControlPos (Left,zero)]
:+: CheckControl
[("Strip bytecode",Nothing,toMark lo.strip_bytecode,noPS (\l->{l & lo.strip_bytecode = not l.lo.strip_bytecode}))]
(Columns 1) [ControlPos (Left,zero)]
:+: TextControl ("Generate main bytecode file as: "+++bytecodepath) [ControlId bytecodepathId,ControlPos (Left,zero):if actualProject [] [ControlHide]]
:+: ButtonControl "Set bytecode file..." [ControlFunction setbytecodepath,ControlPos (Left,zero):if actualProject [] [ControlHide]]
)
setrsrcs (ls,ps)
# (rsrcname,ps) = PlatformDependant
......
......@@ -537,7 +537,7 @@ where
:+: Pane "Dynamic Libraries" (dlibpane inifull lblib c2id r2id)
:+: Pane "Static Libraries" (slibpane inifull lbsll c3id r3id)
:+: Pane "Object Modules" (objmpane inifull lbobj c4id r4id)
) [ControlPos (Left,zero)]
) (Columns 2) [ControlPos (Left,zero)]
buttons wid okId cancelId getTs setTs ct ts {compId,cgenId,linkId,dynlId,versId,methId,abcOptId,bcGenId,bcLinkId,bcStripId}
= ButtonControl "Done"
......
......@@ -2,7 +2,7 @@ definition module tabcontrol
import StdControlClass
:: TabControl c ls pst = TabControl (c ls pst) [ControlAttribute *(ls,pst)]
:: TabControl c ls pst = TabControl (c ls pst) RowsOrColumns [ControlAttribute *(ls,pst)]
instance Controls (TabControl c) | Panes c
......
......@@ -10,16 +10,16 @@ Vellum = RGB {r=200,g=225,b=255}
//--- Tab Control
:: TabControl c ls pst = TabControl (c ls pst) [ControlAttribute *(ls,pst)]
:: TabControl c ls pst = TabControl (c ls pst) RowsOrColumns [ControlAttribute *(ls,pst)]
instance Controls (TabControl c) | Panes c
where
getControlType _ = "TabControl"
controlToHandles (TabControl tabs atts) ps
controlToHandles (TabControl tabs rowsorcols atts) ps
# (rid,ps) = openId ps
# (ts,is,cs,ps) = getLC tabs True rid ps
# (sz,ps) = controlSize (rdef rid ts is) False (Just (0,0)) (Just (0,0)) Nothing ps
# (cs`,ps) = controlToHandles (imp sz rid ts cs is atts) ps
# (sz,ps) = controlSize (rdef rowsorcols rid ts is) False (Just (0,0)) (Just (0,0)) Nothing ps
# (cs`,ps) = controlToHandles (imp rowsorcols sz rid ts cs is atts) ps
= (cs`,ps)
look sz ss us=:{newFrame} pc
......@@ -44,19 +44,19 @@ where
yoffset = sz.h + 5
yoffset` = inc yoffset
imp sz rid labels panes ids atts
imp rowsorcols sz rid labels panes ids atts
= CompoundControl
( rdef rid labels ids
( rdef rowsorcols rid labels ids
:+: (Handles panes)
)
[ControlLook True (look sz),ControlHMargin 0 0, ControlVMargin 0 0:atts]
rdef rid labels ids
rdef rowsorcols rid labels ids
= RadioControl
[ (label,Nothing,noLS (switchto x))
\\ label <- labels
& x <- [0..]
] (Columns 2) 1 [ControlId rid]
] rowsorcols 1 [ControlId rid]
where
switchto x ps
= appPIO (showControl (ids!!x) o hideControls ids) ps
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment