Hello world/Graphical: Difference between revisions

Content deleted Content added
No edit summary
m Remove white space/etc.
Line 8: Line 8:
=={{header|C}}==
=={{header|C}}==
{{libheader|GTK}}
{{libheader|GTK}}

<pre>#include
<pre>#include


Line 43: Line 42:


{{libheader|GTK}}
{{libheader|GTK}}

#include <gtkmm.h>
#include <gtkmm.h>
int main(int argc, char *argv[])
int main(int argc, char *argv[])
Line 53: Line 51:
=={{header|Clean}}==
=={{header|Clean}}==
{{libheader|Object I/O}}
{{libheader|Object I/O}}

import StdEnv, StdIO
import StdEnv, StdIO


Line 63: Line 60:
=={{header|Java}}==
=={{header|Java}}==
{{libheader|Swing}}
{{libheader|Swing}}

import javax.swing.*;
import javax.swing.*;
public class OutputSwing {
public class OutputSwing {
Line 70: Line 66:
}
}
}
}

=={{header|JavaScript}}==
=={{header|JavaScript}}==
'''Interpreter:''' Firefox 2.0
'''Interpreter:''' Firefox 2.0
Line 89: Line 86:
=={{header|OCaml}}==
=={{header|OCaml}}==
{{libheader|GTK}}
{{libheader|GTK}}

let delete_event evt = false
let delete_event evt = false


Line 143: Line 139:


=={{header|PHP}}==
=={{header|PHP}}==

{{libheader|PHP-GTK}}
{{libheader|PHP-GTK}}

if (!class_exists('gtk'))
if (!class_exists('gtk'))
{
{
Line 160: Line 154:
$wnd->show_all();
$wnd->show_all();
Gtk::main();
Gtk::main();

=={{header|PostScript}}==
=={{header|PostScript}}==
In the geenral Postscript context, the <tt>show</tt> command will render the string that is topmost on the stack at the <tt>currentpoint</tt> in the previously <tt>setfont</tt>. Thus a minimal PostScript file that will print on a PostScript printer or previewer might look like this:
In the geenral Postscript context, the <tt>show</tt> command will render the string that is topmost on the stack at the <tt>currentpoint</tt> in the previously <tt>setfont</tt>. Thus a minimal PostScript file that will print on a PostScript printer or previewer might look like this:
Line 172: Line 167:
% wrap up page display:
% wrap up page display:
showpage
showpage

=={{header|Python}}==
=={{header|Python}}==
'''Interpreter:''' Python 2.5
'''Interpreter:''' Python 2.5


{{libheader|Tkinter}}
{{libheader|Tkinter}}

import tkMessageBox
import tkMessageBox
Line 182: Line 177:


'''Note:''' The result is a string of the button that was pressed.
'''Note:''' The result is a string of the button that was pressed.
{{libheader|GTK}}


{{libheader|GTK}}
<pre>import pygtk
<pre>import pygtk
pygtk.require('2.0')
pygtk.require('2.0')
Line 193: Line 188:
window.show_all()
window.show_all()
gtk.main()</pre>
gtk.main()</pre>

=={{header|Ruby}}==
=={{header|Ruby}}==
{{libheader|GTK}}
{{libheader|GTK}}

<pre>require 'gtk2'
<pre>require 'gtk2'