Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
20
Task/Window-creation/Standard-ML/window-creation-1.ml
Normal file
20
Task/Window-creation/Standard-ML/window-creation-1.ml
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
open XWindows ;
|
||||
open Motif ;
|
||||
|
||||
val showWindow = fn () =>
|
||||
|
||||
let
|
||||
val shell = XtAppInitialise "" "demo" "top" [] [XmNwidth 400, XmNheight 300 ] ;
|
||||
val main = XmCreateMainWindow shell "main" [XmNmappedWhenManaged true ] ;
|
||||
val buttn = XmCreateDrawnButton main "stop" [ XmNlabelString "Exit"] ;
|
||||
val quit = fn (w,c,t) => (XtUnrealizeWidget shell; t) ;
|
||||
in
|
||||
|
||||
(
|
||||
XtSetCallbacks buttn [ (XmNactivateCallback, quit) ] XmNarmCallback ;
|
||||
XtManageChildren [buttn];
|
||||
XtManageChild main;
|
||||
XtRealizeWidget shell
|
||||
)
|
||||
|
||||
end;
|
||||
1
Task/Window-creation/Standard-ML/window-creation-2.ml
Normal file
1
Task/Window-creation/Standard-ML/window-creation-2.ml
Normal file
|
|
@ -0,0 +1 @@
|
|||
showWindow ()
|
||||
Loading…
Add table
Add a link
Reference in a new issue