void ShowHelp(wxWindow * parent) { InitHelp(parent); if (gHelp) gHelp->Display(_("Introduction")); }
void ShowHelp(wxWindow * parent, wxString topic) { InitHelp(parent); if (gHelp) gHelp->KeywordSearch(topic); }
void ShowHelpIndex(wxWindow * parent) { InitHelp(parent); if (gHelp) gHelp->DisplayIndex(); }
void ShowHelp(wxWindow * parent) { InitHelp(parent); if (gHelp) gHelp->Display("contents.htm"); }
/****************************************************************\ * Initialization routine *-------------------------------------------------------------- * * Name: Init() * * Purpose: Performs initialization functions. * * Usage: Called once before the message queue is queried. * * Method: * - starts processing thread * - registers all window classes * * Returns: * TRUE - initialization is successful * FALSE - initialization failed \****************************************************************/ BOOL Init(int argc, char *argv[]) { PTIB ptibDummy; PIB *ppibProcess; ULONG flCtlData; /* frame control data */ /* load application name from resource file */ if(!WinLoadString(hab, NULLHANDLE, IDS_APPNAME, MAXNAMEL, (PSZ)szAppName)) return FALSE; /* register the main client window class */ if(!WinRegisterClass(hab, (PSZ)szAppName, MainWndProc, CS_SIZEREDRAW | CS_CLIPCHILDREN, 0UL)) { return FALSE; } flCtlData = FCF_STANDARD | FCF_VERTSCROLL | FCF_HORZSCROLL; hwndMainFrame = WinCreateStdWindow(HWND_DESKTOP, WS_VISIBLE, &flCtlData, (PSZ)szAppName, (PSZ)NULL, WS_VISIBLE, NULLHANDLE, IDR_MAIN, &hwndMain); if (NULLHANDLE == hwndMainFrame) return FALSE; WinSetWindowText(hwndMainFrame, (PSZ)szAppName); if (DosGetInfoBlocks(&ptibDummy, &ppibProcess) || !(hqQ = InitQ((*ppibProcess).pib_ulpid, /* process that will send WM_CLOSE command */ hwndMainFrame))) /* window to post to */ return FALSE; if (argc > 1) { RESULTCODES resc; CHAR pszBuff[CCHMAXPATH]; if ((BOOL)DosExecPgm((PSZ)pszBuff, CCHMAXPATH, EXEC_ASYNC, NULL, NULL, &resc, argv[1])) { MessageBox(hwndMain, IDMSG_CANNOT_EXEC_CLIENT, MB_CUAWARNING | MB_OK, TRUE); } } InitHelp(); return TRUE; } /* Init() */
DWORD CHelpSystemComponent::OnTestHelpSystemDialog(DWORD size, void *param) { VERIFY_MESSAGE_SIZE(0, size); if (InitHelp()) { m_helpDialogWindow->PopupWindow(); } return MSG_HANDLED_PROCEED; }
void SearchHelp(wxWindow * parent) { InitHelp(parent); if (gHelp) { wxString key = wxGetTextFromUser(_("Search for?"), _("Search help for keyword"), "", parent); if (!key.IsEmpty()) gHelp->KeywordSearch(key); } }
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; }
DWORD CHelpSystemComponent::OnDisplayHelpTopic(DWORD size, void *param) { VERIFY_MESSAGE_SIZE(sizeof(DISPLAYHELPTOPICPARAMS), size); DISPLAYHELPTOPICPARAMS *dht = (DISPLAYHELPTOPICPARAMS*)param; if (InitHelp()) { const CHelpSystemCore::CChm * pchm = m_helpCore->FindChmByName(dht->chmName); if (pchm) { m_helpDialogWindow->DisplayTopic(*pchm, dht->topicPath.GetString()); } else { m_helpDialogWindow->DisplayResource(_T("chmnotfound.html")); } m_helpDialogWindow->PopupWindow(); } return MSG_HANDLED_PROCEED; }
void DUIInit( void ) { InitScreen(); CmdHistory = WndInitHistory(); SrchHistory = WndInitHistory(); InitToolBar(); InitMemWindow(); InitAboutMessage(); InitIOWindow(); InitMenus(); WndInit( LIT_DUI( The_WATCOM_Debugger ) ); _SwitchOff( SW_ERROR_STARTUP ); #if defined(__GUI__) TellWinHandle(); #endif if( WndMain != NULL ) WndSetIcon( WndMain, &MainIcon ); StartTimer(); InitHelp(); InitGadget(); InitPaint(); InitBrowse(); InitFont(); }
gui_help_instance GUIHelpInit( gui_window *wnd, char *file, char *title ) { return( InitHelp( wnd->hwnd, GUIMainHInst, title, file ) ); }