Leaked source code of windows server 2003
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.

92 lines
2.7 KiB

  1. /*++
  2. Copyright (c) 1992-2002 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. extern char g_EditorInvokeCommand[MAX_PATH + MAX_SOURCE_PATH];
  12. extern char g_EditorUpdateCommand[MAX_PATH + MAX_SOURCE_PATH];
  13. class DOCWIN_DATA : public EDITWIN_DATA
  14. {
  15. public:
  16. // Two filenames are kept for source files, the filename
  17. // by which the file was opened on the local file system
  18. // and the original filename from symbolic information (or NULL
  19. // if the file was not opened as a result of symbol lookup).
  20. // The found filename is the one presented to the user while
  21. // the symbol filename is for line symbol queries.
  22. TCHAR m_FoundFile[MAX_SOURCE_PATH];
  23. TCHAR m_SymFileBuffer[MAX_SOURCE_PATH];
  24. PCTSTR m_SymFile;
  25. TCHAR m_PathComponent[MAX_SOURCE_PATH];
  26. FILETIME m_LastWriteTime;
  27. CHARRANGE m_FindSel;
  28. ULONG m_FindFlags;
  29. static HMENU s_ContextMenu;
  30. DOCWIN_DATA();
  31. virtual void Validate();
  32. virtual BOOL SelectedText(PTSTR Buffer, ULONG BufferChars);
  33. virtual BOOL CanGotoLine(void);
  34. virtual void GotoLine(ULONG Line);
  35. virtual void Find(PTSTR Text, ULONG Flags, BOOL FromDlg);
  36. virtual HRESULT CodeExprAtCaret(PSTR Expr, ULONG ExprSize,
  37. PULONG64 Offset);
  38. virtual void ToggleBpAtCaret(void);
  39. virtual void UpdateBpMarks(void);
  40. virtual HMENU GetContextMenu(void);
  41. virtual void OnContextMenuSelection(UINT Item);
  42. virtual BOOL OnCreate(void);
  43. virtual LRESULT OnNotify(WPARAM wParam, LPARAM lParam);
  44. virtual void OnUpdate(UpdateType Type);
  45. virtual ULONG GetWorkspaceSize(void);
  46. virtual PUCHAR SetWorkspace(PUCHAR Data);
  47. virtual PUCHAR ApplyWorkspace1(PUCHAR Data, PUCHAR End);
  48. virtual BOOL LoadFile(PCTSTR FoundFile, PCTSTR SymFile,
  49. PCTSTR PathComponent);
  50. };
  51. typedef DOCWIN_DATA *PDOCWIN_DATA;
  52. BOOL
  53. FindDocWindowByFileName(
  54. IN PCTSTR pszFile,
  55. OPTIONAL HWND *phwnd,
  56. OPTIONAL PDOCWIN_DATA *ppDocWinData
  57. );
  58. BOOL OpenOrActivateFile(PCSTR FoundFile, PCSTR SymFile,
  59. PCSTR PathComponent, ULONG Line,
  60. BOOL Activate, BOOL UserActivated);
  61. void UpdateCodeDisplay(ULONG64 Ip, PCSTR FoundFile, PCSTR SymFile,
  62. PCSTR PathComponent, ULONG Line,
  63. BOOL UserActivated);
  64. VOID AddDocHwnd(HWND);
  65. VOID RemoveDocHwnd(HWND);
  66. void SetTabWidth(ULONG TabWidth);
  67. void GetEditorCommandDefaults(void);