# # The world's simplest X program! # # Note that a permanent frame is created # and the event handler is setup internally # and automagically. # Note that there is also resource file associated with this # application - has to be called "test" in the relevant directory # as per the title of the application and the default application class (function() { load("Motif") # make sure the Motif widget set is available # can get a different look and feel with a different # widget set. X = XApplication("test") # create the application framework # e.g. toplevel shell, etc. wd = Widget("lab", "XmLabel", as(X,"Widget"),realize=T) # create a label widget setResource(wd,labelString="Hello World") # Set the text displayed in the label XRealize(X) # Realize the widget hierarchy and # setup the event loop. invisible(return(X)) })()