summaryrefslogtreecommitdiff
path: root/objectio/support_button.icl
diff options
context:
space:
mode:
Diffstat (limited to 'objectio/support_button.icl')
-rw-r--r--objectio/support_button.icl40
1 files changed, 0 insertions, 40 deletions
diff --git a/objectio/support_button.icl b/objectio/support_button.icl
deleted file mode 100644
index 64e601b..0000000
--- a/objectio/support_button.icl
+++ /dev/null
@@ -1,40 +0,0 @@
-module support_button
-
-// ********************************************************************************
-// Clean tutorial example program.
-//
-// This program can be used to test the different ControlAttributes for a
-// ButtonControl in a Dialog.
-// ********************************************************************************
-
-import StdEnv, StdIO
-
-Start :: *World -> *World
-Start world
-# (id, world) = openId world
-# buttons = [
- ButtonControl "Function" [ControlFunction (count 1 id)],
- ButtonControl "Hide" [ControlHide],
- ButtonControl "Id + Width" [ControlId id, ControlWidth (PixelWidth 250)],
- ButtonControl "ModsFunction" [ControlModsFunction (modf id)],
- ButtonControl "Pos" [ControlPos (Left, zero)],
- ButtonControl "SelectState" [ControlSelectState Able],
- ButtonControl "SelectState" [ControlSelectState Unable],
- ButtonControl "Tip" [ControlTip "Some tip"],
- ButtonControl "Width" [ControlWidth (PixelWidth 250)]
- ]
-# controls = ListLS buttons
-# dialog = Dialog "Support - ButtonControl" controls [WindowClose (noLS closeProcess)]
-= startIO NDI Void (initialise dialog) [] world
-where
- initialise dialog pst
- # (error,pst) = openDialog 0 dialog pst
- | error <> NoError = closeProcess pst
- | otherwise = pst
-
- count :: Int Id (Int, PSt .l) -> (Int, PSt .l)
- count dx id (count,pst=:{io}) = (count + dx, appPIO (setControlText id (toString (count+dx))) pst)
-
- modf :: Id Modifiers -> (Int, PSt .l) -> (Int, PSt .l)
- modf id mods = \(count,pst=:{io}) . (count, appPIO (setControlText id (toString mods)) pst)
-