%import gdi.i
%pragma(python) code = "import wx"
+//%pragma(python) code = "import controls"
+//%pragma(python) code = "wxButtonPtr = controls.wxWindowPtr"
//---------------------------------------------------------------------------
%pragma(python) addtomethod = "__init__:wx._StdWindowCallbacks(self)"
void CaptureMouse();
- void Center(int direction = wxHORIZONTAL);
- void Centre(int direction = wxHORIZONTAL);
+ void Center(int direction = wxBOTH);
+ void Centre(int direction = wxBOTH);
+ void CentreOnParent(int direction = wxBOTH );
+ void CenterOnParent(int direction = wxBOTH );
%name(ClientToScreenXY)void ClientToScreen(int *BOTH, int *BOTH);
-#ifndef __WXGTK__
wxPoint ClientToScreen(const wxPoint& pt);
-#endif
bool Close(int force = FALSE);
bool Destroy();
void DestroyChildren();
%name(GetClientSizeTuple) void GetClientSize(int *OUTPUT, int *OUTPUT);
wxSize GetClientSize();
wxLayoutConstraints * GetConstraints();
-#ifdef __WXMSW__
- wxButton* GetDefaultItem();
-#endif
//wxEvtHandler* GetEventHandler();
wxFont& GetFont();
wxWindow * GetGrandParent();
int GetId();
wxString GetLabel();
+ void SetLabel(const wxString& label);
wxString GetName();
wxWindow * GetParent();
%name(GetPositionTuple) void GetPosition(int *OUTPUT, int *OUTPUT);
int *OUTPUT, int *OUTPUT, int *OUTPUT, int* OUTPUT,
const wxFont* font = NULL); //, bool use16 = FALSE)
wxString GetTitle();
+ wxRegion GetUpdateRegion();
long GetWindowStyleFlag();
+ bool Hide();
void InitDialog();
bool IsEnabled();
bool IsRetained();
bool IsShown();
+ bool IsTopLevel();
void Layout();
bool LoadFromResource(wxWindow* parent, const wxString& resourceName, const wxResourceTable* resourceTable = NULL);
void Lower();
void Move(const wxPoint& point);
//wxEvtHandler* PopEventHandler(bool deleteHandler = FALSE);
- bool PopupMenu(wxMenu *menu, int x, int y);
//void PushEventHandler(wxEvtHandler* handler);
+ %name(PopupMenuXY)bool PopupMenu(wxMenu *menu, int x, int y);
+ bool PopupMenu(wxMenu *menu, const wxPoint& pos);
+
void Raise();
void Refresh(bool eraseBackground = TRUE, const wxRect* rect = NULL);
void ReleaseMouse();
+ bool Reparent( wxWindow* newParent );
+
%name(ScreenToClientXY)void ScreenToClient(int *BOTH, int *BOTH);
-#ifndef __WXGTK__
wxPoint ScreenToClient(const wxPoint& pt);
-#endif
void ScrollWindow(int dx, int dy, const wxRect* rect = NULL);
void SetAcceleratorTable(const wxAcceleratorTable& accel);
void SetAutoLayout(bool autoLayout);
void SetBackgroundColour(const wxColour& colour);
void SetConstraints(wxLayoutConstraints *constraints);
-// void SetDoubleClick(bool allowDoubleClick);
void SetFocus();
void SetFont(const wxFont& font);
void SetForegroundColour(const wxColour& colour);
};
%pragma(python) code = "
-def wxDLG_PNT(win, point):
- return win.ConvertDialogPointToPixels(point)
-
-def wxDLG_SZE(win, size):
- return win.ConvertDialogSizeToPixels(size)
+def wxDLG_PNT(win, point_or_x, y=None):
+ if y is None:
+ return win.ConvertDialogPointToPixels(point_or_x)
+ else:
+ return win.ConvertDialogPointToPixels(wxPoint(point_or_x, y))
+
+def wxDLG_SZE(win, size_width, height=None):
+ if height is None:
+ return win.ConvertDialogSizeToPixels(size_width)
+ else:
+ return win.ConvertDialogSizeToPixels(wxSize(size_width, height))
"
#ifdef __WXMSW__
%pragma(python) addtomethod = "__init__:wx._StdWindowCallbacks(self)"
void InitDialog();
-
+ wxButton* GetDefaultItem();
+ void SetDefaultItem(wxButton *btn);
+
+ // fix a SWIG turd...
+ %pragma(python) addtoclass = "
+ def GetDefaultItem(self):
+ import controls
+ val = windowsc.wxPanel_GetDefaultItem(self.this)
+ val = controls.wxButtonPtr(val)
+ return val
+"
};
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
-class wxScrolledWindow : public wxWindow {
+class wxScrolledWindow : public wxPanel {
public:
wxScrolledWindow(wxWindow* parent,
const wxWindowID id = -1,
class wxMenu : public wxEvtHandler {
public:
- wxMenu(const wxString& title = wxPyEmptyStr);
+ wxMenu(const wxString& title = wxPyEmptyStr, long style = 0);
void Append(int id, const wxString& item,
const wxString& helpString = wxPyEmptyStr,
bool IsChecked(int id);
bool IsEnabled(int id);
void SetLabel(int id, const wxString& label);
+ void UpdateUI(wxEvtHandler* source = NULL);
};
// be used for PopupMenus, but you must retain a referece to it while using
// it.
//
-class wxPyMenu : public wxMenu {
-public:
- wxPyMenu(const wxString& title = wxPyEmptyStr, PyObject* func = NULL);
- ~wxPyMenu();
-};
+// class wxPyMenu : public wxMenu {
+// public:
+// wxPyMenu(const wxString& title = wxPyEmptyStr, PyObject* func = NULL);
+// ~wxPyMenu();
+// };
//----------------------------------------------------------------------
/////////////////////////////////////////////////////////////////////////////
//
// $Log$
+// Revision 1.18 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.17 1999/06/22 07:03:03 RD
+//
+// wxPython 2.1b1 for wxMSW (wxGTK coming soon)
+// Lots of changes, see the README.txt for details...
+//
// Revision 1.16 1999/05/15 00:56:04 RD
+//
// fixes for GetReturnCode/SetReturnCode
//
// Revision 1.15 1999/04/30 03:29:19 RD