MessageDlg.h 2.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. //----------------------------------------------------------------------------
  2. #ifndef MessageDlgH
  3. #define MessageDlgH
  4. //----------------------------------------------------------------------------
  5. #include <System.Classes.hpp>
  6. #include <Vcl.Controls.hpp>
  7. #include <Vcl.StdCtrls.hpp>
  8. //---------------------------------------------------------------------------
  9. class TMessageForm : public TForm
  10. {
  11. __published:
  12. public:
  13. static TForm * __fastcall Create(const UnicodeString & Msg, TStrings * MoreMessages,
  14. TMsgDlgType DlgType, unsigned int Answers,
  15. const TQueryButtonAlias * Aliases, unsigned int AliasesCount,
  16. unsigned int TimeoutAnswer, TButton ** TimeoutButton, const UnicodeString & ImageName,
  17. const UnicodeString & NeverAskAgainCaption, const UnicodeString & MoreMessagesUrl,
  18. TSize MoreMessagesSize, const UnicodeString & CustomCaption);
  19. virtual int __fastcall ShowModal();
  20. void __fastcall InsertPanel(TPanel * Panel);
  21. void __fastcall NavigateToUrl(const UnicodeString & Url);
  22. protected:
  23. __fastcall TMessageForm(TComponent * AOwner);
  24. virtual __fastcall ~TMessageForm();
  25. DYNAMIC void __fastcall KeyDown(Word & Key, TShiftState Shift);
  26. DYNAMIC void __fastcall KeyUp(Word & Key, TShiftState Shift);
  27. UnicodeString __fastcall GetFormText();
  28. UnicodeString __fastcall GetReportText();
  29. UnicodeString __fastcall NormalizeNewLines(UnicodeString Text);
  30. virtual void __fastcall CreateParams(TCreateParams & Params);
  31. DYNAMIC void __fastcall DoShow();
  32. virtual void __fastcall Dispatch(void * Message);
  33. void __fastcall MenuItemClick(TObject * Sender);
  34. void __fastcall ButtonDropDownClick(TObject * Sender);
  35. void __fastcall UpdateForShiftStateTimer(TObject * Sender);
  36. DYNAMIC void __fastcall SetZOrder(bool TopMost);
  37. void __fastcall LoadMessageBrowser();
  38. virtual void __fastcall ReadState(TReader * Reader);
  39. private:
  40. typedef std::map<unsigned int, TButton *> TAnswerButtons;
  41. UnicodeString MessageText;
  42. TPanel * ContentsPanel;
  43. TMemo * MessageMemo;
  44. TPanel * MessageBrowserPanel;
  45. TWebBrowserEx * MessageBrowser;
  46. UnicodeString MessageBrowserUrl;
  47. TShiftState FShiftState;
  48. TTimer * FUpdateForShiftStateTimer;
  49. TForm * FDummyForm;
  50. bool FShowNoActivate;
  51. void __fastcall HelpButtonClick(TObject * Sender);
  52. void __fastcall ReportButtonClick(TObject * Sender);
  53. void __fastcall CMDialogKey(TWMKeyDown & Message);
  54. void __fastcall CMShowingChanged(TMessage & Message);
  55. void __fastcall UpdateForShiftState();
  56. TButton * __fastcall CreateButton(
  57. UnicodeString Name, UnicodeString Caption, unsigned int Answer,
  58. TNotifyEvent OnClick, bool IsTimeoutButton,
  59. int GroupWith, TShiftState GrouppedShiftState, bool ElevationRequired, bool MenuButton,
  60. TAnswerButtons & AnswerButtons, bool HasMoreMessages, int & ButtonWidths);
  61. };
  62. //----------------------------------------------------------------------------
  63. #endif