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.
Definition at line 197 of file hlpmanag.h.
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 ContextTable, and SetHelpFile().
|
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(), HelpState, HtmlHelp(), owl::ToBool(), TYPESAFE_DOWNCAST, and UseHTMLHelp.
void owl::THelpFileManager::AddContextInfo | ( | TWindow * | window, |
int | helpId, | ||
int | menuId, | ||
int | controlId ) |
Adds an entry into the global context table.
Definition at line 524 of file hlpmanag.cpp.
References ContextTable.
|
protected |
Definition at line 281 of file hlpmanag.cpp.
|
protected |
Definition at line 271 of file hlpmanag.cpp.
References ContextHelp, and SetHelpCursor().
|
protected |
Definition at line 290 of file hlpmanag.cpp.
References owl::TWindow::ChildWindowFromPoint(), EvHelp(), owl::TWindow::GetHandle(), 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(), HtmlHelp(), TYPESAFE_DOWNCAST, and UseHTMLHelp.
|
protected |
Event handler for the WM_HELP message.
Definition at line 333 of file hlpmanag.cpp.
References ActivateHelp(), GetHelpContextFromControl(), GetHelpContextFromMenu(), and LastHit.
|
inlineprotected |
Definition at line 327 of file hlpmanag.h.
References LastHit, and LastParent.
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 451 of file hlpmanag.cpp.
References ContextTable, 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 494 of file hlpmanag.cpp.
References ContextTable, 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::GetWindowPtr(), HtmlHelp(), LastHit, and WinToHTML.
|
inline |
Definition at line 187 of file hlpmanag.h.
Definition at line 364 of file hlpmanag.cpp.
References CmContextHelp(), ContextHelp, EvHelp(), SetHelpCursor(), and TYPESAFE_DOWNCAST.
Removes all the entries in the context table for the window.
Definition at line 542 of file hlpmanag.cpp.
References ContextTable, and DeactivateHelp().
|
protectedvirtual |
Definition at line 257 of file hlpmanag.cpp.
References TYPESAFE_DOWNCAST.
Changes the name of the help file.
Definition at line 236 of file hlpmanag.cpp.
References _T, _tcsicmp, _tcsrchr, HelpFileName, and UseHTMLHelp.
Definition at line 190 of file hlpmanag.h.
|
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.