give a name to the enumeration of the values which can be passed to OnDrawItem to make it easier to document it
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@53050 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -40,7 +40,7 @@ enum
|
|||||||
//
|
//
|
||||||
// Callback flags (see wxOwnerDrawnComboBox::OnDrawItem)
|
// Callback flags (see wxOwnerDrawnComboBox::OnDrawItem)
|
||||||
//
|
//
|
||||||
enum
|
enum wxOwnerDrawnComboBoxPaintingFlags
|
||||||
{
|
{
|
||||||
// when set, we are painting the selected item in control,
|
// when set, we are painting the selected item in control,
|
||||||
// not in the popup
|
// not in the popup
|
||||||
@@ -140,9 +140,10 @@ protected:
|
|||||||
// item: item index to be drawn, may be wxNOT_FOUND when painting combo control itself
|
// item: item index to be drawn, may be wxNOT_FOUND when painting combo control itself
|
||||||
// and there is no valid selection
|
// and there is no valid selection
|
||||||
// flags: wxODCB_PAINTING_CONTROL is set if painting to combo control instead of list
|
// flags: wxODCB_PAINTING_CONTROL is set if painting to combo control instead of list
|
||||||
// NOTE: If wxVListBoxComboPopup is used with wxComboCtrl class not derived from
|
//
|
||||||
|
// NOTE: If wxVListBoxComboPopup is used with a wxComboCtrl class not derived from
|
||||||
// wxOwnerDrawnComboBox, this method must be overridden.
|
// wxOwnerDrawnComboBox, this method must be overridden.
|
||||||
virtual void OnDrawItem( wxDC& dc, const wxRect& rect, int item, int flags ) const;
|
virtual void OnDrawItem( wxDC& dc, const wxRect& rect, int item, int flags) const;
|
||||||
|
|
||||||
// This is same as in wxVListBox
|
// This is same as in wxVListBox
|
||||||
virtual wxCoord OnMeasureItem( size_t item ) const;
|
virtual wxCoord OnMeasureItem( size_t item ) const;
|
||||||
|
@@ -6,6 +6,22 @@
|
|||||||
// Licence: wxWindows license
|
// 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
|
@class wxOwnerDrawnComboBox
|
||||||
@wxheader{odcombo.h}
|
@wxheader{odcombo.h}
|
||||||
@@ -28,6 +44,8 @@
|
|||||||
painted unless SetCustomPaintWidth() is called.
|
painted unless SetCustomPaintWidth() is called.
|
||||||
@endStyleTable
|
@endStyleTable
|
||||||
|
|
||||||
|
@see wxComboCtrl window styles and @ref overview_windowstyles.
|
||||||
|
|
||||||
@beginEventTable{wxCommandEvent}
|
@beginEventTable{wxCommandEvent}
|
||||||
@event{EVT_COMBOBOX(id, func)}
|
@event{EVT_COMBOBOX(id, func)}
|
||||||
Process a wxEVT_COMMAND_COMBOBOX_SELECTED event, when an item on
|
Process a wxEVT_COMMAND_COMBOBOX_SELECTED event, when an item on
|
||||||
@@ -64,8 +82,8 @@ public:
|
|||||||
@param pos
|
@param pos
|
||||||
Window position.
|
Window position.
|
||||||
@param size
|
@param size
|
||||||
Window size. If @c wxDefaultSize is specified then the window is sized
|
Window size.
|
||||||
appropriately.
|
If ::wxDefaultSize is specified then the window is sized appropriately.
|
||||||
@param n
|
@param n
|
||||||
Number of strings with which to initialise the control.
|
Number of strings with which to initialise the control.
|
||||||
@param choices
|
@param choices
|
||||||
@@ -165,16 +183,7 @@ public:
|
|||||||
@param item
|
@param item
|
||||||
The index of the item to be drawn
|
The index of the item to be drawn
|
||||||
@param flags
|
@param flags
|
||||||
Combines any of the following flag values:
|
A combination of the ::wxOwnerDrawnComboBoxPaintingFlags enumeration 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
|
|
||||||
*/
|
*/
|
||||||
void OnDrawItem(wxDC& dc, const wxRect& rect, int item,
|
void OnDrawItem(wxDC& dc, const wxRect& rect, int item,
|
||||||
int flags) const;
|
int flags) const;
|
||||||
|
Reference in New Issue
Block a user