mirror of
https://github.com/wxWidgets/wxWidgets.git
synced 2026-09-23 23:13:12 +08:00
wxPython 2.1b1:
Added the missing wxWindow.GetUpdateRegion() method. Made a new change in SWIG (update your patches everybody) that provides a fix for global shadow objects that get an exception in their __del__ when their extension module has already been deleted. It was only a 1 line change in .../SWIG/Modules/pycpp.cxx at about line 496 if you want to do it by hand. It is now possible to run through MainLoop more than once in any one process. The cleanup that used to happen as MainLoop completed (and prevented it from running again) has been delayed until the wxc module is being unloaded by Python. wxWindow.PopupMenu() now takes a wxPoint instead of x,y. Added wxWindow.PopupMenuXY to be consistent with some other methods. Added wxGrid.SetEditInPlace and wxGrid.GetEditInPlace. You can now provide your own app.MainLoop method. See wxPython/demo/demoMainLoop.py for an example and some explaination. Got the in-place-edit for the wxTreeCtrl fixed and added some demo code to show how to use it. Put the wxIcon constructor back in for GTK as it now has one that matches MSW's. Added wxGrid.GetCells Added wxSystemSettings static methods as functions with names like wxSystemSettings_GetSystemColour. Removed wxPyMenu since using menu callbacks have been depreciated in wxWindows. Use wxMenu and events instead. Added alternate wxBitmap constructor (for MSW only) as wxBitmapFromData(data, type, width, height, depth = 1) Added a helper function named wxPyTypeCast that can convert shadow objects of one type into shadow objects of another type. (Like doing a down-cast.) See the implementation in wx.py for some docs. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3223 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -45,6 +45,57 @@ Or you can send mail directly to the list using this address:
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
What's new in 2.1b2
|
||||
--------------------
|
||||
|
||||
Added the missing wxWindow.GetUpdateRegion() method.
|
||||
|
||||
Made a new change in SWIG (update your patches everybody) that
|
||||
provides a fix for global shadow objects that get an exception in
|
||||
their __del__ when their extension module has already been deleted.
|
||||
It was only a 1 line change in .../SWIG/Modules/pycpp.cxx at about
|
||||
line 496 if you want to do it by hand.
|
||||
|
||||
It is now possible to run through MainLoop more than once in any one
|
||||
process. The cleanup that used to happen as MainLoop completed (and
|
||||
prevented it from running again) has been delayed until the wxc module
|
||||
is being unloaded by Python.
|
||||
|
||||
I fixed a bunch of stuff in the C++ version of wxGrid so it wouldn't
|
||||
make wxPython look bad.
|
||||
|
||||
wxWindow.PopupMenu() now takes a wxPoint instead of x,y. Added
|
||||
wxWindow.PopupMenuXY to be consistent with some other methods.
|
||||
|
||||
Added wxGrid.SetEditInPlace and wxGrid.GetEditInPlace.
|
||||
|
||||
You can now provide your own app.MainLoop method. See
|
||||
wxPython/demo/demoMainLoop.py for an example and some explaination.
|
||||
|
||||
Got the in-place-edit for the wxTreeCtrl fixed and added some demo
|
||||
code to show how to use it.
|
||||
|
||||
Put the wxIcon constructor back in for GTK as it now has one that
|
||||
matches MSW's.
|
||||
|
||||
Added wxGrid.GetCells
|
||||
|
||||
Added wxSystemSettings static methods as functions with names like
|
||||
wxSystemSettings_GetSystemColour.
|
||||
|
||||
Removed wxPyMenu since using menu callbacks have been depreciated in
|
||||
wxWindows. Use wxMenu and events instead.
|
||||
|
||||
Added alternate wxBitmap constructor (for MSW only) as
|
||||
wxBitmapFromData(data, type, width, height, depth = 1)
|
||||
|
||||
Added a helper function named wxPyTypeCast that can convert shadow
|
||||
objects of one type into shadow objects of another type. (Like doing
|
||||
a down-cast.) See the implementation in wx.py for some docs.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
What's new in 2.1b1
|
||||
--------------------
|
||||
|
||||
@@ -1,38 +1,38 @@
|
||||
*** swig.h.old Wed Feb 04 14:59:40 1998
|
||||
--- swig.h Fri Aug 28 14:46:32 1998
|
||||
*** swig.h.old Wed Feb 04 15:59:40 1998
|
||||
--- swig.h Fri Aug 28 15:46:32 1998
|
||||
***************
|
||||
*** 178,185 ****
|
||||
--- 178,211 ----
|
||||
char *firstkey();
|
||||
char *nextkey();
|
||||
};
|
||||
|
||||
|
||||
+ // -------------------------------------------------------------------
|
||||
+ // Simple Vector class
|
||||
+ // User is responsible for deleting contents before deleteing Vector
|
||||
+ // -------------------------------------------------------------------
|
||||
+
|
||||
+
|
||||
+ class Vector {
|
||||
+ public:
|
||||
+ Vector(size_t allocSize=8);
|
||||
+ ~Vector();
|
||||
+
|
||||
+
|
||||
+ size_t size() { return m_size; }
|
||||
+ size_t count() { return m_count; }
|
||||
+ size_t append(void* object);
|
||||
+ size_t extend(size_t newSize);
|
||||
+
|
||||
+
|
||||
+ void*& operator[] (size_t idx);
|
||||
+
|
||||
+
|
||||
+ static void* s_nullPtr;
|
||||
+
|
||||
+
|
||||
+ private:
|
||||
+ size_t m_size;
|
||||
+ size_t m_count;
|
||||
+ void** m_data;
|
||||
+ };
|
||||
+
|
||||
+
|
||||
+
|
||||
+
|
||||
/************************************************************************
|
||||
* class DataType
|
||||
*
|
||||
@@ -44,15 +44,15 @@
|
||||
extern char *name_set(char *vname, int suppress=0);
|
||||
extern char *name_construct(char *classname, int suppress=0);
|
||||
extern char *name_destroy(char *classname, int suppress=0);
|
||||
+
|
||||
+
|
||||
+ // ----------------------------------------------------------------------
|
||||
+ // class CPP_class
|
||||
+ //
|
||||
+ // Class for managing class members (internally)
|
||||
+ // ----------------------------------------------------------------------
|
||||
+
|
||||
+
|
||||
+ class CPP_member;
|
||||
+
|
||||
+
|
||||
+ class CPP_class {
|
||||
+ public:
|
||||
+ char *classname; // Real class name
|
||||
@@ -74,9 +74,9 @@
|
||||
+ CPP_member *members; // Linked list of members
|
||||
+ CPP_class *next; // Next class
|
||||
+ static CPP_class *classlist; // List of all classes stored
|
||||
+
|
||||
+
|
||||
+ Vector addPragmas;
|
||||
+
|
||||
+
|
||||
+ CPP_class(char *name, char *ctype);
|
||||
+ void add_member(CPP_member *m);
|
||||
+ CPP_member *search_member(char *name);
|
||||
@@ -86,12 +86,54 @@
|
||||
+ void create_default();
|
||||
+ static void create_all();
|
||||
+ };
|
||||
+
|
||||
+
|
||||
+ extern CPP_class *current_class;
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* -- Revision History
|
||||
* $Log$
|
||||
* Revision 1.1 1998/10/03 05:56:02 RD
|
||||
* *** empty log message ***
|
||||
* Revision 1.2 1999/07/31 07:54:05 RD
|
||||
* wxPython 2.1b1:
|
||||
*
|
||||
* Added the missing wxWindow.GetUpdateRegion() method.
|
||||
*
|
||||
* Made a new change in SWIG (update your patches everybody) that
|
||||
* provides a fix for global shadow objects that get an exception in
|
||||
* their __del__ when their extension module has already been deleted.
|
||||
* It was only a 1 line change in .../SWIG/Modules/pycpp.cxx at about
|
||||
* line 496 if you want to do it by hand.
|
||||
*
|
||||
* It is now possible to run through MainLoop more than once in any one
|
||||
* process. The cleanup that used to happen as MainLoop completed (and
|
||||
* prevented it from running again) has been delayed until the wxc module
|
||||
* is being unloaded by Python.
|
||||
*
|
||||
* wxWindow.PopupMenu() now takes a wxPoint instead of x,y. Added
|
||||
* wxWindow.PopupMenuXY to be consistent with some other methods.
|
||||
*
|
||||
* Added wxGrid.SetEditInPlace and wxGrid.GetEditInPlace.
|
||||
*
|
||||
* You can now provide your own app.MainLoop method. See
|
||||
* wxPython/demo/demoMainLoop.py for an example and some explaination.
|
||||
*
|
||||
* Got the in-place-edit for the wxTreeCtrl fixed and added some demo
|
||||
* code to show how to use it.
|
||||
*
|
||||
* Put the wxIcon constructor back in for GTK as it now has one that
|
||||
* matches MSW's.
|
||||
*
|
||||
* Added wxGrid.GetCells
|
||||
*
|
||||
* Added wxSystemSettings static methods as functions with names like
|
||||
* wxSystemSettings_GetSystemColour.
|
||||
*
|
||||
* Removed wxPyMenu since using menu callbacks have been depreciated in
|
||||
* wxWindows. Use wxMenu and events instead.
|
||||
*
|
||||
* Added alternate wxBitmap constructor (for MSW only) as
|
||||
* wxBitmapFromData(data, type, width, height, depth = 1)
|
||||
*
|
||||
* Added a helper function named wxPyTypeCast that can convert shadow
|
||||
* objects of one type into shadow objects of another type. (Like doing
|
||||
* a down-cast.) See the implementation in wx.py for some docs.
|
||||
*
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
*** python.cxx.old Fri Jan 02 22:17:40 1998
|
||||
--- python.cxx Fri Aug 28 14:49:18 1998
|
||||
*** python.cxx.old Fri Jan 02 23:17:40 1998
|
||||
--- python.cxx Fri Aug 28 15:49:18 1998
|
||||
***************
|
||||
*** 1679,1684 ****
|
||||
--- 1679,1701 ----
|
||||
*** 1678,1685 ****
|
||||
--- 1678,1702 ----
|
||||
fprintf(stderr,"%s : Line %d. Unable to locate file %s\n", input_file, line_number, value);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -15,7 +16,7 @@
|
||||
+ txtptr++;
|
||||
+ AddPragmaData* apData = new AddPragmaData(value, txtptr);
|
||||
+ current_class->addPragmas.append(apData);
|
||||
+
|
||||
+
|
||||
+ } else {
|
||||
+ fprintf(stderr,"%s : Line %d. Malformed addtomethod pragma. Should be \"methodName:text\"\n",
|
||||
+ input_file, line_number);
|
||||
@@ -26,65 +27,80 @@
|
||||
} else {
|
||||
fprintf(stderr,"%s : Line %d. Unrecognized pragma.\n", input_file, line_number);
|
||||
}
|
||||
*** python.h.old Thu Jul 24 22:18:50 1997
|
||||
--- python.h Fri Aug 28 14:46:08 1998
|
||||
}
|
||||
*** python.h.old Thu Jul 24 23:18:50 1997
|
||||
--- python.h Fri Aug 28 15:46:08 1998
|
||||
***************
|
||||
*** 185,191 ****
|
||||
--- 185,203 ----
|
||||
*** 184,191 ****
|
||||
--- 184,203 ----
|
||||
void cpp_declare_const(char *name, char *iname, DataType *type, char *value);
|
||||
void cpp_class_decl(char *, char *,char *);
|
||||
void pragma(char *, char *, char *);
|
||||
void add_typedef(DataType *t, char *name);
|
||||
+
|
||||
+
|
||||
+ void emitAddPragmas(String& output, char* name, char* spacing);
|
||||
};
|
||||
|
||||
|
||||
#define PYSHADOW_MEMBER 0x2
|
||||
+
|
||||
+
|
||||
+ struct AddPragmaData {
|
||||
+ String m_method;
|
||||
+ String m_text;
|
||||
+
|
||||
+
|
||||
+ AddPragmaData(char* method, char* text)
|
||||
+ : m_method(method),
|
||||
+ m_text(text)
|
||||
+ {}
|
||||
+ };
|
||||
|
||||
*** pycpp.cxx.old Fri Jan 02 20:23:22 1998
|
||||
--- pycpp.cxx Fri Aug 28 16:01:46 1998
|
||||
|
||||
*** pycpp.cxx.old Fri Jan 02 21:23:22 1998
|
||||
--- pycpp.cxx Tue Jul 20 14:34:36 1999
|
||||
***************
|
||||
*** 276,281 ****
|
||||
--- 276,282 ----
|
||||
*** 275,282 ****
|
||||
--- 275,283 ----
|
||||
#endif
|
||||
}
|
||||
}
|
||||
// if ((t->type != T_VOID) || (t->is_pointer))
|
||||
+ emitAddPragmas(*pyclass, realname, tab8);
|
||||
*pyclass << tab8 << "return val\n";
|
||||
|
||||
|
||||
// Change the usage string to reflect our shadow class
|
||||
|
||||
***************
|
||||
*** 394,399 ****
|
||||
--- 395,401 ----
|
||||
*** 393,400 ****
|
||||
--- 394,402 ----
|
||||
}
|
||||
}
|
||||
*construct << ")\n";
|
||||
*construct << tab8 << "self.thisown = 1\n";
|
||||
+ emitAddPragmas(*construct, "__init__", tab8);
|
||||
have_constructor = 1;
|
||||
} else {
|
||||
|
||||
|
||||
// Hmmm. We seem to be creating a different constructor. We're just going to create a
|
||||
***************
|
||||
*** 494,502 ****
|
||||
*pyclass << tab4 << "def __del__(self):\n"
|
||||
*** 490,503 ****
|
||||
if (class_renamed) realname = class_name;
|
||||
else realname = name;
|
||||
}
|
||||
|
||||
! *pyclass << tab4 << "def __del__(self):\n"
|
||||
<< tab8 << "if self.thisown == 1 :\n"
|
||||
<< tab8 << tab4 << module << "." << name_destroy(realname) << "(self.this)\n";
|
||||
!
|
||||
!
|
||||
have_destructor = 1;
|
||||
-
|
||||
-
|
||||
if (doc_entry) {
|
||||
doc_entry->usage = "";
|
||||
doc_entry->usage << "del this";
|
||||
--- 496,503 ----
|
||||
*pyclass << tab4 << "def __del__(self):\n"
|
||||
}
|
||||
--- 492,504 ----
|
||||
if (class_renamed) realname = class_name;
|
||||
else realname = name;
|
||||
}
|
||||
|
||||
! *pyclass << tab4 << "def __del__(self, " << module << "=" << module << "):\n"
|
||||
<< tab8 << "if self.thisown == 1 :\n"
|
||||
<< tab8 << tab4 << module << "." << name_destroy(realname) << "(self.this)\n";
|
||||
! emitAddPragmas(*pyclass, "__del__", tab8);
|
||||
@@ -92,23 +108,27 @@
|
||||
if (doc_entry) {
|
||||
doc_entry->usage = "";
|
||||
doc_entry->usage << "del this";
|
||||
}
|
||||
***************
|
||||
*** 552,557 ****
|
||||
--- 553,560 ----
|
||||
*** 551,558 ****
|
||||
--- 552,561 ----
|
||||
repr << tab4 << "def __repr__(self):\n"
|
||||
<< tab8 << "return \"<C " << class_name <<" instance>\"\n";
|
||||
|
||||
|
||||
classes << repr;
|
||||
+ emitAddPragmas(classes, "__class__", tab4);
|
||||
+
|
||||
+
|
||||
}
|
||||
|
||||
|
||||
// Now build the real class with a normal constructor
|
||||
|
||||
***************
|
||||
*** 747,752 ****
|
||||
--- 750,777 ----
|
||||
*** 746,753 ****
|
||||
--- 749,778 ----
|
||||
hash.add(name,copy_string((char *) hash.lookup(t->name)));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+ // --------------------------------------------------------------------------------
|
||||
+ // PYTHON::emitAddPragmas(String& output, char* name, char* spacing);
|
||||
+ //
|
||||
@@ -116,13 +136,13 @@
|
||||
+ // Append the text properly spcaed to the output string.
|
||||
+ //
|
||||
+ // --------------------------------------------------------------------------------
|
||||
+
|
||||
+
|
||||
+ void PYTHON::emitAddPragmas(String& output, char* name, char* spacing)
|
||||
+ {
|
||||
+ AddPragmaData* apData;
|
||||
+ size_t count;
|
||||
+ int i;
|
||||
+
|
||||
+
|
||||
+ count = current_class->addPragmas.count();
|
||||
+ for (i=0; i<count; i++) {
|
||||
+ apData = (AddPragmaData*)current_class->addPragmas[i];
|
||||
@@ -131,6 +151,52 @@
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
|
||||
|
||||
/*********************************************************************************
|
||||
*
|
||||
* $Log$
|
||||
* Revision 1.2 1999/07/31 07:54:05 RD
|
||||
* wxPython 2.1b1:
|
||||
*
|
||||
* Added the missing wxWindow.GetUpdateRegion() method.
|
||||
*
|
||||
* Made a new change in SWIG (update your patches everybody) that
|
||||
* provides a fix for global shadow objects that get an exception in
|
||||
* their __del__ when their extension module has already been deleted.
|
||||
* It was only a 1 line change in .../SWIG/Modules/pycpp.cxx at about
|
||||
* line 496 if you want to do it by hand.
|
||||
*
|
||||
* It is now possible to run through MainLoop more than once in any one
|
||||
* process. The cleanup that used to happen as MainLoop completed (and
|
||||
* prevented it from running again) has been delayed until the wxc module
|
||||
* is being unloaded by Python.
|
||||
*
|
||||
* wxWindow.PopupMenu() now takes a wxPoint instead of x,y. Added
|
||||
* wxWindow.PopupMenuXY to be consistent with some other methods.
|
||||
*
|
||||
* Added wxGrid.SetEditInPlace and wxGrid.GetEditInPlace.
|
||||
*
|
||||
* You can now provide your own app.MainLoop method. See
|
||||
* wxPython/demo/demoMainLoop.py for an example and some explaination.
|
||||
*
|
||||
* Got the in-place-edit for the wxTreeCtrl fixed and added some demo
|
||||
* code to show how to use it.
|
||||
*
|
||||
* Put the wxIcon constructor back in for GTK as it now has one that
|
||||
* matches MSW's.
|
||||
*
|
||||
* Added wxGrid.GetCells
|
||||
*
|
||||
* Added wxSystemSettings static methods as functions with names like
|
||||
* wxSystemSettings_GetSystemColour.
|
||||
*
|
||||
* Removed wxPyMenu since using menu callbacks have been depreciated in
|
||||
* wxWindows. Use wxMenu and events instead.
|
||||
*
|
||||
* Added alternate wxBitmap constructor (for MSW only) as
|
||||
* wxBitmapFromData(data, type, width, height, depth = 1)
|
||||
*
|
||||
* Added a helper function named wxPyTypeCast that can convert shadow
|
||||
* objects of one type into shadow objects of another type. (Like doing
|
||||
* a down-cast.) See the implementation in wx.py for some docs.
|
||||
*
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,15 +1,3 @@
|
||||
#!/bin/env python
|
||||
#----------------------------------------------------------------------------
|
||||
# Name: ColorPanel.py
|
||||
# Purpose: Testing lots of stuff, controls, window types, etc.
|
||||
#
|
||||
# Author: Robin Dunn & Gary Dumer
|
||||
#
|
||||
# Created:
|
||||
# RCS-ID: $Id$
|
||||
# Copyright: (c) 1998 by Total Control Software
|
||||
# Licence: wxWindows license
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
from wxPython.wx import *
|
||||
|
||||
@@ -22,4 +10,4 @@ class ColoredPanel(wxWindow):
|
||||
wxDefaultPosition, wxDefaultSize, wxRAISED_BORDER)
|
||||
self.SetBackgroundColour(color)
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#!/bin/env python
|
||||
#!/usr/bin/env python
|
||||
#----------------------------------------------------------------------------
|
||||
# Name: DialogUnits.py
|
||||
# Purpose: A minimal wxPython program that is a bit smarter than test1.
|
||||
@@ -46,6 +46,9 @@ class MyFrame(wxFrame):
|
||||
wxDLG_SZE(panel, wxSize(36, -1)),
|
||||
wxTE_READONLY)
|
||||
|
||||
print wxDLG_PNT(panel, wxPoint(24, 4)), wxDLG_SZE(panel, wxSize(36, -1))
|
||||
print wxDLG_PNT(panel, wxPoint(24, 16)),wxDLG_SZE(panel, wxSize(36, -1))
|
||||
|
||||
|
||||
# This method is called automatically when the CLOSE event is
|
||||
# sent to this window
|
||||
|
||||
@@ -43,7 +43,7 @@ _treeList = [
|
||||
('wxPython Library', ['Sizers', 'Layoutf', 'wxScrolledMessageDialog',
|
||||
'wxMultipleChoiceDialog', 'wxPlotCanvas']),
|
||||
|
||||
('Cool Contribs', ['pyTree', 'hangman', 'SlashDot']),
|
||||
('Cool Contribs', ['pyTree', 'hangman', 'SlashDot', 'XMLtreeview']),
|
||||
|
||||
]
|
||||
|
||||
@@ -153,7 +153,8 @@ class wxPythonDemo(wxFrame):
|
||||
w, h = self.log.GetClientSizeTuple()
|
||||
numLines = h/self.charHeight
|
||||
x, y = self.log.PositionToXY(self.log.GetLastPosition())
|
||||
self.log.ShowPosition(self.log.XYToPosition(x, y-numLines+1))
|
||||
self.log.ShowPosition(self.log.XYToPosition(x, y-numLines))
|
||||
## self.log.ShowPosition(self.log.GetLastPosition())
|
||||
self.log.SetInsertionPointEnd()
|
||||
|
||||
def write(self, txt):
|
||||
@@ -218,7 +219,7 @@ class wxPythonDemo(wxFrame):
|
||||
# self.txt.WriteText("Cannot open %s file." % filename)
|
||||
try:
|
||||
self.txt.SetValue(open(filename).read())
|
||||
except IOException:
|
||||
except IOError:
|
||||
self.txt.WriteText("Cannot open %s file." % filename)
|
||||
|
||||
|
||||
|
||||
@@ -111,21 +111,17 @@ def makeSimpleBorder3(win):
|
||||
def makeBoxInBox(win):
|
||||
box = wxBoxSizer(wxVERTICAL)
|
||||
|
||||
btn = wxButton(win, 1010, "one")
|
||||
box.Add(btn)
|
||||
box.Add(wxButton(win, 1010, "one"))
|
||||
|
||||
box2 = wxBoxSizer(wxHORIZONTAL)
|
||||
btn = wxButton(win, 1010, "two")
|
||||
box2.Add(btn)
|
||||
btn = wxButton(win, 1010, "three")
|
||||
box2.Add(btn)
|
||||
btn = wxButton(win, 1010, "four")
|
||||
box2.Add(btn)
|
||||
btn = wxButton(win, 1010, "five")
|
||||
box2.Add(btn)
|
||||
box2.AddMany([ wxButton(win, 1010, "two"),
|
||||
wxButton(win, 1010, "three"),
|
||||
wxButton(win, 1010, "four"),
|
||||
wxButton(win, 1010, "five"),
|
||||
])
|
||||
|
||||
box3 = wxBoxSizer(wxVERTICAL)
|
||||
box3.AddMany([ (wxButton(win, 1010, "six"), 1),
|
||||
box3.AddMany([ (wxButton(win, 1010, "six"), 0),
|
||||
(wxButton(win, 1010, "seven"), 2),
|
||||
(wxButton(win, 1010, "eight"), 1),
|
||||
(wxButton(win, 1010, "nine"), 1),
|
||||
@@ -134,8 +130,7 @@ def makeBoxInBox(win):
|
||||
box2.Add(box3, 1)
|
||||
box.Add(box2, 1)
|
||||
|
||||
btn = wxButton(win, 1010, "ten")
|
||||
box.Add(btn)
|
||||
box.Add(wxButton(win, 1010, "ten"))
|
||||
|
||||
return box
|
||||
|
||||
@@ -154,11 +149,11 @@ def makeBorderInBox(win):
|
||||
insideBox = wxBoxSizer(wxHORIZONTAL)
|
||||
|
||||
box2 = wxBoxSizer(wxHORIZONTAL)
|
||||
box2.AddMany([ (wxButton(win, 1010, "one"), 0),
|
||||
(wxButton(win, 1010, "two"), 0),
|
||||
(wxButton(win, 1010, "three"), 0),
|
||||
(wxButton(win, 1010, "four"), 0),
|
||||
(wxButton(win, 1010, "five"), 0),
|
||||
box2.AddMany([ wxButton(win, 1010, "one"),
|
||||
wxButton(win, 1010, "two"),
|
||||
wxButton(win, 1010, "three"),
|
||||
wxButton(win, 1010, "four"),
|
||||
wxButton(win, 1010, "five"),
|
||||
])
|
||||
|
||||
insideBox.Add(box2, 0)
|
||||
@@ -168,7 +163,7 @@ def makeBorderInBox(win):
|
||||
insideBox.Add(bdr, 1)
|
||||
|
||||
box3 = wxBoxSizer(wxVERTICAL)
|
||||
box3.AddMany([ (wxButton(win, 1010, "six"), 1),
|
||||
box3.AddMany([ (wxButton(win, 1010, "six"), 0),
|
||||
(wxButton(win, 1010, "seven"), 2),
|
||||
(wxButton(win, 1010, "eight"), 1),
|
||||
(wxButton(win, 1010, "nine"), 1),
|
||||
|
||||
@@ -0,0 +1,66 @@
|
||||
|
||||
import string
|
||||
|
||||
from wxPython.wx import *
|
||||
try:
|
||||
from xml.parsers import pyexpat
|
||||
haveXML = true
|
||||
except ImportError:
|
||||
haveXML = false
|
||||
|
||||
#----------------------------------------------------------------------
|
||||
|
||||
if not haveXML:
|
||||
def runTest(frame, nb, log):
|
||||
dlg = wxMessageDialog(frame, 'This demo requires the XML package. See http://www.python.org/sigs/xml-sig/',
|
||||
'Sorry', wxOK | wxICON_INFORMATION)
|
||||
dlg.ShowModal()
|
||||
dlg.Destroy()
|
||||
|
||||
else:
|
||||
|
||||
class XMLTree(wxTreeCtrl):
|
||||
def __init__(self, parent, ID):
|
||||
wxTreeCtrl.__init__(self, parent, ID)
|
||||
self.nodeStack = [self.AddRoot("Root")]
|
||||
|
||||
# Define a handler for start element events
|
||||
def StartElement(self, name, attrs ):
|
||||
self.nodeStack.append(self.AppendItem(self.nodeStack[-1], name))
|
||||
|
||||
def EndElement(self, name ):
|
||||
self.nodeStack = self.nodeStack[:-1]
|
||||
|
||||
def CharacterData(self, data ):
|
||||
if string.strip(data):
|
||||
self.AppendItem(self.nodeStack[-1], data)
|
||||
|
||||
|
||||
def LoadTree(self, filename):
|
||||
# Create a parser
|
||||
Parser = pyexpat.ParserCreate()
|
||||
|
||||
# Tell the parser what the start element handler is
|
||||
Parser.StartElementHandler = self.StartElement
|
||||
Parser.EndElementHandler = self.EndElement
|
||||
Parser.CharacterDataHandler = self.CharacterData
|
||||
|
||||
# Parse the XML File
|
||||
ParserStatus = Parser.Parse(open(filename,'r').read(), 1)
|
||||
|
||||
|
||||
def runTest(frame, nb, log):
|
||||
win = XMLTree(nb, -1)
|
||||
win.LoadTree("paper.xml")
|
||||
return win
|
||||
|
||||
#----------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
overview = """\
|
||||
"""
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#!/bin/env python
|
||||
#!/usr/bin/env python
|
||||
|
||||
import Main
|
||||
Main.main()
|
||||
|
||||
Executable
+119
@@ -0,0 +1,119 @@
|
||||
"""
|
||||
This demo attempts to override the C++ MainLoop and implement it
|
||||
in Python. This is not part of the demo framework.
|
||||
|
||||
|
||||
THIS FEATURE IS STILL EXPERIMENTAL...
|
||||
"""
|
||||
|
||||
|
||||
from wxPython.wx import *
|
||||
import time
|
||||
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
class MyFrame(wxFrame):
|
||||
|
||||
def __init__(self, parent, id, title):
|
||||
wxFrame.__init__(self, parent, id, title,
|
||||
wxPoint(100, 100), wxSize(160, 150))
|
||||
|
||||
EVT_SIZE(self, self.OnSize)
|
||||
EVT_MOVE(self, self.OnMove)
|
||||
EVT_CLOSE(self, self.OnCloseWindow)
|
||||
EVT_IDLE(self, self.OnIdle)
|
||||
|
||||
self.count = 0
|
||||
|
||||
panel = wxPanel(self, -1)
|
||||
wxStaticText(panel, -1, "Size:",
|
||||
wxDLG_PNT(panel, wxPoint(4, 4)), wxDefaultSize)
|
||||
wxStaticText(panel, -1, "Pos:",
|
||||
wxDLG_PNT(panel, wxPoint(4, 16)), wxDefaultSize)
|
||||
|
||||
wxStaticText(panel, -1, "Idle:",
|
||||
wxDLG_PNT(panel, wxPoint(4, 28)), wxDefaultSize)
|
||||
|
||||
self.sizeCtrl = wxTextCtrl(panel, -1, "",
|
||||
wxDLG_PNT(panel, wxPoint(24, 4)),
|
||||
wxDLG_SZE(panel, wxSize(36, -1)),
|
||||
wxTE_READONLY)
|
||||
|
||||
self.posCtrl = wxTextCtrl(panel, -1, "",
|
||||
wxDLG_PNT(panel, wxPoint(24, 16)),
|
||||
wxDLG_SZE(panel, wxSize(36, -1)),
|
||||
wxTE_READONLY)
|
||||
|
||||
self.idleCtrl = wxTextCtrl(panel, -1, "",
|
||||
wxDLG_PNT(panel, wxPoint(24, 28)),
|
||||
wxDLG_SZE(panel, wxSize(36, -1)),
|
||||
wxTE_READONLY)
|
||||
|
||||
|
||||
def OnCloseWindow(self, event):
|
||||
app.keepGoing = false
|
||||
self.Destroy()
|
||||
|
||||
def OnIdle(self, event):
|
||||
self.idleCtrl.SetValue(str(self.count))
|
||||
self.count = self.count + 1
|
||||
|
||||
def OnSize(self, event):
|
||||
size = event.GetSize()
|
||||
self.sizeCtrl.SetValue("%s, %s" % (size.width, size.height))
|
||||
event.Skip()
|
||||
|
||||
def OnMove(self, event):
|
||||
pos = event.GetPosition()
|
||||
self.posCtrl.SetValue("%s, %s" % (pos.x, pos.y))
|
||||
|
||||
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
class MyApp(wxApp):
|
||||
def MainLoop(self):
|
||||
# This outer loop determines when to exit the application, for
|
||||
# this example we let the main frame reset this flag when it
|
||||
# closes.
|
||||
while self.keepGoing:
|
||||
# At this point in the outer loop you could do whatever you
|
||||
# implemented your own MainLoop for. It should be quick and
|
||||
# non-blocking, otherwise your GUI will freeze. For example,
|
||||
# call Fnorb's reactor.do_one_event(0), etc.
|
||||
|
||||
# call_your_code_here()
|
||||
|
||||
|
||||
# This inner loop will process any GUI events until there
|
||||
# are no more waiting.
|
||||
while self.Pending():
|
||||
self.Dispatch()
|
||||
|
||||
# Send idle events to idle handlers. You may want to throtle
|
||||
# this back a bit so there is not too much CPU time spent in
|
||||
# the idle handlers. For this example, I'll just snooze a
|
||||
# little...
|
||||
time.sleep(0.25)
|
||||
self.ProcessIdle()
|
||||
|
||||
|
||||
|
||||
def OnInit(self):
|
||||
frame = MyFrame(NULL, -1, "This is a test")
|
||||
frame.Show(true)
|
||||
self.SetTopWindow(frame)
|
||||
|
||||
self.keepGoing = true
|
||||
|
||||
return true
|
||||
|
||||
|
||||
app = MyApp(0)
|
||||
app.MainLoop()
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,85 @@
|
||||
<?xml version="1.0"?>
|
||||
<!DOCTYPE gcapaper SYSTEM "gcapap-X.dtd" [
|
||||
<!ENTITY footprint SYSTEM "footprint.tif" NDATA tiff >
|
||||
<!ENTITY footprint SYSTEM "footprint.eps" NDATA eps >
|
||||
<!ENTITY shoes SYSTEM "shoes.tif" NDATA tiff >
|
||||
<!ENTITY super1 "Z">
|
||||
]>
|
||||
|
||||
<gcapaper><front><title>Using SGML to make footprints in the sand
|
||||
</title><keyword>footprints</keyword><keyword>sand</keyword>
|
||||
<author><fname>Jane</fname><surname>Doe</surname>
|
||||
<jobtitle>Empress</jobtitle>
|
||||
<address><affil>Universe Corporation</affil>
|
||||
<aline>1 Main Street</aline>
|
||||
<city>Perfect City</city>
|
||||
<province>Dorado</province>
|
||||
<cntry>Neutral</cntry><postcode>999999</postcode>
|
||||
<phone>+55 555 555 5550</phone>
|
||||
<fax>+55 555 555 5555</fax>
|
||||
<email>jane@universe.com</email>
|
||||
<web>www.universe.com</web>
|
||||
</address>
|
||||
<bio><para>Jane Doe is the Empress of the Universe <bibref refloc="jd000"/>, a position to which she has always aspired.</para></bio>
|
||||
</author>
|
||||
<author><fname>Fred</fname><surname>Bloggs</surname>
|
||||
<jobtitle>Designer</jobtitle>
|
||||
<address><affil>Fred (The Shoe) Bloggs Ltd</affil>
|
||||
<aline>1 Shoe Lane</aline>
|
||||
<city>Perfect City</city>
|
||||
<province>Dorado</province>
|
||||
<cntry>Neutral</cntry><postcode>999999</postcode>
|
||||
<phone>+55 555 555 1122</phone>
|
||||
<fax>+55 555 555 1133</fax>
|
||||
<email>fred@shoebloggs.com</email>
|
||||
<web>www.shoebloggs.com</web></address>
|
||||
<bio><para>Fred has always wanted to create the perfect shoe for making footprints in the sand. Now with SGML and XML, he has been able to document his design.</para></bio>
|
||||
</author>
|
||||
<abstract>
|
||||
<para><keyword>ease</keyword><keyword>documentation</keyword>It's not easy being an Empress of the Universe (<a href="http://www.universe.com"/>), but with the right pair of shoes and the right documentation on how to make footprints in the sand of life, it's easier than it was. Since the introduction of <acronym.grp><acronym>SGML</acronym><expansion>Standard Generalized Markup Language</expansion></acronym.grp> and <acronym.grp><acronym>XML</acronym><expansion>Extensible Markup Language</expansion></acronym.grp> it is now possible to identify and manage the key bits of information on this process.</para>
|
||||
</abstract>
|
||||
</front>
|
||||
<body><section id="jd001"><title>Introduction</title>
|
||||
<para><keyword>documentation</keyword>Since its inception, the Universe has always had sand, now it has an Empress, a good shoe design, and <acronym>SGML</acronym> / <acronym>XML</acronym> documentation. The time is now ripe for making <highlight style="ital">footprints</highlight> in the sand.</para></section>
|
||||
<section id="jd002"><title>Footprints - truly a push technology</title><keyword>push</keyword>
|
||||
<para>One could safely say that making footprints is a push technology. This is even more true when the footprint maker is the Empress of the Universe. </para>
|
||||
<subsec1 id="jd003"><title>The sands of time</title><keyword>time</keyword>
|
||||
<para>The 1<super>st</super> think to remember about the Universe is the time/space continuum to which it conforms. This then confuses the sands of time to be something more like the sands of time/space continuum because if you wait on those sands long enough they may be somewhere else - not necessarily because of the time/space continuum but because the winds will <highlight style="ital">push</highlight> them down the beach.</para></subsec1>
|
||||
<subsec1 id="jd004"><title>Identifying the footprints</title>
|
||||
<para>In order to truly understand who has walked on the sands and left the footprints, it is important to identify the <keyword>characteristics</keyword>characteristics of the footprint. In the graphic <xref refloc="jd005" type="title"/>, we can see the footprints are large, well shaped, and evenly distributed from front to back and side to side.</para>
|
||||
<figure id="jd005"><title>Footprint in Sand</title><caption><para>Note the evenly distributed shape and indention</para></caption><graphic figname="footprint"/></figure>
|
||||
<para>This footprint begs the question, 'What kind of remarkable <keyword>shoe</keyword>shoe could make such a wonderful footprint?'</para>
|
||||
<table id="t1">
|
||||
<tgroup cols="2">
|
||||
<thead><row><entry>Shoe Type</entry><entry>Remarkability Rating</entry></row></thead>
|
||||
<tbody><row><entry>Acme Shoe</entry><entry>Unremarkable</entry></row>
|
||||
<row><entry>Budget Shoe</entry><entry>Not worth remarking on</entry></row>
|
||||
<row><entry>Super Duper Shoe</entry><entry>Absolutely Remarkable</entry></row></tbody>
|
||||
</tgroup></table></subsec1>
|
||||
<subsec1 id="jd006"><title>The Shoe What Made the Footprint</title>
|
||||
<para>The remarkable footprint is made by a combination of a terrific shoe worn on a fantastic foot propelled by a one-of-a-kind Empress. As can be seen in Figure <xref refloc="jd007" type="number"/>, the shoe is worthy of an Empress.</para>
|
||||
<figure id="jd007"><title>The Terrific Shoe</title><graphic figname="shoes"/></figure>
|
||||
<para>The design goals of the shoe were:
|
||||
<randlist style = "bulleted">
|
||||
<li><para>to minimize time-consuming manual tasks such as shoelace tying;</para></li>
|
||||
<li><para>to allow different decorations to be placed on the toes; and</para></li>
|
||||
<li><para>to enforce a good arch.</para></li></randlist></para></subsec1></section>
|
||||
<section id="jd008"><title>Documenting the Shoe</title>
|
||||
<para>Documenting the shoe was the best part for Fred Bloggs. His superior design could be captured for all time in a neutrally-encoded, content-specific manner. An excerpt from his DTD gives an insight into the type of information he captured in his documentation.</para>
|
||||
<code.block><!DOCTYPE shoedoc [
|
||||
<!ELEMENT shoedoc - - (design, mfg, care, recycle) >
|
||||
<!ATTLIST shoedoc designer CDATA #REQUIRED
|
||||
date CDATA #REQUIRED>
|
||||
<!ELEMENT design - - (specs, desc) >
|
||||
etc.
|
||||
</code.block>
|
||||
<para>An excerpt from the documentation also gives us insights.</para>
|
||||
<code.block><![CDATA[<design>
|
||||
<specs sizerange="4-12" widthrange="aa-d" color="navy black white red taupe">
|
||||
<para>The arch shall be high. The toe shall be narrow, but not pinch. The heel shall not come off in grates. Sand shall not get in.</para></specs>]]>
|
||||
</code.block>
|
||||
</section></body>
|
||||
<rear><acknowl>
|
||||
<para>The authors wish to express our thanks to the Universe for being there and to gravity for holding the sand down long enough to see the footprints.</para></acknowl>
|
||||
<bibliog>
|
||||
<bibitem id="jd000"><bib>Barrett 00</bib><pub>Barrett, B., Being Empress Made Easy, Galaxy Division of Universal Publishers. 0000</pub></bibitem></bibliog></rear></gcapaper>
|
||||
@@ -0,0 +1,13 @@
|
||||
<?xml version="1.0"?>
|
||||
<!DOCTYPE quotations [
|
||||
<!ELEMENT collection (quotation)*>
|
||||
|
||||
<!ELEMENT em (#PCDATA) >
|
||||
<!ELEMENT foreign (#PCDATA) >
|
||||
<!ELEMENT cite (#PCDATA) >
|
||||
<!ELEMENT author (#PCDATA)>
|
||||
<!ELEMENT source (#PCDATA|cite)*>
|
||||
|
||||
<!ELEMENT quotation (#PCDATA|author|source)* >
|
||||
]>
|
||||
<collection><quotation>We will perhaps eventually be writing only small modules which are identified by name as they are used to build larger ones, so that devices like indentation, rather than delimiters, might become feasible for expressing local structure in the source language. <source>Donald E. Knuth, "Structured Programming with goto Statements", Computing Surveys, Vol 6 No 4, Dec. 1974</source> </quotation> <quotation> The infinities aren't contagious except in that they often appear that way due to to their large size. <source>Tim Peters on the IEEE 754 floating point standard, 27 Apr 1998</source> </quotation> </collection>
|
||||
@@ -15,9 +15,9 @@ class TestComboBox(wxPanel):
|
||||
wxPoint(8, 10))
|
||||
|
||||
wxStaticText(self, -1, "Select one:", wxPoint(15, 50), wxSize(75, 18))
|
||||
wxComboBox(self, 50, "default value", wxPoint(80, 50), wxSize(95, 20),
|
||||
wxComboBox(self, 500, "default value", wxPoint(80, 50), wxSize(95, 20),
|
||||
sampleList, wxCB_DROPDOWN)
|
||||
EVT_COMBOBOX(self, 50, self.EvtComboBox)
|
||||
EVT_COMBOBOX(self, 500, self.EvtComboBox)
|
||||
|
||||
|
||||
def EvtComboBox(self, event):
|
||||
|
||||
@@ -25,6 +25,8 @@ class TestGrid(wxGrid):
|
||||
EVT_GRID_CELL_LCLICK(self, self.OnCellClick)
|
||||
EVT_GRID_LABEL_LCLICK(self, self.OnLabelClick)
|
||||
|
||||
self.SetEditInPlace(true)
|
||||
#print self.GetCells()
|
||||
|
||||
|
||||
def OnSelectCell(self, event):
|
||||
|
||||
@@ -48,6 +48,7 @@ class TestListCtrlPanel(wxPanel):
|
||||
|
||||
self.currentItem = 0
|
||||
EVT_LIST_ITEM_SELECTED(self, tID, self.OnItemSelected)
|
||||
EVT_LIST_DELETE_ITEM(self, tID, self.OnItemDelete)
|
||||
EVT_LEFT_DCLICK(self.list, self.OnDoubleClick)
|
||||
EVT_RIGHT_DOWN(self.list, self.OnRightDown)
|
||||
|
||||
@@ -68,6 +69,10 @@ class TestListCtrlPanel(wxPanel):
|
||||
self.currentItem = event.m_itemIndex
|
||||
self.log.WriteText("OnItemSelected: %s\n" % self.list.GetItemText(self.currentItem))
|
||||
|
||||
def OnItemDelete(self, event):
|
||||
self.log.WriteText("OnItemDelete\n")
|
||||
|
||||
|
||||
def OnDoubleClick(self, event):
|
||||
self.log.WriteText("OnDoubleClick item %s\n" % self.list.GetItemText(self.currentItem))
|
||||
|
||||
@@ -78,13 +83,16 @@ class TestListCtrlPanel(wxPanel):
|
||||
tPopupID1 = 0
|
||||
tPopupID2 = 1
|
||||
tPopupID3 = 2
|
||||
tPopupID4 = 3
|
||||
self.menu.Append(tPopupID1, "One")
|
||||
self.menu.Append(tPopupID2, "Two")
|
||||
self.menu.Append(tPopupID3, "Three")
|
||||
self.menu.Append(tPopupID4, "DeleteAllItems")
|
||||
EVT_MENU(self, tPopupID1, self.OnPopupOne)
|
||||
EVT_MENU(self, tPopupID2, self.OnPopupTwo)
|
||||
EVT_MENU(self, tPopupID3, self.OnPopupThree)
|
||||
self.PopupMenu(self.menu, self.x, self.y)
|
||||
EVT_MENU(self, tPopupID4, self.OnPopupFour)
|
||||
self.PopupMenu(self.menu, wxPoint(self.x, self.y))
|
||||
|
||||
def OnPopupOne(self, event):
|
||||
self.log.WriteText("Popup one\n")
|
||||
@@ -95,6 +103,9 @@ class TestListCtrlPanel(wxPanel):
|
||||
def OnPopupThree(self, event):
|
||||
self.log.WriteText("Popup three\n")
|
||||
|
||||
def OnPopupFour(self, event):
|
||||
self.list.DeleteAllItems()
|
||||
|
||||
def OnSize(self, event):
|
||||
w,h = self.GetClientSizeTuple()
|
||||
self.list.SetDimensions(0, 0, w, h)
|
||||
|
||||
@@ -12,6 +12,11 @@ class TestRadioButtons(wxPanel):
|
||||
'six', 'seven', 'eight']
|
||||
|
||||
rb = wxRadioBox(self, 30, "wxRadioBox", wxPoint(35, 30), wxDefaultSize,
|
||||
sampleList, 3, wxRA_SPECIFY_COLS)
|
||||
EVT_RADIOBOX(self, 30, self.EvtRadioBox)
|
||||
|
||||
|
||||
rb = wxRadioBox(self, 30, "wxRadioBox", wxPoint(35, 120), wxDefaultSize,
|
||||
sampleList, 3, wxRA_SPECIFY_COLS | wxNO_BORDER)
|
||||
EVT_RADIOBOX(self, 30, self.EvtRadioBox)
|
||||
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
|
||||
from wxPython.wx import *
|
||||
|
||||
import string
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
class TestTreeCtrlPanel(wxPanel):
|
||||
@@ -10,19 +12,23 @@ class TestTreeCtrlPanel(wxPanel):
|
||||
self.log = log
|
||||
tID = NewId()
|
||||
|
||||
self.tree = wxTreeCtrl(self, tID)
|
||||
root = self.tree.AddRoot("The Root Item")
|
||||
self.tree = wxTreeCtrl(self, tID, wxDefaultPosition, wxDefaultSize,
|
||||
wxTR_HAS_BUTTONS | wxTR_EDIT_LABELS)
|
||||
|
||||
self.root = self.tree.AddRoot("The Root Item")
|
||||
for x in range(15):
|
||||
child = self.tree.AppendItem(root, "Item %d" % x)
|
||||
child = self.tree.AppendItem(self.root, "Item %d" % x)
|
||||
for y in range(5):
|
||||
last = self.tree.AppendItem(child, "item %d-%s" % (x, chr(ord("a")+y)))
|
||||
for z in range(5):
|
||||
self.tree.AppendItem(last, "item %d-%s-%d" % (x, chr(ord("a")+y), z))
|
||||
|
||||
self.tree.Expand(root)
|
||||
self.tree.Expand(self.root)
|
||||
EVT_TREE_ITEM_EXPANDED (self, tID, self.OnItemExpanded)
|
||||
EVT_TREE_ITEM_COLLAPSED (self, tID, self.OnItemCollapsed)
|
||||
EVT_TREE_SEL_CHANGED (self, tID, self.OnSelChanged)
|
||||
EVT_TREE_BEGIN_LABEL_EDIT(self, tID, self.OnBeginEdit)
|
||||
EVT_TREE_END_LABEL_EDIT (self, tID, self.OnEndEdit)
|
||||
|
||||
EVT_LEFT_DCLICK(self.tree, self.OnLeftDClick)
|
||||
EVT_RIGHT_DOWN(self.tree, self.OnRightClick)
|
||||
@@ -37,7 +43,30 @@ class TestTreeCtrlPanel(wxPanel):
|
||||
def OnRightUp(self, event):
|
||||
(x,y) = event.Position();
|
||||
item = self.tree.HitTest(wxPoint(x,y))
|
||||
self.log.WriteText("OnRightUp: %s\n" % self.tree.GetItemText(item))
|
||||
self.log.WriteText("OnRightUp: %s (manually starting label edit)\n"
|
||||
% self.tree.GetItemText(item))
|
||||
self.tree.EditLabel(item)
|
||||
|
||||
|
||||
|
||||
def OnBeginEdit(self, event):
|
||||
self.log.WriteText("OnBeginEdit\n")
|
||||
# show how to prevent edit...
|
||||
if self.tree.GetItemText(event.GetItem()) == "The Root Item":
|
||||
wxBell()
|
||||
self.log.WriteText("You can't edit this one...\n")
|
||||
event.Veto()
|
||||
|
||||
def OnEndEdit(self, event):
|
||||
self.log.WriteText("OnEndEdit\n")
|
||||
# show how to reject edit, we'll not allow any digits
|
||||
for x in event.GetLabel():
|
||||
if x in string.digits:
|
||||
self.log.WriteText("You can't enter digits...\n")
|
||||
event.Veto()
|
||||
return
|
||||
|
||||
|
||||
|
||||
def OnLeftDClick(self, event):
|
||||
(x,y) = event.Position();
|
||||
@@ -59,8 +88,8 @@ class TestTreeCtrlPanel(wxPanel):
|
||||
self.log.WriteText("OnItemCollapsed: %s\n" % self.tree.GetItemText(item))
|
||||
|
||||
def OnSelChanged(self, event):
|
||||
item = event.GetItem()
|
||||
self.log.WriteText("OnSelChanged: %s\n" % self.tree.GetItemText(item))
|
||||
self.item = event.GetItem()
|
||||
self.log.WriteText("OnSelChanged: %s\n" % self.tree.GetItemText(self.item))
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
|
||||
Executable
+9
@@ -0,0 +1,9 @@
|
||||
|
||||
|
||||
cd %WXWIN%\utils\wxPython
|
||||
find . -name "*.py" > filelist
|
||||
find . -name "*.i" >> filelist
|
||||
find . -name "*.h" >> filelist
|
||||
find . -name "*.cpp" >> filelist
|
||||
|
||||
cat filelist | zip -r -u -@ xfer.zip
|
||||
@@ -7,6 +7,7 @@ wxPython/demo/bitmaps/*.gif
|
||||
wxPython/demo/bitmaps/*.png
|
||||
wxPython/demo/bitmaps/*.jpg
|
||||
wxPython/demo/README.txt
|
||||
wxPython/demo/*.xml
|
||||
|
||||
wxPython/lib/*.py
|
||||
wxPython/lib/*.txt
|
||||
|
||||
@@ -862,6 +862,18 @@ item: Install File
|
||||
Description=Demos
|
||||
Flags=0000000010000010
|
||||
end
|
||||
item: Install File
|
||||
Source=E:\Projects\wx\utils\wxPython\demo\README.txt
|
||||
Destination=%MAINDIR%\wxPython\demo
|
||||
Description=Demos
|
||||
Flags=0000000010000010
|
||||
end
|
||||
item: Install File
|
||||
Source=e:\Projects\wx\utils\wxPython\demo\*.xml
|
||||
Destination=%MAINDIR%\wxPython\demo
|
||||
Description=Demos
|
||||
Flags=0000000010000010
|
||||
end
|
||||
item: Install File
|
||||
Source=e:\Projects\wx\utils\wxPython\demo\bitmaps\*.bmp
|
||||
Destination=%MAINDIR%\wxPython\demo\bitmaps
|
||||
|
||||
Binary file not shown.
@@ -19,7 +19,7 @@ class wxScrolledMessageDialog(wxDialog):
|
||||
text.SetConstraints(Layoutf('t=t5#1;b=t5#2;l=l5#1;r=r5#1', (self,ok)))
|
||||
ok.SetConstraints(Layoutf('b=b5#1;x%w50#1;w!80;h!25', (self,)))
|
||||
self.SetAutoLayout(TRUE)
|
||||
|
||||
self.Layout()
|
||||
|
||||
|
||||
class wxMultipleChoiceDialog(wxDialog):
|
||||
@@ -47,6 +47,7 @@ class wxMultipleChoiceDialog(wxDialog):
|
||||
cancel.SetConstraints(Layoutf('b=b5#1;x%w75#1;w!80;h!25', (self,)))
|
||||
self.SetAutoLayout(TRUE)
|
||||
self.lst = lst
|
||||
self.Layout()
|
||||
|
||||
def OnSize(self, event):
|
||||
self.Layout()
|
||||
|
||||
@@ -55,6 +55,8 @@ class wxSizer:
|
||||
the Add method.
|
||||
"""
|
||||
for childinfo in widgets:
|
||||
if type(childinfo) != type(()):
|
||||
childinfo = (childinfo, )
|
||||
apply(self.Add, childinfo)
|
||||
|
||||
|
||||
|
||||
@@ -324,7 +324,7 @@ distclean: clobber
|
||||
# Custom rules and dependencies added for wxPython
|
||||
#
|
||||
|
||||
WXP_VERSION=2.1b1
|
||||
WXP_VERSION=2.1b2
|
||||
|
||||
SWIGFLAGS=-c++ -shadow -python -dnone -D__WXGTK__ $(SEPARATE)
|
||||
|
||||
|
||||
@@ -232,6 +232,7 @@ enum {
|
||||
wxTE_PROCESS_ENTER,
|
||||
wxTE_PASSWORD,
|
||||
wxTE_READONLY,
|
||||
wxTE_RICH,
|
||||
wxTE_MULTILINE,
|
||||
wxCB_SIMPLE,
|
||||
wxCB_DROPDOWN,
|
||||
@@ -264,6 +265,8 @@ enum {
|
||||
wxTR_HAS_BUTTONS,
|
||||
wxTR_EDIT_LABELS,
|
||||
wxTR_LINES_AT_ROOT,
|
||||
wxTR_MULTIPLE,
|
||||
wxTR_HAS_VARIABLE_ROW_HEIGHT,
|
||||
wxLC_ICON,
|
||||
wxLC_SMALL_ICON,
|
||||
wxLC_LIST,
|
||||
@@ -404,6 +407,9 @@ enum {
|
||||
wxPD_REMAINING_TIME,
|
||||
|
||||
wxNO_DEFAULT,
|
||||
wxMENU_TEAROFF,
|
||||
wxNO_FULL_REPAINT_ON_RESIZE,
|
||||
|
||||
};
|
||||
|
||||
|
||||
@@ -743,6 +749,9 @@ enum wxEventType {
|
||||
|
||||
/* Character input event type */
|
||||
wxEVT_CHAR,
|
||||
wxEVT_KEY_DOWN,
|
||||
wxEVT_KEY_UP,
|
||||
wxEVT_CHAR_HOOK,
|
||||
|
||||
/*
|
||||
* Scrollbar event identifiers
|
||||
@@ -773,8 +782,6 @@ enum wxEventType {
|
||||
wxEVT_QUERY_END_SESSION,
|
||||
wxEVT_ACTIVATE_APP,
|
||||
wxEVT_POWER,
|
||||
wxEVT_CHAR_HOOK,
|
||||
wxEVT_KEY_UP,
|
||||
wxEVT_ACTIVATE,
|
||||
wxEVT_CREATE,
|
||||
wxEVT_DESTROY,
|
||||
|
||||
@@ -95,6 +95,12 @@ def EVT_CHAR(win, func):
|
||||
def EVT_CHAR_HOOK(win, func):
|
||||
win.Connect(-1, -1, wxEVT_CHAR_HOOK, func)
|
||||
|
||||
def EVT_KEY_DOWN(win, func):
|
||||
win.Connect(-1, -1, wxEVT_KEY_DOWN, func)
|
||||
|
||||
def EVT_KEY_UP(win, func):
|
||||
win.Connect(-1, -1, wxEVT_KEY_UP, func)
|
||||
|
||||
def EVT_MENU_HIGHLIGHT(win, id, func):
|
||||
win.Connect(id, -1, wxEVT_MENU_HIGHLIGHT, func)
|
||||
|
||||
@@ -586,6 +592,38 @@ class wxAcceleratorTable(wxAcceleratorTablePtr):
|
||||
self.this = miscc.new_wxAcceleratorTable(arg0)
|
||||
self.thisown = 1
|
||||
|
||||
#----------------------------------------------------------------------
|
||||
# This helper function will take a wxPython object and convert it to
|
||||
# another wxPython object type. This will not be able to create objects
|
||||
# user that are derived from wxPython classes, only those that are
|
||||
# actually part of wxPython and directly corespond to C++ objects.
|
||||
#
|
||||
# This is useful in situations where some method returns a generic
|
||||
# type such as wxWindow, but you know that it is actually some
|
||||
# derived type such as a wxTextCtrl. You can't call wxTextCtrl specific
|
||||
# methods on a wxWindow object, but you can use this function to
|
||||
# create a wxTextCtrl object that will pass the same pointer to
|
||||
# the C++ code. You use it like this:
|
||||
#
|
||||
# textCtrl = wxPyTypeCast(window, "wxTextCtrl")
|
||||
#
|
||||
#
|
||||
# WARNING: Using this function to type cast objects into types that
|
||||
# they are not is not recommended and is likely to cause your
|
||||
# program to crash... Hard.
|
||||
#
|
||||
|
||||
def wxPyTypeCast(obj, typeStr):
|
||||
if hasattr(obj, "this"):
|
||||
newPtr = ptrcast(obj.this, typeStr+"_p")
|
||||
else:
|
||||
newPtr = ptrcast(obj, typeStr+"_p")
|
||||
theClass = globals()[typeStr+"Ptr"]
|
||||
theObj = theClass(newPtr)
|
||||
theObj.thisown = obj.thisown
|
||||
return theObj
|
||||
|
||||
|
||||
#----------------------------------------------------------------------
|
||||
|
||||
## class wxPyStdOutWindow:
|
||||
@@ -654,3 +692,10 @@ class wxApp(wxPyApp):
|
||||
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
# DO NOT hold any other references to this object. This is how we know when
|
||||
# to cleanup system resources that wxWin is holding...
|
||||
__cleanMeUp = __wxPyCleanup()
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
#include <wx/slider.h>
|
||||
#include <wx/spinbutt.h>
|
||||
#include <wx/dynarray.h>
|
||||
#include <wx/statline.h>
|
||||
|
||||
#ifdef __WXMSW__
|
||||
#if wxUSE_OWNER_DRAWN
|
||||
@@ -26,7 +27,6 @@
|
||||
|
||||
#ifdef __WXGTK__
|
||||
#include <wx/checklst.h>
|
||||
#include <wx/statline.h>
|
||||
#endif
|
||||
|
||||
%}
|
||||
@@ -55,7 +55,9 @@ wxValidator wxPyDefaultValidator; // Non-const default because of SWIG
|
||||
|
||||
class wxControl : public wxWindow {
|
||||
public:
|
||||
#ifdef __WXMSW__
|
||||
void Command(wxCommandEvent& event);
|
||||
#endif
|
||||
wxString GetLabel();
|
||||
void SetLabel(const wxString& label);
|
||||
};
|
||||
@@ -222,7 +224,7 @@ public:
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
#ifdef __WXGTK__
|
||||
|
||||
class wxStaticLine : public wxControl {
|
||||
public:
|
||||
wxStaticLine( wxWindow *parent, wxWindowID id,
|
||||
@@ -231,7 +233,7 @@ public:
|
||||
long style = wxLI_HORIZONTAL,
|
||||
const char* name = "staticLine" );
|
||||
};
|
||||
#endif
|
||||
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
@@ -424,6 +426,7 @@ public:
|
||||
|
||||
const wxBitmap& GetBitmap();
|
||||
void SetBitmap(const wxBitmap& bitmap);
|
||||
void SetIcon(const wxIcon& icon);
|
||||
};
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
@@ -521,7 +524,53 @@ public:
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// $Log$
|
||||
// Revision 1.16 1999/07/31 07:54:35 RD
|
||||
// wxPython 2.1b1:
|
||||
//
|
||||
// Added the missing wxWindow.GetUpdateRegion() method.
|
||||
//
|
||||
// Made a new change in SWIG (update your patches everybody) that
|
||||
// provides a fix for global shadow objects that get an exception in
|
||||
// their __del__ when their extension module has already been deleted.
|
||||
// It was only a 1 line change in .../SWIG/Modules/pycpp.cxx at about
|
||||
// line 496 if you want to do it by hand.
|
||||
//
|
||||
// It is now possible to run through MainLoop more than once in any one
|
||||
// process. The cleanup that used to happen as MainLoop completed (and
|
||||
// prevented it from running again) has been delayed until the wxc module
|
||||
// is being unloaded by Python.
|
||||
//
|
||||
// wxWindow.PopupMenu() now takes a wxPoint instead of x,y. Added
|
||||
// wxWindow.PopupMenuXY to be consistent with some other methods.
|
||||
//
|
||||
// Added wxGrid.SetEditInPlace and wxGrid.GetEditInPlace.
|
||||
//
|
||||
// You can now provide your own app.MainLoop method. See
|
||||
// wxPython/demo/demoMainLoop.py for an example and some explaination.
|
||||
//
|
||||
// Got the in-place-edit for the wxTreeCtrl fixed and added some demo
|
||||
// code to show how to use it.
|
||||
//
|
||||
// Put the wxIcon constructor back in for GTK as it now has one that
|
||||
// matches MSW's.
|
||||
//
|
||||
// Added wxGrid.GetCells
|
||||
//
|
||||
// Added wxSystemSettings static methods as functions with names like
|
||||
// wxSystemSettings_GetSystemColour.
|
||||
//
|
||||
// Removed wxPyMenu since using menu callbacks have been depreciated in
|
||||
// wxWindows. Use wxMenu and events instead.
|
||||
//
|
||||
// Added alternate wxBitmap constructor (for MSW only) as
|
||||
// wxBitmapFromData(data, type, width, height, depth = 1)
|
||||
//
|
||||
// Added a helper function named wxPyTypeCast that can convert shadow
|
||||
// objects of one type into shadow objects of another type. (Like doing
|
||||
// a down-cast.) See the implementation in wx.py for some docs.
|
||||
//
|
||||
// Revision 1.15 1999/06/22 17:45:18 RD
|
||||
//
|
||||
// wxPython 2.1b1: Very minor changes needed for wxGTK
|
||||
//
|
||||
// Revision 1.14 1999/06/22 07:03:02 RD
|
||||
|
||||
@@ -143,6 +143,8 @@ public:
|
||||
wxTextCtrl* EditLabel(long item);
|
||||
bool EndEditLabel(bool cancel);
|
||||
wxTextCtrl* GetEditControl();
|
||||
#else
|
||||
void EditLabel(long item);
|
||||
#endif
|
||||
bool EnsureVisible(long item);
|
||||
long FindItem(long start, const wxString& str, bool partial = FALSE);
|
||||
@@ -284,13 +286,13 @@ public:
|
||||
|
||||
|
||||
|
||||
class wxTreeEvent : public wxCommandEvent {
|
||||
class wxTreeEvent : public wxNotifyEvent {
|
||||
public:
|
||||
wxTreeItemId GetItem();
|
||||
wxTreeItemId GetOldItem();
|
||||
wxPoint GetPoint();
|
||||
int GetCode();
|
||||
void Veto();
|
||||
const wxString& GetLabel();
|
||||
};
|
||||
|
||||
|
||||
@@ -412,15 +414,17 @@ public:
|
||||
void Toggle(const wxTreeItemId& item);
|
||||
|
||||
void Unselect();
|
||||
void UnselectAll();
|
||||
void SelectItem(const wxTreeItemId& item);
|
||||
void EnsureVisible(const wxTreeItemId& item);
|
||||
void ScrollTo(const wxTreeItemId& item);
|
||||
|
||||
#ifdef __WXMSW__
|
||||
wxTextCtrl* EditLabel(const wxTreeItemId& item);
|
||||
// **** figure out how to do this
|
||||
// wxClassInfo* textCtrlClass = CLASSINFO(wxTextCtrl));
|
||||
wxTextCtrl* GetEditControl();
|
||||
void EndEditLabel(const wxTreeItemId& item, bool discardChanges = FALSE);
|
||||
#else
|
||||
void EditLabel(const wxTreeItemId& item);
|
||||
#endif
|
||||
|
||||
// void SortChildren(const wxTreeItemId& item);
|
||||
// **** And this too
|
||||
|
||||
@@ -61,6 +61,11 @@ public:
|
||||
%new wxBitmap* wxEmptyBitmap(int width, int height, int depth=-1);
|
||||
wxBitmap* wxNoRefBitmap(char* name, long flags);
|
||||
|
||||
#ifdef __WXMSW__
|
||||
%new wxBitmap* wxBitmapFromData(char* data, long type,
|
||||
int width, int height, int depth = 1);
|
||||
#endif
|
||||
|
||||
%{ // Alternate 'constructor'
|
||||
wxBitmap* wxEmptyBitmap(int width, int height, int depth=-1) {
|
||||
return new wxBitmap(width, height, depth);
|
||||
@@ -73,6 +78,13 @@ wxBitmap* wxNoRefBitmap(char* name, long flags);
|
||||
wxBitmap* wxNoRefBitmap(char* name, long flags) {
|
||||
return new wxBitmap(name, flags);
|
||||
}
|
||||
|
||||
#ifdef __WXMSW__
|
||||
wxBitmap* wxBitmapFromData(char* data, long type,
|
||||
int width, int height, int depth = 1) {
|
||||
return new wxBitmap((void*)data, type, width, height, depth);
|
||||
}
|
||||
#endif
|
||||
%}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
@@ -96,10 +108,8 @@ public:
|
||||
|
||||
class wxIcon : public wxBitmap {
|
||||
public:
|
||||
#ifdef __WXMSW__
|
||||
wxIcon(const wxString& name, long flags,
|
||||
int desiredWidth = -1, int desiredHeight = -1);
|
||||
#endif
|
||||
~wxIcon();
|
||||
|
||||
int GetDepth();
|
||||
@@ -112,6 +122,7 @@ public:
|
||||
void SetWidth(int width);
|
||||
};
|
||||
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
class wxCursor : public wxBitmap {
|
||||
@@ -348,8 +359,10 @@ public:
|
||||
void DrawBitmap(wxBitmap& bitmap, long x, long y, bool swapPalette=TRUE) {
|
||||
wxMemoryDC* memDC = new wxMemoryDC;
|
||||
memDC->SelectObject(bitmap);
|
||||
#ifdef __WXMSW__
|
||||
if (swapPalette)
|
||||
self->SetPalette(*bitmap.GetPalette());
|
||||
#endif
|
||||
self->Blit(x, y, bitmap.GetWidth(), bitmap.GetHeight(), memDC,
|
||||
0, 0, self->GetLogicalFunction());
|
||||
memDC->SelectObject(wxNullBitmap);
|
||||
|
||||
@@ -2516,7 +2516,6 @@ SWIGEXPORT(void,initcmndlgsc)() {
|
||||
SWIG_RegisterMapping("_wxCursor","_class_wxCursor",0);
|
||||
SWIG_RegisterMapping("_wxNotifyEvent","_class_wxNotifyEvent",0);
|
||||
SWIG_RegisterMapping("_wxMask","_class_wxMask",0);
|
||||
SWIG_RegisterMapping("_wxPyMenu","_class_wxPyMenu",0);
|
||||
SWIG_RegisterMapping("_class_wxColourData","_wxColourData",0);
|
||||
SWIG_RegisterMapping("_wxPen","_class_wxPen",0);
|
||||
SWIG_RegisterMapping("_wxUpdateUIEvent","_class_wxUpdateUIEvent",0);
|
||||
@@ -2743,7 +2742,6 @@ SWIGEXPORT(void,initcmndlgsc)() {
|
||||
SWIG_RegisterMapping("_wxDialog","_class_wxColourDialog",SwigwxColourDialogTowxDialog);
|
||||
SWIG_RegisterMapping("_wxDialog","_wxColourDialog",SwigwxColourDialogTowxDialog);
|
||||
SWIG_RegisterMapping("_wxDialog","_class_wxDialog",0);
|
||||
SWIG_RegisterMapping("_class_wxPyMenu","_wxPyMenu",0);
|
||||
SWIG_RegisterMapping("_class_wxPen","_wxPen",0);
|
||||
SWIG_RegisterMapping("_class_wxFileDialog","_wxFileDialog",0);
|
||||
SWIG_RegisterMapping("_short","_WXTYPE",0);
|
||||
|
||||
@@ -19,7 +19,7 @@ class wxColourDataPtr :
|
||||
def __init__(self,this):
|
||||
self.this = this
|
||||
self.thisown = 0
|
||||
def __del__(self):
|
||||
def __del__(self, cmndlgsc=cmndlgsc):
|
||||
if self.thisown == 1 :
|
||||
cmndlgsc.delete_wxColourData(self.this)
|
||||
def GetChooseFull(self):
|
||||
@@ -243,7 +243,7 @@ class wxFontDataPtr :
|
||||
def __init__(self,this):
|
||||
self.this = this
|
||||
self.thisown = 0
|
||||
def __del__(self):
|
||||
def __del__(self, cmndlgsc=cmndlgsc):
|
||||
if self.thisown == 1 :
|
||||
cmndlgsc.delete_wxFontData(self.this)
|
||||
def EnableEffects(self,arg0):
|
||||
|
||||
@@ -57,6 +57,7 @@ extern PyObject *SWIG_newvarlink(void);
|
||||
#include <wx/slider.h>
|
||||
#include <wx/spinbutt.h>
|
||||
#include <wx/dynarray.h>
|
||||
#include <wx/statline.h>
|
||||
|
||||
#ifdef __WXMSW__
|
||||
#if wxUSE_OWNER_DRAWN
|
||||
@@ -66,7 +67,6 @@ extern PyObject *SWIG_newvarlink(void);
|
||||
|
||||
#ifdef __WXGTK__
|
||||
#include <wx/checklst.h>
|
||||
#include <wx/statline.h>
|
||||
#endif
|
||||
|
||||
|
||||
@@ -147,39 +147,6 @@ static void *SwigwxControlTowxEvtHandler(void *ptr) {
|
||||
return (void *) dest;
|
||||
}
|
||||
|
||||
#define wxControl_Command(_swigobj,_swigarg0) (_swigobj->Command(_swigarg0))
|
||||
static PyObject *_wrap_wxControl_Command(PyObject *self, PyObject *args) {
|
||||
PyObject * _resultobj;
|
||||
wxControl * _arg0;
|
||||
wxCommandEvent * _arg1;
|
||||
char * _argc0 = 0;
|
||||
char * _argc1 = 0;
|
||||
|
||||
self = self;
|
||||
if(!PyArg_ParseTuple(args,"ss:wxControl_Command",&_argc0,&_argc1))
|
||||
return NULL;
|
||||
if (_argc0) {
|
||||
if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxControl_p")) {
|
||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxControl_Command. Expected _wxControl_p.");
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
if (_argc1) {
|
||||
if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_wxCommandEvent_p")) {
|
||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxControl_Command. Expected _wxCommandEvent_p.");
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
{
|
||||
wxPy_BEGIN_ALLOW_THREADS;
|
||||
wxControl_Command(_arg0,*_arg1);
|
||||
|
||||
wxPy_END_ALLOW_THREADS;
|
||||
} Py_INCREF(Py_None);
|
||||
_resultobj = Py_None;
|
||||
return _resultobj;
|
||||
}
|
||||
|
||||
#define wxControl_GetLabel(_swigobj) (_swigobj->GetLabel())
|
||||
static PyObject *_wrap_wxControl_GetLabel(PyObject *self, PyObject *args) {
|
||||
PyObject * _resultobj;
|
||||
@@ -4994,6 +4961,39 @@ static PyObject *_wrap_wxStaticBitmap_SetBitmap(PyObject *self, PyObject *args)
|
||||
return _resultobj;
|
||||
}
|
||||
|
||||
#define wxStaticBitmap_SetIcon(_swigobj,_swigarg0) (_swigobj->SetIcon(_swigarg0))
|
||||
static PyObject *_wrap_wxStaticBitmap_SetIcon(PyObject *self, PyObject *args) {
|
||||
PyObject * _resultobj;
|
||||
wxStaticBitmap * _arg0;
|
||||
wxIcon * _arg1;
|
||||
char * _argc0 = 0;
|
||||
char * _argc1 = 0;
|
||||
|
||||
self = self;
|
||||
if(!PyArg_ParseTuple(args,"ss:wxStaticBitmap_SetIcon",&_argc0,&_argc1))
|
||||
return NULL;
|
||||
if (_argc0) {
|
||||
if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxStaticBitmap_p")) {
|
||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStaticBitmap_SetIcon. Expected _wxStaticBitmap_p.");
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
if (_argc1) {
|
||||
if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_wxIcon_p")) {
|
||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxStaticBitmap_SetIcon. Expected _wxIcon_p.");
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
{
|
||||
wxPy_BEGIN_ALLOW_THREADS;
|
||||
wxStaticBitmap_SetIcon(_arg0,*_arg1);
|
||||
|
||||
wxPy_END_ALLOW_THREADS;
|
||||
} Py_INCREF(Py_None);
|
||||
_resultobj = Py_None;
|
||||
return _resultobj;
|
||||
}
|
||||
|
||||
static void *SwigwxRadioBoxTowxControl(void *ptr) {
|
||||
wxRadioBox *src;
|
||||
wxControl *dest;
|
||||
@@ -6253,6 +6253,7 @@ static PyMethodDef controlscMethods[] = {
|
||||
{ "wxRadioBox_EnableItem", _wrap_wxRadioBox_EnableItem, 1 },
|
||||
{ "wxRadioBox_Enable", _wrap_wxRadioBox_Enable, 1 },
|
||||
{ "new_wxRadioBox", _wrap_new_wxRadioBox, 1 },
|
||||
{ "wxStaticBitmap_SetIcon", _wrap_wxStaticBitmap_SetIcon, 1 },
|
||||
{ "wxStaticBitmap_SetBitmap", _wrap_wxStaticBitmap_SetBitmap, 1 },
|
||||
{ "wxStaticBitmap_GetBitmap", _wrap_wxStaticBitmap_GetBitmap, 1 },
|
||||
{ "new_wxStaticBitmap", _wrap_new_wxStaticBitmap, 1 },
|
||||
@@ -6388,7 +6389,6 @@ static PyMethodDef controlscMethods[] = {
|
||||
{ "new_wxButton", _wrap_new_wxButton, 1 },
|
||||
{ "wxControl_SetLabel", _wrap_wxControl_SetLabel, 1 },
|
||||
{ "wxControl_GetLabel", _wrap_wxControl_GetLabel, 1 },
|
||||
{ "wxControl_Command", _wrap_wxControl_Command, 1 },
|
||||
{ NULL, NULL }
|
||||
};
|
||||
static PyObject *SWIG_globals;
|
||||
@@ -6462,7 +6462,6 @@ SWIGEXPORT(void,initcontrolsc)() {
|
||||
SWIG_RegisterMapping("_wxCursor","_class_wxCursor",0);
|
||||
SWIG_RegisterMapping("_wxNotifyEvent","_class_wxNotifyEvent",0);
|
||||
SWIG_RegisterMapping("_wxMask","_class_wxMask",0);
|
||||
SWIG_RegisterMapping("_wxPyMenu","_class_wxPyMenu",0);
|
||||
SWIG_RegisterMapping("_wxPen","_class_wxPen",0);
|
||||
SWIG_RegisterMapping("_wxUpdateUIEvent","_class_wxUpdateUIEvent",0);
|
||||
SWIG_RegisterMapping("_byte","_unsigned_char",0);
|
||||
@@ -6680,7 +6679,6 @@ SWIGEXPORT(void,initcontrolsc)() {
|
||||
SWIG_RegisterMapping("_unsigned_int","_int",0);
|
||||
SWIG_RegisterMapping("_wxIcon","_class_wxIcon",0);
|
||||
SWIG_RegisterMapping("_wxDialog","_class_wxDialog",0);
|
||||
SWIG_RegisterMapping("_class_wxPyMenu","_wxPyMenu",0);
|
||||
SWIG_RegisterMapping("_class_wxPen","_wxPen",0);
|
||||
SWIG_RegisterMapping("_short","_WXTYPE",0);
|
||||
SWIG_RegisterMapping("_short","_unsigned_short",0);
|
||||
|
||||
@@ -13,9 +13,6 @@ class wxControlPtr(wxWindowPtr):
|
||||
def __init__(self,this):
|
||||
self.this = this
|
||||
self.thisown = 0
|
||||
def Command(self,arg0):
|
||||
val = controlsc.wxControl_Command(self.this,arg0.this)
|
||||
return val
|
||||
def GetLabel(self):
|
||||
val = controlsc.wxControl_GetLabel(self.this)
|
||||
return val
|
||||
@@ -685,6 +682,9 @@ class wxStaticBitmapPtr(wxControlPtr):
|
||||
def SetBitmap(self,arg0):
|
||||
val = controlsc.wxStaticBitmap_SetBitmap(self.this,arg0.this)
|
||||
return val
|
||||
def SetIcon(self,arg0):
|
||||
val = controlsc.wxStaticBitmap_SetIcon(self.this,arg0.this)
|
||||
return val
|
||||
def __repr__(self):
|
||||
return "<C wxStaticBitmap instance>"
|
||||
class wxStaticBitmap(wxStaticBitmapPtr):
|
||||
|
||||
@@ -1349,6 +1349,32 @@ static PyObject *_wrap_wxListCtrl_ClearAll(PyObject *self, PyObject *args) {
|
||||
return _resultobj;
|
||||
}
|
||||
|
||||
#define wxListCtrl_EditLabel(_swigobj,_swigarg0) (_swigobj->EditLabel(_swigarg0))
|
||||
static PyObject *_wrap_wxListCtrl_EditLabel(PyObject *self, PyObject *args) {
|
||||
PyObject * _resultobj;
|
||||
wxListCtrl * _arg0;
|
||||
long _arg1;
|
||||
char * _argc0 = 0;
|
||||
|
||||
self = self;
|
||||
if(!PyArg_ParseTuple(args,"sl:wxListCtrl_EditLabel",&_argc0,&_arg1))
|
||||
return NULL;
|
||||
if (_argc0) {
|
||||
if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxListCtrl_p")) {
|
||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListCtrl_EditLabel. Expected _wxListCtrl_p.");
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
{
|
||||
wxPy_BEGIN_ALLOW_THREADS;
|
||||
wxListCtrl_EditLabel(_arg0,_arg1);
|
||||
|
||||
wxPy_END_ALLOW_THREADS;
|
||||
} Py_INCREF(Py_None);
|
||||
_resultobj = Py_None;
|
||||
return _resultobj;
|
||||
}
|
||||
|
||||
#define wxListCtrl_EnsureVisible(_swigobj,_swigarg0) (_swigobj->EnsureVisible(_swigarg0))
|
||||
static PyObject *_wrap_wxListCtrl_EnsureVisible(PyObject *self, PyObject *args) {
|
||||
PyObject * _resultobj;
|
||||
@@ -2814,6 +2840,14 @@ static PyObject *_wrap_wxTreeItemData_SetId(PyObject *self, PyObject *args) {
|
||||
return _resultobj;
|
||||
}
|
||||
|
||||
static void *SwigwxTreeEventTowxNotifyEvent(void *ptr) {
|
||||
wxTreeEvent *src;
|
||||
wxNotifyEvent *dest;
|
||||
src = (wxTreeEvent *) ptr;
|
||||
dest = (wxNotifyEvent *) src;
|
||||
return (void *) dest;
|
||||
}
|
||||
|
||||
static void *SwigwxTreeEventTowxCommandEvent(void *ptr) {
|
||||
wxTreeEvent *src;
|
||||
wxCommandEvent *dest;
|
||||
@@ -2936,28 +2970,31 @@ static PyObject *_wrap_wxTreeEvent_GetCode(PyObject *self, PyObject *args) {
|
||||
return _resultobj;
|
||||
}
|
||||
|
||||
#define wxTreeEvent_Veto(_swigobj) (_swigobj->Veto())
|
||||
static PyObject *_wrap_wxTreeEvent_Veto(PyObject *self, PyObject *args) {
|
||||
#define wxTreeEvent_GetLabel(_swigobj) (_swigobj->GetLabel())
|
||||
static PyObject *_wrap_wxTreeEvent_GetLabel(PyObject *self, PyObject *args) {
|
||||
PyObject * _resultobj;
|
||||
wxString * _result;
|
||||
wxTreeEvent * _arg0;
|
||||
char * _argc0 = 0;
|
||||
|
||||
self = self;
|
||||
if(!PyArg_ParseTuple(args,"s:wxTreeEvent_Veto",&_argc0))
|
||||
if(!PyArg_ParseTuple(args,"s:wxTreeEvent_GetLabel",&_argc0))
|
||||
return NULL;
|
||||
if (_argc0) {
|
||||
if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxTreeEvent_p")) {
|
||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeEvent_Veto. Expected _wxTreeEvent_p.");
|
||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeEvent_GetLabel. Expected _wxTreeEvent_p.");
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
{
|
||||
wxPy_BEGIN_ALLOW_THREADS;
|
||||
wxTreeEvent_Veto(_arg0);
|
||||
const wxString & _result_ref = wxTreeEvent_GetLabel(_arg0);
|
||||
_result = (wxString *) &_result_ref;
|
||||
|
||||
wxPy_END_ALLOW_THREADS;
|
||||
} Py_INCREF(Py_None);
|
||||
_resultobj = Py_None;
|
||||
}{
|
||||
_resultobj = PyString_FromString(WXSTRINGCAST (*_result));
|
||||
}
|
||||
return _resultobj;
|
||||
}
|
||||
|
||||
@@ -4659,6 +4696,31 @@ static PyObject *_wrap_wxTreeCtrl_Unselect(PyObject *self, PyObject *args) {
|
||||
return _resultobj;
|
||||
}
|
||||
|
||||
#define wxTreeCtrl_UnselectAll(_swigobj) (_swigobj->UnselectAll())
|
||||
static PyObject *_wrap_wxTreeCtrl_UnselectAll(PyObject *self, PyObject *args) {
|
||||
PyObject * _resultobj;
|
||||
wxTreeCtrl * _arg0;
|
||||
char * _argc0 = 0;
|
||||
|
||||
self = self;
|
||||
if(!PyArg_ParseTuple(args,"s:wxTreeCtrl_UnselectAll",&_argc0))
|
||||
return NULL;
|
||||
if (_argc0) {
|
||||
if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxTreeCtrl_p")) {
|
||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_UnselectAll. Expected _wxTreeCtrl_p.");
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
{
|
||||
wxPy_BEGIN_ALLOW_THREADS;
|
||||
wxTreeCtrl_UnselectAll(_arg0);
|
||||
|
||||
wxPy_END_ALLOW_THREADS;
|
||||
} Py_INCREF(Py_None);
|
||||
_resultobj = Py_None;
|
||||
return _resultobj;
|
||||
}
|
||||
|
||||
#define wxTreeCtrl_SelectItem(_swigobj,_swigarg0) (_swigobj->SelectItem(_swigarg0))
|
||||
static PyObject *_wrap_wxTreeCtrl_SelectItem(PyObject *self, PyObject *args) {
|
||||
PyObject * _resultobj;
|
||||
@@ -4761,12 +4823,10 @@ static PyObject *_wrap_wxTreeCtrl_ScrollTo(PyObject *self, PyObject *args) {
|
||||
#define wxTreeCtrl_EditLabel(_swigobj,_swigarg0) (_swigobj->EditLabel(_swigarg0))
|
||||
static PyObject *_wrap_wxTreeCtrl_EditLabel(PyObject *self, PyObject *args) {
|
||||
PyObject * _resultobj;
|
||||
wxTextCtrl * _result;
|
||||
wxTreeCtrl * _arg0;
|
||||
wxTreeItemId * _arg1;
|
||||
char * _argc0 = 0;
|
||||
char * _argc1 = 0;
|
||||
char _ptemp[128];
|
||||
|
||||
self = self;
|
||||
if(!PyArg_ParseTuple(args,"ss:wxTreeCtrl_EditLabel",&_argc0,&_argc1))
|
||||
@@ -4785,70 +4845,7 @@ static PyObject *_wrap_wxTreeCtrl_EditLabel(PyObject *self, PyObject *args) {
|
||||
}
|
||||
{
|
||||
wxPy_BEGIN_ALLOW_THREADS;
|
||||
_result = (wxTextCtrl *)wxTreeCtrl_EditLabel(_arg0,*_arg1);
|
||||
|
||||
wxPy_END_ALLOW_THREADS;
|
||||
} SWIG_MakePtr(_ptemp, (char *) _result,"_wxTextCtrl_p");
|
||||
_resultobj = Py_BuildValue("s",_ptemp);
|
||||
return _resultobj;
|
||||
}
|
||||
|
||||
#define wxTreeCtrl_GetEditControl(_swigobj) (_swigobj->GetEditControl())
|
||||
static PyObject *_wrap_wxTreeCtrl_GetEditControl(PyObject *self, PyObject *args) {
|
||||
PyObject * _resultobj;
|
||||
wxTextCtrl * _result;
|
||||
wxTreeCtrl * _arg0;
|
||||
char * _argc0 = 0;
|
||||
char _ptemp[128];
|
||||
|
||||
self = self;
|
||||
if(!PyArg_ParseTuple(args,"s:wxTreeCtrl_GetEditControl",&_argc0))
|
||||
return NULL;
|
||||
if (_argc0) {
|
||||
if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxTreeCtrl_p")) {
|
||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_GetEditControl. Expected _wxTreeCtrl_p.");
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
{
|
||||
wxPy_BEGIN_ALLOW_THREADS;
|
||||
_result = (wxTextCtrl *)wxTreeCtrl_GetEditControl(_arg0);
|
||||
|
||||
wxPy_END_ALLOW_THREADS;
|
||||
} SWIG_MakePtr(_ptemp, (char *) _result,"_wxTextCtrl_p");
|
||||
_resultobj = Py_BuildValue("s",_ptemp);
|
||||
return _resultobj;
|
||||
}
|
||||
|
||||
#define wxTreeCtrl_EndEditLabel(_swigobj,_swigarg0,_swigarg1) (_swigobj->EndEditLabel(_swigarg0,_swigarg1))
|
||||
static PyObject *_wrap_wxTreeCtrl_EndEditLabel(PyObject *self, PyObject *args) {
|
||||
PyObject * _resultobj;
|
||||
wxTreeCtrl * _arg0;
|
||||
wxTreeItemId * _arg1;
|
||||
bool _arg2 = (0);
|
||||
char * _argc0 = 0;
|
||||
char * _argc1 = 0;
|
||||
int tempbool2;
|
||||
|
||||
self = self;
|
||||
if(!PyArg_ParseTuple(args,"ss|i:wxTreeCtrl_EndEditLabel",&_argc0,&_argc1,&tempbool2))
|
||||
return NULL;
|
||||
if (_argc0) {
|
||||
if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxTreeCtrl_p")) {
|
||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_EndEditLabel. Expected _wxTreeCtrl_p.");
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
if (_argc1) {
|
||||
if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_wxTreeItemId_p")) {
|
||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxTreeCtrl_EndEditLabel. Expected _wxTreeItemId_p.");
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
_arg2 = (bool ) tempbool2;
|
||||
{
|
||||
wxPy_BEGIN_ALLOW_THREADS;
|
||||
wxTreeCtrl_EndEditLabel(_arg0,*_arg1,_arg2);
|
||||
wxTreeCtrl_EditLabel(_arg0,*_arg1);
|
||||
|
||||
wxPy_END_ALLOW_THREADS;
|
||||
} Py_INCREF(Py_None);
|
||||
@@ -4964,12 +4961,11 @@ static PyMethodDef controls2cMethods[] = {
|
||||
{ "wxTreeCtrl_HitTest", _wrap_wxTreeCtrl_HitTest, 1 },
|
||||
{ "wxTreeCtrl_IsBold", _wrap_wxTreeCtrl_IsBold, 1 },
|
||||
{ "wxTreeCtrl_SetItemBold", _wrap_wxTreeCtrl_SetItemBold, 1 },
|
||||
{ "wxTreeCtrl_EndEditLabel", _wrap_wxTreeCtrl_EndEditLabel, 1 },
|
||||
{ "wxTreeCtrl_GetEditControl", _wrap_wxTreeCtrl_GetEditControl, 1 },
|
||||
{ "wxTreeCtrl_EditLabel", _wrap_wxTreeCtrl_EditLabel, 1 },
|
||||
{ "wxTreeCtrl_ScrollTo", _wrap_wxTreeCtrl_ScrollTo, 1 },
|
||||
{ "wxTreeCtrl_EnsureVisible", _wrap_wxTreeCtrl_EnsureVisible, 1 },
|
||||
{ "wxTreeCtrl_SelectItem", _wrap_wxTreeCtrl_SelectItem, 1 },
|
||||
{ "wxTreeCtrl_UnselectAll", _wrap_wxTreeCtrl_UnselectAll, 1 },
|
||||
{ "wxTreeCtrl_Unselect", _wrap_wxTreeCtrl_Unselect, 1 },
|
||||
{ "wxTreeCtrl_Toggle", _wrap_wxTreeCtrl_Toggle, 1 },
|
||||
{ "wxTreeCtrl_CollapseAndReset", _wrap_wxTreeCtrl_CollapseAndReset, 1 },
|
||||
@@ -5016,7 +5012,7 @@ static PyMethodDef controls2cMethods[] = {
|
||||
{ "wxTreeCtrl_GetIndent", _wrap_wxTreeCtrl_GetIndent, 1 },
|
||||
{ "wxTreeCtrl_GetCount", _wrap_wxTreeCtrl_GetCount, 1 },
|
||||
{ "new_wxTreeCtrl", _wrap_new_wxTreeCtrl, 1 },
|
||||
{ "wxTreeEvent_Veto", _wrap_wxTreeEvent_Veto, 1 },
|
||||
{ "wxTreeEvent_GetLabel", _wrap_wxTreeEvent_GetLabel, 1 },
|
||||
{ "wxTreeEvent_GetCode", _wrap_wxTreeEvent_GetCode, 1 },
|
||||
{ "wxTreeEvent_GetPoint", _wrap_wxTreeEvent_GetPoint, 1 },
|
||||
{ "wxTreeEvent_GetOldItem", _wrap_wxTreeEvent_GetOldItem, 1 },
|
||||
@@ -5069,6 +5065,7 @@ static PyMethodDef controls2cMethods[] = {
|
||||
{ "wxListCtrl_FindItemData", _wrap_wxListCtrl_FindItemData, 1 },
|
||||
{ "wxListCtrl_FindItem", _wrap_wxListCtrl_FindItem, 1 },
|
||||
{ "wxListCtrl_EnsureVisible", _wrap_wxListCtrl_EnsureVisible, 1 },
|
||||
{ "wxListCtrl_EditLabel", _wrap_wxListCtrl_EditLabel, 1 },
|
||||
{ "wxListCtrl_ClearAll", _wrap_wxListCtrl_ClearAll, 1 },
|
||||
{ "wxListCtrl_DeleteAllColumns", _wrap_wxListCtrl_DeleteAllColumns, 1 },
|
||||
{ "wxListCtrl_DeleteColumn", _wrap_wxListCtrl_DeleteColumn, 1 },
|
||||
@@ -5197,10 +5194,11 @@ SWIGEXPORT(void,initcontrols2c)() {
|
||||
SWIG_RegisterMapping("_wxPaintEvent","_class_wxPaintEvent",0);
|
||||
SWIG_RegisterMapping("_wxIndividualLayoutConstraint","_class_wxIndividualLayoutConstraint",0);
|
||||
SWIG_RegisterMapping("_wxCursor","_class_wxCursor",0);
|
||||
SWIG_RegisterMapping("_wxNotifyEvent","_class_wxTreeEvent",SwigwxTreeEventTowxNotifyEvent);
|
||||
SWIG_RegisterMapping("_wxNotifyEvent","_wxTreeEvent",SwigwxTreeEventTowxNotifyEvent);
|
||||
SWIG_RegisterMapping("_wxNotifyEvent","_class_wxNotifyEvent",0);
|
||||
SWIG_RegisterMapping("_class_wxTreeCtrl","_wxTreeCtrl",0);
|
||||
SWIG_RegisterMapping("_wxMask","_class_wxMask",0);
|
||||
SWIG_RegisterMapping("_wxPyMenu","_class_wxPyMenu",0);
|
||||
SWIG_RegisterMapping("_wxPen","_class_wxPen",0);
|
||||
SWIG_RegisterMapping("_wxUpdateUIEvent","_class_wxUpdateUIEvent",0);
|
||||
SWIG_RegisterMapping("_byte","_unsigned_char",0);
|
||||
@@ -5269,6 +5267,8 @@ SWIGEXPORT(void,initcontrols2c)() {
|
||||
SWIG_RegisterMapping("_wxScrollBar","_class_wxScrollBar",0);
|
||||
SWIG_RegisterMapping("_wxSpinButton","_class_wxSpinButton",0);
|
||||
SWIG_RegisterMapping("_class_wxIndividualLayoutConstraint","_wxIndividualLayoutConstraint",0);
|
||||
SWIG_RegisterMapping("_class_wxNotifyEvent","_class_wxTreeEvent",SwigwxTreeEventTowxNotifyEvent);
|
||||
SWIG_RegisterMapping("_class_wxNotifyEvent","_wxTreeEvent",SwigwxTreeEventTowxNotifyEvent);
|
||||
SWIG_RegisterMapping("_class_wxNotifyEvent","_wxNotifyEvent",0);
|
||||
SWIG_RegisterMapping("_class_wxPyEvent","_wxPyEvent",0);
|
||||
SWIG_RegisterMapping("_class_wxIconizeEvent","_wxIconizeEvent",0);
|
||||
@@ -5357,7 +5357,6 @@ SWIGEXPORT(void,initcontrols2c)() {
|
||||
SWIG_RegisterMapping("_unsigned_int","_int",0);
|
||||
SWIG_RegisterMapping("_wxIcon","_class_wxIcon",0);
|
||||
SWIG_RegisterMapping("_wxDialog","_class_wxDialog",0);
|
||||
SWIG_RegisterMapping("_class_wxPyMenu","_wxPyMenu",0);
|
||||
SWIG_RegisterMapping("_class_wxListItem","_wxListItem",0);
|
||||
SWIG_RegisterMapping("_class_wxPen","_wxPen",0);
|
||||
SWIG_RegisterMapping("_short","_WXTYPE",0);
|
||||
|
||||
@@ -15,7 +15,7 @@ class wxListItemPtr :
|
||||
def __init__(self,this):
|
||||
self.this = this
|
||||
self.thisown = 0
|
||||
def __del__(self):
|
||||
def __del__(self, controls2c=controls2c):
|
||||
if self.thisown == 1 :
|
||||
controls2c.delete_wxListItem(self.this)
|
||||
def __setattr__(self,name,value):
|
||||
@@ -156,6 +156,9 @@ class wxListCtrlPtr(wxControlPtr):
|
||||
def ClearAll(self):
|
||||
val = controls2c.wxListCtrl_ClearAll(self.this)
|
||||
return val
|
||||
def EditLabel(self,arg0):
|
||||
val = controls2c.wxListCtrl_EditLabel(self.this,arg0)
|
||||
return val
|
||||
def EnsureVisible(self,arg0):
|
||||
val = controls2c.wxListCtrl_EnsureVisible(self.this,arg0)
|
||||
return val
|
||||
@@ -304,7 +307,7 @@ class wxTreeItemIdPtr :
|
||||
def __init__(self,this):
|
||||
self.this = this
|
||||
self.thisown = 0
|
||||
def __del__(self):
|
||||
def __del__(self, controls2c=controls2c):
|
||||
if self.thisown == 1 :
|
||||
controls2c.delete_wxTreeItemId(self.this)
|
||||
def IsOk(self):
|
||||
@@ -347,7 +350,7 @@ class wxTreeItemData(wxTreeItemDataPtr):
|
||||
|
||||
|
||||
|
||||
class wxTreeEventPtr(wxCommandEventPtr):
|
||||
class wxTreeEventPtr(wxNotifyEventPtr):
|
||||
def __init__(self,this):
|
||||
self.this = this
|
||||
self.thisown = 0
|
||||
@@ -369,8 +372,8 @@ class wxTreeEventPtr(wxCommandEventPtr):
|
||||
def GetCode(self):
|
||||
val = controls2c.wxTreeEvent_GetCode(self.this)
|
||||
return val
|
||||
def Veto(self):
|
||||
val = controls2c.wxTreeEvent_Veto(self.this)
|
||||
def GetLabel(self):
|
||||
val = controls2c.wxTreeEvent_GetLabel(self.this)
|
||||
return val
|
||||
def __repr__(self):
|
||||
return "<C wxTreeEvent instance>"
|
||||
@@ -563,6 +566,9 @@ class wxTreeCtrlPtr(wxControlPtr):
|
||||
def Unselect(self):
|
||||
val = controls2c.wxTreeCtrl_Unselect(self.this)
|
||||
return val
|
||||
def UnselectAll(self):
|
||||
val = controls2c.wxTreeCtrl_UnselectAll(self.this)
|
||||
return val
|
||||
def SelectItem(self,arg0):
|
||||
val = controls2c.wxTreeCtrl_SelectItem(self.this,arg0.this)
|
||||
return val
|
||||
@@ -574,14 +580,6 @@ class wxTreeCtrlPtr(wxControlPtr):
|
||||
return val
|
||||
def EditLabel(self,arg0):
|
||||
val = controls2c.wxTreeCtrl_EditLabel(self.this,arg0.this)
|
||||
val = wxTextCtrlPtr(val)
|
||||
return val
|
||||
def GetEditControl(self):
|
||||
val = controls2c.wxTreeCtrl_GetEditControl(self.this)
|
||||
val = wxTextCtrlPtr(val)
|
||||
return val
|
||||
def EndEditLabel(self,arg0,*args):
|
||||
val = apply(controls2c.wxTreeCtrl_EndEditLabel,(self.this,arg0.this,)+args)
|
||||
return val
|
||||
def SetItemBold(self,arg0,*args):
|
||||
val = apply(controls2c.wxTreeCtrl_SetItemBold,(self.this,arg0.this,)+args)
|
||||
|
||||
@@ -609,7 +609,7 @@ class wxPyEventPtr(wxCommandEventPtr):
|
||||
def __init__(self,this):
|
||||
self.this = this
|
||||
self.thisown = 0
|
||||
def __del__(self):
|
||||
def __del__(self, eventsc=eventsc):
|
||||
if self.thisown == 1 :
|
||||
eventsc.delete_wxPyEvent(self.this)
|
||||
def SetUserData(self,arg0):
|
||||
|
||||
@@ -900,7 +900,6 @@ SWIGEXPORT(void,initframesc)() {
|
||||
SWIG_RegisterMapping("_wxCursor","_class_wxCursor",0);
|
||||
SWIG_RegisterMapping("_wxNotifyEvent","_class_wxNotifyEvent",0);
|
||||
SWIG_RegisterMapping("_wxMask","_class_wxMask",0);
|
||||
SWIG_RegisterMapping("_wxPyMenu","_class_wxPyMenu",0);
|
||||
SWIG_RegisterMapping("_wxPen","_class_wxPen",0);
|
||||
SWIG_RegisterMapping("_wxUpdateUIEvent","_class_wxUpdateUIEvent",0);
|
||||
SWIG_RegisterMapping("_byte","_unsigned_char",0);
|
||||
@@ -1047,7 +1046,6 @@ SWIGEXPORT(void,initframesc)() {
|
||||
SWIG_RegisterMapping("_unsigned_int","_int",0);
|
||||
SWIG_RegisterMapping("_wxIcon","_class_wxIcon",0);
|
||||
SWIG_RegisterMapping("_wxDialog","_class_wxDialog",0);
|
||||
SWIG_RegisterMapping("_class_wxPyMenu","_wxPyMenu",0);
|
||||
SWIG_RegisterMapping("_class_wxPen","_wxPen",0);
|
||||
SWIG_RegisterMapping("_short","_WXTYPE",0);
|
||||
SWIG_RegisterMapping("_short","_unsigned_short",0);
|
||||
|
||||
@@ -132,6 +132,13 @@ static char* wxStringErrorMsg = "string type is required for parameter";
|
||||
return new wxBitmap(name, flags);
|
||||
}
|
||||
|
||||
#ifdef __WXMSW__
|
||||
wxBitmap* wxBitmapFromData(char* data, long type,
|
||||
int width, int height, int depth = 1) {
|
||||
return new wxBitmap((void*)data, type, width, height, depth);
|
||||
}
|
||||
#endif
|
||||
|
||||
wxMask* wxMaskColour(const wxBitmap& bitmap, const wxColour& colour) {
|
||||
return new wxMask(bitmap, colour);
|
||||
}
|
||||
@@ -1443,6 +1450,41 @@ static void *SwigwxIconTowxBitmap(void *ptr) {
|
||||
return (void *) dest;
|
||||
}
|
||||
|
||||
#define new_wxIcon(_swigarg0,_swigarg1,_swigarg2,_swigarg3) (new wxIcon(_swigarg0,_swigarg1,_swigarg2,_swigarg3))
|
||||
static PyObject *_wrap_new_wxIcon(PyObject *self, PyObject *args) {
|
||||
PyObject * _resultobj;
|
||||
wxIcon * _result;
|
||||
wxString * _arg0;
|
||||
long _arg1;
|
||||
int _arg2 = -1;
|
||||
int _arg3 = -1;
|
||||
PyObject * _obj0 = 0;
|
||||
char _ptemp[128];
|
||||
|
||||
self = self;
|
||||
if(!PyArg_ParseTuple(args,"Ol|ii:new_wxIcon",&_obj0,&_arg1,&_arg2,&_arg3))
|
||||
return NULL;
|
||||
{
|
||||
if (!PyString_Check(_obj0)) {
|
||||
PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
|
||||
return NULL;
|
||||
}
|
||||
_arg0 = new wxString(PyString_AsString(_obj0), PyString_Size(_obj0));
|
||||
}
|
||||
{
|
||||
wxPy_BEGIN_ALLOW_THREADS;
|
||||
_result = (wxIcon *)new_wxIcon(*_arg0,_arg1,_arg2,_arg3);
|
||||
|
||||
wxPy_END_ALLOW_THREADS;
|
||||
} SWIG_MakePtr(_ptemp, (char *) _result,"_wxIcon_p");
|
||||
_resultobj = Py_BuildValue("s",_ptemp);
|
||||
{
|
||||
if (_obj0)
|
||||
delete _arg0;
|
||||
}
|
||||
return _resultobj;
|
||||
}
|
||||
|
||||
#define delete_wxIcon(_swigobj) (delete _swigobj)
|
||||
static PyObject *_wrap_delete_wxIcon(PyObject *self, PyObject *args) {
|
||||
PyObject * _resultobj;
|
||||
@@ -5012,8 +5054,10 @@ static PyObject *_wrap_wxDC_StartPage(PyObject *self, PyObject *args) {
|
||||
static void wxDC_DrawBitmap(wxDC *self,wxBitmap & bitmap,long x,long y,bool swapPalette) {
|
||||
wxMemoryDC* memDC = new wxMemoryDC;
|
||||
memDC->SelectObject(bitmap);
|
||||
#ifdef __WXMSW__
|
||||
if (swapPalette)
|
||||
self->SetPalette(*bitmap.GetPalette());
|
||||
#endif
|
||||
self->Blit(x, y, bitmap.GetWidth(), bitmap.GetHeight(), memDC,
|
||||
0, 0, self->GetLogicalFunction());
|
||||
memDC->SelectObject(wxNullBitmap);
|
||||
@@ -5959,6 +6003,7 @@ static PyMethodDef gdicMethods[] = {
|
||||
{ "wxIcon_GetHeight", _wrap_wxIcon_GetHeight, 1 },
|
||||
{ "wxIcon_GetDepth", _wrap_wxIcon_GetDepth, 1 },
|
||||
{ "delete_wxIcon", _wrap_delete_wxIcon, 1 },
|
||||
{ "new_wxIcon", _wrap_new_wxIcon, 1 },
|
||||
{ "delete_wxMask", _wrap_delete_wxMask, 1 },
|
||||
{ "new_wxMask", _wrap_new_wxMask, 1 },
|
||||
{ "wxBitmap_SetWidth", _wrap_wxBitmap_SetWidth, 1 },
|
||||
|
||||
@@ -6,7 +6,7 @@ class wxBitmapPtr :
|
||||
def __init__(self,this):
|
||||
self.this = this
|
||||
self.thisown = 0
|
||||
def __del__(self):
|
||||
def __del__(self, gdic=gdic):
|
||||
if self.thisown == 1 :
|
||||
gdic.delete_wxBitmap(self.this)
|
||||
def GetDepth(self):
|
||||
@@ -65,7 +65,7 @@ class wxMaskPtr :
|
||||
def __init__(self,this):
|
||||
self.this = this
|
||||
self.thisown = 0
|
||||
def __del__(self):
|
||||
def __del__(self, gdic=gdic):
|
||||
if self.thisown == 1 :
|
||||
gdic.delete_wxMask(self.this)
|
||||
def __repr__(self):
|
||||
@@ -82,7 +82,7 @@ class wxIconPtr(wxBitmapPtr):
|
||||
def __init__(self,this):
|
||||
self.this = this
|
||||
self.thisown = 0
|
||||
def __del__(self):
|
||||
def __del__(self, gdic=gdic):
|
||||
if self.thisown == 1 :
|
||||
gdic.delete_wxIcon(self.this)
|
||||
def GetDepth(self):
|
||||
@@ -112,8 +112,9 @@ class wxIconPtr(wxBitmapPtr):
|
||||
def __repr__(self):
|
||||
return "<C wxIcon instance>"
|
||||
class wxIcon(wxIconPtr):
|
||||
def __init__(self,this):
|
||||
self.this = this
|
||||
def __init__(self,arg0,arg1,*args) :
|
||||
self.this = apply(gdic.new_wxIcon,(arg0,arg1,)+args)
|
||||
self.thisown = 1
|
||||
|
||||
|
||||
|
||||
@@ -122,7 +123,7 @@ class wxCursorPtr(wxBitmapPtr):
|
||||
def __init__(self,this):
|
||||
self.this = this
|
||||
self.thisown = 0
|
||||
def __del__(self):
|
||||
def __del__(self, gdic=gdic):
|
||||
if self.thisown == 1 :
|
||||
gdic.delete_wxCursor(self.this)
|
||||
def Ok(self):
|
||||
@@ -191,7 +192,7 @@ class wxColourPtr :
|
||||
def __init__(self,this):
|
||||
self.this = this
|
||||
self.thisown = 0
|
||||
def __del__(self):
|
||||
def __del__(self, gdic=gdic):
|
||||
if self.thisown == 1 :
|
||||
gdic.delete_wxColour(self.this)
|
||||
def Red(self):
|
||||
@@ -311,7 +312,7 @@ class wxDCPtr :
|
||||
def __init__(self,this):
|
||||
self.this = this
|
||||
self.thisown = 0
|
||||
def __del__(self):
|
||||
def __del__(self, gdic=gdic):
|
||||
if self.thisown == 1 :
|
||||
gdic.delete_wxDC(self.this)
|
||||
def BeginDrawing(self):
|
||||
@@ -664,7 +665,7 @@ class wxPalettePtr :
|
||||
def __init__(self,this):
|
||||
self.this = this
|
||||
self.thisown = 0
|
||||
def __del__(self):
|
||||
def __del__(self, gdic=gdic):
|
||||
if self.thisown == 1 :
|
||||
gdic.delete_wxPalette(self.this)
|
||||
def GetPixel(self,arg0,arg1,arg2):
|
||||
@@ -690,7 +691,7 @@ class wxImageListPtr :
|
||||
def __init__(self,this):
|
||||
self.this = this
|
||||
self.thisown = 0
|
||||
def __del__(self):
|
||||
def __del__(self, gdic=gdic):
|
||||
if self.thisown == 1 :
|
||||
gdic.delete_wxImageList(self.this)
|
||||
def Add(self,arg0):
|
||||
|
||||
@@ -9014,6 +9014,7 @@ SWIGEXPORT(void,initglcanvasc)() {
|
||||
SWIG_RegisterMapping("_wxPrintQuality","_EBool",0);
|
||||
SWIG_RegisterMapping("_wxPrintQuality","_size_t",0);
|
||||
SWIG_RegisterMapping("_wxFontData","_class_wxFontData",0);
|
||||
SWIG_RegisterMapping("___wxPyCleanup","_class___wxPyCleanup",0);
|
||||
SWIG_RegisterMapping("_class_wxRegionIterator","_wxRegionIterator",0);
|
||||
SWIG_RegisterMapping("_class_wxMenuBar","_wxMenuBar",0);
|
||||
SWIG_RegisterMapping("_class_wxPyTreeItemData","_wxPyTreeItemData",0);
|
||||
@@ -9043,7 +9044,6 @@ SWIGEXPORT(void,initglcanvasc)() {
|
||||
SWIG_RegisterMapping("_wxToolTip","_class_wxToolTip",0);
|
||||
SWIG_RegisterMapping("_wxGrid","_class_wxGrid",0);
|
||||
SWIG_RegisterMapping("_wxPNGHandler","_class_wxPNGHandler",0);
|
||||
SWIG_RegisterMapping("_wxPyMenu","_class_wxPyMenu",0);
|
||||
SWIG_RegisterMapping("_class_wxColourData","_wxColourData",0);
|
||||
SWIG_RegisterMapping("_class_wxPageSetupDialogData","_wxPageSetupDialogData",0);
|
||||
SWIG_RegisterMapping("_wxPrinter","_class_wxPrinter",0);
|
||||
@@ -9170,6 +9170,7 @@ SWIGEXPORT(void,initglcanvasc)() {
|
||||
SWIG_RegisterMapping("_class_wxButton","_wxButton",0);
|
||||
SWIG_RegisterMapping("_wxRadioBox","_class_wxRadioBox",0);
|
||||
SWIG_RegisterMapping("_class_wxFontData","_wxFontData",0);
|
||||
SWIG_RegisterMapping("_class___wxPyCleanup","___wxPyCleanup",0);
|
||||
SWIG_RegisterMapping("_GLclampf","_float",0);
|
||||
SWIG_RegisterMapping("_GLclampf","_GLfloat",0);
|
||||
SWIG_RegisterMapping("_wxBitmap","_class_wxBitmap",0);
|
||||
@@ -9332,7 +9333,6 @@ SWIGEXPORT(void,initglcanvasc)() {
|
||||
SWIG_RegisterMapping("_unsigned_int","_int",0);
|
||||
SWIG_RegisterMapping("_wxIcon","_class_wxIcon",0);
|
||||
SWIG_RegisterMapping("_wxDialog","_class_wxDialog",0);
|
||||
SWIG_RegisterMapping("_class_wxPyMenu","_wxPyMenu",0);
|
||||
SWIG_RegisterMapping("_class_wxListItem","_wxListItem",0);
|
||||
SWIG_RegisterMapping("_GLdouble","_GLclampd",0);
|
||||
SWIG_RegisterMapping("_GLdouble","_double",0);
|
||||
|
||||
@@ -35,7 +35,7 @@ class wxGLContextPtr :
|
||||
def __init__(self,this):
|
||||
self.this = this
|
||||
self.thisown = 0
|
||||
def __del__(self):
|
||||
def __del__(self, glcanvasc=glcanvasc):
|
||||
if self.thisown == 1 :
|
||||
glcanvasc.delete_wxGLContext(self.this)
|
||||
def SetCurrent(self):
|
||||
|
||||
@@ -815,6 +815,33 @@ static PyObject *_wrap_wxImage_Scale(PyObject *self, PyObject *args) {
|
||||
return _resultobj;
|
||||
}
|
||||
|
||||
#define wxImage_Rescale(_swigobj,_swigarg0,_swigarg1) (_swigobj->Rescale(_swigarg0,_swigarg1))
|
||||
static PyObject *_wrap_wxImage_Rescale(PyObject *self, PyObject *args) {
|
||||
PyObject * _resultobj;
|
||||
wxImage * _arg0;
|
||||
int _arg1;
|
||||
int _arg2;
|
||||
char * _argc0 = 0;
|
||||
|
||||
self = self;
|
||||
if(!PyArg_ParseTuple(args,"sii:wxImage_Rescale",&_argc0,&_arg1,&_arg2))
|
||||
return NULL;
|
||||
if (_argc0) {
|
||||
if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxImage_p")) {
|
||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxImage_Rescale. Expected _wxImage_p.");
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
{
|
||||
wxPy_BEGIN_ALLOW_THREADS;
|
||||
wxImage_Rescale(_arg0,_arg1,_arg2);
|
||||
|
||||
wxPy_END_ALLOW_THREADS;
|
||||
} Py_INCREF(Py_None);
|
||||
_resultobj = Py_None;
|
||||
return _resultobj;
|
||||
}
|
||||
|
||||
#define wxImage_SetRGB(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4) (_swigobj->SetRGB(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4))
|
||||
static PyObject *_wrap_wxImage_SetRGB(PyObject *self, PyObject *args) {
|
||||
PyObject * _resultobj;
|
||||
@@ -1417,6 +1444,7 @@ static PyMethodDef imagecMethods[] = {
|
||||
{ "wxImage_GetGreen", _wrap_wxImage_GetGreen, 1 },
|
||||
{ "wxImage_GetRed", _wrap_wxImage_GetRed, 1 },
|
||||
{ "wxImage_SetRGB", _wrap_wxImage_SetRGB, 1 },
|
||||
{ "wxImage_Rescale", _wrap_wxImage_Rescale, 1 },
|
||||
{ "wxImage_Scale", _wrap_wxImage_Scale, 1 },
|
||||
{ "wxImage_Destroy", _wrap_wxImage_Destroy, 1 },
|
||||
{ "wxImage_Create", _wrap_wxImage_Create, 1 },
|
||||
|
||||
@@ -102,7 +102,7 @@ class wxImagePtr :
|
||||
def __init__(self,this):
|
||||
self.this = this
|
||||
self.thisown = 0
|
||||
def __del__(self):
|
||||
def __del__(self, imagec=imagec):
|
||||
if self.thisown == 1 :
|
||||
imagec.delete_wxImage(self.this)
|
||||
def ConvertToBitmap(self):
|
||||
@@ -121,6 +121,9 @@ class wxImagePtr :
|
||||
val = wxImagePtr(val)
|
||||
val.thisown = 1
|
||||
return val
|
||||
def Rescale(self,arg0,arg1):
|
||||
val = imagec.wxImage_Rescale(self.this,arg0,arg1)
|
||||
return val
|
||||
def SetRGB(self,arg0,arg1,arg2,arg3,arg4):
|
||||
val = imagec.wxImage_SetRGB(self.this,arg0,arg1,arg2,arg3,arg4)
|
||||
return val
|
||||
|
||||
@@ -664,7 +664,6 @@ SWIGEXPORT(void,initmdic)() {
|
||||
SWIG_RegisterMapping("_wxCursor","_class_wxCursor",0);
|
||||
SWIG_RegisterMapping("_wxNotifyEvent","_class_wxNotifyEvent",0);
|
||||
SWIG_RegisterMapping("_wxMask","_class_wxMask",0);
|
||||
SWIG_RegisterMapping("_wxPyMenu","_class_wxPyMenu",0);
|
||||
SWIG_RegisterMapping("_wxPen","_class_wxPen",0);
|
||||
SWIG_RegisterMapping("_wxUpdateUIEvent","_class_wxUpdateUIEvent",0);
|
||||
SWIG_RegisterMapping("_byte","_unsigned_char",0);
|
||||
@@ -817,7 +816,6 @@ SWIGEXPORT(void,initmdic)() {
|
||||
SWIG_RegisterMapping("_unsigned_int","_int",0);
|
||||
SWIG_RegisterMapping("_wxIcon","_class_wxIcon",0);
|
||||
SWIG_RegisterMapping("_wxDialog","_class_wxDialog",0);
|
||||
SWIG_RegisterMapping("_class_wxPyMenu","_wxPyMenu",0);
|
||||
SWIG_RegisterMapping("_class_wxPen","_wxPen",0);
|
||||
SWIG_RegisterMapping("_short","_WXTYPE",0);
|
||||
SWIG_RegisterMapping("_short","_unsigned_short",0);
|
||||
|
||||
@@ -122,6 +122,19 @@ static char* wxStringErrorMsg = "string type is required for parameter";
|
||||
wxGetResource(section, entry, &retval, file);
|
||||
return retval;
|
||||
}
|
||||
|
||||
|
||||
wxColour wxSystemSettings_GetSystemColour(int index) {
|
||||
return wxSystemSettings::GetSystemColour(index);
|
||||
}
|
||||
|
||||
wxFont wxSystemSettings_GetSystemFont(int index) {
|
||||
return wxSystemSettings::GetSystemFont(index);
|
||||
}
|
||||
|
||||
int wxSystemSettings_GetSystemMetric(int index) {
|
||||
return wxSystemSettings::GetSystemMetric(index);
|
||||
}
|
||||
static PyObject *_wrap_wxFileSelector(PyObject *self, PyObject *args) {
|
||||
PyObject * _resultobj;
|
||||
wxString * _result;
|
||||
@@ -449,6 +462,80 @@ static PyObject *_wrap_wxMessageBox(PyObject *self, PyObject *args) {
|
||||
return _resultobj;
|
||||
}
|
||||
|
||||
static PyObject *_wrap_wxGetNumberFromUser(PyObject *self, PyObject *args) {
|
||||
PyObject * _resultobj;
|
||||
long _result;
|
||||
wxString * _arg0;
|
||||
wxString * _arg1;
|
||||
wxString * _arg2;
|
||||
long _arg3;
|
||||
long _arg4 = 0;
|
||||
long _arg5 = 100;
|
||||
wxWindow * _arg6 = NULL;
|
||||
wxPoint * _arg7 = &wxPyDefaultPosition;
|
||||
PyObject * _obj0 = 0;
|
||||
PyObject * _obj1 = 0;
|
||||
PyObject * _obj2 = 0;
|
||||
char * _argc6 = 0;
|
||||
char * _argc7 = 0;
|
||||
|
||||
self = self;
|
||||
if(!PyArg_ParseTuple(args,"OOOl|llss:wxGetNumberFromUser",&_obj0,&_obj1,&_obj2,&_arg3,&_arg4,&_arg5,&_argc6,&_argc7))
|
||||
return NULL;
|
||||
{
|
||||
if (!PyString_Check(_obj0)) {
|
||||
PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
|
||||
return NULL;
|
||||
}
|
||||
_arg0 = new wxString(PyString_AsString(_obj0), PyString_Size(_obj0));
|
||||
}
|
||||
{
|
||||
if (!PyString_Check(_obj1)) {
|
||||
PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
|
||||
return NULL;
|
||||
}
|
||||
_arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1));
|
||||
}
|
||||
{
|
||||
if (!PyString_Check(_obj2)) {
|
||||
PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
|
||||
return NULL;
|
||||
}
|
||||
_arg2 = new wxString(PyString_AsString(_obj2), PyString_Size(_obj2));
|
||||
}
|
||||
if (_argc6) {
|
||||
if (SWIG_GetPtr(_argc6,(void **) &_arg6,"_wxWindow_p")) {
|
||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 7 of wxGetNumberFromUser. Expected _wxWindow_p.");
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
if (_argc7) {
|
||||
if (SWIG_GetPtr(_argc7,(void **) &_arg7,"_wxPoint_p")) {
|
||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 8 of wxGetNumberFromUser. Expected _wxPoint_p.");
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
{
|
||||
wxPy_BEGIN_ALLOW_THREADS;
|
||||
_result = (long )wxGetNumberFromUser(*_arg0,*_arg1,*_arg2,_arg3,_arg4,_arg5,_arg6,*_arg7);
|
||||
|
||||
wxPy_END_ALLOW_THREADS;
|
||||
} _resultobj = Py_BuildValue("l",_result);
|
||||
{
|
||||
if (_obj0)
|
||||
delete _arg0;
|
||||
}
|
||||
{
|
||||
if (_obj1)
|
||||
delete _arg1;
|
||||
}
|
||||
{
|
||||
if (_obj2)
|
||||
delete _arg2;
|
||||
}
|
||||
return _resultobj;
|
||||
}
|
||||
|
||||
static PyObject *_wrap_wxColourDisplay(PyObject *self, PyObject *args) {
|
||||
PyObject * _resultobj;
|
||||
bool _result;
|
||||
@@ -1038,6 +1125,61 @@ static PyObject *_wrap_wxResourceParseString(PyObject *self, PyObject *args) {
|
||||
return _resultobj;
|
||||
}
|
||||
|
||||
static PyObject *_wrap_wxSystemSettings_GetSystemColour(PyObject *self, PyObject *args) {
|
||||
PyObject * _resultobj;
|
||||
wxColour * _result;
|
||||
int _arg0;
|
||||
char _ptemp[128];
|
||||
|
||||
self = self;
|
||||
if(!PyArg_ParseTuple(args,"i:wxSystemSettings_GetSystemColour",&_arg0))
|
||||
return NULL;
|
||||
{
|
||||
wxPy_BEGIN_ALLOW_THREADS;
|
||||
_result = new wxColour (wxSystemSettings_GetSystemColour(_arg0));
|
||||
|
||||
wxPy_END_ALLOW_THREADS;
|
||||
} SWIG_MakePtr(_ptemp, (void *) _result,"_wxColour_p");
|
||||
_resultobj = Py_BuildValue("s",_ptemp);
|
||||
return _resultobj;
|
||||
}
|
||||
|
||||
static PyObject *_wrap_wxSystemSettings_GetSystemFont(PyObject *self, PyObject *args) {
|
||||
PyObject * _resultobj;
|
||||
wxFont * _result;
|
||||
int _arg0;
|
||||
char _ptemp[128];
|
||||
|
||||
self = self;
|
||||
if(!PyArg_ParseTuple(args,"i:wxSystemSettings_GetSystemFont",&_arg0))
|
||||
return NULL;
|
||||
{
|
||||
wxPy_BEGIN_ALLOW_THREADS;
|
||||
_result = new wxFont (wxSystemSettings_GetSystemFont(_arg0));
|
||||
|
||||
wxPy_END_ALLOW_THREADS;
|
||||
} SWIG_MakePtr(_ptemp, (void *) _result,"_wxFont_p");
|
||||
_resultobj = Py_BuildValue("s",_ptemp);
|
||||
return _resultobj;
|
||||
}
|
||||
|
||||
static PyObject *_wrap_wxSystemSettings_GetSystemMetric(PyObject *self, PyObject *args) {
|
||||
PyObject * _resultobj;
|
||||
int _result;
|
||||
int _arg0;
|
||||
|
||||
self = self;
|
||||
if(!PyArg_ParseTuple(args,"i:wxSystemSettings_GetSystemMetric",&_arg0))
|
||||
return NULL;
|
||||
{
|
||||
wxPy_BEGIN_ALLOW_THREADS;
|
||||
_result = (int )wxSystemSettings_GetSystemMetric(_arg0);
|
||||
|
||||
wxPy_END_ALLOW_THREADS;
|
||||
} _resultobj = Py_BuildValue("i",_result);
|
||||
return _resultobj;
|
||||
}
|
||||
|
||||
#define wxSize_x_set(_swigobj,_swigval) (_swigobj->x = _swigval,_swigval)
|
||||
static PyObject *_wrap_wxSize_x_set(PyObject *self, PyObject *args) {
|
||||
PyObject * _resultobj;
|
||||
@@ -3982,6 +4124,9 @@ static PyMethodDef misccMethods[] = {
|
||||
{ "wxSize_y_set", _wrap_wxSize_y_set, 1 },
|
||||
{ "wxSize_x_get", _wrap_wxSize_x_get, 1 },
|
||||
{ "wxSize_x_set", _wrap_wxSize_x_set, 1 },
|
||||
{ "wxSystemSettings_GetSystemMetric", _wrap_wxSystemSettings_GetSystemMetric, 1 },
|
||||
{ "wxSystemSettings_GetSystemFont", _wrap_wxSystemSettings_GetSystemFont, 1 },
|
||||
{ "wxSystemSettings_GetSystemColour", _wrap_wxSystemSettings_GetSystemColour, 1 },
|
||||
{ "wxResourceParseString", _wrap_wxResourceParseString, 1 },
|
||||
{ "wxResourceParseFile", _wrap_wxResourceParseFile, 1 },
|
||||
{ "wxResourceParseData", _wrap_wxResourceParseData, 1 },
|
||||
@@ -4011,6 +4156,7 @@ static PyMethodDef misccMethods[] = {
|
||||
{ "wxSetCursor", _wrap_wxSetCursor, 1 },
|
||||
{ "wxDisplayDepth", _wrap_wxDisplayDepth, 1 },
|
||||
{ "wxColourDisplay", _wrap_wxColourDisplay, 1 },
|
||||
{ "wxGetNumberFromUser", _wrap_wxGetNumberFromUser, 1 },
|
||||
{ "wxMessageBox", _wrap_wxMessageBox, 1 },
|
||||
{ "wxGetSingleChoiceIndex", _wrap_wxGetSingleChoiceIndex, 1 },
|
||||
{ "wxGetSingleChoice", _wrap_wxGetSingleChoice, 1 },
|
||||
@@ -4049,6 +4195,92 @@ SWIGEXPORT(void,initmiscc)() {
|
||||
PyDict_SetItemString(d,"wxOutRegion", PyInt_FromLong((long) wxOutRegion));
|
||||
PyDict_SetItemString(d,"wxPartRegion", PyInt_FromLong((long) wxPartRegion));
|
||||
PyDict_SetItemString(d,"wxInRegion", PyInt_FromLong((long) wxInRegion));
|
||||
PyDict_SetItemString(d,"wxSYS_WHITE_BRUSH", PyInt_FromLong((long) wxSYS_WHITE_BRUSH));
|
||||
PyDict_SetItemString(d,"wxSYS_LTGRAY_BRUSH", PyInt_FromLong((long) wxSYS_LTGRAY_BRUSH));
|
||||
PyDict_SetItemString(d,"wxSYS_GRAY_BRUSH", PyInt_FromLong((long) wxSYS_GRAY_BRUSH));
|
||||
PyDict_SetItemString(d,"wxSYS_DKGRAY_BRUSH", PyInt_FromLong((long) wxSYS_DKGRAY_BRUSH));
|
||||
PyDict_SetItemString(d,"wxSYS_BLACK_BRUSH", PyInt_FromLong((long) wxSYS_BLACK_BRUSH));
|
||||
PyDict_SetItemString(d,"wxSYS_NULL_BRUSH", PyInt_FromLong((long) wxSYS_NULL_BRUSH));
|
||||
PyDict_SetItemString(d,"wxSYS_HOLLOW_BRUSH", PyInt_FromLong((long) wxSYS_HOLLOW_BRUSH));
|
||||
PyDict_SetItemString(d,"wxSYS_WHITE_PEN", PyInt_FromLong((long) wxSYS_WHITE_PEN));
|
||||
PyDict_SetItemString(d,"wxSYS_BLACK_PEN", PyInt_FromLong((long) wxSYS_BLACK_PEN));
|
||||
PyDict_SetItemString(d,"wxSYS_NULL_PEN", PyInt_FromLong((long) wxSYS_NULL_PEN));
|
||||
PyDict_SetItemString(d,"wxSYS_OEM_FIXED_FONT", PyInt_FromLong((long) wxSYS_OEM_FIXED_FONT));
|
||||
PyDict_SetItemString(d,"wxSYS_ANSI_FIXED_FONT", PyInt_FromLong((long) wxSYS_ANSI_FIXED_FONT));
|
||||
PyDict_SetItemString(d,"wxSYS_ANSI_VAR_FONT", PyInt_FromLong((long) wxSYS_ANSI_VAR_FONT));
|
||||
PyDict_SetItemString(d,"wxSYS_SYSTEM_FONT", PyInt_FromLong((long) wxSYS_SYSTEM_FONT));
|
||||
PyDict_SetItemString(d,"wxSYS_DEVICE_DEFAULT_FONT", PyInt_FromLong((long) wxSYS_DEVICE_DEFAULT_FONT));
|
||||
PyDict_SetItemString(d,"wxSYS_DEFAULT_PALETTE", PyInt_FromLong((long) wxSYS_DEFAULT_PALETTE));
|
||||
PyDict_SetItemString(d,"wxSYS_SYSTEM_FIXED_FONT", PyInt_FromLong((long) wxSYS_SYSTEM_FIXED_FONT));
|
||||
PyDict_SetItemString(d,"wxSYS_DEFAULT_GUI_FONT", PyInt_FromLong((long) wxSYS_DEFAULT_GUI_FONT));
|
||||
PyDict_SetItemString(d,"wxSYS_COLOUR_SCROLLBAR", PyInt_FromLong((long) wxSYS_COLOUR_SCROLLBAR));
|
||||
PyDict_SetItemString(d,"wxSYS_COLOUR_BACKGROUND", PyInt_FromLong((long) wxSYS_COLOUR_BACKGROUND));
|
||||
PyDict_SetItemString(d,"wxSYS_COLOUR_ACTIVECAPTION", PyInt_FromLong((long) wxSYS_COLOUR_ACTIVECAPTION));
|
||||
PyDict_SetItemString(d,"wxSYS_COLOUR_INACTIVECAPTION", PyInt_FromLong((long) wxSYS_COLOUR_INACTIVECAPTION));
|
||||
PyDict_SetItemString(d,"wxSYS_COLOUR_MENU", PyInt_FromLong((long) wxSYS_COLOUR_MENU));
|
||||
PyDict_SetItemString(d,"wxSYS_COLOUR_WINDOW", PyInt_FromLong((long) wxSYS_COLOUR_WINDOW));
|
||||
PyDict_SetItemString(d,"wxSYS_COLOUR_WINDOWFRAME", PyInt_FromLong((long) wxSYS_COLOUR_WINDOWFRAME));
|
||||
PyDict_SetItemString(d,"wxSYS_COLOUR_MENUTEXT", PyInt_FromLong((long) wxSYS_COLOUR_MENUTEXT));
|
||||
PyDict_SetItemString(d,"wxSYS_COLOUR_WINDOWTEXT", PyInt_FromLong((long) wxSYS_COLOUR_WINDOWTEXT));
|
||||
PyDict_SetItemString(d,"wxSYS_COLOUR_CAPTIONTEXT", PyInt_FromLong((long) wxSYS_COLOUR_CAPTIONTEXT));
|
||||
PyDict_SetItemString(d,"wxSYS_COLOUR_ACTIVEBORDER", PyInt_FromLong((long) wxSYS_COLOUR_ACTIVEBORDER));
|
||||
PyDict_SetItemString(d,"wxSYS_COLOUR_INACTIVEBORDER", PyInt_FromLong((long) wxSYS_COLOUR_INACTIVEBORDER));
|
||||
PyDict_SetItemString(d,"wxSYS_COLOUR_APPWORKSPACE", PyInt_FromLong((long) wxSYS_COLOUR_APPWORKSPACE));
|
||||
PyDict_SetItemString(d,"wxSYS_COLOUR_HIGHLIGHT", PyInt_FromLong((long) wxSYS_COLOUR_HIGHLIGHT));
|
||||
PyDict_SetItemString(d,"wxSYS_COLOUR_HIGHLIGHTTEXT", PyInt_FromLong((long) wxSYS_COLOUR_HIGHLIGHTTEXT));
|
||||
PyDict_SetItemString(d,"wxSYS_COLOUR_BTNFACE", PyInt_FromLong((long) wxSYS_COLOUR_BTNFACE));
|
||||
PyDict_SetItemString(d,"wxSYS_COLOUR_BTNSHADOW", PyInt_FromLong((long) wxSYS_COLOUR_BTNSHADOW));
|
||||
PyDict_SetItemString(d,"wxSYS_COLOUR_GRAYTEXT", PyInt_FromLong((long) wxSYS_COLOUR_GRAYTEXT));
|
||||
PyDict_SetItemString(d,"wxSYS_COLOUR_BTNTEXT", PyInt_FromLong((long) wxSYS_COLOUR_BTNTEXT));
|
||||
PyDict_SetItemString(d,"wxSYS_COLOUR_INACTIVECAPTIONTEXT", PyInt_FromLong((long) wxSYS_COLOUR_INACTIVECAPTIONTEXT));
|
||||
PyDict_SetItemString(d,"wxSYS_COLOUR_BTNHIGHLIGHT", PyInt_FromLong((long) wxSYS_COLOUR_BTNHIGHLIGHT));
|
||||
PyDict_SetItemString(d,"wxSYS_COLOUR_3DDKSHADOW", PyInt_FromLong((long) wxSYS_COLOUR_3DDKSHADOW));
|
||||
PyDict_SetItemString(d,"wxSYS_COLOUR_3DLIGHT", PyInt_FromLong((long) wxSYS_COLOUR_3DLIGHT));
|
||||
PyDict_SetItemString(d,"wxSYS_COLOUR_INFOTEXT", PyInt_FromLong((long) wxSYS_COLOUR_INFOTEXT));
|
||||
PyDict_SetItemString(d,"wxSYS_COLOUR_INFOBK", PyInt_FromLong((long) wxSYS_COLOUR_INFOBK));
|
||||
PyDict_SetItemString(d,"wxSYS_COLOUR_DESKTOP", PyInt_FromLong((long) wxSYS_COLOUR_DESKTOP));
|
||||
PyDict_SetItemString(d,"wxSYS_COLOUR_3DFACE", PyInt_FromLong((long) wxSYS_COLOUR_3DFACE));
|
||||
PyDict_SetItemString(d,"wxSYS_COLOUR_3DSHADOW", PyInt_FromLong((long) wxSYS_COLOUR_3DSHADOW));
|
||||
PyDict_SetItemString(d,"wxSYS_COLOUR_3DHIGHLIGHT", PyInt_FromLong((long) wxSYS_COLOUR_3DHIGHLIGHT));
|
||||
PyDict_SetItemString(d,"wxSYS_COLOUR_3DHILIGHT", PyInt_FromLong((long) wxSYS_COLOUR_3DHILIGHT));
|
||||
PyDict_SetItemString(d,"wxSYS_COLOUR_BTNHILIGHT", PyInt_FromLong((long) wxSYS_COLOUR_BTNHILIGHT));
|
||||
PyDict_SetItemString(d,"wxSYS_MOUSE_BUTTONS", PyInt_FromLong((long) wxSYS_MOUSE_BUTTONS));
|
||||
PyDict_SetItemString(d,"wxSYS_BORDER_X", PyInt_FromLong((long) wxSYS_BORDER_X));
|
||||
PyDict_SetItemString(d,"wxSYS_BORDER_Y", PyInt_FromLong((long) wxSYS_BORDER_Y));
|
||||
PyDict_SetItemString(d,"wxSYS_CURSOR_X", PyInt_FromLong((long) wxSYS_CURSOR_X));
|
||||
PyDict_SetItemString(d,"wxSYS_CURSOR_Y", PyInt_FromLong((long) wxSYS_CURSOR_Y));
|
||||
PyDict_SetItemString(d,"wxSYS_DCLICK_X", PyInt_FromLong((long) wxSYS_DCLICK_X));
|
||||
PyDict_SetItemString(d,"wxSYS_DCLICK_Y", PyInt_FromLong((long) wxSYS_DCLICK_Y));
|
||||
PyDict_SetItemString(d,"wxSYS_DRAG_X", PyInt_FromLong((long) wxSYS_DRAG_X));
|
||||
PyDict_SetItemString(d,"wxSYS_DRAG_Y", PyInt_FromLong((long) wxSYS_DRAG_Y));
|
||||
PyDict_SetItemString(d,"wxSYS_EDGE_X", PyInt_FromLong((long) wxSYS_EDGE_X));
|
||||
PyDict_SetItemString(d,"wxSYS_EDGE_Y", PyInt_FromLong((long) wxSYS_EDGE_Y));
|
||||
PyDict_SetItemString(d,"wxSYS_HSCROLL_ARROW_X", PyInt_FromLong((long) wxSYS_HSCROLL_ARROW_X));
|
||||
PyDict_SetItemString(d,"wxSYS_HSCROLL_ARROW_Y", PyInt_FromLong((long) wxSYS_HSCROLL_ARROW_Y));
|
||||
PyDict_SetItemString(d,"wxSYS_HTHUMB_X", PyInt_FromLong((long) wxSYS_HTHUMB_X));
|
||||
PyDict_SetItemString(d,"wxSYS_ICON_X", PyInt_FromLong((long) wxSYS_ICON_X));
|
||||
PyDict_SetItemString(d,"wxSYS_ICON_Y", PyInt_FromLong((long) wxSYS_ICON_Y));
|
||||
PyDict_SetItemString(d,"wxSYS_ICONSPACING_X", PyInt_FromLong((long) wxSYS_ICONSPACING_X));
|
||||
PyDict_SetItemString(d,"wxSYS_ICONSPACING_Y", PyInt_FromLong((long) wxSYS_ICONSPACING_Y));
|
||||
PyDict_SetItemString(d,"wxSYS_WINDOWMIN_X", PyInt_FromLong((long) wxSYS_WINDOWMIN_X));
|
||||
PyDict_SetItemString(d,"wxSYS_WINDOWMIN_Y", PyInt_FromLong((long) wxSYS_WINDOWMIN_Y));
|
||||
PyDict_SetItemString(d,"wxSYS_SCREEN_X", PyInt_FromLong((long) wxSYS_SCREEN_X));
|
||||
PyDict_SetItemString(d,"wxSYS_SCREEN_Y", PyInt_FromLong((long) wxSYS_SCREEN_Y));
|
||||
PyDict_SetItemString(d,"wxSYS_FRAMESIZE_X", PyInt_FromLong((long) wxSYS_FRAMESIZE_X));
|
||||
PyDict_SetItemString(d,"wxSYS_FRAMESIZE_Y", PyInt_FromLong((long) wxSYS_FRAMESIZE_Y));
|
||||
PyDict_SetItemString(d,"wxSYS_SMALLICON_X", PyInt_FromLong((long) wxSYS_SMALLICON_X));
|
||||
PyDict_SetItemString(d,"wxSYS_SMALLICON_Y", PyInt_FromLong((long) wxSYS_SMALLICON_Y));
|
||||
PyDict_SetItemString(d,"wxSYS_HSCROLL_Y", PyInt_FromLong((long) wxSYS_HSCROLL_Y));
|
||||
PyDict_SetItemString(d,"wxSYS_VSCROLL_X", PyInt_FromLong((long) wxSYS_VSCROLL_X));
|
||||
PyDict_SetItemString(d,"wxSYS_VSCROLL_ARROW_X", PyInt_FromLong((long) wxSYS_VSCROLL_ARROW_X));
|
||||
PyDict_SetItemString(d,"wxSYS_VSCROLL_ARROW_Y", PyInt_FromLong((long) wxSYS_VSCROLL_ARROW_Y));
|
||||
PyDict_SetItemString(d,"wxSYS_VTHUMB_Y", PyInt_FromLong((long) wxSYS_VTHUMB_Y));
|
||||
PyDict_SetItemString(d,"wxSYS_CAPTION_Y", PyInt_FromLong((long) wxSYS_CAPTION_Y));
|
||||
PyDict_SetItemString(d,"wxSYS_MENU_Y", PyInt_FromLong((long) wxSYS_MENU_Y));
|
||||
PyDict_SetItemString(d,"wxSYS_NETWORK_PRESENT", PyInt_FromLong((long) wxSYS_NETWORK_PRESENT));
|
||||
PyDict_SetItemString(d,"wxSYS_PENWINDOWS_PRESENT", PyInt_FromLong((long) wxSYS_PENWINDOWS_PRESENT));
|
||||
PyDict_SetItemString(d,"wxSYS_SHOW_SOUNDS", PyInt_FromLong((long) wxSYS_SHOW_SOUNDS));
|
||||
PyDict_SetItemString(d,"wxSYS_SWAP_BUTTONS", PyInt_FromLong((long) wxSYS_SWAP_BUTTONS));
|
||||
/*
|
||||
* These are the pointer type-equivalency mappings.
|
||||
* (Used by the SWIG pointer type-checker).
|
||||
|
||||
@@ -4,7 +4,7 @@ class wxSizePtr :
|
||||
def __init__(self,this):
|
||||
self.this = this
|
||||
self.thisown = 0
|
||||
def __del__(self):
|
||||
def __del__(self, miscc=miscc):
|
||||
if self.thisown == 1 :
|
||||
miscc.delete_wxSize(self.this)
|
||||
def Set(self,arg0,arg1):
|
||||
@@ -71,7 +71,7 @@ class wxRealPointPtr :
|
||||
def __init__(self,this):
|
||||
self.this = this
|
||||
self.thisown = 0
|
||||
def __del__(self):
|
||||
def __del__(self, miscc=miscc):
|
||||
if self.thisown == 1 :
|
||||
miscc.delete_wxRealPoint(self.this)
|
||||
def __setattr__(self,name,value):
|
||||
@@ -102,7 +102,7 @@ class wxPointPtr :
|
||||
def __init__(self,this):
|
||||
self.this = this
|
||||
self.thisown = 0
|
||||
def __del__(self):
|
||||
def __del__(self, miscc=miscc):
|
||||
if self.thisown == 1 :
|
||||
miscc.delete_wxPoint(self.this)
|
||||
def Set(self,arg0,arg1):
|
||||
@@ -141,7 +141,7 @@ class wxRectPtr :
|
||||
def __init__(self,this):
|
||||
self.this = this
|
||||
self.thisown = 0
|
||||
def __del__(self):
|
||||
def __del__(self, miscc=miscc):
|
||||
if self.thisown == 1 :
|
||||
miscc.delete_wxRect(self.this)
|
||||
def GetX(self):
|
||||
@@ -233,7 +233,7 @@ class wxPyTimerPtr :
|
||||
def __init__(self,this):
|
||||
self.this = this
|
||||
self.thisown = 0
|
||||
def __del__(self):
|
||||
def __del__(self, miscc=miscc):
|
||||
if self.thisown == 1 :
|
||||
miscc.delete_wxPyTimer(self.this)
|
||||
def Interval(self):
|
||||
@@ -360,7 +360,7 @@ class wxRegionPtr :
|
||||
def __init__(self,this):
|
||||
self.this = this
|
||||
self.thisown = 0
|
||||
def __del__(self):
|
||||
def __del__(self, miscc=miscc):
|
||||
if self.thisown == 1 :
|
||||
miscc.delete_wxRegion(self.this)
|
||||
def Clear(self):
|
||||
@@ -406,7 +406,7 @@ class wxRegionIteratorPtr :
|
||||
def __init__(self,this):
|
||||
self.this = this
|
||||
self.thisown = 0
|
||||
def __del__(self):
|
||||
def __del__(self, miscc=miscc):
|
||||
if self.thisown == 1 :
|
||||
miscc.delete_wxRegionIterator(self.this)
|
||||
def GetX(self):
|
||||
@@ -535,6 +535,16 @@ def wxMessageBox(arg0,*args):
|
||||
val = apply(miscc.wxMessageBox,(arg0,)+args)
|
||||
return val
|
||||
|
||||
def wxGetNumberFromUser(arg0,arg1,arg2,arg3,*args):
|
||||
argl = map(None,args)
|
||||
try: argl[2] = argl[2].this
|
||||
except: pass
|
||||
try: argl[3] = argl[3].this
|
||||
except: pass
|
||||
args = tuple(argl)
|
||||
val = apply(miscc.wxGetNumberFromUser,(arg0,arg1,arg2,arg3,)+args)
|
||||
return val
|
||||
|
||||
wxColourDisplay = miscc.wxColourDisplay
|
||||
|
||||
wxDisplayDepth = miscc.wxDisplayDepth
|
||||
@@ -612,6 +622,20 @@ wxResourceParseFile = miscc.wxResourceParseFile
|
||||
|
||||
wxResourceParseString = miscc.wxResourceParseString
|
||||
|
||||
def wxSystemSettings_GetSystemColour(arg0):
|
||||
val = miscc.wxSystemSettings_GetSystemColour(arg0)
|
||||
val = wxColourPtr(val)
|
||||
val.thisown = 1
|
||||
return val
|
||||
|
||||
def wxSystemSettings_GetSystemFont(arg0):
|
||||
val = miscc.wxSystemSettings_GetSystemFont(arg0)
|
||||
val = wxFontPtr(val)
|
||||
val.thisown = 1
|
||||
return val
|
||||
|
||||
wxSystemSettings_GetSystemMetric = miscc.wxSystemSettings_GetSystemMetric
|
||||
|
||||
|
||||
|
||||
#-------------- VARIABLE WRAPPERS ------------------
|
||||
@@ -638,3 +662,89 @@ wxAbsolute = miscc.wxAbsolute
|
||||
wxOutRegion = miscc.wxOutRegion
|
||||
wxPartRegion = miscc.wxPartRegion
|
||||
wxInRegion = miscc.wxInRegion
|
||||
wxSYS_WHITE_BRUSH = miscc.wxSYS_WHITE_BRUSH
|
||||
wxSYS_LTGRAY_BRUSH = miscc.wxSYS_LTGRAY_BRUSH
|
||||
wxSYS_GRAY_BRUSH = miscc.wxSYS_GRAY_BRUSH
|
||||
wxSYS_DKGRAY_BRUSH = miscc.wxSYS_DKGRAY_BRUSH
|
||||
wxSYS_BLACK_BRUSH = miscc.wxSYS_BLACK_BRUSH
|
||||
wxSYS_NULL_BRUSH = miscc.wxSYS_NULL_BRUSH
|
||||
wxSYS_HOLLOW_BRUSH = miscc.wxSYS_HOLLOW_BRUSH
|
||||
wxSYS_WHITE_PEN = miscc.wxSYS_WHITE_PEN
|
||||
wxSYS_BLACK_PEN = miscc.wxSYS_BLACK_PEN
|
||||
wxSYS_NULL_PEN = miscc.wxSYS_NULL_PEN
|
||||
wxSYS_OEM_FIXED_FONT = miscc.wxSYS_OEM_FIXED_FONT
|
||||
wxSYS_ANSI_FIXED_FONT = miscc.wxSYS_ANSI_FIXED_FONT
|
||||
wxSYS_ANSI_VAR_FONT = miscc.wxSYS_ANSI_VAR_FONT
|
||||
wxSYS_SYSTEM_FONT = miscc.wxSYS_SYSTEM_FONT
|
||||
wxSYS_DEVICE_DEFAULT_FONT = miscc.wxSYS_DEVICE_DEFAULT_FONT
|
||||
wxSYS_DEFAULT_PALETTE = miscc.wxSYS_DEFAULT_PALETTE
|
||||
wxSYS_SYSTEM_FIXED_FONT = miscc.wxSYS_SYSTEM_FIXED_FONT
|
||||
wxSYS_DEFAULT_GUI_FONT = miscc.wxSYS_DEFAULT_GUI_FONT
|
||||
wxSYS_COLOUR_SCROLLBAR = miscc.wxSYS_COLOUR_SCROLLBAR
|
||||
wxSYS_COLOUR_BACKGROUND = miscc.wxSYS_COLOUR_BACKGROUND
|
||||
wxSYS_COLOUR_ACTIVECAPTION = miscc.wxSYS_COLOUR_ACTIVECAPTION
|
||||
wxSYS_COLOUR_INACTIVECAPTION = miscc.wxSYS_COLOUR_INACTIVECAPTION
|
||||
wxSYS_COLOUR_MENU = miscc.wxSYS_COLOUR_MENU
|
||||
wxSYS_COLOUR_WINDOW = miscc.wxSYS_COLOUR_WINDOW
|
||||
wxSYS_COLOUR_WINDOWFRAME = miscc.wxSYS_COLOUR_WINDOWFRAME
|
||||
wxSYS_COLOUR_MENUTEXT = miscc.wxSYS_COLOUR_MENUTEXT
|
||||
wxSYS_COLOUR_WINDOWTEXT = miscc.wxSYS_COLOUR_WINDOWTEXT
|
||||
wxSYS_COLOUR_CAPTIONTEXT = miscc.wxSYS_COLOUR_CAPTIONTEXT
|
||||
wxSYS_COLOUR_ACTIVEBORDER = miscc.wxSYS_COLOUR_ACTIVEBORDER
|
||||
wxSYS_COLOUR_INACTIVEBORDER = miscc.wxSYS_COLOUR_INACTIVEBORDER
|
||||
wxSYS_COLOUR_APPWORKSPACE = miscc.wxSYS_COLOUR_APPWORKSPACE
|
||||
wxSYS_COLOUR_HIGHLIGHT = miscc.wxSYS_COLOUR_HIGHLIGHT
|
||||
wxSYS_COLOUR_HIGHLIGHTTEXT = miscc.wxSYS_COLOUR_HIGHLIGHTTEXT
|
||||
wxSYS_COLOUR_BTNFACE = miscc.wxSYS_COLOUR_BTNFACE
|
||||
wxSYS_COLOUR_BTNSHADOW = miscc.wxSYS_COLOUR_BTNSHADOW
|
||||
wxSYS_COLOUR_GRAYTEXT = miscc.wxSYS_COLOUR_GRAYTEXT
|
||||
wxSYS_COLOUR_BTNTEXT = miscc.wxSYS_COLOUR_BTNTEXT
|
||||
wxSYS_COLOUR_INACTIVECAPTIONTEXT = miscc.wxSYS_COLOUR_INACTIVECAPTIONTEXT
|
||||
wxSYS_COLOUR_BTNHIGHLIGHT = miscc.wxSYS_COLOUR_BTNHIGHLIGHT
|
||||
wxSYS_COLOUR_3DDKSHADOW = miscc.wxSYS_COLOUR_3DDKSHADOW
|
||||
wxSYS_COLOUR_3DLIGHT = miscc.wxSYS_COLOUR_3DLIGHT
|
||||
wxSYS_COLOUR_INFOTEXT = miscc.wxSYS_COLOUR_INFOTEXT
|
||||
wxSYS_COLOUR_INFOBK = miscc.wxSYS_COLOUR_INFOBK
|
||||
wxSYS_COLOUR_DESKTOP = miscc.wxSYS_COLOUR_DESKTOP
|
||||
wxSYS_COLOUR_3DFACE = miscc.wxSYS_COLOUR_3DFACE
|
||||
wxSYS_COLOUR_3DSHADOW = miscc.wxSYS_COLOUR_3DSHADOW
|
||||
wxSYS_COLOUR_3DHIGHLIGHT = miscc.wxSYS_COLOUR_3DHIGHLIGHT
|
||||
wxSYS_COLOUR_3DHILIGHT = miscc.wxSYS_COLOUR_3DHILIGHT
|
||||
wxSYS_COLOUR_BTNHILIGHT = miscc.wxSYS_COLOUR_BTNHILIGHT
|
||||
wxSYS_MOUSE_BUTTONS = miscc.wxSYS_MOUSE_BUTTONS
|
||||
wxSYS_BORDER_X = miscc.wxSYS_BORDER_X
|
||||
wxSYS_BORDER_Y = miscc.wxSYS_BORDER_Y
|
||||
wxSYS_CURSOR_X = miscc.wxSYS_CURSOR_X
|
||||
wxSYS_CURSOR_Y = miscc.wxSYS_CURSOR_Y
|
||||
wxSYS_DCLICK_X = miscc.wxSYS_DCLICK_X
|
||||
wxSYS_DCLICK_Y = miscc.wxSYS_DCLICK_Y
|
||||
wxSYS_DRAG_X = miscc.wxSYS_DRAG_X
|
||||
wxSYS_DRAG_Y = miscc.wxSYS_DRAG_Y
|
||||
wxSYS_EDGE_X = miscc.wxSYS_EDGE_X
|
||||
wxSYS_EDGE_Y = miscc.wxSYS_EDGE_Y
|
||||
wxSYS_HSCROLL_ARROW_X = miscc.wxSYS_HSCROLL_ARROW_X
|
||||
wxSYS_HSCROLL_ARROW_Y = miscc.wxSYS_HSCROLL_ARROW_Y
|
||||
wxSYS_HTHUMB_X = miscc.wxSYS_HTHUMB_X
|
||||
wxSYS_ICON_X = miscc.wxSYS_ICON_X
|
||||
wxSYS_ICON_Y = miscc.wxSYS_ICON_Y
|
||||
wxSYS_ICONSPACING_X = miscc.wxSYS_ICONSPACING_X
|
||||
wxSYS_ICONSPACING_Y = miscc.wxSYS_ICONSPACING_Y
|
||||
wxSYS_WINDOWMIN_X = miscc.wxSYS_WINDOWMIN_X
|
||||
wxSYS_WINDOWMIN_Y = miscc.wxSYS_WINDOWMIN_Y
|
||||
wxSYS_SCREEN_X = miscc.wxSYS_SCREEN_X
|
||||
wxSYS_SCREEN_Y = miscc.wxSYS_SCREEN_Y
|
||||
wxSYS_FRAMESIZE_X = miscc.wxSYS_FRAMESIZE_X
|
||||
wxSYS_FRAMESIZE_Y = miscc.wxSYS_FRAMESIZE_Y
|
||||
wxSYS_SMALLICON_X = miscc.wxSYS_SMALLICON_X
|
||||
wxSYS_SMALLICON_Y = miscc.wxSYS_SMALLICON_Y
|
||||
wxSYS_HSCROLL_Y = miscc.wxSYS_HSCROLL_Y
|
||||
wxSYS_VSCROLL_X = miscc.wxSYS_VSCROLL_X
|
||||
wxSYS_VSCROLL_ARROW_X = miscc.wxSYS_VSCROLL_ARROW_X
|
||||
wxSYS_VSCROLL_ARROW_Y = miscc.wxSYS_VSCROLL_ARROW_Y
|
||||
wxSYS_VTHUMB_Y = miscc.wxSYS_VTHUMB_Y
|
||||
wxSYS_CAPTION_Y = miscc.wxSYS_CAPTION_Y
|
||||
wxSYS_MENU_Y = miscc.wxSYS_MENU_Y
|
||||
wxSYS_NETWORK_PRESENT = miscc.wxSYS_NETWORK_PRESENT
|
||||
wxSYS_PENWINDOWS_PRESENT = miscc.wxSYS_PENWINDOWS_PRESENT
|
||||
wxSYS_SHOW_SOUNDS = miscc.wxSYS_SHOW_SOUNDS
|
||||
wxSYS_SWAP_BUTTONS = miscc.wxSYS_SWAP_BUTTONS
|
||||
|
||||
@@ -405,7 +405,6 @@ SWIGEXPORT(void,initmisc2c)() {
|
||||
SWIG_RegisterMapping("_wxCursor","_class_wxCursor",0);
|
||||
SWIG_RegisterMapping("_wxMask","_class_wxMask",0);
|
||||
SWIG_RegisterMapping("_wxToolTip","_class_wxToolTip",0);
|
||||
SWIG_RegisterMapping("_wxPyMenu","_class_wxPyMenu",0);
|
||||
SWIG_RegisterMapping("_wxPen","_class_wxPen",0);
|
||||
SWIG_RegisterMapping("_byte","_unsigned_char",0);
|
||||
SWIG_RegisterMapping("_long","_wxDash",0);
|
||||
@@ -488,7 +487,6 @@ SWIGEXPORT(void,initmisc2c)() {
|
||||
SWIG_RegisterMapping("_unsigned_int","_int",0);
|
||||
SWIG_RegisterMapping("_wxIcon","_class_wxIcon",0);
|
||||
SWIG_RegisterMapping("_wxDialog","_class_wxDialog",0);
|
||||
SWIG_RegisterMapping("_class_wxPyMenu","_wxPyMenu",0);
|
||||
SWIG_RegisterMapping("_class_wxPen","_wxPen",0);
|
||||
SWIG_RegisterMapping("_short","_WXTYPE",0);
|
||||
SWIG_RegisterMapping("_short","_unsigned_short",0);
|
||||
|
||||
@@ -4007,7 +4007,6 @@ SWIGEXPORT(void,initprintfwc)() {
|
||||
SWIG_RegisterMapping("_wxCursor","_class_wxCursor",0);
|
||||
SWIG_RegisterMapping("_wxNotifyEvent","_class_wxNotifyEvent",0);
|
||||
SWIG_RegisterMapping("_wxMask","_class_wxMask",0);
|
||||
SWIG_RegisterMapping("_wxPyMenu","_class_wxPyMenu",0);
|
||||
SWIG_RegisterMapping("_class_wxColourData","_wxColourData",0);
|
||||
SWIG_RegisterMapping("_class_wxPageSetupDialogData","_wxPageSetupDialogData",0);
|
||||
SWIG_RegisterMapping("_wxPrinter","_class_wxPrinter",0);
|
||||
@@ -4197,7 +4196,6 @@ SWIGEXPORT(void,initprintfwc)() {
|
||||
SWIG_RegisterMapping("_wxDialog","_class_wxPageSetupDialog",SwigwxPageSetupDialogTowxDialog);
|
||||
SWIG_RegisterMapping("_wxDialog","_wxPageSetupDialog",SwigwxPageSetupDialogTowxDialog);
|
||||
SWIG_RegisterMapping("_wxDialog","_class_wxDialog",0);
|
||||
SWIG_RegisterMapping("_class_wxPyMenu","_wxPyMenu",0);
|
||||
SWIG_RegisterMapping("_class_wxPen","_wxPen",0);
|
||||
SWIG_RegisterMapping("_class_wxFileDialog","_wxFileDialog",0);
|
||||
SWIG_RegisterMapping("_short","_WXTYPE",0);
|
||||
|
||||
@@ -21,7 +21,7 @@ class wxPrintDataPtr :
|
||||
def __init__(self,this):
|
||||
self.this = this
|
||||
self.thisown = 0
|
||||
def __del__(self):
|
||||
def __del__(self, printfwc=printfwc):
|
||||
if self.thisown == 1 :
|
||||
printfwc.delete_wxPrintData(self.this)
|
||||
def GetNoCopies(self):
|
||||
@@ -93,7 +93,7 @@ class wxPageSetupDialogDataPtr :
|
||||
def __init__(self,this):
|
||||
self.this = this
|
||||
self.thisown = 0
|
||||
def __del__(self):
|
||||
def __del__(self, printfwc=printfwc):
|
||||
if self.thisown == 1 :
|
||||
printfwc.delete_wxPageSetupDialogData(self.this)
|
||||
def EnableHelp(self,arg0):
|
||||
@@ -232,7 +232,7 @@ class wxPrintDialogDataPtr :
|
||||
def __init__(self,this):
|
||||
self.this = this
|
||||
self.thisown = 0
|
||||
def __del__(self):
|
||||
def __del__(self, printfwc=printfwc):
|
||||
if self.thisown == 1 :
|
||||
printfwc.delete_wxPrintDialogData(self.this)
|
||||
def EnableHelp(self,arg0):
|
||||
@@ -409,7 +409,7 @@ class wxPrinterPtr :
|
||||
def __init__(self,this):
|
||||
self.this = this
|
||||
self.thisown = 0
|
||||
def __del__(self):
|
||||
def __del__(self, printfwc=printfwc):
|
||||
if self.thisown == 1 :
|
||||
printfwc.delete_wxPrinter(self.this)
|
||||
def CreateAbortWindow(self,arg0,arg1):
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user