function show(&$driver) { // Now set the baseline of a button box to align it vertically when flowing isude the // text line $this->default_baseline = $this->content[0]->baseline + $this->get_extra_top(); $this->baseline = $this->content[0]->baseline + $this->get_extra_top(); /** * If we're rendering the interactive form, the field content should not be rendered */ global $g_config; if ($g_config['renderforms']) { /** * Render background/borders only */ $status = GenericFormattedBox::show($driver); /** * @todo encoding name? * @todo font name? * @todo check if font is embedded for PDFLIB */ $driver->field_text($this->get_left_padding(), $this->get_top_padding(), $this->get_width() + $this->get_padding_left() + $this->get_padding_right(), $this->get_height(), $this->_value, $this->_field_name); } else { /** * Render everything, including content */ $status = GenericContainerBox::show($driver); } return $status; }
function show_rendered(&$driver) { // Now set the baseline of a button box to align it vertically when flowing isude the // text line $this->default_baseline = $this->content[0]->baseline + $this->get_extra_top(); $this->baseline = $this->content[0]->baseline + $this->get_extra_top(); if (is_null(GenericContainerBox::show($driver))) { return null; } $button_height = $this->get_height() + $this->padding->top->value + $this->padding->bottom->value; // Show arrow button box $driver->setrgbcolor(0.93, 0.93, 0.93); $driver->moveto($this->get_right_padding(), $this->get_top_padding()); $driver->lineto($this->get_right_padding() - $button_height, $this->get_top_padding()); $driver->lineto($this->get_right_padding() - $button_height, $this->get_bottom_padding()); $driver->lineto($this->get_right_padding(), $this->get_bottom_padding()); $driver->closepath(); $driver->fill(); // Show box boundary $driver->setrgbcolor(0, 0, 0); $driver->moveto($this->get_right_padding(), $this->get_top_padding()); $driver->lineto($this->get_right_padding() - $button_height, $this->get_top_padding()); $driver->lineto($this->get_right_padding() - $button_height, $this->get_bottom_padding()); $driver->lineto($this->get_right_padding(), $this->get_bottom_padding()); $driver->closepath(); $driver->stroke(); // Show arrow $driver->setrgbcolor(0, 0, 0); $driver->moveto($this->get_right_padding() - SELECT_BUTTON_TRIANGLE_PADDING, $this->get_top_padding() - SELECT_BUTTON_TRIANGLE_PADDING); $driver->lineto($this->get_right_padding() - $button_height + SELECT_BUTTON_TRIANGLE_PADDING, $this->get_top_padding() - SELECT_BUTTON_TRIANGLE_PADDING); $driver->lineto($this->get_right_padding() - $button_height / 2, $this->get_bottom_padding() + SELECT_BUTTON_TRIANGLE_PADDING); $driver->closepath(); $driver->fill(); return true; }
function reflow_text(&$driver) { if (is_null($this->str_number_box->reflow_text($driver))) { return null; } return GenericContainerBox::reflow_text($driver); }
function show(&$viewport) { // Now set the baseline of a button box to align it vertically when flowing isude the // text line $this->default_baseline = $this->content[0]->baseline + $this->get_extra_top(); $this->baseline = $this->content[0]->baseline + $this->get_extra_top(); return GenericContainerBox::show($viewport); }
function show_rendered(&$driver) { // Now set the baseline of a button box to align it vertically when flowing isude the // text line $this->default_baseline = $this->content[0]->baseline + $this->get_extra_top(); $this->baseline = $this->content[0]->baseline + $this->get_extra_top(); if (is_null(GenericContainerBox::show($driver))) { return null; } $this->show_button($driver); return true; }
function show(&$driver) { /** * If we're rendering the interactive form, the field content should not be rendered */ global $g_config; if ($g_config['renderforms']) { $status = GenericFormattedBox::show($driver); $driver->field_multiline_text($this->get_left_padding(), $this->get_top_padding(), $this->get_width() + $this->get_padding_left() + $this->get_padding_right(), $this->get_height() + $this->get_padding_top() + $this->get_padding_bottom(), $this->_value, $this->_field_name); } else { $status = GenericContainerBox::show($driver); } return $status; }
/** * Show fixed positioned block box using the specified output driver * * Note that 'show_fixed' is called to box _nested_ to the fixed-positioned boxes too! * Thus, we need to check whether actual 'position' values is 'fixed' for this box * and only in that case attempt to move box * * @param OutputDriver $driver The output device driver object */ function show_fixed(&$driver) { $position = $this->get_css_property(CSS_POSITION); if ($position == POSITION_FIXED) { /** * Calculate the distance between the top page edge and top box content edge */ $bottom = $this->get_css_property(CSS_BOTTOM); $top = $this->get_css_property(CSS_TOP); if (!$top->isAuto()) { if ($top->isPercentage()) { $vertical_offset = $driver->getPageMaxHeight() / 100 * $top->getPercentage(); } else { $vertical_offset = $top->getPoints(); } } elseif (!$bottom->isAuto()) { if ($bottom->isPercentage()) { $vertical_offset = $driver->getPageMaxHeight() * (100 - $bottom->getPercentage()) / 100 - $this->get_height(); } else { $vertical_offset = $driver->getPageMaxHeight() - $bottom->getPoints() - $this->get_height(); } } else { $vertical_offset = 0; } /** * Calculate the distance between the right page edge and right box content edge */ $left = $this->get_css_property(CSS_LEFT); $right = $this->get_css_property(CSS_RIGHT); if (!$left->isAuto()) { if ($left->isPercentage()) { $horizontal_offset = $driver->getPageWidth() / 100 * $left->getPercentage(); } else { $horizontal_offset = $left->getPoints(); } } elseif (!$right->isAuto()) { if ($right->isPercentage()) { $horizontal_offset = $driver->getPageWidth() * (100 - $right->getPercentage()) / 100 - $this->get_width(); } else { $horizontal_offset = $driver->getPageWidth() - $right->getPoints() - $this->get_width(); } } else { $horizontal_offset = 0; } /** * Offset current box to the required position on the current page (note that * fixed-positioned element are placed relatively to the viewport - page in our case) */ $this->moveto($driver->getPageLeft() + $horizontal_offset, $driver->getPageTop() - $vertical_offset); } /** * After box have benn properly positioned, render it as usual. */ return GenericContainerBox::show_fixed($driver); }
function show(&$driver) { // draw generic box return GenericContainerBox::show($driver); }
/** * Show fixed positioned block box using the specified output driver * * Note that 'show_fixed' is called to box _nested_ to the fixed-positioned boxes too! * Thus, we need to check whether actual 'position' values is 'fixed' for this box * and only in that case attempt to move box * * @param OutputDriver $driver The output device driver object */ function show_fixed(&$driver) { if ($this->position == POSITION_FIXED) { /** * Calculate the distance between the top page edge and top box content edge */ if (is_null($this->top) && is_null($this->bottom)) { $top_offset = 0; } elseif (!is_null($this->bottom)) { $top_offset = $driver->height - $this->get_height() - $this->bottom; } else { $top_offset = $this->top[0]; } /** * Calculate the distance between the right page edge and right box content edge */ if (is_null($this->left) && is_null($this->right)) { $left_offset = 0; } elseif (!is_null($this->right)) { $left_offset = $driver->width - $this->get_width() - $this->right; } else { $left = $this->get_css_left_value(); $left_offset = $left[0]; } /** * Offset current box to the required position on the current page (note that * fixed-positioned element are placed relatively to the viewport - page in our case) */ $this->moveto($driver->left + $left_offset, $driver->bottom + $driver->height + $driver->offset - $top_offset); } /** * After box have benn properly positioned, render it as usual. */ return GenericContainerBox::show_fixed($driver); }
function show(&$driver) { $this->offset(0, $driver->offset); parent::show($driver); }
/** * Render the button using the specified output driver * * @param OutputDriver $driver The output driver object * * @return boolean flag indicating an error (null value) or success (true) */ function show(&$driver) { /** * Set the baseline of a button box so that the button text will be aligned with * the line box baseline */ $this->default_baseline = $this->content[0]->baseline + $this->get_extra_top(); $this->baseline = $this->content[0]->baseline + $this->get_extra_top(); /** * Render the interactive button (if requested and possible) */ if ($GLOBALS['g_config']['renderforms']) { $status = GenericContainerBox::show($driver); $this->_render_field($driver); } else { $status = GenericContainerBox::show($driver); } return $status; }
function readCSS(&$state) { parent::readCSS($state); $this->_readCSS($state, array(CSS_BORDER_COLLAPSE)); $this->_readCSSLengths($state, array(CSS_HTML2PS_CELLPADDING, CSS_HTML2PS_CELLSPACING, CSS_HTML2PS_TABLE_BORDER)); }
function add_child(&$item) { if ($item->isCell()) { GenericContainerBox::add_child($item); } }
function add_child(&$item) { if (is_a($item, "TableCellBox")) { GenericContainerBox::add_child($item); } }