Lots of changes for wxPython to start using many of the new featues in

wxWindows 2.5


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@22265 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
2003-07-24 00:28:34 +00:00
parent e4a7bbfc1e
commit 3ef86e32dd
61 changed files with 5696 additions and 1666 deletions

View File

@@ -21,6 +21,7 @@
#include <wx/fontmap.h>
#include <wx/fontutil.h>
#include <wx/dcbuffer.h>
#include <wx/dcmirror.h>
#include <wx/iconbndl.h>
%}
@@ -242,6 +243,7 @@ public:
%new wxIcon* wxEmptyIcon();
%new wxIcon* wxIconFromXPMData(PyObject* listOfStrings);
%new wxIcon* wxIconFromBitmap(const wxBitmap& bmp);
%new wxIcon* wxIconFromLocation(const wxIconLocation& loc);
%{ // Implementations of some alternate "constructors"
wxIcon* wxEmptyIcon() {
@@ -265,8 +267,61 @@ public:
icon->CopyFromBitmap(bmp);
return icon;
}
wxIcon* wxIconFromLocation(const wxIconLocation& loc) {
wxIcon* icon = new wxIcon(loc);
return icon;
}
%}
//---------------------------------------------------------------------------
class wxIconLocation
{
public:
// ctor takes the name of the file where the icon is
%addmethods {
wxIconLocation(const wxString* filename = &wxPyEmptyString, int num = 0) {
#ifdef __WXMSW__
return new wxIconLocation(*filename, num);
#else
return new wxIconLocation(*filename);
#endif
}
}
~wxIconLocation();
// returns true if this object is valid/initialized
bool IsOk() const;
// set/get the icon file name
void SetFileName(const wxString& filename);
const wxString& GetFileName() const;
%addmethods {
void SetIndex(int num) {
#ifdef __WXMSW__
self->SetIndex(num);
#else
// do nothing
#endif
}
int GetIndex() {
#ifdef __WXMSW__
return self->GetIndex();
#else
return -1;
#endif
}
}
};
//---------------------------------------------------------------------------
class wxIconBundle
@@ -967,6 +1022,20 @@ public:
//---------------------------------------------------------------------------
class wxMirrorDC : public wxDC
{
public:
// constructs a mirror DC associated with the given real DC
//
// if mirror parameter is true, all vertical and horizontal coordinates are
// exchanged, otherwise this class behaves in exactly the same way as a
// plain DC
//
wxMirrorDC(wxDC& dc, bool mirror);
};
//---------------------------------------------------------------------------
#ifdef __WXMSW__