~ubuntu-branches/ubuntu/raring/wxwidgets2.8/raring

« back to all changes in this revision

Viewing changes to wxPython/src/gtk/_core.py

  • Committer: Package Import Robot
  • Author(s): Stéphane Graber
  • Date: 2012-01-07 13:59:25 UTC
  • mfrom: (1.1.9) (5.1.10 sid)
  • Revision ID: package-import@ubuntu.com-20120107135925-2601miy9ullcon9j
Tags: 2.8.12.1-6ubuntu1
* Resync from Debian, changes that were kept:
  - debian/rules: re-enable mediactrl. This allows libwx_gtk2u_media-2.8 to be
    built, as this is required by some applications (LP: #632984)
  - debian/control: Build-dep on libxt-dev for mediactrl.
  - Patches
    + fix-bashism-in-example
* Add conflict on python-wxgtk2.8 (<< 2.8.12.1-6ubuntu1~) to python-wxversion
  to guarantee upgrade ordering when moving from pycentral to dh_python2.

Show diffs side-by-side

added added

removed removed

Lines of Context:
3913
3913
        :param id2: Used when it is desirable to bind a handler
3914
3914
                      to a range of IDs, such as with EVT_MENU_RANGE.
3915
3915
        """
 
3916
        assert isinstance(event, wx.PyEventBinder)
 
3917
        assert handler is None or callable(handler)
 
3918
        assert source is None or hasattr(source, 'GetId')
3916
3919
        if source is not None:
3917
3920
            id  = source.GetId()
3918
3921
        event.Bind(self, id, id2, handler)              
5477
5480
        GetUnicodeKey(self) -> int
5478
5481
 
5479
5482
        Returns the Unicode character corresponding to this key event.  This
5480
 
        function is only meaningfule in a Unicode build of wxPython.
 
5483
        function is only meaningful in a Unicode build of wxPython.
5481
5484
        """
5482
5485
        return _core_.KeyEvent_GetUnicodeKey(*args, **kwargs)
5483
5486
 
10466
10469
        """
10467
10470
        return _core_.Window_GetToolTip(*args, **kwargs)
10468
10471
 
 
10472
    def GetToolTipString(self):
 
10473
        tip = self.GetToolTip()
 
10474
        if tip:
 
10475
            return tip.GetTip()
 
10476
        else:
 
10477
            return None
 
10478
 
 
10479
    ToolTipString = property(GetToolTipString, SetToolTipString)
 
10480
 
10469
10481
    def SetDropTarget(*args, **kwargs):
10470
10482
        """
10471
10483
        SetDropTarget(self, DropTarget dropTarget)
10900
10912
    def __init__(self, window):
10901
10913
        self._win = window
10902
10914
    def __enter__(self):
10903
 
        self.Freeze()
 
10915
        self._win.Freeze()
10904
10916
        return self
10905
 
    def __exit__(self):
10906
 
        self.Thaw()
 
10917
    def __exit__(self, exc_type, exc_val, exc_tb):
 
10918
        self._win.Thaw()
10907
10919
 
10908
10920
#---------------------------------------------------------------------------
10909
10921
 
12766
12778
        """_SetItemMinSize(self, PyObject item, Size size)"""
12767
12779
        return _core_.Sizer__SetItemMinSize(*args, **kwargs)
12768
12780
 
 
12781
    def GetItemIndex(self, item):
 
12782
        """
 
12783
        Returns the index of the given *item* within the sizer. Does not
 
12784
        search recursivly.  The *item* parameter can be either a window
 
12785
        or a sizer.  An assertion is raised if the item is not found in
 
12786
        the sizer.
 
12787
        """
 
12788
        sItem = self.GetItem(item)
 
12789
        assert sItem is not None, "Item not found in the sizer."
 
12790
        allItems = self.Children
 
12791
        idx = 0
 
12792
        for i in allItems:
 
12793
            if i.this == sItem.this:
 
12794
                break
 
12795
            idx += 1
 
12796
        return idx
 
12797
 
12769
12798
    def _ReplaceWin(*args, **kwargs):
12770
12799
        """_ReplaceWin(self, Window oldwin, Window newwin, bool recursive=False) -> bool"""
12771
12800
        return _core_.Sizer__ReplaceWin(*args, **kwargs)