当前位置: 首页>>代码示例>>PHP>>正文


PHP GtkHBox::__construct方法代码示例

本文整理汇总了PHP中GtkHBox::__construct方法的典型用法代码示例。如果您正苦于以下问题:PHP GtkHBox::__construct方法的具体用法?PHP GtkHBox::__construct怎么用?PHP GtkHBox::__construct使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在GtkHBox的用法示例。


在下文中一共展示了GtkHBox::__construct方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: GtkLabel

 function __construct($Owner)
 {
     parent::__construct();
     $this->pack_start(new GtkLabel(latin1(' Tipo de Endereço: ')), false);
     $this->store = new GtkListStore(TYPE_STRING, TYPE_LONG);
     $this->pack_start($this->combobox = new GtkComboBox($this->store));
     $this->combobox->pack_start($cell = new GtkCellRendererText());
     $this->combobox->set_attributes($cell, 'text', 0);
     $this->combobox->connect('changed', array($this, 'tipo_endereco_changed'));
     $this->show_all();
     /*
      * preenche lista
      */
     $db = new Database($Owner, true);
     if (!$db->link) {
         return;
     }
     /*
      * Tipo de Endereco
      */
     if (!$db->multi_query('SELECT * FROM Vw_Tipos_Endereco')) {
         return;
     }
     $this->store->clear();
     unset($this->it);
     while ($line = $db->line()) {
         $row = $this->store->append();
         $this->store->set($row, 0, $line['Descricao'], 1, $line['Id']);
         $this->it[$line['Id']] = $row;
     }
 }
开发者ID:eneiasramos,项目名称:xmoney,代码行数:31,代码来源:tipo_endereco.php

示例2: GtkLabel

 function __construct($Owner)
 {
     parent::__construct();
     $this->pack_start(new GtkLabel(' Fornecedor: '), false);
     $completion = new GtkEntryCompletion();
     $completion->set_model($this->store = new GtkListStore(TYPE_STRING, TYPE_LONG));
     $completion->set_text_column(0);
     $completion->pack_start($cell = new GtkCellRendererText());
     $completion->set_attributes($cell, 'text', 1);
     $completion->connect('match-selected', array($this, 'fornecedor_selected'));
     $this->pack_start($this->entry = new GtkEntry());
     $this->entry->set_completion($completion);
     $this->show_all();
     /*
      * preenche lista
      */
     $db = new Database($Owner, true);
     if (!$db->link) {
         return;
     }
     /*
      * Fornecedores
      */
     if (!$db->multi_query('SELECT * FROM Vw_Fornecedores')) {
         return;
     }
     $this->store->clear();
     unset($this->it);
     while ($line = $db->line()) {
         $row = $this->store->append();
         $this->store->set($row, 0, $line['Nome'], 1, $line['Id']);
         $this->it[$line['Id']] = $row;
     }
 }
开发者ID:eneiasramos,项目名称:xmoney,代码行数:34,代码来源:fornecedores.php

示例3: __construct

 /**
  * Class Constructor
  * @param  $name name of the field
  */
 public function __construct($name)
 {
     parent::__construct();
     self::setName($name);
     // initialize validations array
     $this->validations = array();
 }
开发者ID:jhonleandres,项目名称:pecommerce,代码行数:11,代码来源:TField.class.php

示例4: GtkLabel

 function __construct($Owner)
 {
     parent::__construct();
     $this->pack_start(new GtkLabel(' Forma de Pgto: '), false);
     $this->store = new GtkListStore(TYPE_STRING, TYPE_LONG);
     $this->pack_start($this->combobox = new GtkComboBox($this->store));
     $this->combobox->pack_start($cell = new GtkCellRendererText());
     $this->combobox->set_attributes($cell, 'text', 0);
     $this->combobox->connect('changed', array($this, 'forma_pgto_changed'));
     $this->show_all();
     /*
      * preenche lista
      */
     $db = new Database($Owner, true);
     if (!$db->link) {
         return;
     }
     /*
      * Formas de Pagamento
      */
     if (!$db->multi_query('SELECT * FROM Vw_Formas_Pgto')) {
         return;
     }
     $this->store->clear();
     unset($this->it);
     while ($line = $db->line()) {
         $row = $this->store->append();
         $this->store->set($row, 0, $line['Nome'], 1, $line['Id']);
         $this->it[$line['Id']] = $row;
     }
 }
