MCPcopy Create free account
hub / github.com/MaxBelkov/visualsyslog / DrawGridDrawCell

Method DrawGridDrawCell

source/setup.cpp:369–397  ·  view source on GitHub ↗

---------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

367}
368//---------------------------------------------------------------------------
369void __fastcall TSetupForm::DrawGridDrawCell(TObject *Sender, int ACol,
370 int ARow, TRect &Rect, TGridDrawState State)
371{
372 TCanvas * c = ((TStringGrid *)Sender)->Canvas;
373 String s;
374
375 if( ARow==0 ) // Grid title
376 {
377 switch( ACol )
378 {
379 case 0: s = " File"; break;
380 case 1: s = " Rotation"; break;
381 }
382 }
383 else
384 {
385 TStorageFile * p = localSFL->Get(ARow-1);
386 if( p )
387 {
388 if( ACol == 0 )
389 s = String(" ") + p->GetDescription();
390 else if( ACol == 1 )
391 s = String(" ") + p->GetRotationDescription();
392 }
393 }
394 int x = Rect.Left + 2;
395 int y = Rect.Top + ((Rect.Bottom - Rect.Top - c->TextHeight(s)) / 2);
396 c->TextRect(Rect, x, y, s);
397}
398//---------------------------------------------------------------------------
399void __fastcall TSetupForm::OnFrameValuesChange(TObject *Sender)
400{

Callers

nothing calls this directly

Calls 3

GetMethod · 0.45
GetDescriptionMethod · 0.45

Tested by

no test coverage detected