Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Tree: cc39e5be0e
Fetching contributors…

Cannot retrieve contributors at this time

64 lines (52 sloc) 1.561 kB
require "motif"
function popup(button)
local dialog = button:CreateInformationDialog("info")
dialog.messageString = "Hello, world!"
dialog.okCallback = function ()
print('OK was pressed')
end
Realize(button:XtParent(), dialog)
dialog:XtParent():Popup(GrabNone)
end
SetLanguageProc(nil, nil, nil)
resources = {
'*fontList: variable',
'*renderTable: variable',
'*renderTable.variable.fontName: Arial',
'*renderTable.variable.fontSize: 14',
'*renderTable.variable.fontType: FONT_IS_XFT',
-- Color definitions
'*foreground: #000000',
'*background: #c1c1c1',
'*XmList.background: #999999',
'*XmPushButton.background: #999999',
'*XmDrawnButton.background: #999999',
'*XmRowColumn*OptionButton.background: #999999',
'*XmArrowButton.background: #c1c1c1',
'*XmText.background: #b98e8e',
'*XmScrolledWindow.XmText.background: #000000',
'*XmTextField.background: #b98e8e',
'*XmScrollBar.background: #999999',
'*XmScrollBar.foreground: #999999',
'*XmScale*foreground: #000000',
'*XmMenuShell*background: #c1c1c1',
'*XmMenuShell*XmToggleButton.selectColor: #000000',
'*highlightColor: #000000',
'*form*statusBar*foreground: #c1c1c1',
'*form*statusBar*troughColor: #b98e8e',
'*form*helpButton*background: #9f8484',
'*form*textLabel*background: #999999'
}
app, toplevel = Initialize("Demos", resources)
rc = RowColumn {
PushButton {
labelString = "Hello",
activateCallback = popup
},
PushButton {
labelString = "Goodbye",
activateCallback = function () app:SetExitFlag() end
}
}
Realize(toplevel, rc)
app:MainLoop()
Jump to Line
Something went wrong with that request. Please try again.