Richtext updates
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@46289 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
1968
wxPython/src/_richtextbuffer.i
Normal file
1968
wxPython/src/_richtextbuffer.i
Normal file
File diff suppressed because it is too large
Load Diff
1237
wxPython/src/_richtextctrl.i
Normal file
1237
wxPython/src/_richtextctrl.i
Normal file
File diff suppressed because it is too large
Load Diff
102
wxPython/src/_richtexthtml.i
Normal file
102
wxPython/src/_richtexthtml.i
Normal file
@@ -0,0 +1,102 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: _richtexthtml
|
||||
// Purpose: wxRichTextHTMLHandler
|
||||
//
|
||||
// Author: Robin Dunn
|
||||
//
|
||||
// Created: 18-May-2007
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) 2007 by Total Control Software
|
||||
// Licence: wxWindows license
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// Not a %module
|
||||
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
%{
|
||||
#include <wx/richtext/richtexthtml.h>
|
||||
%}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
%newgroup
|
||||
|
||||
MAKE_CONST_WXSTRING2(HtmlName, wxT("HTML"));
|
||||
MAKE_CONST_WXSTRING2(HtmlExt, wxT("html"));
|
||||
|
||||
class wxRichTextHTMLHandler: public wxRichTextFileHandler
|
||||
{
|
||||
public:
|
||||
wxRichTextHTMLHandler(const wxString& name = wxPyHtmlName,
|
||||
const wxString& ext = wxPyHtmlExt,
|
||||
int type = wxRICHTEXT_TYPE_HTML);
|
||||
|
||||
DocDeclStr(
|
||||
virtual bool , CanSave() const,
|
||||
"Can we save using this handler?", "");
|
||||
DocDeclStr(
|
||||
virtual bool , CanLoad() const,
|
||||
"Can we load using this handler?", "");
|
||||
DocDeclStr(
|
||||
virtual bool , CanHandle(const wxString& filename) const,
|
||||
"Can we handle this filename (if using files)? By default, checks the
|
||||
extension.", "");
|
||||
|
||||
|
||||
DocDeclStr(
|
||||
void , SetTemporaryImageLocations(const wxArrayString& locations),
|
||||
"Set the list of image locations generated by the last operation", "");
|
||||
DocDeclStr(
|
||||
const wxArrayString& , GetTemporaryImageLocations() const,
|
||||
"Get the list of image locations generated by the last operation", "");
|
||||
%property(TemporaryImageLocations, GetTemporaryImageLocations, SetTemporaryImageLocations);
|
||||
|
||||
|
||||
|
||||
DocDeclStr(
|
||||
void , ClearTemporaryImageLocations(),
|
||||
"Clear the image locations generated by the last operation", "");
|
||||
DocDeclStr(
|
||||
bool , DeleteTemporaryImages(),
|
||||
"Delete the in-memory or temporary files generated by the last operation", "");
|
||||
|
||||
|
||||
// DocDeclStr(
|
||||
// static bool , DeleteTemporaryImages(int flags, const wxArrayString& imageLocations),
|
||||
// "Delete the in-memory or temporary files generated by the last operation. This
|
||||
// is a static function that can be used to delete the saved locations from an
|
||||
// earlier operation, for example after the user has viewed the HTML file.", "");
|
||||
|
||||
|
||||
DocDeclStr(
|
||||
static void , SetFileCounter(int counter),
|
||||
"Reset the file counter, in case, for example, the same names are required each
|
||||
time", "");
|
||||
|
||||
|
||||
DocDeclStr(
|
||||
void , SetTempDir(const wxString& tempDir),
|
||||
"Set the directory for storing temporary files. If empty, the system temporary
|
||||
directory will be used.", "");
|
||||
DocDeclStr(
|
||||
const wxString& , GetTempDir() const,
|
||||
"Get the directory for storing temporary files. If empty, the system temporary
|
||||
directory will be used.", "");
|
||||
%property(TempDir, GetTempDir, SetTempDir);
|
||||
|
||||
|
||||
DocDeclStr(
|
||||
void , SetFontSizeMapping(const wxArrayInt& fontSizeMapping),
|
||||
"Set mapping from point size to HTML font size. There should be 7 elements, one
|
||||
for each HTML font size, each element specifying the maximum point size for
|
||||
that HTML font size. E.g. 8, 10, 13, 17, 22, 29, 100
|
||||
", "");
|
||||
DocDeclStr(
|
||||
wxArrayInt , GetFontSizeMapping() const,
|
||||
"Get mapping deom point size to HTML font size.", "");
|
||||
%property(FontSizeMapping, GetFontSizeMapping, SetFontSizeMapping);
|
||||
|
||||
};
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
67
wxPython/src/_richtextxml.i
Normal file
67
wxPython/src/_richtextxml.i
Normal file
@@ -0,0 +1,67 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: _richtextxml
|
||||
// Purpose: wxRichTextXMLHandler
|
||||
//
|
||||
// Author: Robin Dunn
|
||||
//
|
||||
// Created: 18-May-2007
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) 2007 by Total Control Software
|
||||
// Licence: wxWindows license
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// Not a %module
|
||||
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
%{
|
||||
#include <wx/richtext/richtextxml.h>
|
||||
%}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
%newgroup
|
||||
|
||||
MAKE_CONST_WXSTRING2(XmlName, wxT("XML"));
|
||||
MAKE_CONST_WXSTRING2(XmlExt, wxT("xml"));
|
||||
|
||||
|
||||
class wxRichTextXMLHandler: public wxRichTextFileHandler
|
||||
{
|
||||
public:
|
||||
wxRichTextXMLHandler(const wxString& name = wxPyXmlName,
|
||||
const wxString& ext = wxPyXmlExt,
|
||||
int type = wxRICHTEXT_TYPE_XML);
|
||||
|
||||
// #if wxUSE_STREAMS
|
||||
// /// Recursively export an object
|
||||
// bool ExportXML(wxOutputStream& stream, wxMBConv* convMem, wxMBConv* convFile, wxRichTextObject& obj, int level);
|
||||
// bool ExportStyleDefinition(wxOutputStream& stream, wxMBConv* convMem, wxMBConv* convFile, wxRichTextStyleDefinition* def, int level);
|
||||
|
||||
// /// Recursively import an object
|
||||
// bool ImportXML(wxRichTextBuffer* buffer, wxXmlNode* node);
|
||||
// bool ImportStyleDefinition(wxRichTextStyleSheet* sheet, wxXmlNode* node);
|
||||
|
||||
// /// Create style parameters
|
||||
// wxString CreateStyle(const wxTextAttrEx& attr, bool isPara = false);
|
||||
|
||||
// /// Get style parameters
|
||||
// bool GetStyle(wxTextAttrEx& attr, wxXmlNode* node, bool isPara = false);
|
||||
// #endif
|
||||
|
||||
/// Can we save using this handler?
|
||||
virtual bool CanSave() const { return true; }
|
||||
|
||||
/// Can we load using this handler?
|
||||
virtual bool CanLoad() const { return true; }
|
||||
|
||||
|
||||
// bool HasParam(wxXmlNode* node, const wxString& param);
|
||||
// wxXmlNode *GetParamNode(wxXmlNode* node, const wxString& param);
|
||||
// wxString GetNodeContent(wxXmlNode *node);
|
||||
// wxString GetParamValue(wxXmlNode *node, const wxString& param);
|
||||
// wxString GetText(wxXmlNode *node, const wxString& param = wxEmptyString, bool translate = false);
|
||||
|
||||
};
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user