X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/97ff49b3834325cfe53813aeb53d326d7661f184..9869c26285dc51d13607cddaa04f65ce983653a5:/include/wx/richtext/richtextbulletspage.h diff --git a/include/wx/richtext/richtextbulletspage.h b/include/wx/richtext/richtextbulletspage.h index 53aa6664be..4cf6b7745a 100644 --- a/include/wx/richtext/richtextbulletspage.h +++ b/include/wx/richtext/richtextbulletspage.h @@ -1,12 +1,11 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: richtextbulletspage.h +// Name: wx/richtext/richtextbulletspage.h // Purpose: // Author: Julian Smart // Modified by: // Created: 10/4/2006 10:32:31 AM -// RCS-ID: // Copyright: (c) Julian Smart -// Licence: +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #ifndef _RICHTEXTBULLETSPAGE_H_ @@ -16,10 +15,8 @@ * Includes */ -////@begin includes -#include "wx/statline.h" -#include "wx/spinctrl.h" -////@end includes +#include "wx/richtext/richtextdialogpage.h" +#include "wx/spinbutt.h" // for wxSpinEvent /*! * Forward declarations @@ -36,36 +33,29 @@ class wxRichTextCtrl; ////@begin control identifiers #define SYMBOL_WXRICHTEXTBULLETSPAGE_STYLE wxRESIZE_BORDER|wxTAB_TRAVERSAL -#define SYMBOL_WXRICHTEXTBULLETSPAGE_TITLE _("wxRichTextBulletsPage") +#define SYMBOL_WXRICHTEXTBULLETSPAGE_TITLE wxEmptyString #define SYMBOL_WXRICHTEXTBULLETSPAGE_IDNAME ID_RICHTEXTBULLETSPAGE #define SYMBOL_WXRICHTEXTBULLETSPAGE_SIZE wxSize(400, 300) #define SYMBOL_WXRICHTEXTBULLETSPAGE_POSITION wxDefaultPosition ////@end control identifiers -/*! - * Compatibility - */ - -#ifndef wxCLOSE_BOX -#define wxCLOSE_BOX 0x1000 -#endif - /*! * wxRichTextBulletsPage class declaration */ -class WXDLLIMPEXP_RICHTEXT wxRichTextBulletsPage: public wxPanel +class WXDLLIMPEXP_RICHTEXT wxRichTextBulletsPage: public wxRichTextDialogPage { DECLARE_DYNAMIC_CLASS( wxRichTextBulletsPage ) DECLARE_EVENT_TABLE() + DECLARE_HELP_PROVISION() public: /// Constructors wxRichTextBulletsPage( ); - wxRichTextBulletsPage( wxWindow* parent, wxWindowID id = SYMBOL_WXRICHTEXTBULLETSPAGE_IDNAME, const wxPoint& pos = SYMBOL_WXRICHTEXTBULLETSPAGE_POSITION, const wxSize& size = SYMBOL_WXRICHTEXTBULLETSPAGE_SIZE, long style = SYMBOL_WXRICHTEXTBULLETSPAGE_STYLE ); + wxRichTextBulletsPage( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = SYMBOL_WXRICHTEXTBULLETSPAGE_POSITION, const wxSize& size = SYMBOL_WXRICHTEXTBULLETSPAGE_SIZE, long style = SYMBOL_WXRICHTEXTBULLETSPAGE_STYLE ); /// Creation - bool Create( wxWindow* parent, wxWindowID id = SYMBOL_WXRICHTEXTBULLETSPAGE_IDNAME, const wxPoint& pos = SYMBOL_WXRICHTEXTBULLETSPAGE_POSITION, const wxSize& size = SYMBOL_WXRICHTEXTBULLETSPAGE_SIZE, long style = SYMBOL_WXRICHTEXTBULLETSPAGE_STYLE ); + bool Create( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = SYMBOL_WXRICHTEXTBULLETSPAGE_POSITION, const wxSize& size = SYMBOL_WXRICHTEXTBULLETSPAGE_SIZE, long style = SYMBOL_WXRICHTEXTBULLETSPAGE_STYLE ); /// Initialise members void Init(); @@ -81,7 +71,7 @@ public: virtual bool TransferDataToWindow(); /// Gets the attributes associated with the main formatting dialog - wxTextAttrEx* GetAttributes(); + wxRichTextAttr* GetAttributes(); /// Update for symbol-related controls void OnSymbolUpdate( wxUpdateUIEvent& event ); @@ -89,42 +79,78 @@ public: /// Update for number-related controls void OnNumberUpdate( wxUpdateUIEvent& event ); + /// Update for standard bullet-related controls + void OnStandardBulletUpdate( wxUpdateUIEvent& event ); + ////@begin wxRichTextBulletsPage event handler declarations - /// wxEVT_COMMAND_LISTBOX_SELECTED event handler for ID_RICHTEXTBULLETSPAGE_STYLELISTBOX + /// wxEVT_LISTBOX event handler for ID_RICHTEXTBULLETSPAGE_STYLELISTBOX void OnStylelistboxSelected( wxCommandEvent& event ); + /// wxEVT_CHECKBOX event handler for ID_RICHTEXTBULLETSPAGE_PERIODCTRL + void OnPeriodctrlClick( wxCommandEvent& event ); + + /// wxEVT_UPDATE_UI event handler for ID_RICHTEXTBULLETSPAGE_PERIODCTRL + void OnPeriodctrlUpdate( wxUpdateUIEvent& event ); + + /// wxEVT_CHECKBOX event handler for ID_RICHTEXTBULLETSPAGE_PARENTHESESCTRL + void OnParenthesesctrlClick( wxCommandEvent& event ); + + /// wxEVT_UPDATE_UI event handler for ID_RICHTEXTBULLETSPAGE_PARENTHESESCTRL + void OnParenthesesctrlUpdate( wxUpdateUIEvent& event ); + + /// wxEVT_CHECKBOX event handler for ID_RICHTEXTBULLETSPAGE_RIGHTPARENTHESISCTRL + void OnRightParenthesisCtrlClick( wxCommandEvent& event ); + + /// wxEVT_UPDATE_UI event handler for ID_RICHTEXTBULLETSPAGE_RIGHTPARENTHESISCTRL + void OnRightParenthesisCtrlUpdate( wxUpdateUIEvent& event ); + + /// wxEVT_COMBOBOX event handler for ID_RICHTEXTBULLETSPAGE_BULLETALIGNMENTCTRL + void OnBulletAlignmentCtrlSelected( wxCommandEvent& event ); + /// wxEVT_UPDATE_UI event handler for ID_RICHTEXTBULLETSPAGE_SYMBOLSTATIC void OnSymbolstaticUpdate( wxUpdateUIEvent& event ); - /// wxEVT_COMMAND_COMBOBOX_SELECTED event handler for ID_RICHTEXTBULLETSPAGE_SYMBOLCTRL + /// wxEVT_COMBOBOX event handler for ID_RICHTEXTBULLETSPAGE_SYMBOLCTRL void OnSymbolctrlSelected( wxCommandEvent& event ); - /// wxEVT_COMMAND_TEXT_UPDATED event handler for ID_RICHTEXTBULLETSPAGE_SYMBOLCTRL + /// wxEVT_TEXT event handler for ID_RICHTEXTBULLETSPAGE_SYMBOLCTRL void OnSymbolctrlUpdated( wxCommandEvent& event ); /// wxEVT_UPDATE_UI event handler for ID_RICHTEXTBULLETSPAGE_SYMBOLCTRL void OnSymbolctrlUpdate( wxUpdateUIEvent& event ); - /// wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_RICHTEXTBULLETSPAGE_CHOOSE_SYMBOL + /// wxEVT_BUTTON event handler for ID_RICHTEXTBULLETSPAGE_CHOOSE_SYMBOL void OnChooseSymbolClick( wxCommandEvent& event ); /// wxEVT_UPDATE_UI event handler for ID_RICHTEXTBULLETSPAGE_CHOOSE_SYMBOL void OnChooseSymbolUpdate( wxUpdateUIEvent& event ); - /// wxEVT_COMMAND_COMBOBOX_SELECTED event handler for ID_RICHTEXTBULLETSPAGE_SYMBOLFONTCTRL + /// wxEVT_COMBOBOX event handler for ID_RICHTEXTBULLETSPAGE_SYMBOLFONTCTRL void OnSymbolfontctrlSelected( wxCommandEvent& event ); - /// wxEVT_COMMAND_TEXT_UPDATED event handler for ID_RICHTEXTBULLETSPAGE_SYMBOLFONTCTRL + /// wxEVT_TEXT event handler for ID_RICHTEXTBULLETSPAGE_SYMBOLFONTCTRL void OnSymbolfontctrlUpdated( wxCommandEvent& event ); /// wxEVT_UPDATE_UI event handler for ID_RICHTEXTBULLETSPAGE_SYMBOLFONTCTRL void OnSymbolfontctrlUIUpdate( wxUpdateUIEvent& event ); + /// wxEVT_UPDATE_UI event handler for ID_RICHTEXTBULLETSPAGE_NAMESTATIC + void OnNamestaticUpdate( wxUpdateUIEvent& event ); + + /// wxEVT_COMBOBOX event handler for ID_RICHTEXTBULLETSPAGE_NAMECTRL + void OnNamectrlSelected( wxCommandEvent& event ); + + /// wxEVT_TEXT event handler for ID_RICHTEXTBULLETSPAGE_NAMECTRL + void OnNamectrlUpdated( wxCommandEvent& event ); + + /// wxEVT_UPDATE_UI event handler for ID_RICHTEXTBULLETSPAGE_NAMECTRL + void OnNamectrlUIUpdate( wxUpdateUIEvent& event ); + /// wxEVT_UPDATE_UI event handler for ID_RICHTEXTBULLETSPAGE_NUMBERSTATIC void OnNumberstaticUpdate( wxUpdateUIEvent& event ); - /// wxEVT_COMMAND_SPINCTRL_UPDATED event handler for ID_RICHTEXTBULLETSPAGE_NUMBERCTRL + /// wxEVT_SPINCTRL event handler for ID_RICHTEXTBULLETSPAGE_NUMBERCTRL void OnNumberctrlUpdated( wxSpinEvent& event ); /// wxEVT_SCROLL_LINEUP event handler for ID_RICHTEXTBULLETSPAGE_NUMBERCTRL @@ -133,24 +159,12 @@ public: /// wxEVT_SCROLL_LINEDOWN event handler for ID_RICHTEXTBULLETSPAGE_NUMBERCTRL void OnNumberctrlDown( wxSpinEvent& event ); - /// wxEVT_COMMAND_TEXT_UPDATED event handler for ID_RICHTEXTBULLETSPAGE_NUMBERCTRL + /// wxEVT_TEXT event handler for ID_RICHTEXTBULLETSPAGE_NUMBERCTRL void OnNumberctrlTextUpdated( wxCommandEvent& event ); /// wxEVT_UPDATE_UI event handler for ID_RICHTEXTBULLETSPAGE_NUMBERCTRL void OnNumberctrlUpdate( wxUpdateUIEvent& event ); - /// wxEVT_COMMAND_CHECKBOX_CLICKED event handler for ID_RICHTEXTBULLETSPAGE_PARENTHESESCTRL - void OnParenthesesctrlClick( wxCommandEvent& event ); - - /// wxEVT_UPDATE_UI event handler for ID_RICHTEXTBULLETSPAGE_PARENTHESESCTRL - void OnParenthesesctrlUpdate( wxUpdateUIEvent& event ); - - /// wxEVT_COMMAND_CHECKBOX_CLICKED event handler for ID_RICHTEXTBULLETSPAGE_PERIODCTRL - void OnPeriodctrlClick( wxCommandEvent& event ); - - /// wxEVT_UPDATE_UI event handler for ID_RICHTEXTBULLETSPAGE_PERIODCTRL - void OnPeriodctrlUpdate( wxUpdateUIEvent& event ); - ////@end wxRichTextBulletsPage event handler declarations ////@begin wxRichTextBulletsPage member function declarations @@ -167,24 +181,31 @@ public: ////@begin wxRichTextBulletsPage member variables wxListBox* m_styleListBox; + wxCheckBox* m_periodCtrl; + wxCheckBox* m_parenthesesCtrl; + wxCheckBox* m_rightParenthesisCtrl; + wxComboBox* m_bulletAlignmentCtrl; wxComboBox* m_symbolCtrl; wxComboBox* m_symbolFontCtrl; + wxComboBox* m_bulletNameCtrl; wxSpinCtrl* m_numberCtrl; - wxCheckBox* m_parenthesesCtrl; - wxCheckBox* m_periodCtrl; wxRichTextCtrl* m_previewCtrl; /// Control identifiers enum { ID_RICHTEXTBULLETSPAGE = 10300, ID_RICHTEXTBULLETSPAGE_STYLELISTBOX = 10305, + ID_RICHTEXTBULLETSPAGE_PERIODCTRL = 10313, + ID_RICHTEXTBULLETSPAGE_PARENTHESESCTRL = 10311, + ID_RICHTEXTBULLETSPAGE_RIGHTPARENTHESISCTRL = 10306, + ID_RICHTEXTBULLETSPAGE_BULLETALIGNMENTCTRL = 10315, ID_RICHTEXTBULLETSPAGE_SYMBOLSTATIC = 10301, ID_RICHTEXTBULLETSPAGE_SYMBOLCTRL = 10307, ID_RICHTEXTBULLETSPAGE_CHOOSE_SYMBOL = 10308, ID_RICHTEXTBULLETSPAGE_SYMBOLFONTCTRL = 10309, + ID_RICHTEXTBULLETSPAGE_NAMESTATIC = 10303, + ID_RICHTEXTBULLETSPAGE_NAMECTRL = 10304, ID_RICHTEXTBULLETSPAGE_NUMBERSTATIC = 10302, ID_RICHTEXTBULLETSPAGE_NUMBERCTRL = 10310, - ID_RICHTEXTBULLETSPAGE_PARENTHESESCTRL = 10311, - ID_RICHTEXTBULLETSPAGE_PERIODCTRL = 10313, ID_RICHTEXTBULLETSPAGE_PREVIEW_CTRL = 10314 }; ////@end wxRichTextBulletsPage member variables