|
OWLNext 7.0
Borland's Object Windows Library for the modern age
|
THelpFileManager, which is designed to be a mix-in for TApplication, uses the global context table. More...
#include <owl/hlpmanag.h>
Public Member Functions | |
| THelpFileManager (const tstring &helpFileName) | |
| Constructor. | |
| virtual | ~THelpFileManager () |
| Deletes the allocated context table. | |
| virtual void | ActivateHelp (TWindow *, int helpFileContextId, uint hlpCmd=HELP_CONTEXT) |
| Called by EvHelp() to activate the help file with the help context ID. | |
| virtual void | DeactivateHelp () |
| Deactivates the help. | |
| void | SetHelpFile (const tstring &helpFileName) |
| Changes the name of the help file. | |
| tstring | GetHelpFile () const |
| Returns the name of the help file. | |
| bool | GetHelpContextFromControl (THelpContext &, int controlId, HWND ctrl) const |
| Returns true if a match for the control ID was found. | |
| bool | GetHelpContextFromMenu (THelpContext &, int menuId) const |
| Returns true if a match for the menu item ID was found. | |
| void | AddContextInfo (TWindow *, int helpId, int menuId, int controlId) |
| Adds an entry into the global context table. | |
| void | RemoveContextInfo (TWindow *) |
| Removes all the entries in the context table for the window. | |
| HWND | HtmlHelp (TWindow *, LPCTSTR lpszHelp, uint hlpCmd, DWORD_PTR data) |
| HWND | HtmlHelp (TWindow *w, const tstring &helpFile, uint hlpCmd, DWORD_PTR data) |
| void | TranslateWinToHTML (bool translate) |
| Public Member Functions inherited from owl::TEventHandler | |
| virtual bool | Find (TEventInfo &info, TEqualOperator op=0) |
| Searches the list of response table entries looking for a match. | |
| TResult | Dispatch (TEventInfo &info, TParam1, TParam2=0) |
| Takes the message data from TEventInfo's Msg data member and dispatches it to the correct event-handling function. | |
| TResult | DispatchMsg (TMsgId, uint id, TParam1, TParam2) |
| Search for the event given the message and it and dispatch to the event handler if found. | |
Public Attributes | |
| DECLARE_CASTABLE | |
Protected Types | |
| typedef TBaseList< THelpContext > | TContextList |
| typedef TBaseListIterator< THelpContext > | TContextListIterator |
Protected Member Functions | |
| virtual bool | ProcessHelpMsg (MSG &msg) |
| virtual void | SetHelpCursor () |
| void | EvHelp (const HELPINFO &) |
| Event handler for the WM_HELP message. | |
| void | EvHelpHit (const THelpHitInfo &) |
| void | CmContextHelp () |
| void | CeContextHelp (TCommandEnabler &ce) |
| void | CmWhatIsThis () |
| DECLARE_RESPONSE_TABLE (THelpFileManager) | |
| Protected Member Functions inherited from owl::TEventHandler | |
| bool | SearchEntries (const TGenericTableEntry *entries, TEventInfo &info, TEqualOperator op) |
| Low-level response table search function. | |
Protected Attributes | |
| bool | UseHTMLHelp |
| bool | WinToHTML |
| TContextList * | ContextTable |
| tstring | HelpFileName |
| TCursor * | HelpCursor |
| bool | ContextHelp |
| bool | HelpState |
| TPoint | LastHit |
| TWindow * | LastParent |
Additional Inherited Members | |
| Public Types inherited from owl::TEventHandler | |
| typedef bool(*) | TEqualOperator(const TGenericTableEntry &, const TEventInfo &) |
THelpFileManager, which is designed to be a mix-in for TApplication, uses the global context table.
THelpFileManager looks for the WM_HELP message and calls the help file with the associated context ID.
Definition at line 154 of file hlpmanag.h.
|
protected |
Definition at line 197 of file hlpmanag.h.
|
protected |
Definition at line 198 of file hlpmanag.h.
| owl::THelpFileManager::THelpFileManager | ( | const tstring & | helpFileName | ) |
Constructor.
Saves the name of the help file and creates the global context table.
Definition at line 90 of file hlpmanag.cpp.
References ContextHelp, ContextTable, HelpCursor, HelpState, LastParent, SetHelpFile(), UseHTMLHelp, and WinToHTML.
|
virtual |
Deletes the allocated context table.
Definition at line 106 of file hlpmanag.cpp.
References ContextTable, and HelpCursor.
|
virtual |
Called by EvHelp() to activate the help file with the help context ID.
Definition at line 116 of file hlpmanag.cpp.
References GetHelpFile(), owl::TApplication::GetMainWindow(), HelpState, HtmlHelp(), owl::ToBool(), TYPESAFE_DOWNCAST, UseHTMLHelp, and owl::TWindow::WinHelp().
| void owl::THelpFileManager::AddContextInfo | ( | TWindow * | window, |
| int | helpId, | ||
| int | menuId, | ||
| int | controlId ) |
Adds an entry into the global context table.
Definition at line 515 of file hlpmanag.cpp.
References owl::THelpContext::THelpContext(), owl::TBaseList< T >::Add(), and ContextTable.
|
protected |
Definition at line 272 of file hlpmanag.cpp.
References owl::TCommandEnabler::Enable().
|
protected |
Definition at line 262 of file hlpmanag.cpp.
References ContextHelp, and SetHelpCursor().
|
protected |
Definition at line 281 of file hlpmanag.cpp.
References owl::TWindow::ChildWindowFromPoint(), EvHelp(), owl::TGadgetList::GadgetFromPoint(), owl::TWindow::GetHandle(), owl::TGadget::GetId(), owl::GetWindowPtr(), LastHit, LastParent, PRECONDITION, owl::TWindow::ScreenToClient(), and TYPESAFE_DOWNCAST.
|
virtual |
Deactivates the help.
Definition at line 143 of file hlpmanag.cpp.
References GetHelpFile(), owl::TApplication::GetMainWindow(), HtmlHelp(), TYPESAFE_DOWNCAST, UseHTMLHelp, and owl::TWindow::WinHelp().
|
protected |
References THelpFileManager().
|
protected |
Event handler for the WM_HELP message.
Definition at line 324 of file hlpmanag.cpp.
References owl::TPoint::TPoint(), ActivateHelp(), owl::TWindow::ChildWithId(), GetHelpContextFromControl(), GetHelpContextFromMenu(), owl::THelpContext::GetHelpFileContextId(), owl::THelpContext::GetWindow(), owl::TWindow::GetWindowAttr(), LastHit, owl::TWindowAttr::X, and owl::TWindowAttr::Y.
|
inlineprotected |
Definition at line 327 of file hlpmanag.h.
References LastHit, LastParent, owl::THelpHitInfo::Point, and owl::THelpHitInfo::Window.
| bool owl::THelpFileManager::GetHelpContextFromControl | ( | THelpContext & | context, |
| int | controlId, | ||
| HWND | ctrl ) const |
Returns true if a match for the control ID was found.
Definition at line 442 of file hlpmanag.cpp.
References ContextTable, owl::THelpContext::GetWindow(), owl::IsIndirectHelpContext(), and owl::IsLastIndirectContext().
| bool owl::THelpFileManager::GetHelpContextFromMenu | ( | THelpContext & | context, |
| int | menuId ) const |
Returns true if a match for the menu item ID was found.
Definition at line 485 of file hlpmanag.cpp.
References ContextTable, owl::THelpContext::GetWindow(), owl::IsIndirectHelpContext(), and owl::IsLastIndirectContext().
|
inline |
Returns the name of the help file.
Definition at line 318 of file hlpmanag.h.
References HelpFileName.
| HWND owl::THelpFileManager::HtmlHelp | ( | TWindow * | wnd, |
| LPCTSTR | lpszHelp, | ||
| uint | hlpCmd, | ||
| DWORD_PTR | data ) |
Definition at line 164 of file hlpmanag.cpp.
References owl::TPoint::TPoint(), owl::TDllLoader< THtmlHelpDll >::Dll(), owl::TWindow::GetHandle(), owl::GetWindowPtr(), HtmlHelp(), owl::THtmlHelpDll::HtmlHelp, owl::TDllLoader< THtmlHelpDll >::IsAvailable(), LastHit, and WinToHTML.
|
inline |
Definition at line 187 of file hlpmanag.h.
References HtmlHelp().
|
protectedvirtual |
Definition at line 355 of file hlpmanag.cpp.
References CmContextHelp(), ContextHelp, EvHelp(), owl::TApplication::GetMainWindow(), owl::TWindow::PostMessage(), owl::TWindow::SetCursor(), SetHelpCursor(), and TYPESAFE_DOWNCAST.
| void owl::THelpFileManager::RemoveContextInfo | ( | TWindow * | window | ) |
Removes all the entries in the context table for the window.
Definition at line 533 of file hlpmanag.cpp.
References ContextTable, DeactivateHelp(), owl::TBaseList< T >::DetachItem(), owl::TBaseList< T >::Empty(), and owl::TBaseList< T >::FirstThat().
|
protectedvirtual |
Definition at line 248 of file hlpmanag.cpp.
References owl::TCursor::TCursor(), THelpFileManager(), owl::TResId::TResId(), HelpCursor, SetHelpCursor(), and TYPESAFE_DOWNCAST.
| void owl::THelpFileManager::SetHelpFile | ( | const tstring & | helpFileName | ) |
Changes the name of the help file.
Definition at line 227 of file hlpmanag.cpp.
References _T, _tcsicmp, _tcsrchr, HelpFileName, and UseHTMLHelp.
|
inline |
Definition at line 190 of file hlpmanag.h.
References WinToHTML.
|
protected |
Definition at line 204 of file hlpmanag.h.
|
protected |
Definition at line 199 of file hlpmanag.h.
| owl::THelpFileManager::DECLARE_CASTABLE |
Definition at line 156 of file hlpmanag.h.
|
protected |
Definition at line 202 of file hlpmanag.h.
|
protected |
Definition at line 201 of file hlpmanag.h.
|
protected |
Definition at line 205 of file hlpmanag.h.
|
protected |
Definition at line 207 of file hlpmanag.h.
|
protected |
Definition at line 208 of file hlpmanag.h.
|
protected |
Definition at line 193 of file hlpmanag.h.
|
protected |
Definition at line 194 of file hlpmanag.h.