targetui.dcl 884 Bytes
Newer Older
Diederik van Arkel's avatar
Diederik van Arkel committed
1 2 3 4
definition module targetui

// gui elements for environments

Diederik van Arkel's avatar
Diederik van Arkel committed
5
import StdMenu
Diederik van Arkel's avatar
Diederik van Arkel committed
6 7 8 9 10 11 12 13 14
import PmEnvironment
import IdeState

setProjectTarget :: !String !(PSt *General) -> PSt *General
// sets the environment for the current project

getTargetName :: !(PSt *General) -> (String,PSt *General)
// gets the environment of the current project

Diederik van Arkel's avatar
Diederik van Arkel committed
15 16 17 18 19
:: TargetMenu ls pst	//:== Menu (:+: .MenuItem (:+: .MenuItem (:+: .MenuSeparator .RadioMenu))) ls pst

instance Menus TargetMenu

targetMenu :: !String [.Target] Id Id (*(PSt *General) -> *([.Target],*(PSt *General))) ([Target] -> .(*(PSt *General) -> *(PSt *General))) -> TargetMenu .a *(PSt *General)
Diederik van Arkel's avatar
Diederik van Arkel committed
20 21 22 23 24
// define the environments menu

selectProjectTarget :: !(*(PSt *General) -> *([.Target],*(PSt *General))) !*(PSt *General) -> *(PSt *General)
// selects the environment of the current project in the
// environments menu (with availability checking)