function __construct() { parent::__construct(); $this->set_border_width(10); $this->set_title('X-Money - Login'); $this->set_icon_from_file(XMONEY_IMAGES . DIRECTORY_SEPARATOR . 'logo.png'); $this->vbox->pack_start($hbox = new GtkHBox()); $hbox->pack_start(GtkImage::new_from_file(XMONEY_IMAGES . DIRECTORY_SEPARATOR . 'logo.png')); $hbox->pack_start($vbox = new GtkVBox()); $vbox->pack_start($frame = new GtkFrame(latin1(' Digite suas informações para acessar o sistema: '))); $frame->set_border_width(10); $frame->add($table = new GtkTable()); $table->attach(new GtkLabel('Usuario:'), 0, 1, 0, 1); $table->attach($this->username = new GtkEntry(), 1, 2, 0, 1); $table->attach(new GtkLabel('Senha:'), 0, 1, 1, 2); $table->attach($this->password = new GtkEntry(), 1, 2, 1, 2); $this->password->set_visibility(false); $this->ok = $this->add_button('_Ok', Gtk::RESPONSE_OK); $this->add_button('_Cancelar', Gtk::RESPONSE_CANCEL); EntrySetNextFocus($this->username, $this->password); EntrySetNextFocus($this->password, $this->ok); $this->vbox->show_all(); }
function set_next_focus($focus) { EntrySetNextFocus($this->entry, $focus); }