* The %name directive is now deprecated so I replaced most uses of
it with a custom %Rename macro that uses %rename internally.
These will evetually need to be replaced with a DocDecl macro
- when docstrings are added.
+ when docstrings are added for those items.
* The "this" attribute of all SWIGged classes is no longer a
string containing a "swigified pointer", but rather a custom
wxGTK: Applied patch for proper menu highlight colour detection in
wx.SystemSettings.
+wxGTK: Commited scrollbar patch #1093339 which sends lineup, linedown
+events based on intercepting the mouse down events.
+
+wxGTK: Applied patch #1102789 which solved conflicts between wxWidgets
+and GTK+'s context menu code.
+
+wxGTK: Applied patch #1100327 for correct feedback from DND actions
+(not all actions are allowed).
+
+Fixed memory leak in wxGRID::UpdateAttr[Rows][Or][Cols] (patch 1104355)
+
+For efficiency reasons, text controls no longer set the string for
+each text updated event, but rather query for the string value only
+when GetString is called from an event handler.
+
+Added wx.SL_INVERSE style which will cause wx.Slider to invert the min
+and max ends of the slider. (Only for wxGTK so far.)
+
+
%rename(TE_HT_ON_TEXT) wxTE_HT_ON_TEXT;
%rename(TE_HT_BELOW) wxTE_HT_BELOW;
%rename(TE_HT_BEYOND) wxTE_HT_BEYOND;
+%rename(OutOfRangeTextCoord) wxOutOfRangeTextCoord;
+%rename(InvalidTextCoord) wxInvalidTextCoord;
%rename(TextAttr) wxTextAttr;
%rename(TextCtrl) wxTextCtrl;
%rename(TextUrlEvent) wxTextUrlEvent;
%extend {
DocStr(wxCursor,
"Construct a Cursor from a file. Specify the type of file using
-wx.BITAMP_TYPE* constants, and specify the hotspot if not using a cur
-file.
-
-This constructor is not available on wxGTK, use ``wx.StockCursor``,
-``wx.CursorFromImage``, or ``wx.CursorFromBits`` instead.", "");
- wxCursor(const wxString* cursorName, long type, int hotSpotX=0, int hotSpotY=0) {
+wx.BITAMP_TYPE* constants, and specify the hotspot if not using a .cur
+file.","
+:see: Alternate constructors `wx.StockCursor`,`wx.CursorFromImage`, `wx.CursorFromBits`");
+ wxCursor(const wxString& cursorName, long type, int hotSpotX=0, int hotSpotY=0) {
%#ifdef __WXGTK__
- wxCHECK_MSG(false, NULL,
- wxT("wx.Cursor constructor not implemented for wxGTK, use wx.StockCursor, wx.CursorFromImage, or wx.CursorFromBits instead."));
+ wxImage img(cursorName, type);
+ img.SetOptionInt(wxIMAGE_OPTION_CUR_HOTSPOT_X, hotSpotX);
+ img.SetOptionInt(wxIMAGE_OPTION_CUR_HOTSPOT_Y, hotSpotY);
+ return new wxCursor(img);
%#else
- return new wxCursor(*cursorName, type, hotSpotX, hotSpotY);
+ return new wxCursor(cursorName, type, hotSpotX, hotSpotY);
%#endif
}
}
DocCtorStrName(
wxCursor(int id),
"Create a cursor using one of the stock cursors. Note that not all
-cursors are available on all platforms.", "",
+stock cursors are available on all platforms.", "",
StockCursor);
%{
#include <wx/datetime.h>
-
%}
-MAKE_CONST_WXSTRING2(DateFormatStr, wxT("%c"));
-MAKE_CONST_WXSTRING2(TimeSpanFormatStr, wxT("%H:%M:%S"));
+
+MAKE_CONST_WXSTRING(DefaultDateTimeFormat);
+MAKE_CONST_WXSTRING(DefaultTimeSpanFormat);
//---------------------------------------------------------------------------
// default, they will not change if they had valid values or will
// default to Today() otherwise)
int ParseFormat(const wxString& date,
- const wxString& format = wxPyDateFormatStr,
+ const wxString& format = wxPyDefaultDateTimeFormat,
const wxDateTime& dateDef = wxDefaultDateTime) {
const wxChar* rv;
const wxChar* _date = date;
// argument corresponds to the preferred date and time representation
// for the current locale) and returns the string containing the
// resulting text representation
- wxString Format(const wxString& format = wxPyDateFormatStr,
+ wxString Format(const wxString& format = wxPyDefaultDateTimeFormat,
const wxDateTime::TimeZone& tz = LOCAL_TZ) const;
// preferred date representation for the current locale
// resulting text representation. Notice that only some of format
// specifiers valid for wxDateTime are valid for wxTimeSpan: hours,
// minutes and seconds make sense, but not "PM/AM" string for example.
- wxString Format(const wxString& format = wxPyTimeSpanFormatStr) const;
+ wxString Format(const wxString& format = wxPyDefaultTimeSpanFormat) const;
%pythoncode {
def __repr__(self):
//---------------------------------------------------------------------------
+%{
+#if !WXWIN_COMPATIBILITY_2_4
+ #define wxHIDE_READONLY 0
+#endif
+%}
+
+
// General numeric #define's and etc. Making them all enums makes SWIG use the
// real macro when making the Python Int
wxRA_SPECIFY_COLS,
wxRB_GROUP,
wxRB_SINGLE,
- wxSL_HORIZONTAL,
- wxSL_VERTICAL,
- wxSL_AUTOTICKS,
- wxSL_LABELS,
- wxSL_LEFT,
- wxSL_TOP,
- wxSL_RIGHT,
- wxSL_BOTTOM,
- wxSL_BOTH,
- wxSL_SELRANGE,
wxSB_HORIZONTAL,
wxSB_VERTICAL,
wxST_SIZEGRIP,
wxPoint GetPosition() const;
wxRect GetRect() const;
- void SetRect(wxRect rect);
- %extend {
- void SetPosition(wxPoint pos) {
- self->m_pos = pos;
- }
- }
+ void SetRect(const wxRect& rect);
+ void SetPosition(const wxPoint& pos);
- wxPoint m_pos;
- wxRect m_rect;
+ %pythoncode {
+ m_pos = property(GetPosition, SetPosition)
+ m_rect = property(GetRect, SetRect)
+ }
};
//---------------------------------------------------------------------------
wxWindow *parent = NULL,
int x = -1, int y = -1);
+// WXWIN_COMPATIBILITY_2_4
MustHaveApp(wxGetNumberFromUser);
long wxGetNumberFromUser(const wxString& message,
const wxString& prompt,
}
%}
+//---------------------------------------------------------------------------
+
+// enum wxPowerType
+// {
+// wxPOWER_SOCKET,
+// wxPOWER_BATTERY,
+// wxPOWER_UNKNOWN
+// };
+
+// DocDeclStr(
+// wxPowerType , wxGetPowerType(),
+// "Returns the type of power source as one of wx.POWER_SOCKET,
+// wx.POWER_BATTERY or wx.POWER_UNKNOWN. wx.POWER_UNKNOWN is also the
+// default on platforms where this feature is not implemented.", "");
+
+
+// enum wxBatteryState
+// {
+// wxBATTERY_NORMAL_STATE, // system is fully usable
+// wxBATTERY_LOW_STATE, // start to worry
+// wxBATTERY_CRITICAL_STATE, // save quickly
+// wxBATTERY_SHUTDOWN_STATE, // too late
+// wxBATTERY_UNKNOWN_STATE
+// };
+
+// DocDeclStr(
+// wxBatteryState , wxGetBatteryState(),
+// "Returns battery state as one of wx.BATTERY_NORMAL_STATE,
+// wx.BATTERY_LOW_STATE}, wx.BATTERY_CRITICAL_STATE,
+// wx.BATTERY_SHUTDOWN_STATE or wx.BATTERY_UNKNOWN_STATE.
+// wx.BATTERY_UNKNOWN_STATE is also the default on platforms where this
+// feature is not implemented.", "");
+
+
+
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
class wxJoystickEvent : public wxEvent
{
public:
- wxPoint m_pos;
- int m_zPosition;
- int m_buttonChange; // Which button changed?
- int m_buttonState; // Which buttons are down?
- int m_joyStick; // Which joystick?
-
wxJoystickEvent(wxEventType type = wxEVT_NULL,
int state = 0,
int joystick = wxJOYSTICK1,
// Was the given button 1,2,3,4 or any in Down state?
bool ButtonIsDown(int but = wxJOY_BUTTON_ANY) const;
+
+ %pythoncode {
+ m_pos = property(GetPosition, SetPosition)
+ m_zPosition = property(GetZPosition, SetZPosition)
+ m_buttonChange = property(GetButtonChange, SetButtonChange)
+ m_buttonState = property(GetButtonState, SetButtonState)
+ m_joyStick = property(GetJoystick, SetJoystick)
+ }
};
#include <wx/listctrl.h>
%}
-MAKE_CONST_WXSTRING2(ListCtrlNameStr, _T("wxListCtrl"));
+MAKE_CONST_WXSTRING(ListCtrlNameStr);
//---------------------------------------------------------------------------
%newgroup
%constant wxEventType wxEVT_COMMAND_LIST_END_LABEL_EDIT;
%constant wxEventType wxEVT_COMMAND_LIST_DELETE_ITEM;
%constant wxEventType wxEVT_COMMAND_LIST_DELETE_ALL_ITEMS;
-%constant wxEventType wxEVT_COMMAND_LIST_GET_INFO;
-%constant wxEventType wxEVT_COMMAND_LIST_SET_INFO;
%constant wxEventType wxEVT_COMMAND_LIST_ITEM_SELECTED;
%constant wxEventType wxEVT_COMMAND_LIST_ITEM_DESELECTED;
%constant wxEventType wxEVT_COMMAND_LIST_KEY_DOWN;
%constant wxEventType wxEVT_COMMAND_LIST_COL_END_DRAG;
%constant wxEventType wxEVT_COMMAND_LIST_ITEM_FOCUSED;
+// WXWIN_COMPATIBILITY_2_4
+%constant wxEventType wxEVT_COMMAND_LIST_GET_INFO;
+%constant wxEventType wxEVT_COMMAND_LIST_SET_INFO;
%pythoncode {
//---------------------------------------------------------------------------
%newgroup;
+// WXWIN_COMPATIBILITY_2_4
class wxBookCtrlSizer: public wxSizer
{
//---------------------------------------------------------------------------
%newgroup
+enum {
+ wxSL_HORIZONTAL,
+ wxSL_VERTICAL,
+ wxSL_AUTOTICKS,
+ wxSL_LABELS,
+ wxSL_LEFT,
+ wxSL_TOP,
+ wxSL_RIGHT,
+ wxSL_BOTTOM,
+ wxSL_BOTH,
+ wxSL_SELRANGE,
+ wxSL_INVERSE
+};
+
+
MustHaveApp(wxSlider);
class wxSlider : public wxControl {
wxTE_HT_BEYOND // after [the end of line]
};
+
+enum {
+ wxOutOfRangeTextCoord,
+ wxInvalidTextCoord
+};
+
//---------------------------------------------------------------------------
// wxTextAttr: a structure containing the visual attributes of a text
MAKE_CONST_WXSTRING_NOSWIG(EmptyString);
MAKE_CONST_WXSTRING_NOSWIG(PanelNameStr);
-MAKE_CONST_WXSTRING2(DateTimeFormatStr, wxT("%c"));
-
+MAKE_CONST_WXSTRING_NOSWIG(DefaultDateTimeFormat);
//---------------------------------------------------------------------------
// OOR related typemaps and helper functions
{
public:
%pythonAppend wxGridCellDateTimeRenderer "self._setOORInfo(self)"
- wxGridCellDateTimeRenderer(wxString outformat = wxPyDateTimeFormatStr,
- wxString informat = wxPyDateTimeFormatStr);
+ wxGridCellDateTimeRenderer(wxString outformat = wxPyDefaultDateTimeFormat,
+ wxString informat = wxPyDefaultDateTimeFormat);
};
wxTE_HT_ON_TEXT = wx._controls.TE_HT_ON_TEXT
wxTE_HT_BELOW = wx._controls.TE_HT_BELOW
wxTE_HT_BEYOND = wx._controls.TE_HT_BEYOND
+wxOutOfRangeTextCoord = wx._controls.OutOfRangeTextCoord
+wxInvalidTextCoord = wx._controls.InvalidTextCoord
wxTextAttr = wx._controls.TextAttr
wxTextAttrPtr = wx._controls.TextAttrPtr
wxTextAttr_Combine = wx._controls.TextAttr_Combine
wxEVT_COMMAND_LIST_END_LABEL_EDIT = wx._controls.wxEVT_COMMAND_LIST_END_LABEL_EDIT
wxEVT_COMMAND_LIST_DELETE_ITEM = wx._controls.wxEVT_COMMAND_LIST_DELETE_ITEM
wxEVT_COMMAND_LIST_DELETE_ALL_ITEMS = wx._controls.wxEVT_COMMAND_LIST_DELETE_ALL_ITEMS
-wxEVT_COMMAND_LIST_GET_INFO = wx._controls.wxEVT_COMMAND_LIST_GET_INFO
-wxEVT_COMMAND_LIST_SET_INFO = wx._controls.wxEVT_COMMAND_LIST_SET_INFO
wxEVT_COMMAND_LIST_ITEM_SELECTED = wx._controls.wxEVT_COMMAND_LIST_ITEM_SELECTED
wxEVT_COMMAND_LIST_ITEM_DESELECTED = wx._controls.wxEVT_COMMAND_LIST_ITEM_DESELECTED
wxEVT_COMMAND_LIST_KEY_DOWN = wx._controls.wxEVT_COMMAND_LIST_KEY_DOWN
wxEVT_COMMAND_LIST_COL_DRAGGING = wx._controls.wxEVT_COMMAND_LIST_COL_DRAGGING
wxEVT_COMMAND_LIST_COL_END_DRAG = wx._controls.wxEVT_COMMAND_LIST_COL_END_DRAG
wxEVT_COMMAND_LIST_ITEM_FOCUSED = wx._controls.wxEVT_COMMAND_LIST_ITEM_FOCUSED
+wxEVT_COMMAND_LIST_GET_INFO = wx._controls.wxEVT_COMMAND_LIST_GET_INFO
+wxEVT_COMMAND_LIST_SET_INFO = wx._controls.wxEVT_COMMAND_LIST_SET_INFO
wxListCtrl = wx._controls.ListCtrl
wxListCtrlPtr = wx._controls.ListCtrlPtr
wxListCtrl = wx._controls.ListCtrl
wxConfigPathChanger = wx._misc.ConfigPathChanger
wxConfigPathChangerPtr = wx._misc.ConfigPathChangerPtr
wxExpandEnvVars = wx._misc.ExpandEnvVars
-wxDateFormatStr = wx._misc.DateFormatStr
-wxTimeSpanFormatStr = wx._misc.TimeSpanFormatStr
+wxDefaultDateTimeFormat = wx._misc.DefaultDateTimeFormat
+wxDefaultTimeSpanFormat = wx._misc.DefaultTimeSpanFormat
wxDateTime = wx._misc.DateTime
wxDateTimePtr = wx._misc.DateTimePtr
wxDateTime_SetCountry = wx._misc.DateTime_SetCountry
# Now assign all the reverse-renamed names:
-wxDateTimeFormatStr = wx.grid.DateTimeFormatStr
wxGRID_VALUE_STRING = wx.grid.GRID_VALUE_STRING
wxGRID_VALUE_BOOL = wx.grid.GRID_VALUE_BOOL
wxGRID_VALUE_NUMBER = wx.grid.GRID_VALUE_NUMBER