Ejemplo n.º 1
0
 function show(&$driver)
 {
     global $g_config;
     if ($g_config['renderforms']) {
         $driver->new_form($this->_name);
     }
     return parent::show($driver);
 }
 function show(&$viewport)
 {
     // draw generic block box
     if (is_null(BlockBox::show($viewport))) {
         return null;
     }
     // Draw marker
     /**
      * Determine the marker box base X coordinate 
      * If possible, the marker box should be drawn immediately to the left of the first word in this 
      * box; this means that marker should be tied to the first text box, not to the left 
      * edge of the list block box
      */
     $child = $this->get_first_data();
     if (is_null($child)) {
         $x = $this->get_left();
         $list_style = $this->getCSSProperty(CSS_LIST_STYLE);
         // If list-style-position is inside, we'll need to move marker box inside the
         // list-item box and offset all content by its size;
         if ($list_style->position === LSP_INSIDE) {
             $x += $this->get_marker_box_width();
         }
     } else {
         $x = $child->get_left();
     }
     // Determine the base Y coordinate of marker box
     $element = $this->get_first_data();
     if ($element) {
         $y = $element->get_top() - $element->default_baseline;
     } else {
         $y = $this->get_top();
     }
     if (!is_null($this->marker_image)) {
         $this->mb_image($viewport, $x, $y);
     } else {
         $list_style = $this->getCSSProperty(CSS_LIST_STYLE);
         switch ($list_style->type) {
             case LST_NONE:
                 # kornev
                 $this->mb_disc($viewport, $x, $y);
                 // No marker at all
                 break;
             case LST_DISC:
                 $this->mb_disc($viewport, $x, $y);
                 break;
             case LST_CIRCLE:
                 $this->mb_circle($viewport, $x, $y);
                 break;
             case LST_SQUARE:
                 $this->mb_square($viewport, $x, $y);
                 break;
             default:
                 $this->mb_string($viewport, $x, $y);
                 break;
         }
     }
     return true;
 }
Ejemplo n.º 3
0
 function show(&$driver)
 {
     $driver->new_form($this->_name);
     return parent::show($driver);
 }