Você procurou por: flipper (Inglês - Grego)

Contribuições humanas

A partir de tradutores profissionais, empresas, páginas da web e repositórios de traduções disponíveis gratuitamente

Adicionar uma tradução

Inglês

Grego

Informações

Inglês

flipper

Grego

πτερύγιο

Última atualização: 2014-11-14
Frequência de uso: 6
Qualidade:

Referência: IATE

Inglês

cant flipper

Grego

αρπάγη

Última atualização: 2014-11-14
Frequência de uso: 3
Qualidade:

Referência: IATE

Inglês

frogmen's flipper

Grego

βατραχοπέδιλο

Última atualização: 2014-11-14
Frequência de uso: 5
Qualidade:

Referência: IATE

Inglês

#!/usr/bin/gjsconst gtk = imports.gi.gtk;const lang = imports.lang;const textviewexample = new lang.class ({ name: 'textview example', // create the application itself _init: function () { this.application = new gtk.application ({ application_id: 'org.example.jstextview' }); // connect 'activate' and 'startup' signals to the callback functions this.application.connect('activate', lang.bind(this, this._onactivate)); this.application.connect('startup', lang.bind(this, this._onstartup)); }, // callback function for 'activate' signal presents windows when active _onactivate: function () { this._window.present (); }, // callback function for 'startup' signal builds the ui _onstartup: function () { this._buildui (); }, // build the application's ui _buildui: function () { // create the application window this._window = new gtk.applicationwindow ({ application: this.application, window_position: gtk.windowposition.center, title: \"talk to a penguin\", default_height: 400, default_width: 440, border_width: 20 }); // create a label for the penguin to talk to you this._penguin = new gtk.label ({ height_request: 180, width_request: 400, label: \"squaaaak?\", wrap: true }); // create a textview for you to talk to the penguin this.buffer = new gtk.textbuffer(); this._textview = new gtk.textview ({ buffer: this.buffer, editable: true, wrap_mode: gtk.wrapmode.word }); // create a \"scrolled window\" to put your textview in so it will scroll this._scrolled = new gtk.scrolledwindow ({ hscrollbar_policy: gtk.policytype.automatic, vscrollbar_policy: gtk.policytype.automatic, shadow_type: gtk.shadowtype.etched_in, height_request: 180, width_request: 400, }); // put the textview into the scrolled window this._scrolled.add_with_viewport (this._textview); // create a grid to organize them in this._grid = new gtk.grid ({ halign: gtk.align.center, valign: gtk.align.center }); // put the label and textview in the grid one on top of the other this._grid.attach (this._penguin, 0, 0, 1, 1); this._grid.attach (this._scrolled, 0, 1, 1, 1); // create a button to send your message to the penguin this._send = new gtk.button ({ halign: gtk.align.end, margin_top: 20, label: \"send\" }); this._send.connect ('clicked', lang.bind (this, this._chat)); // create a grid that will have the other grid on top and the button on bottom this._maingrid = new gtk.grid ({ halign: gtk.align.center, valign: gtk.align.center }); // add the other grid and the button to the main grid this._maingrid.attach (this._grid, 0, 0, 1, 1); this._maingrid.attach (this._send, 0, 1, 1, 1); // attach the main grid to the window this._window.add (this._maingrid); // show the window and all child widgets this._window.show_all(); }, _chat: function () { // create a random number to determine what the penguin says this.number = math.floor ((math.random() * 3) + 1); // did you actually say anything? if (this.buffer.text) { // did you mention fish? if (this.buffer.text.match (/fish/gi)) { // have the penguin squaak about fish if (this.number == 1) this._penguin.set_label (\"fish!\"); else if (this.number == 2) this._penguin.set_label (\"fish fish fish fish. fish!\"); else this._penguin.set_label (\"fish? fish fish fish. fish fish. fish!\"); } // i guess you didn't mention fish else { // have the penguin talk about penguinny stuff if (this.number == 1) this._penguin.set_label (\"squaak!\"); else if (this.number == 2) this._penguin.set_label (\"ork ork ork ork squaak. squaak squaak! *waves flippers*\"); else this._penguin.set_label (\"ork ork ork ork ork?\"); } } // clear the buffer this.buffer.text = \"\"; // give focus back to the textview so you don't have to click it again this._textview.has_focus = true; }});// run the applicationlet app = new textviewexample ();app.application.run (argv);

