示例#1
0
 /**
  * Class Constructor
  * @param $name Name of the widget
  */
 public function __construct($name)
 {
     parent::__construct();
     parent::set_size_request(200, -1);
     $this->wname = $name;
     $this->validations = array();
 }
示例#2
0
 function __construct($title, $icon)
 {
     parent::__construct();
     $this->set_border_width(5);
     $this->Title = $title;
     $this->Icon = $icon;
 }
示例#3
0
 /**
  * Class Constructor
  * @param $name Name of the widget
  */
 public function __construct($name)
 {
     parent::__construct();
     $this->wname = $name;
     $this->count = 0;
     $this->types = array();
     $this->created = FALSE;
     $this->table_fields = new TTable();
     $this->editing = FALSE;
     parent::pack_start($this->table_fields, false, false);
     $this->view = new GtkTreeView();
     $this->model = new GtkListStore();
     $button_bar = new GtkHBox();
     $add = GtkButton::new_from_stock(Gtk::STOCK_SAVE);
     $del = GtkButton::new_from_stock(Gtk::STOCK_DELETE);
     $can = GtkButton::new_from_stock(Gtk::STOCK_CANCEL);
     $add->connect_simple('clicked', array($this, 'onSave'));
     $del->connect_simple('clicked', array($this, 'onDelete'));
     $can->connect_simple('clicked', array($this, 'onCancel'));
     $button_bar->pack_start($add, FALSE, FALSE);
     $button_bar->pack_start($del, FALSE, FALSE);
     $button_bar->pack_start($can, FALSE, FALSE);
     parent::pack_start($button_bar, false, false);
     $scroll = new GtkScrolledWindow();
     $scroll->add($this->view);
     $scroll->set_policy(Gtk::POLICY_AUTOMATIC, Gtk::POLICY_AUTOMATIC);
     parent::pack_start($scroll, false, false);
     $this->view->set_size_request(400, 140);
     $this->height = 140;
     $this->view->connect_simple('button_release_event', array($this, 'onClick'));
 }
 public function __construct()
 {
     parent::__construct();
     $this->minimizeImage = FABULA_PATH . "/images/130a.png";
     // Cria o notebook
     // @since rev 1
     $this->notebook = new GtkNoteBook();
     $this->notebook->set_tab_pos(Gtk::POS_TOP);
     $this->notebook->set_scrollable(TRUE);
     // Cria o painel
     // @since rev 1
     $this->panel = new GtkVBox();
     parent::pack_start($this->panel);
     // Title
     // @since rev 1
     $hbox = new GtkHBox();
     $this->panel->pack_start($hbox, FALSE, FALSE);
     $box = new GtkEventBox();
     $box->set_size_request(150, 10);
     $hbox->pack_start($box, TRUE, TRUE);
     // Botão Minimizar
     // @since rev 1
     $this->minimize = new GtkEventBox();
     $this->minimize->set_size_request(10, 10);
     $hbox->pack_start($this->minimize, FALSE, FALSE);
     $this->minimize->connect("expose_event", array($this, "minimize_onprint"));
     $this->minimize->connect("event", array($this, "minimize_onevent"));
     // GtkNoteBook
     // @since rev 1
     $this->panel->pack_start($this->notebook);
 }
 /**
  * @name __construct()
  * @return GtkVBox
  */
 public function __construct()
 {
     parent::__construct();
     // Cria a parte de baixo horizontal
     $this->hbox = new GtkHBox();
     // Cria um label
     $this->label = new GtkLabel("");
     $this->label->set_alignment(0, 1);
     // Adiciona o label
     $this->hbox->pack_start($this->label, TRUE);
     // Adiciona o separador e o hbox no vbox
     $this->pack_start(new GtkHSeparator(), FALSE);
     $this->pack_start($this->hbox, TRUE, TRUE);
 }
示例#6
0
 /**
  * Class Constructor
  */
 public function __construct()
 {
     $this->types = array();
     $this->columns = array();
     $this->count = 0;
     $this->modelCreated = FALSE;
     parent::__construct();
     $this->view = new GtkTreeView();
     $this->model = new GtkListStore();
     $this->view->set_size_request(200, -1);
     $this->handler = $this->view->connect_simple('row-activated', array($this, 'onDoubleClick'));
     $this->action_area = new GtkHButtonBox();
     $this->action_area->set_layout(Gtk::BUTTONBOX_START);
     parent::pack_start($this->view, true, true);
     parent::pack_start($this->action_area, false, false);
     parent::set_size_request(-1, -1);
 }