Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

76 lines
2.0 KiB

  1. /*++
  2. Copyright (c) 1992-2000 Microsoft Corporation
  3. Module Name:
  4. docwin.h
  5. Environment:
  6. Win32, User Mode
  7. --*/
  8. #define MAX_SOURCE_PATH 1024
  9. extern ULONG g_TabWidth;
  10. extern BOOL g_DisasmActivateSource;
  11. class DOCWIN_DATA : public EDITWIN_DATA
  12. {
  13. public:
  14. // Two filenames are kept for source files, the filename
  15. // by which the file was opened on the local file system
  16. // and the original filename from symbolic information (or NULL
  17. // if the file was not opened as a result of symbol lookup).
  18. // The found filename is the one presented to the user while
  19. // the symbol filename is for line symbol queries.
  20. TCHAR m_szFoundFile[MAX_SOURCE_PATH];
  21. TCHAR m_szSymFile[MAX_SOURCE_PATH];
  22. PCTSTR m_pszSymFile;
  23. FILETIME m_LastWriteTime;
  24. CHARRANGE m_FindSel;
  25. ULONG m_FindFlags;
  26. DOCWIN_DATA();
  27. virtual void Validate();
  28. virtual BOOL CanGotoLine(void);
  29. virtual void GotoLine(ULONG Line);
  30. virtual void Find(PTSTR Text, ULONG Flags);
  31. virtual BOOL CodeExprAtCaret(PSTR Expr, PULONG64 Offset);
  32. virtual void ToggleBpAtCaret(void);
  33. virtual void UpdateBpMarks(void);
  34. virtual BOOL OnCreate(void);
  35. virtual LRESULT OnNotify(WPARAM wParam, LPARAM lParam);
  36. virtual void OnUpdate(UpdateType Type);
  37. virtual ULONG GetWorkspaceSize(void);
  38. virtual PUCHAR SetWorkspace(PUCHAR Data);
  39. virtual PUCHAR ApplyWorkspace1(PUCHAR Data, PUCHAR End);
  40. virtual BOOL LoadFile(PCTSTR FoundFile, PCTSTR SymFile);
  41. };
  42. typedef DOCWIN_DATA *PDOCWIN_DATA;
  43. BOOL
  44. FindDocWindowByFileName(
  45. IN PCTSTR pszFile,
  46. OPTIONAL HWND *phwnd,
  47. OPTIONAL PDOCWIN_DATA *ppDocWinData
  48. );
  49. BOOL OpenOrActivateFile(PCSTR FoundFile, PCSTR SymFile, ULONG Line,
  50. BOOL Activate, BOOL UserActivated);
  51. void UpdateCodeDisplay(ULONG64 Ip, PCSTR FoundFile, PCSTR SymFile, ULONG Line,
  52. BOOL UserActivated);
  53. VOID AddDocHwnd(HWND);
  54. VOID RemoveDocHwnd(HWND);
  55. void SetTabWidth(ULONG TabWidth);