git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@41795
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
12 files changed:
/////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////
-// Name: richtextbulletspage.h
+// Name: wx/richtext/richtextbulletspage.h
// Purpose:
// Author: Julian Smart
// Modified by:
// Created: 10/4/2006 10:32:31 AM
// Purpose:
// Author: Julian Smart
// Modified by:
// Created: 10/4/2006 10:32:31 AM
// Copyright: (c) Julian Smart
// Copyright: (c) Julian Smart
+// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _RICHTEXTBULLETSPAGE_H_
/////////////////////////////////////////////////////////////////////////////
#ifndef _RICHTEXTBULLETSPAGE_H_
#define SYMBOL_WXRICHTEXTBULLETSPAGE_POSITION wxDefaultPosition
////@end control identifiers
#define SYMBOL_WXRICHTEXTBULLETSPAGE_POSITION wxDefaultPosition
////@end control identifiers
-/*!
- * Compatibility
- */
-
-#ifndef wxCLOSE_BOX
-#define wxCLOSE_BOX 0x1000
-#endif
-
/*!
* wxRichTextBulletsPage class declaration
*/
/*!
* wxRichTextBulletsPage class declaration
*/
/////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////
-// Name: src/richtext/richeditfontpage.h
+// Name: wx/richtext/richeditfontpage.h
// Purpose: Font page for wxRichTextFormattingDialog
// Author: Julian Smart
// Modified by:
// Purpose: Font page for wxRichTextFormattingDialog
// Author: Julian Smart
// Modified by:
wxRichTextColourSwatchCtrl(wxWindow* parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0);
~wxRichTextColourSwatchCtrl();
wxRichTextColourSwatchCtrl(wxWindow* parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0);
~wxRichTextColourSwatchCtrl();
- void OnPaint(wxPaintEvent& event);
void OnMouseEvent(wxMouseEvent& event);
void SetColour(const wxColour& colour) { m_colour = colour; SetBackgroundColour(m_colour); }
void OnMouseEvent(wxMouseEvent& event);
void SetColour(const wxColour& colour) { m_colour = colour; SetBackgroundColour(m_colour); }
#endif
// _WX_RICHTEXTFORMATDLG_H_
#endif
// _WX_RICHTEXTFORMATDLG_H_
/////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////
-// Name: richtextindentspage.h
+// Name: wx/richtext/richtextindentspage.h
// Purpose:
// Author: Julian Smart
// Modified by:
// Created: 10/3/2006 2:28:21 PM
// Purpose:
// Author: Julian Smart
// Modified by:
// Created: 10/3/2006 2:28:21 PM
// Copyright: (c) Julian Smart
// Copyright: (c) Julian Smart
+// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _RICHTEXTINDENTSPAGE_H_
/////////////////////////////////////////////////////////////////////////////
#ifndef _RICHTEXTINDENTSPAGE_H_
#define SYMBOL_WXRICHTEXTINDENTSSPACINGPAGE_POSITION wxDefaultPosition
////@end control identifiers
#define SYMBOL_WXRICHTEXTINDENTSSPACINGPAGE_POSITION wxDefaultPosition
////@end control identifiers
-/*!
- * Compatibility
- */
-
-#ifndef wxCLOSE_BOX
-#define wxCLOSE_BOX 0x1000
-#endif
-
/*!
* wxRichTextIndentsSpacingPage class declaration
*/
/*!
* wxRichTextIndentsSpacingPage class declaration
*/
/////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////
-// Name: richtextstylepage.h
+// Name: wx/richtext/richtextstylepage.h
// Purpose:
// Author: Julian Smart
// Modified by:
// Created: 10/5/2006 11:34:55 AM
// Purpose:
// Author: Julian Smart
// Modified by:
// Created: 10/5/2006 11:34:55 AM
// Copyright: (c) Julian Smart
// Copyright: (c) Julian Smart
+// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _RICHTEXTSTYLEPAGE_H_
/////////////////////////////////////////////////////////////////////////////
#ifndef _RICHTEXTSTYLEPAGE_H_
#define SYMBOL_WXRICHTEXTSTYLEPAGE_POSITION wxDefaultPosition
////@end control identifiers
#define SYMBOL_WXRICHTEXTSTYLEPAGE_POSITION wxDefaultPosition
////@end control identifiers
-/*!
- * Compatibility
- */
-
-#ifndef wxCLOSE_BOX
-#define wxCLOSE_BOX 0x1000
-#endif
-
/*!
* wxRichTextStylePage class declaration
*/
/*!
* wxRichTextStylePage class declaration
*/
/////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////
-// Name: richtextsymboldlg.h
-// Purpose:
+// Name: wx/richtext/richtextsymboldlg.h
+// Purpose:
// Created: 10/5/2006 3:11:58 PM
// Created: 10/5/2006 3:11:58 PM
// Copyright: (c) Julian Smart
// Copyright: (c) Julian Smart
+// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _RICHTEXTSYMBOLDLG_H_
/////////////////////////////////////////////////////////////////////////////
#ifndef _RICHTEXTSYMBOLDLG_H_
class WXDLLIMPEXP_CORE wxTextCtrl;
////@end forward declarations
class WXDLLIMPEXP_CORE wxTextCtrl;
////@end forward declarations
-#ifndef __UNICODE__
-#if wxUSE_UNICODE
-#define __UNICODE__
-#endif
-#endif
-
*/
class WXDLLIMPEXP_RICHTEXT wxSymbolPickerDialog: public wxDialog
*/
class WXDLLIMPEXP_RICHTEXT wxSymbolPickerDialog: public wxDialog
DECLARE_DYNAMIC_CLASS( wxSymbolPickerDialog )
DECLARE_EVENT_TABLE()
DECLARE_DYNAMIC_CLASS( wxSymbolPickerDialog )
DECLARE_EVENT_TABLE()
/// Creates the controls and sizers
void CreateControls();
/// Creates the controls and sizers
void CreateControls();
/// Update the display
void UpdateSymbolDisplay(bool updateSymbolList = true, bool showAtSubset = true);
/// Respond to symbol selection
void OnSymbolSelected( wxCommandEvent& event );
/// Update the display
void UpdateSymbolDisplay(bool updateSymbolList = true, bool showAtSubset = true);
/// Respond to symbol selection
void OnSymbolSelected( wxCommandEvent& event );
/// Set Unicode mode
void SetUnicodeMode(bool unicodeMode);
/// Set Unicode mode
void SetUnicodeMode(bool unicodeMode);
/// Show at the current subset selection
void ShowAtSubset();
/// Show at the current subset selection
void ShowAtSubset();
/// Get the selected symbol character
int GetSymbolChar() const;
/// Is there a selection?
bool HasSelection() const { return !m_symbol.IsEmpty(); }
/// Get the selected symbol character
int GetSymbolChar() const;
/// Is there a selection?
bool HasSelection() const { return !m_symbol.IsEmpty(); }
/// Specifying normal text?
bool UseNormalFont() const { return m_fontName.IsEmpty(); }
/// Specifying normal text?
bool UseNormalFont() const { return m_fontName.IsEmpty(); }
/// Data transfer
virtual bool TransferDataToWindow();
/// Data transfer
virtual bool TransferDataToWindow();
void OnFromUnicodeSelected( wxCommandEvent& event );
#endif
void OnFromUnicodeSelected( wxCommandEvent& event );
#endif
-#if defined(__WXMSW__) || defined(__WXGTK__) || defined(__WXOS2__) || defined(__WXMGL__) || defined(__WXMOTIF__) || defined(__WXCOCOA__) || defined(__WXX11__) || defined(__WXPALMOS__)
- /// wxEVT_UPDATE_UI event handler for wxID_OK
- void OnOkUpdate( wxUpdateUIEvent& event );
+#if defined(__WXMSW__) || \
+ defined(__WXMAC__) || \
+ 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
void OnOkUpdate( wxUpdateUIEvent& event );
/// wxEVT_UPDATE_UI event handler for wxID_OK
void OnOkUpdate( wxUpdateUIEvent& event );
/*!
* The scrolling symbol list.
*/
/*!
* The scrolling symbol list.
*/
class WXDLLIMPEXP_RICHTEXT wxSymbolListCtrl : public wxVScrolledWindow
{
public:
class WXDLLIMPEXP_RICHTEXT wxSymbolListCtrl : public wxVScrolledWindow
{
public:
// set the current font
virtual bool SetFont(const wxFont& font);
// set the current font
virtual bool SetFont(const wxFont& font);
// set Unicode/ASCII mode
void SetUnicodeMode(bool unicodeMode);
// set Unicode/ASCII mode
void SetUnicodeMode(bool unicodeMode);
// set the selection to the specified item, if it is wxNOT_FOUND the
// selection is unset
void SetSelection(int selection);
// set the selection to the specified item, if it is wxNOT_FOUND the
// selection is unset
void SetSelection(int selection);
// make this item visible
void EnsureVisible(int item);
// make this item visible
void EnsureVisible(int item);
// by default both margins are 0
void SetMargins(const wxPoint& pt);
void SetMargins(wxCoord x, wxCoord y) { SetMargins(wxPoint(x, y)); }
// by default both margins are 0
void SetMargins(const wxPoint& pt);
void SetMargins(wxCoord x, wxCoord y) { SetMargins(wxPoint(x, y)); }
// set the cell size
void SetCellSize(const wxSize& sz) { m_cellSize = sz; }
const wxSize& GetCellSize() const { return m_cellSize; }
// set the cell size
void SetCellSize(const wxSize& sz) { m_cellSize = sz; }
const wxSize& GetCellSize() const { return m_cellSize; }
static wxVisualAttributes
GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
static wxVisualAttributes
GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
// Get min/max symbol values
int GetMinSymbolValue() const { return m_minSymbolValue; }
int GetMaxSymbolValue() const { return m_maxSymbolValue; }
// Get min/max symbol values
int GetMinSymbolValue() const { return m_minSymbolValue; }
int GetMaxSymbolValue() const { return m_maxSymbolValue; }
// Respond to size change
void OnSize(wxSizeEvent& event);
protected:
// Respond to size change
void OnSize(wxSizeEvent& event);
protected:
- // draws a line of symbols
+ // draws a line of symbols
virtual void OnDrawItem(wxDC& dc, const wxRect& rect, size_t n) const;
virtual void OnDrawItem(wxDC& dc, const wxRect& rect, size_t n) const;
// gets the line height
virtual wxCoord OnGetLineHeight(size_t line) const;
// gets the line height
virtual wxCoord OnGetLineHeight(size_t line) const;
// common part of keyboard and mouse handling processing code
void DoHandleItemClick(int item, int flags);
// common part of keyboard and mouse handling processing code
void DoHandleItemClick(int item, int flags);
// calculate line number from symbol value
int SymbolValueToLineNumber(int item);
// calculate line number from symbol value
int SymbolValueToLineNumber(int item);
// initialise control from current min/max values
void SetupCtrl(bool scrollToSelection = true);
// initialise control from current min/max values
void SetupCtrl(bool scrollToSelection = true);
// hit testing
int HitTest(const wxPoint& pt);
// hit testing
int HitTest(const wxPoint& pt);
// double buffer
wxBitmap* m_doubleBuffer;
// double buffer
wxBitmap* m_doubleBuffer;
// cell size
wxSize m_cellSize;
// cell size
wxSize m_cellSize;
// minimum and maximum symbol value
int m_minSymbolValue;
// minimum and maximum symbol value
int m_maxSymbolValue;
// minimum and maximum symbol value
int m_minSymbolValue;
// minimum and maximum symbol value
int m_maxSymbolValue;
// number of items per line
int m_symbolsPerLine;
// number of items per line
int m_symbolsPerLine;
// Unicode/ASCII mode
bool m_unicodeMode;
// Unicode/ASCII mode
bool m_unicodeMode;
/////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////
-// Name: richtexttabspage.h
+// Name: wx/richtext/richtexttabspage.h
// Purpose:
// Author: Julian Smart
// Modified by:
// Created: 10/4/2006 8:03:20 AM
// Purpose:
// Author: Julian Smart
// Modified by:
// Created: 10/4/2006 8:03:20 AM
// Copyright: (c) Julian Smart
// Copyright: (c) Julian Smart
+// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _RICHTEXTTABSPAGE_H_
/////////////////////////////////////////////////////////////////////////////
#ifndef _RICHTEXTTABSPAGE_H_
#define SYMBOL_WXRICHTEXTTABSPAGE_POSITION wxDefaultPosition
////@end control identifiers
#define SYMBOL_WXRICHTEXTTABSPAGE_POSITION wxDefaultPosition
////@end control identifiers
-/*!
- * Compatibility
- */
-
-#ifndef wxCLOSE_BOX
-#define wxCLOSE_BOX 0x1000
-#endif
-
/*!
* wxRichTextTabsPage class declaration
*/
/*!
* wxRichTextTabsPage class declaration
*/
/////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////
-// Name: richtextbulletspage.cpp
+// Name: src/richtext/richtextbulletspage.cpp
// Purpose:
// Author: Julian Smart
// Modified by:
// Created: 10/4/2006 10:32:31 AM
// Purpose:
// Author: Julian Smart
// Modified by:
// Created: 10/4/2006 10:32:31 AM
// Copyright: (c) Julian Smart
// Copyright: (c) Julian Smart
+// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////
-////@begin includes
-////@end includes
+// For compilers that support precompilation, includes "wx/wx.h".
+#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/fontenum.h"
#include "wx/richtext/richtextsymboldlg.h"
#include "wx/fontenum.h"
-////@begin XPM images
-////@end XPM images
-
/*!
* wxRichTextBulletsPage type definition
*/
/*!
* wxRichTextBulletsPage type definition
*/
itemBoxSizer11->Add(itemBoxSizer13, 0, wxGROW, 5);
wxString* m_symbolCtrlStrings = NULL;
itemBoxSizer11->Add(itemBoxSizer13, 0, wxGROW, 5);
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);
wxButton* itemButton15 = new wxButton( itemPanel1, ID_RICHTEXTBULLETSPAGE_CHOOSE_SYMBOL, _("Ch&oose..."), wxDefaultPosition, wxDefaultSize, 0 );
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 );
itemBoxSizer11->Add(itemStaticText17, 0, wxALIGN_LEFT|wxLEFT|wxRIGHT|wxTOP|wxADJUST_MINSIZE, 5);
wxString* m_symbolFontCtrlStrings = NULL;
itemBoxSizer11->Add(itemStaticText17, 0, wxALIGN_LEFT|wxLEFT|wxRIGHT|wxTOP|wxADJUST_MINSIZE, 5);
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);
itemBoxSizer4->Add(2, 1, 1, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM, 5);
itemBoxSizer11->Add(m_symbolFontCtrl, 0, wxGROW|wxALL, 5);
itemBoxSizer4->Add(2, 1, 1, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM, 5);
wxStaticText* itemStaticText23 = new wxStaticText( itemPanel1, ID_RICHTEXTBULLETSPAGE_NUMBERSTATIC, _("&Number:"), wxDefaultPosition, wxDefaultSize, 0 );
itemBoxSizer22->Add(itemStaticText23, 0, wxALIGN_LEFT|wxLEFT|wxRIGHT|wxTOP|wxADJUST_MINSIZE, 5);
wxStaticText* itemStaticText23 = new wxStaticText( itemPanel1, ID_RICHTEXTBULLETSPAGE_NUMBERSTATIC, _("&Number:"), wxDefaultPosition, wxDefaultSize, 0 );
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(5, 5, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
itemBoxSizer22->Add(m_numberCtrl, 0, wxGROW|wxALL, 5);
itemBoxSizer22->Add(5, 5, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
if (m_hasBulletSymbol)
{
wxChar c(wxT('*'));
if (m_hasBulletSymbol)
{
wxChar c(wxT('*'));
- if (m_symbolCtrl->GetValue().Length() > 0)
+ if (m_symbolCtrl->GetValue().length() > 0)
c = m_symbolCtrl->GetValue()[0];
attr->SetBulletSymbol(c);
attr->SetBulletFont(m_symbolFontCtrl->GetValue());
c = m_symbolCtrl->GetValue()[0];
attr->SetBulletSymbol(c);
attr->SetBulletFont(m_symbolFontCtrl->GetValue());
+#endif // wxUSE_RICHTEXT
/////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////
-// Name: richtextindentspage.cpp
+// Name: src/richtext/richtextindentspage.cpp
// Purpose:
// Author: Julian Smart
// Modified by:
// Created: 10/3/2006 2:28:21 PM
// Purpose:
// Author: Julian Smart
// Modified by:
// Created: 10/3/2006 2:28:21 PM
// Copyright: (c) Julian Smart
// Copyright: (c) Julian Smart
+// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////
-////@begin includes
-////@end includes
+// For compilers that support precompilation, includes "wx/wx.h".
+#include "wx/wxprec.h"
-#include "../../include/wx/richtext/richtextindentspage.h"
+#ifdef __BORLANDC__
+ #pragma hdrstop
+#endif
-////@begin XPM images
-////@end XPM images
+#if wxUSE_RICHTEXT
+
+#include "wx/richtext/richtextindentspage.h"
+
+#ifndef WX_PRECOMP
+#endif
/*!
* wxRichTextIndentsSpacingPage type definition
/*!
* wxRichTextIndentsSpacingPage type definition
wxBoxSizer* itemBoxSizer24 = new wxBoxSizer(wxHORIZONTAL);
itemFlexGridSizer22->Add(itemBoxSizer24, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
wxBoxSizer* itemBoxSizer24 = new wxBoxSizer(wxHORIZONTAL);
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);
wxStaticText* itemStaticText26 = new wxStaticText( itemPanel1, wxID_STATIC, _("Left (&first line):"), wxDefaultPosition, wxDefaultSize, 0 );
itemBoxSizer24->Add(m_indentLeft, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
wxStaticText* itemStaticText26 = new wxStaticText( itemPanel1, wxID_STATIC, _("Left (&first line):"), wxDefaultPosition, wxDefaultSize, 0 );
wxBoxSizer* itemBoxSizer27 = new wxBoxSizer(wxHORIZONTAL);
itemFlexGridSizer22->Add(itemBoxSizer27, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
wxBoxSizer* itemBoxSizer27 = new wxBoxSizer(wxHORIZONTAL);
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);
wxStaticText* itemStaticText29 = new wxStaticText( itemPanel1, wxID_STATIC, _("&Right:"), wxDefaultPosition, wxDefaultSize, 0 );
itemBoxSizer27->Add(m_indentLeftFirst, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
wxStaticText* itemStaticText29 = new wxStaticText( itemPanel1, wxID_STATIC, _("&Right:"), wxDefaultPosition, wxDefaultSize, 0 );
wxBoxSizer* itemBoxSizer30 = new wxBoxSizer(wxHORIZONTAL);
itemFlexGridSizer22->Add(itemBoxSizer30, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
wxBoxSizer* itemBoxSizer30 = new wxBoxSizer(wxHORIZONTAL);
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);
itemBoxSizer4->Add(2, 1, 1, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM, 5);
itemBoxSizer30->Add(m_indentRight, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
itemBoxSizer4->Add(2, 1, 1, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM, 5);
wxBoxSizer* itemBoxSizer41 = new wxBoxSizer(wxHORIZONTAL);
itemFlexGridSizer39->Add(itemBoxSizer41, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
wxBoxSizer* itemBoxSizer41 = new wxBoxSizer(wxHORIZONTAL);
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);
wxStaticText* itemStaticText43 = new wxStaticText( itemPanel1, wxID_STATIC, _("After a paragraph:"), wxDefaultPosition, wxDefaultSize, 0 );
itemBoxSizer41->Add(m_spacingBefore, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
wxStaticText* itemStaticText43 = new wxStaticText( itemPanel1, wxID_STATIC, _("After a paragraph:"), wxDefaultPosition, wxDefaultSize, 0 );
wxBoxSizer* itemBoxSizer44 = new wxBoxSizer(wxHORIZONTAL);
itemFlexGridSizer39->Add(itemBoxSizer44, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
wxBoxSizer* itemBoxSizer44 = new wxBoxSizer(wxHORIZONTAL);
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);
wxStaticText* itemStaticText46 = new wxStaticText( itemPanel1, wxID_STATIC, _("Line spacing:"), wxDefaultPosition, wxDefaultSize, 0 );
itemBoxSizer44->Add(m_spacingAfter, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
wxStaticText* itemStaticText46 = new wxStaticText( itemPanel1, wxID_STATIC, _("Line spacing:"), wxDefaultPosition, wxDefaultSize, 0 );
wxString leftIndent(m_indentLeft->GetValue());
wxString leftFirstIndent(m_indentLeftFirst->GetValue());
wxString leftIndent(m_indentLeft->GetValue());
wxString leftFirstIndent(m_indentLeftFirst->GetValue());
- if (!leftIndent.IsEmpty())
+ if (!leftIndent.empty())
{
int visualLeftIndent = wxAtoi(leftIndent);
int visualLeftFirstIndent = wxAtoi(leftFirstIndent);
{
int visualLeftIndent = wxAtoi(leftIndent);
int visualLeftFirstIndent = wxAtoi(leftFirstIndent);
attr->SetFlags(attr->GetFlags() & (~wxTEXT_ATTR_LEFT_INDENT));
wxString rightIndent(m_indentRight->GetValue());
attr->SetFlags(attr->GetFlags() & (~wxTEXT_ATTR_LEFT_INDENT));
wxString rightIndent(m_indentRight->GetValue());
- if (!rightIndent.IsEmpty())
+ if (!rightIndent.empty())
attr->SetRightIndent(wxAtoi(rightIndent));
else
attr->SetFlags(attr->GetFlags() & (~wxTEXT_ATTR_RIGHT_INDENT));
wxString spacingAfter(m_spacingAfter->GetValue());
attr->SetRightIndent(wxAtoi(rightIndent));
else
attr->SetFlags(attr->GetFlags() & (~wxTEXT_ATTR_RIGHT_INDENT));
wxString spacingAfter(m_spacingAfter->GetValue());
- if (!spacingAfter.IsEmpty())
+ if (!spacingAfter.empty())
attr->SetParagraphSpacingAfter(wxAtoi(spacingAfter));
else
attr->SetFlags(attr->GetFlags() & (~wxTEXT_ATTR_PARA_SPACING_AFTER));
wxString spacingBefore(m_spacingBefore->GetValue());
attr->SetParagraphSpacingAfter(wxAtoi(spacingAfter));
else
attr->SetFlags(attr->GetFlags() & (~wxTEXT_ATTR_PARA_SPACING_AFTER));
wxString spacingBefore(m_spacingBefore->GetValue());
- if (!spacingBefore.IsEmpty())
+ if (!spacingBefore.empty())
attr->SetParagraphSpacingBefore(wxAtoi(spacingBefore));
else
attr->SetFlags(attr->GetFlags() & (~wxTEXT_ATTR_PARA_SPACING_BEFORE));
attr->SetParagraphSpacingBefore(wxAtoi(spacingBefore));
else
attr->SetFlags(attr->GetFlags() & (~wxTEXT_ATTR_PARA_SPACING_BEFORE));
+#endif // wxUSE_RICHTEXT
/////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////
-// Name: richtextstylepage.cpp
+// Name: src/richtext/richtextstylepage.cpp
// Purpose:
// Author: Julian Smart
// Modified by:
// Created: 10/5/2006 11:34:55 AM
// Purpose:
// Author: Julian Smart
// Modified by:
// Created: 10/5/2006 11:34:55 AM
// Copyright: (c) Julian Smart
// Copyright: (c) Julian Smart
+// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////
-////@begin includes
-////@end includes
+// For compilers that support precompilation, includes "wx/wx.h".
+#include "wx/wxprec.h"
-#include "../../include/wx/richtext/richtextstylepage.h"
+#ifdef __BORLANDC__
+ #pragma hdrstop
+#endif
-////@begin XPM images
-////@end XPM images
+#if wxUSE_RICHTEXT
+
+#include "wx/richtext/richtextstylepage.h"
+
+#ifndef WX_PRECOMP
+#endif
/*!
* wxRichTextStylePage type definition
/*!
* wxRichTextStylePage type definition
wxStaticText* itemStaticText6 = new wxStaticText( itemPanel1, wxID_STATIC, _("&Style:"), wxDefaultPosition, wxDefaultSize, 0 );
itemBoxSizer5->Add(itemStaticText6, 0, wxALIGN_LEFT|wxLEFT|wxRIGHT|wxTOP|wxADJUST_MINSIZE, 5);
wxStaticText* itemStaticText6 = new wxStaticText( itemPanel1, wxID_STATIC, _("&Style:"), wxDefaultPosition, wxDefaultSize, 0 );
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);
wxStaticText* itemStaticText8 = new wxStaticText( itemPanel1, wxID_STATIC, _("&Based on:"), wxDefaultPosition, wxDefaultSize, 0 );
itemBoxSizer5->Add(itemStaticText8, 0, wxALIGN_LEFT|wxLEFT|wxRIGHT|wxTOP|wxADJUST_MINSIZE, 5);
wxString* m_basedOnStrings = NULL;
itemBoxSizer5->Add(m_styleName, 0, wxGROW|wxALL, 5);
wxStaticText* itemStaticText8 = new wxStaticText( itemPanel1, wxID_STATIC, _("&Based on:"), wxDefaultPosition, wxDefaultSize, 0 );
itemBoxSizer5->Add(itemStaticText8, 0, wxALIGN_LEFT|wxLEFT|wxRIGHT|wxTOP|wxADJUST_MINSIZE, 5);
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);
wxStaticText* itemStaticText10 = new wxStaticText( itemPanel1, wxID_STATIC, _("&Next style:"), wxDefaultPosition, wxDefaultSize, 0 );
itemBoxSizer5->Add(itemStaticText10, 0, wxALIGN_LEFT|wxLEFT|wxRIGHT|wxTOP|wxADJUST_MINSIZE, 5);
wxString* m_nextStyleStrings = NULL;
itemBoxSizer5->Add(m_basedOn, 0, wxGROW|wxALL, 5);
wxStaticText* itemStaticText10 = new wxStaticText( itemPanel1, wxID_STATIC, _("&Next style:"), wxDefaultPosition, wxDefaultSize, 0 );
itemBoxSizer5->Add(itemStaticText10, 0, wxALIGN_LEFT|wxLEFT|wxRIGHT|wxTOP|wxADJUST_MINSIZE, 5);
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);
itemBoxSizer3->Add(5, 5, 1, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
itemBoxSizer5->Add(m_nextStyle, 0, wxGROW|wxALL, 5);
itemBoxSizer3->Add(5, 5, 1, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
wxRichTextStyleDefinition* def = wxRichTextFormattingDialog::GetDialogStyleDefinition(this);
event.Enable(def->IsKindOf(CLASSINFO(wxRichTextParagraphStyleDefinition)));
}
wxRichTextStyleDefinition* def = wxRichTextFormattingDialog::GetDialogStyleDefinition(this);
event.Enable(def->IsKindOf(CLASSINFO(wxRichTextParagraphStyleDefinition)));
}
+
+#endif // wxUSE_RICHTEXT
/////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////
-// Name: richtextsymboldlg.cpp
+// Name: src/richtext/richtextsymboldlg.cpp
// Purpose:
// Author: Julian Smart
// Modified by:
// Created: 10/5/2006 3:11:58 PM
// Purpose:
// Author: Julian Smart
// Modified by:
// Created: 10/5/2006 3:11:58 PM
// Copyright: (c) Julian Smart
// Copyright: (c) Julian Smart
+// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
// For compilers that support precompilation, includes "wx/wx.h".
#include "wx/wxprec.h"
#ifdef __BORLANDC__
/////////////////////////////////////////////////////////////////////////////
// For compilers that support precompilation, includes "wx/wx.h".
#include "wx/wxprec.h"
#ifdef __BORLANDC__
#endif
#if wxUSE_RICHTEXT
#endif
#if wxUSE_RICHTEXT
#include "wx/richtext/richtextsymboldlg.h"
#ifndef WX_PRECOMP
#include "wx/richtext/richtextsymboldlg.h"
#ifndef WX_PRECOMP
+ #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"
-////@begin includes
-////@end includes
-
#include "wx/fontenum.h"
#include "wx/dcbuffer.h"
#include "wx/fontenum.h"
#include "wx/dcbuffer.h"
-#include "wx/settings.h"
-
-////@begin XPM images
-////@end XPM images
/* Microsoft Unicode subset numbering
*/
/* Microsoft Unicode subset numbering
*/
itemBoxSizer5->Add(itemStaticText6, 0, wxALIGN_CENTER_VERTICAL|wxALL|wxADJUST_MINSIZE, 5);
wxString* m_fontCtrlStrings = NULL;
itemBoxSizer5->Add(itemStaticText6, 0, wxALIGN_CENTER_VERTICAL|wxALL|wxADJUST_MINSIZE, 5);
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(5, 5, 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);
#if defined(__UNICODE__)
wxString* m_subsetCtrlStrings = NULL;
#if defined(__UNICODE__)
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."));
if (ShowToolTips())
m_subsetCtrl->SetToolTip(_("Shows a Unicode subset."));
m_subsetCtrl->SetHelpText(_("Shows a Unicode subset."));
if (ShowToolTips())
m_subsetCtrl->SetToolTip(_("Shows a Unicode subset."));
wxBoxSizer* itemBoxSizer12 = new wxBoxSizer(wxHORIZONTAL);
itemBoxSizer3->Add(itemBoxSizer12, 0, wxGROW, 5);
wxBoxSizer* itemBoxSizer12 = new wxBoxSizer(wxHORIZONTAL);
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(5, 5, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
itemBoxSizer12->Add(m_symbolStaticCtrl, 0, wxALIGN_CENTER_VERTICAL|wxALL|wxADJUST_MINSIZE, 5);
itemBoxSizer12->Add(5, 5, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
wxStaticText* itemStaticText15 = new wxStaticText( itemDialog1, wxID_STATIC, _("&Character code:"), wxDefaultPosition, wxDefaultSize, 0 );
itemBoxSizer12->Add(itemStaticText15, 0, wxALIGN_CENTER_VERTICAL|wxALL|wxADJUST_MINSIZE, 5);
wxStaticText* itemStaticText15 = new wxStaticText( itemDialog1, wxID_STATIC, _("&Character code:"), wxDefaultPosition, wxDefaultSize, 0 );
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(5, 5, 1, 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);
m_fontCtrl->Append(faceNames);
}
m_fontCtrl->Append(faceNames);
}
- if (m_fontName.IsEmpty())
+ if (m_fontName.empty())
m_fontCtrl->SetSelection(0);
else
{
m_fontCtrl->SetSelection(0);
else
{
m_fontCtrl->SetSelection(0);
}
m_fontCtrl->SetSelection(0);
}
- if (!m_symbol.IsEmpty())
{
int sel = (int) m_symbol[0];
m_symbolsCtrl->SetSelection(sel);
{
int sel = (int) m_symbol[0];
m_symbolsCtrl->SetSelection(sel);
{
wxFont font;
wxString fontNameToUse;
{
wxFont font;
wxString fontNameToUse;
- if (m_fontName.IsEmpty())
+ if (m_fontName.empty())
fontNameToUse = m_normalTextFontName;
else
fontNameToUse = m_fontName;
fontNameToUse = m_normalTextFontName;
else
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);
}
m_symbolsCtrl->SetFont(font);
}
m_symbolsCtrl->SetFont(font);
}
- if (!m_symbol.IsEmpty())
{
m_symbolStaticCtrl->SetFont(font);
m_symbolStaticCtrl->SetLabel(m_symbol);
{
m_symbolStaticCtrl->SetFont(font);
m_symbolStaticCtrl->SetLabel(m_symbol);
return;
int sel = event.GetSelection();
return;
int sel = event.GetSelection();
+ if (sel == wxNOT_FOUND)
m_symbol = wxEmptyString;
else
{
m_symbol = wxEmptyString;
else
{
/// Get the selected symbol character
int wxSymbolPickerDialog::GetSymbolChar() const
{
/// Get the selected symbol character
int wxSymbolPickerDialog::GetSymbolChar() const
{
- if (m_symbol.IsEmpty())
return -1;
else
return (int) m_symbol[0];
return -1;
else
return (int) m_symbol[0];
/////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////
-// Name: richtexttabspage.cpp
+// Name: src/richtext/richtexttabspage.cpp
// Purpose:
// Author: Julian Smart
// Modified by:
// Created: 10/4/2006 8:03:20 AM
// Purpose:
// Author: Julian Smart
// Modified by:
// Created: 10/4/2006 8:03:20 AM
// Copyright: (c) Julian Smart
// Copyright: (c) Julian Smart
+// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////
-////@begin includes
-////@end includes
+// For compilers that support precompilation, includes "wx/wx.h".
+#include "wx/wxprec.h"
-#include "../../include/wx/richtext/richtexttabspage.h"
+#ifdef __BORLANDC__
+ #pragma hdrstop
+#endif
-////@begin XPM images
-////@end XPM images
+#if wxUSE_RICHTEXT
+
+#include "wx/richtext/richtexttabspage.h"
+
+#ifndef WX_PRECOMP
+#endif
/*!
* wxRichTextTabsPage type definition
/*!
* wxRichTextTabsPage type definition
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);
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);
- 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);
wxString* m_tabListCtrlStrings = NULL;
itemBoxSizer5->Add(m_tabEditCtrl, 0, wxGROW|wxALL, 5);
wxString* m_tabListCtrlStrings = NULL;
wxBoxSizer* itemBoxSizer10 = new wxBoxSizer(wxVERTICAL);
itemBoxSizer4->Add(itemBoxSizer10, 0, wxGROW, 5);
wxBoxSizer* itemBoxSizer10 = new wxBoxSizer(wxVERTICAL);
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);
wxButton* itemButton12 = new wxButton( itemPanel1, ID_RICHTEXTTABSPAGE_NEW_TAB, _("&New"), wxDefaultPosition, wxDefaultSize, 0 );
itemBoxSizer10->Add(itemStaticText11, 0, wxALIGN_CENTER_HORIZONTAL|wxBOTTOM|wxADJUST_MINSIZE, 5);
wxButton* itemButton12 = new wxButton( itemPanel1, ID_RICHTEXTTABSPAGE_NEW_TAB, _("&New"), wxDefaultPosition, wxDefaultSize, 0 );
void wxRichTextTabsPage::OnNewTabClick( wxCommandEvent& WXUNUSED(event) )
{
wxString str = m_tabEditCtrl->GetValue();
void wxRichTextTabsPage::OnNewTabClick( wxCommandEvent& WXUNUSED(event) )
{
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)));
// This may be a bit expensive - consider updating New button when text
// changes in edit control
wxString str = m_tabEditCtrl->GetValue();
// This may be a bit expensive - consider updating New button when text
// changes in edit control
wxString str = m_tabEditCtrl->GetValue();
- if (!str.IsEmpty() && str.IsNumber())
+ if (!str.empty() && str.IsNumber())
{
wxString s(wxString::Format(wxT("%d"), wxAtoi(str)));
event.Enable(m_tabListCtrl->FindString(s) == wxNOT_FOUND);
{
wxString s(wxString::Format(wxT("%d"), wxAtoi(str)));
event.Enable(m_tabListCtrl->FindString(s) == wxNOT_FOUND);
void wxRichTextTabsPage::OnTablistSelected( wxCommandEvent& WXUNUSED(event) )
{
wxString str = m_tabListCtrl->GetStringSelection();
void wxRichTextTabsPage::OnTablistSelected( wxCommandEvent& WXUNUSED(event) )
{
wxString str = m_tabListCtrl->GetStringSelection();
m_tabEditCtrl->SetValue(str);
}
m_tabEditCtrl->SetValue(str);
}
+
+#endif // wxUSE_RICHTEXT