richtextstylepage.h 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. /////////////////////////////////////////////////////////////////////////////
  2. // Name: wx/richtext/richtextstylepage.h
  3. // Purpose:
  4. // Author: Julian Smart
  5. // Modified by:
  6. // Created: 10/5/2006 11:34:55 AM
  7. // Copyright: (c) Julian Smart
  8. // Licence: wxWindows licence
  9. /////////////////////////////////////////////////////////////////////////////
  10. #ifndef _RICHTEXTSTYLEPAGE_H_
  11. #define _RICHTEXTSTYLEPAGE_H_
  12. #include "wx/richtext/richtextdialogpage.h"
  13. /*!
  14. * Control identifiers
  15. */
  16. ////@begin control identifiers
  17. #define SYMBOL_WXRICHTEXTSTYLEPAGE_STYLE wxRESIZE_BORDER|wxTAB_TRAVERSAL
  18. #define SYMBOL_WXRICHTEXTSTYLEPAGE_TITLE wxEmptyString
  19. #define SYMBOL_WXRICHTEXTSTYLEPAGE_IDNAME ID_RICHTEXTSTYLEPAGE
  20. #define SYMBOL_WXRICHTEXTSTYLEPAGE_SIZE wxSize(400, 300)
  21. #define SYMBOL_WXRICHTEXTSTYLEPAGE_POSITION wxDefaultPosition
  22. ////@end control identifiers
  23. /*!
  24. * wxRichTextStylePage class declaration
  25. */
  26. class WXDLLIMPEXP_RICHTEXT wxRichTextStylePage: public wxRichTextDialogPage
  27. {
  28. DECLARE_DYNAMIC_CLASS( wxRichTextStylePage )
  29. DECLARE_EVENT_TABLE()
  30. DECLARE_HELP_PROVISION()
  31. public:
  32. /// Constructors
  33. wxRichTextStylePage( );
  34. wxRichTextStylePage( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = SYMBOL_WXRICHTEXTSTYLEPAGE_POSITION, const wxSize& size = SYMBOL_WXRICHTEXTSTYLEPAGE_SIZE, long style = SYMBOL_WXRICHTEXTSTYLEPAGE_STYLE );
  35. /// Creation
  36. bool Create( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = SYMBOL_WXRICHTEXTSTYLEPAGE_POSITION, const wxSize& size = SYMBOL_WXRICHTEXTSTYLEPAGE_SIZE, long style = SYMBOL_WXRICHTEXTSTYLEPAGE_STYLE );
  37. /// Initialise members
  38. void Init();
  39. /// Creates the controls and sizers
  40. void CreateControls();
  41. /// Transfer data from/to window
  42. virtual bool TransferDataFromWindow();
  43. virtual bool TransferDataToWindow();
  44. /// Gets the attributes associated with the main formatting dialog
  45. wxRichTextAttr* GetAttributes();
  46. ////@begin wxRichTextStylePage event handler declarations
  47. /// wxEVT_UPDATE_UI event handler for ID_RICHTEXTSTYLEPAGE_NEXT_STYLE
  48. void OnNextStyleUpdate( wxUpdateUIEvent& event );
  49. ////@end wxRichTextStylePage event handler declarations
  50. ////@begin wxRichTextStylePage member function declarations
  51. /// Retrieves bitmap resources
  52. wxBitmap GetBitmapResource( const wxString& name );
  53. /// Retrieves icon resources
  54. wxIcon GetIconResource( const wxString& name );
  55. ////@end wxRichTextStylePage member function declarations
  56. /// Should we show tooltips?
  57. static bool ShowToolTips();
  58. ////@begin wxRichTextStylePage member variables
  59. wxTextCtrl* m_styleName;
  60. wxComboBox* m_basedOn;
  61. wxComboBox* m_nextStyle;
  62. /// Control identifiers
  63. enum {
  64. ID_RICHTEXTSTYLEPAGE = 10403,
  65. ID_RICHTEXTSTYLEPAGE_STYLE_NAME = 10404,
  66. ID_RICHTEXTSTYLEPAGE_BASED_ON = 10405,
  67. ID_RICHTEXTSTYLEPAGE_NEXT_STYLE = 10406
  68. };
  69. ////@end wxRichTextStylePage member variables
  70. };
  71. #endif
  72. // _RICHTEXTSTYLEPAGE_H_