From d0e2ede057148772415ee526344f1a1597db3ae7 Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Mon, 29 May 2006 19:52:17 +0000 Subject: [PATCH] Added wxHyperlinkCtrl, wxPowerEvent, and lots of little things to match changes made in wx. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@39452 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- wxPython/docs/CHANGES.txt | 10 + wxPython/src/_cmndlgs.i | 208 ++++++++++-------- wxPython/src/_defs.i | 12 -- wxPython/src/_dirctrl.i | 3 +- wxPython/src/_event.i | 432 +++++++++++++++++++------------------- wxPython/src/_font.i | 42 ++-- wxPython/src/_functions.i | 35 --- wxPython/src/_hyperlink.i | 118 +++++++++++ wxPython/src/_listctrl.i | 19 ++ wxPython/src/_power.i | 108 ++++++++++ wxPython/src/_toolbar.i | 1 + wxPython/src/_window.i | 11 +- wxPython/src/controls.i | 2 +- wxPython/src/html.i | 6 +- wxPython/src/misc.i | 1 + 15 files changed, 630 insertions(+), 378 deletions(-) create mode 100644 wxPython/src/_hyperlink.i create mode 100644 wxPython/src/_power.i diff --git a/wxPython/docs/CHANGES.txt b/wxPython/docs/CHANGES.txt index 2fd3c0ec95..ee50857bf8 100644 --- a/wxPython/docs/CHANGES.txt +++ b/wxPython/docs/CHANGES.txt @@ -153,6 +153,16 @@ to OpenEditor to send the BEGIN_LABEL_EDIT event and to not allow the opening of the editor to continue if the event handler doesn't allow it. +wx.StaticBoxSizer now keeps better track of the wx.StaticBox, and it +will destroy it if the sizer is destroyed before the parent window is. + +Added wx.HyperlinkCtrl. + +Added battery and power related functions and events (wxMSW only so +far.) See wx.PowerEvent, wx.GetPowerType and wx.GetBatteryState. + +Added wx.ListCtrl.HitTestSubItem which returns the sub-item that was +hit (if any) in addition to the item and flags. diff --git a/wxPython/src/_cmndlgs.i b/wxPython/src/_cmndlgs.i index 3ea7d7badc..c731226806 100644 --- a/wxPython/src/_cmndlgs.i +++ b/wxPython/src/_cmndlgs.i @@ -30,48 +30,48 @@ DocStr(wxColourData, "This class holds a variety of information related to the colour chooser dialog, used to transfer settings and results to and from the `wx.ColourDialog`.", ""); - + class wxColourData : public wxObject { public: DocCtorStr( wxColourData(), "Constructor, sets default values.", ""); - + ~wxColourData(); - + DocDeclStr( bool , GetChooseFull(), "Under Windows, determines whether the Windows colour dialog will display the full dialog with custom colour selection controls. Has no meaning under other platforms. The default value is true.", ""); - + DocDeclStr( wxColour , GetColour(), "Gets the colour (pre)selected by the dialog.", ""); - + DocDeclStr( wxColour , GetCustomColour(int i), "Gets the i'th custom colour associated with the colour dialog. i should be an integer between 0 and 15. The default custom colours are all invalid colours.", ""); - + DocDeclStr( void , SetChooseFull(int flag), "Under Windows, tells the Windows colour dialog to display the full dialog with custom colour selection controls. Under other platforms, has no effect. The default value is true.", ""); - + DocDeclStr( void , SetColour(const wxColour& colour), "Sets the default colour for the colour dialog. The default colour is black.", ""); - + DocDeclStr( void , SetCustomColour(int i, const wxColour& colour), "Sets the i'th custom colour for the colour dialog. i should be an integer between 0 and 15. The default custom colours are all invalid colours.", ""); - + }; @@ -105,6 +105,11 @@ wxColour wxGetColourFromUser(wxWindow *parent = (wxWindow *)NULL, //-------------------------------------------------------------------------------- +enum { + wxDD_NEW_DIR_BUTTON, + wxDD_DEFAULT_STYLE, + wxDD_CHANGE_DIR, +}; DocStr(wxDirDialog, "wx.DirDialog allows the user to select a directory by browising the @@ -113,10 +118,17 @@ file system.", " Window Styles -------------- ==================== ========================================== + wx.DD_DEFAULT_STYLE Equivalent to a combination of + wx.DEFAULT_DIALOG_STYLE, wx.DD_NEW_DIR_BUTTON + and wx.RESIZE_BORDER. + wx.DD_NEW_DIR_BUTTON Add 'Create new directory' button and allow directory names to be editable. On Windows the new directory button is only available with recent versions of the common dialogs. + + wx.DD_CHANGE_DIR Change the current working directory to the + directory chosen by the user. ==================== ========================================== "); @@ -126,12 +138,12 @@ class wxDirDialog : public wxDialog { public: %pythonAppend wxDirDialog "self._setOORInfo(self)" %pythonAppend wxDirDialog() "" - + DocCtorStr( wxDirDialog(wxWindow* parent, const wxString& message = wxPyDirSelectorPromptStr, const wxString& defaultPath = wxPyEmptyString, - long style = 0, + long style = wxDD_DEFAULT_STYLE, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, const wxString& name = wxPyDirDialogNameStr), @@ -150,24 +162,43 @@ public: DocDeclStr( wxString , GetPath(), "Returns the default or user-selected path.", ""); - + DocDeclStr( wxString , GetMessage(), "Returns the message that will be displayed on the dialog.", ""); - + DocDeclStr( void , SetMessage(const wxString& message), "Sets the message that will be displayed on the dialog.", ""); - + DocDeclStr( void , SetPath(const wxString& path), "Sets the default path.", ""); - + }; //--------------------------------------------------------------------------- +enum { + // These will dissappear in 2.8 + wxOPEN, + wxSAVE, + wxHIDE_READONLY, + wxOVERWRITE_PROMPT, + wxFILE_MUST_EXIST, + wxMULTIPLE, + wxCHANGE_DIR, + + wxFD_OPEN, + wxFD_SAVE, + wxFD_OVERWRITE_PROMPT, + wxFD_FILE_MUST_EXIST, + wxFD_MULTIPLE, + wxFD_CHANGE_DIR, + wxFD_DEFAULT_STYLE, +}; + DocStr(wxFileDialog, "wx.FileDialog allows the user to select one or more files from the filesystem.", " @@ -191,24 +222,21 @@ types of file with a description for each, such as:: Window Styles -------------- - =================== ========================================== - wx.OPEN This is an open dialog. + ====================== ========================================== + wx.FD_OPEN This is an open dialog. - wx.SAVE This is a save dialog. + wx.FD_SAVE This is a save dialog. - wx.HIDE_READONLY For open dialog only: hide the checkbox - allowing to open the file in read-only mode. + wx.FD_OVERWRITE_PROMPT For save dialog only: prompt for a confirmation + if a file will be overwritten. - wx.OVERWRITE_PROMPT For save dialog only: prompt for a confirmation - if a file will be overwritten. + wx.FD_MULTIPLE For open dialog only: allows selecting multiple + files. - wx.MULTIPLE For open dialog only: allows selecting multiple - files. - - wx.CHANGE_DIR Change the current working directory to the - directory where the file(s) chosen by the user - are. - =================== ========================================== + wx.FD_CHANGE_DIR Change the current working directory to the + directory where the file(s) chosen by the user + are. + ====================== ========================================== "); @@ -225,7 +253,7 @@ public: const wxString& defaultDir = wxPyEmptyString, const wxString& defaultFile = wxPyEmptyString, const wxString& wildcard = wxPyFileSelectorDefaultWildcardStr, - long style = 0, + long style = wxFD_DEFAULT_STYLE, const wxPoint& pos = wxDefaultPosition), "Constructor. Use ShowModal method to show the dialog.", ""); @@ -233,20 +261,20 @@ public: DocDeclStr( void , SetMessage(const wxString& message), "Sets the message that will be displayed on the dialog.", ""); - + DocDeclStr( void , SetPath(const wxString& path), "Sets the path (the combined directory and filename that will be returned when the dialog is dismissed).", ""); - + DocDeclStr( void , SetDirectory(const wxString& dir), "Sets the default directory.", ""); - + DocDeclStr( void , SetFilename(const wxString& name), "Sets the default filename.", ""); - + DocDeclStr( void , SetWildcard(const wxString& wildCard), "Sets the wildcard, which can contain multiple file types, for @@ -254,39 +282,39 @@ example:: \"BMP files (*.bmp)|*.bmp|GIF files (*.gif)|*.gif\" ", ""); - + DocDeclStr( void , SetStyle(long style), "Sets the dialog style.", ""); - + DocDeclStr( void , SetFilterIndex(int filterIndex), "Sets the default filter index, starting from zero.", ""); - + DocDeclStr( wxString , GetMessage() const, "Returns the message that will be displayed on the dialog.", ""); - + DocDeclStr( wxString , GetPath() const, "Returns the full path (directory and filename) of the selected file.", ""); - + DocDeclStr( wxString , GetDirectory() const, "Returns the default directory.", ""); - + DocDeclStr( wxString , GetFilename() const, "Returns the default filename.", ""); - + DocDeclStr( wxString , GetWildcard() const, "Returns the file dialog wildcard.", ""); - + DocDeclStr( long , GetStyle() const, "Returns the dialog style.", ""); - + DocDeclStr( int , GetFilterIndex() const, "Returns the index into the list of filters supplied, optionally, in @@ -309,8 +337,8 @@ GetFilename for the others.", ""); DocStr(GetPaths, "Fills the array paths with the full paths of the files chosen. This function should only be used with the dialogs which have wx.MULTIPLE -style, use GetPath for the others.", ""); - +style, use GetPath for the others.", ""); + PyObject* GetPaths() { wxArrayString arr; self->GetPaths(arr); @@ -379,7 +407,7 @@ public: ", ""); - + DocDeclAStr( void, SetSelections(const wxArrayInt& selections), "SetSelections(List selections)", @@ -434,11 +462,11 @@ public: DocDeclStr( int , GetSelection(), "Get the index of teh currently selected item.", ""); - + DocDeclStr( wxString , GetStringSelection(), "Returns the string value of the currently selected item", ""); - + DocDeclStr( void , SetSelection(int sel), "Set the current selected item to sel", ""); @@ -471,7 +499,7 @@ public: wxString , GetValue(), "Returns the text that the user has entered if the user has pressed OK, or the original value if the user has pressed Cancel.", ""); - + DocDeclStr( void , SetValue(const wxString& value), "Sets the default text value.", ""); @@ -510,60 +538,60 @@ public: "Enables or disables 'effects' under MS Windows only. This refers to the controls for manipulating colour, strikeout and underline properties. The default value is true.", ""); - + DocDeclStr( bool , GetAllowSymbols(), "Under MS Windows, returns a flag determining whether symbol fonts can be selected. Has no effect on other platforms. The default value is true.", ""); - + DocDeclStr( wxColour , GetColour(), "Gets the colour associated with the font dialog. The default value is black.", ""); - + DocDeclStr( wxFont , GetChosenFont(), "Gets the font chosen by the user.", ""); - + DocDeclStr( bool , GetEnableEffects(), "Determines whether 'effects' are enabled under Windows.", ""); - + DocDeclStr( wxFont , GetInitialFont(), "Gets the font that will be initially used by the font dialog. This should have previously been set by the application.", ""); - + DocDeclStr( bool , GetShowHelp(), "Returns true if the Help button will be shown (Windows only). The default value is false.", ""); - + DocDeclStr( void , SetAllowSymbols(bool allowSymbols), "Under MS Windows, determines whether symbol fonts can be selected. Has no effect on other platforms. The default value is true.", ""); - + DocDeclStr( void , SetChosenFont(const wxFont& font), "Sets the font that will be returned to the user (normally for internal use only).", ""); - + DocDeclStr( void , SetColour(const wxColour& colour), "Sets the colour that will be used for the font foreground colour. The default colour is black.", ""); - + DocDeclStr( void , SetInitialFont(const wxFont& font), "Sets the font that will be initially used by the font dialog.", ""); - + DocDeclStr( void , SetRange(int min, int max), "Sets the valid range for the font point size (Windows only). The default is 0, 0 (unrestricted range).", ""); - + DocDeclStr( void , SetShowHelp(bool showHelp), "Determines whether the Help button will be displayed in the font @@ -592,11 +620,11 @@ the dialog. If ShowModal returns ``wx.ID_OK`` then you can fetch the results with via the `wx.FontData` returned by `GetFontData`.", ""); wxFontDialog(wxWindow* parent, const wxFontData& data); - + DocDeclStr( wxFontData& , GetFontData(), "Returns a reference to the internal `wx.FontData` used by the -wx.FontDialog.", ""); +wx.FontDialog.", ""); }; @@ -638,7 +666,7 @@ MustHaveApp(wxMessageDialog); class wxMessageDialog : public wxDialog { public: %pythonAppend wxMessageDialog "self._setOORInfo(self)" - + DocCtorStr( wxMessageDialog(wxWindow* parent, const wxString& message, @@ -731,12 +759,12 @@ If the ``continue`` return value is ``false``, the application can either immediately destroy the dialog or ask the user for confirmation, and if the abort is not confirmed the dialog may be resumed with `Resume` function. ", ""); - + DocDeclStr( void , Resume(), "Can be used to continue with the dialog, after the user had chosen to abort.", ""); - + }; //--------------------------------------------------------------------------- @@ -786,11 +814,11 @@ EVT_FIND_REPLACE_ALL = wx.PyEventBinder( wxEVT_COMMAND_FIND_REPLACE_ALL, 1 ) EVT_FIND_CLOSE = wx.PyEventBinder( wxEVT_COMMAND_FIND_CLOSE, 1 ) %# For backwards compatibility. Should they be removed? -EVT_COMMAND_FIND = EVT_FIND +EVT_COMMAND_FIND = EVT_FIND EVT_COMMAND_FIND_NEXT = EVT_FIND_NEXT EVT_COMMAND_FIND_REPLACE = EVT_FIND_REPLACE EVT_COMMAND_FIND_REPLACE_ALL = EVT_FIND_REPLACE_ALL -EVT_COMMAND_FIND_CLOSE = EVT_FIND_CLOSE +EVT_COMMAND_FIND_CLOSE = EVT_FIND_CLOSE } @@ -801,33 +829,33 @@ class wxFindDialogEvent : public wxCommandEvent { public: wxFindDialogEvent(wxEventType commandType = wxEVT_NULL, int id = 0); - + DocDeclStr( int , GetFlags(), "Get the currently selected flags: this is the combination of wx.FR_DOWN, wx.FR_WHOLEWORD and wx.FR_MATCHCASE flags.", ""); - + DocDeclStr( const wxString& , GetFindString(), "Return the string to find (never empty).", ""); - + DocDeclStr( const wxString& , GetReplaceString(), "Return the string to replace the search string with (only for replace and replace all events).", ""); - + DocDeclStr( wxFindReplaceDialog *, GetDialog(), "Return the pointer to the dialog which generated this event.", ""); - + DocDeclStr( void , SetFlags(int flags), "", ""); - + DocDeclStr( void , SetFindString(const wxString& str), "", ""); - + DocDeclStr( void , SetReplaceString(const wxString& str), "", ""); @@ -835,7 +863,7 @@ and replace all events).", ""); -DocStr(wxFindReplaceData, +DocStr(wxFindReplaceData, "wx.FindReplaceData holds the data for wx.FindReplaceDialog. It is used to initialize the dialog with the default values and will keep the last values from the dialog when it is closed. It is also updated each @@ -847,7 +875,7 @@ dialog and calling them has no effect later.", " Flags ----- - ================ =============================================== + ================ =============================================== wx.FR_DOWN Downward search/replace selected (otherwise, upwards) @@ -855,7 +883,7 @@ Flags wx.FR_MATCHCASE Case sensitive search/replace selected (otherwise, case insensitive) - ================ =============================================== + ================ =============================================== "); @@ -867,34 +895,34 @@ public: DocCtorStr( wxFindReplaceData(int flags=0), "Constuctor initializes the flags to default value (0).", ""); - + ~wxFindReplaceData(); - + DocDeclStr( const wxString& , GetFindString(), "Get the string to find.", ""); - + DocDeclStr( const wxString& , GetReplaceString(), "Get the replacement string.", ""); - + DocDeclStr( int , GetFlags(), "Get the combination of flag values.", ""); - + DocDeclStr( void , SetFlags(int flags), "Set the flags to use to initialize the controls of the dialog.", ""); - + DocDeclStr( void , SetFindString(const wxString& str), "Set the string to find (used as initial value by the dialog).", ""); - + DocDeclStr( void , SetReplaceString(const wxString& str), "Set the replacement string (used as initial value by the dialog).", ""); - + }; @@ -944,21 +972,21 @@ non-None. Use Show to display the dialog.", ""); "Precreate a FindReplaceDialog for 2-phase creation", "", PreFindReplaceDialog); - + DocDeclStr( bool , Create(wxWindow *parent, wxFindReplaceData *data, const wxString &title, int style = 0), "Create the dialog, for 2-phase create.", ""); - + DocDeclStr( const wxFindReplaceData *, GetData(), "Get the FindReplaceData object used by this dialog.", ""); - + DocDeclStr( void , SetData(wxFindReplaceData *data), "Set the FindReplaceData object used by this dialog.", ""); - + }; //--------------------------------------------------------------------------- diff --git a/wxPython/src/_defs.i b/wxPython/src/_defs.i index 2d5bad3926..9a7704d505 100644 --- a/wxPython/src/_defs.i +++ b/wxPython/src/_defs.i @@ -679,14 +679,6 @@ enum { wxID_HIGHEST, - wxOPEN, - wxSAVE, - wxHIDE_READONLY, - wxOVERWRITE_PROMPT, - wxFILE_MUST_EXIST, - wxMULTIPLE, - wxCHANGE_DIR, - wxACCEL_ALT, wxACCEL_CTRL, wxACCEL_SHIFT, @@ -701,10 +693,6 @@ enum { wxPD_SMOOTH, wxPD_CAN_SKIP, - wxDD_NEW_DIR_BUTTON, - wxDD_DEFAULT_STYLE, - wxDD_CHANGE_DIR, - wxMENU_TEAROFF, wxMB_DOCKABLE, wxNO_FULL_REPAINT_ON_RESIZE, diff --git a/wxPython/src/_dirctrl.i b/wxPython/src/_dirctrl.i index 79a2d72a2a..0486a1bf4c 100644 --- a/wxPython/src/_dirctrl.i +++ b/wxPython/src/_dirctrl.i @@ -86,7 +86,8 @@ public: // Try to expand as much of the given path as possible. virtual bool ExpandPath(const wxString& path); - + // collapse the path + virtual bool CollapsePath(const wxString& path); virtual inline wxString GetDefaultPath() const; virtual void SetDefaultPath(const wxString& path); diff --git a/wxPython/src/_event.i b/wxPython/src/_event.i index faa206f414..f2a5aab355 100644 --- a/wxPython/src/_event.i +++ b/wxPython/src/_event.i @@ -142,7 +142,6 @@ wxEventType wxNewEventType(); %constant wxEventType wxEVT_END_SESSION; %constant wxEventType wxEVT_QUERY_END_SESSION; %constant wxEventType wxEVT_ACTIVATE_APP; -%constant wxEventType wxEVT_POWER; %constant wxEventType wxEVT_ACTIVATE; %constant wxEventType wxEVT_CREATE; %constant wxEventType wxEVT_DESTROY; @@ -208,7 +207,7 @@ EVT_ERASE_BACKGROUND = wx.PyEventBinder( wxEVT_ERASE_BACKGROUND ) EVT_CHAR = wx.PyEventBinder( wxEVT_CHAR ) EVT_KEY_DOWN = wx.PyEventBinder( wxEVT_KEY_DOWN ) EVT_KEY_UP = wx.PyEventBinder( wxEVT_KEY_UP ) -EVT_HOTKEY = wx.PyEventBinder( wxEVT_HOTKEY, 1) +EVT_HOTKEY = wx.PyEventBinder( wxEVT_HOTKEY, 1) EVT_CHAR_HOOK = wx.PyEventBinder( wxEVT_CHAR_HOOK ) EVT_MENU_OPEN = wx.PyEventBinder( wxEVT_MENU_OPEN ) EVT_MENU_CLOSE = wx.PyEventBinder( wxEVT_MENU_CLOSE ) @@ -219,7 +218,7 @@ EVT_KILL_FOCUS = wx.PyEventBinder( wxEVT_KILL_FOCUS ) EVT_CHILD_FOCUS = wx.PyEventBinder( wxEVT_CHILD_FOCUS ) EVT_ACTIVATE = wx.PyEventBinder( wxEVT_ACTIVATE ) EVT_ACTIVATE_APP = wx.PyEventBinder( wxEVT_ACTIVATE_APP ) -EVT_HIBERNATE = wx.PyEventBinder( wxEVT_HIBERNATE ) +EVT_HIBERNATE = wx.PyEventBinder( wxEVT_HIBERNATE ) EVT_END_SESSION = wx.PyEventBinder( wxEVT_END_SESSION ) EVT_QUERY_END_SESSION = wx.PyEventBinder( wxEVT_QUERY_END_SESSION ) EVT_DROP_FILES = wx.PyEventBinder( wxEVT_DROP_FILES ) @@ -268,11 +267,11 @@ EVT_MOUSE_EVENTS = wx.PyEventBinder([ wxEVT_LEFT_DOWN, %# Scrolling from wxWindow (sent to wxScrolledWindow) -EVT_SCROLLWIN = wx.PyEventBinder([ wxEVT_SCROLLWIN_TOP, +EVT_SCROLLWIN = wx.PyEventBinder([ wxEVT_SCROLLWIN_TOP, wxEVT_SCROLLWIN_BOTTOM, wxEVT_SCROLLWIN_LINEUP, wxEVT_SCROLLWIN_LINEDOWN, - wxEVT_SCROLLWIN_PAGEUP, + wxEVT_SCROLLWIN_PAGEUP, wxEVT_SCROLLWIN_PAGEDOWN, wxEVT_SCROLLWIN_THUMBTRACK, wxEVT_SCROLLWIN_THUMBRELEASE, @@ -288,14 +287,14 @@ EVT_SCROLLWIN_THUMBTRACK = wx.PyEventBinder( wxEVT_SCROLLWIN_THUMBTRACK ) EVT_SCROLLWIN_THUMBRELEASE = wx.PyEventBinder( wxEVT_SCROLLWIN_THUMBRELEASE ) %# Scrolling from wx.Slider and wx.ScrollBar -EVT_SCROLL = wx.PyEventBinder([ wxEVT_SCROLL_TOP, - wxEVT_SCROLL_BOTTOM, - wxEVT_SCROLL_LINEUP, - wxEVT_SCROLL_LINEDOWN, - wxEVT_SCROLL_PAGEUP, - wxEVT_SCROLL_PAGEDOWN, - wxEVT_SCROLL_THUMBTRACK, - wxEVT_SCROLL_THUMBRELEASE, +EVT_SCROLL = wx.PyEventBinder([ wxEVT_SCROLL_TOP, + wxEVT_SCROLL_BOTTOM, + wxEVT_SCROLL_LINEUP, + wxEVT_SCROLL_LINEDOWN, + wxEVT_SCROLL_PAGEUP, + wxEVT_SCROLL_PAGEDOWN, + wxEVT_SCROLL_THUMBTRACK, + wxEVT_SCROLL_THUMBRELEASE, wxEVT_SCROLL_CHANGED, ]) @@ -309,15 +308,15 @@ EVT_SCROLL_THUMBTRACK = wx.PyEventBinder( wxEVT_SCROLL_THUMBTRACK ) EVT_SCROLL_THUMBRELEASE = wx.PyEventBinder( wxEVT_SCROLL_THUMBRELEASE ) EVT_SCROLL_CHANGED = wx.PyEventBinder( wxEVT_SCROLL_CHANGED ) EVT_SCROLL_ENDSCROLL = EVT_SCROLL_CHANGED - + %# Scrolling from wx.Slider and wx.ScrollBar, with an id -EVT_COMMAND_SCROLL = wx.PyEventBinder([ wxEVT_SCROLL_TOP, - wxEVT_SCROLL_BOTTOM, - wxEVT_SCROLL_LINEUP, - wxEVT_SCROLL_LINEDOWN, - wxEVT_SCROLL_PAGEUP, - wxEVT_SCROLL_PAGEDOWN, - wxEVT_SCROLL_THUMBTRACK, +EVT_COMMAND_SCROLL = wx.PyEventBinder([ wxEVT_SCROLL_TOP, + wxEVT_SCROLL_BOTTOM, + wxEVT_SCROLL_LINEUP, + wxEVT_SCROLL_LINEDOWN, + wxEVT_SCROLL_PAGEUP, + wxEVT_SCROLL_PAGEDOWN, + wxEVT_SCROLL_THUMBTRACK, wxEVT_SCROLL_THUMBRELEASE, wxEVT_SCROLL_CHANGED, ], 1) @@ -392,43 +391,43 @@ public: DocDeclStr( void , SetEventType(wxEventType typ), "Sets the specific type of the event.", ""); - + DocDeclStr( wxEventType , GetEventType() const, "Returns the identifier of the given event type, such as ``wxEVT_COMMAND_BUTTON_CLICKED``.", ""); - + DocDeclStr( wxObject *, GetEventObject() const, "Returns the object (usually a window) associated with the event, if any.", ""); - + DocDeclStr( void , SetEventObject(wxObject *obj), "Sets the originating object, or in other words, obj is normally the object that is sending the event.", ""); - + long GetTimestamp() const; void SetTimestamp(long ts = 0); - + DocDeclStr( int , GetId() const, "Returns the identifier associated with this event, such as a button command id.", ""); - + DocDeclStr( void , SetId(int Id), "Set's the ID for the event. This is usually the ID of the window that is sending the event, but it can also be a command id from a menu item, etc.", ""); - + DocDeclStr( bool , IsCommandEvent() const, "Returns true if the event is or is derived from `wx.CommandEvent` else it returns false. Note: Exists only for optimization purposes.", ""); - + DocDeclStr( void , Skip(bool skip = true), @@ -440,18 +439,18 @@ returned to the sender of the event immediately after the current handler has finished. Skip(True) will cause the event processing system to continue searching for a handler function for this event. ", ""); - + DocDeclStr( bool , GetSkipped() const, "Returns true if the event handler should be skipped, false otherwise. :see: `Skip`", ""); - + DocDeclStr( bool , ShouldPropagate() const, "Test if this event should be propagated to the parent window or not, i.e. if the propagation level is currently greater than 0.", ""); - + // Stop an event from propagating to its parent window, returns the old // propagation level value @@ -460,7 +459,7 @@ i.e. if the propagation level is currently greater than 0.", ""); "Stop the event from propagating to its parent window. Returns the old propagation level value which may be later passed to `ResumePropagation` to allow propagating the event again.", ""); - + DocDeclStr( void , ResumePropagation(int propagationLevel), @@ -468,7 +467,7 @@ propagation level value which may be later passed to example, you can use the value returned by an earlier call to `StopPropagation`.) ", ""); - + // this function is used to create a copy of the event polymorphically and // all derived classes must implement it because otherwise wxPostEvent() @@ -525,19 +524,19 @@ public: // void SetClientObject(wxClientData* clientObject) { m_clientObject = clientObject; } // void *GetClientObject() const { return m_clientObject; } - + DocDeclStr( int , GetSelection() const, "Returns item index for a listbox or choice selection event (not valid for a deselection).", ""); - + void SetString(const wxString& s); DocDeclStr( wxString , GetString() const, "Returns item string for a listbox or choice selection event (not valid for a deselection).", ""); - + DocDeclStr( bool , IsChecked() const, @@ -546,14 +545,14 @@ checkboxes, the method returns true for a selection event and false for a deselection one. For the menu events, this method indicates if the menu item just has become checked or unchecked (and thus only makes sense for checkable menu items).", ""); - + %pythoncode { Checked = IsChecked } - + DocDeclStr( bool , IsSelection() const, "For a listbox or similar event, returns true if it is a selection, false if it is a deselection.", ""); - + void SetExtraLong(long extraLong); DocDeclStr( @@ -564,7 +563,7 @@ whether the event was a selection (true) or a deselection (false). A listbox deselection only occurs for multiple-selection boxes, and in this case the index and string values are indeterminate and the listbox must be examined by the application.", ""); - + void SetInt(int i); DocDeclStr( @@ -572,7 +571,7 @@ listbox must be examined by the application.", ""); "Returns the integer identifier corresponding to a listbox, choice or radiobox selection (only if the event was a selection, not a deselection), or a boolean value representing the value of a checkbox.", ""); - + %extend { DocStr(GetClientData, @@ -599,7 +598,7 @@ deselection), or a boolean value representing the value of a checkbox.", ""); GetClientObject = GetClientData SetClientObject = SetClientData } - + virtual wxEvent *Clone() const; }; @@ -625,7 +624,7 @@ public: It is in general a good idea to notify the user about the reasons for vetoing the change because otherwise the applications behaviour (which just refuses to do what the user wants) might be quite surprising.", ""); - + DocDeclStr( void , Allow(), @@ -633,13 +632,13 @@ just refuses to do what the user wants) might be quite surprising.", ""); processed. For most events it is not necessary to call this method as the events are allowed anyhow but some are forbidden by default (this will be mentioned in the corresponding event description).", ""); - + DocDeclStr( bool , IsAllowed(), "Returns true if the change is allowed (`Veto` hasn't been called) or false otherwise (if it was).", ""); - + }; @@ -699,11 +698,11 @@ public: int , GetOrientation() const, "Returns wx.HORIZONTAL or wx.VERTICAL, depending on the orientation of the scrollbar.", ""); - + DocDeclStr( int , GetPosition() const, "Returns the position of the scrollbar.", ""); - + void SetOrientation(int orient); void SetPosition(int pos); }; @@ -745,13 +744,13 @@ public: int , GetOrientation() const, "Returns wx.HORIZONTAL or wx.VERTICAL, depending on the orientation of the scrollbar.", ""); - + DocDeclStr( int , GetPosition() const, "Returns the position of the scrollbar for the thumb track and release events. Note that this field can't be used for the other events, you need to query the window itself for the current position in that case.", ""); - + void SetOrientation(int orient); void SetPosition(int pos); }; @@ -846,7 +845,7 @@ public: bool , IsButton() const, "Returns true if the event was a mouse button event (not necessarily a button down event - that may be tested using `ButtonDown`).", ""); - + DocDeclStr( bool , ButtonDown(int but = wxMOUSE_BTN_ANY) const, @@ -854,7 +853,7 @@ button down event - that may be tested using `ButtonDown`).", ""); mouse button down event. Otherwise the argument specifies which button-down event shold be checked for (see `Button` for the possible values).", ""); - + DocDeclStr( bool , ButtonDClick(int but = wxMOUSE_BTN_ANY) const, @@ -862,14 +861,14 @@ values).", ""); mouse double click event. Otherwise the argument specifies which double click event to check for (see `Button` for the possible values).", ""); - + DocDeclStr( bool , ButtonUp(int but = wxMOUSE_BTN_ANY) const, "If the argument is omitted, this returns true if the event was any mouse button up event. Otherwise the argument specifies which button up event to check for (see `Button` for the possible values).", ""); - + DocDeclStr( bool , Button(int button) const, @@ -883,7 +882,7 @@ values of button are: wx.MOUSE_BTN_ANY check if any button was pressed ==================== ===================================== ", ""); - + // Was the given button in Down state? bool ButtonIsDown(int but) const; @@ -896,25 +895,25 @@ leave event, for example). Otherwise wx.MOUSE_BTN_LEFT is returned for the left button down, up and double click events, wx.MOUSE_BTN_MIDDLE and wx.MOUSE_BTN_RIGHT for the same events for the middle and the right buttons respectively.", ""); - + DocDeclStr( bool , ControlDown() const, "Returns true if the control key was down at the time of the event.", ""); - + DocDeclStr( bool , MetaDown() const, "Returns true if the Meta key was down at the time of the event.", ""); - - + + DocDeclStr( bool , AltDown() const, "Returns true if the Alt key was down at the time of the event.", ""); - + DocDeclStr( bool , ShiftDown() const, "Returns true if the Shift key was down at the time of the event.", ""); - + DocDeclStr( bool , CmdDown() const, @@ -925,51 +924,51 @@ because Cmd key is used for the same thing under Mac as Ctrl elsewhere. The Ctrl key still exists, it's just not used for this purpose. So for non-Mac platforms this is the same as `ControlDown` and Macs this is the same as `MetaDown`.", ""); - + DocDeclStr( bool , LeftDown() const, "Returns true if the left mouse button state changed to down.", ""); - + DocDeclStr( bool , MiddleDown() const, "Returns true if the middle mouse button state changed to down.", ""); - + DocDeclStr( bool , RightDown() const, "Returns true if the right mouse button state changed to down.", ""); - - + + DocDeclStr( bool , LeftUp() const, "Returns true if the left mouse button state changed to up.", ""); - + DocDeclStr( bool , MiddleUp() const, "Returns true if the middle mouse button state changed to up.", ""); - + DocDeclStr( bool , RightUp() const, "Returns true if the right mouse button state changed to up.", ""); - - + + DocDeclStr( bool , LeftDClick() const, "Returns true if the event was a left button double click.", ""); - + DocDeclStr( bool , MiddleDClick() const, "Returns true if the event was a middle button double click.", ""); - + DocDeclStr( bool , RightDClick() const, "Returns true if the event was a right button double click.", ""); - - + + DocDeclStr( bool , LeftIsDown(), "Returns true if the left mouse button is currently down, independent @@ -982,41 +981,41 @@ state of the mouse button before the event happened. This event is usually used in the mouse event handlers which process \"move mouse\" messages to determine whether the user is (still) dragging the mouse.", ""); - + DocDeclStr( bool , MiddleIsDown(), "Returns true if the middle mouse button is currently down, independent of the current event type.", ""); - + DocDeclStr( bool , RightIsDown(), "Returns true if the right mouse button is currently down, independent of the current event type.", ""); - - + + DocDeclStr( bool , Dragging() const, "Returns true if this was a dragging event (motion while a button is depressed).", ""); - + DocDeclStr( bool , Moving() const, "Returns true if this was a motion event and no mouse buttons were pressed. If any mouse button is held pressed, then this method returns false and Dragging returns true.", ""); - + DocDeclStr( bool , Entering() const, "Returns true if the mouse was entering the window.", ""); - + DocDeclStr( bool , Leaving() const, "Returns true if the mouse was leaving the window.", ""); - + DocStr(GetPosition, // sets the docstring for both @@ -1028,22 +1027,22 @@ event happened.", ""); void, GetPosition(long *OUTPUT, long *OUTPUT), "GetPositionTuple() -> (x,y)", GetPositionTuple); - + DocDeclStr( wxPoint , GetLogicalPosition(const wxDC& dc) const, "Returns the logical mouse position in pixels (i.e. translated according to the translation set for the DC, which usually indicates that the window has been scrolled).", ""); - + DocDeclStr( wxCoord , GetX() const, "Returns X coordinate of the physical mouse event position.", ""); - + DocDeclStr( wxCoord , GetY() const, "Returns Y coordinate of the physical mouse event position.", ""); - + DocDeclStr( int , GetWheelRotation() const, @@ -1054,26 +1053,26 @@ created in the future. Because of this you shouldn't assume that one event is equal to 1 line or whatever, but you should be able to either do partial line scrolling or wait until +/-WheelDelta rotation values have been accumulated before scrolling.", ""); - + DocDeclStr( int , GetWheelDelta() const, "Get wheel delta, normally 120. This is the threshold for action to be taken, and one such action (for example, scrolling one increment) should occur for each delta.", ""); - + DocDeclStr( int , GetLinesPerAction() const, "Returns the configured number of lines (or whatever) to be scrolled per wheel action. Defaults to three.", ""); - + DocDeclStr( bool , IsPageScroll() const, "Returns true if the system has been setup to do page scrolling with the mouse wheel instead of line scrolling.", ""); - + public: wxCoord m_x, m_y; @@ -1114,24 +1113,24 @@ public: DocDeclStr( wxCoord , GetX() const, "Returns the X coordinate of the mouse in client coordinates.", ""); - + DocDeclStr( wxCoord , GetY() const, "Returns the Y coordinate of the mouse in client coordinates.", ""); - + DocDeclStr( void , SetCursor(const wxCursor& cursor), "Sets the cursor associated with this event.", ""); - + DocDeclStr( const wxCursor& , GetCursor() const, "Returns a reference to the cursor specified by this event.", ""); - + DocDeclStr( bool , HasCursor() const, "Returns true if the cursor specified by this event is a valid cursor.", ""); - + }; //--------------------------------------------------------------------------- @@ -1212,35 +1211,35 @@ Events Keycode Table ------------- - =========== ============== ======== ==================== ================= - WXK_BACK WXK_EXECUTE WXK_F1 WXK_NUMPAD_SPACE WXK_WINDOWS_LEFT - WXK_TAB WXK_SNAPSHOT WXK_F2 WXK_NUMPAD_TAB WXK_WINDOWS_RIGHT - WXK_RETURN WXK_INSERT WXK_F3 WXK_NUMPAD_ENTER WXK_WINDOWS_MENU - WXK_ESCAPE WXK_HELP WXK_F4 WXK_NUMPAD_F1 WXK_SPECIAL1 - WXK_SPACE WXK_NUMPAD0 WXK_F5 WXK_NUMPAD_F2 WXK_SPECIAL2 - WXK_DELETE WXK_NUMPAD1 WXK_F6 WXK_NUMPAD_F3 WXK_SPECIAL3 - WXK_LBUTTON WXK_NUMPAD2 WXK_F7 WXK_NUMPAD_F4 WXK_SPECIAL4 - WXK_RBUTTON WXK_NUMPAD3 WXK_F8 WXK_NUMPAD_HOME WXK_SPECIAL5 - WXK_CANCEL WXK_NUMPAD4 WXK_F9 WXK_NUMPAD_LEFT WXK_SPECIAL6 - WXK_MBUTTON WXK_NUMPAD5 WXK_F10 WXK_NUMPAD_UP WXK_SPECIAL7 - WXK_CLEAR WXK_NUMPAD6 WXK_F11 WXK_NUMPAD_RIGHT WXK_SPECIAL8 - WXK_SHIFT WXK_NUMPAD7 WXK_F12 WXK_NUMPAD_DOWN WXK_SPECIAL9 - WXK_ALT WXK_NUMPAD8 WXK_F13 WXK_NUMPAD_PRIOR WXK_SPECIAL10 - WXK_CONTROL WXK_NUMPAD9 WXK_F14 WXK_NUMPAD_PAGEUP WXK_SPECIAL11 - WXK_MENU WXK_MULTIPLY WXK_F15 WXK_NUMPAD_NEXT WXK_SPECIAL12 - WXK_PAUSE WXK_ADD WXK_F16 WXK_NUMPAD_PAGEDOWN WXK_SPECIAL13 - WXK_CAPITAL WXK_SEPARATOR WXK_F17 WXK_NUMPAD_END WXK_SPECIAL14 - WXK_PRIOR WXK_SUBTRACT WXK_F18 WXK_NUMPAD_BEGIN WXK_SPECIAL15 - WXK_NEXT WXK_DECIMAL WXK_F19 WXK_NUMPAD_INSERT WXK_SPECIAL16 - WXK_END WXK_DIVIDE WXK_F20 WXK_NUMPAD_DELETE WXK_SPECIAL17 - WXK_HOME WXK_NUMLOCK WXK_F21 WXK_NUMPAD_EQUAL WXK_SPECIAL18 - WXK_LEFT WXK_SCROLL WXK_F22 WXK_NUMPAD_MULTIPLY WXK_SPECIAL19 - WXK_UP WXK_PAGEUP WXK_F23 WXK_NUMPAD_ADD WXK_SPECIAL20 - WXK_RIGHT WXK_PAGEDOWN WXK_F24 WXK_NUMPAD_SEPARATOR - WXK_DOWN WXK_NUMPAD_SUBTRACT - WXK_SELECT WXK_NUMPAD_DECIMAL - WXK_PRINT WXK_NUMPAD_DIVIDE - =========== ============== ======== ==================== ================= + =========== ============== ======== ==================== ================= + WXK_BACK WXK_EXECUTE WXK_F1 WXK_NUMPAD_SPACE WXK_WINDOWS_LEFT + WXK_TAB WXK_SNAPSHOT WXK_F2 WXK_NUMPAD_TAB WXK_WINDOWS_RIGHT + WXK_RETURN WXK_INSERT WXK_F3 WXK_NUMPAD_ENTER WXK_WINDOWS_MENU + WXK_ESCAPE WXK_HELP WXK_F4 WXK_NUMPAD_F1 WXK_SPECIAL1 + WXK_SPACE WXK_NUMPAD0 WXK_F5 WXK_NUMPAD_F2 WXK_SPECIAL2 + WXK_DELETE WXK_NUMPAD1 WXK_F6 WXK_NUMPAD_F3 WXK_SPECIAL3 + WXK_LBUTTON WXK_NUMPAD2 WXK_F7 WXK_NUMPAD_F4 WXK_SPECIAL4 + WXK_RBUTTON WXK_NUMPAD3 WXK_F8 WXK_NUMPAD_HOME WXK_SPECIAL5 + WXK_CANCEL WXK_NUMPAD4 WXK_F9 WXK_NUMPAD_LEFT WXK_SPECIAL6 + WXK_MBUTTON WXK_NUMPAD5 WXK_F10 WXK_NUMPAD_UP WXK_SPECIAL7 + WXK_CLEAR WXK_NUMPAD6 WXK_F11 WXK_NUMPAD_RIGHT WXK_SPECIAL8 + WXK_SHIFT WXK_NUMPAD7 WXK_F12 WXK_NUMPAD_DOWN WXK_SPECIAL9 + WXK_ALT WXK_NUMPAD8 WXK_F13 WXK_NUMPAD_PRIOR WXK_SPECIAL10 + WXK_CONTROL WXK_NUMPAD9 WXK_F14 WXK_NUMPAD_PAGEUP WXK_SPECIAL11 + WXK_MENU WXK_MULTIPLY WXK_F15 WXK_NUMPAD_NEXT WXK_SPECIAL12 + WXK_PAUSE WXK_ADD WXK_F16 WXK_NUMPAD_PAGEDOWN WXK_SPECIAL13 + WXK_CAPITAL WXK_SEPARATOR WXK_F17 WXK_NUMPAD_END WXK_SPECIAL14 + WXK_PRIOR WXK_SUBTRACT WXK_F18 WXK_NUMPAD_BEGIN WXK_SPECIAL15 + WXK_NEXT WXK_DECIMAL WXK_F19 WXK_NUMPAD_INSERT WXK_SPECIAL16 + WXK_END WXK_DIVIDE WXK_F20 WXK_NUMPAD_DELETE WXK_SPECIAL17 + WXK_HOME WXK_NUMLOCK WXK_F21 WXK_NUMPAD_EQUAL WXK_SPECIAL18 + WXK_LEFT WXK_SCROLL WXK_F22 WXK_NUMPAD_MULTIPLY WXK_SPECIAL19 + WXK_UP WXK_PAGEUP WXK_F23 WXK_NUMPAD_ADD WXK_SPECIAL20 + WXK_RIGHT WXK_PAGEDOWN WXK_F24 WXK_NUMPAD_SEPARATOR + WXK_DOWN WXK_NUMPAD_SUBTRACT + WXK_SELECT WXK_NUMPAD_DECIMAL + WXK_PRINT WXK_NUMPAD_DIVIDE + =========== ============== ======== ==================== ================= "); class wxKeyEvent : public wxEvent @@ -1266,20 +1265,20 @@ example:: DocDeclStr( bool , ControlDown() const, "Returns ``True`` if the Control key was down at the time of the event.", ""); - + DocDeclStr( bool , MetaDown() const, "Returns ``True`` if the Meta key was down at the time of the event.", ""); - + DocDeclStr( bool , AltDown() const, "Returns ``True`` if the Alt key was down at the time of the event.", ""); - + DocDeclStr( bool , ShiftDown() const, "Returns ``True`` if the Shift key was down at the time of the event.", ""); - - + + DocDeclStr( bool , CmdDown() const, "\"Cmd\" is a pseudo key which is the same as Control for PC and Unix @@ -1289,8 +1288,8 @@ because Cmd key is used for the same thing under Mac as Ctrl elsewhere. The Ctrl still exists, it's just not used for this purpose. So for non-Mac platforms this is the same as `ControlDown` and Macs this is the same as `MetaDown`.", ""); - - + + DocDeclStr( bool , HasModifiers() const, @@ -1300,7 +1299,7 @@ SHIFT nor META key states (the reason for ignoring the latter is that it is common for NUMLOCK key to be configured as META under X but the key presses even while NUMLOCK is on should be still processed normally).", ""); - + DocDeclStr( int , GetKeyCode() const, @@ -1315,12 +1314,12 @@ locale's default charset. You can obtain the corresponding Unicode character using `GetUnicodeKey`.", ""); %pythoncode { KeyCode = GetKeyCode } - + %extend { DocStr( GetUnicodeKey, "Returns the Unicode character corresponding to this key event. This -function is only meaningfule in a Unicode build of wxPython.", ""); +function is only meaningfule in a Unicode build of wxPython.", ""); int GetUnicodeKey() { %#if wxUSE_UNICODE return self->GetUnicodeKey(); @@ -1330,24 +1329,24 @@ function is only meaningfule in a Unicode build of wxPython.", ""); } } %pythoncode { GetUniChar = GetUnicodeKey } - - + + DocDeclStr( wxUint32 , GetRawKeyCode() const, "Returns the raw key code for this event. This is a platform-dependent scan code which should only be used in advanced applications. Currently the raw key codes are not supported by all ports.", ""); - + DocDeclStr( wxUint32 , GetRawKeyFlags() const, "Returns the low level key flags for this event. The flags are platform-dependent and should only be used in advanced applications. Currently the raw key flags are not supported by all ports.", ""); - - + + DocStr(GetPosition, // sets the docstring for both "Find the position of the event, if applicable.", ""); wxPoint GetPosition(); @@ -1357,18 +1356,18 @@ Currently the raw key flags are not supported by all ports.", ""); "GetPositionTuple() -> (x,y)", GetPositionTuple); - + DocDeclStr( wxCoord , GetX() const, "Returns the X position (in client coordinates) of the event, if applicable.", ""); - + DocDeclStr( wxCoord , GetY() const, "Returns the Y position (in client coordinates) of the event, if applicable.", ""); - + public: wxCoord m_x, m_y; @@ -1418,10 +1417,10 @@ public: wxSize , GetSize() const, "Returns the entire size of the window generating the size change event.", ""); - + wxRect GetRect() const; void SetRect(wxRect rect); - + %extend { void SetSize(wxSize size) { self->m_size = size; @@ -1451,7 +1450,7 @@ public: DocDeclStr( wxPoint , GetPosition() const, "Returns the position of the window generating the move change event.", ""); - + wxRect GetRect() const; void SetRect(const wxRect& rect); void SetPosition(const wxPoint& pos); @@ -1551,7 +1550,7 @@ window which had the focus before for the EVT_SET_FOCUS event and the window which is going to receive focus for the wxEVT_KILL_FOCUS event. Warning: the window returned may be None!", ""); - + void SetWindow(wxWindow *win); }; @@ -1574,7 +1573,7 @@ public: DocDeclStr( wxWindow *, GetWindow() const, "The window which has just received the focus.", ""); - + }; //--------------------------------------------------------------------------- @@ -1613,12 +1612,12 @@ public: DocCtorStr( wxActivateEvent(wxEventType type = wxEVT_NULL, bool active = true, int Id = 0), "Constructor", ""); - + DocDeclStr( bool , GetActive() const, "Returns true if the application or window is being activated, false otherwise.", ""); - + }; @@ -1680,25 +1679,25 @@ public: DocCtorStr( wxMenuEvent(wxEventType type = wxEVT_NULL, int winid = 0, wxMenu* menu = NULL), "Constructor", ""); - + DocDeclStr( int , GetMenuId() const, "Returns the menu identifier associated with the event. This method should be only used with the HIGHLIGHT events.", ""); - + DocDeclStr( bool , IsPopup() const, "Returns ``True`` if the menu which is being opened or closed is a popup menu, ``False`` if it is a normal one. This method should only be used with the OPEN and CLOSE events.", ""); - + DocDeclStr( wxMenu* , GetMenu() const, "Returns the menu which is being opened or closed. This method should only be used with the OPEN and CLOSE events.", ""); - + }; //--------------------------------------------------------------------------- @@ -1746,18 +1745,18 @@ public: DocCtorStr( wxCloseEvent(wxEventType type = wxEVT_NULL, int winid = 0), "Constructor.", ""); - + DocDeclStr( void , SetLoggingOff(bool logOff), "Sets the 'logging off' flag.", ""); - + DocDeclStr( bool , GetLoggingOff() const, "Returns ``True`` if the user is logging off or ``False`` if the system is shutting down. This method can only be called for end session and query end session events, it doesn't make sense for close window event.", ""); - + DocDeclStr( void , Veto(bool veto = true), @@ -1765,20 +1764,20 @@ window event.", ""); signal to the calling application that a window close did not happen. You can only veto a shutdown or close if `CanVeto` returns true.", ""); - + bool GetVeto() const; - + DocDeclStr( void , SetCanVeto(bool canVeto), "Sets the 'can veto' flag.", ""); - + DocDeclStr( bool , CanVeto() const, "Returns true if you can veto a system shutdown or a window close event. Vetoing a window close event is not possible if the calling code wishes to force the application to exit, and so this function must be called to check this.", ""); - + }; @@ -1792,7 +1791,7 @@ class wxShowEvent : public wxEvent { public: wxShowEvent(int winid = 0, bool show = false); - + void SetShow(bool show); bool GetShow() const; @@ -1810,12 +1809,12 @@ class wxIconizeEvent: public wxEvent { public: wxIconizeEvent(int id = 0, bool iconized = true); - + DocDeclStr( bool , Iconized(), "Returns ``True`` if the frame has been iconized, ``False`` if it has been restored.", ""); - + }; @@ -1855,21 +1854,21 @@ public: // TODO: wrap the ctor! - + DocDeclStr( wxPoint , GetPosition(), "Returns the position at which the files were dropped.", ""); - + DocDeclStr( int , GetNumberOfFiles(), "Returns the number of files dropped.", ""); - + %extend { DocStr( GetFiles, "Returns a list of the filenames that were dropped.", ""); - + PyObject* GetFiles() { int count = self->GetNumberOfFiles(); wxString* files = self->GetFiles(); @@ -1962,11 +1961,11 @@ public: DocCtorStr( wxUpdateUIEvent(wxWindowID commandId = 0), "Constructor", ""); - + DocDeclStr( bool , GetChecked() const, "Returns ``True`` if the UI element should be checked.", ""); - + DocDeclStr( bool , GetEnabled() const, "Returns ``True`` if the UI element should be enabled.", ""); @@ -1974,36 +1973,36 @@ public: DocDeclStr( bool , GetShown() const, "Returns ``True`` if the UI element should be shown.", ""); - + DocDeclStr( wxString , GetText() const, "Returns the text that should be set for the UI element.", ""); - + DocDeclStr( bool , GetSetText() const, "Returns ``True`` if the application has called `SetText`. For wxWidgets internal use only.", ""); - + DocDeclStr( bool , GetSetChecked() const, "Returns ``True`` if the application has called `Check`. For wxWidgets internal use only.", ""); - + DocDeclStr( bool , GetSetEnabled() const, "Returns ``True`` if the application has called `Enable`. For wxWidgets internal use only.", ""); - + DocDeclStr( bool , GetSetShown() const, "Returns ``True`` if the application has called `Show`. For wxWidgets internal use only.", ""); - + DocDeclStr( void , Check(bool check), "Check or uncheck the UI element.", ""); - + DocDeclStr( void , Enable(bool enable), "Enable or disable the UI element.", ""); @@ -2011,14 +2010,14 @@ internal use only.", ""); DocDeclStr( void , Show(bool show), "Show or hide the UI element.", ""); - - + + DocDeclStr( void , SetText(const wxString& text), "Sets the text for this UI element.", ""); - - + + DocDeclStr( static void , SetUpdateInterval(long updateInterval), "Sets the interval between updates in milliseconds. Set to -1 to @@ -2030,13 +2029,13 @@ application has a lot of windows. If you set the value to -1 or greater than 0, you may also need to call `wx.Window.UpdateWindowUI` at appropriate points in your application, such as when a dialog is about to be shown.", ""); - + DocDeclStr( static long , GetUpdateInterval(), "Returns the current interval between updates in milliseconds. -1 disables updates, 0 updates as frequently as possible.", ""); - + DocDeclStr( static bool , CanUpdate(wxWindow *win), @@ -2053,14 +2052,14 @@ events will be sent as often as possible. You can reduce the frequency that events are sent by changing the mode and/or setting an update interval. ", ""); - + DocDeclStr( static void , ResetUpdateTime(), "Used internally to reset the last-updated time to the current time. It is assumed that update events are normally sent in idle time, so this is called at the end of idle processing.", ""); - + DocDeclStr( static void , SetMode(wxUpdateUIMode mode), @@ -2077,14 +2076,14 @@ The mode may be one of the following values: style set. ============================= ========================================== ", ""); - + DocDeclStr( static wxUpdateUIMode , GetMode(), "Returns a value specifying how wxWidgets will send update events: to all windows, or only to those which specify that they will process the events.", ""); - + }; //--------------------------------------------------------------------------- @@ -2133,7 +2132,7 @@ public: wxWindow* , GetCapturedWindow() const, "Returns the window that gained the capture, or ``None`` if it was a non-wxWidgets window.", ""); - + }; //--------------------------------------------------------------------------- @@ -2192,7 +2191,7 @@ public: DocDeclStr( void , SetPaletteRealized(bool realized), "App should set this if it changes the palette.", ""); - + bool GetPaletteRealized() const; }; @@ -2216,38 +2215,38 @@ public: DocCtorStr( wxNavigationKeyEvent(), "", ""); - + DocDeclStr( bool , GetDirection() const, "Returns ``True`` if the direction is forward, ``False`` otherwise.", ""); - + DocDeclStr( void , SetDirection(bool forward), "Specify the direction that the navigation should take. Usually the difference between using Tab and Shift-Tab.", ""); - + DocDeclStr( bool , IsWindowChange() const, "Returns ``True`` if window change is allowed.", ""); - + DocDeclStr( void , SetWindowChange(bool ischange), "Specify if the navigation should be able to change parent windows. For example, changing notebook pages, etc. This is usually implemented by using Control-Tab.", ""); - + DocDeclStr( bool , IsFromTab() const, "Returns ``True`` if the navigation event is originated from the Tab key.", ""); - + DocDeclStr( void , SetFromTab(bool bIs), "Set to true under MSW if the event was generated using the tab key. This is required for proper navogation over radio buttons.", ""); - + DocDeclStr( void , SetFlags(long flags), @@ -2258,17 +2257,17 @@ This is required for proper navogation over radio buttons.", ""); * wx.NavigationKeyEvent.WinChange * wx.NavigationKeyEvent.FromTab ", ""); - - + + DocDeclStr( wxWindow* , GetCurrentFocus() const, "Returns the child window which currenty has the focus. May be ``None``.", ""); - + DocDeclStr( void , SetCurrentFocus(wxWindow *win), "Set the window that has the focus.", ""); - + enum { IsBackward, @@ -2290,11 +2289,11 @@ class wxWindowCreateEvent : public wxCommandEvent { public: wxWindowCreateEvent(wxWindow *win = NULL); - + DocDeclStr( wxWindow *, GetWindow() const, "Returns the window that this event refers to.", ""); - + }; @@ -2312,10 +2311,10 @@ class wxWindowDestroyEvent : public wxCommandEvent { public: wxWindowDestroyEvent(wxWindow *win = NULL); - + DocDeclStr( wxWindow *, GetWindow() const, - "Returns the window that this event refers to.", ""); + "Returns the window that this event refers to.", ""); }; @@ -2342,11 +2341,11 @@ public: "Returns the position (in screen coordinants) at which the menu should be shown.", ""); - + DocDeclStr( void , SetPosition(const wxPoint& pos), "Sets the position at which the menu should be shown.", ""); - + }; //--------------------------------------------------------------------------- @@ -2380,8 +2379,8 @@ public: DocCtorStr( wxIdleEvent(), "Constructor", ""); - - + + DocDeclStr( void , RequestMore(bool needMore = true), "Tells wxWidgets that more processing is required. This function can be @@ -2391,12 +2390,12 @@ application windows. If no window calls this function during its EVT_IDLE handler, then the application will remain in a passive event loop until a new event is posted to the application by the windowing system.", ""); - + DocDeclStr( bool , MoreRequested() const, "Returns ``True`` if the OnIdle function processing this event requested more processing time.", ""); - + DocDeclStr( static void , SetMode(wxIdleMode mode), @@ -2413,14 +2412,14 @@ The mode can be one of the following values: flag set. ========================= ======================================== ", ""); - + DocDeclStr( static wxIdleMode , GetMode(), "Static method returning a value specifying how wxWidgets will send idle events: to all windows, or only to those which specify that they will process the events.", ""); - + DocDeclStr( static bool , CanSend(wxWindow* win), @@ -2433,7 +2432,7 @@ events should be sent to this window now. By default this will always return ``True`` because the update mode is initially wx.IDLE_PROCESS_ALL. You can change the mode to only send idle events to windows with the wx.WS_EX_PROCESS_IDLE extra window style set.", ""); - + }; //--------------------------------------------------------------------------- @@ -2478,7 +2477,7 @@ public: DocCtorStr( wxPyEvent(int winid=0, wxEventType eventType = wxEVT_NULL ), "", ""); - + ~wxPyEvent(); @@ -2506,7 +2505,7 @@ public: DocCtorStr( wxPyCommandEvent(wxEventType eventType = wxEVT_NULL, int id=0), "", ""); - + ~wxPyCommandEvent(); %Rename(_SetSelf, void , SetSelf(PyObject* self)); @@ -2534,12 +2533,12 @@ public: DocDeclStr( const wxDateTime& , GetDate() const, "Returns the date.", ""); - + DocDeclStr( void , SetDate(const wxDateTime &date), "Sets the date carried by the event, normally only used by the library internally.", ""); - + }; @@ -2552,3 +2551,4 @@ internally.", ""); //--------------------------------------------------------------------------- +//--------------------------------------------------------------------------- diff --git a/wxPython/src/_font.i b/wxPython/src/_font.i index 0e3fc5ba79..81149f9bbc 100644 --- a/wxPython/src/_font.i +++ b/wxPython/src/_font.i @@ -250,10 +250,18 @@ public: void SetStyle(wxFontStyle style); void SetWeight(wxFontWeight weight); void SetUnderlined(bool underlined); - void SetFaceName(wxString facename); + bool SetFaceName(wxString facename); void SetFamily(wxFontFamily family); void SetEncoding(wxFontEncoding encoding); +// TODO: +// // sets the first facename in the given array which is found +// // to be valid. If no valid facename is given, sets the +// // first valid facename returned by wxFontEnumerator::GetFacenames(). +// // Does not return a bool since it cannot fail. +// void SetFaceName(const wxArrayString &facenames); + + // it is important to be able to serialize wxNativeFontInfo objects to be // able to store them (in config file, for example) bool FromString(const wxString& s); @@ -734,7 +742,7 @@ size is found using a binary search.", ""); "Sets the font weight.", ""); DocDeclStr( - virtual void , SetFaceName( const wxString& faceName ), + virtual bool , SetFaceName( const wxString& faceName ), "Sets the facename for the font. The facename, which should be a valid font installed on the end-user's system. @@ -758,13 +766,13 @@ then for a font belonging to the same family.", ""); DocDeclStrName( - void , SetNativeFontInfo(const wxString& info), + bool , SetNativeFontInfo(const wxString& info), "Set the font's attributes from string representation of a `wx.NativeFontInfo` object.", "", SetNativeFontInfoFromString); DocDeclStr( - void , SetNativeFontInfoUserDesc(const wxString& info), + bool , SetNativeFontInfoUserDesc(const wxString& info), "Set the font's attributes from a string formerly returned from `GetNativeFontInfoDesc`.", ""); @@ -838,33 +846,31 @@ public: bool EnumerateEncodings(const wxString& facename = wxPyEmptyString); - //wxArrayString* GetEncodings(); - //wxArrayString* GetFacenames(); %extend { - PyObject* GetEncodings() { + static PyObject* GetEncodings() { PyObject* ret; - wxArrayString* arr = self->GetEncodings(); + wxArrayString arr = wxFontEnumerator::GetEncodings(); wxPyBlock_t blocked = wxPyBeginBlockThreads(); - if (arr) - ret = wxArrayString2PyList_helper(*arr); - else - ret = PyList_New(0); + ret = wxArrayString2PyList_helper(arr); wxPyEndBlockThreads(blocked); return ret; } - PyObject* GetFacenames() { + static PyObject* GetFacenames() { PyObject* ret; - wxArrayString* arr = self->GetFacenames(); + wxArrayString arr = wxFontEnumerator::GetFacenames(); wxPyBlock_t blocked = wxPyBeginBlockThreads(); - if (arr) - ret = wxArrayString2PyList_helper(*arr); - else - ret = PyList_New(0); + ret = wxArrayString2PyList_helper(arr); wxPyEndBlockThreads(blocked); return ret; } } + + DocDeclStr( + static bool , IsValidFacename(const wxString &str), + "Convenience function that returns true if the given face name exist in +the user's system", ""); + }; diff --git a/wxPython/src/_functions.i b/wxPython/src/_functions.i index 232b762737..7375b3c107 100644 --- a/wxPython/src/_functions.i +++ b/wxPython/src/_functions.i @@ -427,40 +427,5 @@ MustHaveApp(wxThread); } %} -//--------------------------------------------------------------------------- - -// 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.", ""); - - - //--------------------------------------------------------------------------- //--------------------------------------------------------------------------- diff --git a/wxPython/src/_hyperlink.i b/wxPython/src/_hyperlink.i new file mode 100644 index 0000000000..0115bca95f --- /dev/null +++ b/wxPython/src/_hyperlink.i @@ -0,0 +1,118 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: _hyperlink.i +// Purpose: SWIG interface defs for wxHyperlinkCtrl +// +// Author: Robin Dunn +// +// Created: 28-May-2006 +// RCS-ID: $Id$ +// Copyright: (c) 2006 by Total Control Software +// Licence: wxWindows license +///////////////////////////////////////////////////////////////////////////// + +// Not a %module + + +//--------------------------------------------------------------------------- + +%{ +#include +%} + +MAKE_CONST_WXSTRING(HyperlinkCtrlNameStr); + +enum { + wxHL_CONTEXTMENU, + wxHL_DEFAULT_STYLE +}; + +//--------------------------------------------------------------------------- +%newgroup + +MustHaveApp(wxHyperlinkCtrl); + + +DocStr( wxHyperlinkCtrl, +"A static text control that emulates a hyperlink. The link is displayed +in an appropriate text style, derived from the control's normal font. +When the mouse rolls over the link, the cursor changes to a hand and +the link's color changes to the active color. + +Clicking on the link does not launch a web browser; instead, a +wx.HyperlinkEvent is fired. Use the wx.EVT_HYPERLINK to catch link +events. +", ""); + +class wxHyperlinkCtrl : public wxControl +{ +public: + %pythonAppend wxHyperlinkCtrl "self._setOORInfo(self)" + %pythonAppend wxHyperlinkCtrl() "" + + + // Constructor. + wxHyperlinkCtrl(wxWindow *parent, + wxWindowID id, + const wxString& label, const wxString& url, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxHL_DEFAULT_STYLE, + const wxString& name = wxPyHyperlinkCtrlNameStr); + %RenameCtor(PreHyperlinkCtrl, wxHyperlinkCtrl()); + + // Creation function (for two-step construction). + bool Create(wxWindow *parent, + wxWindowID id, + const wxString& label, const wxString& url, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxHL_DEFAULT_STYLE, + const wxString& name = wxPyHyperlinkCtrlNameStr); + + // get/set + wxColour GetHoverColour() const; + void SetHoverColour(const wxColour &colour); + + wxColour GetNormalColour() const; + void SetNormalColour(const wxColour &colour); + + wxColour GetVisitedColour() const; + void SetVisitedColour(const wxColour &colour); + + wxString GetURL() const; + void SetURL (const wxString &url); + + void SetVisited(bool visited = true); + bool GetVisited() const; + +}; + + +%constant wxEventType wxEVT_COMMAND_HYPERLINK; + + +// +// An event fired when the user clicks on the label in a hyperlink control. +// See HyperlinkControl for details. +// +class wxHyperlinkEvent : public wxCommandEvent +{ +public: + + wxHyperlinkEvent(wxObject *generator, wxWindowID id, const wxString& url); + + // Returns the URL associated with the hyperlink control + // that the user clicked on. + wxString GetURL() const; + void SetURL(const wxString &url); +}; + + +%pythoncode { + EVT_HYPERLINK = wx.PyEventBinder( wxEVT_COMMAND_HYPERLINK, 1 ) +} + + + +//--------------------------------------------------------------------------- +//--------------------------------------------------------------------------- diff --git a/wxPython/src/_listctrl.i b/wxPython/src/_listctrl.i index d8f320f29b..00b88bb0f5 100644 --- a/wxPython/src/_listctrl.i +++ b/wxPython/src/_listctrl.i @@ -84,6 +84,9 @@ enum { wxLIST_HITTEST_TOLEFT, wxLIST_HITTEST_TORIGHT, wxLIST_HITTEST_ONITEM, + +// GetSubItemRect constants + wxLIST_GETSUBITEMRECT_WHOLEITEM, }; @@ -544,6 +547,13 @@ public: self->GetItemRect(item, rect, code); return rect; } + +// MSW only so far... +// wxRect GetSubItemRect(long item, long subItem, int code = wxLIST_RECT_BOUNDS) { +// wxRect rect; +// self->GetSubItemRect(item, subItem, rect, code); +// return rect; +// } } @@ -660,6 +670,15 @@ public: "Determines which item (if any) is at the specified point, giving details in the second return value (see wx.LIST_HITTEST flags.)", ""); + DocDeclAStrName( + long, HitTest(const wxPoint& point, int& OUTPUT, long* OUTPUT), + "HitTestSubItem(Point point) -> (item, where, subItem)", + "Determines which item (if any) is at the specified point, giving details in +the second return value (see wx.LIST_HITTEST flags) and also the subItem, if +any.", "", + HitTestSubItem); + + // Inserts an item, returning the index of the new item if successful, // -1 otherwise. long InsertItem(wxListItem& info); diff --git a/wxPython/src/_power.i b/wxPython/src/_power.i new file mode 100644 index 0000000000..318891a495 --- /dev/null +++ b/wxPython/src/_power.i @@ -0,0 +1,108 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: _power.i +// Purpose: SWIG interface for wx poser events and functions +// +// Author: Robin Dunn +// +// Created: 28-May-2006 +// RCS-ID: $Id$ +// Copyright: (c) 2006 by Total Control Software +// Licence: wxWindows license +///////////////////////////////////////////////////////////////////////////// + +// Not a %module + +//--------------------------------------------------------------------------- +%newgroup + +%{ +#include +%} + + + +%{ +#ifndef wxHAS_POWER_EVENTS +// Dummy class and other definitions for platforms that don't have them + +class wxPowerEvent : public wxEvent +{ +public: + wxPowerEvent(wxEventType evtType) : wxEvent(wxID_NONE, evtType) {} + void Veto() {} + bool IsVetoed() const { return false; } + + virtual wxEvent *Clone() const { return new wxPowerEvent(*this); } +}; + +enum { + wxEVT_POWER_SUSPENDING, + wxEVT_POWER_SUSPENDED, + wxEVT_POWER_SUSPEND_CANCEL, + wxEVT_POWER_RESUME, +}; + +wxPowerType wxGetPowerType() { return wxPOWER_UNKNOWN; } +wxBatteryState wxGetBatteryState() { return wxBATTERY_UNKNOWN_STATE; } + +#endif +%} + + + +enum wxPowerType +{ + wxPOWER_SOCKET, + wxPOWER_BATTERY, + wxPOWER_UNKNOWN +}; + +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 +}; + + +DocStr(wxPowerEvent, +"wx.PowerEvent is generated when the system online status changes. +Currently this is only implemented for Windows.", +""); +class wxPowerEvent : public wxEvent +{ +public: + wxPowerEvent(wxEventType evtType); + + // Veto the operation (only makes sense with EVT_POWER_SUSPENDING) + void Veto(); + bool IsVetoed() const; +}; + + +%constant wxEventType wxEVT_POWER_SUSPENDING; +%constant wxEventType wxEVT_POWER_SUSPENDED; +%constant wxEventType wxEVT_POWER_SUSPEND_CANCEL; +%constant wxEventType wxEVT_POWER_RESUME; + +%pythoncode { +EVT_POWER_SUSPENDING = wx.PyEventBinder( wxEVT_POWER_SUSPENDING , 1 ) +EVT_POWER_SUSPENDED = wx.PyEventBinder( wxEVT_POWER_SUSPENDED , 1 ) +EVT_POWER_SUSPEND_CANCEL = wx.PyEventBinder( wxEVT_POWER_SUSPEND_CANCEL , 1 ) +EVT_POWER_RESUME = wx.PyEventBinder( wxEVT_POWER_RESUME , 1 ) +} + + +DocDeclStr( + wxPowerType , wxGetPowerType(), + "return the current system power state: online or offline", ""); + + +DocDeclStr( + wxBatteryState , wxGetBatteryState(), + "return approximate battery state", ""); + + +//--------------------------------------------------------------------------- diff --git a/wxPython/src/_toolbar.i b/wxPython/src/_toolbar.i index 67e636381e..70191aaa59 100644 --- a/wxPython/src/_toolbar.i +++ b/wxPython/src/_toolbar.i @@ -43,6 +43,7 @@ enum { wxTB_NOALIGN, wxTB_HORZ_LAYOUT, wxTB_HORZ_TEXT, + wxTB_NO_TOOLTIPS, }; diff --git a/wxPython/src/_window.i b/wxPython/src/_window.i index 2a456fd970..628e416945 100644 --- a/wxPython/src/_window.i +++ b/wxPython/src/_window.i @@ -980,9 +980,18 @@ functions so should not be required by the application programmer.", ""); "Removes a child window. This is called automatically by window deletion functions so should not be required by the application programmer.", ""); - + DocStr(SetDoubleBuffered, + "Currently wxGTK2 only.", ""); +#ifdef __WXGTK__ + void SetDoubleBuffered(bool on); +#else + %extend { + void SetDoubleBuffered(bool on) {} + } +#endif + // looking for windows // ------------------- diff --git a/wxPython/src/controls.i b/wxPython/src/controls.i index 7f9371b80a..ef34a9202a 100644 --- a/wxPython/src/controls.i +++ b/wxPython/src/controls.i @@ -59,7 +59,7 @@ MAKE_CONST_WXSTRING_NOSWIG(ControlNameStr); %include _cshelp.i %include _dragimg.i %include _datectrl.i - +%include _hyperlink.i //--------------------------------------------------------------------------- diff --git a/wxPython/src/html.i b/wxPython/src/html.i index 570753f83b..ec90eb47d1 100644 --- a/wxPython/src/html.i +++ b/wxPython/src/html.i @@ -1146,10 +1146,8 @@ public: const wxString& normal_face = wxPyEmptyString, const wxString& fixed_face = wxPyEmptyString); - int Render(int x, int y, int from = 0, int dont_render = false, int maxHeight = INT_MAX, - //int *known_pagebreaks = NULL, int number_of_pages = 0 - int* choices=NULL, int LCOUNT = 0 - ); + int Render(int x, int y, wxArrayInt& known_pagebreaks, int from = 0, + int dont_render = FALSE, int to = INT_MAX); int GetTotalHeight(); // returns total height of the html document // (compare Render's return value with this) diff --git a/wxPython/src/misc.i b/wxPython/src/misc.i index 19c541f579..db0e94597c 100644 --- a/wxPython/src/misc.i +++ b/wxPython/src/misc.i @@ -48,5 +48,6 @@ MAKE_CONST_WXSTRING_NOSWIG(EmptyString); %include _clipbrd.i %include _display.i %include _stdpaths.i +%include _power.i //--------------------------------------------------------------------------- -- 2.45.2