1998-05-20 10:12:05 -04:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
2000-07-15 15:51:35 -04:00
|
|
|
// Name: wx/msw/combobox.h
|
1998-05-20 10:12:05 -04:00
|
|
|
// Purpose: wxComboBox class
|
|
|
|
// Author: Julian Smart
|
|
|
|
// Modified by:
|
|
|
|
// Created: 01/02/97
|
|
|
|
// RCS-ID: $Id$
|
1998-08-07 19:52:45 -04:00
|
|
|
// Copyright: (c) Julian Smart
|
1999-07-02 18:02:05 -04:00
|
|
|
// Licence: wxWindows licence
|
1998-05-20 10:12:05 -04:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
1998-08-07 19:52:45 -04:00
|
|
|
#ifndef _WX_COMBOBOX_H_
|
|
|
|
#define _WX_COMBOBOX_H_
|
1998-05-20 10:12:05 -04:00
|
|
|
|
2003-08-09 08:38:21 -04:00
|
|
|
#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
|
1999-07-02 18:02:05 -04:00
|
|
|
#pragma interface "combobox.h"
|
1998-05-20 10:12:05 -04:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#include "wx/choice.h"
|
|
|
|
|
1998-09-25 09:28:52 -04:00
|
|
|
#if wxUSE_COMBOBOX
|
1998-05-20 10:12:05 -04:00
|
|
|
|
1999-07-02 18:02:05 -04:00
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
// Combobox control
|
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
|
1998-05-20 10:12:05 -04:00
|
|
|
class WXDLLEXPORT wxComboBox: public wxChoice
|
|
|
|
{
|
1999-07-02 18:02:05 -04:00
|
|
|
public:
|
2004-01-11 10:33:01 -05:00
|
|
|
wxComboBox();
|
1999-07-02 18:02:05 -04:00
|
|
|
|
|
|
|
wxComboBox(wxWindow *parent, wxWindowID id,
|
|
|
|
const wxString& value = wxEmptyString,
|
|
|
|
const wxPoint& pos = wxDefaultPosition,
|
|
|
|
const wxSize& size = wxDefaultSize,
|
|
|
|
int n = 0, const wxString choices[] = NULL,
|
|
|
|
long style = 0,
|
|
|
|
const wxValidator& validator = wxDefaultValidator,
|
2004-01-11 10:33:01 -05:00
|
|
|
const wxString& name = wxComboBoxNameStr);
|
1999-07-02 18:02:05 -04:00
|
|
|
|
2000-07-15 15:51:35 -04:00
|
|
|
bool Create(wxWindow *parent,
|
|
|
|
wxWindowID id,
|
|
|
|
const wxString& value = wxEmptyString,
|
|
|
|
const wxPoint& pos = wxDefaultPosition,
|
|
|
|
const wxSize& size = wxDefaultSize,
|
|
|
|
int n = 0,
|
|
|
|
const wxString choices[] = NULL,
|
|
|
|
long style = 0,
|
|
|
|
const wxValidator& validator = wxDefaultValidator,
|
|
|
|
const wxString& name = wxComboBoxNameStr);
|
1999-07-02 18:02:05 -04:00
|
|
|
|
|
|
|
// List functions: see wxChoice
|
|
|
|
|
|
|
|
// Text field functions
|
|
|
|
wxString GetValue() const { return GetLabel(); }
|
|
|
|
virtual void SetValue(const wxString& value);
|
|
|
|
|
|
|
|
// Clipboard operations
|
|
|
|
virtual void Copy();
|
|
|
|
virtual void Cut();
|
|
|
|
virtual void Paste();
|
|
|
|
virtual void SetInsertionPoint(long pos);
|
|
|
|
virtual void SetInsertionPointEnd();
|
|
|
|
virtual long GetInsertionPoint() const;
|
|
|
|
virtual long GetLastPosition() const;
|
|
|
|
virtual void Replace(long from, long to, const wxString& value);
|
|
|
|
virtual void Remove(long from, long to);
|
|
|
|
virtual void SetSelection(int n) { wxChoice::SetSelection(n); }
|
|
|
|
virtual void SetSelection(long from, long to);
|
|
|
|
virtual void SetEditable(bool editable);
|
|
|
|
|
2000-07-15 15:51:35 -04:00
|
|
|
// implementation only from now on
|
1999-07-02 18:02:05 -04:00
|
|
|
virtual bool MSWCommand(WXUINT param, WXWORD id);
|
2000-07-15 15:51:35 -04:00
|
|
|
bool MSWProcessEditMsg(WXUINT msg, WXWPARAM wParam, WXLPARAM lParam);
|
|
|
|
virtual WXHBRUSH OnCtlColor(WXHDC pDC, WXHWND pWnd, WXUINT nCtlColor,
|
|
|
|
WXUINT message, WXWPARAM wParam, WXLPARAM lParam);
|
|
|
|
|
|
|
|
WXHWND GetEditHWND() const;
|
2003-07-21 20:24:07 -04:00
|
|
|
|
|
|
|
private:
|
|
|
|
DECLARE_DYNAMIC_CLASS_NO_COPY(wxComboBox)
|
1998-05-20 10:12:05 -04:00
|
|
|
};
|
|
|
|
|
1998-09-25 09:28:52 -04:00
|
|
|
#endif // wxUSE_COMBOBOX
|
1998-05-20 10:12:05 -04:00
|
|
|
#endif
|
1998-08-07 19:52:45 -04:00
|
|
|
// _WX_COMBOBOX_H_
|