Added wxHelpControllerHelpProvider, added DisplayContextPopup, DisplayTextPopup
to wxHelpControllerBase and wxCHMHelpController; updated sample git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@8339 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -102,6 +102,47 @@ bool wxCHMHelpController::DisplaySection(int section)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
bool wxCHMHelpController::DisplayContextPopup(int contextId)
|
||||
{
|
||||
if (m_helpFile.IsEmpty()) return FALSE;
|
||||
|
||||
wxString str = GetValidFilename(m_helpFile);
|
||||
|
||||
// TODO: what should this be?
|
||||
//HtmlHelp(GetSuitableHWND(), (const wxChar*) str, HH_HELP_CONTEXT, (DWORD)contextId);
|
||||
HH_POPUP popup;
|
||||
popup.cbStruct = sizeof(popup);
|
||||
popup.hinst = (HINSTANCE) wxGetInstance();
|
||||
popup.idString = contextId ;
|
||||
|
||||
GetCursorPos(& popup.pt);
|
||||
popup.clrForeground = -1;
|
||||
popup.clrBackground = -1;
|
||||
popup.rcMargins.top = popup.rcMargins.left = popup.rcMargins.right = popup.rcMargins.bottom = -1;
|
||||
popup.pszFont = NULL;
|
||||
popup.pszText = NULL;
|
||||
|
||||
HtmlHelp(GetSuitableHWND(), (const wxChar*) str, HH_DISPLAY_TEXT_POPUP, (DWORD) & popup);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
bool wxCHMHelpController::DisplayTextPopup(const wxString& text, const wxPoint& pos)
|
||||
{
|
||||
HH_POPUP popup;
|
||||
popup.cbStruct = sizeof(popup);
|
||||
popup.hinst = (HINSTANCE) wxGetInstance();
|
||||
popup.idString = 0 ;
|
||||
popup.pt.x = pos.x; popup.pt.y = pos.y;
|
||||
popup.clrForeground = -1;
|
||||
popup.clrBackground = -1;
|
||||
popup.rcMargins.top = popup.rcMargins.left = popup.rcMargins.right = popup.rcMargins.bottom = -1;
|
||||
popup.pszFont = NULL;
|
||||
popup.pszText = (const wxChar*) text;
|
||||
|
||||
HtmlHelp(GetSuitableHWND(), NULL, HH_DISPLAY_TEXT_POPUP, (DWORD) & popup);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
bool wxCHMHelpController::DisplayBlock(long block)
|
||||
{
|
||||
return DisplaySection(block);
|
||||
|
Reference in New Issue
Block a user