19. EPMO Open Source Coordination Office Redaction File Detail Report

Produced by Araxis Merge on 2/17/2017 12:43:22 PM Central Standard 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.

19.1 Files compared

# Location File Last Modified
1 CPRS_V32_T20_cif.zip\OR_30_405V20_SRC.zip\CPRS-chart\Cover Sheet mGridPanelFrame.pas Thu Dec 15 14:28:30 2016 UTC
2 CPRS_V32_T20_cif.zip\OR_30_405V20_SRC.zip\CPRS-chart\Cover Sheet mGridPanelFrame.pas Fri Feb 17 17:19:10 2017 UTC

19.2 Comparison summary

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

19.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

19.4 Active regular expressions

No regular expressions were active.

19.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     Vcl.Grap hics,
  32     Vcl.Cont rols,
  33     Vcl.Form s,
  34     Vcl.Dial ogs,
  35     Vcl.Menu s,
  36     Vcl.StdC trls,
  37     Vcl.ExtC trls,
  38     Vcl.Butt ons,
  39     Vcl.ImgL ist,
  40     iCoverSh eetIntf,
  41     iGridPan elIntf;
  42  
  43   type
  44     TfraGrid PanelFrame  = class(T Frame, IGr idPanelCon trol, IGri dPanelFram e, ICPRS50 8)
  45       pnlMai n: TPanel;
  46       pnlHea der: TPane l;
  47       lblTit le: TLabel ;
  48       pnlWor kspace: TP anel;
  49       pmn: T PopupMenu;
  50       pmnExp andCollaps e: TMenuIt em;
  51       pmnRef resh: TMen uItem;
  52       sbtnEx pandCollap se: TSpeed Button;
  53       sbtnRe fresh: TSp eedButton;
  54       img: T Image;
  55       imgLst : TImageLi st;
  56       pmnCus tomize: TM enuItem;
  57     private
  58       fGridP anelDispla y: IGridPa nelDisplay ;
  59       fColla psed: bool ean;
  60  
  61       fAllow Collapse:  TGridPanel Collapse;
  62       fAllow Refresh: b oolean;
  63       fAllow Customize:  boolean;
  64  
  65       { Prev ents auto  free when  RefCount =  0 }
  66       functi on _AddRef : integer;  stdcall;
  67       functi on _Releas e: integer ; stdcall;
  68     protecte d
  69       { Gett ers and Se tters }
  70       functi on getAllo wCollapse:  TGridPane lCollapse;  virtual;
  71       functi on getAllo wCustomize : boolean;  virtual;
  72       functi on getAllo wRefresh:  boolean; v irtual;
  73       functi on getBack groundColo r: TColor;  virtual;  final;
  74       functi on getColl apsed: boo lean; virt ual;
  75       functi on getGrid PanelDispl ay: IGridP anelDispla y; virtual ; final;
  76       functi on getTitl eFontColor : TColor;  virtual; f inal;
  77       functi on getTitl eFontBold:  boolean;  virtual; f inal;
  78       functi on getTitl e: string;  virtual;
  79  
  80       proced ure setAll owCollapse (const aVa lue: TGrid PanelColla pse); virt ual;
  81       proced ure setAll owCustomiz e(const aV alue: bool ean); virt ual;
  82       proced ure setAll owRefresh( const aVal ue: boolea n); virtua l;
  83       proced ure setBac kgroundCol or(const a Value: TCo lor); virt ual; final ;
  84       proced ure setGri dPanelDisp lay(const  aValue: IG ridPanelDi splay); vi rtual; fin al;
  85       proced ure setTit leFontColo r(const aV alue: TCol or); virtu al; final;
  86       proced ure setTit leFontBold (const aVa lue: boole an); virtu al; final;
  87       proced ure setTit le(const a Value: str ing); virt ual;
  88  
  89       { ICPR S508 imple mentation  events }
  90       proced ure OnFocu sFirstCont rol(Sender : TObject) ; virtual;
  91       proced ure OnSetF ontSize(Se nder: TObj ect; aNewS ize: integ er); virtu al;
  92       proced ure OnSetS creenReade rStatus(Se nder: TObj ect; aActi ve: boolea n); virtua l;
  93  
  94       { Comp onent even ts }
  95       proced ure OnExpa ndCollapse (Sender: T Object); v irtual;
  96       proced ure OnCust omizeDispl ay(Sender:  TObject);  virtual;
  97       proced ure OnPopu pMenu(Send er: TObjec t); virtua l;
  98       proced ure OnPopu pMenuInit( Sender: TO bject); vi rtual;
  99       proced ure OnPopu pMenuFree( Sender: TO bject); vi rtual;
  100       proced ure OnRefr eshDisplay (Sender: T Object); v irtual;
  101       proced ure OnRefr eshVertica lTitle(Sen der: TObje ct); virtu al;
  102     public
  103       { Publ ic declara tions }
  104       constr uctor Crea te(aOwner:  TComponen t); overri de;
  105       destru ctor Destr oy; overri de;
  106     end;
  107  
  108   implementa tion
  109  
  110   {$R *.dfm}
  111  
  112   { TfraGrid PanelFrame  }
  113  
  114   const
  115     IMG_COLL APSE = 0;
  116     IMG_EXPA ND = 1;
  117  
  118   constructo r TfraGrid PanelFrame .Create(aO wner: TCom ponent);
  119   begin
  120     inherite d Create(a Owner);
  121     name :=  'fra' + Ne wGUID;
  122     fCollaps ed := Fals e;
  123     fAllowCo llapse :=  gpcNone;
  124     fAllowRe fresh := F alse;
  125     fAllowCu stomize :=  False;
  126  
  127     sbtnExpa ndCollapse .OnClick : = OnExpand Collapse;
  128     sbtnExpa ndCollapse .Visible : = fAllowCo llapse in  [gpcRow, g pcColumn];
  129  
  130     sbtnRefr esh.OnClic k := OnRef reshDispla y;
  131     sbtnRefr esh.Visibl e := fAllo wRefresh;
  132  
  133     { Defaul t settings  according  to the cu rrent Wind ows Pallet  - SHOULD  NOT BE CHA NGED HERE,  EVER!!!!  }
  134     pnlMain. Color := c lActiveCap tion;
  135     lblTitle .Font.Colo r := clCap tionText;
  136     lblTitle .Font.Styl e := [fsBo ld];
  137  
  138     { Call t his so tha t descenda nt panels  can custom ize the me nu if need ed }
  139     OnPopupM enuInit(Se lf);
  140   end;
  141  
  142   destructor  TfraGridP anelFrame. Destroy;
  143   begin
  144     OnPopupM enuFree(Se lf);
  145     inherite d;
  146   end;
  147  
  148   function T fraGridPan elFrame._A ddRef: int eger;
  149   begin
  150     Result : = -1;
  151   end;
  152  
  153   function T fraGridPan elFrame._R elease: in teger;
  154   begin
  155     Result : = -1;
  156   end;
  157  
  158   procedure  TfraGridPa nelFrame.O nCustomize Display(Se nder: TObj ect);
  159   begin
  160     { Virtua l method f or the des cendants t o implemen t if neede d }
  161   end;
  162  
  163   procedure  TfraGridPa nelFrame.O nExpandCol lapse(Send er: TObjec t);
  164   var
  165     aRow: in teger;
  166     aCol: in teger;
  167   begin
  168     try
  169       fColla psed := no t fCollaps ed;
  170  
  171       { Find  out where  we are on  the grid  }
  172       fGridP anelDispla y.FindCont rol(Self,  aCol, aRow );
  173  
  174       case f AllowColla pse of
  175         gpcR ow:
  176           if  fCollapse d then
  177              begin
  178                pnlWorks pace.Hide;
  179                sbtnRefr esh.Hide;
  180                sbtnExpa ndCollapse .Glyph :=  nil;
  181                imgLst.G etBitmap(I MG_EXPAND,  sbtnExpan dCollapse. Glyph);
  182                fGridPan elDisplay. CollapseRo w(aRow)
  183              end
  184           el se
  185              begin
  186                fGridPan elDisplay. ExpandRow( aRow);
  187                sbtnExpa ndCollapse .Glyph :=  nil;
  188                imgLst.G etBitmap(I MG_COLLAPS E, sbtnExp andCollaps e.Glyph);
  189                if fAllo wRefresh t hen
  190                  sbtnRe fresh.Show ;
  191                pnlWorks pace.Show;
  192              end;
  193         gpcC olumn:
  194           if  fCollapse d then
  195              begin
  196                pnlWorks pace.Hide;
  197                sbtnRefr esh.Hide;
  198                img.Visi ble := Tru e;
  199                OnRefres hVerticalT itle(Sende r);
  200                sbtnExpa ndCollapse .Glyph :=  nil;
  201                imgLst.G etBitmap(I MG_EXPAND,  sbtnExpan dCollapse. Glyph);
  202                fGridPan elDisplay. CollapseCo lumn(aCol) ;
  203              end
  204           el se
  205              begin
  206                fGridPan elDisplay. ExpandColu mn(aCol);
  207                sbtnExpa ndCollapse .Glyph :=  nil;
  208                imgLst.G etBitmap(I MG_COLLAPS E, sbtnExp andCollaps e.Glyph);
  209                if fAllo wRefresh t hen
  210                  sbtnRe fresh.Show ;
  211                pnlWorks pace.Show;
  212                img.Visi ble := Fal se;
  213              end;
  214       end;
  215     except
  216       ShowMe ssage('Err or in Expa ndCollapse Click meth od.');
  217     end;
  218   end;
  219  
  220   procedure  TfraGridPa nelFrame.O nPopupMenu (Sender: T Object);
  221   begin
  222     if fColl apsed then
  223       pmnExp andCollaps e.Caption  := 'Expand '
  224     else
  225       pmnExp andCollaps e.Caption  := 'Collap se';
  226  
  227     pmnExpan dCollapse. Visible :=  fAllowCol lapse in [ gpcRow, gp cColumn];
  228     pmnRefre sh.Visible  := fAllow Refresh;
  229     pmnCusto mize.Visib le := fAll owCustomiz e;
  230   end;
  231  
  232   procedure  TfraGridPa nelFrame.O nPopupMenu Free(Sende r: TObject );
  233   begin
  234     // Nothi ng needed  here, the  menu items  are all o wned prope rly by the  frame.
  235   end;
  236  
  237   procedure  TfraGridPa nelFrame.O nPopupMenu Init(Sende r: TObject );
  238   begin
  239     pmnExpan dCollapse. OnClick :=  OnExpandC ollapse;
  240     pmnExpan dCollapse. Visible :=  fAllowCol lapse in [ gpcRow, gp cColumn];
  241  
  242     pmnRefre sh.OnClick  := OnRefr eshDisplay ;
  243     pmnRefre sh.Visible  := fAllow Refresh;
  244  
  245     pmnCusto mize.OnCli ck := OnCu stomizeDis play;
  246     pmnCusto mize.Visib le := fAll owCustomiz e;
  247  
  248     pmn.OnPo pup := OnP opupMenu;
  249   end;
  250  
  251   procedure  TfraGridPa nelFrame.O nRefreshDi splay(Send er: TObjec t);
  252   begin
  253     { Virtua l method f or the des cendants t o implemen t if neede d }
  254   end;
  255  
  256   procedure  TfraGridPa nelFrame.O nRefreshVe rticalTitl e(Sender:  TObject);
  257   var
  258     aStr: st ring;
  259     X: integ er;
  260     Y: integ er;
  261     H: integ er;
  262     i: integ er;
  263   begin
  264     if fColl apsed then
  265       begin
  266         img. Picture :=  nil;
  267         img. Canvas.Bru sh.Color : = pnlMain. Color;
  268         img. Canvas.Fil lRect(Rect (0, 0, img .Width, im g.Height)) ;
  269         img. Canvas.Fon t.Color :=  lblTitle. Font.Color ;
  270         img. Canvas.Fon t.Style :=  lblTitle. Font.Style ;
  271         Y :=  0;
  272         H :=  img.Canva s.TextHeig ht('|');
  273         for  i := 1 to  Length(lbl Title.Capt ion) do
  274           be gin
  275              aStr := Co py(lblTitl e.Caption,  i, 1);
  276              X := (img. Width - im g.Canvas.T extWidth(a Str)) div  2;
  277              img.Canvas .TextOut(X , Y, aStr) ;
  278              inc(Y, H);
  279              if Y > (im g.Height -  H) then
  280                Break;
  281           en d;
  282         img. Repaint;
  283       end;
  284   end;
  285  
  286   procedure  TfraGridPa nelFrame.O nFocusFirs tControl(S ender: TOb ject);
  287   begin
  288     pnlWorks pace.SetFo cus;
  289   end;
  290  
  291   procedure  TfraGridPa nelFrame.O nSetFontSi ze(Sender:  TObject;  aNewSize:  integer);
  292   var
  293     aCompone nt: TCompo nent;
  294     aCPRS508 : ICPRS508 ;
  295   begin
  296     Self.Fon t.Size :=  aNewSize;
  297     lblTitle .Font.Size  := aNewSi ze; { Bold ed so Pare ntFont = F alse :( }
  298     if lblTi tle.Canvas .TextHeigh t('|') > 2 5 then
  299       pnlHea der.Height  := lblTit le.Canvas. TextHeight ('|') + 10  { So the  big ole ti tle displa ys properl y }
  300     else
  301       pnlHea der.Height  := 25; {  As designe d! }
  302  
  303     { Now wa lk any oth er items t hat may be  ICPRS_508  implement ors }
  304     for aCom ponent in  Self do
  305       if Sup ports(aCom ponent, IC PRS508, aC PRS508) th en
  306         aCPR S508.OnSet FontSize(S elf, aNewS ize);
  307   end;
  308  
  309   procedure  TfraGridPa nelFrame.O nSetScreen ReaderStat us(Sender:  TObject;  aActive: b oolean);
  310   begin
  311     pnlWorks pace.TabSt op := aAct ive; { Let s the Scre enReader s top here a nd read th e caption  }
  312   end;
  313  
  314   function T fraGridPan elFrame.ge tAllowColl apse: TGri dPanelColl apse;
  315   begin
  316     Result : = fAllowCo llapse;
  317   end;
  318  
  319   function T fraGridPan elFrame.ge tAllowCust omize: boo lean;
  320   begin
  321     Result : = fAllowCu stomize;
  322   end;
  323  
  324   function T fraGridPan elFrame.ge tAllowRefr esh: boole an;
  325   begin
  326     Result : = fAllowRe fresh;
  327   end;
  328  
  329   function T fraGridPan elFrame.ge tBackgroun dColor: TC olor;
  330   begin
  331     Result : = pnlMain. Color;
  332   end;
  333  
  334   function T fraGridPan elFrame.ge tCollapsed : boolean;
  335   begin
  336     Result : = fCollaps ed;
  337   end;
  338  
  339   function T fraGridPan elFrame.ge tGridPanel Display: I GridPanelD isplay;
  340   begin
  341     {
  342       When a  control i s added th rough the  AddControl  Method of  the ICPRS GridPanel
  343       if it  supports I CPRSGridPa nelFrame f CPRSGridPa nel will b r set to t he
  344       ICPRSG ridPanel t hat it is  added to.
  345     }
  346     if fGrid PanelDispl ay <> nil  then
  347       fGridP anelDispla y.QueryInt erface(IGr idPanelDis play, Resu lt)
  348     else
  349       Result  := nil;
  350   end;
  351  
  352   function T fraGridPan elFrame.ge tTitle: st ring;
  353   begin
  354     Result : = lblTitle .Caption;
  355   end;
  356  
  357   function T fraGridPan elFrame.ge tTitleFont Bold: bool ean;
  358   begin
  359     Result : = (fsBold  in lblTitl e.Font.Sty le);
  360   end;
  361  
  362   function T fraGridPan elFrame.ge tTitleFont Color: TCo lor;
  363   begin
  364     Result : = lblTitle .Font.Colo r;
  365   end;
  366  
  367   procedure  TfraGridPa nelFrame.s etAllowCol lapse(cons t aValue:  TGridPanel Collapse);
  368   begin
  369     fAllowCo llapse :=  aValue;
  370     case fAl lowCollaps e of
  371       gpcNon e:
  372         begi n
  373           sb tnExpandCo llapse.Vis ible := Fa lse;
  374           sb tnExpandCo llapse.Gly ph := nil;
  375         end;
  376       gpcRow :
  377         begi n
  378           if  fCollapse d then
  379              imgLst.Get Bitmap(IMG _EXPAND, s btnExpandC ollapse.Gl yph)
  380           el se
  381              imgLst.Get Bitmap(IMG _COLLAPSE,  sbtnExpan dCollapse. Glyph);
  382           sb tnExpandCo llapse.Vis ible := Tr ue;
  383         end;
  384       gpcCol umn:
  385         begi n
  386           if  fCollapse d then
  387              imgLst.Get Bitmap(IMG _EXPAND, s btnExpandC ollapse.Gl yph)
  388           el se
  389              imgLst.Get Bitmap(IMG _COLLAPSE,  sbtnExpan dCollapse. Glyph);
  390           sb tnExpandCo llapse.Vis ible := Tr ue;
  391         end;
  392     end;
  393   end;
  394  
  395   procedure  TfraGridPa nelFrame.s etAllowCus tomize(con st aValue:  boolean);
  396   begin
  397     fAllowCu stomize :=  aValue;
  398   end;
  399  
  400   procedure  TfraGridPa nelFrame.s etAllowRef resh(const  aValue: b oolean);
  401   begin
  402     fAllowRe fresh := a Value;
  403     sbtnRefr esh.Visibl e := fAllo wRefresh;
  404   end;
  405  
  406   procedure  TfraGridPa nelFrame.s etBackgrou ndColor(co nst aValue : TColor);
  407   begin
  408     pnlMain. Color := a Value;
  409   end;
  410  
  411   procedure  TfraGridPa nelFrame.s etGridPane lDisplay(c onst aValu e: IGridPa nelDisplay );
  412   begin
  413     if aValu e <> nil t hen
  414       aValue .QueryInte rface(IGri dPanelDisp lay, fGrid PanelDispl ay)
  415     else
  416       fGridP anelDispla y := nil;
  417   end;
  418  
  419   procedure  TfraGridPa nelFrame.s etTitle(co nst aValue : string);
  420   begin
  421     lblTitle .Caption : = aValue;
  422     { Set pn lWorkspace .Caption a s the lblT itle.Capti on so when  ScreenRea der taps i n it has s omething t o say. }
  423     pnlWorks pace.Capti on := aVal ue;
  424   end;
  425  
  426   procedure  TfraGridPa nelFrame.s etTitleFon tBold(cons t aValue:  boolean);
  427   begin
  428     if aValu e and not( fsBold in  lblTitle.F ont.Style)  then
  429       lblTit le.Font.St yle := lbl Title.Font .Style + [ fsBold]
  430     else
  431       lblTit le.Font.St yle := lbl Title.Font .Style - [ fsBold];
  432   end;
  433  
  434   procedure  TfraGridPa nelFrame.s etTitleFon tColor(con st aValue:  TColor);
  435   begin
  436     lblTitle .Font.Colo r := aValu e;
  437   end;
  438  
  439   end.