X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/eccab1a711f3fed5d27e026f2f4c496bc6b9a38b..70ee369088ef1d54628883a1da7c20b1796d5b94:/wxPython/src/msw/combo.py diff --git a/wxPython/src/msw/combo.py b/wxPython/src/msw/combo.py index 9b15b384e3..17854ae6d5 100644 --- a/wxPython/src/msw/combo.py +++ b/wxPython/src/msw/combo.py @@ -65,6 +65,9 @@ __docfilter__ = wx.__DocFilter(globals()) CC_BUTTON_OUTSIDE_BORDER = _combo.CC_BUTTON_OUTSIDE_BORDER CC_POPUP_ON_MOUSE_UP = _combo.CC_POPUP_ON_MOUSE_UP CC_NO_TEXT_AUTO_SELECT = _combo.CC_NO_TEXT_AUTO_SELECT +CC_BUTTON_STAYS_DOWN = _combo.CC_BUTTON_STAYS_DOWN +CC_FULL_BUTTON = _combo.CC_FULL_BUTTON +CC_BUTTON_COVERS_BORDER = _combo.CC_BUTTON_COVERS_BORDER CC_MF_ON_BUTTON = _combo.CC_MF_ON_BUTTON CC_MF_ON_CLICK_AREA = _combo.CC_MF_ON_CLICK_AREA class ComboCtrlFeatures(object): @@ -299,7 +302,7 @@ class ComboCtrl(_core.Control): Extends popup size horizontally, relative to the edges of the combo control. Values are given in pixels, and the defaults are zero. It - is up to th epopup to fully take these values into account. + is up to the popup to fully take these values into account. """ return _combo.ComboCtrl_SetPopupExtents(*args, **kwargs) @@ -498,6 +501,10 @@ class ComboCtrl(_core.Control): """SetCtrlMainWnd(self, Window wnd)""" return _combo.ComboCtrl_SetCtrlMainWnd(*args, **kwargs) + def GetMainWindowOfCompositeControl(*args, **kwargs): + """GetMainWindowOfCompositeControl(self) -> Window""" + return _combo.ComboCtrl_GetMainWindowOfCompositeControl(*args, **kwargs) + def GetFeatures(*args, **kwargs): """ GetFeatures() -> int @@ -539,6 +546,21 @@ class ComboCtrl(_core.Control): """ return _combo.ComboCtrl_AnimateShow(*args, **kwargs) + PopupControl = property(GetPopupControl,SetPopupControl) + PopupWindow = property(GetPopupWindow) + TextCtrl = property(GetTextCtrl) + Button = property(GetButton) + Value = property(GetValue,SetValue) + InsertionPoint = property(GetInsertionPoint) + CustomPaintWidth = property(GetCustomPaintWidth,SetCustomPaintWidth) + ButtonSize = property(GetButtonSize) + TextIndent = property(GetTextIndent,SetTextIndent) + TextRect = property(GetTextRect) + BitmapNormal = property(GetBitmapNormal) + BitmapPressed = property(GetBitmapPressed) + BitmapHover = property(GetBitmapHover) + BitmapDisabled = property(GetBitmapDisabled) + PopupWindowState = property(GetPopupWindowState) _combo.ComboCtrl_swigregister(ComboCtrl) def PreComboCtrl(*args, **kwargs): @@ -895,5 +917,91 @@ def PreOwnerDrawnComboBox(*args, **kwargs): val = _combo.new_PreOwnerDrawnComboBox(*args, **kwargs) return val +class BitmapComboBox(OwnerDrawnComboBox): + """ + A combobox that displays a bitmap in front of the list items. It + currently only allows using bitmaps of one size, and resizes itself so + that a bitmap can be shown next to the text field. + """ + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + __repr__ = _swig_repr + def __init__(self, *args, **kwargs): + """ + __init__(self, Window parent, int id=-1, String value=EmptyString, + Point pos=DefaultPosition, Size size=DefaultSize, + wxArrayString choices=wxPyEmptyStringArray, + long style=0, Validator validator=DefaultValidator, + String name=wxBitmapComboBoxNameStr) -> BitmapComboBox + + Standard constructor + """ + _combo.BitmapComboBox_swiginit(self,_combo.new_BitmapComboBox(*args, **kwargs)) + self._setOORInfo(self); + + def Create(*args, **kwargs): + """ + Create(self, Window parent, int id=-1, String value=EmptyString, + Point pos=DefaultPosition, Size size=DefaultSize, + wxArrayString choices=wxPyEmptyStringArray, + long style=0, Validator validator=DefaultValidator, + String name=wxBitmapComboBoxNameStr) -> bool + + Create the UI object, and other initialization. + """ + return _combo.BitmapComboBox_Create(*args, **kwargs) + + def Append(*args, **kwargs): + """ + Append(self, String item, Bitmap bitmap=wxNullBitmap, PyObject clientData=None) -> int + + Adds the item to the control, associating the given data with the item + if not None. The return value is the index of the newly added item. + """ + return _combo.BitmapComboBox_Append(*args, **kwargs) + + def GetItemBitmap(*args, **kwargs): + """ + GetItemBitmap(self, int n) -> Bitmap + + Returns the image of the item with the given index. + """ + return _combo.BitmapComboBox_GetItemBitmap(*args, **kwargs) + + def Insert(*args, **kwargs): + """ + Insert(self, String item, Bitmap bitmap, int pos, PyObject clientData=None) -> int + + Insert an item into the control before the item at the ``pos`` index, + optionally associating some data object with the item. + """ + return _combo.BitmapComboBox_Insert(*args, **kwargs) + + def SetItemBitmap(*args, **kwargs): + """ + SetItemBitmap(self, int n, Bitmap bitmap) + + Sets the image for the given item. + """ + return _combo.BitmapComboBox_SetItemBitmap(*args, **kwargs) + + def GetBitmapSize(*args, **kwargs): + """ + GetBitmapSize(self) -> Size + + Returns size of the image used in list. + """ + return _combo.BitmapComboBox_GetBitmapSize(*args, **kwargs) + +_combo.BitmapComboBox_swigregister(BitmapComboBox) + +def PreBitmapComboBox(*args, **kwargs): + """ + PreBitmapComboBox() -> BitmapComboBox + + 2-phase create constructor. + """ + val = _combo.new_PreBitmapComboBox(*args, **kwargs) + return val +