2006-10-08 10:05:17 -04:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
2006-10-09 06:26:18 -04:00
|
|
|
// Name: wx/richtext/richtextstylepage.h
|
2013-10-30 12:23:56 -04:00
|
|
|
// Purpose: Declares the rich text formatting dialog style page.
|
2006-10-08 10:05:17 -04:00
|
|
|
// Author: Julian Smart
|
2006-10-20 03:48:31 -04:00
|
|
|
// Modified by:
|
2006-10-08 10:05:17 -04:00
|
|
|
// Created: 10/5/2006 11:34:55 AM
|
|
|
|
// Copyright: (c) Julian Smart
|
2006-10-09 06:26:18 -04:00
|
|
|
// Licence: wxWindows licence
|
2006-10-08 10:05:17 -04:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#ifndef _RICHTEXTSTYLEPAGE_H_
|
|
|
|
#define _RICHTEXTSTYLEPAGE_H_
|
|
|
|
|
2011-01-14 06:57:44 -05:00
|
|
|
#include "wx/richtext/richtextdialogpage.h"
|
|
|
|
|
2006-10-08 10:05:17 -04:00
|
|
|
/*!
|
|
|
|
* Control identifiers
|
|
|
|
*/
|
|
|
|
|
|
|
|
////@begin control identifiers
|
|
|
|
#define SYMBOL_WXRICHTEXTSTYLEPAGE_STYLE wxRESIZE_BORDER|wxTAB_TRAVERSAL
|
2011-01-14 06:57:44 -05:00
|
|
|
#define SYMBOL_WXRICHTEXTSTYLEPAGE_TITLE wxEmptyString
|
2006-10-08 10:05:17 -04:00
|
|
|
#define SYMBOL_WXRICHTEXTSTYLEPAGE_IDNAME ID_RICHTEXTSTYLEPAGE
|
|
|
|
#define SYMBOL_WXRICHTEXTSTYLEPAGE_SIZE wxSize(400, 300)
|
|
|
|
#define SYMBOL_WXRICHTEXTSTYLEPAGE_POSITION wxDefaultPosition
|
|
|
|
////@end control identifiers
|
|
|
|
|
|
|
|
/*!
|
|
|
|
* wxRichTextStylePage class declaration
|
|
|
|
*/
|
|
|
|
|
2011-01-14 06:57:44 -05:00
|
|
|
class WXDLLIMPEXP_RICHTEXT wxRichTextStylePage: public wxRichTextDialogPage
|
2006-10-20 03:48:31 -04:00
|
|
|
{
|
2006-10-08 10:05:17 -04:00
|
|
|
DECLARE_DYNAMIC_CLASS( wxRichTextStylePage )
|
|
|
|
DECLARE_EVENT_TABLE()
|
2011-01-14 06:57:44 -05:00
|
|
|
DECLARE_HELP_PROVISION()
|
2006-10-08 10:05:17 -04:00
|
|
|
|
|
|
|
public:
|
|
|
|
/// Constructors
|
|
|
|
wxRichTextStylePage( );
|
2006-10-29 17:01:06 -05:00
|
|
|
wxRichTextStylePage( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = SYMBOL_WXRICHTEXTSTYLEPAGE_POSITION, const wxSize& size = SYMBOL_WXRICHTEXTSTYLEPAGE_SIZE, long style = SYMBOL_WXRICHTEXTSTYLEPAGE_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_WXRICHTEXTSTYLEPAGE_POSITION, const wxSize& size = SYMBOL_WXRICHTEXTSTYLEPAGE_SIZE, long style = SYMBOL_WXRICHTEXTSTYLEPAGE_STYLE );
|
2006-10-20 03:48:31 -04:00
|
|
|
|
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();
|
|
|
|
|
|
|
|
/// 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
|
|
|
|
2013-11-06 10:08:37 -05:00
|
|
|
/// Determines whether the style name can be edited
|
|
|
|
bool GetNameIsEditable() const { return m_nameIsEditable; }
|
|
|
|
void SetNameIsEditable(bool editable) { m_nameIsEditable = editable; }
|
|
|
|
|
2006-10-08 10:05:17 -04:00
|
|
|
////@begin wxRichTextStylePage event handler declarations
|
|
|
|
|
|
|
|
/// wxEVT_UPDATE_UI event handler for ID_RICHTEXTSTYLEPAGE_NEXT_STYLE
|
|
|
|
void OnNextStyleUpdate( wxUpdateUIEvent& event );
|
|
|
|
|
|
|
|
////@end wxRichTextStylePage event handler declarations
|
|
|
|
|
|
|
|
////@begin wxRichTextStylePage member function declarations
|
|
|
|
|
|
|
|
/// Retrieves bitmap resources
|
|
|
|
wxBitmap GetBitmapResource( const wxString& name );
|
|
|
|
|
|
|
|
/// Retrieves icon resources
|
|
|
|
wxIcon GetIconResource( const wxString& name );
|
|
|
|
////@end wxRichTextStylePage member function declarations
|
|
|
|
|
|
|
|
/// Should we show tooltips?
|
|
|
|
static bool ShowToolTips();
|
|
|
|
|
|
|
|
////@begin wxRichTextStylePage member variables
|
|
|
|
wxTextCtrl* m_styleName;
|
|
|
|
wxComboBox* m_basedOn;
|
|
|
|
wxComboBox* m_nextStyle;
|
|
|
|
/// Control identifiers
|
|
|
|
enum {
|
|
|
|
ID_RICHTEXTSTYLEPAGE = 10403,
|
|
|
|
ID_RICHTEXTSTYLEPAGE_STYLE_NAME = 10404,
|
|
|
|
ID_RICHTEXTSTYLEPAGE_BASED_ON = 10405,
|
|
|
|
ID_RICHTEXTSTYLEPAGE_NEXT_STYLE = 10406
|
|
|
|
};
|
|
|
|
////@end wxRichTextStylePage member variables
|
2013-11-06 10:08:37 -05:00
|
|
|
|
|
|
|
bool m_nameIsEditable;
|
2006-10-08 10:05:17 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|
|
|
|
// _RICHTEXTSTYLEPAGE_H_
|