mirror of
https://github.com/wxWidgets/wxWidgets.git
synced 2026-09-17 02:29:12 +08:00
Other odds and ends...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@9633 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -366,6 +366,7 @@ enum {
|
||||
wxMORE,
|
||||
wxSETUP,
|
||||
|
||||
|
||||
wxCENTRE,
|
||||
wxCENTER,
|
||||
wxSIZE_AUTO_WIDTH,
|
||||
@@ -418,6 +419,11 @@ enum {
|
||||
wxID_NO,
|
||||
wxID_STATIC,
|
||||
wxID_SEPARATOR,
|
||||
wxID_FORWARD,
|
||||
wxID_BACKWARD,
|
||||
wxID_SETUP,
|
||||
wxID_MORE,
|
||||
|
||||
|
||||
wxBITMAP_TYPE_BMP,
|
||||
wxBITMAP_TYPE_BMP_RESOURCE,
|
||||
|
||||
+1
-1
@@ -523,7 +523,7 @@ enum {
|
||||
class wxHtmlPrintout : public wxPyPrintout {
|
||||
public:
|
||||
wxHtmlPrintout(const char* title = "Printout");
|
||||
//~wxHtmlPrintout();
|
||||
//~wxHtmlPrintout(); wxPrintPreview object takes ownership...
|
||||
|
||||
void SetHtmlText(const wxString& html,
|
||||
const wxString &basepath = wxEmptyString,
|
||||
|
||||
+10
-10
@@ -64,12 +64,12 @@ extern PyObject *SWIG_newvarlink(void);
|
||||
|
||||
static PyObject* l_output_helper(PyObject* target, PyObject* o) {
|
||||
PyObject* o2;
|
||||
if (!target) {
|
||||
if (!target) {
|
||||
target = o;
|
||||
} else if (target == Py_None) {
|
||||
} else if (target == Py_None) {
|
||||
Py_DECREF(Py_None);
|
||||
target = o;
|
||||
} else {
|
||||
} else {
|
||||
if (!PyList_Check(target)) {
|
||||
o2 = target;
|
||||
target = PyList_New(0);
|
||||
@@ -86,23 +86,23 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) {
|
||||
PyObject* o2;
|
||||
PyObject* o3;
|
||||
|
||||
if (!target) {
|
||||
if (!target) {
|
||||
target = o;
|
||||
} else if (target == Py_None) {
|
||||
} else if (target == Py_None) {
|
||||
Py_DECREF(Py_None);
|
||||
target = o;
|
||||
} else {
|
||||
} else {
|
||||
if (!PyTuple_Check(target)) {
|
||||
o2 = target;
|
||||
target = PyTuple_New(1);
|
||||
PyTuple_SetItem(target, 0, o2);
|
||||
}
|
||||
o3 = PyTuple_New(1);
|
||||
PyTuple_SetItem(o3, 0, o);
|
||||
o3 = PyTuple_New(1);
|
||||
PyTuple_SetItem(o3, 0, o);
|
||||
|
||||
o2 = target;
|
||||
target = PySequence_Concat(o2, o3);
|
||||
Py_DECREF(o2);
|
||||
target = PySequence_Concat(o2, o3);
|
||||
Py_DECREF(o2);
|
||||
Py_DECREF(o3);
|
||||
}
|
||||
return target;
|
||||
|
||||
+587
-12
File diff suppressed because it is too large
Load Diff
@@ -623,8 +623,29 @@ class wxDialogPtr(wxPanelPtr):
|
||||
def SetReturnCode(self, *_args, **_kwargs):
|
||||
val = apply(windowsc.wxDialog_SetReturnCode,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def CreateTextSizer(self, *_args, **_kwargs):
|
||||
val = apply(windowsc.wxDialog_CreateTextSizer,(self,) + _args, _kwargs)
|
||||
if val: val = wxSizerPtr(val)
|
||||
return val
|
||||
def CreateButtonSizer(self, *_args, **_kwargs):
|
||||
val = apply(windowsc.wxDialog_CreateButtonSizer,(self,) + _args, _kwargs)
|
||||
if val: val = wxSizerPtr(val)
|
||||
return val
|
||||
def __repr__(self):
|
||||
return "<C wxDialog instance at %s>" % (self.this,)
|
||||
|
||||
# replace swig generated shadow methods to resolve import issues
|
||||
def CreateTextSizer(self, *_args, **_kwargs):
|
||||
import sizers
|
||||
val = apply(windowsc.wxDialog_CreateTextSizer,(self,) + _args, _kwargs)
|
||||
if val: val = sizers.wxSizerPtr(val)
|
||||
return val
|
||||
def CreateButtonSizer(self, *_args, **_kwargs):
|
||||
import sizers
|
||||
val = apply(windowsc.wxDialog_CreateButtonSizer,(self,) + _args, _kwargs)
|
||||
if val: val = sizers.wxSizerPtr(val)
|
||||
return val
|
||||
|
||||
class wxDialog(wxDialogPtr):
|
||||
def __init__(self,*_args,**_kwargs):
|
||||
self.this = apply(windowsc.new_wxDialog,_args,_kwargs)
|
||||
@@ -969,6 +990,49 @@ class wxMenuItemPtr :
|
||||
def SetAccel(self, *_args, **_kwargs):
|
||||
val = apply(windowsc.wxMenuItem_SetAccel,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def SetFont(self, *_args, **_kwargs):
|
||||
val = apply(windowsc.wxMenuItem_SetFont,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def GetFont(self, *_args, **_kwargs):
|
||||
val = apply(windowsc.wxMenuItem_GetFont,(self,) + _args, _kwargs)
|
||||
if val: val = wxFontPtr(val)
|
||||
return val
|
||||
def SetTextColour(self, *_args, **_kwargs):
|
||||
val = apply(windowsc.wxMenuItem_SetTextColour,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def GetTextColour(self, *_args, **_kwargs):
|
||||
val = apply(windowsc.wxMenuItem_GetTextColour,(self,) + _args, _kwargs)
|
||||
if val: val = wxColourPtr(val)
|
||||
return val
|
||||
def SetBackgroundColour(self, *_args, **_kwargs):
|
||||
val = apply(windowsc.wxMenuItem_SetBackgroundColour,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def GetBackgroundColour(self, *_args, **_kwargs):
|
||||
val = apply(windowsc.wxMenuItem_GetBackgroundColour,(self,) + _args, _kwargs)
|
||||
if val: val = wxColourPtr(val)
|
||||
return val
|
||||
def SetBitmaps(self, *_args, **_kwargs):
|
||||
val = apply(windowsc.wxMenuItem_SetBitmaps,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def SetBitmap(self, *_args, **_kwargs):
|
||||
val = apply(windowsc.wxMenuItem_SetBitmap,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def GetBitmap(self, *_args, **_kwargs):
|
||||
val = apply(windowsc.wxMenuItem_GetBitmap,(self,) + _args, _kwargs)
|
||||
if val: val = wxBitmapPtr(val)
|
||||
return val
|
||||
def SetMarginWidth(self, *_args, **_kwargs):
|
||||
val = apply(windowsc.wxMenuItem_SetMarginWidth,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def GetMarginWidth(self, *_args, **_kwargs):
|
||||
val = apply(windowsc.wxMenuItem_GetMarginWidth,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def IsOwnerDrawn(self, *_args, **_kwargs):
|
||||
val = apply(windowsc.wxMenuItem_IsOwnerDrawn,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def ResetOwnerDrawn(self, *_args, **_kwargs):
|
||||
val = apply(windowsc.wxMenuItem_ResetOwnerDrawn,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def __repr__(self):
|
||||
return "<C wxMenuItem instance at %s>" % (self.this,)
|
||||
class wxMenuItem(wxMenuItemPtr):
|
||||
@@ -1005,6 +1069,8 @@ wxWindow_PrevControlId = windowsc.wxWindow_PrevControlId
|
||||
|
||||
wxMenuItem_GetLabelFromText = windowsc.wxMenuItem_GetLabelFromText
|
||||
|
||||
wxMenuItem_GetDefaultMarginWidth = windowsc.wxMenuItem_GetDefaultMarginWidth
|
||||
|
||||
|
||||
|
||||
#-------------- VARIABLE WRAPPERS ------------------
|
||||
|
||||
@@ -2561,6 +2561,10 @@ SWIGEXPORT(void) initwxc() {
|
||||
PyDict_SetItemString(d,"wxID_NO", PyInt_FromLong((long) wxID_NO));
|
||||
PyDict_SetItemString(d,"wxID_STATIC", PyInt_FromLong((long) wxID_STATIC));
|
||||
PyDict_SetItemString(d,"wxID_SEPARATOR", PyInt_FromLong((long) wxID_SEPARATOR));
|
||||
PyDict_SetItemString(d,"wxID_FORWARD", PyInt_FromLong((long) wxID_FORWARD));
|
||||
PyDict_SetItemString(d,"wxID_BACKWARD", PyInt_FromLong((long) wxID_BACKWARD));
|
||||
PyDict_SetItemString(d,"wxID_SETUP", PyInt_FromLong((long) wxID_SETUP));
|
||||
PyDict_SetItemString(d,"wxID_MORE", PyInt_FromLong((long) wxID_MORE));
|
||||
PyDict_SetItemString(d,"wxBITMAP_TYPE_BMP", PyInt_FromLong((long) wxBITMAP_TYPE_BMP));
|
||||
PyDict_SetItemString(d,"wxBITMAP_TYPE_BMP_RESOURCE", PyInt_FromLong((long) wxBITMAP_TYPE_BMP_RESOURCE));
|
||||
PyDict_SetItemString(d,"wxBITMAP_TYPE_ICO", PyInt_FromLong((long) wxBITMAP_TYPE_ICO));
|
||||
|
||||
@@ -400,6 +400,10 @@ wxID_YES = wxc.wxID_YES
|
||||
wxID_NO = wxc.wxID_NO
|
||||
wxID_STATIC = wxc.wxID_STATIC
|
||||
wxID_SEPARATOR = wxc.wxID_SEPARATOR
|
||||
wxID_FORWARD = wxc.wxID_FORWARD
|
||||
wxID_BACKWARD = wxc.wxID_BACKWARD
|
||||
wxID_SETUP = wxc.wxID_SETUP
|
||||
wxID_MORE = wxc.wxID_MORE
|
||||
wxBITMAP_TYPE_BMP = wxc.wxBITMAP_TYPE_BMP
|
||||
wxBITMAP_TYPE_BMP_RESOURCE = wxc.wxBITMAP_TYPE_BMP_RESOURCE
|
||||
wxBITMAP_TYPE_ICO = wxc.wxBITMAP_TYPE_ICO
|
||||
|
||||
+40
-2
@@ -540,6 +540,24 @@ public:
|
||||
|
||||
int GetReturnCode();
|
||||
void SetReturnCode(int retCode);
|
||||
|
||||
wxSizer* CreateTextSizer( const wxString &message );
|
||||
wxSizer* CreateButtonSizer( long flags );
|
||||
|
||||
%pragma(python) addtoclass = "
|
||||
# replace swig generated shadow methods to resolve import issues
|
||||
def CreateTextSizer(self, *_args, **_kwargs):
|
||||
import sizers
|
||||
val = apply(windowsc.wxDialog_CreateTextSizer,(self,) + _args, _kwargs)
|
||||
if val: val = sizers.wxSizerPtr(val)
|
||||
return val
|
||||
def CreateButtonSizer(self, *_args, **_kwargs):
|
||||
import sizers
|
||||
val = apply(windowsc.wxDialog_CreateButtonSizer,(self,) + _args, _kwargs)
|
||||
if val: val = sizers.wxSizerPtr(val)
|
||||
return val
|
||||
"
|
||||
|
||||
};
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
@@ -586,7 +604,7 @@ public:
|
||||
|
||||
void Append(int id, const wxString& item,
|
||||
const wxString& helpString = wxPyEmptyStr,
|
||||
int checkable = FALSE);
|
||||
bool checkable = FALSE);
|
||||
%name(AppendMenu)void Append(int id, const wxString& item, wxMenu *subMenu,
|
||||
const wxString& helpString = wxPyEmptyStr);
|
||||
%name(AppendItem)void Append(const wxMenuItem* item);
|
||||
@@ -712,7 +730,27 @@ public:
|
||||
|
||||
static wxString GetLabelFromText(const wxString& text);
|
||||
|
||||
// TODO: Add wxOwnerDrawn methods, also look at other ownerdrawn classes...
|
||||
// wxOwnerDrawn methods
|
||||
// TODO: also look at other ownerdrawn classes...
|
||||
void SetFont(const wxFont& font);
|
||||
wxFont& GetFont();
|
||||
void SetTextColour(const wxColour& colText);
|
||||
wxColour& GetTextColour();
|
||||
void SetBackgroundColour(const wxColour& colBack);
|
||||
wxColour& GetBackgroundColour();
|
||||
void SetBitmaps(const wxBitmap& bmpChecked,
|
||||
const wxBitmap& bmpUnchecked = wxNullBitmap);
|
||||
void SetBitmap(const wxBitmap& bmpChecked);
|
||||
const wxBitmap& GetBitmap(bool bChecked = TRUE);
|
||||
void SetMarginWidth(int nWidth);
|
||||
int GetMarginWidth();
|
||||
static int GetDefaultMarginWidth();
|
||||
//void SetName(const wxString& strName);
|
||||
//const wxString& GetName();
|
||||
//void SetCheckable(bool checkable);
|
||||
//bool IsCheckable();
|
||||
bool IsOwnerDrawn();
|
||||
void ResetOwnerDrawn();
|
||||
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user