Window creation: Difference between revisions
mNo edit summary |
(Undo revision 7519 by Special:Contributions/Rh5Tji (User talk:Rh5Tji)) |
||
Line 1: | Line 1: | ||
{{task}} |
|||
[http://mi-kkiechang.ifrance.com/one-piece.html one piece hentai] [http://tulip123456.ifrance.com/topic/segretarie-sexy.html segretarie sexy] [http://jnk713.ifrance.com/img/styles/jeff-buckley/ jeff buckley forget her] [http://furrysoap.ifrance.com/a-gabbia/ a gabbia nuda] [http://spirit-psyki.ifrance.com/lib/matura-lesbo.html matura lesbo] [http://doctorpinkerton.ifrance.com/lib/banalizzare/ banalizzare] [http://tulip123456.ifrance.com/topic/videos-gratis.html videos gratis de poerno] [http://adrienneee.ifrance.com/blog/porno-video/ porno video animal sex] [http://adrienneee.ifrance.com/blog/sorgenti-fiume/ sorgenti fiume reno] [http://end14april.ifrance.com/blog/donne-nere.html donne nere] [http://competitio.ifrance.com/megan-gayl/ megan gayl] [http://tulip123456.ifrance.com/topic/nude-sexy.html nude sexy] [http://jnk713.ifrance.com/img/styles/il-canale/ il canale della notte] [http://end14april.ifrance.com/blog/casalinghe-con.html casalinghe con tanta voglia di sesso] [http://elixirium.ifrance.com/lib/www-indiansex.html www indiansex com] [http://competitio.ifrance.com/fanny-bravo/ fanny bravo gratis] [http://elixirium.ifrance.com/lib/sexi-chet.html sexi chet dal vivo] [http://adrienneee.ifrance.com/blog/sexo-en/ sexo en el siglo xxi] [http://cincydj.ifrance.com/images/small/susy-abati/ susy abati nuda] [http://tulip123456.ifrance.com/topic/donne-a.html donne a roma] [http://end14april.ifrance.com/blog/foto-sesso.html foto sesso in gruppo] [http://jnk713.ifrance.com/img/styles/testo-senza/ testo senza base fuck it] [http://mi-kkiechang.ifrance.com/video-manga.html video manga porno gratis] [http://elixirium.ifrance.com/lib/locali-gay.html locali gay a pescara] [http://bakadeshi.ifrance.com/img/styles/erotici-gratuiti.html erotici gratuiti] [http://cincydj.ifrance.com/images/small/calendari-nudi/ calendari nudi omosessuali] [http://cincydj.ifrance.com/images/small/foto-spiagge/ foto spiagge con nudisti] [http://adrienneee.ifrance.com/blog/gloria-gaynor/ gloria gaynor rich out ill be there] [http://mi-kkiechang.ifrance.com/giochi-gratis.html giochi gratis per cellulari] [http://tulip123456.ifrance.com/topic/settimanale-fox.html settimanale fox] [http://adrienneee.ifrance.com/blog/elisabeta-canalis/ elisabeta canalis] [http://bakadeshi.ifrance.com/img/styles/foto-di.html foto di vagine aperte] [http://doctorpinkerton.ifrance.com/lib/francesca-cavallin/ francesca cavallin nuda] [http://mi-kkiechang.ifrance.com/i-like.html i like girls] [http://mi-kkiechang.ifrance.com/gallerie-di.html gallerie di vip gratis] [http://jnk713.ifrance.com/img/styles/foto-uomo/ foto uomo colore nudo] [http://bakadeshi.ifrance.com/img/styles/racconti-erotici.html racconti erotici confessioni] [http://end14april.ifrance.com/blog/michel-viet.html michel viet gratis] [http://doctorpinkerton.ifrance.com/lib/couples-live/ couples live sex show] [http://bakadeshi.ifrance.com/img/styles/foto-sexy.html foto sexy gf 2006] [http://spirit-psyki.ifrance.com/lib/sex-cam.html sex cam] [http://spirit-psyki.ifrance.com/lib/girl-next.html girl next door] [http://jnk713.ifrance.com/img/styles/spice-girls/ spice girls mama mp3] [http://doctorpinkerton.ifrance.com/lib/gay-escort/ gay escort] [http://cincydj.ifrance.com/images/small/foto-gratis/ foto gratis cicciolina] [http://end14april.ifrance.com/blog/racconti-incesto.html racconti incesto gratis] [http://jnk713.ifrance.com/img/styles/gioco-adulto/ gioco adulto] [http://elixirium.ifrance.com/lib/foto-porno.html foto porno di britney spears] [http://tulip123456.ifrance.com/topic/pamela-anderson.html pamela anderson e tommy lee porno] [http://tulip123456.ifrance.com/topic/paola-paggi.html paola paggi] [http://adrienneee.ifrance.com/blog/sexo-fotos/ sexo fotos] [http://bakadeshi.ifrance.com/img/styles/federica-ridolfi.html federica ridolfi sexy] [http://bakadeshi.ifrance.com/img/styles/calendari-con.html calendari con tette enormi] [http://furrysoap.ifrance.com/lupin-hentai/ lupin hentai] [http://bakadeshi.ifrance.com/img/styles/ragazzi-gay.html ragazzi gay nudi] [http://elixirium.ifrance.com/lib/descargar-gratis.html descargar gratis] [http://spirit-psyki.ifrance.com/lib/barzellette-sulle.html barzellette sulle donne] [http://adrienneee.ifrance.com/blog/jeux-sexy/ jeux sexy] [http://doctorpinkerton.ifrance.com/lib/britney-spiars/ britney spiars nuda completa] [http://tulip123456.ifrance.com/topic/george-michael.html george michael wham] [http://elixirium.ifrance.com/lib/brunette-sexy.html brunette sexy] [http://mi-kkiechang.ifrance.com/polpacci-grandi.html polpacci grandi di ragazze] [http://elixirium.ifrance.com/lib/quadri-nudo.html quadri nudo] [http://mi-kkiechang.ifrance.com/tommy-girl.html tommy girl] [http://competitio.ifrance.com/fumetti-manga/ fumetti manga porno] [http://mi-kkiechang.ifrance.com/gioco-completo.html gioco completo scaricare gratis] [http://doctorpinkerton.ifrance.com/lib/foto-nudi/ foto nudi passati] [http://end14april.ifrance.com/blog/cartoline-donne.html cartoline donne] [http://furrysoap.ifrance.com/foto-porno/ foto porno d epoca] [http://cincydj.ifrance.com/images/small/racconti-erotici/ racconti erotici di masturbazione] [http://spirit-psyki.ifrance.com/lib/gioco-sexy.html gioco sexy] [http://bakadeshi.ifrance.com/img/styles/canzoni-mp.html canzoni mp3 gratis] [http://doctorpinkerton.ifrance.com/lib/matura-gay/ matura gay] [http://mi-kkiechang.ifrance.com/programma-scaricare.html programma scaricare musica gratis] [http://doctorpinkerton.ifrance.com/lib/gang-bang/ gang bang gay] [http://cincydj.ifrance.com/images/small/fuck-eamon/ fuck eamon testo] [http://furrysoap.ifrance.com/homevideo-xxx/ homevideo xxx] [http://adrienneee.ifrance.com/blog/vieo-porno/ vieo porno gratis di oggi] [http://furrysoap.ifrance.com/sex-manga/ sex manga] [http://end14april.ifrance.com/blog/incontri-sesso.html incontri sesso] [http://doctorpinkerton.ifrance.com/lib/sesso-gratis/ sesso gratis libero] [http://doctorpinkerton.ifrance.com/lib/sexo-de/ sexo de jovencitas gratis] [http://cincydj.ifrance.com/images/small/girl-cartoni/ girl cartoni] [http://bakadeshi.ifrance.com/img/styles/chat-incesto.html chat incesto] [http://adrienneee.ifrance.com/blog/football-sexy/ football sexy] [http://bakadeshi.ifrance.com/img/styles/the-best.html the best sex vree action live] [http://doctorpinkerton.ifrance.com/lib/sesso-bugie/ sesso, bugie e videotape] [http://end14april.ifrance.com/blog/siti-transex.html siti transex] [http://end14april.ifrance.com/blog/messaggi-gratis.html messaggi gratis sms] [http://spirit-psyki.ifrance.com/lib/eros-game.html eros game] [http://mi-kkiechang.ifrance.com/web-cam.html web cam gratis] [http://bakadeshi.ifrance.com/img/styles/giochi-erotici.html giochi erotici e sexy] [http://competitio.ifrance.com/perizzoma-donne/ perizzoma donne] [http://elixirium.ifrance.com/lib/yard-of.html yard of blond girl] [http://cincydj.ifrance.com/images/small/donne-depilate/ donne depilate] [http://mi-kkiechang.ifrance.com/carrera-andrade.html carrera andrade, jorge] [http://bakadeshi.ifrance.com/img/styles/transexuelle.html transexuelle] [http://bakadeshi.ifrance.com/img/styles/girlsex.html girlsex] [http://jnk713.ifrance.com/img/styles/video-sesso/ video sesso vecchie] [http://furrysoap.ifrance.com/video-gratis/ video gratis di cazzi grandi] [http://furrysoap.ifrance.com/videoporno-zip/ videoporno zip] [http://mi-kkiechang.ifrance.com/sexx.html sexx] [http://doctorpinkerton.ifrance.com/lib/los-pistoleros/ los pistoleros] [http://end14april.ifrance.com/blog/fuck-it.html fuck it italiano eamon] [http://cincydj.ifrance.com/images/small/raul-borges/ raul borges] [http://elixirium.ifrance.com/lib/donne-lesbiche.html donne lesbiche] [http://bakadeshi.ifrance.com/img/styles/www-fotos.html www fotos xxx de britney com] [http://tulip123456.ifrance.com/topic/luisana-desnuda.html luisana desnuda] [http://doctorpinkerton.ifrance.com/lib/programma-gratis/ programma gratis mp3] [http://tulip123456.ifrance.com/topic/dorismar-en.html dorismar en playboy] [http://doctorpinkerton.ifrance.com/lib/midi-file/ midi file 2004 gratis] [http://jnk713.ifrance.com/img/styles/fuck-coce/ fuck coce women men webcam free] [http://furrysoap.ifrance.com/boleros-rancheros/ boleros rancheros] [http://bakadeshi.ifrance.com/img/styles/cavallo-porno.html cavallo porno animali] [http://furrysoap.ifrance.com/xxx-man/ xxx man sex vree] [http://spirit-psyki.ifrance.com/lib/gay-mature.html gay mature sex] [http://cincydj.ifrance.com/images/small/hombres-desnudo/ hombres desnudo] [http://cincydj.ifrance.com/images/small/singola-anal/ singola anal] [http://jnk713.ifrance.com/img/styles/video-chat/ video chat xxx] [http://furrysoap.ifrance.com/veronica-del/ veronica del gf5 nuda] [http://end14april.ifrance.com/blog/fotografias-pornograficas.html fotografias pornograficas gratis] [http://jnk713.ifrance.com/img/styles/foto-transex/ foto transex modena bologna] [http://competitio.ifrance.com/donne-asia/ donne asia] [http://doctorpinkerton.ifrance.com/lib/vestiti-per/ vestiti per ragazze cubo] [http://cincydj.ifrance.com/images/small/giuochi-hard/ giuochi hard gratis] [http://doctorpinkerton.ifrance.com/lib/sexlist/ sexlist] [http://cincydj.ifrance.com/images/small/sexoenvivo/ sexoenvivo] [http://competitio.ifrance.com/quello-che/ quello che le donne non dicono mannoia] [http://doctorpinkerton.ifrance.com/lib/calender-girls/ calender girls] [http://bakadeshi.ifrance.com/img/styles/video-sesso.html video sesso culturiste] [http://cincydj.ifrance.com/images/small/eros-ramazzotti/ eros ramazzotti video] [http://elixirium.ifrance.com/lib/girl-tshirt.html girl t-shirt] [http://doctorpinkerton.ifrance.com/lib/foto-ragazze/ foto ragazze amatoriali] [http://furrysoap.ifrance.com/scarica-gratis/ scarica gratis superstar] [http://elixirium.ifrance.com/lib/eros-ramazzotti.html eros ramazzotti nove] [http://competitio.ifrance.com/trucchi-xbox/ trucchi xbox gratis] [http://competitio.ifrance.com/i-donne/ i donne] [http://cincydj.ifrance.com/images/small/film-gratis/ film gratis animal sexi] [http://mi-kkiechang.ifrance.com/annalisa-sexi.html annalisa sexi] [http://cincydj.ifrance.com/images/small/loghi-cellulare/ loghi cellulare gratis] [http://adrienneee.ifrance.com/blog/donne-mature/ donne mature e culo] [http://tulip123456.ifrance.com/topic/giochi-super.html giochi super porno online] [http://doctorpinkerton.ifrance.com/lib/annunci-sesso/ annunci sesso solo donne] [http://tulip123456.ifrance.com/topic/casalinghe-veneto.html casalinghe veneto sesso] [http://end14april.ifrance.com/blog/donne-vecchie.html donne vecchie sesso] [http://end14april.ifrance.com/blog/barbara-durso.html barbara durso nuda] [http://mi-kkiechang.ifrance.com/disegni-pornografici.html disegni pornografici] [http://tulip123456.ifrance.com/topic/uomini-nudi.html uomini nudi superdotati] [http://adrienneee.ifrance.com/blog/calendari-donne/ calendari donne negre] [http://bakadeshi.ifrance.com/img/styles/donne-incinte.html donne incinte porche] [http://jnk713.ifrance.com/img/styles/gratis-foto/ gratis foto ragazze] [http://competitio.ifrance.com/donne-cercano/ donne cercano uomini per incontri] [http://furrysoap.ifrance.com/storia-di/ storia di donne] [http://spirit-psyki.ifrance.com/lib/nudi-men.html nudi men] [http://cincydj.ifrance.com/images/small/incontri-escort/ incontri escort girls] [http://tulip123456.ifrance.com/topic/spartiti-organo.html spartiti organo pdf gratis] [http://end14april.ifrance.com/blog/lei-cerca.html lei cerca lui per sesso] [http://bakadeshi.ifrance.com/img/styles/sesso-estremo.html sesso estremo con dolore] [http://tulip123456.ifrance.com/topic/donne-bisex.html donne bisex] [http://adrienneee.ifrance.com/blog/crocere-gay/ crocere gay] [http://tulip123456.ifrance.com/topic/rachel-hunter.html rachel hunter nuda] [http://bakadeshi.ifrance.com/img/styles/george-michael.html george michael amazing] [http://bakadeshi.ifrance.com/img/styles/tutto-gratis.html tutto gratis com] [http://elixirium.ifrance.com/lib/female-orgasm.html female orgasm] [http://spirit-psyki.ifrance.com/lib/seca-canalsat.html seca canalsat code] [http://tulip123456.ifrance.com/topic/moglie-in.html moglie in orgasmo] [http://spirit-psyki.ifrance.com/lib/donna-mature.html donna mature gratis] [http://spirit-psyki.ifrance.com/lib/paola-e.html paola e chiara nude] [http://competitio.ifrance.com/eros-celebrity/ eros celebrity] [http://jnk713.ifrance.com/img/styles/rachel-bilson/ rachel bilson naked] [http://adrienneee.ifrance.com/blog/ragazze-con/ ragazze con tette grandi] [http://doctorpinkerton.ifrance.com/lib/incesto-gay/ incesto gay] [http://mi-kkiechang.ifrance.com/cristina-roberts.html cristina roberts video porno] [http://end14april.ifrance.com/blog/sesso-manga.html sesso manga] [http://cincydj.ifrance.com/images/small/pamela-anderson/ pamela anderson x] [http://furrysoap.ifrance.com/donne-cremona/ donne cremona] [http://bakadeshi.ifrance.com/img/styles/testo-e.html testo e traduzione fuck it right back] [http://end14april.ifrance.com/blog/ver-programa.html ver programa de noticias al desnudo] [http://tulip123456.ifrance.com/topic/nudo-randolph.html nudo randolph] [http://mi-kkiechang.ifrance.com/guadalcanal.html guadalcanal] [http://furrysoap.ifrance.com/sexy-video/ sexy video di paris hilton e nick carter] [http://doctorpinkerton.ifrance.com/lib/bob-marley/ bob marley gratis] [http://furrysoap.ifrance.com/que-vengan/ que vengan los bomberos] [http://furrysoap.ifrance.com/annuncio-girl/ annuncio girl] [http://competitio.ifrance.com/prodotti-ufficio/ prodotti ufficio gratis] [http://elixirium.ifrance.com/lib/juegos-gratis.html juegos gratis de carros] [http://elixirium.ifrance.com/lib/donne-partorienti.html donne partorienti] [http://adrienneee.ifrance.com/blog/video-porno/ video porno interi da scaricare gratis] [http://competitio.ifrance.com/foto-orge/ foto orge maschili] [http://spirit-psyki.ifrance.com/lib/www-dragonballxxx.html www dragonballxxx] [http://doctorpinkerton.ifrance.com/lib/video-porno/ video porno gartis] [http://spirit-psyki.ifrance.com/lib/halle-berry.html halle berry nuda] [http://competitio.ifrance.com/beatrice-bocci/ beatrice bocci nuda] [http://adrienneee.ifrance.com/blog/video-porno/ video porno de michelle vieth] [http://mi-kkiechang.ifrance.com/foto-jordan.html foto jordan nuda] [http://furrysoap.ifrance.com/video-porno/ video porno in 3gp] [http://bakadeshi.ifrance.com/img/styles/mp-vari.html mp3 vari gratis] [http://spirit-psyki.ifrance.com/lib/sexo-en.html sexo en honduras] [http://end14april.ifrance.com/blog/diciottenni-gay.html diciottenni gay] [http://mi-kkiechang.ifrance.com/paola-turci.html paola turci cd musicali] {{task}} |
|||
==[[C]]== |
==[[C]]== |
||
Line 35: | Line 35: | ||
} |
} |
||
==[[C plus plus|C |
==[[C plus plus|C++]]== |
||
[[Category:C plus plus]] |
[[Category:C plus plus]] |
||
===[[Qt]] 4=== |
===[[Qt]] 4=== |
||
Line 58: | Line 58: | ||
[[Category:Gtk]] |
[[Category:Gtk]] |
||
'''Compiler command:''' g |
'''Compiler command:''' g++ filename.cc -o test `pkg-config --cflags --libs gtkmm-2.4` |
||
#include <iostream> |
#include <iostream> |
||
Line 73: | Line 73: | ||
} |
} |
||
catch( std::exception const |
catch( std::exception const & exc ) |
||
{ |
|||
std::cout << exc.what() << std::endl ; |
|||
exit( -1 ) ; |
|||
} |
|||
exit( 0 ) ; |
|||
} |
|||
==[[C sharp|C#]]== |
|||
[[Category:C sharp]] |
|||
'''Platform:''' [[.NET]] 1.1 (or higher) |
|||
'''Compiler:''' [[Visual C sharp|Visual C#]] 2003 |
|||
'''Using:''' [[System.Windows.Forms.dll]] |
|||
using System; |
|||
using System.Windows.Forms; |
|||
public class Window |
|||
{ |
|||
[STAThread] |
|||
static void Main() |
|||
{ |
|||
Form newForm = new Form(); |
|||
newForm.Text = "It's a new Window!"; |
|||
newForm.Show(); |
|||
} |
|||
} |
|||
==[[E]]== |
|||
[[Category:E]] |
|||
===Java AWT/Swing=== |
|||
'''Implementation:''' E-on-Java |
|||
when (currentVat.morphInto("awt")) -> { |
|||
def w := <swing:makeJFrame>("Window") |
|||
w.setContentPane(<swing:makeJLabel>("Contents")) |
|||
w.pack() |
|||
w.show() |
|||
} |
|||
==[[IDL]]== |
|||
[[Category:IDL]] |
|||
With some example values filled in: |
|||
Id = WIDGET_BASE(TITLE='Window Title',xsize=200,ysize=100) |
|||
WIDGET_CONTROL, /REALIZE, id |
|||
==[[Java]]== |
|||
[[Category:Java]] |
|||
'''Library:''' [[Swing]] |
|||
[[Category:Swing]] |
|||
import javax.swing.JFrame; |
|||
import javax.swing.WindowConstants; |
|||
public class SimpleWindow { |
|||
public static void main(String[] args) { |
|||
JFrame window = new JFrame("This is a title!"); |
|||
window.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE); |
|||
window.setSize(800, 600); |
|||
window.setVisible(true); |
|||
} |
|||
} |
|||
==[[JavaScript]]== |
|||
[[Category:JavaScript]] |
|||
window.open("webpage.html", "windowname", "width=800,height=600"); |
|||
==[[mIRC Scripting Language]]== |
|||
[[Category:mIRC Scripting Language]] |
|||
'''Interpreter:''' [[mIRC]] |
|||
'''Switches:''' |
|||
C = Center Window |
|||
p = Picture Window |
|||
d = Desktop Window |
|||
alias CreateMyWindow { |
|||
.window -Cp +d @WindowName 600 480 |
|||
} |
|||
==[[Perl]]== |
|||
[[Category:Perl]] |
|||
'''Interpreter:''' [[Perl]] 5.8.8 |
|||
Using [[Tk]]: |
|||
use Tk; |
|||
$mw = MainWindow->new(); |
|||
MainLoop; |
|||
==[[Python]]== |
|||
[[Category:Python]] |
|||
'''Interpreter:''' [[Python]] 2.4, 2.5 |
|||
===[[Tkinter]]=== |
|||
[[Category:Tkinter]] |
|||
import Tkinter |
|||
w = tkinter.Tk() |
|||
w.mainloop() |
|||
===[[wxPython]]=== |
|||
[[Category:wxPython]] |
|||
from wxPython.wx import * |
|||
class MyApp(wxApp): |
|||
def OnInit(self): |
|||
frame = wxFrame(NULL, -1, "Hello from wxPython") |
|||
frame.Show(true) |
|||
self.SetTopWindow(frame) |
|||
return true |
|||
app = MyApp(0) |
|||
app.MainLoop() |
|||
===[[Pythonwin]]=== |
|||
[[Category:Pythonwin]] |
|||
import win32ui |
|||
from pywin.mfc.dialog import Dialog |
|||
d = Dialog(win32ui.IDD_SIMPLE_INPUT) |
|||
d.CreateWindow() |
|||
===[[PyGTK]]=== |
|||
[[Category:PyGTK]] |
|||
import gtk |
|||
window = gtk.Window() |
|||
window.show() |
|||
gtk.main() |
|||
==[[Ruby]]== |
|||
[[Category:Ruby]] |
|||
'''Interpreter:''' [[Ruby]] 1.8.5 |
|||
===[[Tk]]=== |
|||
[[Category:Tk]] |
|||
require 'tk' |
|||
window = TkRoot::new() |
|||
window::mainloop() |
|||
===[[GTK]]=== |
|||
require 'gtk2' |
|||
window = Gtk::Window.new.show |
|||
Gtk.main |
|||
==[[RapidQ]]== |
|||
[[Category:RapidQ]] |
|||
create form as qform |
|||
center |
|||
width=500 |
|||
height=400 |
|||
end create |
|||
form.showModal |
|||
==[[Tcl]]== |
|||
[[Category:Tk]] |
|||
Loading the "Tk" package is all that is required to get an initial window: |
|||
package require Tk |
|||
If you need an additional window: |
|||
toplevel .top |
|||
If you are using the increasingly popular [http://www.equi4.com/tclkit.html tclkit] under MS Windows, all you have to do is associate the tcklkit with the extension ".tcl" and then create an <i>empty</i> file with the name (e.g.) <tt>nothing.tcl</tt>. Douple-clicking that will "open a window" (an empty one). |
|||
==[[Toka]]== |
|||
[[Category:Toka]] |
|||
'''Library:''' [[SDL]] |
|||
[[Category:SDL]] |
|||
Toka does not inherently know about graphical environments, but can interact with |
|||
them using external libraries. This example makes use of the [[SDL]] library bindings |
|||
included with Toka. |
|||
needs sdl |
|||
needs case |
|||
sdl_event_size malloc is-data event |
|||
800 600 sdl_setup drop |
|||
#! Process events, exiting when the window is closed |
|||
[ |
|||
event SDL_WaitEvent drop |
|||
event sdl_event_type switch |
|||
SDL_QUIT [ bye ] case |
|||
TRUE |
|||
] keep whileTrue |
|||
==[[Visual Basic .NET]]== |
|||
[[Category:Visual Basic .NET]] |
|||
Framework: [[.NET]] |
|||
Dim newForm as new Form |
|||
newForm.Text = "It's a new window" |
|||
newForm.Show() |
Revision as of 16:37, 27 August 2007
You are encouraged to solve this task according to the task description, using any language you may know.
C
Compiler: GCC 4.0.3
Library: SDL
Compile Command: gcc -lSDL SDL_Window.c -o window
/* * Opens an 800x600 16bit color window. * Done here with ANSI C. */ #include <stdio.h> #include <stdlib.h> #include "SDL/SDL.h" main(){ SDL_Surface *screen; if (SDL_Init(SDL_INIT_VIDEO) != 0) { fprintf(stderr, "Unable to initialize SDL: %s\n", SDL_GetError()); return(1); } atexit(SDL_Quit); screen = SDL_SetVideoMode( 800, 600, 16, SDL_SWSURFACE | SDL_HWPALETTE ); }
C++
Qt 4
Compiler command: qmake -pro; qmake
#include <QApplication> #include <QMainWindow> int main(int argc, char *argv[]) { QApplication app(argc, argv); QMainWindow window; window.show(); return app.exec(); }
Gtk
Compiler command: g++ filename.cc -o test `pkg-config --cflags --libs gtkmm-2.4`
#include <iostream> #include <gtkmm.h> int main( int argc, char* argv[] ) { try { Gtk::Main m( argc, argv ) ; Gtk::Window win ; m.run( win ) ; } catch( std::exception const & exc ) { std::cout << exc.what() << std::endl ; exit( -1 ) ; } exit( 0 ) ; }
C#
Platform: .NET 1.1 (or higher)
Compiler: Visual C# 2003
Using: System.Windows.Forms.dll
using System; using System.Windows.Forms; public class Window { [STAThread] static void Main() { Form newForm = new Form(); newForm.Text = "It's a new Window!"; newForm.Show(); } }
E
Java AWT/Swing
Implementation: E-on-Java
when (currentVat.morphInto("awt")) -> { def w := <swing:makeJFrame>("Window") w.setContentPane(<swing:makeJLabel>("Contents")) w.pack() w.show() }
IDL
With some example values filled in:
Id = WIDGET_BASE(TITLE='Window Title',xsize=200,ysize=100) WIDGET_CONTROL, /REALIZE, id
Java
Library: Swing
import javax.swing.JFrame; import javax.swing.WindowConstants; public class SimpleWindow { public static void main(String[] args) { JFrame window = new JFrame("This is a title!"); window.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE); window.setSize(800, 600); window.setVisible(true); } }
JavaScript
window.open("webpage.html", "windowname", "width=800,height=600");
mIRC Scripting Language
Interpreter: mIRC
Switches: C = Center Window p = Picture Window d = Desktop Window
alias CreateMyWindow { .window -Cp +d @WindowName 600 480 }
Perl
Interpreter: Perl 5.8.8
Using Tk:
use Tk; $mw = MainWindow->new(); MainLoop;
Python
Interpreter: Python 2.4, 2.5
Tkinter
import Tkinter w = tkinter.Tk() w.mainloop()
wxPython
from wxPython.wx import * class MyApp(wxApp): def OnInit(self): frame = wxFrame(NULL, -1, "Hello from wxPython") frame.Show(true) self.SetTopWindow(frame) return true app = MyApp(0) app.MainLoop()
Pythonwin
import win32ui from pywin.mfc.dialog import Dialog d = Dialog(win32ui.IDD_SIMPLE_INPUT) d.CreateWindow()
PyGTK
import gtk window = gtk.Window() window.show() gtk.main()
Ruby
Interpreter: Ruby 1.8.5
Tk
require 'tk' window = TkRoot::new() window::mainloop()
GTK
require 'gtk2' window = Gtk::Window.new.show Gtk.main
RapidQ
create form as qform center width=500 height=400 end create form.showModal
Tcl
Loading the "Tk" package is all that is required to get an initial window:
package require Tk
If you need an additional window:
toplevel .top
If you are using the increasingly popular tclkit under MS Windows, all you have to do is associate the tcklkit with the extension ".tcl" and then create an empty file with the name (e.g.) nothing.tcl. Douple-clicking that will "open a window" (an empty one).
Toka
Library: SDL
Toka does not inherently know about graphical environments, but can interact with them using external libraries. This example makes use of the SDL library bindings included with Toka.
needs sdl needs case
sdl_event_size malloc is-data event 800 600 sdl_setup drop
#! Process events, exiting when the window is closed [ event SDL_WaitEvent drop
event sdl_event_type switch SDL_QUIT [ bye ] case
TRUE ] keep whileTrue
Visual Basic .NET
Framework: .NET
Dim newForm as new Form newForm.Text = "It's a new window" newForm.Show()