39. EPMO Open Source Coordination Office Redaction File Detail Report

Produced by Araxis Merge on 5/10/2019 1:00:05 PM Eastern Daylight Time. See www.araxis.com for information about Merge. This report uses XHTML and CSS2, and is best viewed with a modern standards-compliant browser. For optimum results when printing this report, use landscape orientation and enable printing of background images and colours in your browser.

39.1 Files compared

# Location File Last Modified
1 CPRS_v32_64_P2.zip\OR_30_405V64_SRC.zip\Cover Sheet mGridPanelFrame.pas Wed Apr 3 19:32:15 2019 UTC
2 CPRS_v32_64_P2.zip\OR_30_405V64_SRC.zip\Cover Sheet mGridPanelFrame.pas Thu May 9 00:51:31 2019 UTC

39.2 Comparison summary

Description Between
Files 1 and 2
Text Blocks Lines
Unchanged 2 998
Changed 1 2
Inserted 0 0
Removed 0 0

39.3 Comparison options

Whitespace
Character case Differences in character case are significant
Line endings Differences in line endings (CR and LF characters) are ignored
CR/LF characters Not shown in the comparison detail

39.4 Active regular expressions

No regular expressions were active.

39.5 Comparison detail

  1   unit mGrid PanelFrame ;
  2   {
  3     ======== ========== ========== ========== ========== ========== ========== ========== ==
  4     *
  5     *        Applicatio n:  CPRS -  CoverShee t
  6              Developer:       PII                   
  7     *        Site:          Salt L ake City I SC
  8     *        Date:          2015-1 2-04
  9     *
  10     *        Descriptio n:  Inheri ted from T Frame. Thi s display  panel is t he bare
  11     *                       minimu m for a gr id panel f or use wit hin the CP RS
  12     *                       applic ation.
  13     *
  14     *        Notes:         This f rame is a  base objec t and heav ily inheri ted from.
  15     *                       ABSOLU TELY NO CH ANGES SHOU LD BE MADE  WITHOUT F IRST
  16     *                       CONFER RING WITH  THE CPRS D EVELOPMENT  TEAM ABOU T POSSIBLE
  17     *                       RAMIFI CATIONS WI TH DESCEND ANT FRAMES .
  18     *
  19     ======== ========== ========== ========== ========== ========== ========== ========== ==
  20   }
  21  
  22   interface
  23  
  24   uses
  25     Winapi.W indows,
  26     Winapi.M essages,
  27     System.S ysUtils,
  28     System.V ariants,
  29     System.C lasses,
  30     System.U ITypes,
  31     System.I mageList,
  32     Vcl.Grap hics,
  33     Vcl.Cont rols,
  34     Vcl.Form s,
  35     Vcl.Dial ogs,
  36     Vcl.Menu s,
  37     Vcl.StdC trls,
  38     Vcl.ExtC trls,
  39     Vcl.Butt ons,
  40     Vcl.ImgL ist,
  41     iCoverSh eetIntf,
  42     iGridPan elIntf;
  43  
  44   type
  45     TfraGrid PanelFrame  = class(T Frame, IGr idPanelCon trol, IGri dPanelFram e, ICPRS50 8)
  46       pnlMai n: TPanel;
  47       pnlHea der: TPane l;
  48       lblTit le: TLabel ;
  49       pnlWor kspace: TP anel;
  50       pmn: T PopupMenu;
  51       pmnExp andCollaps e: TMenuIt em;
  52       pmnRef resh: TMen uItem;
  53       pmnCus tomize: TM enuItem;
  54       pmnSho wError: TM enuItem;
  55       sbtnEx pandCollap se: TSpeed Button;
  56       sbtnRe fresh: TSp eedButton;
  57       pnlVer tHeader: T Panel;
  58       img: T Image;
  59     private
  60       fGridP anelDispla y: IGridPa nelDisplay ;
  61       fColla psed: bool ean;
  62  
  63       fAllow Collapse:  TGridPanel Collapse;
  64       fAllow Refresh: b oolean;
  65       fAllow Customize:  boolean;
  66  
  67       fLoadE rror: bool ean;
  68       fLoadE rrorMessag e: string;
  69  
  70       fScree nReaderAct ive: boole an;
  71  
  72       { Prev ents auto  free when  RefCount =  0 }
  73       functi on _AddRef : integer;  stdcall;
  74       functi on _Releas e: integer ; stdcall;
  75     protecte d
  76       { Gett ers and Se tters }
  77       functi on getAllo wCollapse:  TGridPane lCollapse;  virtual;
  78       functi on getAllo wCustomize : boolean;  virtual;
  79       functi on getAllo wRefresh:  boolean; v irtual;
  80       functi on getBack groundColo r: TColor;  virtual;  final;
  81       functi on getColl apsed: boo lean; virt ual;
  82       functi on getGrid PanelDispl ay: IGridP anelDispla y; virtual ; final;
  83       functi on getTitl eFontColor : TColor;  virtual; f inal;
  84       functi on getTitl eFontBold:  boolean;  virtual; f inal;
  85       functi on getTitl e: string;  virtual;
  86       functi on getLoad Error: boo lean;
  87       functi on getLoad ErrorMessa ge: string ;
  88  
  89       proced ure setAll owCollapse (const aVa lue: TGrid PanelColla pse); virt ual;
  90       proced ure setAll owCustomiz e(const aV alue: bool ean); virt ual;
  91       proced ure setAll owRefresh( const aVal ue: boolea n); virtua l;
  92       proced ure setBac kgroundCol or(const a Value: TCo lor); virt ual; final ;
  93       proced ure setGri dPanelDisp lay(const  aValue: IG ridPanelDi splay); vi rtual; fin al;
  94       proced ure setTit leFontColo r(const aV alue: TCol or); virtu al; final;
  95       proced ure setTit leFontBold (const aVa lue: boole an); virtu al; final;
  96       proced ure setTit le(const a Value: str ing); virt ual;
  97  
  98       { ICPR S508 imple mentation  events }
  99       proced ure OnFocu sFirstCont rol(Sender : TObject) ; virtual;
  100       proced ure OnSetF ontSize(Se nder: TObj ect; aNewS ize: integ er); virtu al;
  101       proced ure OnSetS creenReade rStatus(Se nder: TObj ect; aActi ve: boolea n); virtua l;
  102  
  103       { Comp onent even ts }
  104       proced ure OnExpa ndCollapse (Sender: T Object); v irtual;
  105       proced ure OnCust omizeDispl ay(Sender:  TObject);  virtual;
  106       proced ure OnLoad Error(Send er: TObjec t; E: Exce ption); vi rtual;
  107       proced ure OnPopu pMenu(Send er: TObjec t); virtua l;
  108       proced ure OnPopu pMenuInit( Sender: TO bject); vi rtual;
  109       proced ure OnPopu pMenuFree( Sender: TO bject); vi rtual;
  110       proced ure OnRefr eshDisplay (Sender: T Object); v irtual;
  111       proced ure OnRefr eshVertica lTitle(Sen der: TObje ct); virtu al;
  112       proced ure OnShow Error(Send er: TObjec t); virtua l;
  113  
  114       { Comp onent meth ods }
  115       proced ure ClearL oadError;
  116     public
  117       { Publ ic declara tions }
  118       constr uctor Crea te(aOwner:  TComponen t); overri de;
  119       destru ctor Destr oy; overri de;
  120     end;
  121  
  122   implementa tion
  123  
  124   {$R *.dfm}
  125  
  126   { TfraGrid PanelFrame  }
  127  
  128   const
  129     IMG_COLL APSE = 'MG RIDPANELFR AME_COLLAP SE';
  130     IMG_EXPA ND   = 'MG RIDPANELFR AME_EXPAND ';
  131     IMG_REFR ESH  = 'MG RIDPANELFR AME_REFRES H';
  132     IMG_DELE TE   = 'MG RIDPANELFR AME_DELETE ';
  133  
  134   constructo r TfraGrid PanelFrame .Create(aO wner: TCom ponent);
  135   begin
  136     inherite d Create(a Owner);
  137     name :=  'fra' + Ne wGUID;
  138     fCollaps ed := Fals e;
  139     fAllowCo llapse :=  gpcNone;
  140     fAllowRe fresh := F alse;
  141     fAllowCu stomize :=  False;
  142  
  143     sbtnExpa ndCollapse .OnClick : = OnExpand Collapse;
  144     sbtnExpa ndCollapse .Visible : = fAllowCo llapse in  [gpcRow, g pcColumn];
  145     sbtnExpa ndCollapse .Glyph.Loa dFromResou rceName(HI nstance, I MG_COLLAPS E);
  146  
  147     sbtnRefr esh.OnClic k := OnRef reshDispla y;
  148     sbtnRefr esh.Visibl e := fAllo wRefresh;
  149     sbtnRefr esh.Glyph. LoadFromRe sourceName (HInstance , IMG_REFR ESH);
  150  
  151     { Defaul t settings  according  to the cu rrent Wind ows Pallet  - SHOULD  NOT BE CHA NGED HERE,  EVER!!!!  }
  152     pnlMain. Color := c lActiveCap tion;
  153     lblTitle .Font.Colo r := clCap tionText;
  154     lblTitle .Font.Styl e := [fsBo ld];
  155  
  156     { Call t his so tha t descenda nt panels  can custom ize the me nu if need ed }
  157     OnPopupM enuInit(Se lf);
  158   end;
  159  
  160   destructor  TfraGridP anelFrame. Destroy;
  161   begin
  162     OnPopupM enuFree(Se lf);
  163     inherite d;
  164   end;
  165  
  166   function T fraGridPan elFrame._A ddRef: int eger;
  167   begin
  168     Result : = -1;
  169   end;
  170  
  171   function T fraGridPan elFrame._R elease: in teger;
  172   begin
  173     Result : = -1;
  174   end;
  175  
  176   procedure  TfraGridPa nelFrame.C learLoadEr ror;
  177   begin
  178     pmnShowE rror.Visib le := Fals e;
  179     fLoadErr or := Fals e;
  180     fLoadErr orMessage  := '';
  181   end;
  182  
  183   procedure  TfraGridPa nelFrame.O nLoadError (Sender: T Object; E:  Exception );
  184   begin
  185     pmnShowE rror.Visib le := True ;
  186     fLoadErr or := True ;
  187     fLoadErr orMessage  := Format( 'LoadError : [%s] - % s', [Sende r.ClassNam e, E.Messa ge]);
  188   end;
  189  
  190   procedure  TfraGridPa nelFrame.O nCustomize Display(Se nder: TObj ect);
  191   begin
  192     { Virtua l method f or the des cendants t o implemen t if neede d }
  193   end;
  194  
  195   procedure  TfraGridPa nelFrame.O nExpandCol lapse(Send er: TObjec t);
  196   var
  197     aRow: in teger;
  198     aCol: in teger;
  199   begin
  200     try
  201       fColla psed := no t fCollaps ed;
  202  
  203       { Find  out where  we are on  the grid  }
  204       fGridP anelDispla y.FindCont rol(Self,  aCol, aRow );
  205  
  206       case f AllowColla pse of
  207         gpcR ow:
  208           if  fCollapse d then
  209              begin
  210                pnlWorks pace.Hide;
  211                sbtnRefr esh.Hide;
  212                sbtnExpa ndCollapse .Glyph.Loa dFromResou rceName(HI nstance, I MG_EXPAND) ;
  213                pnlVertH eader.TabS top := fSc reenReader Active;
  214                fGridPan elDisplay. CollapseRo w(aRow)
  215              end
  216           el se
  217              begin
  218                fGridPan elDisplay. ExpandRow( aRow);
  219                pnlVertH eader.TabS top := fal se;
  220                sbtnExpa ndCollapse .Glyph.Loa dFromResou rceName(HI nstance, I MG_COLLAPS E);
  221                if fAllo wRefresh t hen
  222                  sbtnRe fresh.Show ;
  223                pnlWorks pace.Show;
  224              end;
  225         gpcC olumn:
  226           if  fCollapse d then
  227              begin
  228                pnlWorks pace.Hide;
  229                sbtnRefr esh.Hide;
  230                //img.Vi sible := T rue;
  231                pnlVertH eader.Visi ble := Tru e;
  232                OnRefres hVerticalT itle(Sende r);
  233                sbtnExpa ndCollapse .Glyph.Loa dFromResou rceName(HI nstance, I MG_EXPAND) ;
  234                pnlVertH eader.TabS top := fSc reenReader Active;
  235                fGridPan elDisplay. CollapseCo lumn(aCol) ;
  236              end
  237           el se
  238              begin
  239                fGridPan elDisplay. ExpandColu mn(aCol);
  240                pnlVertH eader.TabS top := fal se;
  241                sbtnExpa ndCollapse .Glyph.Loa dFromResou rceName(HI nstance, I MG_COLLAPS E);
  242                if fAllo wRefresh t hen
  243                  sbtnRe fresh.Show ;
  244                pnlWorks pace.Show;
  245                //img.Vi sible := F alse;
  246                pnlVertH eader.Visi ble := fal se;
  247              end;
  248       end;
  249     except
  250       ShowMe ssage('Err or in Expa ndCollapse Click meth od.');
  251     end;
  252   end;
  253  
  254   procedure  TfraGridPa nelFrame.O nPopupMenu (Sender: T Object);
  255   begin
  256     if fColl apsed then
  257       pmnExp andCollaps e.Caption  := 'Expand '
  258     else
  259       pmnExp andCollaps e.Caption  := 'Collap se';
  260  
  261     pmnExpan dCollapse. Visible :=  fAllowCol lapse in [ gpcRow, gp cColumn];
  262     pmnRefre sh.Visible  := fAllow Refresh;
  263     pmnCusto mize.Visib le := fAll owCustomiz e;
  264     pmnShowE rror.Visib le := fLoa dError;
  265   end;
  266  
  267   procedure  TfraGridPa nelFrame.O nPopupMenu Free(Sende r: TObject );
  268   begin
  269     // Nothi ng needed  here, the  menu items  are all o wned prope rly by the  frame.
  270   end;
  271  
  272   procedure  TfraGridPa nelFrame.O nPopupMenu Init(Sende r: TObject );
  273   begin
  274     pmnExpan dCollapse. OnClick :=  OnExpandC ollapse;
  275     pmnExpan dCollapse. Visible :=  fAllowCol lapse in [ gpcRow, gp cColumn];
  276  
  277     pmnRefre sh.OnClick  := OnRefr eshDisplay ;
  278     pmnRefre sh.Visible  := fAllow Refresh;
  279  
  280     pmnCusto mize.OnCli ck := OnCu stomizeDis play;
  281     pmnCusto mize.Visib le := fAll owCustomiz e;
  282  
  283     pmnShowE rror.OnCli ck := OnSh owError;
  284     pmnShowE rror.Visib le := Fals e;
  285  
  286     pmn.OnPo pup := OnP opupMenu;
  287   end;
  288  
  289   procedure  TfraGridPa nelFrame.O nRefreshDi splay(Send er: TObjec t);
  290   begin
  291     { Virtua l method f or the des cendants t o implemen t if neede d }
  292   end;
  293  
  294   procedure  TfraGridPa nelFrame.O nRefreshVe rticalTitl e(Sender:  TObject);
  295   var
  296     aStr: st ring;
  297     X: integ er;
  298     Y: integ er;
  299     H: integ er;
  300     i: integ er;
  301   begin
  302     if fColl apsed then
  303       begin
  304         img. Picture :=  nil;
  305         img. Canvas.Bru sh.Color : = pnlMain. Color;
  306         img. Canvas.Fil lRect(Rect (0, 0, img .Width, im g.Height)) ;
  307         img. Canvas.Fon t.Color :=  lblTitle. Font.Color ;
  308         img. Canvas.Fon t.Style :=  lblTitle. Font.Style ;
  309         Y :=  0;
  310         H :=  img.Canva s.TextHeig ht('|');
  311         for  i := 1 to  Length(lbl Title.Capt ion) do
  312           be gin
  313              aStr := Co py(lblTitl e.Caption,  i, 1);
  314              X := (img. Width - im g.Canvas.T extWidth(a Str)) div  2;
  315              img.Canvas .TextOut(X , Y, aStr) ;
  316              inc(Y, H);
  317              if Y > (im g.Height -  H) then
  318                Break;
  319           en d;
  320         img. Repaint;
  321       end;
  322   end;
  323  
  324   procedure  TfraGridPa nelFrame.O nFocusFirs tControl(S ender: TOb ject);
  325   begin
  326     pnlWorks pace.SetFo cus;
  327   end;
  328  
  329   procedure  TfraGridPa nelFrame.O nSetFontSi ze(Sender:  TObject;  aNewSize:  integer);
  330   var
  331     aCompone nt: TCompo nent;
  332     aCPRS508 : ICPRS508 ;
  333   begin
  334     Self.Fon t.Size :=  aNewSize;
  335     lblTitle .Font.Size  := aNewSi ze; { Bold ed so Pare ntFont = F alse :( }
  336     if lblTi tle.Canvas .TextHeigh t('|') > 2 5 then
  337       pnlHea der.Height  := lblTit le.Canvas. TextHeight ('|') + 10  { So the  big ole ti tle displa ys properl y }
  338     else
  339       pnlHea der.Height  := 25; {  As designe d! }
  340  
  341     { Now wa lk any oth er items t hat may be  ICPRS_508  implement ors }
  342     for aCom ponent in  Self do
  343       if Sup ports(aCom ponent, IC PRS508, aC PRS508) th en
  344         aCPR S508.OnSet FontSize(S elf, aNewS ize);
  345   end;
  346  
  347   procedure  TfraGridPa nelFrame.O nSetScreen ReaderStat us(Sender:  TObject;  aActive: b oolean);
  348   begin
  349     pnlWorks pace.TabSt op := aAct ive; { Let s the Scre enReader s top here a nd read th e caption  }
  350     fScreenR eaderActiv e := aActi ve;
  351   end;
  352  
  353   procedure  TfraGridPa nelFrame.O nShowError (Sender: T Object);
  354   begin
  355     if fLoad Error then
  356       ShowMe ssage(fLoa dErrorMess age)
  357     else
  358       ShowMe ssage('No  load error  message.' );
  359   end;
  360  
  361   function T fraGridPan elFrame.ge tLoadError : boolean;
  362   begin
  363     Result : = fLoadErr or;
  364   end;
  365  
  366   function T fraGridPan elFrame.ge tLoadError Message: s tring;
  367   begin
  368     Result : = fLoadErr orMessage;
  369   end;
  370  
  371   function T fraGridPan elFrame.ge tAllowColl apse: TGri dPanelColl apse;
  372   begin
  373     Result : = fAllowCo llapse;
  374   end;
  375  
  376   function T fraGridPan elFrame.ge tAllowCust omize: boo lean;
  377   begin
  378     Result : = fAllowCu stomize;
  379   end;
  380  
  381   function T fraGridPan elFrame.ge tAllowRefr esh: boole an;
  382   begin
  383     Result : = fAllowRe fresh;
  384   end;
  385  
  386   function T fraGridPan elFrame.ge tBackgroun dColor: TC olor;
  387   begin
  388     Result : = pnlMain. Color;
  389   end;
  390  
  391   function T fraGridPan elFrame.ge tCollapsed : boolean;
  392   begin
  393     Result : = fCollaps ed;
  394   end;
  395  
  396   function T fraGridPan elFrame.ge tGridPanel Display: I GridPanelD isplay;
  397   begin
  398     {
  399       When a  control i s added th rough the  AddControl  Method of  the ICPRS GridPanel
  400       if it  supports I CPRSGridPa nelFrame f CPRSGridPa nel will b r set to t he
  401       ICPRSG ridPanel t hat it is  added to.
  402     }
  403     if fGrid PanelDispl ay <> nil  then
  404       fGridP anelDispla y.QueryInt erface(IGr idPanelDis play, Resu lt)
  405     else
  406       Result  := nil;
  407   end;
  408  
  409   function T fraGridPan elFrame.ge tTitle: st ring;
  410   begin
  411     Result : = lblTitle .Caption;
  412   end;
  413  
  414   function T fraGridPan elFrame.ge tTitleFont Bold: bool ean;
  415   begin
  416     Result : = (fsBold  in lblTitl e.Font.Sty le);
  417   end;
  418  
  419   function T fraGridPan elFrame.ge tTitleFont Color: TCo lor;
  420   begin
  421     Result : = lblTitle .Font.Colo r;
  422   end;
  423  
  424   procedure  TfraGridPa nelFrame.s etAllowCol lapse(cons t aValue:  TGridPanel Collapse);
  425   begin
  426     fAllowCo llapse :=  aValue;
  427     case fAl lowCollaps e of
  428       gpcNon e:
  429         begi n
  430           sb tnExpandCo llapse.Vis ible := Fa lse;
  431           sb tnExpandCo llapse.Gly ph := nil;
  432         end;
  433       gpcRow :
  434         begi n
  435           if  fCollapse d then
  436              sbtnExpand Collapse.G lyph.LoadF romResourc eName(HIns tance, IMG _EXPAND)
  437           el se
  438              sbtnExpand Collapse.G lyph.LoadF romResourc eName(HIns tance, IMG _COLLAPSE) ;
  439           sb tnExpandCo llapse.Vis ible := Tr ue;
  440         end;
  441       gpcCol umn:
  442         begi n
  443           if  fCollapse d then
  444              sbtnExpand Collapse.G lyph.LoadF romResourc eName(HIns tance, IMG _EXPAND)
  445           el se
  446              sbtnExpand Collapse.G lyph.LoadF romResourc eName(HIns tance, IMG _COLLAPSE) ;
  447           sb tnExpandCo llapse.Vis ible := Tr ue;
  448         end;
  449     end;
  450   end;
  451  
  452   procedure  TfraGridPa nelFrame.s etAllowCus tomize(con st aValue:  boolean);
  453   begin
  454     fAllowCu stomize :=  aValue;
  455   end;
  456  
  457   procedure  TfraGridPa nelFrame.s etAllowRef resh(const  aValue: b oolean);
  458   begin
  459     fAllowRe fresh := a Value;
  460     sbtnRefr esh.Visibl e := fAllo wRefresh;
  461   end;
  462  
  463   procedure  TfraGridPa nelFrame.s etBackgrou ndColor(co nst aValue : TColor);
  464   begin
  465     pnlMain. Color := a Value;
  466   end;
  467  
  468   procedure  TfraGridPa nelFrame.s etGridPane lDisplay(c onst aValu e: IGridPa nelDisplay );
  469   begin
  470     if aValu e <> nil t hen
  471       aValue .QueryInte rface(IGri dPanelDisp lay, fGrid PanelDispl ay)
  472     else
  473       fGridP anelDispla y := nil;
  474   end;
  475  
  476   procedure  TfraGridPa nelFrame.s etTitle(co nst aValue : string);
  477   begin
  478     lblTitle .Caption : = aValue;
  479     {
  480       Set pn lWorkspace .Caption a s the lblT itle.Capti on so when
  481       Screen Reader tap s in it wi ll have so mething to  say.
  482     }
  483     pnlWorks pace.Capti on := aVal ue;
  484     pnlVertH eader.Capt ion := aVa lue + ' mi nimized';
  485   end;
  486  
  487   procedure  TfraGridPa nelFrame.s etTitleFon tBold(cons t aValue:  boolean);
  488   begin
  489     if aValu e and not( fsBold in  lblTitle.F ont.Style)  then
  490       lblTit le.Font.St yle := lbl Title.Font .Style + [ fsBold]
  491     else
  492       lblTit le.Font.St yle := lbl Title.Font .Style - [ fsBold];
  493   end;
  494  
  495   procedure  TfraGridPa nelFrame.s etTitleFon tColor(con st aValue:  TColor);
  496   begin
  497     lblTitle .Font.Colo r := aValu e;
  498   end;
  499  
  500   end.