richtextbackgroundpage.h 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. /////////////////////////////////////////////////////////////////////////////
  2. // Name: wx/richtext/richtextbackgroundpage.h
  3. // Purpose:
  4. // Author: Julian Smart
  5. // Modified by:
  6. // Created: 13/11/2010 11:17:25
  7. // RCS-ID:
  8. // Copyright: (c) Julian Smart
  9. // Licence:
  10. /////////////////////////////////////////////////////////////////////////////
  11. #ifndef _RICHTEXTBACKGROUNDPAGE_H_
  12. #define _RICHTEXTBACKGROUNDPAGE_H_
  13. /*!
  14. * Includes
  15. */
  16. #include "wx/richtext/richtextdialogpage.h"
  17. ////@begin includes
  18. #include "wx/statline.h"
  19. ////@end includes
  20. /*!
  21. * Forward declarations
  22. */
  23. class WXDLLIMPEXP_FWD_RICHTEXT wxRichTextColourSwatchCtrl;
  24. /*!
  25. * Control identifiers
  26. */
  27. ////@begin control identifiers
  28. #define SYMBOL_WXRICHTEXTBACKGROUNDPAGE_STYLE wxTAB_TRAVERSAL
  29. #define SYMBOL_WXRICHTEXTBACKGROUNDPAGE_TITLE wxEmptyString
  30. #define SYMBOL_WXRICHTEXTBACKGROUNDPAGE_IDNAME ID_RICHTEXTBACKGROUNDPAGE
  31. #define SYMBOL_WXRICHTEXTBACKGROUNDPAGE_SIZE wxSize(400, 300)
  32. #define SYMBOL_WXRICHTEXTBACKGROUNDPAGE_POSITION wxDefaultPosition
  33. ////@end control identifiers
  34. /*!
  35. * wxRichTextBackgroundPage class declaration
  36. */
  37. class WXDLLIMPEXP_RICHTEXT wxRichTextBackgroundPage: public wxRichTextDialogPage
  38. {
  39. DECLARE_DYNAMIC_CLASS( wxRichTextBackgroundPage )
  40. DECLARE_EVENT_TABLE()
  41. DECLARE_HELP_PROVISION()
  42. public:
  43. /// Constructors
  44. wxRichTextBackgroundPage();
  45. wxRichTextBackgroundPage( wxWindow* parent, wxWindowID id = SYMBOL_WXRICHTEXTBACKGROUNDPAGE_IDNAME, const wxPoint& pos = SYMBOL_WXRICHTEXTBACKGROUNDPAGE_POSITION, const wxSize& size = SYMBOL_WXRICHTEXTBACKGROUNDPAGE_SIZE, long style = SYMBOL_WXRICHTEXTBACKGROUNDPAGE_STYLE );
  46. /// Creation
  47. bool Create( wxWindow* parent, wxWindowID id = SYMBOL_WXRICHTEXTBACKGROUNDPAGE_IDNAME, const wxPoint& pos = SYMBOL_WXRICHTEXTBACKGROUNDPAGE_POSITION, const wxSize& size = SYMBOL_WXRICHTEXTBACKGROUNDPAGE_SIZE, long style = SYMBOL_WXRICHTEXTBACKGROUNDPAGE_STYLE );
  48. /// Destructor
  49. ~wxRichTextBackgroundPage();
  50. /// Initialises member variables
  51. void Init();
  52. /// Creates the controls and sizers
  53. void CreateControls();
  54. /// Gets the attributes from the formatting dialog
  55. wxRichTextAttr* GetAttributes();
  56. /// Data transfer
  57. virtual bool TransferDataToWindow();
  58. virtual bool TransferDataFromWindow();
  59. /// Respond to colour swatch click
  60. void OnColourSwatch(wxCommandEvent& event);
  61. ////@begin wxRichTextBackgroundPage event handler declarations
  62. ////@end wxRichTextBackgroundPage event handler declarations
  63. ////@begin wxRichTextBackgroundPage member function declarations
  64. /// Retrieves bitmap resources
  65. wxBitmap GetBitmapResource( const wxString& name );
  66. /// Retrieves icon resources
  67. wxIcon GetIconResource( const wxString& name );
  68. ////@end wxRichTextBackgroundPage member function declarations
  69. /// Should we show tooltips?
  70. static bool ShowToolTips();
  71. ////@begin wxRichTextBackgroundPage member variables
  72. wxCheckBox* m_backgroundColourCheckBox;
  73. wxRichTextColourSwatchCtrl* m_backgroundColourSwatch;
  74. /// Control identifiers
  75. enum {
  76. ID_RICHTEXTBACKGROUNDPAGE = 10845,
  77. ID_RICHTEXT_BACKGROUND_COLOUR_CHECKBOX = 10846,
  78. ID_RICHTEXT_BACKGROUND_COLOUR_SWATCH = 10847
  79. };
  80. ////@end wxRichTextBackgroundPage member variables
  81. };
  82. #endif
  83. // _RICHTEXTBACKGROUNDPAGE_H_