box method

void box(
  1. String caller
)

Using boxServe-class for everybody-to use box-shaped info.

Implementation

void box(String caller) {
  buf.writeln('con:box:start:  ');
  //  use: boxServe  OR  create own class here
  final int _sw = 194; //  default screen width, changed later =>
  _sw; //  To mark unUsed
  final int _rc = 47; //  row count
  //  ???  Keep matrix here on callers side all the time
  //  The default List constructor is not available, when NULL  safety is enabled
  //  howTo NULL List  OK:  .filled
  List<String> _conMatrix = List.filled(_rc, '');

  _conMatrix; //  Mark #unUsed

  String boxHeader = ':connector:box:';
  print('-->>-->>  $boxHeader  boxServe  start  -->>-->>--  ');
  List<String> infoL = [
    'Connector joins other object to spheres, like corporate, where they can work together and join messaging.',
    'Every :con:Scout:ed object comes with a #LANG info like: #say and placardM, and has access to :bind:bing:',
  ];

  //  devl:CORP  if change to: 150, it should be visible variable
  ///:BOX:WAS:  190, now  205
  boxServe.init(42, 198, '_'); //  rows, width or: 0 = use default 47, 195
  boxServe.construct(':con:box:', ':con:box: $caller');
  int r1 = 2; //  easy x-y pointing
  int r2 = 12;
  int r3 = 20;
  int r4 = 32;
  int m1 = 3;
  int m2 = 40;
  int m3 = 74;
  int m4 = 100;

  boxServe.aBox(r1 - 1, m2, 2, 106, infoL);

  boxServe.aHeader(3, m2, '*clause :');
  boxServe.aBox(3, m2 + 10, 1, 55, ['$clause']);

  boxServe.aHeader(4, m2, '*motto :');
  boxServe.aBox(4, m2 + 10, 1, 55, ['$motto']);

  boxServe.aHeader(r1, m1 + 6, '* connector  buf  *');
  boxServe.aBox(r1 + 1, m1, 39, 33, tl.bufToList(buf));

  boxServe.aHeader(6, m2, '* :con:phases: *');
  boxServe.aBox(7, m2 - 1, 5, 63, tl.mapToFineList(phaseM, 5, 57));

  boxServe.aBox(4, 125, 12, 20, tl.mapToFineList(equ.months, 3, 17));

  boxServe.aBox(4, 105, 13, 22, tl.mapToFineList(equ.twoWeeks, 4, 14));

  //boxServe.aHeader(r2, m4 + 4, ' *  conjoinM  * ');
  //  NoWork!??  Try absolute   boxServe.aHeader(r3 - 6, m2, ' *  conjoinM  * ');
  //  Try absolute address::
  boxServe.aHeader(13, 44, ' *  conJoinMember  * ');
  //boxServe.aBox(r2 + 1, m4 + 1, 6, 21, tl.mapToListO(joinM));
  boxServe.aBox(r3 - 6, m2, 12, 50, tl.mapToListO(joinM));

  //  boxServe.aBox(r3 - 7, m2, 12, 50, joinLog);
  boxServe.aBox(2, 150, 18, 38, joinLog);

  boxServe.aBox(r3 - 3, m4 - 5, 12, 50, inMsgL);

  //  devl:CORP  resource / samples add something

  boxServe.aHeader(30, 100, '*: con:say Map *');
  boxServe.aBox(31, 100, 9, 42, tl.mapToFineList(say, 8, 34));

  ///  devl:CORP  Get from joinM Just-joined-say map
  ///  Now using new #name field and parameter via con.join
  //  if (name  notIn joinM) blaa blaa blaa
  //  howTo NULL  Map OK
  Map<String, String> sayLatest = joinM['DartlangMission']!.say;
  //  Error:bug:  every object to not have say-map
  // Map<String, String> sayLatest = joinM[name].say;
  //  devl:CORP  use map joinM directly without copying it here

  boxServe.aHeader(30, 144, '*: Now: $name :say *');
  boxServe.aBox(31, 142, 9, 42, tl.mapToFineList(sayLatest, 8, 34));

  boxServe.aHeader(r4 - 1, m2 - 5, '     * workPole  *  ');
  boxServe.aBox(r4, m2, 6, 23, tl.mapToList(workPoleM));

  boxServe.aHeader(r4 - 1, m3, '     * answerPole *  ');
  boxServe.aBox(r4, m3, 6, 18, tl.mapToList(answerPoleM));

  boxServe.vertLine(r2 + 1, m2, 7); //  joinMember
  boxServe.vertLine(4, m4 + 6, 13); //  2-weeks
  boxServe.vertLine(r4, m2, 6); //   workPole
  boxServe.vertLine(2, 149, 28); //  Up-right edge

  boxServe.show(':con:', 'print', 1);
  boxServe.done(':con:');
}