/** * Adiciona um widget no final do toolbar * * @name append_toolitem($widget) * @param GtkWidget $widget GtkWidget à ser adicionado no toolitem * @return GtkWidget */ public function append_toolitem($widget) { // Cria o botão $toolbutton = new GtkToolItem(); $toolbutton->add($widget); // Adiciona o botão ao toolbar parent::insert($toolbutton, -1); // Adiciona o callback do click //$toolbutton->connect_simple("clicked", array($this, "__onclick"), ++$this->__counter); // Armazena o botão $this->__buttons[$this->__counter] = $toolbutton; // Retorna o widget return $widget; }