2006-05-08 19:42:45 -04:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Name: wx/msw/combo.h
|
2006-05-16 18:57:40 -04:00
|
|
|
// Purpose: wxComboCtrl class
|
2006-05-08 19:42:45 -04:00
|
|
|
// Author: Jaakko Salli
|
|
|
|
// Modified by:
|
|
|
|
// Created: Apr-30-2006
|
|
|
|
// RCS-ID: $Id$
|
|
|
|
// Copyright: (c) Jaakko Salli
|
|
|
|
// Licence: wxWindows licence
|
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#ifndef _WX_COMBOCONTROL_H_
|
|
|
|
#define _WX_COMBOCONTROL_H_
|
|
|
|
|
|
|
|
// NB: Definition of _WX_COMBOCONTROL_H_ is used in wx/generic/combo.h to
|
2006-05-16 18:57:40 -04:00
|
|
|
// determine whether there is native wxComboCtrl, so make sure you
|
|
|
|
// use it in all native wxComboCtrls.
|
2006-05-08 19:42:45 -04:00
|
|
|
|
2006-05-16 18:57:40 -04:00
|
|
|
#if wxUSE_COMBOCTRL
|
2006-05-08 19:42:45 -04:00
|
|
|
|
|
|
|
// ----------------------------------------------------------------------------
|
2006-05-16 18:57:40 -04:00
|
|
|
// Native wxComboCtrl
|
2006-05-08 19:42:45 -04:00
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
// Define this only if native implementation includes all features
|
|
|
|
#define wxCOMBOCONTROL_FULLY_FEATURED
|
|
|
|
|
2006-05-16 18:57:40 -04:00
|
|
|
class WXDLLEXPORT wxComboCtrl : public wxComboCtrlBase
|
2006-05-08 19:42:45 -04:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
// ctors and such
|
2006-05-16 18:57:40 -04:00
|
|
|
wxComboCtrl() : wxComboCtrlBase() { Init(); }
|
2006-05-08 19:42:45 -04:00
|
|
|
|
2006-05-16 18:57:40 -04:00
|
|
|
wxComboCtrl(wxWindow *parent,
|
2006-05-08 19:42:45 -04:00
|
|
|
wxWindowID id = wxID_ANY,
|
|
|
|
const wxString& value = wxEmptyString,
|
|
|
|
const wxPoint& pos = wxDefaultPosition,
|
|
|
|
const wxSize& size = wxDefaultSize,
|
|
|
|
long style = 0,
|
|
|
|
const wxValidator& validator = wxDefaultValidator,
|
|
|
|
const wxString& name = wxComboBoxNameStr)
|
2006-05-16 18:57:40 -04:00
|
|
|
: wxComboCtrlBase()
|
2006-05-08 19:42:45 -04:00
|
|
|
{
|
|
|
|
Init();
|
|
|
|
|
|
|
|
(void)Create(parent, id, value, pos, size, style, validator, name);
|
|
|
|
}
|
|
|
|
|
|
|
|
bool Create(wxWindow *parent,
|
|
|
|
wxWindowID id = wxID_ANY,
|
|
|
|
const wxString& value = wxEmptyString,
|
|
|
|
const wxPoint& pos = wxDefaultPosition,
|
|
|
|
const wxSize& size = wxDefaultSize,
|
|
|
|
long style = 0,
|
|
|
|
const wxValidator& validator = wxDefaultValidator,
|
|
|
|
const wxString& name = wxComboBoxNameStr);
|
|
|
|
|
2006-05-16 18:57:40 -04:00
|
|
|
virtual ~wxComboCtrl();
|
2006-05-08 19:42:45 -04:00
|
|
|
|
|
|
|
virtual void DrawFocusBackground( wxDC& dc, const wxRect& rect, int flags );
|
|
|
|
|
2006-05-16 18:57:40 -04:00
|
|
|
static int GetFeatures() { return wxComboCtrlFeatures::All; }
|
2006-05-08 19:42:45 -04:00
|
|
|
|
|
|
|
protected:
|
|
|
|
|
|
|
|
// customization
|
|
|
|
virtual void OnResize();
|
|
|
|
virtual wxCoord GetNativeTextIndent() const;
|
|
|
|
virtual void OnThemeChange();
|
|
|
|
|
|
|
|
// event handlers
|
|
|
|
void OnPaintEvent( wxPaintEvent& event );
|
|
|
|
void OnMouseEvent( wxMouseEvent& event );
|
|
|
|
|
|
|
|
private:
|
|
|
|
void Init();
|
|
|
|
|
|
|
|
DECLARE_EVENT_TABLE()
|
|
|
|
|
2006-05-16 18:57:40 -04:00
|
|
|
DECLARE_DYNAMIC_CLASS(wxComboCtrl)
|
2006-05-08 19:42:45 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
|
2006-05-16 18:57:40 -04:00
|
|
|
#endif // wxUSE_COMBOCTRL
|
2006-05-08 19:42:45 -04:00
|
|
|
#endif
|
|
|
|
// _WX_COMBOCONTROL_H_
|