public function getInstance() { if (!isset(self::$instance)) { self::$instance = new GtkTooltips(); } return self::$instance; }
/** * Define the field's tooltip * @param $tip A string containing the field's tooltip */ public function setTip($tip) { if (method_exists($this, 'set_tooltip_text')) { $this->widget->set_tooltip_text($tip); } else { $tooltip = TooltipSingleton::getInstance(); $tooltip->set_tip($this->widget, $tip); } }
/** * Register a tip * @param $text Tooltip Text */ function setTip($text) { if (method_exists($this, 'set_tooltip_text')) { $this->textview->set_tooltip_text($text); } else { $tooltip = TooltipSingleton::getInstance(); $tooltip->set_tip($this->textview, $text); } }
/** * Register a tip * @param $text Tooltip Text */ function setTip($text) { if ($this->radios) { foreach ($this->radios as $key => $radio) { if (method_exists($radio, 'set_tooltip_text')) { $radio->set_tooltip_text($text); } else { $tooltip = TooltipSingleton::getInstance(); $tooltip->set_tip($radio, $text); } } } }
/** * Register a tip * @param $text Tooltip Text */ function setTip($text) { if ($this->checks) { foreach ($this->checks as $key => $check) { if (method_exists($check, 'set_tooltip_text')) { $check->set_tooltip_text($text); } else { $tooltip = TooltipSingleton::getInstance(); $tooltip->set_tip($check, $text); } } } }