2006-10-08 10:05:17 -04:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
2006-10-09 06:26:18 -04:00
|
|
|
// Name: wx/richtext/richtextindentspage.h
|
2013-10-30 12:23:56 -04:00
|
|
|
// Purpose: Declares the rich text formatting dialog indent page.
|
2006-10-08 10:05:17 -04:00
|
|
|
// Author: Julian Smart
|
|
|
|
// Modified by:
|
|
|
|
// Created: 10/3/2006 2:28:21 PM
|
|
|
|
// Copyright: (c) Julian Smart
|
2006-10-09 06:26:18 -04:00
|
|
|
// Licence: wxWindows licence
|
2006-10-08 10:05:17 -04:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#ifndef _RICHTEXTINDENTSPAGE_H_
|
|
|
|
#define _RICHTEXTINDENTSPAGE_H_
|
|
|
|
|
|
|
|
/*!
|
|
|
|
* Includes
|
|
|
|
*/
|
|
|
|
|
2011-01-14 06:57:44 -05:00
|
|
|
#include "wx/richtext/richtextdialogpage.h"
|
|
|
|
|
2006-10-08 10:05:17 -04:00
|
|
|
////@begin includes
|
|
|
|
#include "wx/statline.h"
|
|
|
|
////@end includes
|
|
|
|
|
|
|
|
/*!
|
|
|
|
* Forward declarations
|
|
|
|
*/
|
|
|
|
|
|
|
|
////@begin forward declarations
|
|
|
|
class wxRichTextCtrl;
|
|
|
|
////@end forward declarations
|
|
|
|
|
|
|
|
/*!
|
|
|
|
* Control identifiers
|
|
|
|
*/
|
|
|
|
|
|
|
|
////@begin control identifiers
|
|
|
|
#define SYMBOL_WXRICHTEXTINDENTSSPACINGPAGE_STYLE wxRESIZE_BORDER|wxTAB_TRAVERSAL
|
2010-04-27 12:09:22 -04:00
|
|
|
#define SYMBOL_WXRICHTEXTINDENTSSPACINGPAGE_TITLE wxEmptyString
|
2006-10-08 10:05:17 -04:00
|
|
|
#define SYMBOL_WXRICHTEXTINDENTSSPACINGPAGE_IDNAME ID_RICHTEXTINDENTSSPACINGPAGE
|
|
|
|
#define SYMBOL_WXRICHTEXTINDENTSSPACINGPAGE_SIZE wxSize(400, 300)
|
|
|
|
#define SYMBOL_WXRICHTEXTINDENTSSPACINGPAGE_POSITION wxDefaultPosition
|
|
|
|
////@end control identifiers
|
|
|
|
|
|
|
|
/*!
|
|
|
|
* wxRichTextIndentsSpacingPage class declaration
|
|
|
|
*/
|
|
|
|
|
2011-01-14 06:57:44 -05:00
|
|
|
class WXDLLIMPEXP_RICHTEXT wxRichTextIndentsSpacingPage: public wxRichTextDialogPage
|
2006-10-08 10:05:17 -04:00
|
|
|
{
|
|
|
|
DECLARE_DYNAMIC_CLASS( wxRichTextIndentsSpacingPage )
|
|
|
|
DECLARE_EVENT_TABLE()
|
2011-01-14 06:57:44 -05:00
|
|
|
DECLARE_HELP_PROVISION()
|
2006-10-08 10:05:17 -04:00
|
|
|
|
|
|
|
public:
|
|
|
|
/// Constructors
|
|
|
|
wxRichTextIndentsSpacingPage( );
|
2006-10-29 17:01:06 -05:00
|
|
|
wxRichTextIndentsSpacingPage( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = SYMBOL_WXRICHTEXTINDENTSSPACINGPAGE_POSITION, const wxSize& size = SYMBOL_WXRICHTEXTINDENTSSPACINGPAGE_SIZE, long style = SYMBOL_WXRICHTEXTINDENTSSPACINGPAGE_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_WXRICHTEXTINDENTSSPACINGPAGE_POSITION, const wxSize& size = SYMBOL_WXRICHTEXTINDENTSSPACINGPAGE_SIZE, long style = SYMBOL_WXRICHTEXTINDENTSSPACINGPAGE_STYLE );
|
2006-10-08 10:05:17 -04:00
|
|
|
|
|
|
|
/// Initialise members
|
|
|
|
void Init();
|
|
|
|
|
|
|
|
/// Creates the controls and sizers
|
|
|
|
void CreateControls();
|
|
|
|
|
|
|
|
/// Transfer data from/to window
|
|
|
|
virtual bool TransferDataFromWindow();
|
|
|
|
virtual bool TransferDataToWindow();
|
|
|
|
|
|
|
|
/// Updates the paragraph preview
|
|
|
|
void UpdatePreview();
|
|
|
|
|
|
|
|
/// Gets the attributes associated with the main formatting dialog
|
2010-10-04 04:37:31 -04:00
|
|
|
wxRichTextAttr* GetAttributes();
|
2006-10-08 10:05:17 -04:00
|
|
|
|
|
|
|
////@begin wxRichTextIndentsSpacingPage event handler declarations
|
|
|
|
|
2013-08-04 03:58:47 -04:00
|
|
|
/// wxEVT_COMMAND_RADIOBUTTON_SELECTED event handler for ID_RICHTEXTINDENTSSPACINGPAGE_ALIGNMENT_LEFT
|
2006-10-08 10:05:17 -04:00
|
|
|
void OnAlignmentLeftSelected( wxCommandEvent& event );
|
|
|
|
|
2013-08-04 03:58:47 -04:00
|
|
|
/// wxEVT_COMMAND_RADIOBUTTON_SELECTED event handler for ID_RICHTEXTINDENTSSPACINGPAGE_ALIGNMENT_RIGHT
|
2006-10-08 10:05:17 -04:00
|
|
|
void OnAlignmentRightSelected( wxCommandEvent& event );
|
|
|
|
|
2013-08-04 03:58:47 -04:00
|
|
|
/// wxEVT_COMMAND_RADIOBUTTON_SELECTED event handler for ID_RICHTEXTINDENTSSPACINGPAGE_ALIGNMENT_JUSTIFIED
|
2006-10-08 10:05:17 -04:00
|
|
|
void OnAlignmentJustifiedSelected( wxCommandEvent& event );
|
|
|
|
|
2013-08-04 03:58:47 -04:00
|
|
|
/// wxEVT_COMMAND_RADIOBUTTON_SELECTED event handler for ID_RICHTEXTINDENTSSPACINGPAGE_ALIGNMENT_CENTRED
|
2006-10-08 10:05:17 -04:00
|
|
|
void OnAlignmentCentredSelected( wxCommandEvent& event );
|
|
|
|
|
2013-08-04 03:58:47 -04:00
|
|
|
/// wxEVT_COMMAND_RADIOBUTTON_SELECTED event handler for ID_RICHTEXTINDENTSSPACINGPAGE_ALIGNMENT_INDETERMINATE
|
2006-10-08 10:05:17 -04:00
|
|
|
void OnAlignmentIndeterminateSelected( wxCommandEvent& event );
|
|
|
|
|
2013-08-04 03:58:47 -04:00
|
|
|
/// wxEVT_COMMAND_TEXT_UPDATED event handler for ID_RICHTEXTINDENTSSPACINGPAGE_INDENT_LEFT
|
2006-10-08 10:05:17 -04:00
|
|
|
void OnIndentLeftUpdated( wxCommandEvent& event );
|
|
|
|
|
2013-08-04 03:58:47 -04:00
|
|
|
/// wxEVT_COMMAND_TEXT_UPDATED event handler for ID_RICHTEXTINDENTSSPACINGPAGE_INDENT_LEFT_FIRST
|
2006-10-08 10:05:17 -04:00
|
|
|
void OnIndentLeftFirstUpdated( wxCommandEvent& event );
|
|
|
|
|
2013-08-04 03:58:47 -04:00
|
|
|
/// wxEVT_COMMAND_TEXT_UPDATED event handler for ID_RICHTEXTINDENTSSPACINGPAGE_INDENT_RIGHT
|
2006-10-08 10:05:17 -04:00
|
|
|
void OnIndentRightUpdated( wxCommandEvent& event );
|
|
|
|
|
2013-08-04 03:58:47 -04:00
|
|
|
/// wxEVT_COMMAND_COMBOBOX_SELECTED event handler for ID_RICHTEXTINDENTSSPACINGPAGE_OUTLINELEVEL
|
2006-11-10 10:48:46 -05:00
|
|
|
void OnRichtextOutlinelevelSelected( wxCommandEvent& event );
|
|
|
|
|
2013-08-04 03:58:47 -04:00
|
|
|
/// wxEVT_COMMAND_TEXT_UPDATED event handler for ID_RICHTEXTINDENTSSPACINGPAGE_SPACING_BEFORE
|
2006-10-08 10:05:17 -04:00
|
|
|
void OnSpacingBeforeUpdated( wxCommandEvent& event );
|
|
|
|
|
2013-08-04 03:58:47 -04:00
|
|
|
/// wxEVT_COMMAND_TEXT_UPDATED event handler for ID_RICHTEXTINDENTSSPACINGPAGE_SPACING_AFTER
|
2006-10-08 10:05:17 -04:00
|
|
|
void OnSpacingAfterUpdated( wxCommandEvent& event );
|
|
|
|
|
2013-08-04 03:58:47 -04:00
|
|
|
/// wxEVT_COMMAND_COMBOBOX_SELECTED event handler for ID_RICHTEXTINDENTSSPACINGPAGE_SPACING_LINE
|
2006-10-08 10:05:17 -04:00
|
|
|
void OnSpacingLineSelected( wxCommandEvent& event );
|
|
|
|
|
|
|
|
////@end wxRichTextIndentsSpacingPage event handler declarations
|
|
|
|
|
|
|
|
////@begin wxRichTextIndentsSpacingPage member function declarations
|
|
|
|
|
|
|
|
/// Retrieves bitmap resources
|
|
|
|
wxBitmap GetBitmapResource( const wxString& name );
|
|
|
|
|
|
|
|
/// Retrieves icon resources
|
|
|
|
wxIcon GetIconResource( const wxString& name );
|
|
|
|
////@end wxRichTextIndentsSpacingPage member function declarations
|
|
|
|
|
|
|
|
/// Should we show tooltips?
|
|
|
|
static bool ShowToolTips();
|
|
|
|
|
|
|
|
////@begin wxRichTextIndentsSpacingPage member variables
|
|
|
|
wxRadioButton* m_alignmentLeft;
|
|
|
|
wxRadioButton* m_alignmentRight;
|
|
|
|
wxRadioButton* m_alignmentJustified;
|
|
|
|
wxRadioButton* m_alignmentCentred;
|
|
|
|
wxRadioButton* m_alignmentIndeterminate;
|
|
|
|
wxTextCtrl* m_indentLeft;
|
|
|
|
wxTextCtrl* m_indentLeftFirst;
|
|
|
|
wxTextCtrl* m_indentRight;
|
2006-11-10 10:48:46 -05:00
|
|
|
wxComboBox* m_outlineLevelCtrl;
|
2006-10-08 10:05:17 -04:00
|
|
|
wxTextCtrl* m_spacingBefore;
|
|
|
|
wxTextCtrl* m_spacingAfter;
|
|
|
|
wxComboBox* m_spacingLine;
|
2011-08-04 08:31:44 -04:00
|
|
|
wxCheckBox* m_pageBreakCtrl;
|
2006-10-08 10:05:17 -04:00
|
|
|
wxRichTextCtrl* m_previewCtrl;
|
|
|
|
/// Control identifiers
|
|
|
|
enum {
|
|
|
|
ID_RICHTEXTINDENTSSPACINGPAGE = 10100,
|
|
|
|
ID_RICHTEXTINDENTSSPACINGPAGE_ALIGNMENT_LEFT = 10102,
|
|
|
|
ID_RICHTEXTINDENTSSPACINGPAGE_ALIGNMENT_RIGHT = 10110,
|
|
|
|
ID_RICHTEXTINDENTSSPACINGPAGE_ALIGNMENT_JUSTIFIED = 10111,
|
|
|
|
ID_RICHTEXTINDENTSSPACINGPAGE_ALIGNMENT_CENTRED = 10112,
|
|
|
|
ID_RICHTEXTINDENTSSPACINGPAGE_ALIGNMENT_INDETERMINATE = 10101,
|
|
|
|
ID_RICHTEXTINDENTSSPACINGPAGE_INDENT_LEFT = 10103,
|
|
|
|
ID_RICHTEXTINDENTSSPACINGPAGE_INDENT_LEFT_FIRST = 10104,
|
|
|
|
ID_RICHTEXTINDENTSSPACINGPAGE_INDENT_RIGHT = 10113,
|
2006-11-10 10:48:46 -05:00
|
|
|
ID_RICHTEXTINDENTSSPACINGPAGE_OUTLINELEVEL = 10105,
|
2006-10-08 10:05:17 -04:00
|
|
|
ID_RICHTEXTINDENTSSPACINGPAGE_SPACING_BEFORE = 10114,
|
|
|
|
ID_RICHTEXTINDENTSSPACINGPAGE_SPACING_AFTER = 10116,
|
|
|
|
ID_RICHTEXTINDENTSSPACINGPAGE_SPACING_LINE = 10115,
|
2011-08-04 08:31:44 -04:00
|
|
|
ID_RICHTEXTINDENTSSPACINGPAGE_PAGEBREAK = 10106,
|
2006-10-08 10:05:17 -04:00
|
|
|
ID_RICHTEXTINDENTSSPACINGPAGE_PREVIEW_CTRL = 10109
|
|
|
|
};
|
|
|
|
////@end wxRichTextIndentsSpacingPage member variables
|
|
|
|
|
|
|
|
bool m_dontUpdate;
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|
|
|
|
// _RICHTEXTINDENTSPAGE_H_
|