Beispiel #1
0
static void InitNotepad(void) {
  page=0;
  DrawListIndex=0;
  aTextLine.clear();

  nLists=0;
  for (int i=0; i<MAXNOTES; i++) {
	ChecklistText[i]=(TCHAR *)NULL;
	ChecklistTitle[i]=(TCHAR *)NULL;
  }
}
Beispiel #2
0
static void InitNotepad(void) {
  page=0;
  wf=(WndForm *)NULL;
  wDetails=(WndListFrame *)NULL;
  wDetailsEntry = (WndOwnerDrawFrame *)NULL;
  DrawListIndex=0;
  aTextLine.clear();
  
  nLists=0;
  for (int i=0; i<MAXNOTES; i++) {
	ChecklistText[i]=(TCHAR *)NULL;
	ChecklistTitle[i]=(TCHAR *)NULL;
  }
}
Beispiel #3
0
void dlgHelpShowModal(const TCHAR* Caption, const TCHAR* HelpText) {
  if (!Caption || !HelpText) {
    return;
  }
  InitHelp();

  wf = dlgLoadFromXML(CallBackTable, 
                        ScreenLandscape ? TEXT("dlgHelp_L.xml") : TEXT("dlgHelp_P.xml"),
                        ScreenLandscape ? IDR_XML_HELP_L : IDR_XML_HELP_P);

  LKASSERT(wf);
  if (!wf) goto _getout;

  TCHAR fullcaption[100];
  _stprintf(fullcaption,TEXT("%s: %s"), gettext(TEXT("_@M336_")), Caption); // Help
  wf->SetCaption(fullcaption);

  wHelp = (WndListFrame*)wf->FindByName(TEXT("frmDetails"));
  wHelpEntry = (WndOwnerDrawFrame *)NULL;
  DrawListIndex=0;

  LKASSERT(wHelp!=NULL);
  if (!wHelp) goto _getout;

  wHelp->SetBorderKind(BORDERLEFT);
  
  wHelpEntry = (WndOwnerDrawFrame*)wf->FindByName(TEXT("frmDetailsEntry"));
  LKASSERT(wHelpEntry);
  if (!wHelpEntry) goto _getout;
  wHelpEntry->SetCanFocus(true);

  {
    LKWindowSurface Surface(*wHelpEntry);
    Surface.SelectObject(wHelpEntry->GetFont());
    aTextLine.update(Surface, wHelpEntry->GetWidth(), LKgethelptext(HelpText));
  }

  wHelp->ResetList();
  wHelp->Redraw();
  wf->ShowModal();
  delete wf;
  
  aTextLine.clear();
  

_getout:
  wf = NULL;

}
Beispiel #4
0
// checklistmode: 0=notepad 1=logbook 2=...
void dlgChecklistShowModal(short checklistmode){

  InitNotepad();
  LoadChecklist(checklistmode); // check if loaded really something

  wf = dlgLoadFromXML(CallBackTable, 
                        ScreenLandscape ? TEXT("dlgChecklist_L.xml") : TEXT("dlgChecklist_P.xml"), 
                        ScreenLandscape ? IDR_XML_CHECKLIST_L : IDR_XML_CHECKLIST_P);

  aTextLine.clear();

  if (!wf) goto deinit;

  wf->SetKeyDownNotify(FormKeyDown);

  ((WndButton *)wf->FindByName(TEXT("cmdClose")))->SetOnClickNotify(OnCloseClicked);

  wDetails = (WndListFrame*)wf->FindByName(TEXT("frmDetails"));
  //ASSERT(wDetails!=NULL);
  if (wDetails==NULL) {
	StartupStore(_T("..... NOTEPAD ERROR NULL frmDetails!\n"));
	goto deinit;
  }
  wDetails->SetBorderKind(BORDERLEFT);

  wDetailsEntry = (WndOwnerDrawFrame*)wf->FindByName(TEXT("frmDetailsEntry"));
  //ASSERT(wDetailsEntry!=NULL);
  if (wDetailsEntry==NULL) {
	StartupStore(_T("..... NOTEPAD ERROR NULL frmDetailsEntry!\n"));
	goto deinit;
  }
  wDetailsEntry->SetCanFocus(true);

  page = 0;
  NextPage(0);

  wf->ShowModal();

  delete wf;
  wf = NULL;

deinit:

  DeinitNotepad();
  return;

}