Warnings, build errors, headers, licence, prefered api and non-PCH support cleaning of fresh richtext code.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@41795 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -1,12 +1,12 @@
|
|||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
// Name: richtextbulletspage.h
|
// Name: wx/richtext/richtextbulletspage.h
|
||||||
// Purpose:
|
// Purpose:
|
||||||
// Author: Julian Smart
|
// Author: Julian Smart
|
||||||
// Modified by:
|
// Modified by:
|
||||||
// Created: 10/4/2006 10:32:31 AM
|
// Created: 10/4/2006 10:32:31 AM
|
||||||
// RCS-ID:
|
// RCS-ID: $Id$
|
||||||
// Copyright: (c) Julian Smart
|
// Copyright: (c) Julian Smart
|
||||||
// Licence:
|
// Licence: wxWindows licence
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
#ifndef _RICHTEXTBULLETSPAGE_H_
|
#ifndef _RICHTEXTBULLETSPAGE_H_
|
||||||
@@ -42,14 +42,6 @@ class wxRichTextCtrl;
|
|||||||
#define SYMBOL_WXRICHTEXTBULLETSPAGE_POSITION wxDefaultPosition
|
#define SYMBOL_WXRICHTEXTBULLETSPAGE_POSITION wxDefaultPosition
|
||||||
////@end control identifiers
|
////@end control identifiers
|
||||||
|
|
||||||
/*!
|
|
||||||
* Compatibility
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef wxCLOSE_BOX
|
|
||||||
#define wxCLOSE_BOX 0x1000
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* wxRichTextBulletsPage class declaration
|
* wxRichTextBulletsPage class declaration
|
||||||
*/
|
*/
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
// Name: src/richtext/richeditfontpage.h
|
// Name: wx/richtext/richeditfontpage.h
|
||||||
// Purpose: Font page for wxRichTextFormattingDialog
|
// Purpose: Font page for wxRichTextFormattingDialog
|
||||||
// Author: Julian Smart
|
// Author: Julian Smart
|
||||||
// Modified by:
|
// Modified by:
|
||||||
|
@@ -205,7 +205,6 @@ public:
|
|||||||
wxRichTextColourSwatchCtrl(wxWindow* parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0);
|
wxRichTextColourSwatchCtrl(wxWindow* parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0);
|
||||||
~wxRichTextColourSwatchCtrl();
|
~wxRichTextColourSwatchCtrl();
|
||||||
|
|
||||||
void OnPaint(wxPaintEvent& event);
|
|
||||||
void OnMouseEvent(wxMouseEvent& event);
|
void OnMouseEvent(wxMouseEvent& event);
|
||||||
|
|
||||||
void SetColour(const wxColour& colour) { m_colour = colour; SetBackgroundColour(m_colour); }
|
void SetColour(const wxColour& colour) { m_colour = colour; SetBackgroundColour(m_colour); }
|
||||||
@@ -278,4 +277,3 @@ private:
|
|||||||
|
|
||||||
#endif
|
#endif
|
||||||
// _WX_RICHTEXTFORMATDLG_H_
|
// _WX_RICHTEXTFORMATDLG_H_
|
||||||
|
|
||||||
|
@@ -1,12 +1,12 @@
|
|||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
// Name: richtextindentspage.h
|
// Name: wx/richtext/richtextindentspage.h
|
||||||
// Purpose:
|
// Purpose:
|
||||||
// Author: Julian Smart
|
// Author: Julian Smart
|
||||||
// Modified by:
|
// Modified by:
|
||||||
// Created: 10/3/2006 2:28:21 PM
|
// Created: 10/3/2006 2:28:21 PM
|
||||||
// RCS-ID:
|
// RCS-ID: $Id$
|
||||||
// Copyright: (c) Julian Smart
|
// Copyright: (c) Julian Smart
|
||||||
// Licence:
|
// Licence: wxWindows licence
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
#ifndef _RICHTEXTINDENTSPAGE_H_
|
#ifndef _RICHTEXTINDENTSPAGE_H_
|
||||||
@@ -40,14 +40,6 @@ class wxRichTextCtrl;
|
|||||||
#define SYMBOL_WXRICHTEXTINDENTSSPACINGPAGE_POSITION wxDefaultPosition
|
#define SYMBOL_WXRICHTEXTINDENTSSPACINGPAGE_POSITION wxDefaultPosition
|
||||||
////@end control identifiers
|
////@end control identifiers
|
||||||
|
|
||||||
/*!
|
|
||||||
* Compatibility
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef wxCLOSE_BOX
|
|
||||||
#define wxCLOSE_BOX 0x1000
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* wxRichTextIndentsSpacingPage class declaration
|
* wxRichTextIndentsSpacingPage class declaration
|
||||||
*/
|
*/
|
||||||
|
@@ -1,12 +1,12 @@
|
|||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
// Name: richtextstylepage.h
|
// Name: wx/richtext/richtextstylepage.h
|
||||||
// Purpose:
|
// Purpose:
|
||||||
// Author: Julian Smart
|
// Author: Julian Smart
|
||||||
// Modified by:
|
// Modified by:
|
||||||
// Created: 10/5/2006 11:34:55 AM
|
// Created: 10/5/2006 11:34:55 AM
|
||||||
// RCS-ID:
|
// RCS-ID: $Id$
|
||||||
// Copyright: (c) Julian Smart
|
// Copyright: (c) Julian Smart
|
||||||
// Licence:
|
// Licence: wxWindows licence
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
#ifndef _RICHTEXTSTYLEPAGE_H_
|
#ifndef _RICHTEXTSTYLEPAGE_H_
|
||||||
@@ -38,14 +38,6 @@
|
|||||||
#define SYMBOL_WXRICHTEXTSTYLEPAGE_POSITION wxDefaultPosition
|
#define SYMBOL_WXRICHTEXTSTYLEPAGE_POSITION wxDefaultPosition
|
||||||
////@end control identifiers
|
////@end control identifiers
|
||||||
|
|
||||||
/*!
|
|
||||||
* Compatibility
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef wxCLOSE_BOX
|
|
||||||
#define wxCLOSE_BOX 0x1000
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* wxRichTextStylePage class declaration
|
* wxRichTextStylePage class declaration
|
||||||
*/
|
*/
|
||||||
|
@@ -1,12 +1,12 @@
|
|||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
// Name: richtextsymboldlg.h
|
// Name: wx/richtext/richtextsymboldlg.h
|
||||||
// Purpose:
|
// Purpose:
|
||||||
// Author: Julian Smart
|
// Author: Julian Smart
|
||||||
// Modified by:
|
// Modified by:
|
||||||
// Created: 10/5/2006 3:11:58 PM
|
// Created: 10/5/2006 3:11:58 PM
|
||||||
// RCS-ID:
|
// RCS-ID: $Id$
|
||||||
// Copyright: (c) Julian Smart
|
// Copyright: (c) Julian Smart
|
||||||
// Licence:
|
// Licence: wxWindows licence
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
#ifndef _RICHTEXTSYMBOLDLG_H_
|
#ifndef _RICHTEXTSYMBOLDLG_H_
|
||||||
@@ -30,12 +30,6 @@ class WXDLLIMPEXP_CORE wxStaticText;
|
|||||||
class WXDLLIMPEXP_CORE wxTextCtrl;
|
class WXDLLIMPEXP_CORE wxTextCtrl;
|
||||||
////@end forward declarations
|
////@end forward declarations
|
||||||
|
|
||||||
#ifndef __UNICODE__
|
|
||||||
#if wxUSE_UNICODE
|
|
||||||
#define __UNICODE__
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* Symbols
|
* Symbols
|
||||||
*/
|
*/
|
||||||
@@ -110,12 +104,16 @@ public:
|
|||||||
void OnFromUnicodeSelected( wxCommandEvent& event );
|
void OnFromUnicodeSelected( wxCommandEvent& event );
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
#if defined(__WXMSW__) || defined(__WXGTK__) || defined(__WXOS2__) || defined(__WXMGL__) || defined(__WXMOTIF__) || defined(__WXCOCOA__) || defined(__WXX11__) || defined(__WXPALMOS__)
|
#if defined(__WXMSW__) || \
|
||||||
/// wxEVT_UPDATE_UI event handler for wxID_OK
|
defined(__WXMAC__) || \
|
||||||
void OnOkUpdate( wxUpdateUIEvent& event );
|
defined(__WXGTK__) || \
|
||||||
|
defined(__WXPM__) || \
|
||||||
|
defined(__WXMGL__) || \
|
||||||
|
defined(__WXMOTIF__) || \
|
||||||
|
defined(__WXCOCOA__) || \
|
||||||
|
defined(__WXX11__) || \
|
||||||
|
defined(__WXPALMOS__)
|
||||||
|
|
||||||
#endif
|
|
||||||
#if defined(__WXMAC__)
|
|
||||||
/// wxEVT_UPDATE_UI event handler for wxID_OK
|
/// wxEVT_UPDATE_UI event handler for wxID_OK
|
||||||
void OnOkUpdate( wxUpdateUIEvent& event );
|
void OnOkUpdate( wxUpdateUIEvent& event );
|
||||||
|
|
||||||
|
@@ -1,12 +1,12 @@
|
|||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
// Name: richtexttabspage.h
|
// Name: wx/richtext/richtexttabspage.h
|
||||||
// Purpose:
|
// Purpose:
|
||||||
// Author: Julian Smart
|
// Author: Julian Smart
|
||||||
// Modified by:
|
// Modified by:
|
||||||
// Created: 10/4/2006 8:03:20 AM
|
// Created: 10/4/2006 8:03:20 AM
|
||||||
// RCS-ID:
|
// RCS-ID: $Id$
|
||||||
// Copyright: (c) Julian Smart
|
// Copyright: (c) Julian Smart
|
||||||
// Licence:
|
// Licence: wxWindows licence
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
#ifndef _RICHTEXTTABSPAGE_H_
|
#ifndef _RICHTEXTTABSPAGE_H_
|
||||||
@@ -38,14 +38,6 @@
|
|||||||
#define SYMBOL_WXRICHTEXTTABSPAGE_POSITION wxDefaultPosition
|
#define SYMBOL_WXRICHTEXTTABSPAGE_POSITION wxDefaultPosition
|
||||||
////@end control identifiers
|
////@end control identifiers
|
||||||
|
|
||||||
/*!
|
|
||||||
* Compatibility
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef wxCLOSE_BOX
|
|
||||||
#define wxCLOSE_BOX 0x1000
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* wxRichTextTabsPage class declaration
|
* wxRichTextTabsPage class declaration
|
||||||
*/
|
*/
|
||||||
|
@@ -1,24 +1,31 @@
|
|||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
// Name: richtextbulletspage.cpp
|
// Name: src/richtext/richtextbulletspage.cpp
|
||||||
// Purpose:
|
// Purpose:
|
||||||
// Author: Julian Smart
|
// Author: Julian Smart
|
||||||
// Modified by:
|
// Modified by:
|
||||||
// Created: 10/4/2006 10:32:31 AM
|
// Created: 10/4/2006 10:32:31 AM
|
||||||
// RCS-ID:
|
// RCS-ID: $Id$
|
||||||
// Copyright: (c) Julian Smart
|
// Copyright: (c) Julian Smart
|
||||||
// Licence:
|
// Licence: wxWindows licence
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
////@begin includes
|
// For compilers that support precompilation, includes "wx/wx.h".
|
||||||
////@end includes
|
#include "wx/wxprec.h"
|
||||||
|
|
||||||
|
#ifdef __BORLANDC__
|
||||||
|
#pragma hdrstop
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if wxUSE_RICHTEXT
|
||||||
|
|
||||||
|
#include "wx/richtext/richtextbulletspage.h"
|
||||||
|
|
||||||
|
#ifndef WX_PRECOMP
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "../../include/wx/richtext/richtextbulletspage.h"
|
|
||||||
#include "wx/richtext/richtextsymboldlg.h"
|
#include "wx/richtext/richtextsymboldlg.h"
|
||||||
#include "wx/fontenum.h"
|
#include "wx/fontenum.h"
|
||||||
|
|
||||||
////@begin XPM images
|
|
||||||
////@end XPM images
|
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* wxRichTextBulletsPage type definition
|
* wxRichTextBulletsPage type definition
|
||||||
*/
|
*/
|
||||||
@@ -166,7 +173,14 @@ void wxRichTextBulletsPage::CreateControls()
|
|||||||
itemBoxSizer11->Add(itemBoxSizer13, 0, wxGROW, 5);
|
itemBoxSizer11->Add(itemBoxSizer13, 0, wxGROW, 5);
|
||||||
|
|
||||||
wxString* m_symbolCtrlStrings = NULL;
|
wxString* m_symbolCtrlStrings = NULL;
|
||||||
m_symbolCtrl = new wxComboBox( itemPanel1, ID_RICHTEXTBULLETSPAGE_SYMBOLCTRL, _T(""), wxDefaultPosition, wxSize(60, -1), 0, m_symbolCtrlStrings, wxCB_DROPDOWN );
|
m_symbolCtrl = new wxComboBox( itemPanel1,
|
||||||
|
ID_RICHTEXTBULLETSPAGE_SYMBOLCTRL,
|
||||||
|
wxEmptyString,
|
||||||
|
wxDefaultPosition,
|
||||||
|
wxSize(60, wxDefaultCoord),
|
||||||
|
0,
|
||||||
|
m_symbolCtrlStrings,
|
||||||
|
wxCB_DROPDOWN );
|
||||||
itemBoxSizer13->Add(m_symbolCtrl, 0, wxALIGN_CENTER_VERTICAL|wxALL|wxFIXED_MINSIZE, 5);
|
itemBoxSizer13->Add(m_symbolCtrl, 0, wxALIGN_CENTER_VERTICAL|wxALL|wxFIXED_MINSIZE, 5);
|
||||||
|
|
||||||
wxButton* itemButton15 = new wxButton( itemPanel1, ID_RICHTEXTBULLETSPAGE_CHOOSE_SYMBOL, _("Ch&oose..."), wxDefaultPosition, wxDefaultSize, 0 );
|
wxButton* itemButton15 = new wxButton( itemPanel1, ID_RICHTEXTBULLETSPAGE_CHOOSE_SYMBOL, _("Ch&oose..."), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
@@ -178,7 +192,14 @@ void wxRichTextBulletsPage::CreateControls()
|
|||||||
itemBoxSizer11->Add(itemStaticText17, 0, wxALIGN_LEFT|wxLEFT|wxRIGHT|wxTOP|wxADJUST_MINSIZE, 5);
|
itemBoxSizer11->Add(itemStaticText17, 0, wxALIGN_LEFT|wxLEFT|wxRIGHT|wxTOP|wxADJUST_MINSIZE, 5);
|
||||||
|
|
||||||
wxString* m_symbolFontCtrlStrings = NULL;
|
wxString* m_symbolFontCtrlStrings = NULL;
|
||||||
m_symbolFontCtrl = new wxComboBox( itemPanel1, ID_RICHTEXTBULLETSPAGE_SYMBOLFONTCTRL, _T(""), wxDefaultPosition, wxDefaultSize, 0, m_symbolFontCtrlStrings, wxCB_DROPDOWN );
|
m_symbolFontCtrl = new wxComboBox( itemPanel1,
|
||||||
|
ID_RICHTEXTBULLETSPAGE_SYMBOLFONTCTRL,
|
||||||
|
wxEmptyString,
|
||||||
|
wxDefaultPosition,
|
||||||
|
wxDefaultSize,
|
||||||
|
0,
|
||||||
|
m_symbolFontCtrlStrings,
|
||||||
|
wxCB_DROPDOWN );
|
||||||
itemBoxSizer11->Add(m_symbolFontCtrl, 0, wxGROW|wxALL, 5);
|
itemBoxSizer11->Add(m_symbolFontCtrl, 0, wxGROW|wxALL, 5);
|
||||||
|
|
||||||
itemBoxSizer4->Add(2, 1, 1, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM, 5);
|
itemBoxSizer4->Add(2, 1, 1, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM, 5);
|
||||||
@@ -194,7 +215,7 @@ void wxRichTextBulletsPage::CreateControls()
|
|||||||
wxStaticText* itemStaticText23 = new wxStaticText( itemPanel1, ID_RICHTEXTBULLETSPAGE_NUMBERSTATIC, _("&Number:"), wxDefaultPosition, wxDefaultSize, 0 );
|
wxStaticText* itemStaticText23 = new wxStaticText( itemPanel1, ID_RICHTEXTBULLETSPAGE_NUMBERSTATIC, _("&Number:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
itemBoxSizer22->Add(itemStaticText23, 0, wxALIGN_LEFT|wxLEFT|wxRIGHT|wxTOP|wxADJUST_MINSIZE, 5);
|
itemBoxSizer22->Add(itemStaticText23, 0, wxALIGN_LEFT|wxLEFT|wxRIGHT|wxTOP|wxADJUST_MINSIZE, 5);
|
||||||
|
|
||||||
m_numberCtrl = new wxSpinCtrl( itemPanel1, ID_RICHTEXTBULLETSPAGE_NUMBERCTRL, _T("0"), wxDefaultPosition, wxSize(50, -1), wxSP_ARROW_KEYS, 0, 100000, 0 );
|
m_numberCtrl = new wxSpinCtrl( itemPanel1, ID_RICHTEXTBULLETSPAGE_NUMBERCTRL, _T("0"), wxDefaultPosition, wxSize(50, wxDefaultCoord), wxSP_ARROW_KEYS, 0, 100000, 0 );
|
||||||
itemBoxSizer22->Add(m_numberCtrl, 0, wxGROW|wxALL, 5);
|
itemBoxSizer22->Add(m_numberCtrl, 0, wxGROW|wxALL, 5);
|
||||||
|
|
||||||
itemBoxSizer22->Add(5, 5, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
|
itemBoxSizer22->Add(5, 5, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
|
||||||
@@ -283,7 +304,7 @@ bool wxRichTextBulletsPage::TransferDataFromWindow()
|
|||||||
if (m_hasBulletSymbol)
|
if (m_hasBulletSymbol)
|
||||||
{
|
{
|
||||||
wxChar c(wxT('*'));
|
wxChar c(wxT('*'));
|
||||||
if (m_symbolCtrl->GetValue().Length() > 0)
|
if (m_symbolCtrl->GetValue().length() > 0)
|
||||||
c = m_symbolCtrl->GetValue()[0];
|
c = m_symbolCtrl->GetValue()[0];
|
||||||
attr->SetBulletSymbol(c);
|
attr->SetBulletSymbol(c);
|
||||||
attr->SetBulletFont(m_symbolFontCtrl->GetValue());
|
attr->SetBulletFont(m_symbolFontCtrl->GetValue());
|
||||||
@@ -688,4 +709,4 @@ void wxRichTextBulletsPage::OnNumberstaticUpdate( wxUpdateUIEvent& event )
|
|||||||
OnNumberUpdate(event);
|
OnNumberUpdate(event);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif // wxUSE_RICHTEXT
|
||||||
|
@@ -1,21 +1,27 @@
|
|||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
// Name: richtextindentspage.cpp
|
// Name: src/richtext/richtextindentspage.cpp
|
||||||
// Purpose:
|
// Purpose:
|
||||||
// Author: Julian Smart
|
// Author: Julian Smart
|
||||||
// Modified by:
|
// Modified by:
|
||||||
// Created: 10/3/2006 2:28:21 PM
|
// Created: 10/3/2006 2:28:21 PM
|
||||||
// RCS-ID:
|
// RCS-ID: $Id$
|
||||||
// Copyright: (c) Julian Smart
|
// Copyright: (c) Julian Smart
|
||||||
// Licence:
|
// Licence: wxWindows licence
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
////@begin includes
|
// For compilers that support precompilation, includes "wx/wx.h".
|
||||||
////@end includes
|
#include "wx/wxprec.h"
|
||||||
|
|
||||||
#include "../../include/wx/richtext/richtextindentspage.h"
|
#ifdef __BORLANDC__
|
||||||
|
#pragma hdrstop
|
||||||
|
#endif
|
||||||
|
|
||||||
////@begin XPM images
|
#if wxUSE_RICHTEXT
|
||||||
////@end XPM images
|
|
||||||
|
#include "wx/richtext/richtextindentspage.h"
|
||||||
|
|
||||||
|
#ifndef WX_PRECOMP
|
||||||
|
#endif
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* wxRichTextIndentsSpacingPage type definition
|
* wxRichTextIndentsSpacingPage type definition
|
||||||
@@ -194,7 +200,12 @@ void wxRichTextIndentsSpacingPage::CreateControls()
|
|||||||
wxBoxSizer* itemBoxSizer24 = new wxBoxSizer(wxHORIZONTAL);
|
wxBoxSizer* itemBoxSizer24 = new wxBoxSizer(wxHORIZONTAL);
|
||||||
itemFlexGridSizer22->Add(itemBoxSizer24, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
|
itemFlexGridSizer22->Add(itemBoxSizer24, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
|
||||||
|
|
||||||
m_indentLeft = new wxTextCtrl( itemPanel1, ID_RICHTEXTINDENTSSPACINGPAGE_INDENT_LEFT, _T(""), wxDefaultPosition, wxSize(50, -1), 0 );
|
m_indentLeft = new wxTextCtrl( itemPanel1,
|
||||||
|
ID_RICHTEXTINDENTSSPACINGPAGE_INDENT_LEFT,
|
||||||
|
wxEmptyString,
|
||||||
|
wxDefaultPosition,
|
||||||
|
wxSize(50, wxDefaultCoord),
|
||||||
|
0 );
|
||||||
itemBoxSizer24->Add(m_indentLeft, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
|
itemBoxSizer24->Add(m_indentLeft, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
|
||||||
|
|
||||||
wxStaticText* itemStaticText26 = new wxStaticText( itemPanel1, wxID_STATIC, _("Left (&first line):"), wxDefaultPosition, wxDefaultSize, 0 );
|
wxStaticText* itemStaticText26 = new wxStaticText( itemPanel1, wxID_STATIC, _("Left (&first line):"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
@@ -203,7 +214,12 @@ void wxRichTextIndentsSpacingPage::CreateControls()
|
|||||||
wxBoxSizer* itemBoxSizer27 = new wxBoxSizer(wxHORIZONTAL);
|
wxBoxSizer* itemBoxSizer27 = new wxBoxSizer(wxHORIZONTAL);
|
||||||
itemFlexGridSizer22->Add(itemBoxSizer27, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
|
itemFlexGridSizer22->Add(itemBoxSizer27, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
|
||||||
|
|
||||||
m_indentLeftFirst = new wxTextCtrl( itemPanel1, ID_RICHTEXTINDENTSSPACINGPAGE_INDENT_LEFT_FIRST, _T(""), wxDefaultPosition, wxSize(50, -1), 0 );
|
m_indentLeftFirst = new wxTextCtrl( itemPanel1,
|
||||||
|
ID_RICHTEXTINDENTSSPACINGPAGE_INDENT_LEFT_FIRST,
|
||||||
|
wxEmptyString,
|
||||||
|
wxDefaultPosition,
|
||||||
|
wxSize(50, wxDefaultCoord),
|
||||||
|
0 );
|
||||||
itemBoxSizer27->Add(m_indentLeftFirst, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
|
itemBoxSizer27->Add(m_indentLeftFirst, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
|
||||||
|
|
||||||
wxStaticText* itemStaticText29 = new wxStaticText( itemPanel1, wxID_STATIC, _("&Right:"), wxDefaultPosition, wxDefaultSize, 0 );
|
wxStaticText* itemStaticText29 = new wxStaticText( itemPanel1, wxID_STATIC, _("&Right:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
@@ -212,7 +228,12 @@ void wxRichTextIndentsSpacingPage::CreateControls()
|
|||||||
wxBoxSizer* itemBoxSizer30 = new wxBoxSizer(wxHORIZONTAL);
|
wxBoxSizer* itemBoxSizer30 = new wxBoxSizer(wxHORIZONTAL);
|
||||||
itemFlexGridSizer22->Add(itemBoxSizer30, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
|
itemFlexGridSizer22->Add(itemBoxSizer30, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
|
||||||
|
|
||||||
m_indentRight = new wxTextCtrl( itemPanel1, ID_RICHTEXTINDENTSSPACINGPAGE_INDENT_RIGHT, _T(""), wxDefaultPosition, wxSize(50, -1), 0 );
|
m_indentRight = new wxTextCtrl( itemPanel1,
|
||||||
|
ID_RICHTEXTINDENTSSPACINGPAGE_INDENT_RIGHT,
|
||||||
|
wxEmptyString,
|
||||||
|
wxDefaultPosition,
|
||||||
|
wxSize(50, wxDefaultCoord),
|
||||||
|
0 );
|
||||||
itemBoxSizer30->Add(m_indentRight, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
|
itemBoxSizer30->Add(m_indentRight, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
|
||||||
|
|
||||||
itemBoxSizer4->Add(2, 1, 1, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM, 5);
|
itemBoxSizer4->Add(2, 1, 1, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM, 5);
|
||||||
@@ -242,7 +263,12 @@ void wxRichTextIndentsSpacingPage::CreateControls()
|
|||||||
wxBoxSizer* itemBoxSizer41 = new wxBoxSizer(wxHORIZONTAL);
|
wxBoxSizer* itemBoxSizer41 = new wxBoxSizer(wxHORIZONTAL);
|
||||||
itemFlexGridSizer39->Add(itemBoxSizer41, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
|
itemFlexGridSizer39->Add(itemBoxSizer41, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
|
||||||
|
|
||||||
m_spacingBefore = new wxTextCtrl( itemPanel1, ID_RICHTEXTINDENTSSPACINGPAGE_SPACING_BEFORE, _T(""), wxDefaultPosition, wxSize(50, -1), 0 );
|
m_spacingBefore = new wxTextCtrl( itemPanel1,
|
||||||
|
ID_RICHTEXTINDENTSSPACINGPAGE_SPACING_BEFORE,
|
||||||
|
wxEmptyString,
|
||||||
|
wxDefaultPosition,
|
||||||
|
wxSize(50, wxDefaultCoord),
|
||||||
|
0 );
|
||||||
itemBoxSizer41->Add(m_spacingBefore, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
|
itemBoxSizer41->Add(m_spacingBefore, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
|
||||||
|
|
||||||
wxStaticText* itemStaticText43 = new wxStaticText( itemPanel1, wxID_STATIC, _("After a paragraph:"), wxDefaultPosition, wxDefaultSize, 0 );
|
wxStaticText* itemStaticText43 = new wxStaticText( itemPanel1, wxID_STATIC, _("After a paragraph:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
@@ -251,7 +277,12 @@ void wxRichTextIndentsSpacingPage::CreateControls()
|
|||||||
wxBoxSizer* itemBoxSizer44 = new wxBoxSizer(wxHORIZONTAL);
|
wxBoxSizer* itemBoxSizer44 = new wxBoxSizer(wxHORIZONTAL);
|
||||||
itemFlexGridSizer39->Add(itemBoxSizer44, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
|
itemFlexGridSizer39->Add(itemBoxSizer44, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
|
||||||
|
|
||||||
m_spacingAfter = new wxTextCtrl( itemPanel1, ID_RICHTEXTINDENTSSPACINGPAGE_SPACING_AFTER, _T(""), wxDefaultPosition, wxSize(50, -1), 0 );
|
m_spacingAfter = new wxTextCtrl( itemPanel1,
|
||||||
|
ID_RICHTEXTINDENTSSPACINGPAGE_SPACING_AFTER,
|
||||||
|
wxEmptyString,
|
||||||
|
wxDefaultPosition,
|
||||||
|
wxSize(50, wxDefaultCoord),
|
||||||
|
0 );
|
||||||
itemBoxSizer44->Add(m_spacingAfter, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
|
itemBoxSizer44->Add(m_spacingAfter, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
|
||||||
|
|
||||||
wxStaticText* itemStaticText46 = new wxStaticText( itemPanel1, wxID_STATIC, _("Line spacing:"), wxDefaultPosition, wxDefaultSize, 0 );
|
wxStaticText* itemStaticText46 = new wxStaticText( itemPanel1, wxID_STATIC, _("Line spacing:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
@@ -343,7 +374,7 @@ bool wxRichTextIndentsSpacingPage::TransferDataFromWindow()
|
|||||||
|
|
||||||
wxString leftIndent(m_indentLeft->GetValue());
|
wxString leftIndent(m_indentLeft->GetValue());
|
||||||
wxString leftFirstIndent(m_indentLeftFirst->GetValue());
|
wxString leftFirstIndent(m_indentLeftFirst->GetValue());
|
||||||
if (!leftIndent.IsEmpty())
|
if (!leftIndent.empty())
|
||||||
{
|
{
|
||||||
int visualLeftIndent = wxAtoi(leftIndent);
|
int visualLeftIndent = wxAtoi(leftIndent);
|
||||||
int visualLeftFirstIndent = wxAtoi(leftFirstIndent);
|
int visualLeftFirstIndent = wxAtoi(leftFirstIndent);
|
||||||
@@ -356,19 +387,19 @@ bool wxRichTextIndentsSpacingPage::TransferDataFromWindow()
|
|||||||
attr->SetFlags(attr->GetFlags() & (~wxTEXT_ATTR_LEFT_INDENT));
|
attr->SetFlags(attr->GetFlags() & (~wxTEXT_ATTR_LEFT_INDENT));
|
||||||
|
|
||||||
wxString rightIndent(m_indentRight->GetValue());
|
wxString rightIndent(m_indentRight->GetValue());
|
||||||
if (!rightIndent.IsEmpty())
|
if (!rightIndent.empty())
|
||||||
attr->SetRightIndent(wxAtoi(rightIndent));
|
attr->SetRightIndent(wxAtoi(rightIndent));
|
||||||
else
|
else
|
||||||
attr->SetFlags(attr->GetFlags() & (~wxTEXT_ATTR_RIGHT_INDENT));
|
attr->SetFlags(attr->GetFlags() & (~wxTEXT_ATTR_RIGHT_INDENT));
|
||||||
|
|
||||||
wxString spacingAfter(m_spacingAfter->GetValue());
|
wxString spacingAfter(m_spacingAfter->GetValue());
|
||||||
if (!spacingAfter.IsEmpty())
|
if (!spacingAfter.empty())
|
||||||
attr->SetParagraphSpacingAfter(wxAtoi(spacingAfter));
|
attr->SetParagraphSpacingAfter(wxAtoi(spacingAfter));
|
||||||
else
|
else
|
||||||
attr->SetFlags(attr->GetFlags() & (~wxTEXT_ATTR_PARA_SPACING_AFTER));
|
attr->SetFlags(attr->GetFlags() & (~wxTEXT_ATTR_PARA_SPACING_AFTER));
|
||||||
|
|
||||||
wxString spacingBefore(m_spacingBefore->GetValue());
|
wxString spacingBefore(m_spacingBefore->GetValue());
|
||||||
if (!spacingBefore.IsEmpty())
|
if (!spacingBefore.empty())
|
||||||
attr->SetParagraphSpacingBefore(wxAtoi(spacingBefore));
|
attr->SetParagraphSpacingBefore(wxAtoi(spacingBefore));
|
||||||
else
|
else
|
||||||
attr->SetFlags(attr->GetFlags() & (~wxTEXT_ATTR_PARA_SPACING_BEFORE));
|
attr->SetFlags(attr->GetFlags() & (~wxTEXT_ATTR_PARA_SPACING_BEFORE));
|
||||||
@@ -635,4 +666,4 @@ void wxRichTextIndentsSpacingPage::OnSpacingLineSelected( wxCommandEvent& WXUNUS
|
|||||||
UpdatePreview();
|
UpdatePreview();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif // wxUSE_RICHTEXT
|
||||||
|
@@ -1,21 +1,27 @@
|
|||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
// Name: richtextstylepage.cpp
|
// Name: src/richtext/richtextstylepage.cpp
|
||||||
// Purpose:
|
// Purpose:
|
||||||
// Author: Julian Smart
|
// Author: Julian Smart
|
||||||
// Modified by:
|
// Modified by:
|
||||||
// Created: 10/5/2006 11:34:55 AM
|
// Created: 10/5/2006 11:34:55 AM
|
||||||
// RCS-ID:
|
// RCS-ID: $Id$
|
||||||
// Copyright: (c) Julian Smart
|
// Copyright: (c) Julian Smart
|
||||||
// Licence:
|
// Licence: wxWindows licence
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
////@begin includes
|
// For compilers that support precompilation, includes "wx/wx.h".
|
||||||
////@end includes
|
#include "wx/wxprec.h"
|
||||||
|
|
||||||
#include "../../include/wx/richtext/richtextstylepage.h"
|
#ifdef __BORLANDC__
|
||||||
|
#pragma hdrstop
|
||||||
|
#endif
|
||||||
|
|
||||||
////@begin XPM images
|
#if wxUSE_RICHTEXT
|
||||||
////@end XPM images
|
|
||||||
|
#include "wx/richtext/richtextstylepage.h"
|
||||||
|
|
||||||
|
#ifndef WX_PRECOMP
|
||||||
|
#endif
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* wxRichTextStylePage type definition
|
* wxRichTextStylePage type definition
|
||||||
@@ -107,21 +113,40 @@ void wxRichTextStylePage::CreateControls()
|
|||||||
wxStaticText* itemStaticText6 = new wxStaticText( itemPanel1, wxID_STATIC, _("&Style:"), wxDefaultPosition, wxDefaultSize, 0 );
|
wxStaticText* itemStaticText6 = new wxStaticText( itemPanel1, wxID_STATIC, _("&Style:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
itemBoxSizer5->Add(itemStaticText6, 0, wxALIGN_LEFT|wxLEFT|wxRIGHT|wxTOP|wxADJUST_MINSIZE, 5);
|
itemBoxSizer5->Add(itemStaticText6, 0, wxALIGN_LEFT|wxLEFT|wxRIGHT|wxTOP|wxADJUST_MINSIZE, 5);
|
||||||
|
|
||||||
m_styleName = new wxTextCtrl( itemPanel1, ID_RICHTEXTSTYLEPAGE_STYLE_NAME, _T(""), wxDefaultPosition, wxSize(300, -1), 0 );
|
m_styleName = new wxTextCtrl( itemPanel1,
|
||||||
|
ID_RICHTEXTSTYLEPAGE_STYLE_NAME,
|
||||||
|
wxEmptyString,
|
||||||
|
wxDefaultPosition,
|
||||||
|
wxSize(300, wxDefaultCoord),
|
||||||
|
0 );
|
||||||
itemBoxSizer5->Add(m_styleName, 0, wxGROW|wxALL, 5);
|
itemBoxSizer5->Add(m_styleName, 0, wxGROW|wxALL, 5);
|
||||||
|
|
||||||
wxStaticText* itemStaticText8 = new wxStaticText( itemPanel1, wxID_STATIC, _("&Based on:"), wxDefaultPosition, wxDefaultSize, 0 );
|
wxStaticText* itemStaticText8 = new wxStaticText( itemPanel1, wxID_STATIC, _("&Based on:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
itemBoxSizer5->Add(itemStaticText8, 0, wxALIGN_LEFT|wxLEFT|wxRIGHT|wxTOP|wxADJUST_MINSIZE, 5);
|
itemBoxSizer5->Add(itemStaticText8, 0, wxALIGN_LEFT|wxLEFT|wxRIGHT|wxTOP|wxADJUST_MINSIZE, 5);
|
||||||
|
|
||||||
wxString* m_basedOnStrings = NULL;
|
wxString* m_basedOnStrings = NULL;
|
||||||
m_basedOn = new wxComboBox( itemPanel1, ID_RICHTEXTSTYLEPAGE_BASED_ON, _T(""), wxDefaultPosition, wxDefaultSize, 0, m_basedOnStrings, wxCB_DROPDOWN );
|
m_basedOn = new wxComboBox( itemPanel1,
|
||||||
|
ID_RICHTEXTSTYLEPAGE_BASED_ON,
|
||||||
|
wxEmptyString,
|
||||||
|
wxDefaultPosition,
|
||||||
|
wxDefaultSize,
|
||||||
|
0,
|
||||||
|
m_basedOnStrings,
|
||||||
|
wxCB_DROPDOWN );
|
||||||
itemBoxSizer5->Add(m_basedOn, 0, wxGROW|wxALL, 5);
|
itemBoxSizer5->Add(m_basedOn, 0, wxGROW|wxALL, 5);
|
||||||
|
|
||||||
wxStaticText* itemStaticText10 = new wxStaticText( itemPanel1, wxID_STATIC, _("&Next style:"), wxDefaultPosition, wxDefaultSize, 0 );
|
wxStaticText* itemStaticText10 = new wxStaticText( itemPanel1, wxID_STATIC, _("&Next style:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
itemBoxSizer5->Add(itemStaticText10, 0, wxALIGN_LEFT|wxLEFT|wxRIGHT|wxTOP|wxADJUST_MINSIZE, 5);
|
itemBoxSizer5->Add(itemStaticText10, 0, wxALIGN_LEFT|wxLEFT|wxRIGHT|wxTOP|wxADJUST_MINSIZE, 5);
|
||||||
|
|
||||||
wxString* m_nextStyleStrings = NULL;
|
wxString* m_nextStyleStrings = NULL;
|
||||||
m_nextStyle = new wxComboBox( itemPanel1, ID_RICHTEXTSTYLEPAGE_NEXT_STYLE, _T(""), wxDefaultPosition, wxDefaultSize, 0, m_nextStyleStrings, wxCB_DROPDOWN );
|
m_nextStyle = new wxComboBox( itemPanel1,
|
||||||
|
ID_RICHTEXTSTYLEPAGE_NEXT_STYLE,
|
||||||
|
wxEmptyString,
|
||||||
|
wxDefaultPosition,
|
||||||
|
wxDefaultSize,
|
||||||
|
0,
|
||||||
|
m_nextStyleStrings,
|
||||||
|
wxCB_DROPDOWN );
|
||||||
itemBoxSizer5->Add(m_nextStyle, 0, wxGROW|wxALL, 5);
|
itemBoxSizer5->Add(m_nextStyle, 0, wxGROW|wxALL, 5);
|
||||||
|
|
||||||
itemBoxSizer3->Add(5, 5, 1, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
|
itemBoxSizer3->Add(5, 5, 1, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
|
||||||
@@ -253,3 +278,5 @@ void wxRichTextStylePage::OnNextStyleUpdate( wxUpdateUIEvent& event )
|
|||||||
wxRichTextStyleDefinition* def = wxRichTextFormattingDialog::GetDialogStyleDefinition(this);
|
wxRichTextStyleDefinition* def = wxRichTextFormattingDialog::GetDialogStyleDefinition(this);
|
||||||
event.Enable(def->IsKindOf(CLASSINFO(wxRichTextParagraphStyleDefinition)));
|
event.Enable(def->IsKindOf(CLASSINFO(wxRichTextParagraphStyleDefinition)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif // wxUSE_RICHTEXT
|
||||||
|
@@ -1,19 +1,19 @@
|
|||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
// Name: richtextsymboldlg.cpp
|
// Name: src/richtext/richtextsymboldlg.cpp
|
||||||
// Purpose:
|
// Purpose:
|
||||||
// Author: Julian Smart
|
// Author: Julian Smart
|
||||||
// Modified by:
|
// Modified by:
|
||||||
// Created: 10/5/2006 3:11:58 PM
|
// Created: 10/5/2006 3:11:58 PM
|
||||||
// RCS-ID:
|
// RCS-ID: $Id$
|
||||||
// Copyright: (c) Julian Smart
|
// Copyright: (c) Julian Smart
|
||||||
// Licence:
|
// Licence: wxWindows licence
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
// For compilers that support precompilation, includes "wx/wx.h".
|
// For compilers that support precompilation, includes "wx/wx.h".
|
||||||
#include "wx/wxprec.h"
|
#include "wx/wxprec.h"
|
||||||
|
|
||||||
#ifdef __BORLANDC__
|
#ifdef __BORLANDC__
|
||||||
#pragma hdrstop
|
#pragma hdrstop
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if wxUSE_RICHTEXT
|
#if wxUSE_RICHTEXT
|
||||||
@@ -21,18 +21,17 @@
|
|||||||
#include "wx/richtext/richtextsymboldlg.h"
|
#include "wx/richtext/richtextsymboldlg.h"
|
||||||
|
|
||||||
#ifndef WX_PRECOMP
|
#ifndef WX_PRECOMP
|
||||||
#include "wx/wx.h"
|
#include "wx/sizer.h"
|
||||||
|
#include "wx/stattext.h"
|
||||||
|
#include "wx/combobox.h"
|
||||||
|
#include "wx/button.h"
|
||||||
|
#include "wx/settings.h"
|
||||||
|
#include "wx/icon.h"
|
||||||
|
#include "wx/listbox.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
////@begin includes
|
|
||||||
////@end includes
|
|
||||||
|
|
||||||
#include "wx/fontenum.h"
|
#include "wx/fontenum.h"
|
||||||
#include "wx/dcbuffer.h"
|
#include "wx/dcbuffer.h"
|
||||||
#include "wx/settings.h"
|
|
||||||
|
|
||||||
////@begin XPM images
|
|
||||||
////@end XPM images
|
|
||||||
|
|
||||||
/* Microsoft Unicode subset numbering
|
/* Microsoft Unicode subset numbering
|
||||||
*/
|
*/
|
||||||
@@ -397,7 +396,14 @@ void wxSymbolPickerDialog::CreateControls()
|
|||||||
itemBoxSizer5->Add(itemStaticText6, 0, wxALIGN_CENTER_VERTICAL|wxALL|wxADJUST_MINSIZE, 5);
|
itemBoxSizer5->Add(itemStaticText6, 0, wxALIGN_CENTER_VERTICAL|wxALL|wxADJUST_MINSIZE, 5);
|
||||||
|
|
||||||
wxString* m_fontCtrlStrings = NULL;
|
wxString* m_fontCtrlStrings = NULL;
|
||||||
m_fontCtrl = new wxComboBox( itemDialog1, ID_SYMBOLPICKERDIALOG_FONT, _T(""), wxDefaultPosition, wxSize(240, -1), 0, m_fontCtrlStrings, wxCB_READONLY );
|
m_fontCtrl = new wxComboBox( itemDialog1,
|
||||||
|
ID_SYMBOLPICKERDIALOG_FONT,
|
||||||
|
wxEmptyString,
|
||||||
|
wxDefaultPosition,
|
||||||
|
wxSize(240, wxDefaultCoord),
|
||||||
|
0,
|
||||||
|
m_fontCtrlStrings,
|
||||||
|
wxCB_READONLY );
|
||||||
itemBoxSizer5->Add(m_fontCtrl, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
|
itemBoxSizer5->Add(m_fontCtrl, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
|
||||||
|
|
||||||
itemBoxSizer5->Add(5, 5, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
|
itemBoxSizer5->Add(5, 5, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
|
||||||
@@ -410,7 +416,14 @@ void wxSymbolPickerDialog::CreateControls()
|
|||||||
|
|
||||||
#if defined(__UNICODE__)
|
#if defined(__UNICODE__)
|
||||||
wxString* m_subsetCtrlStrings = NULL;
|
wxString* m_subsetCtrlStrings = NULL;
|
||||||
m_subsetCtrl = new wxComboBox( itemDialog1, ID_SYMBOLPICKERDIALOG_SUBSET, _T(""), wxDefaultPosition, wxDefaultSize, 0, m_subsetCtrlStrings, wxCB_READONLY );
|
m_subsetCtrl = new wxComboBox( itemDialog1,
|
||||||
|
ID_SYMBOLPICKERDIALOG_SUBSET,
|
||||||
|
wxEmptyString,
|
||||||
|
wxDefaultPosition,
|
||||||
|
wxDefaultSize,
|
||||||
|
0,
|
||||||
|
m_subsetCtrlStrings,
|
||||||
|
wxCB_READONLY );
|
||||||
m_subsetCtrl->SetHelpText(_("Shows a Unicode subset."));
|
m_subsetCtrl->SetHelpText(_("Shows a Unicode subset."));
|
||||||
if (ShowToolTips())
|
if (ShowToolTips())
|
||||||
m_subsetCtrl->SetToolTip(_("Shows a Unicode subset."));
|
m_subsetCtrl->SetToolTip(_("Shows a Unicode subset."));
|
||||||
@@ -424,7 +437,7 @@ void wxSymbolPickerDialog::CreateControls()
|
|||||||
wxBoxSizer* itemBoxSizer12 = new wxBoxSizer(wxHORIZONTAL);
|
wxBoxSizer* itemBoxSizer12 = new wxBoxSizer(wxHORIZONTAL);
|
||||||
itemBoxSizer3->Add(itemBoxSizer12, 0, wxGROW, 5);
|
itemBoxSizer3->Add(itemBoxSizer12, 0, wxGROW, 5);
|
||||||
|
|
||||||
m_symbolStaticCtrl = new wxStaticText( itemDialog1, wxID_STATIC, _("xxxx"), wxDefaultPosition, wxSize(40, -1), wxALIGN_CENTRE );
|
m_symbolStaticCtrl = new wxStaticText( itemDialog1, wxID_STATIC, _("xxxx"), wxDefaultPosition, wxSize(40, wxDefaultCoord), wxALIGN_CENTRE );
|
||||||
itemBoxSizer12->Add(m_symbolStaticCtrl, 0, wxALIGN_CENTER_VERTICAL|wxALL|wxADJUST_MINSIZE, 5);
|
itemBoxSizer12->Add(m_symbolStaticCtrl, 0, wxALIGN_CENTER_VERTICAL|wxALL|wxADJUST_MINSIZE, 5);
|
||||||
|
|
||||||
itemBoxSizer12->Add(5, 5, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
|
itemBoxSizer12->Add(5, 5, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
|
||||||
@@ -432,7 +445,12 @@ void wxSymbolPickerDialog::CreateControls()
|
|||||||
wxStaticText* itemStaticText15 = new wxStaticText( itemDialog1, wxID_STATIC, _("&Character code:"), wxDefaultPosition, wxDefaultSize, 0 );
|
wxStaticText* itemStaticText15 = new wxStaticText( itemDialog1, wxID_STATIC, _("&Character code:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
itemBoxSizer12->Add(itemStaticText15, 0, wxALIGN_CENTER_VERTICAL|wxALL|wxADJUST_MINSIZE, 5);
|
itemBoxSizer12->Add(itemStaticText15, 0, wxALIGN_CENTER_VERTICAL|wxALL|wxADJUST_MINSIZE, 5);
|
||||||
|
|
||||||
m_characterCodeCtrl = new wxTextCtrl( itemDialog1, ID_SYMBOLPICKERDIALOG_CHARACTERCODE, _T(""), wxDefaultPosition, wxSize(140, -1), wxTE_READONLY|wxTE_CENTRE );
|
m_characterCodeCtrl = new wxTextCtrl( itemDialog1,
|
||||||
|
ID_SYMBOLPICKERDIALOG_CHARACTERCODE,
|
||||||
|
wxEmptyString,
|
||||||
|
wxDefaultPosition,
|
||||||
|
wxSize(140, wxDefaultCoord),
|
||||||
|
wxTE_READONLY|wxTE_CENTRE );
|
||||||
itemBoxSizer12->Add(m_characterCodeCtrl, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
|
itemBoxSizer12->Add(m_characterCodeCtrl, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
|
||||||
|
|
||||||
itemBoxSizer12->Add(5, 5, 1, wxALIGN_CENTER_VERTICAL|wxALL, 5);
|
itemBoxSizer12->Add(5, 5, 1, wxALIGN_CENTER_VERTICAL|wxALL, 5);
|
||||||
@@ -514,7 +532,7 @@ bool wxSymbolPickerDialog::TransferDataToWindow()
|
|||||||
m_fontCtrl->Append(faceNames);
|
m_fontCtrl->Append(faceNames);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (m_fontName.IsEmpty())
|
if (m_fontName.empty())
|
||||||
m_fontCtrl->SetSelection(0);
|
m_fontCtrl->SetSelection(0);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -524,7 +542,7 @@ bool wxSymbolPickerDialog::TransferDataToWindow()
|
|||||||
m_fontCtrl->SetSelection(0);
|
m_fontCtrl->SetSelection(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!m_symbol.IsEmpty())
|
if (!m_symbol.empty())
|
||||||
{
|
{
|
||||||
int sel = (int) m_symbol[0];
|
int sel = (int) m_symbol[0];
|
||||||
m_symbolsCtrl->SetSelection(sel);
|
m_symbolsCtrl->SetSelection(sel);
|
||||||
@@ -554,12 +572,12 @@ void wxSymbolPickerDialog::UpdateSymbolDisplay(bool updateSymbolList, bool showA
|
|||||||
{
|
{
|
||||||
wxFont font;
|
wxFont font;
|
||||||
wxString fontNameToUse;
|
wxString fontNameToUse;
|
||||||
if (m_fontName.IsEmpty())
|
if (m_fontName.empty())
|
||||||
fontNameToUse = m_normalTextFontName;
|
fontNameToUse = m_normalTextFontName;
|
||||||
else
|
else
|
||||||
fontNameToUse = m_fontName;
|
fontNameToUse = m_fontName;
|
||||||
|
|
||||||
if (!fontNameToUse.IsEmpty())
|
if (!fontNameToUse.empty())
|
||||||
{
|
{
|
||||||
font = wxFont(14, wxDEFAULT, wxNORMAL, wxNORMAL, false, fontNameToUse);
|
font = wxFont(14, wxDEFAULT, wxNORMAL, wxNORMAL, false, fontNameToUse);
|
||||||
}
|
}
|
||||||
@@ -571,7 +589,7 @@ void wxSymbolPickerDialog::UpdateSymbolDisplay(bool updateSymbolList, bool showA
|
|||||||
m_symbolsCtrl->SetFont(font);
|
m_symbolsCtrl->SetFont(font);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!m_symbol.IsEmpty())
|
if (!m_symbol.empty())
|
||||||
{
|
{
|
||||||
m_symbolStaticCtrl->SetFont(font);
|
m_symbolStaticCtrl->SetFont(font);
|
||||||
m_symbolStaticCtrl->SetLabel(m_symbol);
|
m_symbolStaticCtrl->SetLabel(m_symbol);
|
||||||
@@ -624,7 +642,7 @@ void wxSymbolPickerDialog::OnSymbolSelected( wxCommandEvent& event )
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
int sel = event.GetSelection();
|
int sel = event.GetSelection();
|
||||||
if (sel == -1)
|
if (sel == wxNOT_FOUND)
|
||||||
m_symbol = wxEmptyString;
|
m_symbol = wxEmptyString;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -702,7 +720,7 @@ void wxSymbolPickerDialog::SetUnicodeMode(bool unicodeMode)
|
|||||||
/// Get the selected symbol character
|
/// Get the selected symbol character
|
||||||
int wxSymbolPickerDialog::GetSymbolChar() const
|
int wxSymbolPickerDialog::GetSymbolChar() const
|
||||||
{
|
{
|
||||||
if (m_symbol.IsEmpty())
|
if (m_symbol.empty())
|
||||||
return -1;
|
return -1;
|
||||||
else
|
else
|
||||||
return (int) m_symbol[0];
|
return (int) m_symbol[0];
|
||||||
|
@@ -1,21 +1,27 @@
|
|||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
// Name: richtexttabspage.cpp
|
// Name: src/richtext/richtexttabspage.cpp
|
||||||
// Purpose:
|
// Purpose:
|
||||||
// Author: Julian Smart
|
// Author: Julian Smart
|
||||||
// Modified by:
|
// Modified by:
|
||||||
// Created: 10/4/2006 8:03:20 AM
|
// Created: 10/4/2006 8:03:20 AM
|
||||||
// RCS-ID:
|
// RCS-ID: $Id$
|
||||||
// Copyright: (c) Julian Smart
|
// Copyright: (c) Julian Smart
|
||||||
// Licence:
|
// Licence: wxWindows licence
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
////@begin includes
|
// For compilers that support precompilation, includes "wx/wx.h".
|
||||||
////@end includes
|
#include "wx/wxprec.h"
|
||||||
|
|
||||||
#include "../../include/wx/richtext/richtexttabspage.h"
|
#ifdef __BORLANDC__
|
||||||
|
#pragma hdrstop
|
||||||
|
#endif
|
||||||
|
|
||||||
////@begin XPM images
|
#if wxUSE_RICHTEXT
|
||||||
////@end XPM images
|
|
||||||
|
#include "wx/richtext/richtexttabspage.h"
|
||||||
|
|
||||||
|
#ifndef WX_PRECOMP
|
||||||
|
#endif
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* wxRichTextTabsPage type definition
|
* wxRichTextTabsPage type definition
|
||||||
@@ -117,7 +123,12 @@ void wxRichTextTabsPage::CreateControls()
|
|||||||
wxStaticText* itemStaticText6 = new wxStaticText( itemPanel1, wxID_STATIC, _("&Position (tenths of a mm):"), wxDefaultPosition, wxDefaultSize, 0 );
|
wxStaticText* itemStaticText6 = new wxStaticText( itemPanel1, wxID_STATIC, _("&Position (tenths of a mm):"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
itemBoxSizer5->Add(itemStaticText6, 0, wxALIGN_LEFT|wxLEFT|wxRIGHT|wxTOP|wxADJUST_MINSIZE, 5);
|
itemBoxSizer5->Add(itemStaticText6, 0, wxALIGN_LEFT|wxLEFT|wxRIGHT|wxTOP|wxADJUST_MINSIZE, 5);
|
||||||
|
|
||||||
m_tabEditCtrl = new wxTextCtrl( itemPanel1, ID_RICHTEXTTABSPAGE_TABEDIT, _T(""), wxDefaultPosition, wxDefaultSize, 0 );
|
m_tabEditCtrl = new wxTextCtrl( itemPanel1,
|
||||||
|
ID_RICHTEXTTABSPAGE_TABEDIT,
|
||||||
|
wxEmptyString,
|
||||||
|
wxDefaultPosition,
|
||||||
|
wxDefaultSize,
|
||||||
|
0 );
|
||||||
itemBoxSizer5->Add(m_tabEditCtrl, 0, wxGROW|wxALL, 5);
|
itemBoxSizer5->Add(m_tabEditCtrl, 0, wxGROW|wxALL, 5);
|
||||||
|
|
||||||
wxString* m_tabListCtrlStrings = NULL;
|
wxString* m_tabListCtrlStrings = NULL;
|
||||||
@@ -129,7 +140,12 @@ void wxRichTextTabsPage::CreateControls()
|
|||||||
wxBoxSizer* itemBoxSizer10 = new wxBoxSizer(wxVERTICAL);
|
wxBoxSizer* itemBoxSizer10 = new wxBoxSizer(wxVERTICAL);
|
||||||
itemBoxSizer4->Add(itemBoxSizer10, 0, wxGROW, 5);
|
itemBoxSizer4->Add(itemBoxSizer10, 0, wxGROW, 5);
|
||||||
|
|
||||||
wxStaticText* itemStaticText11 = new wxStaticText( itemPanel1, wxID_STATIC, _T(""), wxDefaultPosition, wxDefaultSize, 0 );
|
wxStaticText* itemStaticText11 = new wxStaticText( itemPanel1,
|
||||||
|
wxID_STATIC,
|
||||||
|
wxEmptyString,
|
||||||
|
wxDefaultPosition,
|
||||||
|
wxDefaultSize,
|
||||||
|
0 );
|
||||||
itemBoxSizer10->Add(itemStaticText11, 0, wxALIGN_CENTER_HORIZONTAL|wxBOTTOM|wxADJUST_MINSIZE, 5);
|
itemBoxSizer10->Add(itemStaticText11, 0, wxALIGN_CENTER_HORIZONTAL|wxBOTTOM|wxADJUST_MINSIZE, 5);
|
||||||
|
|
||||||
wxButton* itemButton12 = new wxButton( itemPanel1, ID_RICHTEXTTABSPAGE_NEW_TAB, _("&New"), wxDefaultPosition, wxDefaultSize, 0 );
|
wxButton* itemButton12 = new wxButton( itemPanel1, ID_RICHTEXTTABSPAGE_NEW_TAB, _("&New"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
@@ -263,7 +279,7 @@ wxIcon wxRichTextTabsPage::GetIconResource( const wxString& name )
|
|||||||
void wxRichTextTabsPage::OnNewTabClick( wxCommandEvent& WXUNUSED(event) )
|
void wxRichTextTabsPage::OnNewTabClick( wxCommandEvent& WXUNUSED(event) )
|
||||||
{
|
{
|
||||||
wxString str = m_tabEditCtrl->GetValue();
|
wxString str = m_tabEditCtrl->GetValue();
|
||||||
if (!str.IsEmpty() && str.IsNumber())
|
if (!str.empty() && str.IsNumber())
|
||||||
{
|
{
|
||||||
wxString s(wxString::Format(wxT("%d"), wxAtoi(str)));
|
wxString s(wxString::Format(wxT("%d"), wxAtoi(str)));
|
||||||
|
|
||||||
@@ -283,7 +299,7 @@ void wxRichTextTabsPage::OnNewTabUpdate( wxUpdateUIEvent& event )
|
|||||||
// This may be a bit expensive - consider updating New button when text
|
// This may be a bit expensive - consider updating New button when text
|
||||||
// changes in edit control
|
// changes in edit control
|
||||||
wxString str = m_tabEditCtrl->GetValue();
|
wxString str = m_tabEditCtrl->GetValue();
|
||||||
if (!str.IsEmpty() && str.IsNumber())
|
if (!str.empty() && str.IsNumber())
|
||||||
{
|
{
|
||||||
wxString s(wxString::Format(wxT("%d"), wxAtoi(str)));
|
wxString s(wxString::Format(wxT("%d"), wxAtoi(str)));
|
||||||
event.Enable(m_tabListCtrl->FindString(s) == wxNOT_FOUND);
|
event.Enable(m_tabListCtrl->FindString(s) == wxNOT_FOUND);
|
||||||
@@ -345,6 +361,8 @@ void wxRichTextTabsPage::OnDeleteAllTabsUpdate( wxUpdateUIEvent& event )
|
|||||||
void wxRichTextTabsPage::OnTablistSelected( wxCommandEvent& WXUNUSED(event) )
|
void wxRichTextTabsPage::OnTablistSelected( wxCommandEvent& WXUNUSED(event) )
|
||||||
{
|
{
|
||||||
wxString str = m_tabListCtrl->GetStringSelection();
|
wxString str = m_tabListCtrl->GetStringSelection();
|
||||||
if (!str.IsEmpty())
|
if (!str.empty())
|
||||||
m_tabEditCtrl->SetValue(str);
|
m_tabEditCtrl->SetValue(str);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif // wxUSE_RICHTEXT
|
||||||
|
Reference in New Issue
Block a user