/** * Class Constructor * @param $name Name of the widget */ public function __construct($name) { parent::__construct(FALSE); parent::set_border_width(0); $this->wname = $name; $this->wrapper = new GtkHBox(); parent::add($this->wrapper); $this->setLayout('vertical'); $this->validations = array(); }
/** * Class Constructor * @param $name widget's name * @param $text widget's name */ public function __construct($name, $text_name) { // executes the parent class constructor parent::__construct(); $this->text_name = $text_name; // create the combo model $this->model = new GtkListStore(GObject::TYPE_STRING, GObject::TYPE_STRING); $this->entry = new GtkEntry(); $this->entry->set_size_request(50, 25); $this->entry->set_sensitive(FALSE); $this->combo = GtkComboBox::new_text(); $this->combo->set_model($this->model); $this->combo->set_size_request(200, -1); $this->combo->connect_simple('changed', array($this, 'onComboChange')); $this->wname = $name; parent::pack_start($this->entry); parent::pack_start($this->combo); $this->validations = array(); }