开发者ID:eneiasramos,项目名称:xmoney,代码行数:31,代码来源:forma_pgto.php

示例5: __construct

 /**
  * Class Constructor
  * @param $name Name of the widget
  */
 public function __construct($name)
 {
     parent::__construct();
     $this->wname = $name;
     $this->mask = 'yyyy-mm-dd';
     $this->validations = array();
     // creates the entry field
     $this->entry = new TEntry($name);
     $this->entry->setSize(200);
     //set_size_request(200, 24);
     $this->setMask($this->mask);
     parent::add($this->entry);
     // creates a button with a calendar image
     $button = new GtkButton();
     $button->set_relief(GTK::RELIEF_NONE);
     $imagem = GtkImage::new_from_file('lib/adianti/images/tdate-gtk.png');
     $button->set_image($imagem);
     // define the button's callback
     $button->connect_simple('clicked', array($this, 'onCalendar'));
     parent::add($button);
     // creates the calendar window
     $this->popWindow = new GtkWindow(Gtk::WINDOW_POPUP);
     // creates the calendar
     $this->calendar = new GtkCalendar();
     // define the action when the user selects a date
     $this->calendar->connect_simple('day-selected-double-click', array($this, 'onSelectDate'));
     $this->month = new TCombo('tdate-month');
     $this->month->addItems(array(TAdiantiCoreTranslator::translate('January'), TAdiantiCoreTranslator::translate('February'), TAdiantiCoreTranslator::translate('March'), TAdiantiCoreTranslator::translate('April'), TAdiantiCoreTranslator::translate('May'), TAdiantiCoreTranslator::translate('June'), TAdiantiCoreTranslator::translate('July'), TAdiantiCoreTranslator::translate('August'), TAdiantiCoreTranslator::translate('September'), TAdiantiCoreTranslator::translate('October'), TAdiantiCoreTranslator::translate('November'), TAdiantiCoreTranslator::translate('December')));
     $this->month->setCallback(array($this, 'onChangeMonth'));
     $this->month->setSize(70);
     for ($n = date('Y') - 10; $n <= date('Y') + 10; $n++) {
         $years[$n] = $n;
     }
     $this->year = new TCombo('tdate-year');
     $this->year->addItems($years);
     $this->year->setCallback(array($this, 'onChangeMonth'));
     $this->year->setSize(70);
     $hbox = new GtkHBox();
     $hbox->pack_start($this->month);
     $hbox->pack_start($this->year);
     $bt_today = new GtkButton(TAdiantiCoreTranslator::translate('Today'));
     $bt_close = new GtkButton(TAdiantiCoreTranslator::translate('Close'));
     $bt_today->connect_simple('clicked', array($this, 'selectToday'));
     $inst = $this->popWindow;
     $bt_close->connect_simple('clicked', array($inst, 'hide'));
     $hbox2 = new GtkHBox();
     $hbox2->pack_start($bt_today);
     $hbox2->pack_start($bt_close);
     $vbox = new GtkVBox();
     $vbox->pack_start($hbox, FALSE, FALSE);
     $vbox->pack_start($this->calendar);
     $vbox->pack_start($hbox2, FALSE, FALSE);
     // shows the window
     $this->popWindow->add($vbox);
 }
开发者ID:jhonleandres,项目名称:crmbf,代码行数:59,代码来源:TDate.class.php

示例6: __construct

 /**
  * Class Constructor
  * @param  $name widget's name
  */
 public function __construct($name)
 {
     parent::__construct();
     $this->widget = GtkComboBox::new_text();
     // create the combo model
     $this->model = new GtkListStore(GObject::TYPE_STRING, GObject::TYPE_STRING);
     $this->widget->set_model($this->model);
     $this->widget->set_size_request(200, -1);
     $this->wname = $name;
     parent::add($this->widget);
     $this->validations = array();
 }
开发者ID:jhonleandres,项目名称:crmbf,代码行数:16,代码来源:TCombo.class.php

