#if !wxUSE_GRAPHICS_CONTEXT
// C++ stub classes for platforms that don't have wxGraphicsContext yet.
+class wxGraphicsObject : public wxObject
+{
+public :
+ wxGraphicsObject( wxGraphicsRenderer* renderer ) {}
+ wxGraphicsObject( const wxGraphicsObject& obj ) {}
+ virtual ~wxGraphicsObject() {}
+ wxGraphicsRenderer* GetRenderer() const {}
+} ;
+
+class wxGraphicsPen : public wxGraphicsObject
+{
+ //wxGraphicsPen(wxGraphicsRenderer* renderer) : wxGraphicsObject(renderer) {}
+ virtual ~wxGraphicsPen() {}
+ virtual void Apply( wxGraphicsContext* context) {}
+ virtual wxDouble GetWidth() {}
+} ;
+
+class wxGraphicsBrush : public wxGraphicsObject
+{
+public :
+ //wxGraphicsBrush(wxGraphicsRenderer* renderer) {}
+ virtual ~wxGraphicsBrush() {}
+ virtual void Apply( wxGraphicsContext* context) {}
+} ;
+
+class wxGraphicsFont : public wxGraphicsObject
+{
+public :
+ //wxGraphicsFont(wxGraphicsRenderer* renderer) {}
+ virtual ~wxGraphicsFont() {}
+ virtual void Apply( wxGraphicsContext* context) {}
+} ;
+
class wxGraphicsPath
{
public :
"wxGraphicsContext is not available on this platform.");
wxPyEndBlockThreads(blocked);
return NULL;
- }
+ }
+
+ virtual wxGraphicsPen* CreatePen(const wxPen& pen) {}
+
+ virtual wxGraphicsBrush* CreateBrush(const wxBrush& brush ) {}
+
+ virtual wxGraphicsBrush* CreateLinearGradientBrush( wxDouble x1, wxDouble y1, wxDouble x2, wxDouble y2,
+ const wxColour&c1, const wxColour&c2) {}
+
+ virtual wxGraphicsBrush* CreateRadialGradientBrush( wxDouble xo, wxDouble yo, wxDouble xc, wxDouble yc, wxDouble radius,
+ const wxColour &oColor, const wxColour &cColor) {}
+
+ virtual wxGraphicsFont* CreateFont( const wxFont &font , const wxColour &col = *wxBLACK ) {}
+
wxGraphicsPath * CreatePath() { return NULL; }
void PushState() {}
void Translate( wxDouble , wxDouble ) {}
void Scale( wxDouble , wxDouble ) {}
void Rotate( wxDouble ) {}
- void SetPen( const wxPen & ) {}
- void SetBrush( const wxBrush & ) {}
- void SetLinearGradientBrush( wxDouble , wxDouble , wxDouble , wxDouble ,
- const wxColour&, const wxColour&) {}
- void SetRadialGradientBrush( wxDouble , wxDouble , wxDouble , wxDouble , wxDouble ,
- const wxColour &, const wxColour &) {}
- void SetFont( const wxFont & ) {}
- void SetTextColour( const wxColour & ) {}
+ void SetFont( const wxFont &, bool ) {}
+ void SetFont( const wxFont &, const wxColour &) {}
void StrokePath( const wxGraphicsPath * ) {}
void FillPath( const wxGraphicsPath *, int ) {}
void DrawPath( const wxGraphicsPath *, int ) {}
// TODO: Decide which of the overloaded methods should use the primary names
+class wxGraphicsObject : public wxObject
+{
+public :
+ wxGraphicsObject( wxGraphicsRenderer* renderer = NULL );
+ wxGraphicsObject( const wxGraphicsObject& obj );
+ virtual ~wxGraphicsObject();
+ wxGraphicsRenderer* GetRenderer() const;
+} ;
+
+class wxGraphicsPen : public wxGraphicsObject
+{
+public :
+ //wxGraphicsPen(wxGraphicsRenderer* renderer);
+ virtual ~wxGraphicsPen();
+ virtual void Apply( wxGraphicsContext* context);
+ virtual wxDouble GetWidth();
+} ;
+
+class wxGraphicsBrush : public wxGraphicsObject
+{
+public :
+ //wxGraphicsBrush(wxGraphicsRenderer* renderer);
+ virtual ~wxGraphicsBrush();
+ virtual void Apply( wxGraphicsContext* context);
+} ;
+
+class wxGraphicsFont : public wxGraphicsObject
+{
+public :
+ //wxGraphicsFont(wxGraphicsRenderer* renderer);
+ virtual ~wxGraphicsFont();
+ virtual void Apply( wxGraphicsContext* context);
+} ;
+
class wxGraphicsPath
{
public :
"", "");
/*
+
+ %newobject CreatePen
+ virtual wxGraphicsPen* CreatePen(const wxPen& pen);
+
+ %newobject CreateBrush
+ virtual wxGraphicsBrush* CreateBrush(const wxBrush& brush );
+
+ %newobject CreateLinearGradientBrush
+ // sets the brush to a linear gradient, starting at (x1,y1) with color c1 to (x2,y2) with color c2
+ virtual wxGraphicsBrush* CreateLinearGradientBrush( wxDouble x1, wxDouble y1, wxDouble x2, wxDouble y2,
+ const wxColour&c1, const wxColour&c2);
+
+ %newobject CreateRadialGradientBrush
+ // sets the brush to a radial gradient originating at (xo,yc) with color oColor and ends on a circle around (xc,yc)
+ // with radius r and color cColor
+ virtual wxGraphicsBrush* CreateRadialGradientBrush( wxDouble xo, wxDouble yo, wxDouble xc, wxDouble yc, wxDouble radius,
+ const wxColour &oColor, const wxColour &cColor);
+
+ %newobject CreateFont
+ // sets the font
+ virtual wxGraphicsFont* CreateFont( const wxFont &font , const wxColour &col = *wxBLACK );
+
// create a 'native' matrix corresponding to these values
virtual wxGraphicsMatrix* CreateMatrix( wxDouble a=1.0, wxDouble b=0.0,
wxDouble c=0.0, wxDouble d=1.0,
"", "");
- // sets the brush to a linear gradient, starting at (x1,y1) with color c1 to (x2,y2) with color c2
- DocDeclStr(
- virtual void , SetLinearGradientBrush( wxDouble x1, wxDouble y1, wxDouble x2, wxDouble y2,
- const wxColour&c1, const wxColour&c2),
- "", "");
-
-
- // sets the brush to a radial gradient originating at (xo,yc) with color oColour and ends on a circle around (xc,yc)
- // with radius r and color cColour
- DocDeclStr(
- virtual void , SetRadialGradientBrush( wxDouble xo, wxDouble yo, wxDouble xc, wxDouble yc,
- wxDouble radius,
- const wxColour &oColour, const wxColour &cColour),
- "", "");
-
-
// sets the font
DocDeclStr(
- virtual void , SetFont( const wxFont &font ),
+ virtual void , SetFont( const wxFont &font, bool release = true ),
"", "");
- // sets the text color
+ // sets the font
DocDeclStr(
- virtual void , SetTextColour( const wxColour &col ),
+ void , SetFont( const wxFont &font, const wxColour& colour ),
"", "");
+
// strokes along a path with the current pen
DocDeclStr(
wxTEXT_ATTR_PARAGRAPH_STYLE_NAME,
wxTEXT_ATTR_BULLET_STYLE,
wxTEXT_ATTR_BULLET_NUMBER,
- wxTEXT_ATTR_BULLET_SYMBOL,
wxTEXT_ATTR_BULLET_STYLE_NONE,
wxTEXT_ATTR_BULLET_STYLE_ARABIC,
void SetLineSpacing(int spacing);
void SetBulletStyle(int style);
void SetBulletNumber(int n);
- void SetBulletSymbol(wxChar symbol);
+ void SetBulletText(wxChar symbol);
void SetBulletFont(const wxString& bulletFont);
const wxColour& GetTextColour() const;
int GetLineSpacing() const;
int GetBulletStyle() const;
int GetBulletNumber() const;
- wxChar GetBulletSymbol() const;
+ const wxString& GetBulletText() const;
const wxString& GetBulletFont() const;
// accessors
bool HasParagraphStyleName() const;
bool HasBulletStyle() const;
bool HasBulletNumber() const;
- bool HasBulletSymbol() const;
+ bool HasBulletText() const;
bool HasFlag(long flag) const;
%property(BulletFont, GetBulletFont, SetBulletFont, doc="See `GetBulletFont` and `SetBulletFont`");
%property(BulletNumber, GetBulletNumber, SetBulletNumber, doc="See `GetBulletNumber` and `SetBulletNumber`");
%property(BulletStyle, GetBulletStyle, SetBulletStyle, doc="See `GetBulletStyle` and `SetBulletStyle`");
- %property(BulletSymbol, GetBulletSymbol, SetBulletSymbol, doc="See `GetBulletSymbol` and `SetBulletSymbol`");
+ %property(BulletText, GetBulletText, SetBulletText, doc="See `GetBulletText` and `SetBulletText`");
%property(CharacterStyleName, GetCharacterStyleName, SetCharacterStyleName, doc="See `GetCharacterStyleName` and `SetCharacterStyleName`");
%property(Flags, GetFlags, SetFlags, doc="See `GetFlags` and `SetFlags`");
%property(Font, GetFont, SetFont, doc="See `GetFont` and `SetFont`");
empty string is passed then to the filename set with `SetFilename`.", "");
+ DocDeclStr(
+ void , SetHandlerFlags(int flags),
+ "Set the handler flags, controlling loading and saving.", "");
+
+ DocDeclStr(
+ int , GetHandlerFlags() const,
+ "Get the handler flags, controlling loading and saving.", "");
+
// sets/clears the dirty flag
DocDeclStr(
virtual void , MarkDirty(),
/// Begin symbol bullet
DocDeclStr(
- bool , BeginSymbolBullet(char symbol,
+ bool , BeginSymbolBullet(const wxString& symbol,
int leftIndent,
int leftSubIndent,
int bulletStyle = wxTEXT_ATTR_BULLET_STYLE_SYMBOL),
"", "");
+ DocDeclStr(
+ bool , BeginListStyle(const wxString& listStyle, int level = 1, int number = 1),
+ "Begin named list style.", "");
+
+ DocDeclStr(
+ bool , EndListStyle(), "End named list style.", "");
+
+ DocDeclStr(
+ bool , BeginURL(const wxString& url, const wxString& characterStyle = wxEmptyString),
+ "Begin URL.", "");
+
+ DocDeclStr(
+ bool , EndURL(), "End URL.", "");
+
/// Sets the default style to the style under the cursor
DocDeclStr(
bool , SetDefaultStyleToCursorStyle(),
%constant wxEventType wxEVT_COMMAND_RICHTEXT_MIDDLE_CLICK;
%constant wxEventType wxEVT_COMMAND_RICHTEXT_LEFT_DCLICK;
%constant wxEventType wxEVT_COMMAND_RICHTEXT_RETURN;
-
+%constant wxEventType wxEVT_COMMAND_RICHTEXT_STYLESHEET_CHANGING;
+%constant wxEventType wxEVT_COMMAND_RICHTEXT_STYLESHEET_CHANGED;
+%constant wxEventType wxEVT_COMMAND_RICHTEXT_STYLESHEET_REPLACING;
+%constant wxEventType wxEVT_COMMAND_RICHTEXT_STYLESHEET_REPLACED;
%pythoncode {
EVT_RICHTEXT_ITEM_SELECTED = wx.PyEventBinder(wxEVT_COMMAND_RICHTEXT_ITEM_SELECTED, 1)
EVT_RICHTEXT_MIDDLE_CLICK = wx.PyEventBinder(wxEVT_COMMAND_RICHTEXT_MIDDLE_CLICK, 1)
EVT_RICHTEXT_LEFT_DCLICK = wx.PyEventBinder(wxEVT_COMMAND_RICHTEXT_LEFT_DCLICK, 1)
EVT_RICHTEXT_RETURN = wx.PyEventBinder( wxEVT_COMMAND_RICHTEXT_RETURN, 1)
+EVT_RICHTEXT_STYLESHEET_CHANGING = wx.PyEventBinder( wxEVT_COMMAND_RICHTEXT_STYLESHEET_CHANGING, 1)
+EVT_RICHTEXT_STYLESHEET_CHANGED = wx.PyEventBinder( wxEVT_COMMAND_RICHTEXT_STYLESHEET_CHANGED, 1)
+EVT_RICHTEXT_STYLESHEET_REPLACING = wx.PyEventBinder( wxEVT_COMMAND_RICHTEXT_STYLESHEET_REPLACING, 1)
+EVT_RICHTEXT_STYLESHEET_REPLACED = wx.PyEventBinder( wxEVT_COMMAND_RICHTEXT_STYLESHEET_REPLACED, 1)
}