2006-10-08 14:05:17 +00:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
2006-10-09 10:26:18 +00:00
|
|
|
// Name: wx/richtext/richtexttabspage.h
|
2006-10-08 14:05:17 +00:00
|
|
|
// Purpose:
|
|
|
|
// Author: Julian Smart
|
|
|
|
// Modified by:
|
|
|
|
// Created: 10/4/2006 8:03:20 AM
|
2006-10-09 10:26:18 +00:00
|
|
|
// RCS-ID: $Id$
|
2006-10-08 14:05:17 +00:00
|
|
|
// Copyright: (c) Julian Smart
|
2006-10-09 10:26:18 +00:00
|
|
|
// Licence: wxWindows licence
|
2006-10-08 14:05:17 +00:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#ifndef _RICHTEXTTABSPAGE_H_
|
|
|
|
#define _RICHTEXTTABSPAGE_H_
|
|
|
|
|
|
|
|
/*!
|
|
|
|
* Includes
|
|
|
|
*/
|
|
|
|
|
2011-01-14 11:57:44 +00:00
|
|
|
#include "wx/richtext/richtextdialogpage.h"
|
|
|
|
|
2006-10-08 14:05:17 +00:00
|
|
|
////@begin includes
|
|
|
|
////@end includes
|
|
|
|
|
|
|
|
/*!
|
|
|
|
* Forward declarations
|
|
|
|
*/
|
|
|
|
|
|
|
|
////@begin forward declarations
|
|
|
|
////@end forward declarations
|
|
|
|
|
|
|
|
/*!
|
|
|
|
* Control identifiers
|
|
|
|
*/
|
|
|
|
|
|
|
|
////@begin control identifiers
|
|
|
|
#define SYMBOL_WXRICHTEXTTABSPAGE_STYLE wxRESIZE_BORDER|wxTAB_TRAVERSAL
|
2011-01-14 11:57:44 +00:00
|
|
|
#define SYMBOL_WXRICHTEXTTABSPAGE_TITLE wxEmptyString
|
2006-10-08 14:05:17 +00:00
|
|
|
#define SYMBOL_WXRICHTEXTTABSPAGE_IDNAME ID_RICHTEXTTABSPAGE
|
|
|
|
#define SYMBOL_WXRICHTEXTTABSPAGE_SIZE wxSize(400, 300)
|
|
|
|
#define SYMBOL_WXRICHTEXTTABSPAGE_POSITION wxDefaultPosition
|
|
|
|
////@end control identifiers
|
|
|
|
|
|
|
|
/*!
|
|
|
|
* wxRichTextTabsPage class declaration
|
|
|
|
*/
|
|
|
|
|
2011-01-14 11:57:44 +00:00
|
|
|
class WXDLLIMPEXP_RICHTEXT wxRichTextTabsPage: public wxRichTextDialogPage
|
2006-10-08 14:05:17 +00:00
|
|
|
{
|
|
|
|
DECLARE_DYNAMIC_CLASS( wxRichTextTabsPage )
|
|
|
|
DECLARE_EVENT_TABLE()
|
2011-01-14 11:57:44 +00:00
|
|
|
DECLARE_HELP_PROVISION()
|
2006-10-08 14:05:17 +00:00
|
|
|
|
|
|
|
public:
|
|
|
|
/// Constructors
|
|
|
|
wxRichTextTabsPage( );
|
2006-10-29 22:01:06 +00:00
|
|
|
wxRichTextTabsPage( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = SYMBOL_WXRICHTEXTTABSPAGE_POSITION, const wxSize& size = SYMBOL_WXRICHTEXTTABSPAGE_SIZE, long style = SYMBOL_WXRICHTEXTTABSPAGE_STYLE );
|
2006-10-08 14:05:17 +00:00
|
|
|
|
|
|
|
/// Creation
|
2006-10-29 22:01:06 +00:00
|
|
|
bool Create( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = SYMBOL_WXRICHTEXTTABSPAGE_POSITION, const wxSize& size = SYMBOL_WXRICHTEXTTABSPAGE_SIZE, long style = SYMBOL_WXRICHTEXTTABSPAGE_STYLE );
|
2006-10-08 14:05:17 +00:00
|
|
|
|
|
|
|
/// Creates the controls and sizers
|
|
|
|
void CreateControls();
|
|
|
|
|
|
|
|
/// Initialise members
|
|
|
|
void Init();
|
|
|
|
|
|
|
|
/// Transfer data from/to window
|
|
|
|
virtual bool TransferDataFromWindow();
|
|
|
|
virtual bool TransferDataToWindow();
|
|
|
|
|
|
|
|
/// Sorts the tab array
|
|
|
|
virtual void SortTabs();
|
|
|
|
|
|
|
|
/// Gets the attributes associated with the main formatting dialog
|
2010-10-04 08:37:31 +00:00
|
|
|
wxRichTextAttr* GetAttributes();
|
2006-10-08 14:05:17 +00:00
|
|
|
|
|
|
|
////@begin wxRichTextTabsPage event handler declarations
|
|
|
|
|
|
|
|
/// wxEVT_COMMAND_LISTBOX_SELECTED event handler for ID_RICHTEXTTABSPAGE_TABLIST
|
|
|
|
void OnTablistSelected( wxCommandEvent& event );
|
|
|
|
|
|
|
|
/// wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_RICHTEXTTABSPAGE_NEW_TAB
|
|
|
|
void OnNewTabClick( wxCommandEvent& event );
|
|
|
|
|
|
|
|
/// wxEVT_UPDATE_UI event handler for ID_RICHTEXTTABSPAGE_NEW_TAB
|
|
|
|
void OnNewTabUpdate( wxUpdateUIEvent& event );
|
|
|
|
|
|
|
|
/// wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_RICHTEXTTABSPAGE_DELETE_TAB
|
|
|
|
void OnDeleteTabClick( wxCommandEvent& event );
|
|
|
|
|
|
|
|
/// wxEVT_UPDATE_UI event handler for ID_RICHTEXTTABSPAGE_DELETE_TAB
|
|
|
|
void OnDeleteTabUpdate( wxUpdateUIEvent& event );
|
|
|
|
|
|
|
|
/// wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_RICHTEXTTABSPAGE_DELETE_ALL_TABS
|
|
|
|
void OnDeleteAllTabsClick( wxCommandEvent& event );
|
|
|
|
|
|
|
|
/// wxEVT_UPDATE_UI event handler for ID_RICHTEXTTABSPAGE_DELETE_ALL_TABS
|
|
|
|
void OnDeleteAllTabsUpdate( wxUpdateUIEvent& event );
|
|
|
|
|
|
|
|
////@end wxRichTextTabsPage event handler declarations
|
|
|
|
|
|
|
|
////@begin wxRichTextTabsPage member function declarations
|
|
|
|
|
|
|
|
/// Retrieves bitmap resources
|
|
|
|
wxBitmap GetBitmapResource( const wxString& name );
|
|
|
|
|
|
|
|
/// Retrieves icon resources
|
|
|
|
wxIcon GetIconResource( const wxString& name );
|
|
|
|
////@end wxRichTextTabsPage member function declarations
|
|
|
|
|
|
|
|
/// Should we show tooltips?
|
|
|
|
static bool ShowToolTips();
|
|
|
|
|
|
|
|
////@begin wxRichTextTabsPage member variables
|
|
|
|
wxTextCtrl* m_tabEditCtrl;
|
|
|
|
wxListBox* m_tabListCtrl;
|
|
|
|
/// Control identifiers
|
|
|
|
enum {
|
|
|
|
ID_RICHTEXTTABSPAGE = 10200,
|
|
|
|
ID_RICHTEXTTABSPAGE_TABEDIT = 10213,
|
|
|
|
ID_RICHTEXTTABSPAGE_TABLIST = 10214,
|
|
|
|
ID_RICHTEXTTABSPAGE_NEW_TAB = 10201,
|
|
|
|
ID_RICHTEXTTABSPAGE_DELETE_TAB = 10202,
|
|
|
|
ID_RICHTEXTTABSPAGE_DELETE_ALL_TABS = 10203
|
|
|
|
};
|
|
|
|
////@end wxRichTextTabsPage member variables
|
|
|
|
|
|
|
|
bool m_tabsPresent;
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|
|
|
|
// _RICHTEXTTABSPAGE_H_
|