示例7: __construct

 /**
  * Class Constructor
  * @param $name Name of the widget
  */
 public function __construct($name)
 {
     parent::__construct();
     $this->wname = $name;
     $this->entry = new GtkEntry();
     $this->btn = new TButton('find');
     $this->btn->set_image(new TImage('lib/adianti/images/ico_find.png'));
     $this->btn->set_relief(Gtk::RELIEF_NONE);
     $this->useOutEvent = TRUE;
     $this->validations = array();
     parent::pack_start($this->entry, false, false);
     parent::pack_start($this->btn, false, false);
 }
开发者ID:jhonleandres,项目名称:crmbf,代码行数:17,代码来源:TSeekButton.class.php

示例8: __construct

 /**
  * @name __construct($widget)
  * @param GtkWidget $widget Widget para colocar dentro do FFWViewPort
  * @return GtkHBox
  */
 public function __construct($widget)
 {
     parent::__construct();
     // Cria o frame para criação da borda
     $this->__widgets['frame'] = new GtkFrame();
     // Cria o scrolledwindow para criação dos scrools
     $this->__widgets['scrolled'] = new GtkScrolledWindow();
     // Adiciona o scrolled dentro do frame
     $this->__widgets['frame']->add($this->__widgets['scrolled']);
     // Adiciona o widget ao scrolledwindow
     $this->__widgets['scrolled']->add($widget);
     // Configura os scrolls como automatico
     $this->__widgets['scrolled']->set_policy(Gtk::POLICY_AUTOMATIC, Gtk::POLICY_AUTOMATIC);
     // Adiciona o frame ao GtkHBox
     parent::pack_start($this->__widgets['frame']);
     parent::show_all();
 }
开发者ID:BGCX067,项目名称:fabulafw-svn-to-git,代码行数:22,代码来源:FFWViewPort.widget.php

示例9: EventManager

		/** The constructor of GtkEntryDate. */
		function __construct(){
			parent::__construct();
			
			require_once "knj/class_knj_eventmanager.php";
			$this->eventm = new EventManager();
			$this->eventm->addEvent("changed");
			$this->eventm->addEvent("changed-manually");
			
			$this->entry = new GtkEntry();
			$this->entry->set_width_chars(10);
			$this->entry->connect_after("key-press-event", array($this, "on_entry_keypress"));
			$this->entry->connect_after("key-release-event", array($this, "on_entry_keyrelease"));
			
			$this->btn_select = new GtkButton("...");
			$this->btn_select->connect("clicked", array($this, "showDialog"));
			
			$this->pack_start($this->entry);
			$this->pack_start($this->btn_select, false, false);
		}
开发者ID:kaspernj,项目名称:knjphpfw,代码行数:20,代码来源:class_gtk2_entrydate.php

示例10: GtkLabel

 function __construct($required = false, $duplicated = false, $table = null, $field = null)
 {
     parent::__construct();
     $this->pack_start($this->label = new GtkLabel(), false);
     $this->pack_start($this->entry = new GtkEntry());
     $this->pack_start($this->eventbox = new GtkEventBox(), false);
     $this->pack_start($this->status = GtkImage::new_from_stock(Gtk::STOCK_DIALOG_QUESTION, Gtk::ICON_SIZE_BUTTON), false);
     $this->required = $required;
     $this->duplicated = $duplicated;
     $this->table = $table;
     $this->field = $field;
     $entry_next_focus = $GLOBALS['ENTRY_NEXT_FOCUS'];
     if ($entry_next_focus instanceof GtkWidget) {
         EntrySetNextFocus($entry_next_focus, $this->entry);
     }
     $this->entry->connect('changed', array($this, '__tentry_changed'));
     $this->entry->connect('focus_in_event', array($this, '__tentry_focus_in_event'));
     $this->entry->connect('focus_out_event', array($this, '__tentry_focus_out_event'));
     $GLOBALS['ENTRY_NEXT_FOCUS'] = $this->entry;
 }
开发者ID:eneiasramos,项目名称:xmoney,代码行数:20,代码来源:entrys.php


注:本文中的GtkHBox::__construct方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。