2006-10-08 10:05:17 -04:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
2006-10-09 06:26:18 -04:00
|
|
|
// Name: wx/richtext/richtextbulletspage.h
|
2006-10-08 10:05:17 -04:00
|
|
|
// Purpose:
|
|
|
|
// Author: Julian Smart
|
|
|
|
// Modified by:
|
|
|
|
// Created: 10/4/2006 10:32:31 AM
|
2006-10-09 06:26:18 -04:00
|
|
|
// RCS-ID: $Id$
|
2006-10-08 10:05:17 -04:00
|
|
|
// Copyright: (c) Julian Smart
|
2006-10-09 06:26:18 -04:00
|
|
|
// Licence: wxWindows licence
|
2006-10-08 10:05:17 -04:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#ifndef _RICHTEXTBULLETSPAGE_H_
|
|
|
|
#define _RICHTEXTBULLETSPAGE_H_
|
|
|
|
|
|
|
|
/*!
|
|
|
|
* Includes
|
|
|
|
*/
|
|
|
|
|
|
|
|
////@begin includes
|
2006-10-20 09:04:12 -04:00
|
|
|
#include "wx/statline.h"
|
2006-10-26 02:32:47 -04:00
|
|
|
#include "wx/spinctrl.h"
|
2006-10-08 10:05:17 -04:00
|
|
|
////@end includes
|
|
|
|
|
|
|
|
/*!
|
|
|
|
* Forward declarations
|
|
|
|
*/
|
|
|
|
|
|
|
|
////@begin forward declarations
|
|
|
|
class wxSpinCtrl;
|
|
|
|
class wxRichTextCtrl;
|
|
|
|
////@end forward declarations
|
|
|
|
|
|
|
|
/*!
|
|
|
|
* Control identifiers
|
|
|
|
*/
|
|
|
|
|
|
|
|
////@begin control identifiers
|
|
|
|
#define SYMBOL_WXRICHTEXTBULLETSPAGE_STYLE wxRESIZE_BORDER|wxTAB_TRAVERSAL
|
|
|
|
#define SYMBOL_WXRICHTEXTBULLETSPAGE_TITLE _("wxRichTextBulletsPage")
|
|
|
|
#define SYMBOL_WXRICHTEXTBULLETSPAGE_IDNAME ID_RICHTEXTBULLETSPAGE
|
|
|
|
#define SYMBOL_WXRICHTEXTBULLETSPAGE_SIZE wxSize(400, 300)
|
|
|
|
#define SYMBOL_WXRICHTEXTBULLETSPAGE_POSITION wxDefaultPosition
|
|
|
|
////@end control identifiers
|
|
|
|
|
|
|
|
/*!
|
|
|
|
* wxRichTextBulletsPage class declaration
|
|
|
|
*/
|
|
|
|
|
|
|
|
class WXDLLIMPEXP_RICHTEXT wxRichTextBulletsPage: public wxPanel
|
|
|
|
{
|
|
|
|
DECLARE_DYNAMIC_CLASS( wxRichTextBulletsPage )
|
|
|
|
DECLARE_EVENT_TABLE()
|
|
|
|
|
|
|
|
public:
|
|
|
|
/// Constructors
|
|
|
|
wxRichTextBulletsPage( );
|
2006-10-29 17:01:06 -05:00
|
|
|
wxRichTextBulletsPage( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = SYMBOL_WXRICHTEXTBULLETSPAGE_POSITION, const wxSize& size = SYMBOL_WXRICHTEXTBULLETSPAGE_SIZE, long style = SYMBOL_WXRICHTEXTBULLETSPAGE_STYLE );
|
2006-10-08 10:05:17 -04:00
|
|
|
|
|
|
|
/// Creation
|
2006-10-29 17:01:06 -05:00
|
|
|
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 );
|
2006-10-08 10:05:17 -04:00
|
|
|
|
|
|
|
/// Initialise members
|
|
|
|
void Init();
|
|
|
|
|
|
|
|
/// Creates the controls and sizers
|
|
|
|
void CreateControls();
|
|
|
|
|
|
|
|
/// Updates the bullets preview
|
|
|
|
void UpdatePreview();
|
|
|
|
|
|
|
|
/// Transfer data from/to window
|
|
|
|
virtual bool TransferDataFromWindow();
|
|
|
|
virtual bool TransferDataToWindow();
|
|
|
|
|
|
|
|
/// Gets the attributes associated with the main formatting dialog
|
|
|
|
wxTextAttrEx* GetAttributes();
|
|
|
|
|
|
|
|
/// Update for symbol-related controls
|
|
|
|
void OnSymbolUpdate( wxUpdateUIEvent& event );
|
|
|
|
|
|
|
|
/// Update for number-related controls
|
|
|
|
void OnNumberUpdate( wxUpdateUIEvent& event );
|
|
|
|
|
2006-10-20 09:04:12 -04:00
|
|
|
/// Update for standard bullet-related controls
|
|
|
|
void OnStandardBulletUpdate( wxUpdateUIEvent& event );
|
|
|
|
|
2006-10-08 10:05:17 -04:00
|
|
|
////@begin wxRichTextBulletsPage event handler declarations
|
|
|
|
|
|
|
|
/// wxEVT_COMMAND_LISTBOX_SELECTED event handler for ID_RICHTEXTBULLETSPAGE_STYLELISTBOX
|
|
|
|
void OnStylelistboxSelected( wxCommandEvent& event );
|
|
|
|
|
2006-10-20 09:04:12 -04:00
|
|
|
/// 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 );
|
|
|
|
|
|
|
|
/// 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 );
|
|
|
|
|
2006-10-26 02:32:47 -04:00
|
|
|
/// wxEVT_COMMAND_CHECKBOX_CLICKED event handler for ID_RICHTEXTBULLETSPAGE_RIGHTPARENTHESISCTRL
|
|
|
|
void OnRightParenthesisCtrlClick( wxCommandEvent& event );
|
2006-10-20 09:04:12 -04:00
|
|
|
|
2006-10-26 02:32:47 -04:00
|
|
|
/// wxEVT_UPDATE_UI event handler for ID_RICHTEXTBULLETSPAGE_RIGHTPARENTHESISCTRL
|
|
|
|
void OnRightParenthesisCtrlUpdate( wxUpdateUIEvent& event );
|
2006-10-20 09:04:12 -04:00
|
|
|
|
2006-10-26 02:32:47 -04:00
|
|
|
/// wxEVT_COMMAND_COMBOBOX_SELECTED event handler for ID_RICHTEXTBULLETSPAGE_BULLETALIGNMENTCTRL
|
|
|
|
void OnBulletAlignmentCtrlSelected( wxCommandEvent& event );
|
2006-10-20 09:04:12 -04:00
|
|
|
|
2006-10-08 10:05:17 -04:00
|
|
|
/// wxEVT_UPDATE_UI event handler for ID_RICHTEXTBULLETSPAGE_SYMBOLSTATIC
|
|
|
|
void OnSymbolstaticUpdate( wxUpdateUIEvent& event );
|
|
|
|
|
|
|
|
/// wxEVT_COMMAND_COMBOBOX_SELECTED event handler for ID_RICHTEXTBULLETSPAGE_SYMBOLCTRL
|
|
|
|
void OnSymbolctrlSelected( wxCommandEvent& event );
|
|
|
|
|
|
|
|
/// wxEVT_COMMAND_TEXT_UPDATED 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
|
|
|
|
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
|
|
|
|
void OnSymbolfontctrlSelected( wxCommandEvent& event );
|
|
|
|
|
|
|
|
/// wxEVT_COMMAND_TEXT_UPDATED event handler for ID_RICHTEXTBULLETSPAGE_SYMBOLFONTCTRL
|
|
|
|
void OnSymbolfontctrlUpdated( wxCommandEvent& event );
|
|
|
|
|
|
|
|
/// wxEVT_UPDATE_UI event handler for ID_RICHTEXTBULLETSPAGE_SYMBOLFONTCTRL
|
|
|
|
void OnSymbolfontctrlUIUpdate( wxUpdateUIEvent& event );
|
|
|
|
|
2006-10-20 09:04:12 -04:00
|
|
|
/// wxEVT_UPDATE_UI event handler for ID_RICHTEXTBULLETSPAGE_NAMESTATIC
|
|
|
|
void OnNamestaticUpdate( wxUpdateUIEvent& event );
|
2006-10-08 10:05:17 -04:00
|
|
|
|
2006-10-20 09:04:12 -04:00
|
|
|
/// wxEVT_COMMAND_COMBOBOX_SELECTED event handler for ID_RICHTEXTBULLETSPAGE_NAMECTRL
|
|
|
|
void OnNamectrlSelected( wxCommandEvent& event );
|
2006-10-08 10:05:17 -04:00
|
|
|
|
2006-10-20 09:04:12 -04:00
|
|
|
/// wxEVT_COMMAND_TEXT_UPDATED event handler for ID_RICHTEXTBULLETSPAGE_NAMECTRL
|
|
|
|
void OnNamectrlUpdated( wxCommandEvent& event );
|
2006-10-08 10:05:17 -04:00
|
|
|
|
2006-10-20 09:04:12 -04:00
|
|
|
/// wxEVT_UPDATE_UI event handler for ID_RICHTEXTBULLETSPAGE_NAMECTRL
|
|
|
|
void OnNamectrlUIUpdate( wxUpdateUIEvent& event );
|
2006-10-08 10:05:17 -04:00
|
|
|
|
2006-10-26 02:32:47 -04:00
|
|
|
/// wxEVT_UPDATE_UI event handler for ID_RICHTEXTBULLETSPAGE_NUMBERSTATIC
|
|
|
|
void OnNumberstaticUpdate( wxUpdateUIEvent& event );
|
|
|
|
|
|
|
|
/// wxEVT_COMMAND_SPINCTRL_UPDATED event handler for ID_RICHTEXTBULLETSPAGE_NUMBERCTRL
|
|
|
|
void OnNumberctrlUpdated( wxSpinEvent& event );
|
|
|
|
|
|
|
|
/// wxEVT_SCROLL_LINEUP event handler for ID_RICHTEXTBULLETSPAGE_NUMBERCTRL
|
|
|
|
void OnNumberctrlUp( wxSpinEvent& event );
|
|
|
|
|
|
|
|
/// wxEVT_SCROLL_LINEDOWN event handler for ID_RICHTEXTBULLETSPAGE_NUMBERCTRL
|
|
|
|
void OnNumberctrlDown( wxSpinEvent& event );
|
|
|
|
|
|
|
|
/// wxEVT_COMMAND_TEXT_UPDATED event handler for ID_RICHTEXTBULLETSPAGE_NUMBERCTRL
|
|
|
|
void OnNumberctrlTextUpdated( wxCommandEvent& event );
|
|
|
|
|
|
|
|
/// wxEVT_UPDATE_UI event handler for ID_RICHTEXTBULLETSPAGE_NUMBERCTRL
|
|
|
|
void OnNumberctrlUpdate( wxUpdateUIEvent& event );
|
|
|
|
|
2006-10-08 10:05:17 -04:00
|
|
|
////@end wxRichTextBulletsPage event handler declarations
|
|
|
|
|
|
|
|
////@begin wxRichTextBulletsPage member function declarations
|
|
|
|
|
|
|
|
/// Retrieves bitmap resources
|
|
|
|
wxBitmap GetBitmapResource( const wxString& name );
|
|
|
|
|
|
|
|
/// Retrieves icon resources
|
|
|
|
wxIcon GetIconResource( const wxString& name );
|
|
|
|
////@end wxRichTextBulletsPage member function declarations
|
|
|
|
|
|
|
|
/// Should we show tooltips?
|
|
|
|
static bool ShowToolTips();
|
|
|
|
|
|
|
|
////@begin wxRichTextBulletsPage member variables
|
|
|
|
wxListBox* m_styleListBox;
|
2006-10-20 09:04:12 -04:00
|
|
|
wxCheckBox* m_periodCtrl;
|
|
|
|
wxCheckBox* m_parenthesesCtrl;
|
2006-10-26 02:32:47 -04:00
|
|
|
wxCheckBox* m_rightParenthesisCtrl;
|
|
|
|
wxComboBox* m_bulletAlignmentCtrl;
|
2006-10-08 10:05:17 -04:00
|
|
|
wxComboBox* m_symbolCtrl;
|
|
|
|
wxComboBox* m_symbolFontCtrl;
|
2006-10-20 09:04:12 -04:00
|
|
|
wxComboBox* m_bulletNameCtrl;
|
2006-10-26 02:32:47 -04:00
|
|
|
wxSpinCtrl* m_numberCtrl;
|
2006-10-08 10:05:17 -04:00
|
|
|
wxRichTextCtrl* m_previewCtrl;
|
|
|
|
/// Control identifiers
|
|
|
|
enum {
|
|
|
|
ID_RICHTEXTBULLETSPAGE = 10300,
|
|
|
|
ID_RICHTEXTBULLETSPAGE_STYLELISTBOX = 10305,
|
2006-10-20 09:04:12 -04:00
|
|
|
ID_RICHTEXTBULLETSPAGE_PERIODCTRL = 10313,
|
|
|
|
ID_RICHTEXTBULLETSPAGE_PARENTHESESCTRL = 10311,
|
2006-10-26 02:32:47 -04:00
|
|
|
ID_RICHTEXTBULLETSPAGE_RIGHTPARENTHESISCTRL = 10306,
|
|
|
|
ID_RICHTEXTBULLETSPAGE_BULLETALIGNMENTCTRL = 10315,
|
2006-10-08 10:05:17 -04:00
|
|
|
ID_RICHTEXTBULLETSPAGE_SYMBOLSTATIC = 10301,
|
|
|
|
ID_RICHTEXTBULLETSPAGE_SYMBOLCTRL = 10307,
|
|
|
|
ID_RICHTEXTBULLETSPAGE_CHOOSE_SYMBOL = 10308,
|
|
|
|
ID_RICHTEXTBULLETSPAGE_SYMBOLFONTCTRL = 10309,
|
2006-10-20 09:04:12 -04:00
|
|
|
ID_RICHTEXTBULLETSPAGE_NAMESTATIC = 10303,
|
|
|
|
ID_RICHTEXTBULLETSPAGE_NAMECTRL = 10304,
|
2006-10-26 02:32:47 -04:00
|
|
|
ID_RICHTEXTBULLETSPAGE_NUMBERSTATIC = 10302,
|
|
|
|
ID_RICHTEXTBULLETSPAGE_NUMBERCTRL = 10310,
|
2006-10-08 10:05:17 -04:00
|
|
|
ID_RICHTEXTBULLETSPAGE_PREVIEW_CTRL = 10314
|
|
|
|
};
|
|
|
|
////@end wxRichTextBulletsPage member variables
|
|
|
|
|
|
|
|
bool m_hasBulletStyle;
|
|
|
|
bool m_hasBulletNumber;
|
|
|
|
bool m_hasBulletSymbol;
|
|
|
|
bool m_dontUpdate;
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|
|
|
|
// _RICHTEXTBULLETSPAGE_H_
|