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

Method GetFont

sourcecommon/savepar.cpp:269–305  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

267}
268//---------------------------------------------------------------------------
269void TSaveParams::GetFont(AnsiString Section, AnsiString Name, TFont* Font)
270{
271 Variant v;
272 int StInt;
273 TFontStyles St;
274
275 v = Get(Section, Name + "_Name");
276 if(!v.IsEmpty()) Font->Name = v;
277
278 v = Get(Section, Name + "_Charset");
279 if(!v.IsEmpty()) Font->Charset = v;
280
281 v = Get(Section, Name + "_Size");
282 if(!v.IsEmpty()) Font->Size = v;
283
284 v = Get(Section, Name + "_Color");
285 if(!v.IsEmpty())
286 {
287 int cl = v;
288 Font->Color = TColor(cl);
289 }
290
291 v = Get(Section, Name + "_Style");
292 if(!v.IsEmpty())
293 {
294 try
295 {
296 StInt = v;
297 }
298 catch(...)
299 {
300 StInt = 0;
301 }
302 memcpy(&St, &StInt, 1);
303 Font->Style = St;
304 }
305}
306//---------------------------------------------------------------------------
307TSaveParams & TSaveParams::operator << (TForm * p) { SetVcl(p); return *this; }
308TSaveParams & TSaveParams::operator >> (TForm * p) { GetVcl(p); return *this; }

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected