another class takes ownership.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@37947
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
be converted back and forth without loss in that respect.", "");
be converted back and forth without loss in that respect.", "");
DocDeclStr(
virtual wxMask* , GetMask() const,
"Gets the associated mask (if any) which may have been loaded from a
DocDeclStr(
virtual wxMask* , GetMask() const,
"Gets the associated mask (if any) which may have been loaded from a
// MSW only? wxBitmap GetMaskBitmap() const;
// MSW only? wxBitmap GetMaskBitmap() const;
DocDeclStr(
virtual void , SetMask(wxMask* mask),
"Sets the mask for this bitmap.
:see: `GetMask`, `wx.Mask`
", "");
DocDeclStr(
virtual void , SetMask(wxMask* mask),
"Sets the mask for this bitmap.
:see: `GetMask`, `wx.Mask`
", "");
%extend {
DocStr(SetMaskColour,
%extend {
DocStr(SetMaskColour,
};
%pythoncode { MaskColour = wx._deprecated(Mask, "wx.MaskColour is deprecated, use `wx.Mask` instead.") }
};
%pythoncode { MaskColour = wx._deprecated(Mask, "wx.MaskColour is deprecated, use `wx.Mask` instead.") }
"is not determinable, -1.", "");
};
"is not determinable, -1.", "");
};
DocStr(wxLayoutConstraints,
"**Note:** constraints are now deprecated and you should use sizers
instead.
DocStr(wxLayoutConstraints,
"**Note:** constraints are now deprecated and you should use sizers
instead.
DocCtorStr(
wxLayoutConstraints(),
"", "");
DocCtorStr(
wxLayoutConstraints(),
"", "");
+
+ ~wxLayoutConstraints();
DocDeclA(
bool, SatisfyConstraints(wxWindow *win, int *OUTPUT),
DocDeclA(
bool, SatisfyConstraints(wxWindow *win, int *OUTPUT),
wxMenu *submenu,
const wxString& help = wxPyEmptyString));
wxMenu *submenu,
const wxString& help = wxPyEmptyString));
+
+ %disownarg(wxMenuItem*);
// the most generic form of Append() - append anything
%Rename(AppendItem, wxMenuItem*, Append(wxMenuItem *item));
// the most generic form of Append() - append anything
%Rename(AppendItem, wxMenuItem*, Append(wxMenuItem *item));
+ // insert an item before given position
+ %Rename(InsertItem, wxMenuItem*, Insert(size_t pos, wxMenuItem *item));
+ // prepend an item to the menu
+ %Rename(PrependItem, wxMenuItem*, Prepend(wxMenuItem *item));
+ %cleardisown(wxMenuItem*);
+
// insert a break in the menu (only works when appending the items, not
// inserting them)
virtual void Break();
// insert a break in the menu (only works when appending the items, not
// inserting them)
virtual void Break();
- // insert an item before given position
- %Rename(InsertItem, wxMenuItem*, Insert(size_t pos, wxMenuItem *item));
-
// insert an item before given position
wxMenuItem* Insert(size_t pos,
int id,
// insert an item before given position
wxMenuItem* Insert(size_t pos,
int id,
wxMenu *submenu,
const wxString& help = wxPyEmptyString));
wxMenu *submenu,
const wxString& help = wxPyEmptyString));
- // prepend an item to the menu
- %Rename(PrependItem, wxMenuItem*, Prepend(wxMenuItem *item));
-
// prepend any item to the menu
wxMenuItem* Prepend(int id,
const wxString& text,
// prepend any item to the menu
wxMenuItem* Prepend(int id,
const wxString& text,
wxMenu *submenu,
const wxString& help = wxPyEmptyString));
wxMenu *submenu,
const wxString& help = wxPyEmptyString));
// detach an item from the menu, but don't delete it so that it can be
// added back later (but if it's not, the caller is responsible for
// deleting it!)
// detach an item from the menu, but don't delete it so that it can be
// added back later (but if it's not, the caller is responsible for
// deleting it!)
wxMenuItem *Remove(int id);
%Rename(RemoveItem, wxMenuItem*, Remove(wxMenuItem *item));
wxMenuItem *Remove(int id);
%Rename(RemoveItem, wxMenuItem*, Remove(wxMenuItem *item));
const wxString& help = wxPyEmptyString,
wxItemKind kind = wxITEM_NORMAL,
wxMenu* subMenu = NULL);
const wxString& help = wxPyEmptyString,
wxItemKind kind = wxITEM_NORMAL,
wxMenu* subMenu = NULL);
// the menu we're in
wxMenu *GetMenu() const;
// the menu we're in
wxMenu *GetMenu() const;
bool GetAbort();
static wxPrinterError GetLastError();
bool GetAbort();
static wxPrinterError GetLastError();
class wxPyPrintout : public wxObject {
public:
%pythonAppend wxPyPrintout "self._setCallbackInfo(self, Printout)"
class wxPyPrintout : public wxObject {
public:
%pythonAppend wxPyPrintout "self._setCallbackInfo(self, Printout)"
+ %typemap(out) wxPyPrintout*; // turn off this typemap
wxPyPrintout(const wxString& title = wxPyPrintoutTitleStr);
wxPyPrintout(const wxString& title = wxPyPrintoutTitleStr);
- //~wxPyPrintout(); wxPrintPreview object takes ownership...
+ // Turn it back on again
+ %typemap(out) wxPyPrintout* { $result = wxPyMake_wxObject($1, $owner); }
+
void _setCallbackInfo(PyObject* self, PyObject* _class);
void _setCallbackInfo(PyObject* self, PyObject* _class);
class wxPreviewFrame : public wxFrame {
public:
class wxPreviewFrame : public wxFrame {
public:
+ %disownarg(wxPrintPreview*);
+
%pythonAppend wxPreviewFrame "self._setOORInfo(self)"
%pythonAppend wxPreviewFrame "self._setOORInfo(self)"
wxPreviewFrame(wxPrintPreview* preview, wxFrame* parent, const wxString& title,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxDEFAULT_FRAME_STYLE,
const wxString& name = wxPyFrameNameStr);
wxPreviewFrame(wxPrintPreview* preview, wxFrame* parent, const wxString& title,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxDEFAULT_FRAME_STYLE,
const wxString& name = wxPyFrameNameStr);
+ %cleardisown(wxPrintPreview*);
+
void Initialize();
void CreateControlBar();
void CreateCanvas();
void Initialize();
void CreateControlBar();
void CreateCanvas();
class wxPrintPreview : public wxObject {
public:
class wxPrintPreview : public wxObject {
public:
+ %disownarg(wxPyPrintout*);
+
%nokwargs wxPrintPreview;
wxPrintPreview(wxPyPrintout* printout,
wxPyPrintout* printoutForPrinting,
%nokwargs wxPrintPreview;
wxPrintPreview(wxPyPrintout* printout,
wxPyPrintout* printoutForPrinting,
wxPyPrintout* printoutForPrinting,
wxPrintData* data);
wxPyPrintout* printoutForPrinting,
wxPrintData* data);
virtual bool SetCurrentPage(int pageNum);
int GetCurrentPage();
virtual bool SetCurrentPage(int pageNum);
int GetCurrentPage();
wxPyPrintout *GetPrintout();
wxPyPrintout *GetPrintoutForPrinting();
wxPyPrintout *GetPrintout();
wxPyPrintout *GetPrintoutForPrinting();
+ %cleardisown(wxPyPrintout*);
+
void SetFrame(wxFrame *frame);
void SetCanvas(wxPreviewCanvas *canvas);
void SetFrame(wxFrame *frame);
void SetCanvas(wxPreviewCanvas *canvas);
class wxPyPrintPreview : public wxPrintPreview
{
public:
class wxPyPrintPreview : public wxPrintPreview
{
public:
+ %disownarg(wxPyPrintout*);
+
%pythonAppend wxPyPrintPreview "self._setCallbackInfo(self, PyPrintPreview)"
%nokwargs wxPyPrintPreview;
wxPyPrintPreview(wxPyPrintout* printout,
%pythonAppend wxPyPrintPreview "self._setCallbackInfo(self, PyPrintPreview)"
%nokwargs wxPyPrintPreview;
wxPyPrintPreview(wxPyPrintout* printout,
wxPyPrintout* printoutForPrinting,
wxPrintData* data);
wxPyPrintout* printoutForPrinting,
wxPrintData* data);
+ %cleardisown(wxPyPrintout*);
+
void _setCallbackInfo(PyObject* self, PyObject* _class);
bool SetCurrentPage(int pageNum);
void _setCallbackInfo(PyObject* self, PyObject* _class);
bool SetCurrentPage(int pageNum);
// constraints and sizers
// ----------------------
// constraints and sizers
// ----------------------
- // set the constraints for this window or retrieve them (may be NULL)
+ %disownarg(wxLayoutConstraints*);
DocDeclStr(
void , SetConstraints( wxLayoutConstraints *constraints ),
"Sets the window to have the given layout constraints. If an existing
DocDeclStr(
void , SetConstraints( wxLayoutConstraints *constraints ),
"Sets the window to have the given layout constraints. If an existing
wxLayoutConstraints *, GetConstraints() const,
"Returns a pointer to the window's layout constraints, or None if there
are none.", "");
wxLayoutConstraints *, GetConstraints() const,
"Returns a pointer to the window's layout constraints, or None if there
are none.", "");
+ %cleardisown(wxLayoutConstraints*);