Grego

#!/usr/bin/gjsconst gtk = imports.gi.gtk;const lang = imports.lang;const textviewexample = new lang.class ({ name: 'textview example', // create the application itself _init: function () { this.application = new gtk.application ({ application_id: 'org.example.jstextview' }); // connect 'activate' and 'startup' signals to the callback functions this.application.connect('activate', lang.bind(this, this._onactivate)); this.application.connect('startup', lang.bind(this, this._onstartup)); }, // callback function for 'activate' signal presents windows when active _onactivate: function () { this._window.present (); }, // callback function for 'startup' signal builds the ui _onstartup: function () { this._buildui (); }, // build the application's ui _buildui: function () { // create the application window this._window = new gtk.applicationwindow ({ application: this.application, window_position: gtk.windowposition.center, title: \"talk to a penguin\", default_height: 400, default_width: 440, border_width: 20 }); // create a label for the penguin to talk to you this._penguin = new gtk.label ({ height_request: 180, width_request: 400, label: \"squaaaak?\", wrap: true }); // create a textview for you to talk to the penguin this.buffer = new gtk.textbuffer(); this._textview = new gtk.textview ({ buffer: this.buffer, editable: true, wrap_mode: gtk.wrapmode.word }); // create a \"scrolled window\" to put your textview in so it will scroll this._scrolled = new gtk.scrolledwindow ({ hscrollbar_policy: gtk.policytype.automatic, vscrollbar_policy: gtk.policytype.automatic, shadow_type: gtk.shadowtype.etched_in, height_request: 180, width_request: 400, }); // put the textview into the scrolled window this._scrolled.add_with_viewport (this._textview); // create a grid to organize them in this._grid = new gtk.grid ({ halign: gtk.align.center, valign: gtk.align.center }); // put the label and textview in the grid one on top of the other this._grid.attach (this._penguin, 0, 0, 1, 1); this._grid.attach (this._scrolled, 0, 1, 1, 1); // create a button to send your message to the penguin this._send = new gtk.button ({ halign: gtk.align.end, margin_top: 20, label: \"send\" }); this._send.connect ('clicked', lang.bind (this, this._chat)); // create a grid that will have the other grid on top and the button on bottom this._maingrid = new gtk.grid ({ halign: gtk.align.center, valign: gtk.align.center }); // add the other grid and the button to the main grid this._maingrid.attach (this._grid, 0, 0, 1, 1); this._maingrid.attach (this._send, 0, 1, 1, 1); // attach the main grid to the window this._window.add (this._maingrid); // show the window and all child widgets this._window.show_all(); }, _chat: function () { // create a random number to determine what the penguin says this.number = math.floor ((math.random() * 3) + 1); // did you actually say anything? if (this.buffer.text) { // did you mention fish? if (this.buffer.text.match (/fish/gi)) { // have the penguin squaak about fish if (this.number == 1) this._penguin.set_label (\"fish!\"); else if (this.number == 2) this._penguin.set_label (\"fish fish fish fish. fish!\"); else this._penguin.set_label (\"fish? fish fish fish. fish fish. fish!\"); } // i guess you didn't mention fish else { // have the penguin talk about penguinny stuff if (this.number == 1) this._penguin.set_label (\"squaak!\"); else if (this.number == 2) this._penguin.set_label (\"ork ork ork ork squaak. squaak squaak! *waves flippers*\"); else this._penguin.set_label (\"ork ork ork ork ork?\"); } } // clear the buffer this.buffer.text = \"\"; // give focus back to the textview so you don't have to click it again this._textview.has_focus = true; }});// run the applicationlet app = new textviewexample ();app.application.run (argv);

Última atualização: 2020-04-20
Frequência de uso: 1
Qualidade:

Referência: Aterentes
Aviso: contém formatação HTML invisível

Consiga uma tradução melhor através
7,791,830,996 de colaborações humanas

Usuários estão solicitando auxílio neste momento:



Utilizamos cookies para aprimorar sua experiência. Se avançar no acesso a este site, você estará concordando com o uso dos nossos cookies. Saiba mais. OK