X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/74bf4e6430a42c20491d13e1bb9805e1ee614a95..3ed3a1c846d66410872a15f746c432311e306e42:/interface/odcombo.h diff --git a/interface/odcombo.h b/interface/odcombo.h index 5eb7f5bbda..a47cd424e8 100644 --- a/interface/odcombo.h +++ b/interface/odcombo.h @@ -6,6 +6,22 @@ // Licence: wxWindows license ///////////////////////////////////////////////////////////////////////////// + +enum wxOwnerDrawnComboBoxPaintingFlags +{ + /** + Combo control is being painted, instead of a list item. + Argument item may be @c wxNOT_FOUND in this case. + */ + wxODCB_PAINTING_CONTROL = 0x0001, + + /** + An item with selection background is being painted. + DC text colour should already be correct. + */ + wxODCB_PAINTING_SELECTED = 0x0002 +}; + /** @class wxOwnerDrawnComboBox @wxheader{odcombo.h} @@ -19,17 +35,19 @@ OnDrawItem(), OnMeasureItem() and OnMeasureItemWidth(). @beginStyleTable - @style{wxODCB_DCLICK_CYCLES}: + @style{wxODCB_DCLICK_CYCLES} Double-clicking cycles item if wxCB_READONLY is also used. Synonymous with wxCC_SPECIAL_DCLICK. - @style{wxODCB_STD_CONTROL_PAINT}: + @style{wxODCB_STD_CONTROL_PAINT} Control itself is not custom painted using OnDrawItem. Even if this style is not used, writable wxOwnerDrawnComboBox is never custom painted unless SetCustomPaintWidth() is called. @endStyleTable + @see wxComboCtrl window styles and @ref overview_windowstyles. + @beginEventTable{wxCommandEvent} - @event{EVT_COMBOBOX(id, func)}: + @event{EVT_COMBOBOX(id, func)} Process a wxEVT_COMMAND_COMBOBOX_SELECTED event, when an item on the list is selected. Note that calling GetValue() returns the new value of selection. @@ -39,18 +57,18 @@ @library{wxadv} @category{ctrl} - @appearance{ownerdrawncombobox.png} + @see wxComboCtrl, wxComboBox, wxVListBox, wxCommandEvent */ class wxOwnerDrawnComboBox : public wxComboCtrl { public: - /** Default constructor. */ wxOwnerDrawnComboBox(); + //@{ /** Constructor, creating and showing a owner-drawn combobox. @@ -64,9 +82,8 @@ public: @param pos Window position. @param size - Window size. If @c wxDefaultSize is specified then the window is - sized - appropriately. + Window size. + If ::wxDefaultSize is specified then the window is sized appropriately. @param n Number of strings with which to initialise the control. @param choices @@ -166,16 +183,7 @@ public: @param item The index of the item to be drawn @param flags - Combines any of the following flag values: - - @beginStyleTable - @style{wxODCB_PAINTING_CONTROL}: - Combo control is being painted, instead of a list item. - Argument item may be @c wxNOT_FOUND in this case. - @style{wxODCB_PAINTING_SELECTED}: - An item with selection background is being painted. - DC text colour should already be correct. - @endStyleTable + A combination of the ::wxOwnerDrawnComboBoxPaintingFlags enumeration values. */ void OnDrawItem(wxDC& dc, const wxRect& rect, int item, int flags) const;