Whitespaces and headers cleaning.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@42147 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Włodzimierz Skiba
2006-10-20 07:48:31 +00:00
parent 774f4d1221
commit 41a852156f
20 changed files with 235 additions and 240 deletions

View File

@@ -2081,4 +2081,3 @@ WXDLLIMPEXP_RICHTEXT void wxRichTextModuleInit();
#endif #endif
// _WX_RICHTEXTBUFFER_H_ // _WX_RICHTEXTBUFFER_H_

View File

@@ -869,4 +869,3 @@ typedef void (wxEvtHandler::*wxRichTextEventFunction)(wxRichTextEvent&);
#endif #endif
// _WX_RICHTEXTCTRL_H_ // _WX_RICHTEXTCTRL_H_

View File

@@ -173,10 +173,10 @@ public:
/// Should we show tooltips? /// Should we show tooltips?
static bool ShowToolTips() { return sm_showToolTips; } static bool ShowToolTips() { return sm_showToolTips; }
/// Determines whether tooltips will be shown /// Determines whether tooltips will be shown
static void SetShowToolTips(bool show) { sm_showToolTips = show; } static void SetShowToolTips(bool show) { sm_showToolTips = show; }
/// Map book control page index to our page id /// Map book control page index to our page id
void AddPageId(int id) { m_pageIds.Add(id); } void AddPageId(int id) { m_pageIds.Add(id); }

View File

