Use wxBookCtrl wrapper rather than wxNotebook in common code for native book (Smartphone fix).
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@41802 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -21,6 +21,8 @@
|
|||||||
#if wxUSE_RICHTEXT
|
#if wxUSE_RICHTEXT
|
||||||
|
|
||||||
#include "wx/propdlg.h"
|
#include "wx/propdlg.h"
|
||||||
|
#include "wx/bookctrl.h"
|
||||||
|
|
||||||
#if wxUSE_HTML
|
#if wxUSE_HTML
|
||||||
#include "wx/htmllbox.h"
|
#include "wx/htmllbox.h"
|
||||||
#endif
|
#endif
|
||||||
@@ -28,7 +30,6 @@
|
|||||||
#include "wx/richtext/richtextbuffer.h"
|
#include "wx/richtext/richtextbuffer.h"
|
||||||
#include "wx/richtext/richtextstyles.h"
|
#include "wx/richtext/richtextstyles.h"
|
||||||
|
|
||||||
class WXDLLEXPORT wxNotebookEvent;
|
|
||||||
class WXDLLIMPEXP_RICHTEXT wxRichTextFormattingDialog;
|
class WXDLLIMPEXP_RICHTEXT wxRichTextFormattingDialog;
|
||||||
class WXDLLIMPEXP_CORE wxImageList;
|
class WXDLLIMPEXP_CORE wxImageList;
|
||||||
|
|
||||||
@@ -145,7 +146,7 @@ public:
|
|||||||
|
|
||||||
/// Apply the styles when a different tab is selected, so the previews are
|
/// Apply the styles when a different tab is selected, so the previews are
|
||||||
/// up to date
|
/// up to date
|
||||||
void OnTabChanged(wxNotebookEvent& event);
|
void OnTabChanged(wxBookCtrlEvent& event);
|
||||||
|
|
||||||
/// Set/get image list
|
/// Set/get image list
|
||||||
void SetImageList(wxImageList* imageList) { m_imageList = imageList; }
|
void SetImageList(wxImageList* imageList) { m_imageList = imageList; }
|
||||||
|
@@ -61,7 +61,7 @@
|
|||||||
IMPLEMENT_CLASS(wxRichTextFormattingDialog, wxPropertySheetDialog)
|
IMPLEMENT_CLASS(wxRichTextFormattingDialog, wxPropertySheetDialog)
|
||||||
|
|
||||||
BEGIN_EVENT_TABLE(wxRichTextFormattingDialog, wxPropertySheetDialog)
|
BEGIN_EVENT_TABLE(wxRichTextFormattingDialog, wxPropertySheetDialog)
|
||||||
EVT_NOTEBOOK_PAGE_CHANGED(-1, wxRichTextFormattingDialog::OnTabChanged)
|
EVT_BOOKCTRL_PAGE_CHANGED(wxID_ANY, wxRichTextFormattingDialog::OnTabChanged)
|
||||||
END_EVENT_TABLE()
|
END_EVENT_TABLE()
|
||||||
|
|
||||||
wxRichTextFormattingDialogFactory* wxRichTextFormattingDialog::ms_FormattingDialogFactory = NULL;
|
wxRichTextFormattingDialogFactory* wxRichTextFormattingDialog::ms_FormattingDialogFactory = NULL;
|
||||||
@@ -167,7 +167,7 @@ bool wxRichTextFormattingDialog::UpdateDisplay()
|
|||||||
|
|
||||||
/// Apply the styles when a different tab is selected, so the previews are
|
/// Apply the styles when a different tab is selected, so the previews are
|
||||||
/// up to date
|
/// up to date
|
||||||
void wxRichTextFormattingDialog::OnTabChanged(wxNotebookEvent& event)
|
void wxRichTextFormattingDialog::OnTabChanged(wxBookCtrlEvent& event)
|
||||||
{
|
{
|
||||||
if (GetBookCtrl() != event.GetEventObject())
|
if (GetBookCtrl() != event.GetEventObject())
|
||||||
{
|
{
|
||||||
@@ -441,6 +441,7 @@ void wxRichTextColourSwatchCtrl::OnMouseEvent(wxMouseEvent& event)
|
|||||||
wxColourData data;
|
wxColourData data;
|
||||||
data.SetChooseFull(true);
|
data.SetChooseFull(true);
|
||||||
data.SetColour(m_colour);
|
data.SetColour(m_colour);
|
||||||
|
#if wxUSE_COLOURDLG
|
||||||
wxColourDialog *dialog = new wxColourDialog(parent, &data);
|
wxColourDialog *dialog = new wxColourDialog(parent, &data);
|
||||||
// Crashes on wxMac (no m_peer)
|
// Crashes on wxMac (no m_peer)
|
||||||
#ifndef __WXMAC__
|
#ifndef __WXMAC__
|
||||||
@@ -453,6 +454,7 @@ void wxRichTextColourSwatchCtrl::OnMouseEvent(wxMouseEvent& event)
|
|||||||
SetBackgroundColour(m_colour);
|
SetBackgroundColour(m_colour);
|
||||||
}
|
}
|
||||||
dialog->Destroy();
|
dialog->Destroy();
|
||||||
|
#endif // wxUSE_COLOURDLG
|
||||||
Refresh();
|
Refresh();
|
||||||
|
|
||||||
wxCommandEvent event(wxEVT_COMMAND_BUTTON_CLICKED, GetId());
|
wxCommandEvent event(wxEVT_COMMAND_BUTTON_CLICKED, GetId());
|
||||||
@@ -578,4 +580,3 @@ wxString wxRichTextFontListBox::CreateHTML(const wxString& facename) const
|
|||||||
|
|
||||||
#endif
|
#endif
|
||||||
// wxUSE_RICHTEXT
|
// wxUSE_RICHTEXT
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user