/libraries/plugin/jpgraph/jpgraph_gantt.php
PHP | 3955 lines | 2919 code | 476 blank | 560 comment | 423 complexity | 914be73f079e693ce043594f030395a8 MD5 | raw file
Large files files are truncated, but you can click here to view the full file
- <?php
- /*=======================================================================
- // File: JPGRAPH_GANTT.PHP
- // Description: JpGraph Gantt plot extension
- // Created: 2001-11-12
- // Ver: $Id: jpgraph_gantt.php 1809 2009-09-09 13:07:33Z ljp $
- //
- // Copyright (c) Asial Corporation. All rights reserved.
- //========================================================================
- */
- require_once('jpgraph_plotband.php');
- require_once('jpgraph_iconplot.php');
- require_once('jpgraph_plotmark.inc.php');
- // Maximum size for Automatic Gantt chart
- define('MAX_GANTTIMG_SIZE_W',8000);
- define('MAX_GANTTIMG_SIZE_H',5000);
- // Scale Header types
- define("GANTT_HDAY",1);
- define("GANTT_HWEEK",2);
- define("GANTT_HMONTH",4);
- define("GANTT_HYEAR",8);
- define("GANTT_HHOUR",16);
- define("GANTT_HMIN",32);
- // Bar patterns
- define("GANTT_RDIAG",BAND_RDIAG); // Right diagonal lines
- define("GANTT_LDIAG",BAND_LDIAG); // Left diagonal lines
- define("GANTT_SOLID",BAND_SOLID); // Solid one color
- define("GANTT_VLINE",BAND_VLINE); // Vertical lines
- define("GANTT_HLINE",BAND_HLINE); // Horizontal lines
- define("GANTT_3DPLANE",BAND_3DPLANE); // "3D" Plane
- define("GANTT_HVCROSS",BAND_HVCROSS); // Vertical/Hor crosses
- define("GANTT_DIAGCROSS",BAND_DIAGCROSS); // Diagonal crosses
- // Conversion constant
- define("SECPERDAY",3600*24);
- // Locales. ONLY KEPT FOR BACKWARDS COMPATIBILITY
- // You should use the proper locale strings directly
- // from now on.
- define("LOCALE_EN","en_UK");
- define("LOCALE_SV","sv_SE");
- // Layout of bars
- define("GANTT_EVEN",1);
- define("GANTT_FROMTOP",2);
- // Style for minute header
- define("MINUTESTYLE_MM",0); // 15
- define("MINUTESTYLE_CUSTOM",2); // Custom format
- // Style for hour header
- define("HOURSTYLE_HM24",0); // 13:10
- define("HOURSTYLE_HMAMPM",1); // 1:10pm
- define("HOURSTYLE_H24",2); // 13
- define("HOURSTYLE_HAMPM",3); // 1pm
- define("HOURSTYLE_CUSTOM",4); // User defined
- // Style for day header
- define("DAYSTYLE_ONELETTER",0); // "M"
- define("DAYSTYLE_LONG",1); // "Monday"
- define("DAYSTYLE_LONGDAYDATE1",2); // "Monday 23 Jun"
- define("DAYSTYLE_LONGDAYDATE2",3); // "Monday 23 Jun 2003"
- define("DAYSTYLE_SHORT",4); // "Mon"
- define("DAYSTYLE_SHORTDAYDATE1",5); // "Mon 23/6"
- define("DAYSTYLE_SHORTDAYDATE2",6); // "Mon 23 Jun"
- define("DAYSTYLE_SHORTDAYDATE3",7); // "Mon 23"
- define("DAYSTYLE_SHORTDATE1",8); // "23/6"
- define("DAYSTYLE_SHORTDATE2",9); // "23 Jun"
- define("DAYSTYLE_SHORTDATE3",10); // "Mon 23"
- define("DAYSTYLE_SHORTDATE4",11); // "23"
- define("DAYSTYLE_CUSTOM",12); // "M"
- // Styles for week header
- define("WEEKSTYLE_WNBR",0);
- define("WEEKSTYLE_FIRSTDAY",1);
- define("WEEKSTYLE_FIRSTDAY2",2);
- define("WEEKSTYLE_FIRSTDAYWNBR",3);
- define("WEEKSTYLE_FIRSTDAY2WNBR",4);
- // Styles for month header
- define("MONTHSTYLE_SHORTNAME",0);
- define("MONTHSTYLE_LONGNAME",1);
- define("MONTHSTYLE_LONGNAMEYEAR2",2);
- define("MONTHSTYLE_SHORTNAMEYEAR2",3);
- define("MONTHSTYLE_LONGNAMEYEAR4",4);
- define("MONTHSTYLE_SHORTNAMEYEAR4",5);
- define("MONTHSTYLE_FIRSTLETTER",6);
- // Types of constrain links
- define('CONSTRAIN_STARTSTART',0);
- define('CONSTRAIN_STARTEND',1);
- define('CONSTRAIN_ENDSTART',2);
- define('CONSTRAIN_ENDEND',3);
- // Arrow direction for constrain links
- define('ARROW_DOWN',0);
- define('ARROW_UP',1);
- define('ARROW_LEFT',2);
- define('ARROW_RIGHT',3);
- // Arrow type for constrain type
- define('ARROWT_SOLID',0);
- define('ARROWT_OPEN',1);
- // Arrow size for constrain lines
- define('ARROW_S1',0);
- define('ARROW_S2',1);
- define('ARROW_S3',2);
- define('ARROW_S4',3);
- define('ARROW_S5',4);
- // Activity types for use with utility method CreateSimple()
- define('ACTYPE_NORMAL',0);
- define('ACTYPE_GROUP',1);
- define('ACTYPE_MILESTONE',2);
- define('ACTINFO_3D',1);
- define('ACTINFO_2D',0);
- // Check if array_fill() exists
- if (!function_exists('array_fill')) {
- function array_fill($iStart, $iLen, $vValue) {
- $aResult = array();
- for ($iCount = $iStart; $iCount < $iLen + $iStart; $iCount++) {
- $aResult[$iCount] = $vValue;
- }
- return $aResult;
- }
- }
- //===================================================
- // CLASS GanttActivityInfo
- // Description:
- //===================================================
- class GanttActivityInfo {
- public $iShow=true;
- public $iLeftColMargin=4,$iRightColMargin=1,$iTopColMargin=1,$iBottomColMargin=3;
- public $vgrid = null;
- private $iColor='black';
- private $iBackgroundColor='lightgray';
- private $iFFamily=FF_FONT1,$iFStyle=FS_NORMAL,$iFSize=10,$iFontColor='black';
- private $iTitles=array();
- private $iWidth=array(),$iHeight=-1;
- private $iTopHeaderMargin = 4;
- private $iStyle=1;
- private $iHeaderAlign='center';
- function __construct() {
- $this->vgrid = new LineProperty();
- }
- function Hide($aF=true) {
- $this->iShow=!$aF;
- }
- function Show($aF=true) {
- $this->iShow=$aF;
- }
- // Specify font
- function SetFont($aFFamily,$aFStyle=FS_NORMAL,$aFSize=10) {
- $this->iFFamily = $aFFamily;
- $this->iFStyle = $aFStyle;
- $this->iFSize = $aFSize;
- }
- function SetStyle($aStyle) {
- $this->iStyle = $aStyle;
- }
- function SetColumnMargin($aLeft,$aRight) {
- $this->iLeftColMargin = $aLeft;
- $this->iRightColMargin = $aRight;
- }
- function SetFontColor($aFontColor) {
- $this->iFontColor = $aFontColor;
- }
- function SetColor($aColor) {
- $this->iColor = $aColor;
- }
- function SetBackgroundColor($aColor) {
- $this->iBackgroundColor = $aColor;
- }
- function SetColTitles($aTitles,$aWidth=null) {
- $this->iTitles = $aTitles;
- $this->iWidth = $aWidth;
- }
- function SetMinColWidth($aWidths) {
- $n = min(count($this->iTitles),count($aWidths));
- for($i=0; $i < $n; ++$i ) {
- if( !empty($aWidths[$i]) ) {
- if( empty($this->iWidth[$i]) ) {
- $this->iWidth[$i] = $aWidths[$i];
- }
- else {
- $this->iWidth[$i] = max($this->iWidth[$i],$aWidths[$i]);
- }
- }
- }
- }
- function GetWidth($aImg) {
- $txt = new TextProperty();
- $txt->SetFont($this->iFFamily,$this->iFStyle,$this->iFSize);
- $n = count($this->iTitles) ;
- $rm=$this->iRightColMargin;
- $w = 0;
- for($h=0, $i=0; $i < $n; ++$i ) {
- $w += $this->iLeftColMargin;
- $txt->Set($this->iTitles[$i]);
- if( !empty($this->iWidth[$i]) ) {
- $w1 = max($txt->GetWidth($aImg)+$rm,$this->iWidth[$i]);
- }
- else {
- $w1 = $txt->GetWidth($aImg)+$rm;
- }
- $this->iWidth[$i] = $w1;
- $w += $w1;
- $h = max($h,$txt->GetHeight($aImg));
- }
- $this->iHeight = $h+$this->iTopHeaderMargin;
- $txt='';
- return $w;
- }
- function GetColStart($aImg,&$aStart,$aAddLeftMargin=false) {
- $n = count($this->iTitles) ;
- $adj = $aAddLeftMargin ? $this->iLeftColMargin : 0;
- $aStart=array($aImg->left_margin+$adj);
- for( $i=1; $i < $n; ++$i ) {
- $aStart[$i] = $aStart[$i-1]+$this->iLeftColMargin+$this->iWidth[$i-1];
- }
- }
- // Adjust headers left, right or centered
- function SetHeaderAlign($aAlign) {
- $this->iHeaderAlign=$aAlign;
- }
- function Stroke($aImg,$aXLeft,$aYTop,$aXRight,$aYBottom,$aUseTextHeight=false) {
- if( !$this->iShow ) return;
- $txt = new TextProperty();
- $txt->SetFont($this->iFFamily,$this->iFStyle,$this->iFSize);
- $txt->SetColor($this->iFontColor);
- $txt->SetAlign($this->iHeaderAlign,'top');
- $n=count($this->iTitles);
- if( $n == 0 )
- return;
- $x = $aXLeft;
- $h = $this->iHeight;
- $yTop = $aUseTextHeight ? $aYBottom-$h-$this->iTopColMargin-$this->iBottomColMargin : $aYTop ;
- if( $h < 0 ) {
- JpGraphError::RaiseL(6001);
- //('Internal error. Height for ActivityTitles is < 0');
- }
- $aImg->SetLineWeight(1);
- // Set background color
- $aImg->SetColor($this->iBackgroundColor);
- $aImg->FilledRectangle($aXLeft,$yTop,$aXRight,$aYBottom-1);
- if( $this->iStyle == 1 ) {
- // Make a 3D effect
- $aImg->SetColor('white');
- $aImg->Line($aXLeft,$yTop+1,$aXRight,$yTop+1);
- }
- for($i=0; $i < $n; ++$i ) {
- if( $this->iStyle == 1 ) {
- // Make a 3D effect
- $aImg->SetColor('white');
- $aImg->Line($x+1,$yTop,$x+1,$aYBottom);
- }
- $x += $this->iLeftColMargin;
- $txt->Set($this->iTitles[$i]);
- // Adjust the text anchor position according to the choosen alignment
- $xp = $x;
- if( $this->iHeaderAlign == 'center' ) {
- $xp = (($x-$this->iLeftColMargin)+($x+$this->iWidth[$i]))/2;
- }
- elseif( $this->iHeaderAlign == 'right' ) {
- $xp = $x +$this->iWidth[$i]-$this->iRightColMargin;
- }
- $txt->Stroke($aImg,$xp,$yTop+$this->iTopHeaderMargin);
- $x += $this->iWidth[$i];
- if( $i < $n-1 ) {
- $aImg->SetColor($this->iColor);
- $aImg->Line($x,$yTop,$x,$aYBottom);
- }
- }
- $aImg->SetColor($this->iColor);
- $aImg->Line($aXLeft,$yTop, $aXRight,$yTop);
- // Stroke vertical column dividers
- $cols=array();
- $this->GetColStart($aImg,$cols);
- $n=count($cols);
- for( $i=1; $i < $n; ++$i ) {
- $this->vgrid->Stroke($aImg,$cols[$i],$aYBottom,$cols[$i],
- $aImg->height - $aImg->bottom_margin);
- }
- }
- }
- //===================================================
- // CLASS GanttGraph
- // Description: Main class to handle gantt graphs
- //===================================================
- class GanttGraph extends Graph {
- public $scale; // Public accessible
- public $hgrid=null;
- private $iObj=array(); // Gantt objects
- private $iLabelHMarginFactor=0.2; // 10% margin on each side of the labels
- private $iLabelVMarginFactor=0.4; // 40% margin on top and bottom of label
- private $iLayout=GANTT_FROMTOP; // Could also be GANTT_EVEN
- private $iSimpleFont = FF_FONT1,$iSimpleFontSize=11;
- private $iSimpleStyle=GANTT_RDIAG,$iSimpleColor='yellow',$iSimpleBkgColor='red';
- private $iSimpleProgressBkgColor='gray',$iSimpleProgressColor='darkgreen';
- private $iSimpleProgressStyle=GANTT_SOLID;
- private $iZoomFactor = 1.0;
- //---------------
- // CONSTRUCTOR
- // Create a new gantt graph
- function __construct($aWidth=0,$aHeight=0,$aCachedName="",$aTimeOut=0,$aInline=true) {
- // Backward compatibility
- if( $aWidth == -1 ) $aWidth=0;
- if( $aHeight == -1 ) $aHeight=0;
- if( $aWidth< 0 || $aHeight < 0 ) {
- JpgraphError::RaiseL(6002);
- //("You can't specify negative sizes for Gantt graph dimensions. Use 0 to indicate that you want the library to automatically determine a dimension.");
- }
- parent::__construct($aWidth,$aHeight,$aCachedName,$aTimeOut,$aInline);
- $this->scale = new GanttScale($this->img);
- // Default margins
- $this->img->SetMargin(15,17,25,15);
- $this->hgrid = new HorizontalGridLine();
- $this->scale->ShowHeaders(GANTT_HWEEK|GANTT_HDAY);
- $this->SetBox();
- }
- //---------------
- // PUBLIC METHODS
- //
- function SetSimpleFont($aFont,$aSize) {
- $this->iSimpleFont = $aFont;
- $this->iSimpleFontSize = $aSize;
- }
- function SetSimpleStyle($aBand,$aColor,$aBkgColor) {
- $this->iSimpleStyle = $aBand;
- $this->iSimpleColor = $aColor;
- $this->iSimpleBkgColor = $aBkgColor;
- }
- // A utility function to help create basic Gantt charts
- function CreateSimple($data,$constrains=array(),$progress=array()) {
- $num = count($data);
- for( $i=0; $i < $num; ++$i) {
- switch( $data[$i][1] ) {
- case ACTYPE_GROUP:
- // Create a slightly smaller height bar since the
- // "wings" at the end will make it look taller
- $a = new GanttBar($data[$i][0],$data[$i][2],$data[$i][3],$data[$i][4],'',8);
- $a->title->SetFont($this->iSimpleFont,FS_BOLD,$this->iSimpleFontSize);
- $a->rightMark->Show();
- $a->rightMark->SetType(MARK_RIGHTTRIANGLE);
- $a->rightMark->SetWidth(8);
- $a->rightMark->SetColor('black');
- $a->rightMark->SetFillColor('black');
- $a->leftMark->Show();
- $a->leftMark->SetType(MARK_LEFTTRIANGLE);
- $a->leftMark->SetWidth(8);
- $a->leftMark->SetColor('black');
- $a->leftMark->SetFillColor('black');
- $a->SetPattern(BAND_SOLID,'black');
- $csimpos = 6;
- break;
- case ACTYPE_NORMAL:
- $a = new GanttBar($data[$i][0],$data[$i][2],$data[$i][3],$data[$i][4],'',10);
- $a->title->SetFont($this->iSimpleFont,FS_NORMAL,$this->iSimpleFontSize);
- $a->SetPattern($this->iSimpleStyle,$this->iSimpleColor);
- $a->SetFillColor($this->iSimpleBkgColor);
- // Check if this activity should have a constrain line
- $n = count($constrains);
- for( $j=0; $j < $n; ++$j ) {
- if( empty($constrains[$j]) || (count($constrains[$j]) != 3) ) {
- JpGraphError::RaiseL(6003,$j);
- //("Invalid format for Constrain parameter at index=$j in CreateSimple(). Parameter must start with index 0 and contain arrays of (Row,Constrain-To,Constrain-Type)");
- }
- if( $constrains[$j][0]==$data[$i][0] ) {
- $a->SetConstrain($constrains[$j][1],$constrains[$j][2],'black',ARROW_S2,ARROWT_SOLID);
- }
- }
- // Check if this activity have a progress bar
- $n = count($progress);
- for( $j=0; $j < $n; ++$j ) {
- if( empty($progress[$j]) || (count($progress[$j]) != 2) ) {
- JpGraphError::RaiseL(6004,$j);
- //("Invalid format for Progress parameter at index=$j in CreateSimple(). Parameter must start with index 0 and contain arrays of (Row,Progress)");
- }
- if( $progress[$j][0]==$data[$i][0] ) {
- $a->progress->Set($progress[$j][1]);
- $a->progress->SetPattern($this->iSimpleProgressStyle,
- $this->iSimpleProgressColor);
- $a->progress->SetFillColor($this->iSimpleProgressBkgColor);
- //$a->progress->SetPattern($progress[$j][2],$progress[$j][3]);
- break;
- }
- }
- $csimpos = 6;
- break;
- case ACTYPE_MILESTONE:
- $a = new MileStone($data[$i][0],$data[$i][2],$data[$i][3]);
- $a->title->SetFont($this->iSimpleFont,FS_NORMAL,$this->iSimpleFontSize);
- $a->caption->SetFont($this->iSimpleFont,FS_NORMAL,$this->iSimpleFontSize);
- $csimpos = 5;
- break;
- default:
- die('Unknown activity type');
- break;
- }
- // Setup caption
- $a->caption->Set($data[$i][$csimpos-1]);
- // Check if this activity should have a CSIM targetďż˝?
- if( !empty($data[$i][$csimpos]) ) {
- $a->SetCSIMTarget($data[$i][$csimpos]);
- $a->SetCSIMAlt($data[$i][$csimpos+1]);
- }
- if( !empty($data[$i][$csimpos+2]) ) {
- $a->title->SetCSIMTarget($data[$i][$csimpos+2]);
- $a->title->SetCSIMAlt($data[$i][$csimpos+3]);
- }
- $this->Add($a);
- }
- }
- // Set user specified scale zoom factor when auto sizing is used
- function SetZoomFactor($aZoom) {
- $this->iZoomFactor = $aZoom;
- }
- // Set what headers should be shown
- function ShowHeaders($aFlg) {
- $this->scale->ShowHeaders($aFlg);
- }
- // Specify the fraction of the font height that should be added
- // as vertical margin
- function SetLabelVMarginFactor($aVal) {
- $this->iLabelVMarginFactor = $aVal;
- }
- // Synonym to the method above
- function SetVMarginFactor($aVal) {
- $this->iLabelVMarginFactor = $aVal;
- }
- // Add a new Gantt object
- function Add($aObject) {
- if( is_array($aObject) && count($aObject) > 0 ) {
- $cl = $aObject[0];
- if( class_exists('IconPlot',false) && ($cl instanceof IconPlot) ) {
- $this->AddIcon($aObject);
- }
- elseif( class_exists('Text',false) && ($cl instanceof Text) ) {
- $this->AddText($aObject);
- }
- else {
- $n = count($aObject);
- for($i=0; $i < $n; ++$i)
- $this->iObj[] = $aObject[$i];
- }
- }
- else {
- if( class_exists('IconPlot',false) && ($aObject instanceof IconPlot) ) {
- $this->AddIcon($aObject);
- }
- elseif( class_exists('Text',false) && ($aObject instanceof Text) ) {
- $this->AddText($aObject);
- }
- else {
- $this->iObj[] = $aObject;
- }
- }
- }
- function StrokeTexts() {
- // Stroke any user added text objects
- if( $this->texts != null ) {
- $n = count($this->texts);
- for($i=0; $i < $n; ++$i) {
- if( $this->texts[$i]->iScalePosX !== null && $this->texts[$i]->iScalePosY !== null ) {
- $x = $this->scale->TranslateDate($this->texts[$i]->iScalePosX);
- $y = $this->scale->TranslateVertPos($this->texts[$i]->iScalePosY);
- $y -= $this->scale->GetVertSpacing()/2;
- }
- else {
- $x = $y = null;
- }
- $this->texts[$i]->Stroke($this->img,$x,$y);
- }
- }
- }
- // Override inherit method from Graph and give a warning message
- function SetScale($aAxisType,$aYMin=1,$aYMax=1,$aXMin=1,$aXMax=1) {
- JpGraphError::RaiseL(6005);
- //("SetScale() is not meaningfull with Gantt charts.");
- }
- // Specify the date range for Gantt graphs (if this is not set it will be
- // automtically determined from the input data)
- function SetDateRange($aStart,$aEnd) {
- // Adjust the start and end so that the indicate the
- // begining and end of respective start and end days
- if( strpos($aStart,':') === false )
- $aStart = date('Y-m-d 00:00',strtotime($aStart));
- if( strpos($aEnd,':') === false )
- $aEnd = date('Y-m-d 23:59',strtotime($aEnd));
- $this->scale->SetRange($aStart,$aEnd);
- }
- // Get the maximum width of the activity titles columns for the bars
- // The name is lightly misleading since we from now on can have
- // multiple columns in the label section. When this was first written
- // it only supported a single label, hence the name.
- function GetMaxLabelWidth() {
- $m=10;
- if( $this->iObj != null ) {
- $marg = $this->scale->actinfo->iLeftColMargin+$this->scale->actinfo->iRightColMargin;
- $n = count($this->iObj);
- for($i=0; $i < $n; ++$i) {
- if( !empty($this->iObj[$i]->title) ) {
- if( $this->iObj[$i]->title->HasTabs() ) {
- list($tot,$w) = $this->iObj[$i]->title->GetWidth($this->img,true);
- $m=max($m,$tot);
- }
- else
- $m=max($m,$this->iObj[$i]->title->GetWidth($this->img));
- }
- }
- }
- return $m;
- }
- // Get the maximum height of the titles for the bars
- function GetMaxLabelHeight() {
- $m=10;
- if( $this->iObj != null ) {
- $n = count($this->iObj);
- // We can not include the title of GnttVLine since that title is stroked at the bottom
- // of the Gantt bar and not in the activity title columns
- for($i=0; $i < $n; ++$i) {
- if( !empty($this->iObj[$i]->title) && !($this->iObj[$i] instanceof GanttVLine) ) {
- $m=max($m,$this->iObj[$i]->title->GetHeight($this->img));
- }
- }
- }
- return $m;
- }
- function GetMaxBarAbsHeight() {
- $m=0;
- if( $this->iObj != null ) {
- $m = $this->iObj[0]->GetAbsHeight($this->img);
- $n = count($this->iObj);
- for($i=1; $i < $n; ++$i) {
- $m=max($m,$this->iObj[$i]->GetAbsHeight($this->img));
- }
- }
- return $m;
- }
- // Get the maximum used line number (vertical position) for bars
- function GetBarMaxLineNumber() {
- $m=1;
- if( $this->iObj != null ) {
- $m = $this->iObj[0]->GetLineNbr();
- $n = count($this->iObj);
- for($i=1; $i < $n; ++$i) {
- $m=max($m,$this->iObj[$i]->GetLineNbr());
- }
- }
- return $m;
- }
- // Get the minumum and maximum used dates for all bars
- function GetBarMinMax() {
- $start = 0 ;
- $n = count($this->iObj);
- while( $start < $n && $this->iObj[$start]->GetMaxDate() === false )
- ++$start;
- if( $start >= $n ) {
- JpgraphError::RaiseL(6006);
- //('Cannot autoscale Gantt chart. No dated activities exist. [GetBarMinMax() start >= n]');
- }
- $max=$this->scale->NormalizeDate($this->iObj[$start]->GetMaxDate());
- $min=$this->scale->NormalizeDate($this->iObj[$start]->GetMinDate());
- for($i=$start+1; $i < $n; ++$i) {
- $rmax = $this->scale->NormalizeDate($this->iObj[$i]->GetMaxDate());
- if( $rmax != false )
- $max=Max($max,$rmax);
- $rmin = $this->scale->NormalizeDate($this->iObj[$i]->GetMinDate());
- if( $rmin != false )
- $min=Min($min,$rmin);
- }
- $minDate = date("Y-m-d",$min);
- $min = strtotime($minDate);
- $maxDate = date("Y-m-d 23:59",$max);
- $max = strtotime($maxDate);
- return array($min,$max);
- }
- // Create a new auto sized canvas if the user hasn't specified a size
- // The size is determined by what scale the user has choosen and hence
- // the minimum width needed to display the headers. Some margins are
- // also added to make it better looking.
- function AutoSize() {
- if( $this->img->img == null ) {
- // The predefined left, right, top, bottom margins.
- // Note that the top margin might incease depending on
- // the title.
- $hadj = $vadj = 0;
- if( $this->doshadow ) {
- $hadj = $this->shadow_width;
- $vadj = $this->shadow_width+5;
- }
- $lm = $this->img->left_margin;
- $rm = $this->img->right_margin +$hadj;
- $rm += 2 ;
- $tm = $this->img->top_margin;
- $bm = $this->img->bottom_margin + $vadj;
- $bm += 2;
- // If there are any added GanttVLine we must make sure that the
- // bottom margin is wide enough to hold a title.
- $n = count($this->iObj);
- for($i=0; $i < $n; ++$i) {
- if( $this->iObj[$i] instanceof GanttVLine ) {
- $bm = max($bm,$this->iObj[$i]->title->GetHeight($this->img)+10);
- }
- }
- // First find out the height
- $n=$this->GetBarMaxLineNumber()+1;
- $m=max($this->GetMaxLabelHeight(),$this->GetMaxBarAbsHeight());
- $height=$n*((1+$this->iLabelVMarginFactor)*$m);
- // Add the height of the scale titles
- $h=$this->scale->GetHeaderHeight();
- $height += $h;
- // Calculate the top margin needed for title and subtitle
- if( $this->title->t != "" ) {
- $tm += $this->title->GetFontHeight($this->img);
- }
- if( $this->subtitle->t != "" ) {
- $tm += $this->subtitle->GetFontHeight($this->img);
- }
- // ...and then take the bottom and top plot margins into account
- $height += $tm + $bm + $this->scale->iTopPlotMargin + $this->scale->iBottomPlotMargin;
- // Now find the minimum width for the chart required
- // If day scale or smaller is shown then we use the day font width
- // as the base size unit.
- // If only weeks or above is displayed we use a modified unit to
- // get a smaller image.
- if( $this->scale->IsDisplayHour() || $this->scale->IsDisplayMinute() ) {
- // Add 2 pixel margin on each side
- $fw=$this->scale->day->GetFontWidth($this->img)+4;
- }
- elseif( $this->scale->IsDisplayWeek() ) {
- $fw = 8;
- }
- elseif( $this->scale->IsDisplayMonth() ) {
- $fw = 4;
- }
- else {
- $fw = 2;
- }
- $nd=$this->scale->GetNumberOfDays();
- if( $this->scale->IsDisplayDay() ) {
- // If the days are displayed we also need to figure out
- // how much space each day's title will require.
- switch( $this->scale->day->iStyle ) {
- case DAYSTYLE_LONG :
- $txt = "Monday";
- break;
- case DAYSTYLE_LONGDAYDATE1 :
- $txt = "Monday 23 Jun";
- break;
- case DAYSTYLE_LONGDAYDATE2 :
- $txt = "Monday 23 Jun 2003";
- break;
- case DAYSTYLE_SHORT :
- $txt = "Mon";
- break;
- case DAYSTYLE_SHORTDAYDATE1 :
- $txt = "Mon 23/6";
- break;
- case DAYSTYLE_SHORTDAYDATE2 :
- $txt = "Mon 23 Jun";
- break;
- case DAYSTYLE_SHORTDAYDATE3 :
- $txt = "Mon 23";
- break;
- case DAYSTYLE_SHORTDATE1 :
- $txt = "23/6";
- break;
- case DAYSTYLE_SHORTDATE2 :
- $txt = "23 Jun";
- break;
- case DAYSTYLE_SHORTDATE3 :
- $txt = "Mon 23";
- break;
- case DAYSTYLE_SHORTDATE4 :
- $txt = "88";
- break;
- case DAYSTYLE_CUSTOM :
- $txt = date($this->scale->day->iLabelFormStr,strtotime('2003-12-20 18:00'));
- break;
- case DAYSTYLE_ONELETTER :
- default:
- $txt = "M";
- break;
- }
- $fw = $this->scale->day->GetStrWidth($this->img,$txt)+6;
- }
- // If we have hours enabled we must make sure that each day has enough
- // space to fit the number of hours to be displayed.
- if( $this->scale->IsDisplayHour() ) {
- // Depending on what format the user has choose we need different amount
- // of space. We therefore create a typical string for the choosen format
- // and determine the length of that string.
- switch( $this->scale->hour->iStyle ) {
- case HOURSTYLE_HMAMPM:
- $txt = '12:00pm';
- break;
- case HOURSTYLE_H24:
- // 13
- $txt = '24';
- break;
- case HOURSTYLE_HAMPM:
- $txt = '12pm';
- break;
- case HOURSTYLE_CUSTOM:
- $txt = date($this->scale->hour->iLabelFormStr,strtotime('2003-12-20 18:00'));
- break;
- case HOURSTYLE_HM24:
- default:
- $txt = '24:00';
- break;
- }
- $hfw = $this->scale->hour->GetStrWidth($this->img,$txt)+6;
- $mw = $hfw;
- if( $this->scale->IsDisplayMinute() ) {
- // Depending on what format the user has choose we need different amount
- // of space. We therefore create a typical string for the choosen format
- // and determine the length of that string.
- switch( $this->scale->minute->iStyle ) {
- case HOURSTYLE_CUSTOM:
- $txt2 = date($this->scale->minute->iLabelFormStr,strtotime('2005-05-15 18:55'));
- break;
- case MINUTESTYLE_MM:
- default:
- $txt2 = '15';
- break;
- }
- $mfw = $this->scale->minute->GetStrWidth($this->img,$txt2)+6;
- $n2 = ceil(60 / $this->scale->minute->GetIntervall() );
- $mw = $n2 * $mfw;
- }
- $hfw = $hfw < $mw ? $mw : $hfw ;
- $n = ceil(24*60 / $this->scale->TimeToMinutes($this->scale->hour->GetIntervall()) );
- $hw = $n * $hfw;
- $fw = $fw < $hw ? $hw : $fw ;
- }
- // We need to repeat this code block here as well.
- // THIS iS NOT A MISTAKE !
- // We really need it since we need to adjust for minutes both in the case
- // where hour scale is shown and when it is not shown.
- if( $this->scale->IsDisplayMinute() ) {
- // Depending on what format the user has choose we need different amount
- // of space. We therefore create a typical string for the choosen format
- // and determine the length of that string.
- switch( $this->scale->minute->iStyle ) {
- case HOURSTYLE_CUSTOM:
- $txt = date($this->scale->minute->iLabelFormStr,strtotime('2005-05-15 18:55'));
- break;
- case MINUTESTYLE_MM:
- default:
- $txt = '15';
- break;
- }
- $mfw = $this->scale->minute->GetStrWidth($this->img,$txt)+6;
- $n = ceil(60 / $this->scale->TimeToMinutes($this->scale->minute->GetIntervall()) );
- $mw = $n * $mfw;
- $fw = $fw < $mw ? $mw : $fw ;
- }
- // If we display week we must make sure that 7*$fw is enough
- // to fit up to 10 characters of the week font (if the week is enabled)
- if( $this->scale->IsDisplayWeek() ) {
- // Depending on what format the user has choose we need different amount
- // of space
- $fsw = strlen($this->scale->week->iLabelFormStr);
- if( $this->scale->week->iStyle==WEEKSTYLE_FIRSTDAY2WNBR ) {
- $fsw += 8;
- }
- elseif( $this->scale->week->iStyle==WEEKSTYLE_FIRSTDAYWNBR ) {
- $fsw += 7;
- }
- else {
- $fsw += 4;
- }
- $ww = $fsw*$this->scale->week->GetFontWidth($this->img);
- if( 7*$fw < $ww ) {
- $fw = ceil($ww/7);
- }
- }
- if( !$this->scale->IsDisplayDay() && !$this->scale->IsDisplayHour() &&
- !( ($this->scale->week->iStyle==WEEKSTYLE_FIRSTDAYWNBR ||
- $this->scale->week->iStyle==WEEKSTYLE_FIRSTDAY2WNBR) && $this->scale->IsDisplayWeek() ) ) {
- // If we don't display the individual days we can shrink the
- // scale a little bit. This is a little bit pragmatic at the
- // moment and should be re-written to take into account
- // a) What scales exactly are shown and
- // b) what format do they use so we know how wide we need to
- // make each scale text space at minimum.
- $fw /= 2;
- if( !$this->scale->IsDisplayWeek() ) {
- $fw /= 1.8;
- }
- }
- $cw = $this->GetMaxActInfoColWidth() ;
- $this->scale->actinfo->SetMinColWidth($cw);
- if( $this->img->width <= 0 ) {
- // Now determine the width for the activity titles column
- // Firdst find out the maximum width of each object column
- $titlewidth = max(max($this->GetMaxLabelWidth(),
- $this->scale->tableTitle->GetWidth($this->img)),
- $this->scale->actinfo->GetWidth($this->img));
- // Add the width of the vertivcal divider line
- $titlewidth += $this->scale->divider->iWeight*2;
- // Adjust the width by the user specified zoom factor
- $fw *= $this->iZoomFactor;
- // Now get the total width taking
- // titlewidth, left and rigt margin, dayfont size
- // into account
- $width = $titlewidth + $nd*$fw + $lm+$rm;
- }
- else {
- $width = $this->img->width;
- }
- $width = round($width);
- $height = round($height);
- // Make a sanity check on image size
- if( $width > MAX_GANTTIMG_SIZE_W || $height > MAX_GANTTIMG_SIZE_H ) {
- JpgraphError::RaiseL(6007,$width,$height);
- //("Sanity check for automatic Gantt chart size failed. Either the width (=$width) or height (=$height) is larger than MAX_GANTTIMG_SIZE. This could potentially be caused by a wrong date in one of the activities.");
- }
- $this->img->CreateImgCanvas($width,$height);
- $this->img->SetMargin($lm,$rm,$tm,$bm);
- }
- }
- // Return an array width the maximum width for each activity
- // column. This is used when we autosize the columns where we need
- // to find out the maximum width of each column. In order to do that we
- // must walk through all the objects, sigh...
- function GetMaxActInfoColWidth() {
- $n = count($this->iObj);
- if( $n == 0 ) return;
- $w = array();
- $m = $this->scale->actinfo->iLeftColMargin + $this->scale->actinfo->iRightColMargin;
- for( $i=0; $i < $n; ++$i ) {
- $tmp = $this->iObj[$i]->title->GetColWidth($this->img,$m);
- $nn = count($tmp);
- for( $j=0; $j < $nn; ++$j ) {
- if( empty($w[$j]) )
- $w[$j] = $tmp[$j];
- else
- $w[$j] = max($w[$j],$tmp[$j]);
- }
- }
- return $w;
- }
- // Stroke the gantt chart
- function Stroke($aStrokeFileName="") {
- // If the filename is the predefined value = '_csim_special_'
- // we assume that the call to stroke only needs to do enough
- // to correctly generate the CSIM maps.
- // We use this variable to skip things we don't strictly need
- // to do to generate the image map to improve performance
- // a best we can. Therefor you will see a lot of tests !$_csim in the
- // code below.
- $_csim = ($aStrokeFileName===_CSIM_SPECIALFILE);
- // Should we autoscale dates?
- if( !$this->scale->IsRangeSet() ) {
- list($min,$max) = $this->GetBarMinMax();
- $this->scale->SetRange($min,$max);
- }
- $this->scale->AdjustStartEndDay();
- // Check if we should autoscale the image
- $this->AutoSize();
- // Should we start from the top or just spread the bars out even over the
- // available height
- $this->scale->SetVertLayout($this->iLayout);
- if( $this->iLayout == GANTT_FROMTOP ) {
- $maxheight=max($this->GetMaxLabelHeight(),$this->GetMaxBarAbsHeight());
- $this->scale->SetVertSpacing($maxheight*(1+$this->iLabelVMarginFactor));
- }
- // If it hasn't been set find out the maximum line number
- if( $this->scale->iVertLines == -1 )
- $this->scale->iVertLines = $this->GetBarMaxLineNumber()+1;
- $maxwidth=max($this->scale->actinfo->GetWidth($this->img),
- max($this->GetMaxLabelWidth(),
- $this->scale->tableTitle->GetWidth($this->img)));
- $this->scale->SetLabelWidth($maxwidth+$this->scale->divider->iWeight);//*(1+$this->iLabelHMarginFactor));
- if( !$_csim ) {
- $this->StrokePlotArea();
- if( $this->iIconDepth == DEPTH_BACK ) {
- $this->StrokeIcons();
- }
- }
- $this->scale->Stroke();
- if( !$_csim ) {
- // Due to a minor off by 1 bug we need to temporarily adjust the margin
- $this->img->right_margin--;
- $this->StrokePlotBox();
- $this->img->right_margin++;
- }
- // Stroke Grid line
- $this->hgrid->Stroke($this->img,$this->scale);
- $n = count($this->iObj);
- for($i=0; $i < $n; ++$i) {
- //$this->iObj[$i]->SetLabelLeftMargin(round($maxwidth*$this->iLabelHMarginFactor/2));
- $this->iObj[$i]->Stroke($this->img,$this->scale);
- }
- $this->StrokeTitles();
- if( !$_csim ) {
- $this->StrokeConstrains();
- $this->footer->Stroke($this->img);
- if( $this->iIconDepth == DEPTH_FRONT) {
- $this->StrokeIcons();
- }
- // Stroke all added user texts
- $this->StrokeTexts();
- // Should we do any final image transformation
- if( $this->iImgTrans ) {
- if( !class_exists('ImgTrans',false) ) {
- require_once('jpgraph_imgtrans.php');
- }
- $tform = new ImgTrans($this->img->img);
- $this->img->img = $tform->Skew3D($this->iImgTransHorizon,$this->iImgTransSkewDist,
- $this->iImgTransDirection,$this->iImgTransHighQ,
- $this->iImgTransMinSize,$this->iImgTransFillColor,
- $this->iImgTransBorder);
- }
- // If the filename is given as the special "__handle"
- // then the image handler is returned and the image is NOT
- // streamed back
- if( $aStrokeFileName == _IMG_HANDLER ) {
- return $this->img->img;
- }
- else {
- // Finally stream the generated picture
- $this->cache->PutAndStream($this->img,$this->cache_name,$this->inline,
- $aStrokeFileName);
- }
- }
- }
- function StrokeConstrains() {
- $n = count($this->iObj);
- // Stroke all constrains
- for($i=0; $i < $n; ++$i) {
- // Some gantt objects may not have constraints associated with them
- // for example we can add IconPlots which doesn't have this property.
- if( empty($this->iObj[$i]->constraints) ) continue;
- $numConstrains = count($this->iObj[$i]->constraints);
- for( $k = 0; $k < $numConstrains; $k++ ) {
- $vpos = $this->iObj[$i]->constraints[$k]->iConstrainRow;
- if( $vpos >= 0 ) {
- $c1 = $this->iObj[$i]->iConstrainPos;
- // Find out which object is on the target row
- $targetobj = -1;
- for( $j=0; $j < $n && $targetobj == -1; ++$j ) {
- if( $this->iObj[$j]->iVPos == $vpos ) {
- $targetobj = $j;
- }
- }
- if( $targetobj == -1 ) {
- JpGraphError::RaiseL(6008,$this->iObj[$i]->iVPos,$vpos);
- //('You have specifed a constrain from row='.$this->iObj[$i]->iVPos.' to row='.$vpos.' which does not have any activity.');
- }
- $c2 = $this->iObj[$targetobj]->iConstrainPos;
- if( count($c1) == 4 && count($c2 ) == 4) {
- switch( $this->iObj[$i]->constraints[$k]->iConstrainType ) {
- case CONSTRAIN_ENDSTART:
- if( $c1[1] < $c2[1] ) {
- $link = new GanttLink($c1[2],$c1[3],$c2[0],$c2[1]);
- }
- else {
- $link = new GanttLink($c1[2],$c1[1],$c2[0],$c2[3]);
- }
- $link->SetPath(3);
- break;
- case CONSTRAIN_STARTEND:
- if( $c1[1] < $c2[1] ) {
- $link = new GanttLink($c1[0],$c1[3],$c2[2],$c2[1]);
- }
- else {
- $link = new GanttLink($c1[0],$c1[1],$c2[2],$c2[3]);
- }
- $link->SetPath(0);
- break;
- case CONSTRAIN_ENDEND:
- if( $c1[1] < $c2[1] ) {
- $link = new GanttLink($c1[2],$c1[3],$c2[2],$c2[1]);
- }
- else {
- $link = new GanttLink($c1[2],$c1[1],$c2[2],$c2[3]);
- }
- $link->SetPath(1);
- break;
- case CONSTRAIN_STARTSTART:
- if( $c1[1] < $c2[1] ) {
- $link = new GanttLink($c1[0],$c1[3],$c2[0],$c2[1]);
- }
- else {
- $link = new GanttLink($c1[0],$c1[1],$c2[0],$c2[3]);
- }
- $link->SetPath(3);
- break;
- default:
- JpGraphError::RaiseL(6009,$this->iObj[$i]->iVPos,$vpos);
- //('Unknown constrain type specified from row='.$this->iObj[$i]->iVPos.' to row='.$vpos);
- break;
- }
- $link->SetColor($this->iObj[$i]->constraints[$k]->iConstrainColor);
- $link->SetArrow($this->iObj[$i]->constraints[$k]->iConstrainArrowSize,
- $this->iObj[$i]->constraints[$k]->iConstrainArrowType);
- $link->Stroke($this->img);
- }
- }
- }
- }
- }
- function GetCSIMAreas() {
- if( !$this->iHasStroked )
- $this->Stroke(_CSIM_SPECIALFILE);
- $csim = $this->title->GetCSIMAreas();
- $csim .= $this->subtitle->GetCSIMAreas();
- $csim .= $this->subsubtitle->GetCSIMAreas();
- $n = count($this->iObj);
- for( $i=$n-1; $i >= 0; --$i )
- $csim .= $this->iObj[$i]->GetCSIMArea();
- return $csim;
- }
- }
- //===================================================
- // CLASS PredefIcons
- // Description: Predefined icons for use with Gantt charts
- //===================================================
- define('GICON_WARNINGRED',0);
- define('GICON_TEXT',1);
- define('GICON_ENDCONS',2);
- define('GICON_MAIL',3);
- define('GICON_STARTCONS',4);
- define('GICON_CALC',5);
- define('GICON_MAGNIFIER',6);
- define('GICON_LOCK',7);
- define('GICON_STOP',8);
- define('GICON_WARNINGYELLOW',9);
- define('GICON_FOLDEROPEN',10);
- define('GICON_FOLDER',11);
- define('GICON_TEXTIMPORTANT',12);
- class PredefIcons {
- private $iBuiltinIcon = null, $iLen = -1 ;
- function GetLen() {
- return $this->iLen ;
- }
- function GetImg($aIdx) {
- if( $aIdx < 0 || $aIdx >= $this->iLen ) {
- JpGraphError::RaiseL(6010,$aIdx);
- //('Illegal icon index for Gantt builtin icon ['.$aIdx.']');
- }
- return Image::CreateFromString(base64_decode($this->iBuiltinIcon[$aIdx][1]));
- }
- function __construct() {
- //==========================================================
- // warning.png
- //==========================================================
- $this->iBuiltinIcon[0][0]= 1043 ;
- $this->iBuiltinIcon[0][1]=
- 'iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsSAAALEgHS3X78AAAA'.
- 'B3RJTUUH0wgKFSgilWPhUQAAA6BJREFUeNrtl91rHFUYh5/3zMx+Z5JNUoOamCZNaqTZ6IWIkqRiQWmi1IDetHfeiCiltgXBP8AL'.
- '0SIUxf/AvfRSBS9EKILFFqyIH9CEmFZtPqrBJLs7c+b1YneT3WTTbNsUFPLCcAbmzPt73o9zzgzs2Z793231UOdv3w9k9Z2uzOdA'.
- '5+2+79yNeL7Hl7hw7oeixRMZ6PJM26W18DNAm/Vh7lR8fqh97NmMF11es1iFpMATqdirwMNA/J4DpIzkr5YsAF1PO6gIMYHRdPwl'.
- 'oO2elmB+qH3sm7XozbkgYvy8SzYnZPtcblyM6I+5z3jQ+0vJfgpEu56BfI9vUkbyi2HZd1QJoeWRiAjBd4SDCW8SSAOy6wBHMzF7'.
- 'YdV2A+ROuvRPLfHoiSU0EMY/cDAIhxJeGngKaN1VgHyPL7NBxI1K9P4QxBzw3K1zJ/zkG8B9uwaQ7/HNsRZv9kohBGD0o7JqMYS/'.
- '/ynPidQw/LrBiPBcS/yFCT95DvB2BWAy4575PaQbQKW+tPd3GCItu2odKI++YxiKu0d26oWmAD7paZU/rLz37VqIijD2YbnzNBBE'.
- 'IBHf8K8qjL7vYhCGErEU8CTg3xXAeMp96GrJEqkyXkm9Bhui1xfsunjdGhcYLq+IzjsGmBt5YH/cmJkFq6gIqlon3u4LxdKGuCIo'.
- 'Qu41g0E41po+2R33Xt5uz9kRIB2UTle7PnfKrROP1HD4sRjZlq0lzhwoZ6rDNeTi3nEg1si/7FT7kYQbXS6E5E65tA5uRF9tutq0'.
- 'K/VwAF+/FbIYWt6+tjQM/AqUms7A4Wy6d7YSfSNxgMmzi0ycWWworio4QJvj4LpuL5BqugTnXzzqJsJwurrlNhJXFaavW67NRw3F'.
- 'q+aJcCQVe9fzvJGmAY7/dPH0gi0f64OveGxa+usCuQMeZ0+kt8BVrX+qPO9Bzx0MgqBvs+a2PfDdYIf+WAjXU1ub4tqNaPPzRs8A'.
- 'blrli+WVn79cXn0cWKl+tGx7HLc7pu3CSmnfitL+l1UihAhwjFkPQev4K/fSABjBM8JCaFuurJU+rgW41SroA8aNMVNAFtgHJCsn'.
- 'XGy/58QVxAC9MccJtZ5kIzNlW440WrJ2ea4YPA9cAooA7i0A/gS+iqLoOpB1HOegqrYB3UBmJrAtQAJwpwPr1Ry92wVlgZsiYlW1'.
- 'uX1gU36dymgqYxJIJJNJT1W9QqHgNwFQBGYqo94OwHZQUuPD7ACglSvc+5n5T9m/wfJJX4U9qzEAAAAASUVORK5CYII=' ;
- //==========================================================
- // edit.png
- //==========================================================
- $this->iBuiltinIcon[1][0]= 959 ;
- $this->iBuiltinIcon[1][1]=
- 'iVBORw0KGgoAAAANSUhEUgAAABYAAAAWCAYAAADEtGw7AAAABGdBTUEAALGPC/xhBQAAAAZiS0dEAFgAWABY9j+ZuwAAAAlwSFlz'.
- 'AAALEAAACxABrSO9dQAAAAd0SU1FB9AKDAwbIEXOA6AAAAM8SURBVHicpdRPaBxlHMbx76ZvsmOTmm1dsEqQSIIsEmGVBAQjivEQ'.
- 'PAUJngpWsAWlBw8egpQepKwplN4ULEG9CjkEyUFKlSJrWTG0IU51pCsdYW2ncUPjdtp9Z+f3vuNhu8nKbmhaf5cZeGc+PO8zf1Lc'.
- 'm0KhkACICCKCMeaBjiLC0tLSnjNvPmuOHRpH0TZTU1M8zBi9wakzn7OFTs5sw8YYACYmJrre7HkeuVyu69qPF77hlT1XmZ0eQ03O'.
- 'wOLJTvhBx1rLz18VmJ0eY+jVd2FxDkKXnvYLHgb97OgLzE4ON9Hzc1B1QaQzsed5O0Lta3Ec89OnR5h5McfQ+Mw2qgQUnfBOPbZ3'.
- 'bK3l+xOvMT0+3ERLp5FNF6UEjcL32+DdVmGt5WLhDYYPZrbRqreFumXwql0S3w9tnDvLWD5PZigPpdOwuYpSCo3C8wU3UHxQdHbf'.
- 'cZIkNM6dxcnlUM4k1eUFMlUPpUADbpkttFarHe6oYqeOr6yt4RzMQHYUcUsQVtGicHDwKprViuLDkkOtVnsHCHZVRVy/zcj1i5Af'.
- 'h8AjdIts+hUcGcYPK3iBtKM3gD/uAzf/AdY2mmmVgy6X8YNNKmGIvyloPcB8SUin07RQ4EZHFdsdG0wkJEnEaHAJxvKEpSLeaokV'.
- 'r4zWmhUZYLlY4b1D03y5eIEWCtS7vsciAgiIxkQRabWOrlQor66y4pUphoJb1jiO4uO5o0S3q6RSqVbiOmC7VCEgAhLSaDQ48dH7'.
- 'vD46REY0iysegSjKQciRt99ib7qXwX0O+pG4teM6YKHLB9JMq4mTmF9/+AKA4wvLZByH7OgYL7+UY2qvw/7Bfg5kHiXjJFyv3CGO'.
- 'Y1rof+BW4t/XLiPG0DCGr79d4XzRxRnIMn98huXSTYyJ6et1UNYQhRvcinpJq86H3wGPPPM0iBDd+QffD1g4eZjLvuG7S1Wef26E'.
- 'J7L7eSx7gAHVg7V3MSbi6m/r93baBd6qQjerAJg/9Ql/XrvG0ON1+vv7GH3qSfY5fahUnSTpwZgIEQesaVXRPbHRG/xyJSAxMYlp'.
- 'EOm71HUINiY7mGb95l/8jZCyQmJjMDGJjUmsdCROtZ0n/P/Z8v4Fs2MTUUf7vYoAAAAASUVORK5CYII=' ;
- //==========================================================
- // endconstrain.png
- //==========================================================
- $this->iBuiltinIcon[2][0]= 666 ;
- $this->iBuiltinIcon[2][1]=
- 'iVBORw0KGgoAAAANSUhEUgAAABYAAAAWCAYAAADEtGw7AAAABGdBTUEAALGPC/xhBQAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlz'.
- 'AAALDwAACw8BkvkDpQAAAAd0SU1FB9ALEREILkh0+eQAAAIXSURBVHictZU9aFNRFMd/N81HX77aptJUWmp1LHRpIcWhg5sIDlUQ'.
- 'LAXB4t7RRUpwEhy7iQ46CCIoSHcl0CFaoVARU2MFMYktadLXJNok7x2HtCExvuYFmnO4w/3gx+Gc/z1HKRTdMEdXqHbB/sgc/sic'.
- 'nDoYAI8XwDa8o1RMLT+2hAsigtTvbIGVqhX46szUifBGswUeCPgAGB7QeLk0X4Ork+HOxo1VgSqGASjMqkn8W4r4vVtEgI/RRQEL'.
- 'vaoGD85cl5V3nySR/S1mxWxab7f35PnntNyMJeRr9kCMqiHTy09EoeToLwggx6ymiMOD/VwcD7Oa/MHkcIiQx026WGYto5P/U+ZZ'.
- '7gD0QwDuT5z9N3LrVPi0Xs543eQPKkRzaS54eviJIp4tMFQFMllAWN2qcRZHBnixNM8NYD162xq8u7ePSQ+GX2Pjwxc2dB2cLtB8'.
- '7GgamCb0anBYBeChMtl8855CarclxU1gvViiUK4w2OMkNDnGeJ8bt9fH90yOnOkCwLFTwhzykhvtYzOWoBBbY//R3dbaNTYhf2RO'.
- 'QpeuUMzv188MlwuHy0H13HnE48UzMcL0WAtUHX8OxZHoG1URiFw7rnLLCswuSPD1ulze/iWjT2PSf+dBXRFtVVGIvzqph0pQL7VE'.
- 'avXYaXXxPwsnt0imdttCocMmZBdK7YU9D8wuNOW0nXc6QWzPsSa5naZ1beb9BbGB6dxGtMnXAAAAAElFTkSuQmCC' ;
- //==========================================================
- // mail.png
- //==========================================================
- $this->iBuiltinIcon[3][0]= 1122 ;
- $this->iBuiltinIcon[3][1]=
- 'iVBORw0KGgoAAAANSUhEUgAAABYAAAAWCAYAAADEtGw7AAAABGd…
Large files files are truncated, but you can click here to view the full file