@@ -1,12 +1,12 @@
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// Name: richtextliststylepage.h // Name: wx/richtext/richtextliststylepage.h
// Purpose: // Purpose:
// Author: Julian Smart // Author: Julian Smart
// Modified by: // Modified by:
// Created: 10/18/2006 11:36:37 AM // Created: 10/18/2006 11:36:37 AM
// RCS-ID: // RCS-ID: $Id$
// Copyright: (c) Julian Smart // Copyright: (c) Julian Smart
// Licence: // Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
#ifndef _RICHTEXTLISTSTYLEPAGE_H_ #ifndef _RICHTEXTLISTSTYLEPAGE_H_
@@ -39,7 +39,7 @@
*/ */
class WXDLLIMPEXP_RICHTEXT wxRichTextListStylePage: public wxPanel class WXDLLIMPEXP_RICHTEXT wxRichTextListStylePage: public wxPanel
{ {
DECLARE_DYNAMIC_CLASS( wxRichTextListStylePage ) DECLARE_DYNAMIC_CLASS( wxRichTextListStylePage )
DECLARE_EVENT_TABLE() DECLARE_EVENT_TABLE()
@@ -63,7 +63,7 @@ public:
/// Transfer data from/to window /// Transfer data from/to window
virtual bool TransferDataFromWindow(); virtual bool TransferDataFromWindow();
virtual bool TransferDataToWindow(); virtual bool TransferDataToWindow();
/// Get attributes for selected level /// Get attributes for selected level
wxTextAttrEx* GetAttributesForSelection(); wxTextAttrEx* GetAttributesForSelection();
@@ -78,7 +78,7 @@ public:
/// Transfer from the window and preview /// Transfer from the window and preview
void TransferAndPreview(); void TransferAndPreview();
////@begin wxRichTextListStylePage event handler declarations ////@begin wxRichTextListStylePage event handler declarations
/// wxEVT_COMMAND_SPINCTRL_UPDATED event handler for ID_RICHTEXTLISTSTYLEPAGE_LEVEL /// wxEVT_COMMAND_SPINCTRL_UPDATED event handler for ID_RICHTEXTLISTSTYLEPAGE_LEVEL

View File

@@ -1,12 +1,12 @@
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// Name: richtextstyledlg.h // Name: wx/richtext/richtextstyledlg.h
// Purpose: // Purpose:
// Author: Julian Smart // Author: Julian Smart
// Modified by: // Modified by:
// Created: 10/5/2006 12:05:31 PM // Created: 10/5/2006 12:05:31 PM
// RCS-ID: // RCS-ID: $Id$
// Copyright: (c) Julian Smart // Copyright: (c) Julian Smart
// Licence: // Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
#ifndef _RICHTEXTSTYLEDLG_H_ #ifndef _RICHTEXTSTYLEDLG_H_
@@ -48,7 +48,7 @@ class wxRichTextCtrl;
/*! /*!
* Flags for specifying permitted operations * Flags for specifying permitted operations
*/ */
#define wxRICHTEXT_ORGANISER_DELETE_STYLES 0x0001 #define wxRICHTEXT_ORGANISER_DELETE_STYLES 0x0001
#define wxRICHTEXT_ORGANISER_CREATE_STYLES 0x0002 #define wxRICHTEXT_ORGANISER_CREATE_STYLES 0x0002
#define wxRICHTEXT_ORGANISER_APPLY_STYLES 0x0004 #define wxRICHTEXT_ORGANISER_APPLY_STYLES 0x0004
@@ -73,7 +73,7 @@ class wxRichTextCtrl;
*/ */
class WXDLLIMPEXP_RICHTEXT wxRichTextStyleOrganiserDialog: public wxDialog class WXDLLIMPEXP_RICHTEXT wxRichTextStyleOrganiserDialog: public wxDialog
{ {
DECLARE_DYNAMIC_CLASS( wxRichTextStyleOrganiserDialog ) DECLARE_DYNAMIC_CLASS( wxRichTextStyleOrganiserDialog )
DECLARE_EVENT_TABLE() DECLARE_EVENT_TABLE()
@@ -87,18 +87,18 @@ public:
/// Creates the controls and sizers /// Creates the controls and sizers
void CreateControls(); void CreateControls();
/// Initialise member variables /// Initialise member variables
void Init(); void Init();
/// Transfer data from/to window /// Transfer data from/to window
virtual bool TransferDataFromWindow(); virtual bool TransferDataFromWindow();
virtual bool TransferDataToWindow(); virtual bool TransferDataToWindow();
/// Set/get style sheet /// Set/get style sheet
void SetStyleSheet(wxRichTextStyleSheet* sheet) { m_richTextStyleSheet = sheet; } void SetStyleSheet(wxRichTextStyleSheet* sheet) { m_richTextStyleSheet = sheet; }
wxRichTextStyleSheet* GetStyleSheet() const { return m_richTextStyleSheet; } wxRichTextStyleSheet* GetStyleSheet() const { return m_richTextStyleSheet; }
/// Set/get control /// Set/get control
void SetRichTextCtrl(wxRichTextCtrl* ctrl) { m_richTextCtrl = ctrl; } void SetRichTextCtrl(wxRichTextCtrl* ctrl) { m_richTextCtrl = ctrl; }
wxRichTextCtrl* GetRichTextCtrl() const { return m_richTextCtrl; } wxRichTextCtrl* GetRichTextCtrl() const { return m_richTextCtrl; }
@@ -106,30 +106,30 @@ public:
/// Set/get flags /// Set/get flags
void SetFlags(int flags) { m_flags = flags; } void SetFlags(int flags) { m_flags = flags; }
int GetFlags() const { return m_flags; } int GetFlags() const { return m_flags; }
/// Show preview for given or selected preview /// Show preview for given or selected preview
void ShowPreview(int sel = -1); void ShowPreview(int sel = -1);
/// Clears the preview /// Clears the preview
void ClearPreview(); void ClearPreview();
/// List selection /// List selection
void OnListSelection(wxCommandEvent& event); void OnListSelection(wxCommandEvent& event);
/// Get/set restart numbering boolean /// Get/set restart numbering boolean
bool GetRestartNumbering() const { return m_restartNumbering; } bool GetRestartNumbering() const { return m_restartNumbering; }
void SetRestartNumbering(bool restartNumbering) { m_restartNumbering = restartNumbering; } void SetRestartNumbering(bool restartNumbering) { m_restartNumbering = restartNumbering; }
/// Get selected style name or definition /// Get selected style name or definition
wxString GetSelectedStyle() const; wxString GetSelectedStyle() const;
wxRichTextStyleDefinition* GetSelectedStyleDefinition() const; wxRichTextStyleDefinition* GetSelectedStyleDefinition() const;
/// Apply the style /// Apply the style
bool ApplyStyle(wxRichTextCtrl* ctrl = NULL); bool ApplyStyle(wxRichTextCtrl* ctrl = NULL);
/// Should we show tooltips? /// Should we show tooltips?
static bool ShowToolTips() { return sm_showToolTips; } static bool ShowToolTips() { return sm_showToolTips; }
/// Determines whether tooltips will be shown /// Determines whether tooltips will be shown
static void SetShowToolTips(bool show) { sm_showToolTips = show; } static void SetShowToolTips(bool show) { sm_showToolTips = show; }
@@ -226,7 +226,7 @@ private:
wxRichTextCtrl* m_richTextCtrl; wxRichTextCtrl* m_richTextCtrl;
wxRichTextStyleSheet* m_richTextStyleSheet; wxRichTextStyleSheet* m_richTextStyleSheet;
bool m_dontUpdate; bool m_dontUpdate;
int m_flags; int m_flags;
static bool sm_showToolTips; static bool sm_showToolTips;

View File

@@ -1,8 +1,8 @@
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// Name: wx/richtext/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: $Id$ // RCS-ID: $Id$
// Copyright: (c) Julian Smart // Copyright: (c) Julian Smart
@@ -29,7 +29,7 @@
*/ */
class wxRichTextStylePage: public wxPanel class wxRichTextStylePage: public wxPanel
{ {
DECLARE_DYNAMIC_CLASS( wxRichTextStylePage ) DECLARE_DYNAMIC_CLASS( wxRichTextStylePage )
DECLARE_EVENT_TABLE() DECLARE_EVENT_TABLE()
@@ -40,7 +40,7 @@ public:
/// Creation /// Creation
bool Create( wxWindow* parent, wxWindowID id = SYMBOL_WXRICHTEXTSTYLEPAGE_IDNAME, const wxPoint& pos = SYMBOL_WXRICHTEXTSTYLEPAGE_POSITION, const wxSize& size = SYMBOL_WXRICHTEXTSTYLEPAGE_SIZE, long style = SYMBOL_WXRICHTEXTSTYLEPAGE_STYLE ); bool Create( wxWindow* parent, wxWindowID id = SYMBOL_WXRICHTEXTSTYLEPAGE_IDNAME, const wxPoint& pos = SYMBOL_WXRICHTEXTSTYLEPAGE_POSITION, const wxSize& size = SYMBOL_WXRICHTEXTSTYLEPAGE_SIZE, long style = SYMBOL_WXRICHTEXTSTYLEPAGE_STYLE );
/// Initialise members /// Initialise members
void Init(); void Init();

View File

@@ -4,7 +4,7 @@
// Author: Julian Smart // Author: Julian Smart
// Modified by: // Modified by:
// Created: 2005-09-30 // Created: 2005-09-30
// RCS-ID: // RCS-ID: $Id$
// Copyright: (c) Julian Smart // Copyright: (c) Julian Smart
// Licence: wxWindows licence // Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////

View File

@@ -94,7 +94,7 @@ public:
/// Should we show tooltips? /// Should we show tooltips?
static bool ShowToolTips() { return sm_showToolTips; } static bool ShowToolTips() { return sm_showToolTips; }
/// Determines whether tooltips will be shown /// Determines whether tooltips will be shown
static void SetShowToolTips(bool show) { sm_showToolTips = show; } static void SetShowToolTips(bool show) { sm_showToolTips = show; }

View File

@@ -932,7 +932,7 @@ wxRichTextRange wxRichTextParagraphLayoutBox::AddParagraphs(const wxString& text
size_t i = 0; size_t i = 0;
size_t len = text.length(); size_t len = text.length();
wxString line; wxString line;
wxRichTextParagraph* para = new wxRichTextParagraph(wxT(""), this, & style); wxRichTextParagraph* para = new wxRichTextParagraph(wxEmptyString, this, & style);
if (paraStyle) if (paraStyle)
para->SetAttributes(*paraStyle); para->SetAttributes(*paraStyle);
@@ -949,7 +949,7 @@ wxRichTextRange wxRichTextParagraphLayoutBox::AddParagraphs(const wxString& text
wxRichTextPlainText* plainText = (wxRichTextPlainText*) para->GetChildren().GetFirst()->GetData(); wxRichTextPlainText* plainText = (wxRichTextPlainText*) para->GetChildren().GetFirst()->GetData();
plainText->SetText(line); plainText->SetText(line);
para = new wxRichTextParagraph(wxT(""), this, & style); para = new wxRichTextParagraph(wxEmptyString, this, & style);
if (paraStyle) if (paraStyle)
para->SetAttributes(*paraStyle); para->SetAttributes(*paraStyle);
@@ -1617,7 +1617,7 @@ bool wxRichTextParagraphLayoutBox::SetStyle(const wxRichTextRange& range, const
} }
else else
newPara = para; newPara = para;
if (paragraphStyle && !charactersOnly) if (paragraphStyle && !charactersOnly)
{ {
if (applyMinimal) if (applyMinimal)
@@ -2433,7 +2433,7 @@ bool wxRichTextParagraphLayoutBox::ApplyStyleSheet(wxRichTextStyleSheet* styleSh
// Problem: when changing from one list style to another, there's a danger that the level info will get lost. // Problem: when changing from one list style to another, there's a danger that the level info will get lost.
// So when changing a list style interactively, could retrieve level based on current style, then // So when changing a list style interactively, could retrieve level based on current style, then
// set appropriate indent and apply new style. // set appropriate indent and apply new style.
if (!para->GetAttributes().GetParagraphStyleName().IsEmpty() && !para->GetAttributes().GetListStyleName().IsEmpty()) if (!para->GetAttributes().GetParagraphStyleName().IsEmpty() && !para->GetAttributes().GetListStyleName().IsEmpty())
{ {
int currentIndent = para->GetAttributes().GetLeftIndent(); int currentIndent = para->GetAttributes().GetLeftIndent();
@@ -2467,9 +2467,9 @@ bool wxRichTextParagraphLayoutBox::ApplyStyleSheet(wxRichTextStyleSheet* styleSh
wxRichTextListStyleDefinition* listDef = styleSheet->FindListStyle(para->GetAttributes().GetListStyleName()); wxRichTextListStyleDefinition* listDef = styleSheet->FindListStyle(para->GetAttributes().GetListStyleName());
// Overall list definition style // Overall list definition style
para->GetAttributes() = listDef->GetStyle(); para->GetAttributes() = listDef->GetStyle();
// Style for this level // Style for this level
wxRichTextApplyStyle(para->GetAttributes(), * listDef->GetLevelAttributes(listDef->FindLevelForIndent(currentIndent))); wxRichTextApplyStyle(para->GetAttributes(), * listDef->GetLevelAttributes(listDef->FindLevelForIndent(currentIndent)));
@@ -2498,10 +2498,10 @@ bool wxRichTextParagraphLayoutBox::SetListStyle(const wxRichTextRange& range, wx
// bool applyMinimal = ((flags & wxRICHTEXT_SETSTYLE_OPTIMIZE) != 0); // bool applyMinimal = ((flags & wxRICHTEXT_SETSTYLE_OPTIMIZE) != 0);
bool specifyLevel = ((flags & wxRICHTEXT_SETSTYLE_SPECIFY_LEVEL) != 0); bool specifyLevel = ((flags & wxRICHTEXT_SETSTYLE_SPECIFY_LEVEL) != 0);
bool renumber = ((flags & wxRICHTEXT_SETSTYLE_RENUMBER) != 0); bool renumber = ((flags & wxRICHTEXT_SETSTYLE_RENUMBER) != 0);
// Current number, if numbering // Current number, if numbering
int n = startFrom; int n = startFrom;
wxASSERT (!specifyLevel || (specifyLevel && (specifiedLevel >= 0))); wxASSERT (!specifyLevel || (specifyLevel && (specifiedLevel >= 0)));
// If we are associated with a control, make undoable; otherwise, apply immediately // If we are associated with a control, make undoable; otherwise, apply immediately
@@ -2546,12 +2546,12 @@ bool wxRichTextParagraphLayoutBox::SetListStyle(const wxRichTextRange& range, wx
} }
else else
newPara = para; newPara = para;
if (def) if (def)
{ {
int thisIndent = newPara->GetAttributes().GetLeftIndent(); int thisIndent = newPara->GetAttributes().GetLeftIndent();
int thisLevel = specifyLevel ? specifiedLevel : def->FindLevelForIndent(thisIndent); int thisLevel = specifyLevel ? specifiedLevel : def->FindLevelForIndent(thisIndent);
// How is numbering going to work? // How is numbering going to work?
// If we are renumbering, or numbering for the first time, we need to keep // If we are renumbering, or numbering for the first time, we need to keep
// track of the number for each level. But we might be simply applying a different // track of the number for each level. But we might be simply applying a different
@@ -2563,13 +2563,13 @@ bool wxRichTextParagraphLayoutBox::SetListStyle(const wxRichTextRange& range, wx
// Apply the overall list style, and item style for this level // Apply the overall list style, and item style for this level
wxTextAttrEx listStyle(def->GetCombinedStyleForLevel(thisLevel)); wxTextAttrEx listStyle(def->GetCombinedStyleForLevel(thisLevel));
wxRichTextApplyStyle(newPara->GetAttributes(), listStyle); wxRichTextApplyStyle(newPara->GetAttributes(), listStyle);
// Now we need to check numbering // Now we need to check numbering
if (renumber) if (renumber)
{ {
newPara->GetAttributes().SetBulletNumber(n); newPara->GetAttributes().SetBulletNumber(n);
} }
n ++; n ++;
} }
else if (!newPara->GetAttributes().GetListStyleName().IsEmpty()) else if (!newPara->GetAttributes().GetListStyleName().IsEmpty())
@@ -2579,10 +2579,10 @@ bool wxRichTextParagraphLayoutBox::SetListStyle(const wxRichTextRange& range, wx
newPara->GetAttributes().SetListStyleName(wxEmptyString); newPara->GetAttributes().SetListStyleName(wxEmptyString);
newPara->GetAttributes().SetLeftIndent(0, 0); newPara->GetAttributes().SetLeftIndent(0, 0);
// Eliminate the main list-related attributes // Eliminate the main list-related attributes
newPara->GetAttributes().SetFlags(newPara->GetAttributes().GetFlags() & ~wxTEXT_ATTR_LEFT_INDENT & ~wxTEXT_ATTR_BULLET_STYLE & ~wxTEXT_ATTR_BULLET_NUMBER & ~wxTEXT_ATTR_BULLET_SYMBOL & wxTEXT_ATTR_LIST_STYLE_NAME); newPara->GetAttributes().SetFlags(newPara->GetAttributes().GetFlags() & ~wxTEXT_ATTR_LEFT_INDENT & ~wxTEXT_ATTR_BULLET_STYLE & ~wxTEXT_ATTR_BULLET_NUMBER & ~wxTEXT_ATTR_BULLET_SYMBOL & wxTEXT_ATTR_LIST_STYLE_NAME);
wxRichTextStyleSheet* styleSheet = GetStyleSheet(); wxRichTextStyleSheet* styleSheet = GetStyleSheet();
if (styleSheet && !newPara->GetAttributes().GetParagraphStyleName().IsEmpty()) if (styleSheet && !newPara->GetAttributes().GetParagraphStyleName().IsEmpty())
{ {
@@ -2638,17 +2638,17 @@ bool wxRichTextParagraphLayoutBox::DoNumberList(const wxRichTextRange& range, co
bool specifyLevel = ((flags & wxRICHTEXT_SETSTYLE_SPECIFY_LEVEL) != 0); bool specifyLevel = ((flags & wxRICHTEXT_SETSTYLE_SPECIFY_LEVEL) != 0);
bool renumber = ((flags & wxRICHTEXT_SETSTYLE_RENUMBER) != 0); bool renumber = ((flags & wxRICHTEXT_SETSTYLE_RENUMBER) != 0);
// Max number of levels // Max number of levels
const int maxLevels = 10; const int maxLevels = 10;
// The level we're looking at now // The level we're looking at now
int currentLevel = -1; int currentLevel = -1;
// The item number for each level // The item number for each level
int levels[maxLevels]; int levels[maxLevels];
int i; int i;
// Reset all numbering // Reset all numbering
for (i = 0; i < maxLevels; i++) for (i = 0; i < maxLevels; i++)
{ {
@@ -2659,7 +2659,7 @@ bool wxRichTextParagraphLayoutBox::DoNumberList(const wxRichTextRange& range, co
else else
levels[i] = -1; // start from the number we found, if any levels[i] = -1; // start from the number we found, if any
} }
wxASSERT(!specifyLevel || (specifyLevel && (specifiedLevel >= 0))); wxASSERT(!specifyLevel || (specifyLevel && (specifiedLevel >= 0)));
// If we are associated with a control, make undoable; otherwise, apply immediately // If we are associated with a control, make undoable; otherwise, apply immediately
@@ -2704,16 +2704,16 @@ bool wxRichTextParagraphLayoutBox::DoNumberList(const wxRichTextRange& range, co
} }
else else
newPara = para; newPara = para;
wxRichTextListStyleDefinition* defToUse = def; wxRichTextListStyleDefinition* defToUse = def;
if (!defToUse) if (!defToUse)
{ {
wxRichTextStyleSheet* sheet = GetStyleSheet(); wxRichTextStyleSheet* sheet = GetStyleSheet();
if (sheet && !newPara->GetAttributes().GetListStyleName().IsEmpty()) if (sheet && !newPara->GetAttributes().GetListStyleName().IsEmpty())
defToUse = sheet->FindListStyle(newPara->GetAttributes().GetListStyleName()); defToUse = sheet->FindListStyle(newPara->GetAttributes().GetListStyleName());
} }
if (defToUse) if (defToUse)
{ {
int thisIndent = newPara->GetAttributes().GetLeftIndent(); int thisIndent = newPara->GetAttributes().GetLeftIndent();
@@ -2723,7 +2723,7 @@ bool wxRichTextParagraphLayoutBox::DoNumberList(const wxRichTextRange& range, co
// change the level. // change the level.
if (thisIndent == 0 || specifiedLevel != -1) if (thisIndent == 0 || specifiedLevel != -1)
thisLevel = specifiedLevel; thisLevel = specifiedLevel;
// Do promotion if specified // Do promotion if specified
if ((promoteBy != 0) && !para->GetRange().IsOutside(promotionRange)) if ((promoteBy != 0) && !para->GetRange().IsOutside(promotionRange))
{ {
@@ -2733,16 +2733,16 @@ bool wxRichTextParagraphLayoutBox::DoNumberList(const wxRichTextRange& range, co
if (thisLevel > 9) if (thisLevel > 9)
thisLevel = 9; thisLevel = 9;
} }
// Apply the overall list style, and item style for this level // Apply the overall list style, and item style for this level
wxTextAttrEx listStyle(defToUse->GetCombinedStyleForLevel(thisLevel)); wxTextAttrEx listStyle(defToUse->GetCombinedStyleForLevel(thisLevel));
wxRichTextApplyStyle(newPara->GetAttributes(), listStyle); wxRichTextApplyStyle(newPara->GetAttributes(), listStyle);
// OK, we've (re)applied the style, now let's get the numbering right. // OK, we've (re)applied the style, now let's get the numbering right.
if (currentLevel == -1) if (currentLevel == -1)
currentLevel = thisLevel; currentLevel = thisLevel;
// Same level as before, do nothing except increment level's number afterwards // Same level as before, do nothing except increment level's number afterwards
if (currentLevel == thisLevel) if (currentLevel == thisLevel)
{ {
@@ -2759,7 +2759,7 @@ bool wxRichTextParagraphLayoutBox::DoNumberList(const wxRichTextRange& range, co
else if (thisLevel < currentLevel) else if (thisLevel < currentLevel)
{ {
currentLevel = thisLevel; currentLevel = thisLevel;
} }
// Use the current numbering if -1 and we have a bullet number already // Use the current numbering if -1 and we have a bullet number already
if (levels[currentLevel] == -1) if (levels[currentLevel] == -1)
@@ -2769,10 +2769,10 @@ bool wxRichTextParagraphLayoutBox::DoNumberList(const wxRichTextRange& range, co
else else
levels[currentLevel] = 1; levels[currentLevel] = 1;
} }
newPara->GetAttributes().SetBulletNumber(levels[currentLevel]); newPara->GetAttributes().SetBulletNumber(levels[currentLevel]);
levels[currentLevel] ++; levels[currentLevel] ++;
} }
} }
} }
@@ -2811,9 +2811,9 @@ bool wxRichTextParagraphLayoutBox::PromoteList(int promoteBy, const wxRichTextRa
// list position will start from 1. // list position will start from 1.
// Similarly, we look after the last para in the promote range for an indentation that is less (or no list style). // Similarly, we look after the last para in the promote range for an indentation that is less (or no list style).
// We can end the renumbering at this point. // We can end the renumbering at this point.
// For now, only renumber within the promotion range. // For now, only renumber within the promotion range.
return DoNumberList(range, range, promoteBy, def, flags, 1, specifiedLevel); return DoNumberList(range, range, promoteBy, def, flags, 1, specifiedLevel);
} }
@@ -4030,12 +4030,12 @@ bool wxRichTextPlainText::Draw(wxDC& dc, const wxRichTextRange& range, const wxR
// Compensate for kerning difference // Compensate for kerning difference
wxString stringFragment2(m_text.Mid(r1 - offset, fragmentLen+1)); wxString stringFragment2(m_text.Mid(r1 - offset, fragmentLen+1));
wxString stringFragment3(m_text.Mid(r1 - offset + fragmentLen, 1)); wxString stringFragment3(m_text.Mid(r1 - offset + fragmentLen, 1));
wxCoord w1, h1, w2, h2, w3, h3; wxCoord w1, h1, w2, h2, w3, h3;
dc.GetTextExtent(stringFragment, & w1, & h1); dc.GetTextExtent(stringFragment, & w1, & h1);
dc.GetTextExtent(stringFragment2, & w2, & h2); dc.GetTextExtent(stringFragment2, & w2, & h2);
dc.GetTextExtent(stringFragment3, & w3, & h3); dc.GetTextExtent(stringFragment3, & w3, & h3);
int kerningDiff = (w1 + w3) - w2; int kerningDiff = (w1 + w3) - w2;
x = x - kerningDiff; x = x - kerningDiff;
} }
@@ -4061,12 +4061,12 @@ bool wxRichTextPlainText::Draw(wxDC& dc, const wxRichTextRange& range, const wxR
// Compensate for kerning difference // Compensate for kerning difference
wxString stringFragment2(m_text.Mid(s1 - offset, fragmentLen+1)); wxString stringFragment2(m_text.Mid(s1 - offset, fragmentLen+1));
wxString stringFragment3(m_text.Mid(s1 - offset + fragmentLen, 1)); wxString stringFragment3(m_text.Mid(s1 - offset + fragmentLen, 1));
wxCoord w1, h1, w2, h2, w3, h3; wxCoord w1, h1, w2, h2, w3, h3;
dc.GetTextExtent(stringFragment, & w1, & h1); dc.GetTextExtent(stringFragment, & w1, & h1);
dc.GetTextExtent(stringFragment2, & w2, & h2); dc.GetTextExtent(stringFragment2, & w2, & h2);
dc.GetTextExtent(stringFragment3, & w3, & h3); dc.GetTextExtent(stringFragment3, & w3, & h3);
int kerningDiff = (w1 + w3) - w2; int kerningDiff = (w1 + w3) - w2;
x = x - kerningDiff; x = x - kerningDiff;
} }
@@ -4243,14 +4243,14 @@ bool wxRichTextPlainText::GetRangeSize(const wxRichTextRange& range, wxSize& siz
tabArray = textAttr.GetTabs(); tabArray = textAttr.GetTabs();
int tabCount = tabArray.GetCount(); int tabCount = tabArray.GetCount();
for (int i = 0; i < tabCount; ++i) for (int i = 0; i < tabCount; ++i)
{ {
int pos = tabArray[i]; int pos = tabArray[i];
pos = ((wxRichTextPlainText*) this)->ConvertTenthsMMToPixels(dc, pos); pos = ((wxRichTextPlainText*) this)->ConvertTenthsMMToPixels(dc, pos);
tabArray[i] = pos; tabArray[i] = pos;
} }
int nextTabPos = -1; int nextTabPos = -1;
while (stringChunk.Find(wxT('\t')) >= 0) while (stringChunk.Find(wxT('\t')) >= 0)
@@ -4437,7 +4437,7 @@ bool wxRichTextBuffer::PushStyleSheet(wxRichTextStyleSheet* styleSheet)
styleSheet->InsertSheet(m_styleSheet); styleSheet->InsertSheet(m_styleSheet);
SetStyleSheet(styleSheet); SetStyleSheet(styleSheet);
return true; return true;
} }
@@ -4449,7 +4449,7 @@ wxRichTextStyleSheet* wxRichTextBuffer::PopStyleSheet()
wxRichTextStyleSheet* oldSheet = m_styleSheet; wxRichTextStyleSheet* oldSheet = m_styleSheet;
m_styleSheet = oldSheet->GetNextSheet(); m_styleSheet = oldSheet->GetNextSheet();
oldSheet->Unlink(); oldSheet->Unlink();
return oldSheet; return oldSheet;
} }
else else
@@ -5146,6 +5146,8 @@ wxString wxRichTextBuffer::GetExtWildcard(bool combine, bool save, wxArrayInt* t
/// Load a file /// Load a file
bool wxRichTextBuffer::LoadFile(const wxString& filename, int type) bool wxRichTextBuffer::LoadFile(const wxString& filename, int type)
{ {
wxRichTextFileHandler* handler = FindHandlerFilenameOrType(filename, type); wxRichTextFileHandler* handler = FindHandlerFilenameOrType(filename, type);
if (handler) if (handler)
@@ -7296,4 +7298,3 @@ bool wxRichTextBufferDataObject::SetData(size_t WXUNUSED(len), const void *buf)
#endif #endif
// wxUSE_RICHTEXT // wxUSE_RICHTEXT

View File

@@ -165,7 +165,7 @@ 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, -1), 0, m_symbolCtrlStrings, wxCB_DROPDOWN );
m_symbolCtrl->SetHelpText(_("The bullet character.")); m_symbolCtrl->SetHelpText(_("The bullet character."));
if (ShowToolTips()) if (ShowToolTips())
m_symbolCtrl->SetToolTip(_("The bullet character.")); m_symbolCtrl->SetToolTip(_("The bullet character."));
@@ -183,7 +183,7 @@ 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 );
m_symbolFontCtrl->SetHelpText(_("Available fonts.")); m_symbolFontCtrl->SetHelpText(_("Available fonts."));
if (ShowToolTips()) if (ShowToolTips())
m_symbolFontCtrl->SetToolTip(_("Available fonts.")); m_symbolFontCtrl->SetToolTip(_("Available fonts."));
@@ -402,7 +402,7 @@ iaculis malesuada. Donec bibendum ipsum ut ante porta fringilla.\n");
m_previewCtrl->BeginStyle(normalParaAttr); m_previewCtrl->BeginStyle(normalParaAttr);
m_previewCtrl->WriteText(s_para1); m_previewCtrl->WriteText(s_para1);
m_previewCtrl->EndStyle(); m_previewCtrl->EndStyle();
m_previewCtrl->BeginStyle(attr); m_previewCtrl->BeginStyle(attr);
m_previewCtrl->WriteText(s_para2); m_previewCtrl->WriteText(s_para2);
m_previewCtrl->EndStyle(); m_previewCtrl->EndStyle();

View File

@@ -644,7 +644,7 @@ void wxRichTextCtrl::OnChar(wxKeyEvent& event)
event.Skip(); event.Skip();
return; return;
} }
if (keycode == wxT('\t')) if (keycode == wxT('\t'))
{ {
// See if we need to promote or demote the selection or paragraph at the cursor // See if we need to promote or demote the selection or paragraph at the cursor
@@ -658,7 +658,7 @@ void wxRichTextCtrl::OnChar(wxKeyEvent& event)
range = GetSelectionRange(); range = GetSelectionRange();
else else
range = para->GetRange().FromInternal(); range = para->GetRange().FromInternal();
int promoteBy = event.ShiftDown() ? 1 : -1; int promoteBy = event.ShiftDown() ? 1 : -1;
PromoteList(promoteBy, range, NULL); PromoteList(promoteBy, range, NULL);
@@ -2776,20 +2776,20 @@ bool wxRichTextCtrl::ApplyStyle(wxRichTextStyleDefinition* def)
if (def->IsKindOf(CLASSINFO(wxRichTextListStyleDefinition))) if (def->IsKindOf(CLASSINFO(wxRichTextListStyleDefinition)))
{ {
flags |= wxRICHTEXT_SETSTYLE_PARAGRAPHS_ONLY; flags |= wxRICHTEXT_SETSTYLE_PARAGRAPHS_ONLY;
wxRichTextRange range; wxRichTextRange range;
if (HasSelection()) if (HasSelection())
range = GetSelectionRange(); range = GetSelectionRange();
else else
{ {
long pos = GetAdjustedCaretPosition(GetCaretPosition()); long pos = GetAdjustedCaretPosition(GetCaretPosition());
range = wxRichTextRange(pos, pos+1); range = wxRichTextRange(pos, pos+1);
} }
return SetListStyle(range, (wxRichTextListStyleDefinition*) def, flags); return SetListStyle(range, (wxRichTextListStyleDefinition*) def, flags);
} }
// Make sure the attr has the style name // Make sure the attr has the style name
if (def->IsKindOf(CLASSINFO(wxRichTextParagraphStyleDefinition))) if (def->IsKindOf(CLASSINFO(wxRichTextParagraphStyleDefinition)))
{ {
@@ -2916,12 +2916,12 @@ bool wxRichTextCtrl::ClearListStyle(const wxRichTextRange& range, int flags)
/// Number/renumber any list elements in the given range /// Number/renumber any list elements in the given range
bool wxRichTextCtrl::NumberList(const wxRichTextRange& range, wxRichTextListStyleDefinition* def, int flags, int startFrom, int specifiedLevel) bool wxRichTextCtrl::NumberList(const wxRichTextRange& range, wxRichTextListStyleDefinition* def, int flags, int startFrom, int specifiedLevel)
{ {
return GetBuffer().NumberList(range.ToInternal(), def, flags, startFrom, specifiedLevel); return GetBuffer().NumberList(range.ToInternal(), def, flags, startFrom, specifiedLevel);
} }
bool wxRichTextCtrl::NumberList(const wxRichTextRange& range, const wxString& defName, int flags, int startFrom, int specifiedLevel) bool wxRichTextCtrl::NumberList(const wxRichTextRange& range, const wxString& defName, int flags, int startFrom, int specifiedLevel)
{ {
return GetBuffer().NumberList(range.ToInternal(), defName, flags, startFrom, specifiedLevel); return GetBuffer().NumberList(range.ToInternal(), defName, flags, startFrom, specifiedLevel);
} }
/// Promote the list items within the given range. promoteBy can be a positive or negative number, e.g. 1 or -1 /// Promote the list items within the given range. promoteBy can be a positive or negative number, e.g. 1 or -1
@@ -2952,4 +2952,3 @@ void wxRichTextCtrl::ClearAvailableFontNames()
#endif #endif
// wxUSE_RICHTEXT // wxUSE_RICHTEXT

View File

@@ -9,7 +9,7 @@
// Licence: wxWindows licence // Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
#include "../../include/wx/richtext/richtextfontpage.h" #include "wx/richtext/richtextfontpage.h"
/*! /*!
* wxRichTextFontPage type definition * wxRichTextFontPage type definition
@@ -122,7 +122,7 @@ void wxRichTextFontPage::CreateControls()
wxStaticText* itemStaticText6 = new wxStaticText( itemPanel1, wxID_STATIC, _("&Font:"), wxDefaultPosition, wxDefaultSize, 0 ); wxStaticText* itemStaticText6 = new wxStaticText( itemPanel1, wxID_STATIC, _("&Font:"), 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_faceTextCtrl = new wxTextCtrl( itemPanel1, ID_RICHTEXTFONTPAGE_FACETEXTCTRL, _T(""), wxDefaultPosition, wxDefaultSize, 0 ); m_faceTextCtrl = new wxTextCtrl( itemPanel1, ID_RICHTEXTFONTPAGE_FACETEXTCTRL, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
m_faceTextCtrl->SetHelpText(_("Type a font name.")); m_faceTextCtrl->SetHelpText(_("Type a font name."));
if (ShowToolTips()) if (ShowToolTips())
m_faceTextCtrl->SetToolTip(_("Type a font name.")); m_faceTextCtrl->SetToolTip(_("Type a font name."));
@@ -140,7 +140,7 @@ void wxRichTextFontPage::CreateControls()
wxStaticText* itemStaticText10 = new wxStaticText( itemPanel1, wxID_STATIC, _("&Size:"), wxDefaultPosition, wxDefaultSize, 0 ); wxStaticText* itemStaticText10 = new wxStaticText( itemPanel1, wxID_STATIC, _("&Size:"), wxDefaultPosition, wxDefaultSize, 0 );
itemBoxSizer9->Add(itemStaticText10, 0, wxALIGN_LEFT|wxLEFT|wxRIGHT|wxTOP|wxADJUST_MINSIZE, 5); itemBoxSizer9->Add(itemStaticText10, 0, wxALIGN_LEFT|wxLEFT|wxRIGHT|wxTOP|wxADJUST_MINSIZE, 5);
m_sizeTextCtrl = new wxTextCtrl( itemPanel1, ID_RICHTEXTFONTPAGE_SIZETEXTCTRL, _T(""), wxDefaultPosition, wxSize(50, -1), 0 ); m_sizeTextCtrl = new wxTextCtrl( itemPanel1, ID_RICHTEXTFONTPAGE_SIZETEXTCTRL, wxEmptyString, wxDefaultPosition, wxSize(50, -1), 0 );
m_sizeTextCtrl->SetHelpText(_("Type a size in points.")); m_sizeTextCtrl->SetHelpText(_("Type a size in points."));
if (ShowToolTips()) if (ShowToolTips())
m_sizeTextCtrl->SetToolTip(_("Type a size in points.")); m_sizeTextCtrl->SetToolTip(_("Type a size in points."));
@@ -163,7 +163,7 @@ void wxRichTextFontPage::CreateControls()
itemBoxSizer14->Add(itemStaticText15, 0, wxALIGN_LEFT|wxLEFT|wxRIGHT|wxTOP|wxADJUST_MINSIZE, 5); itemBoxSizer14->Add(itemStaticText15, 0, wxALIGN_LEFT|wxLEFT|wxRIGHT|wxTOP|wxADJUST_MINSIZE, 5);
wxString* m_styleCtrlStrings = NULL; wxString* m_styleCtrlStrings = NULL;
m_styleCtrl = new wxComboBox( itemPanel1, ID_RICHTEXTFONTPAGE_STYLECTRL, _T(""), wxDefaultPosition, wxDefaultSize, 0, m_styleCtrlStrings, wxCB_READONLY ); m_styleCtrl = new wxComboBox( itemPanel1, ID_RICHTEXTFONTPAGE_STYLECTRL, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, m_styleCtrlStrings, wxCB_READONLY );
m_styleCtrl->SetHelpText(_("Select regular or italic style.")); m_styleCtrl->SetHelpText(_("Select regular or italic style."));
if (ShowToolTips()) if (ShowToolTips())
m_styleCtrl->SetToolTip(_("Select regular or italic style.")); m_styleCtrl->SetToolTip(_("Select regular or italic style."));
@@ -176,7 +176,7 @@ void wxRichTextFontPage::CreateControls()
itemBoxSizer17->Add(itemStaticText18, 0, wxALIGN_LEFT|wxLEFT|wxRIGHT|wxTOP|wxADJUST_MINSIZE, 5); itemBoxSizer17->Add(itemStaticText18, 0, wxALIGN_LEFT|wxLEFT|wxRIGHT|wxTOP|wxADJUST_MINSIZE, 5);
wxString* m_weightCtrlStrings = NULL; wxString* m_weightCtrlStrings = NULL;
m_weightCtrl = new wxComboBox( itemPanel1, ID_RICHTEXTFONTPAGE_WEIGHTCTRL, _T(""), wxDefaultPosition, wxDefaultSize, 0, m_weightCtrlStrings, wxCB_READONLY ); m_weightCtrl = new wxComboBox( itemPanel1, ID_RICHTEXTFONTPAGE_WEIGHTCTRL, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, m_weightCtrlStrings, wxCB_READONLY );
m_weightCtrl->SetHelpText(_("Select regular or bold.")); m_weightCtrl->SetHelpText(_("Select regular or bold."));
if (ShowToolTips()) if (ShowToolTips())
m_weightCtrl->SetToolTip(_("Select regular or bold.")); m_weightCtrl->SetToolTip(_("Select regular or bold."));
@@ -189,7 +189,7 @@ void wxRichTextFontPage::CreateControls()
itemBoxSizer20->Add(itemStaticText21, 0, wxALIGN_LEFT|wxLEFT|wxRIGHT|wxTOP|wxADJUST_MINSIZE, 5); itemBoxSizer20->Add(itemStaticText21, 0, wxALIGN_LEFT|wxLEFT|wxRIGHT|wxTOP|wxADJUST_MINSIZE, 5);
wxString* m_underliningCtrlStrings = NULL; wxString* m_underliningCtrlStrings = NULL;
m_underliningCtrl = new wxComboBox( itemPanel1, ID_RICHTEXTFONTPAGE_UNDERLINING_CTRL, _T(""), wxDefaultPosition, wxDefaultSize, 0, m_underliningCtrlStrings, wxCB_READONLY ); m_underliningCtrl = new wxComboBox( itemPanel1, ID_RICHTEXTFONTPAGE_UNDERLINING_CTRL, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, m_underliningCtrlStrings, wxCB_READONLY );
m_underliningCtrl->SetHelpText(_("Select underlining or no underlining.")); m_underliningCtrl->SetHelpText(_("Select underlining or no underlining."));
if (ShowToolTips()) if (ShowToolTips())
m_underliningCtrl->SetToolTip(_("Select underlining or no underlining.")); m_underliningCtrl->SetToolTip(_("Select underlining or no underlining."));

View File

@@ -248,7 +248,7 @@ bool wxRichTextFormattingDialogFactory::CreatePages(long pages, wxRichTextFormat
int imageIndex = GetPageImage(pageId); int imageIndex = GetPageImage(pageId);
dialog->GetBookCtrl()->AddPage(panel, title, !selected, imageIndex); dialog->GetBookCtrl()->AddPage(panel, title, !selected, imageIndex);
selected = true; selected = true;
dialog->AddPageId(pageId); dialog->AddPageId(pageId);
} }
} }

View File

@@ -205,7 +205,7 @@ 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, -1), 0 );
m_indentLeft->SetHelpText(_("The left indent.")); m_indentLeft->SetHelpText(_("The left indent."));
if (ShowToolTips()) if (ShowToolTips())
m_indentLeft->SetToolTip(_("The left indent.")); m_indentLeft->SetToolTip(_("The left indent."));
@@ -217,7 +217,7 @@ 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, -1), 0 );
m_indentLeftFirst->SetHelpText(_("The first line indent.")); m_indentLeftFirst->SetHelpText(_("The first line indent."));
if (ShowToolTips()) if (ShowToolTips())
m_indentLeftFirst->SetToolTip(_("The first line indent.")); m_indentLeftFirst->SetToolTip(_("The first line indent."));
@@ -229,7 +229,7 @@ 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, -1), 0 );
m_indentRight->SetHelpText(_("The right indent.")); m_indentRight->SetHelpText(_("The right indent."));
if (ShowToolTips()) if (ShowToolTips())
m_indentRight->SetToolTip(_("The right indent.")); m_indentRight->SetToolTip(_("The right indent."));
@@ -262,7 +262,7 @@ 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, -1), 0 );
m_spacingBefore->SetHelpText(_("The spacing before the paragraph.")); m_spacingBefore->SetHelpText(_("The spacing before the paragraph."));
if (ShowToolTips()) if (ShowToolTips())
m_spacingBefore->SetToolTip(_("The spacing before the paragraph.")); m_spacingBefore->SetToolTip(_("The spacing before the paragraph."));
@@ -274,7 +274,7 @@ 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, -1), 0 );
if (ShowToolTips()) if (ShowToolTips())
m_spacingAfter->SetToolTip(_("The spacing after the paragraph.")); m_spacingAfter->SetToolTip(_("The spacing after the paragraph."));
itemBoxSizer44->Add(m_spacingAfter, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5); itemBoxSizer44->Add(m_spacingAfter, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);

View File

@@ -1,15 +1,15 @@
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// Name: richtextliststylepage.cpp // Name: src/richtext/richtextliststylepage.cpp
// Purpose: // Purpose:
// Author: Julian Smart // Author: Julian Smart
// Modified by: // Modified by:
// Created: 10/18/2006 11:36:37 AM // Created: 10/18/2006 11:36:37 AM
// RCS-ID: // RCS-ID: $Id$
// Copyright: (c) Julian Smart // Copyright: (c) Julian Smart
// Licence: // Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
#include "../../include/wx/richtext/richtextliststylepage.h" #include "wx/richtext/richtextliststylepage.h"
////@begin XPM images ////@begin XPM images
////@end XPM images ////@end XPM images
@@ -117,7 +117,7 @@ bool wxRichTextListStylePage::Create( wxWindow* parent, wxWindowID id, const wxP
} }
/*! /*!
* Member initialisation * Member initialisation
*/ */
void wxRichTextListStylePage::Init() void wxRichTextListStylePage::Init()
@@ -151,7 +151,7 @@ void wxRichTextListStylePage::Init()
*/ */
void wxRichTextListStylePage::CreateControls() void wxRichTextListStylePage::CreateControls()
{ {
////@begin wxRichTextListStylePage content construction ////@begin wxRichTextListStylePage content construction
wxRichTextListStylePage* itemPanel1 = this; wxRichTextListStylePage* itemPanel1 = this;
@@ -216,7 +216,7 @@ void wxRichTextListStylePage::CreateControls()
wxBoxSizer* itemBoxSizer21 = new wxBoxSizer(wxHORIZONTAL); wxBoxSizer* itemBoxSizer21 = new wxBoxSizer(wxHORIZONTAL);
itemBoxSizer19->Add(itemBoxSizer21, 0, wxGROW, 5); itemBoxSizer19->Add(itemBoxSizer21, 0, wxGROW, 5);
wxString* m_symbolCtrlStrings = NULL; wxString* m_symbolCtrlStrings = NULL;
m_symbolCtrl = new wxComboBox( itemPanel10, ID_RICHTEXTBULLETSPAGE_SYMBOLCTRL, _T(""), wxDefaultPosition, wxSize(60, -1), 0, m_symbolCtrlStrings, wxCB_DROPDOWN ); m_symbolCtrl = new wxComboBox( itemPanel10, ID_RICHTEXTBULLETSPAGE_SYMBOLCTRL, wxEmptyString, wxDefaultPosition, wxSize(60, -1), 0, m_symbolCtrlStrings, wxCB_DROPDOWN );
m_symbolCtrl->SetHelpText(_("The bullet character.")); m_symbolCtrl->SetHelpText(_("The bullet character."));
if (ShowToolTips()) if (ShowToolTips())
m_symbolCtrl->SetToolTip(_("The bullet character.")); m_symbolCtrl->SetToolTip(_("The bullet character."));
@@ -234,7 +234,7 @@ void wxRichTextListStylePage::CreateControls()
itemBoxSizer19->Add(itemStaticText25, 0, wxALIGN_LEFT|wxLEFT|wxRIGHT|wxTOP|wxADJUST_MINSIZE, 5); itemBoxSizer19->Add(itemStaticText25, 0, wxALIGN_LEFT|wxLEFT|wxRIGHT|wxTOP|wxADJUST_MINSIZE, 5);
wxString* m_symbolFontCtrlStrings = NULL; wxString* m_symbolFontCtrlStrings = NULL;
m_symbolFontCtrl = new wxComboBox( itemPanel10, ID_RICHTEXTLISTSTYLEPAGE_SYMBOLFONTCTRL, _T(""), wxDefaultPosition, wxDefaultSize, 0, m_symbolFontCtrlStrings, wxCB_DROPDOWN ); m_symbolFontCtrl = new wxComboBox( itemPanel10, ID_RICHTEXTLISTSTYLEPAGE_SYMBOLFONTCTRL, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, m_symbolFontCtrlStrings, wxCB_DROPDOWN );
if (ShowToolTips()) if (ShowToolTips())
m_symbolFontCtrl->SetToolTip(_("Available fonts.")); m_symbolFontCtrl->SetToolTip(_("Available fonts."));
itemBoxSizer19->Add(m_symbolFontCtrl, 0, wxGROW|wxALL, 5); itemBoxSizer19->Add(m_symbolFontCtrl, 0, wxGROW|wxALL, 5);
@@ -339,7 +339,7 @@ void wxRichTextListStylePage::CreateControls()
wxBoxSizer* itemBoxSizer55 = new wxBoxSizer(wxHORIZONTAL); wxBoxSizer* itemBoxSizer55 = new wxBoxSizer(wxHORIZONTAL);
itemFlexGridSizer53->Add(itemBoxSizer55, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5); itemFlexGridSizer53->Add(itemBoxSizer55, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
m_indentLeft = new wxTextCtrl( itemPanel33, ID_RICHTEXTLISTSTYLEPAGE_INDENTLEFT, _T(""), wxDefaultPosition, wxSize(50, -1), 0 ); m_indentLeft = new wxTextCtrl( itemPanel33, ID_RICHTEXTLISTSTYLEPAGE_INDENTLEFT, wxEmptyString, wxDefaultPosition, wxSize(50, -1), 0 );
m_indentLeft->SetHelpText(_("The left indent.")); m_indentLeft->SetHelpText(_("The left indent."));
if (ShowToolTips()) if (ShowToolTips())
m_indentLeft->SetToolTip(_("The left indent.")); m_indentLeft->SetToolTip(_("The left indent."));
@@ -350,7 +350,7 @@ void wxRichTextListStylePage::CreateControls()
wxBoxSizer* itemBoxSizer58 = new wxBoxSizer(wxHORIZONTAL); wxBoxSizer* itemBoxSizer58 = new wxBoxSizer(wxHORIZONTAL);
itemFlexGridSizer53->Add(itemBoxSizer58, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5); itemFlexGridSizer53->Add(itemBoxSizer58, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
m_indentLeftFirst = new wxTextCtrl( itemPanel33, ID_RICHTEXTLISTSTYLEPAGE_INDENTFIRSTLINE, _T(""), wxDefaultPosition, wxSize(50, -1), 0 ); m_indentLeftFirst = new wxTextCtrl( itemPanel33, ID_RICHTEXTLISTSTYLEPAGE_INDENTFIRSTLINE, wxEmptyString, wxDefaultPosition, wxSize(50, -1), 0 );
m_indentLeftFirst->SetHelpText(_("The first line indent.")); m_indentLeftFirst->SetHelpText(_("The first line indent."));
if (ShowToolTips()) if (ShowToolTips())
m_indentLeftFirst->SetToolTip(_("The first line indent.")); m_indentLeftFirst->SetToolTip(_("The first line indent."));
@@ -361,7 +361,7 @@ void wxRichTextListStylePage::CreateControls()
wxBoxSizer* itemBoxSizer61 = new wxBoxSizer(wxHORIZONTAL); wxBoxSizer* itemBoxSizer61 = new wxBoxSizer(wxHORIZONTAL);
itemFlexGridSizer53->Add(itemBoxSizer61, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5); itemFlexGridSizer53->Add(itemBoxSizer61, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
m_indentRight = new wxTextCtrl( itemPanel33, ID_RICHTEXTLISTSTYLEPAGE_INDENTRIGHT, _T(""), wxDefaultPosition, wxSize(50, -1), 0 ); m_indentRight = new wxTextCtrl( itemPanel33, ID_RICHTEXTLISTSTYLEPAGE_INDENTRIGHT, wxEmptyString, wxDefaultPosition, wxSize(50, -1), 0 );
m_indentRight->SetHelpText(_("The right indent.")); m_indentRight->SetHelpText(_("The right indent."));
if (ShowToolTips()) if (ShowToolTips())
m_indentRight->SetToolTip(_("The right indent.")); m_indentRight->SetToolTip(_("The right indent."));
@@ -390,7 +390,7 @@ void wxRichTextListStylePage::CreateControls()
wxBoxSizer* itemBoxSizer72 = new wxBoxSizer(wxHORIZONTAL); wxBoxSizer* itemBoxSizer72 = new wxBoxSizer(wxHORIZONTAL);
itemFlexGridSizer70->Add(itemBoxSizer72, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5); itemFlexGridSizer70->Add(itemBoxSizer72, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
m_spacingBefore = new wxTextCtrl( itemPanel33, ID_RICHTEXTLISTSTYLEPAGE_SPACINGBEFORE, _T(""), wxDefaultPosition, wxSize(50, -1), 0 ); m_spacingBefore = new wxTextCtrl( itemPanel33, ID_RICHTEXTLISTSTYLEPAGE_SPACINGBEFORE, wxEmptyString, wxDefaultPosition, wxSize(50, -1), 0 );
m_spacingBefore->SetHelpText(_("The spacing before the paragraph.")); m_spacingBefore->SetHelpText(_("The spacing before the paragraph."));
if (ShowToolTips()) if (ShowToolTips())
m_spacingBefore->SetToolTip(_("The spacing before the paragraph.")); m_spacingBefore->SetToolTip(_("The spacing before the paragraph."));
@@ -401,7 +401,7 @@ void wxRichTextListStylePage::CreateControls()
wxBoxSizer* itemBoxSizer75 = new wxBoxSizer(wxHORIZONTAL); wxBoxSizer* itemBoxSizer75 = new wxBoxSizer(wxHORIZONTAL);
itemFlexGridSizer70->Add(itemBoxSizer75, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5); itemFlexGridSizer70->Add(itemBoxSizer75, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
m_spacingAfter = new wxTextCtrl( itemPanel33, ID_RICHTEXTLISTSTYLEPAGE_SPACINGAFTER, _T(""), wxDefaultPosition, wxSize(50, -1), 0 ); m_spacingAfter = new wxTextCtrl( itemPanel33, ID_RICHTEXTLISTSTYLEPAGE_SPACINGAFTER, wxEmptyString, wxDefaultPosition, wxSize(50, -1), 0 );
m_spacingAfter->SetHelpText(_("The spacing after the paragraph.")); m_spacingAfter->SetHelpText(_("The spacing after the paragraph."));
if (ShowToolTips()) if (ShowToolTips())
m_spacingAfter->SetToolTip(_("The spacing after the paragraph.")); m_spacingAfter->SetToolTip(_("The spacing after the paragraph."));
@@ -470,7 +470,7 @@ iaculis malesuada. Donec bibendum ipsum ut ante porta fringilla.\n");
wxRichTextListStyleDefinition* def = wxDynamicCast(wxRichTextFormattingDialog::GetDialogStyleDefinition(this), wxRichTextListStyleDefinition* def = wxDynamicCast(wxRichTextFormattingDialog::GetDialogStyleDefinition(this),
wxRichTextListStyleDefinition); wxRichTextListStyleDefinition);
wxTextAttrEx attr(def->GetStyle()); wxTextAttrEx attr(def->GetStyle());
attr.SetFlags(attr.GetFlags() & attr.SetFlags(attr.GetFlags() &
(wxTEXT_ATTR_ALIGNMENT|wxTEXT_ATTR_LEFT_INDENT|wxTEXT_ATTR_RIGHT_INDENT|wxTEXT_ATTR_PARA_SPACING_BEFORE|wxTEXT_ATTR_PARA_SPACING_AFTER| (wxTEXT_ATTR_ALIGNMENT|wxTEXT_ATTR_LEFT_INDENT|wxTEXT_ATTR_RIGHT_INDENT|wxTEXT_ATTR_PARA_SPACING_BEFORE|wxTEXT_ATTR_PARA_SPACING_AFTER|
@@ -491,9 +491,9 @@ iaculis malesuada. Donec bibendum ipsum ut ante porta fringilla.\n");
m_previewCtrl->BeginStyle(normalParaAttr); m_previewCtrl->BeginStyle(normalParaAttr);
m_previewCtrl->WriteText(s_para1); m_previewCtrl->WriteText(s_para1);
m_previewCtrl->EndStyle(); m_previewCtrl->EndStyle();
m_previewCtrl->BeginStyle(attr); m_previewCtrl->BeginStyle(attr);
int i; int i;
for (i = 0; i < 10; i++) for (i = 0; i < 10; i++)
{ {
@@ -618,7 +618,7 @@ bool wxRichTextListStylePage::TransferDataFromWindow()
attr->SetBulletSymbol(c); attr->SetBulletSymbol(c);
attr->SetBulletFont(m_symbolFontCtrl->GetValue()); attr->SetBulletFont(m_symbolFontCtrl->GetValue());
} }
return true; return true;
} }
@@ -626,7 +626,7 @@ bool wxRichTextListStylePage::TransferDataToWindow()
{ {
DoTransferDataToWindow(); DoTransferDataToWindow();
UpdatePreview(); UpdatePreview();
return true; return true;
} }
@@ -636,7 +636,7 @@ void wxRichTextListStylePage::DoTransferDataToWindow()
m_dontUpdate = true; m_dontUpdate = true;
wxPanel::TransferDataToWindow(); wxPanel::TransferDataToWindow();
m_levelCtrl->SetValue(m_currentLevel); m_levelCtrl->SetValue(m_currentLevel);
wxTextAttrEx* attr = GetAttributesForSelection(); wxTextAttrEx* attr = GetAttributesForSelection();
@@ -769,9 +769,9 @@ wxTextAttrEx* wxRichTextListStylePage::GetAttributesForSelection()
{ {
wxRichTextListStyleDefinition* def = wxDynamicCast(wxRichTextFormattingDialog::GetDialogStyleDefinition(this), wxRichTextListStyleDefinition* def = wxDynamicCast(wxRichTextFormattingDialog::GetDialogStyleDefinition(this),
wxRichTextListStyleDefinition); wxRichTextListStyleDefinition);
int value = m_levelCtrl->GetValue(); int value = m_levelCtrl->GetValue();
if (def) if (def)
return def->GetLevelAttributes(value-1); return def->GetLevelAttributes(value-1);
else else
@@ -853,7 +853,7 @@ void wxRichTextListStylePage::OnLevelUIUpdate( wxUpdateUIEvent& event )
////@begin wxEVT_UPDATE_UI event handler for ID_RICHTEXTLISTSTYLEPAGE_LEVEL in wxRichTextListStylePage. ////@begin wxEVT_UPDATE_UI event handler for ID_RICHTEXTLISTSTYLEPAGE_LEVEL in wxRichTextListStylePage.
// Before editing this code, remove the block markers. // Before editing this code, remove the block markers.
event.Skip(); event.Skip();
////@end wxEVT_UPDATE_UI event handler for ID_RICHTEXTLISTSTYLEPAGE_LEVEL in wxRichTextListStylePage. ////@end wxEVT_UPDATE_UI event handler for ID_RICHTEXTLISTSTYLEPAGE_LEVEL in wxRichTextListStylePage.
} }
/*! /*!
@@ -982,7 +982,7 @@ void wxRichTextListStylePage::OnParenthesesctrlUpdate( wxUpdateUIEvent& event )
////@begin wxEVT_UPDATE_UI event handler for ID_RICHTEXTLISTSTYLEPAGE__PARENTHESESCTRL in wxRichTextListStylePage. ////@begin wxEVT_UPDATE_UI event handler for ID_RICHTEXTLISTSTYLEPAGE__PARENTHESESCTRL in wxRichTextListStylePage.
// Before editing this code, remove the block markers. // Before editing this code, remove the block markers.
event.Skip(); event.Skip();
////@end wxEVT_UPDATE_UI event handler for ID_RICHTEXTLISTSTYLEPAGE__PARENTHESESCTRL in wxRichTextListStylePage. ////@end wxEVT_UPDATE_UI event handler for ID_RICHTEXTLISTSTYLEPAGE__PARENTHESESCTRL in wxRichTextListStylePage.
} }
/*! /*!
@@ -1003,7 +1003,7 @@ void wxRichTextListStylePage::OnPeriodctrlUpdate( wxUpdateUIEvent& event )
////@begin wxEVT_UPDATE_UI event handler for ID_RICHTEXTLISTSTYLEPAGE_PERIODCTRL in wxRichTextListStylePage. ////@begin wxEVT_UPDATE_UI event handler for ID_RICHTEXTLISTSTYLEPAGE_PERIODCTRL in wxRichTextListStylePage.
// Before editing this code, remove the block markers. // Before editing this code, remove the block markers.
event.Skip(); event.Skip();
////@end wxEVT_UPDATE_UI event handler for ID_RICHTEXTLISTSTYLEPAGE_PERIODCTRL in wxRichTextListStylePage. ////@end wxEVT_UPDATE_UI event handler for ID_RICHTEXTLISTSTYLEPAGE_PERIODCTRL in wxRichTextListStylePage.
} }
/*! /*!
@@ -1173,5 +1173,3 @@ void wxRichTextListStylePage::OnChooseFontClick( wxCommandEvent& WXUNUSED(event)
TransferAndPreview(); TransferAndPreview();
} }
} }

View File

@@ -1,12 +1,12 @@
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// Name: richtextstyledlg.cpp // Name: src/richtext/richtextstyledlg.cpp
// Purpose: // Purpose:
// Author: Julian Smart // Author: Julian Smart
// Modified by: // Modified by:
// Created: 10/5/2006 12:05:31 PM // Created: 10/5/2006 12:05:31 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".
@@ -97,7 +97,7 @@ void wxRichTextStyleOrganiserDialog::Init()
m_dontUpdate = false; m_dontUpdate = false;
m_flags = 0; m_flags = 0;
m_restartNumbering = true; m_restartNumbering = true;
////@begin wxRichTextStyleOrganiserDialog member initialisation ////@begin wxRichTextStyleOrganiserDialog member initialisation
m_innerSizer = NULL; m_innerSizer = NULL;
m_buttonSizerParent = NULL; m_buttonSizerParent = NULL;
@@ -113,6 +113,7 @@ void wxRichTextStyleOrganiserDialog::Init()
m_deleteStyle = NULL; m_deleteStyle = NULL;
m_closeButton = NULL; m_closeButton = NULL;
m_bottomButtonSizer = NULL; m_bottomButtonSizer = NULL;
m_restartNumberingCtrl = NULL; m_restartNumberingCtrl = NULL;
m_okButton = NULL; m_okButton = NULL;
m_cancelButton = NULL; m_cancelButton = NULL;
@@ -128,7 +129,7 @@ bool wxRichTextStyleOrganiserDialog::Create( int flags, wxRichTextStyleSheet* sh
m_richTextStyleSheet = sheet; m_richTextStyleSheet = sheet;
m_richTextCtrl = ctrl; m_richTextCtrl = ctrl;
m_flags = flags; m_flags = flags;
////@begin wxRichTextStyleOrganiserDialog creation ////@begin wxRichTextStyleOrganiserDialog creation
SetExtraStyle(GetExtraStyle()|wxWS_EX_BLOCK_EVENTS|wxDIALOG_EX_CONTEXTHELP); SetExtraStyle(GetExtraStyle()|wxWS_EX_BLOCK_EVENTS|wxDIALOG_EX_CONTEXTHELP);
wxDialog::Create( parent, id, caption, pos, size, style ); wxDialog::Create( parent, id, caption, pos, size, style );
@@ -148,10 +149,10 @@ bool wxRichTextStyleOrganiserDialog::Create( int flags, wxRichTextStyleSheet* sh
*/ */
void wxRichTextStyleOrganiserDialog::CreateControls() void wxRichTextStyleOrganiserDialog::CreateControls()
{ {
bool hideTypeSelector = false; bool hideTypeSelector = false;
wxRichTextStyleListBox::wxRichTextStyleType typesToShow = wxRichTextStyleListBox::wxRICHTEXT_STYLE_ALL; wxRichTextStyleListBox::wxRichTextStyleType typesToShow = wxRichTextStyleListBox::wxRICHTEXT_STYLE_ALL;
if ((m_flags & wxRICHTEXT_ORGANISER_SHOW_CHARACTER) != 0) if ((m_flags & wxRICHTEXT_ORGANISER_SHOW_CHARACTER) != 0)
{ {
typesToShow = wxRichTextStyleListBox::wxRICHTEXT_STYLE_CHARACTER; typesToShow = wxRichTextStyleListBox::wxRICHTEXT_STYLE_CHARACTER;
@@ -171,11 +172,11 @@ void wxRichTextStyleOrganiserDialog::CreateControls()
{ {
// wxRICHTEXT_ORGANISER_SHOW_ALL is implied if the other styles aren't included // wxRICHTEXT_ORGANISER_SHOW_ALL is implied if the other styles aren't included
} }
long listCtrlStyle = 0; long listCtrlStyle = 0;
if (hideTypeSelector) if (hideTypeSelector)
listCtrlStyle = wxRICHTEXTSTYLELIST_HIDE_TYPE_SELECTOR; listCtrlStyle = wxRICHTEXTSTYLELIST_HIDE_TYPE_SELECTOR;
////@begin wxRichTextStyleOrganiserDialog content construction ////@begin wxRichTextStyleOrganiserDialog content construction
wxRichTextStyleOrganiserDialog* itemDialog1 = this; wxRichTextStyleOrganiserDialog* itemDialog1 = this;
@@ -340,18 +341,18 @@ void wxRichTextStyleOrganiserDialog::CreateControls()
{ {
m_buttonSizerParent->Show(m_buttonSizer, false); m_buttonSizerParent->Show(m_buttonSizer, false);
} }
// No buttons in the horizontal group are shown, so hide the whole sizer // No buttons in the horizontal group are shown, so hide the whole sizer
if ((m_flags & (wxRICHTEXT_ORGANISER_OK_CANCEL|wxRICHTEXT_ORGANISER_RENUMBER)) == 0) if ((m_flags & (wxRICHTEXT_ORGANISER_OK_CANCEL|wxRICHTEXT_ORGANISER_RENUMBER)) == 0)
{ {
m_innerSizer->Show(m_bottomButtonSizer, false); m_innerSizer->Show(m_bottomButtonSizer, false);
} }
if (hideTypeSelector) if (hideTypeSelector)
{ {
m_stylesListBox->GetStyleListBox()->SetStyleType(typesToShow); m_stylesListBox->GetStyleListBox()->SetStyleType(typesToShow);
} }
m_stylesListBox->SetStyleSheet(m_richTextStyleSheet); m_stylesListBox->SetStyleSheet(m_richTextStyleSheet);
m_stylesListBox->SetRichTextCtrl(m_richTextCtrl); m_stylesListBox->SetRichTextCtrl(m_richTextCtrl);
m_stylesListBox->UpdateStyles(); m_stylesListBox->UpdateStyles();
@@ -389,9 +390,9 @@ bool wxRichTextStyleOrganiserDialog::TransferDataFromWindow()
{ {
if (!wxDialog::TransferDataFromWindow()) if (!wxDialog::TransferDataFromWindow())
return false; return false;
m_restartNumbering = m_restartNumberingCtrl->GetValue(); m_restartNumbering = m_restartNumberingCtrl->GetValue();
return true; return true;
} }
@@ -399,9 +400,9 @@ bool wxRichTextStyleOrganiserDialog::TransferDataToWindow()
{ {
if (!wxDialog::TransferDataToWindow()) if (!wxDialog::TransferDataToWindow())
return false; return false;
m_restartNumberingCtrl->SetValue(m_restartNumbering); m_restartNumberingCtrl->SetValue(m_restartNumbering);
return true; return true;
} }
@@ -423,15 +424,15 @@ iaculis malesuada. Donec bibendum ipsum ut ante porta fringilla.\n");
{ {
sel = m_stylesListBox->GetStyleListBox()->GetSelection(); sel = m_stylesListBox->GetStyleListBox()->GetSelection();
if (sel == -1) if (sel == -1)
return; return;
} }
wxRichTextStyleDefinition* def = m_stylesListBox->GetStyleListBox()->GetStyle(sel); wxRichTextStyleDefinition* def = m_stylesListBox->GetStyleListBox()->GetStyle(sel);
wxRichTextListStyleDefinition* listDef = wxDynamicCast(def, wxRichTextListStyleDefinition); wxRichTextListStyleDefinition* listDef = wxDynamicCast(def, wxRichTextListStyleDefinition);
//wxRichTextParagraphStyleDefinition* paraDef = wxDynamicCast(def, wxRichTextParagraphStyleDefinition); //wxRichTextParagraphStyleDefinition* paraDef = wxDynamicCast(def, wxRichTextParagraphStyleDefinition);
//wxRichTextCharacterStyleDefinition* charDef = wxDynamicCast(def, wxRichTextCharacterStyleDefinition); //wxRichTextCharacterStyleDefinition* charDef = wxDynamicCast(def, wxRichTextCharacterStyleDefinition);
wxTextAttrEx attr(def->GetStyle()); wxTextAttrEx attr(def->GetStyle());
#if 0 #if 0
attr.SetFlags(attr.GetFlags() & attr.SetFlags(attr.GetFlags() &
@@ -449,14 +450,14 @@ iaculis malesuada. Donec bibendum ipsum ut ante porta fringilla.\n");
normalParaAttr.SetTextColour(wxColour(wxT("LIGHT GREY"))); normalParaAttr.SetTextColour(wxColour(wxT("LIGHT GREY")));
m_previewCtrl->Freeze(); m_previewCtrl->Freeze();
m_previewCtrl->Clear(); m_previewCtrl->Clear();
m_previewCtrl->BeginStyle(normalParaAttr); m_previewCtrl->BeginStyle(normalParaAttr);
m_previewCtrl->WriteText(s_para1); m_previewCtrl->WriteText(s_para1);
m_previewCtrl->EndStyle(); m_previewCtrl->EndStyle();
m_previewCtrl->BeginStyle(attr); m_previewCtrl->BeginStyle(attr);
if (listDef) if (listDef)
{ {
int i; int i;
@@ -473,7 +474,7 @@ iaculis malesuada. Donec bibendum ipsum ut ante porta fringilla.\n");
{ {
m_previewCtrl->WriteText(wxString(wxT("\n")) + s_para2); m_previewCtrl->WriteText(wxString(wxT("\n")) + s_para2);
} }
m_previewCtrl->EndStyle(); m_previewCtrl->EndStyle();
m_previewCtrl->BeginStyle(normalParaAttr); m_previewCtrl->BeginStyle(normalParaAttr);
@@ -482,7 +483,7 @@ iaculis malesuada. Donec bibendum ipsum ut ante porta fringilla.\n");
m_previewCtrl->Thaw(); m_previewCtrl->Thaw();
} }
/// Clears the preview /// Clears the preview
void wxRichTextStyleOrganiserDialog::ClearPreview() void wxRichTextStyleOrganiserDialog::ClearPreview()
{ {
@@ -500,9 +501,9 @@ bool wxRichTextStyleOrganiserDialog::ApplyStyle(wxRichTextCtrl* ctrl)
return false; return false;
if (!ctrl->HasSelection()) if (!ctrl->HasSelection())
return false; return false;
wxRichTextStyleDefinition* def = m_stylesListBox->GetStyleListBox()->GetStyle(sel);
wxRichTextStyleDefinition* def = m_stylesListBox->GetStyleListBox()->GetStyle(sel);
wxRichTextListStyleDefinition* listDef = wxDynamicCast(def, wxRichTextListStyleDefinition); wxRichTextListStyleDefinition* listDef = wxDynamicCast(def, wxRichTextListStyleDefinition);
if (listDef && m_restartNumberingCtrl->GetValue()) if (listDef && m_restartNumberingCtrl->GetValue())
@@ -575,9 +576,9 @@ void wxRichTextStyleOrganiserDialog::OnNewCharClick( wxCommandEvent& WXUNUSED(ev
wxMessageBox(_("Sorry, that name is taken. Please choose another."), _("New Style"), wxICON_EXCLAMATION|wxOK, this); wxMessageBox(_("Sorry, that name is taken. Please choose another."), _("New Style"), wxICON_EXCLAMATION|wxOK, this);
return; return;
} }
wxRichTextCharacterStyleDefinition* style = new wxRichTextCharacterStyleDefinition(styleName); wxRichTextCharacterStyleDefinition* style = new wxRichTextCharacterStyleDefinition(styleName);
int pages = wxRICHTEXT_FORMAT_FONT|wxRICHTEXT_FORMAT_STYLE_EDITOR; int pages = wxRICHTEXT_FORMAT_FONT|wxRICHTEXT_FORMAT_STYLE_EDITOR;
wxRichTextFormattingDialog formatDlg; wxRichTextFormattingDialog formatDlg;
formatDlg.SetStyleDefinition(*style, GetStyleSheet()); formatDlg.SetStyleDefinition(*style, GetStyleSheet());
@@ -586,9 +587,9 @@ void wxRichTextStyleOrganiserDialog::OnNewCharClick( wxCommandEvent& WXUNUSED(ev
if (formatDlg.ShowModal() == wxID_OK) if (formatDlg.ShowModal() == wxID_OK)
{ {
wxRichTextCharacterStyleDefinition* charDef = wxDynamicCast(formatDlg.GetStyleDefinition(), wxRichTextCharacterStyleDefinition); wxRichTextCharacterStyleDefinition* charDef = wxDynamicCast(formatDlg.GetStyleDefinition(), wxRichTextCharacterStyleDefinition);
(*((wxRichTextCharacterStyleDefinition* ) style)) = (*charDef); (*((wxRichTextCharacterStyleDefinition* ) style)) = (*charDef);
GetStyleSheet()->AddCharacterStyle(style); GetStyleSheet()->AddCharacterStyle(style);
m_stylesListBox->UpdateStyles(); m_stylesListBox->UpdateStyles();
@@ -596,7 +597,7 @@ void wxRichTextStyleOrganiserDialog::OnNewCharClick( wxCommandEvent& WXUNUSED(ev
} }
else else
delete style; delete style;
} }
} }
/*! /*!
@@ -623,9 +624,9 @@ void wxRichTextStyleOrganiserDialog::OnNewParaClick( wxCommandEvent& WXUNUSED(ev
wxMessageBox(_("Sorry, that name is taken. Please choose another."), _("New Style"), wxICON_EXCLAMATION|wxOK, this); wxMessageBox(_("Sorry, that name is taken. Please choose another."), _("New Style"), wxICON_EXCLAMATION|wxOK, this);
return; return;
} }
wxRichTextParagraphStyleDefinition* style = new wxRichTextParagraphStyleDefinition(styleName); wxRichTextParagraphStyleDefinition* style = new wxRichTextParagraphStyleDefinition(styleName);
int pages = wxRICHTEXT_FORMAT_STYLE_EDITOR|wxRICHTEXT_FORMAT_FONT|wxRICHTEXT_FORMAT_INDENTS_SPACING|wxRICHTEXT_FORMAT_TABS|wxRICHTEXT_FORMAT_BULLETS; int pages = wxRICHTEXT_FORMAT_STYLE_EDITOR|wxRICHTEXT_FORMAT_FONT|wxRICHTEXT_FORMAT_INDENTS_SPACING|wxRICHTEXT_FORMAT_TABS|wxRICHTEXT_FORMAT_BULLETS;
wxRichTextFormattingDialog formatDlg; wxRichTextFormattingDialog formatDlg;
formatDlg.SetStyleDefinition(*style, GetStyleSheet()); formatDlg.SetStyleDefinition(*style, GetStyleSheet());
@@ -634,9 +635,9 @@ void wxRichTextStyleOrganiserDialog::OnNewParaClick( wxCommandEvent& WXUNUSED(ev
if (formatDlg.ShowModal() == wxID_OK) if (formatDlg.ShowModal() == wxID_OK)
{ {
wxRichTextParagraphStyleDefinition* paraDef = wxDynamicCast(formatDlg.GetStyleDefinition(), wxRichTextParagraphStyleDefinition); wxRichTextParagraphStyleDefinition* paraDef = wxDynamicCast(formatDlg.GetStyleDefinition(), wxRichTextParagraphStyleDefinition);
(*((wxRichTextParagraphStyleDefinition* ) style)) = (*paraDef); (*((wxRichTextParagraphStyleDefinition* ) style)) = (*paraDef);
GetStyleSheet()->AddParagraphStyle(style); GetStyleSheet()->AddParagraphStyle(style);
m_stylesListBox->UpdateStyles(); m_stylesListBox->UpdateStyles();
@@ -644,7 +645,7 @@ void wxRichTextStyleOrganiserDialog::OnNewParaClick( wxCommandEvent& WXUNUSED(ev
} }
else else
delete style; delete style;
} }
} }
/*! /*!
@@ -667,9 +668,9 @@ void wxRichTextStyleOrganiserDialog::OnEditClick( wxCommandEvent& WXUNUSED(event
if (sel != wxNOT_FOUND) if (sel != wxNOT_FOUND)
{ {
wxRichTextStyleDefinition* def = m_stylesListBox->GetStyleListBox()->GetStyle(sel); wxRichTextStyleDefinition* def = m_stylesListBox->GetStyleListBox()->GetStyle(sel);
int pages = wxRICHTEXT_FORMAT_STYLE_EDITOR; int pages = wxRICHTEXT_FORMAT_STYLE_EDITOR;
if (def->IsKindOf(CLASSINFO(wxRichTextCharacterStyleDefinition))) if (def->IsKindOf(CLASSINFO(wxRichTextCharacterStyleDefinition)))
{ {
pages |= wxRICHTEXT_FORMAT_FONT; pages |= wxRICHTEXT_FORMAT_FONT;
@@ -682,7 +683,7 @@ void wxRichTextStyleOrganiserDialog::OnEditClick( wxCommandEvent& WXUNUSED(event
{ {
pages |= wxRICHTEXT_FORMAT_FONT|wxRICHTEXT_FORMAT_INDENTS_SPACING|wxRICHTEXT_FORMAT_TABS|wxRICHTEXT_FORMAT_BULLETS; pages |= wxRICHTEXT_FORMAT_FONT|wxRICHTEXT_FORMAT_INDENTS_SPACING|wxRICHTEXT_FORMAT_TABS|wxRICHTEXT_FORMAT_BULLETS;
} }
wxRichTextFormattingDialog formatDlg; wxRichTextFormattingDialog formatDlg;
formatDlg.SetStyleDefinition(*def, GetStyleSheet()); formatDlg.SetStyleDefinition(*def, GetStyleSheet());
formatDlg.Create(pages, this); formatDlg.Create(pages, this);
@@ -692,7 +693,7 @@ void wxRichTextStyleOrganiserDialog::OnEditClick( wxCommandEvent& WXUNUSED(event
wxRichTextParagraphStyleDefinition* paraDef = wxDynamicCast(formatDlg.GetStyleDefinition(), wxRichTextParagraphStyleDefinition); wxRichTextParagraphStyleDefinition* paraDef = wxDynamicCast(formatDlg.GetStyleDefinition(), wxRichTextParagraphStyleDefinition);
wxRichTextCharacterStyleDefinition* charDef = wxDynamicCast(formatDlg.GetStyleDefinition(), wxRichTextCharacterStyleDefinition); wxRichTextCharacterStyleDefinition* charDef = wxDynamicCast(formatDlg.GetStyleDefinition(), wxRichTextCharacterStyleDefinition);
wxRichTextListStyleDefinition* listDef = wxDynamicCast(formatDlg.GetStyleDefinition(), wxRichTextListStyleDefinition); wxRichTextListStyleDefinition* listDef = wxDynamicCast(formatDlg.GetStyleDefinition(), wxRichTextListStyleDefinition);
if (listDef) if (listDef)
{ {
(*((wxRichTextListStyleDefinition* ) def)) = (*listDef); (*((wxRichTextListStyleDefinition* ) def)) = (*listDef);
@@ -736,14 +737,14 @@ void wxRichTextStyleOrganiserDialog::OnDeleteClick( wxCommandEvent& WXUNUSED(eve
if (wxYES == wxMessageBox(wxString::Format(_("Delete style %s?"), (const wxChar*) name), _("Delete Style"), wxYES_NO|wxICON_QUESTION, this)) if (wxYES == wxMessageBox(wxString::Format(_("Delete style %s?"), (const wxChar*) name), _("Delete Style"), wxYES_NO|wxICON_QUESTION, this))
{ {
m_stylesListBox->GetStyleListBox()->SetItemCount(0); m_stylesListBox->GetStyleListBox()->SetItemCount(0);
if (def->IsKindOf(CLASSINFO(wxRichTextListStyleDefinition))) if (def->IsKindOf(CLASSINFO(wxRichTextListStyleDefinition)))
GetStyleSheet()->RemoveListStyle((wxRichTextListStyleDefinition*) def, true); GetStyleSheet()->RemoveListStyle((wxRichTextListStyleDefinition*) def, true);
else if (def->IsKindOf(CLASSINFO(wxRichTextParagraphStyleDefinition))) else if (def->IsKindOf(CLASSINFO(wxRichTextParagraphStyleDefinition)))
GetStyleSheet()->RemoveParagraphStyle((wxRichTextParagraphStyleDefinition*) def, true); GetStyleSheet()->RemoveParagraphStyle((wxRichTextParagraphStyleDefinition*) def, true);
else if (def->IsKindOf(CLASSINFO(wxRichTextCharacterStyleDefinition))) else if (def->IsKindOf(CLASSINFO(wxRichTextCharacterStyleDefinition)))
GetStyleSheet()->RemoveCharacterStyle((wxRichTextCharacterStyleDefinition*) def, true); GetStyleSheet()->RemoveCharacterStyle((wxRichTextCharacterStyleDefinition*) def, true);
m_stylesListBox->UpdateStyles(); m_stylesListBox->UpdateStyles();
if (m_stylesListBox->GetStyleListBox()->GetSelection() != -1) if (m_stylesListBox->GetStyleListBox()->GetSelection() != -1)
@@ -777,9 +778,9 @@ void wxRichTextStyleOrganiserDialog::OnNewListClick( wxCommandEvent& WXUNUSED(ev
wxMessageBox(_("Sorry, that name is taken. Please choose another."), _("New Style"), wxICON_EXCLAMATION|wxOK, this); wxMessageBox(_("Sorry, that name is taken. Please choose another."), _("New Style"), wxICON_EXCLAMATION|wxOK, this);
return; return;
} }
wxRichTextListStyleDefinition* style = new wxRichTextListStyleDefinition(styleName); wxRichTextListStyleDefinition* style = new wxRichTextListStyleDefinition(styleName);
// Initialize the style to make it easier to edit // Initialize the style to make it easier to edit
int i; int i;
for (i = 0; i < 10; i++) for (i = 0; i < 10; i++)
@@ -798,7 +799,7 @@ void wxRichTextStyleOrganiserDialog::OnNewListClick( wxCommandEvent& WXUNUSED(ev
style->SetAttributes(i, (i+1)*60, 60, wxTEXT_ATTR_BULLET_STYLE_SYMBOL, bulletSymbol); style->SetAttributes(i, (i+1)*60, 60, wxTEXT_ATTR_BULLET_STYLE_SYMBOL, bulletSymbol);
} }
int pages = wxRICHTEXT_FORMAT_LIST_STYLE|wxRICHTEXT_FORMAT_STYLE_EDITOR|wxRICHTEXT_FORMAT_FONT|wxRICHTEXT_FORMAT_INDENTS_SPACING; int pages = wxRICHTEXT_FORMAT_LIST_STYLE|wxRICHTEXT_FORMAT_STYLE_EDITOR|wxRICHTEXT_FORMAT_FONT|wxRICHTEXT_FORMAT_INDENTS_SPACING;
wxRichTextFormattingDialog formatDlg; wxRichTextFormattingDialog formatDlg;
formatDlg.SetStyleDefinition(*style, GetStyleSheet()); formatDlg.SetStyleDefinition(*style, GetStyleSheet());
@@ -807,9 +808,9 @@ void wxRichTextStyleOrganiserDialog::OnNewListClick( wxCommandEvent& WXUNUSED(ev
if (formatDlg.ShowModal() == wxID_OK) if (formatDlg.ShowModal() == wxID_OK)
{ {
wxRichTextListStyleDefinition* listDef = wxDynamicCast(formatDlg.GetStyleDefinition(), wxRichTextListStyleDefinition); wxRichTextListStyleDefinition* listDef = wxDynamicCast(formatDlg.GetStyleDefinition(), wxRichTextListStyleDefinition);
(*((wxRichTextListStyleDefinition* ) style)) = (*listDef); (*((wxRichTextListStyleDefinition* ) style)) = (*listDef);
GetStyleSheet()->AddListStyle(style); GetStyleSheet()->AddListStyle(style);
m_stylesListBox->UpdateStyles(); m_stylesListBox->UpdateStyles();
@@ -817,7 +818,7 @@ void wxRichTextStyleOrganiserDialog::OnNewListClick( wxCommandEvent& WXUNUSED(ev
} }
else else
delete style; delete style;
} }
} }
/*! /*!
@@ -854,4 +855,3 @@ void wxRichTextStyleOrganiserDialog::OnListSelection(wxCommandEvent& event)
else else
event.Skip(); event.Skip();
} }

View File

@@ -103,7 +103,7 @@ 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), wxTE_READONLY ); m_styleName = new wxTextCtrl( itemPanel1, ID_RICHTEXTSTYLEPAGE_STYLE_NAME, wxEmptyString, wxDefaultPosition, wxSize(300, -1), wxTE_READONLY );
m_styleName->SetHelpText(_("The style name.")); m_styleName->SetHelpText(_("The style name."));
if (ShowToolTips()) if (ShowToolTips())
m_styleName->SetToolTip(_("The style name.")); m_styleName->SetToolTip(_("The style name."));
@@ -113,7 +113,7 @@ void wxRichTextStylePage::CreateControls()
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 );
m_basedOn->SetHelpText(_("The style on which this style is based.")); m_basedOn->SetHelpText(_("The style on which this style is based."));
if (ShowToolTips()) if (ShowToolTips())
m_basedOn->SetToolTip(_("The style on which this style is based.")); m_basedOn->SetToolTip(_("The style on which this style is based."));
@@ -123,7 +123,7 @@ void wxRichTextStylePage::CreateControls()
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 );
m_nextStyle->SetHelpText(_("The default style for the next paragraph.")); m_nextStyle->SetHelpText(_("The default style for the next paragraph."));
if (ShowToolTips()) if (ShowToolTips())
m_nextStyle->SetToolTip(_("The default style for the next paragraph.")); m_nextStyle->SetToolTip(_("The default style for the next paragraph."));
@@ -145,7 +145,7 @@ bool wxRichTextStylePage::TransferDataFromWindow()
wxRichTextParagraphStyleDefinition* paraDef = wxDynamicCast(def, wxRichTextParagraphStyleDefinition); wxRichTextParagraphStyleDefinition* paraDef = wxDynamicCast(def, wxRichTextParagraphStyleDefinition);
if (paraDef) if (paraDef)
paraDef->SetNextStyle(m_nextStyle->GetValue()); paraDef->SetNextStyle(m_nextStyle->GetValue());
def->SetName(m_styleName->GetValue()); def->SetName(m_styleName->GetValue());
def->SetBaseStyle(m_basedOn->GetValue()); def->SetBaseStyle(m_basedOn->GetValue());
} }
@@ -164,9 +164,9 @@ bool wxRichTextStylePage::TransferDataToWindow()
wxRichTextListStyleDefinition* listDef = wxDynamicCast(def, wxRichTextListStyleDefinition); wxRichTextListStyleDefinition* listDef = wxDynamicCast(def, wxRichTextListStyleDefinition);
// wxRichTextCharacterStyleDefinition* charDef = wxDynamicCast(def, wxRichTextCharacterStyleDefinition); // wxRichTextCharacterStyleDefinition* charDef = wxDynamicCast(def, wxRichTextCharacterStyleDefinition);
wxRichTextStyleSheet* sheet = wxRichTextFormattingDialog::GetDialog(this)->GetStyleSheet(); wxRichTextStyleSheet* sheet = wxRichTextFormattingDialog::GetDialog(this)->GetStyleSheet();
m_styleName->SetValue(def->GetName()); m_styleName->SetValue(def->GetName());
if (listDef) if (listDef)
{ {
if (m_nextStyle->GetCount() == 0) if (m_nextStyle->GetCount() == 0)
@@ -201,7 +201,7 @@ bool wxRichTextStylePage::TransferDataToWindow()
} }
m_nextStyle->SetValue(paraDef->GetNextStyle()); m_nextStyle->SetValue(paraDef->GetNextStyle());
} }
if (m_basedOn->GetCount() == 0) if (m_basedOn->GetCount() == 0)
{ {
if (sheet) if (sheet)
@@ -238,7 +238,7 @@ bool wxRichTextStylePage::TransferDataToWindow()
} }
} }
} }
m_basedOn->SetValue(def->GetBaseStyle()); m_basedOn->SetValue(def->GetBaseStyle());
} }

View File

@@ -75,7 +75,7 @@ bool wxRichTextParagraphStyleDefinition::operator ==(const wxRichTextParagraphSt
void wxRichTextListStyleDefinition::Copy(const wxRichTextListStyleDefinition& def) void wxRichTextListStyleDefinition::Copy(const wxRichTextListStyleDefinition& def)
{ {
wxRichTextParagraphStyleDefinition::Copy(def); wxRichTextParagraphStyleDefinition::Copy(def);
int i; int i;
for (i = 0; i < 10; i++) for (i = 0; i < 10; i++)
m_levelStyles[i] = def.m_levelStyles[i]; m_levelStyles[i] = def.m_levelStyles[i];
@@ -89,7 +89,7 @@ bool wxRichTextListStyleDefinition::operator ==(const wxRichTextListStyleDefinit
for (i = 0; i < 10; i++) for (i = 0; i < 10; i++)
if (!(m_levelStyles[i] == def.m_levelStyles[i])) if (!(m_levelStyles[i] == def.m_levelStyles[i]))
return false; return false;
return true; return true;
} }
@@ -126,15 +126,15 @@ void wxRichTextListStyleDefinition::SetAttributes(int i, int leftIndent, int lef
if (i >= 0 && i < 10) if (i >= 0 && i < 10)
{ {
wxTextAttrEx attr; wxTextAttrEx attr;
attr.SetBulletStyle(bulletStyle); attr.SetBulletStyle(bulletStyle);
attr.SetLeftIndent(leftIndent, leftSubIndent); attr.SetLeftIndent(leftIndent, leftSubIndent);
if (!bulletSymbol.IsEmpty()) if (!bulletSymbol.IsEmpty())
attr.SetBulletSymbol(bulletSymbol[0]); attr.SetBulletSymbol(bulletSymbol[0]);
m_levelStyles[i] = attr; m_levelStyles[i] = attr;
} }
} }
/// Finds the level corresponding to the given indentation /// Finds the level corresponding to the given indentation
@@ -159,20 +159,20 @@ int wxRichTextListStyleDefinition::FindLevelForIndent(int indent) const
wxTextAttrEx wxRichTextListStyleDefinition::CombineWithParagraphStyle(int indent, const wxTextAttrEx& paraStyle) wxTextAttrEx wxRichTextListStyleDefinition::CombineWithParagraphStyle(int indent, const wxTextAttrEx& paraStyle)
{ {
int listLevel = FindLevelForIndent(indent); int listLevel = FindLevelForIndent(indent);
wxTextAttrEx attr(*GetLevelAttributes(listLevel)); wxTextAttrEx attr(*GetLevelAttributes(listLevel));
int oldLeftIndent = attr.GetLeftIndent(); int oldLeftIndent = attr.GetLeftIndent();
int oldLeftSubIndent = attr.GetLeftSubIndent(); int oldLeftSubIndent = attr.GetLeftSubIndent();
// First apply the overall paragraph style, if any // First apply the overall paragraph style, if any
wxRichTextApplyStyle(attr, GetStyle()); wxRichTextApplyStyle(attr, GetStyle());
// Then apply paragraph style, e.g. from paragraph style definition // Then apply paragraph style, e.g. from paragraph style definition
wxRichTextApplyStyle(attr, paraStyle); wxRichTextApplyStyle(attr, paraStyle);
// We override the indents according to the list definition // We override the indents according to the list definition
attr.SetLeftIndent(oldLeftIndent, oldLeftSubIndent); attr.SetLeftIndent(oldLeftIndent, oldLeftSubIndent);
return attr; return attr;
} }
@@ -192,12 +192,12 @@ wxTextAttrEx wxRichTextListStyleDefinition::GetCombinedStyleForLevel(int listLev
int oldLeftIndent = attr.GetLeftIndent(); int oldLeftIndent = attr.GetLeftIndent();
int oldLeftSubIndent = attr.GetLeftSubIndent(); int oldLeftSubIndent = attr.GetLeftSubIndent();
// Apply the overall paragraph style, if any // Apply the overall paragraph style, if any
wxRichTextApplyStyle(attr, GetStyle()); wxRichTextApplyStyle(attr, GetStyle());
// We override the indents according to the list definition // We override the indents according to the list definition
attr.SetLeftIndent(oldLeftIndent, oldLeftSubIndent); attr.SetLeftIndent(oldLeftIndent, oldLeftSubIndent);
return attr; return attr;
} }
@@ -221,10 +221,10 @@ wxRichTextStyleSheet::~wxRichTextStyleSheet()
if (m_nextSheet) if (m_nextSheet)
m_nextSheet->m_previousSheet = m_previousSheet; m_nextSheet->m_previousSheet = m_previousSheet;
if (m_previousSheet) if (m_previousSheet)
m_previousSheet->m_nextSheet = m_nextSheet; m_previousSheet->m_nextSheet = m_nextSheet;
m_previousSheet = NULL; m_previousSheet = NULL;
m_nextSheet = NULL; m_nextSheet = NULL;
} }
@@ -269,7 +269,7 @@ wxRichTextStyleDefinition* wxRichTextStyleSheet::FindStyle(const wxList& list, c
if (def->GetName().Lower() == name.Lower()) if (def->GetName().Lower() == name.Lower())
return def; return def;
} }
if (m_nextSheet && recurse) if (m_nextSheet && recurse)
return m_nextSheet->FindStyle(list, name, recurse); return m_nextSheet->FindStyle(list, name, recurse);
@@ -289,7 +289,7 @@ bool wxRichTextStyleSheet::InsertSheet(wxRichTextStyleSheet* before)
{ {
m_previousSheet = before->m_previousSheet; m_previousSheet = before->m_previousSheet;
m_nextSheet = before; m_nextSheet = before;
before->m_previousSheet = this; before->m_previousSheet = this;
return true; return true;
} }
@@ -302,12 +302,12 @@ bool wxRichTextStyleSheet::AppendSheet(wxRichTextStyleSheet* after)
{ {
last = last->m_nextSheet; last = last->m_nextSheet;
} }
if (last) if (last)
{ {
m_previousSheet = last; m_previousSheet = last;
last->m_nextSheet = this; last->m_nextSheet = this;
return true; return true;
} }
else else
@@ -321,7 +321,7 @@ void wxRichTextStyleSheet::Unlink()
m_previousSheet->m_nextSheet = m_nextSheet; m_previousSheet->m_nextSheet = m_nextSheet;
if (m_nextSheet) if (m_nextSheet)
m_nextSheet->m_previousSheet = m_previousSheet; m_nextSheet->m_previousSheet = m_previousSheet;
m_previousSheet = NULL; m_previousSheet = NULL;
m_nextSheet = NULL; m_nextSheet = NULL;
} }
@@ -416,7 +416,7 @@ wxString wxRichTextStyleListBox::OnGetItem(size_t n) const
{ {
if (!GetStyleSheet()) if (!GetStyleSheet())
return wxEmptyString; return wxEmptyString;
wxRichTextStyleDefinition* def = GetStyle(n); wxRichTextStyleDefinition* def = GetStyle(n);
if (def) if (def)
return CreateHTML(def); return CreateHTML(def);
@@ -453,7 +453,7 @@ wxRichTextStyleDefinition* wxRichTextStyleListBox::GetStyle(size_t i) const
else if ((GetStyleType() == wxRICHTEXT_STYLE_LIST) && (i < GetStyleSheet()->GetListStyleCount())) else if ((GetStyleType() == wxRICHTEXT_STYLE_LIST) && (i < GetStyleSheet()->GetListStyleCount()))
{ {
return GetStyleSheet()->GetListStyle(i); return GetStyleSheet()->GetListStyle(i);
} }
return NULL; return NULL;
} }
@@ -464,7 +464,7 @@ void wxRichTextStyleListBox::UpdateStyles()
if (GetStyleSheet()) if (GetStyleSheet())
{ {
SetSelection(wxNOT_FOUND); SetSelection(wxNOT_FOUND);
if (GetStyleType() == wxRICHTEXT_STYLE_ALL) if (GetStyleType() == wxRICHTEXT_STYLE_ALL)
SetItemCount(GetStyleSheet()->GetParagraphStyleCount()+GetStyleSheet()->GetCharacterStyleCount()+GetStyleSheet()->GetListStyleCount()); SetItemCount(GetStyleSheet()->GetParagraphStyleCount()+GetStyleSheet()->GetCharacterStyleCount()+GetStyleSheet()->GetListStyleCount());
else if (GetStyleType() == wxRICHTEXT_STYLE_PARAGRAPH) else if (GetStyleType() == wxRICHTEXT_STYLE_PARAGRAPH)
@@ -473,14 +473,14 @@ void wxRichTextStyleListBox::UpdateStyles()
SetItemCount(GetStyleSheet()->GetCharacterStyleCount()); SetItemCount(GetStyleSheet()->GetCharacterStyleCount());
else if (GetStyleType() == wxRICHTEXT_STYLE_LIST) else if (GetStyleType() == wxRICHTEXT_STYLE_LIST)
SetItemCount(GetStyleSheet()->GetListStyleCount()); SetItemCount(GetStyleSheet()->GetListStyleCount());
Refresh(); Refresh();
if (GetItemCount() > 0) if (GetItemCount() > 0)
{ {
SetSelection(0); SetSelection(0);
SendSelectedEvent(); SendSelectedEvent();
} }
} }
} }
@@ -666,7 +666,7 @@ wxString wxRichTextStyleListBox::GetStyleToShowInIdleTime(wxRichTextCtrl* ctrl,
{ {
styleName = para->GetAttributes().GetListStyleName(); styleName = para->GetAttributes().GetListStyleName();
} }
return styleName; return styleName;
} }
@@ -729,27 +729,27 @@ bool wxRichTextStyleListCtrl::Create(wxWindow* parent, wxWindowID id, const wxPo
const wxSize& size, long style) const wxSize& size, long style)
{ {
wxControl::Create(parent, id, pos, size, style); wxControl::Create(parent, id, pos, size, style);
SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOW)); SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOW));
if (size != wxDefaultSize) if (size != wxDefaultSize)
SetBestFittingSize(size); SetBestFittingSize(size);
bool showSelector = ((style & wxRICHTEXTSTYLELIST_HIDE_TYPE_SELECTOR) == 0); bool showSelector = ((style & wxRICHTEXTSTYLELIST_HIDE_TYPE_SELECTOR) == 0);
m_styleListBox = new wxRichTextStyleListBox(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, showSelector ? wxSIMPLE_BORDER : wxNO_BORDER); m_styleListBox = new wxRichTextStyleListBox(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, showSelector ? wxSIMPLE_BORDER : wxNO_BORDER);
wxBoxSizer* boxSizer = new wxBoxSizer(wxVERTICAL); wxBoxSizer* boxSizer = new wxBoxSizer(wxVERTICAL);
if (showSelector) if (showSelector)
{ {
wxArrayString choices; wxArrayString choices;
choices.Add(_("All styles")); choices.Add(_("All styles"));
choices.Add(_("Paragraph styles")); choices.Add(_("Paragraph styles"));
choices.Add(_("Character styles")); choices.Add(_("Character styles"));
choices.Add(_("List styles")); choices.Add(_("List styles"));
m_styleChoice = new wxChoice(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, choices); m_styleChoice = new wxChoice(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, choices);
boxSizer->Add(m_styleListBox, 1, wxALL|wxEXPAND, 5); boxSizer->Add(m_styleListBox, 1, wxALL|wxEXPAND, 5);
boxSizer->Add(m_styleChoice, 0, wxALL|wxEXPAND, 5); boxSizer->Add(m_styleChoice, 0, wxALL|wxEXPAND, 5);
} }
@@ -757,26 +757,26 @@ bool wxRichTextStyleListCtrl::Create(wxWindow* parent, wxWindowID id, const wxPo
{ {
boxSizer->Add(m_styleListBox, 1, wxALL|wxEXPAND, 0); boxSizer->Add(m_styleListBox, 1, wxALL|wxEXPAND, 0);
} }
SetSizer(boxSizer); SetSizer(boxSizer);
Layout(); Layout();
m_dontUpdate = true; m_dontUpdate = true;
if (m_styleChoice) if (m_styleChoice)
{ {
int i = StyleTypeToIndex(m_styleListBox->GetStyleType()); int i = StyleTypeToIndex(m_styleListBox->GetStyleType());
m_styleChoice->SetSelection(i); m_styleChoice->SetSelection(i);
} }
m_dontUpdate = false; m_dontUpdate = false;
return true; return true;
} }
wxRichTextStyleListCtrl::~wxRichTextStyleListCtrl() wxRichTextStyleListCtrl::~wxRichTextStyleListCtrl()
{ {
} }
/// React to style type choice /// React to style type choice
@@ -788,7 +788,7 @@ void wxRichTextStyleListCtrl::OnChooseType(wxCommandEvent& event)
{ {
if (m_dontUpdate) if (m_dontUpdate)
return; return;
wxRichTextStyleListBox::wxRichTextStyleType styleType = StyleIndexToType(event.GetSelection()); wxRichTextStyleListBox::wxRichTextStyleType styleType = StyleIndexToType(event.GetSelection());
m_styleListBox->SetStyleType(styleType); m_styleListBox->SetStyleType(styleType);
} }
@@ -875,11 +875,11 @@ void wxRichTextStyleListCtrl::SetStyleType(wxRichTextStyleListBox::wxRichTextSty
m_dontUpdate = true; m_dontUpdate = true;
if (m_styleChoice) if (m_styleChoice)
{ {
int i = StyleTypeToIndex(m_styleListBox->GetStyleType()); int i = StyleTypeToIndex(m_styleListBox->GetStyleType());
m_styleChoice->SetSelection(i); m_styleChoice->SetSelection(i);
} }
m_dontUpdate = false; m_dontUpdate = false;
} }
@@ -895,7 +895,7 @@ wxRichTextStyleListBox::wxRichTextStyleType wxRichTextStyleListCtrl::GetStyleTyp
void wxRichTextStyleListCtrl::UpdateStyles() void wxRichTextStyleListCtrl::UpdateStyles()
{ {
if (m_styleListBox) if (m_styleListBox)
m_styleListBox->UpdateStyles(); m_styleListBox->UpdateStyles();
} }
#if wxUSE_COMBOCTRL #if wxUSE_COMBOCTRL
@@ -1003,7 +1003,7 @@ void wxRichTextStyleComboCtrl::OnIdle(wxIdleEvent& event)
if (GetRichTextCtrl() && !IsPopupShown() && m_stylePopup && wxWindow::FindFocus() != this) if (GetRichTextCtrl() && !IsPopupShown() && m_stylePopup && wxWindow::FindFocus() != this)
{ {
wxString styleName = wxRichTextStyleListBox::GetStyleToShowInIdleTime(GetRichTextCtrl(), m_stylePopup->GetStyleType()); wxString styleName = wxRichTextStyleListBox::GetStyleToShowInIdleTime(GetRichTextCtrl(), m_stylePopup->GetStyleType());
wxString currentValue = GetValue(); wxString currentValue = GetValue();
if (!styleName.IsEmpty()) if (!styleName.IsEmpty())
{ {
@@ -1027,4 +1027,3 @@ void wxRichTextStyleComboCtrl::OnIdle(wxIdleEvent& event)
#endif #endif
// wxUSE_RICHTEXT // wxUSE_RICHTEXT

View File

@@ -400,7 +400,7 @@ 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, -1), 0, m_fontCtrlStrings, wxCB_READONLY );
m_fontCtrl->SetHelpText(_("The font from which to take the symbol.")); m_fontCtrl->SetHelpText(_("The font from which to take the symbol."));
if (ShowToolTips()) if (ShowToolTips())
m_fontCtrl->SetToolTip(_("The font from which to take the symbol.")); m_fontCtrl->SetToolTip(_("The font from which to take the symbol."));
@@ -416,7 +416,7 @@ 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."));
@@ -438,7 +438,7 @@ 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, -1), wxTE_READONLY|wxTE_CENTRE );
m_characterCodeCtrl->SetHelpText(_("The character code.")); m_characterCodeCtrl->SetHelpText(_("The character code."));
if (ShowToolTips()) if (ShowToolTips())
m_characterCodeCtrl->SetToolTip(_("The character code.")); m_characterCodeCtrl->SetToolTip(_("The character code."));

View File

@@ -113,7 +113,7 @@ 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 );
m_tabEditCtrl->SetHelpText(_("The tab position.")); m_tabEditCtrl->SetHelpText(_("The tab position."));
if (ShowToolTips()) if (ShowToolTips())
m_tabEditCtrl->SetToolTip(_("The tab position.")); m_tabEditCtrl->SetToolTip(_("The tab position."));
@@ -130,7 +130,7 @@ 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 );