git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@39167
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
25 files changed:
--enable-choice use wxChoice class
--enable-choicebook use wxChoicebook class
--enable-combobox use wxComboBox class
--enable-choice use wxChoice class
--enable-choicebook use wxChoicebook class
--enable-combobox use wxComboBox class
- --enable-combocontrol use wxComboControl class
+ --enable-comboctrl use wxComboCtrl class
--enable-datepick use wxDatePickerCtrl class
--enable-display use wxDisplay class
--enable-gauge use wxGauge class
--enable-datepick use wxDatePickerCtrl class
--enable-display use wxDisplay class
--enable-gauge use wxGauge class
--enable-listbox use wxListBox class
--enable-listctrl use wxListCtrl class
--enable-notebook use wxNotebook class
--enable-listbox use wxListBox class
--enable-listctrl use wxListCtrl class
--enable-notebook use wxNotebook class
- --enable-odcombo use wxOwnerDrawnComboBox class
+ --enable-odcombobox use wxOwnerDrawnComboBox class
--enable-radiobox use wxRadioBox class
--enable-radiobtn use wxRadioButton class
--enable-sash use wxSashWindow class
--enable-radiobox use wxRadioBox class
--enable-radiobtn use wxRadioButton class
--enable-sash use wxSashWindow class
DEFAULT_wxUSE_CHOICE=no
DEFAULT_wxUSE_CHOICEBOOK=no
DEFAULT_wxUSE_COMBOBOX=no
DEFAULT_wxUSE_CHOICE=no
DEFAULT_wxUSE_CHOICEBOOK=no
DEFAULT_wxUSE_COMBOBOX=no
- DEFAULT_wxUSE_COMBOCONTROL=no
+ DEFAULT_wxUSE_COMBOCTRL=no
DEFAULT_wxUSE_DATEPICKCTRL=no
DEFAULT_wxUSE_DISPLAY=no
DEFAULT_wxUSE_GAUGE=no
DEFAULT_wxUSE_DATEPICKCTRL=no
DEFAULT_wxUSE_DISPLAY=no
DEFAULT_wxUSE_GAUGE=no
DEFAULT_wxUSE_LISTBOX=no
DEFAULT_wxUSE_LISTCTRL=no
DEFAULT_wxUSE_NOTEBOOK=no
DEFAULT_wxUSE_LISTBOX=no
DEFAULT_wxUSE_LISTCTRL=no
DEFAULT_wxUSE_NOTEBOOK=no
- DEFAULT_wxUSE_OWNERDRAWNCOMBOBOX=no
+ DEFAULT_wxUSE_ODCOMBOBOX=no
DEFAULT_wxUSE_RADIOBOX=no
DEFAULT_wxUSE_RADIOBTN=no
DEFAULT_wxUSE_SASH=no
DEFAULT_wxUSE_RADIOBOX=no
DEFAULT_wxUSE_RADIOBTN=no
DEFAULT_wxUSE_SASH=no
DEFAULT_wxUSE_CHOICE=yes
DEFAULT_wxUSE_CHOICEBOOK=yes
DEFAULT_wxUSE_COMBOBOX=yes
DEFAULT_wxUSE_CHOICE=yes
DEFAULT_wxUSE_CHOICEBOOK=yes
DEFAULT_wxUSE_COMBOBOX=yes
- DEFAULT_wxUSE_COMBOCONTROL=yes
+ DEFAULT_wxUSE_COMBOCTRL=yes
DEFAULT_wxUSE_DATEPICKCTRL=yes
DEFAULT_wxUSE_DISPLAY=yes
DEFAULT_wxUSE_GAUGE=yes
DEFAULT_wxUSE_DATEPICKCTRL=yes
DEFAULT_wxUSE_DISPLAY=yes
DEFAULT_wxUSE_GAUGE=yes
DEFAULT_wxUSE_LISTBOX=yes
DEFAULT_wxUSE_LISTCTRL=yes
DEFAULT_wxUSE_NOTEBOOK=yes
DEFAULT_wxUSE_LISTBOX=yes
DEFAULT_wxUSE_LISTCTRL=yes
DEFAULT_wxUSE_NOTEBOOK=yes
- DEFAULT_wxUSE_OWNERDRAWNCOMBOBOX=yes
+ DEFAULT_wxUSE_ODCOMBOBOX=yes
DEFAULT_wxUSE_RADIOBOX=yes
DEFAULT_wxUSE_RADIOBTN=yes
DEFAULT_wxUSE_SASH=yes
DEFAULT_wxUSE_RADIOBOX=yes
DEFAULT_wxUSE_RADIOBTN=yes
DEFAULT_wxUSE_SASH=yes
- echo "$as_me:$LINENO: checking for --${enablestring:-enable}-combocontrol" >&5
-echo $ECHO_N "checking for --${enablestring:-enable}-combocontrol... $ECHO_C" >&6
+ echo "$as_me:$LINENO: checking for --${enablestring:-enable}-comboctrl" >&5
+echo $ECHO_N "checking for --${enablestring:-enable}-comboctrl... $ECHO_C" >&6
- # Check whether --enable-combocontrol or --disable-combocontrol was given.
-if test "${enable_combocontrol+set}" = set; then
- enableval="$enable_combocontrol"
+ # Check whether --enable-comboctrl or --disable-comboctrl was given.
+if test "${enable_comboctrl+set}" = set; then
+ enableval="$enable_comboctrl"
if test "$enableval" = yes; then
if test "$enableval" = yes; then
- ac_cv_use_combocontrol='wxUSE_COMBOCONTROL=yes'
+ ac_cv_use_comboctrl='wxUSE_COMBOCTRL=yes'
- ac_cv_use_combocontrol='wxUSE_COMBOCONTROL=no'
+ ac_cv_use_comboctrl='wxUSE_COMBOCTRL=no'
- LINE=`grep "wxUSE_COMBOCONTROL" ${wx_arg_cache_file}`
+ LINE=`grep "wxUSE_COMBOCTRL" ${wx_arg_cache_file}`
if test "x$LINE" != x ; then
eval "DEFAULT_$LINE"
else
no_cache=1
fi
if test "x$LINE" != x ; then
eval "DEFAULT_$LINE"
else
no_cache=1
fi
- ac_cv_use_combocontrol='wxUSE_COMBOCONTROL='$DEFAULT_wxUSE_COMBOCONTROL
+ ac_cv_use_comboctrl='wxUSE_COMBOCTRL='$DEFAULT_wxUSE_COMBOCTRL
- eval "$ac_cv_use_combocontrol"
+ eval "$ac_cv_use_comboctrl"
if test "$no_cache" != 1; then
if test "$no_cache" != 1; then
- echo $ac_cv_use_combocontrol >> ${wx_arg_cache_file}.tmp
+ echo $ac_cv_use_comboctrl >> ${wx_arg_cache_file}.tmp
- if test "$wxUSE_COMBOCONTROL" = yes; then
+ if test "$wxUSE_COMBOCTRL" = yes; then
echo "$as_me:$LINENO: result: yes" >&5
echo "${ECHO_T}yes" >&6
else
echo "$as_me:$LINENO: result: yes" >&5
echo "${ECHO_T}yes" >&6
else
- echo "$as_me:$LINENO: checking for --${enablestring:-enable}-odcombo" >&5
-echo $ECHO_N "checking for --${enablestring:-enable}-odcombo... $ECHO_C" >&6
+ echo "$as_me:$LINENO: checking for --${enablestring:-enable}-odcombobox" >&5
+echo $ECHO_N "checking for --${enablestring:-enable}-odcombobox... $ECHO_C" >&6
- # Check whether --enable-odcombo or --disable-odcombo was given.
-if test "${enable_odcombo+set}" = set; then
- enableval="$enable_odcombo"
+ # Check whether --enable-odcombobox or --disable-odcombobox was given.
+if test "${enable_odcombobox+set}" = set; then
+ enableval="$enable_odcombobox"
if test "$enableval" = yes; then
if test "$enableval" = yes; then
- ac_cv_use_odcombo='wxUSE_OWNERDRAWNCOMBOBOX=yes'
+ ac_cv_use_odcombobox='wxUSE_ODCOMBOBOX=yes'
- ac_cv_use_odcombo='wxUSE_OWNERDRAWNCOMBOBOX=no'
+ ac_cv_use_odcombobox='wxUSE_ODCOMBOBOX=no'
- LINE=`grep "wxUSE_OWNERDRAWNCOMBOBOX" ${wx_arg_cache_file}`
+ LINE=`grep "wxUSE_ODCOMBOBOX" ${wx_arg_cache_file}`
if test "x$LINE" != x ; then
eval "DEFAULT_$LINE"
else
no_cache=1
fi
if test "x$LINE" != x ; then
eval "DEFAULT_$LINE"
else
no_cache=1
fi
- ac_cv_use_odcombo='wxUSE_OWNERDRAWNCOMBOBOX='$DEFAULT_wxUSE_OWNERDRAWNCOMBOBOX
+ ac_cv_use_odcombobox='wxUSE_ODCOMBOBOX='$DEFAULT_wxUSE_ODCOMBOBOX
- eval "$ac_cv_use_odcombo"
+ eval "$ac_cv_use_odcombobox"
if test "$no_cache" != 1; then
if test "$no_cache" != 1; then
- echo $ac_cv_use_odcombo >> ${wx_arg_cache_file}.tmp
+ echo $ac_cv_use_odcombobox >> ${wx_arg_cache_file}.tmp
- if test "$wxUSE_OWNERDRAWNCOMBOBOX" = yes; then
+ if test "$wxUSE_ODCOMBOBOX" = yes; then
echo "$as_me:$LINENO: result: yes" >&5
echo "${ECHO_T}yes" >&6
else
echo "$as_me:$LINENO: result: yes" >&5
echo "${ECHO_T}yes" >&6
else
-if test "$wxUSE_COMBOCONTROL" = "yes"; then
+if test "$wxUSE_COMBOCTRL" = "yes"; then
cat >>confdefs.h <<\_ACEOF
cat >>confdefs.h <<\_ACEOF
-#define wxUSE_COMBOCONTROL 1
+#define wxUSE_COMBOCTRL 1
SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS notebook"
fi
SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS notebook"
fi
-if test "$wxUSE_OWNERDRAWNCOMBOBOX" = "yes"; then
+if test "$wxUSE_ODCOMBOBOX" = "yes"; then
cat >>confdefs.h <<\_ACEOF
cat >>confdefs.h <<\_ACEOF
-#define wxUSE_OWNERDRAWNCOMBOBOX 1
+#define wxUSE_ODCOMBOBOX 1
DEFAULT_wxUSE_CHOICE=no
DEFAULT_wxUSE_CHOICEBOOK=no
DEFAULT_wxUSE_COMBOBOX=no
DEFAULT_wxUSE_CHOICE=no
DEFAULT_wxUSE_CHOICEBOOK=no
DEFAULT_wxUSE_COMBOBOX=no
- DEFAULT_wxUSE_COMBOCONTROL=no
+ DEFAULT_wxUSE_COMBOCTRL=no
DEFAULT_wxUSE_DATEPICKCTRL=no
DEFAULT_wxUSE_DISPLAY=no
DEFAULT_wxUSE_GAUGE=no
DEFAULT_wxUSE_DATEPICKCTRL=no
DEFAULT_wxUSE_DISPLAY=no
DEFAULT_wxUSE_GAUGE=no
DEFAULT_wxUSE_LISTBOX=no
DEFAULT_wxUSE_LISTCTRL=no
DEFAULT_wxUSE_NOTEBOOK=no
DEFAULT_wxUSE_LISTBOX=no
DEFAULT_wxUSE_LISTCTRL=no
DEFAULT_wxUSE_NOTEBOOK=no
- DEFAULT_wxUSE_OWNERDRAWNCOMBOBOX=no
+ DEFAULT_wxUSE_ODCOMBOBOX=no
DEFAULT_wxUSE_RADIOBOX=no
DEFAULT_wxUSE_RADIOBTN=no
DEFAULT_wxUSE_SASH=no
DEFAULT_wxUSE_RADIOBOX=no
DEFAULT_wxUSE_RADIOBTN=no
DEFAULT_wxUSE_SASH=no
DEFAULT_wxUSE_CHOICE=yes
DEFAULT_wxUSE_CHOICEBOOK=yes
DEFAULT_wxUSE_COMBOBOX=yes
DEFAULT_wxUSE_CHOICE=yes
DEFAULT_wxUSE_CHOICEBOOK=yes
DEFAULT_wxUSE_COMBOBOX=yes
- DEFAULT_wxUSE_COMBOCONTROL=yes
+ DEFAULT_wxUSE_COMBOCTRL=yes
DEFAULT_wxUSE_DATEPICKCTRL=yes
DEFAULT_wxUSE_DISPLAY=yes
DEFAULT_wxUSE_GAUGE=yes
DEFAULT_wxUSE_DATEPICKCTRL=yes
DEFAULT_wxUSE_DISPLAY=yes
DEFAULT_wxUSE_GAUGE=yes
DEFAULT_wxUSE_LISTBOX=yes
DEFAULT_wxUSE_LISTCTRL=yes
DEFAULT_wxUSE_NOTEBOOK=yes
DEFAULT_wxUSE_LISTBOX=yes
DEFAULT_wxUSE_LISTCTRL=yes
DEFAULT_wxUSE_NOTEBOOK=yes
- DEFAULT_wxUSE_OWNERDRAWNCOMBOBOX=yes
+ DEFAULT_wxUSE_ODCOMBOBOX=yes
DEFAULT_wxUSE_RADIOBOX=yes
DEFAULT_wxUSE_RADIOBTN=yes
DEFAULT_wxUSE_SASH=yes
DEFAULT_wxUSE_RADIOBOX=yes
DEFAULT_wxUSE_RADIOBTN=yes
DEFAULT_wxUSE_SASH=yes
WX_ARG_ENABLE(choice, [ --enable-choice use wxChoice class], wxUSE_CHOICE)
WX_ARG_ENABLE(choicebook, [ --enable-choicebook use wxChoicebook class], wxUSE_CHOICEBOOK)
WX_ARG_ENABLE(combobox, [ --enable-combobox use wxComboBox class], wxUSE_COMBOBOX)
WX_ARG_ENABLE(choice, [ --enable-choice use wxChoice class], wxUSE_CHOICE)
WX_ARG_ENABLE(choicebook, [ --enable-choicebook use wxChoicebook class], wxUSE_CHOICEBOOK)
WX_ARG_ENABLE(combobox, [ --enable-combobox use wxComboBox class], wxUSE_COMBOBOX)
-WX_ARG_ENABLE(combocontrol,[ --enable-combocontrol use wxComboControl class], wxUSE_COMBOCONTROL)
+WX_ARG_ENABLE(comboctrl, [ --enable-comboctrl use wxComboCtrl class], wxUSE_COMBOCTRL)
WX_ARG_ENABLE(datepick, [ --enable-datepick use wxDatePickerCtrl class], wxUSE_DATEPICKCTRL)
WX_ARG_ENABLE(display, [ --enable-display use wxDisplay class], wxUSE_DISPLAY)
WX_ARG_ENABLE(gauge, [ --enable-gauge use wxGauge class], wxUSE_GAUGE)
WX_ARG_ENABLE(datepick, [ --enable-datepick use wxDatePickerCtrl class], wxUSE_DATEPICKCTRL)
WX_ARG_ENABLE(display, [ --enable-display use wxDisplay class], wxUSE_DISPLAY)
WX_ARG_ENABLE(gauge, [ --enable-gauge use wxGauge class], wxUSE_GAUGE)
WX_ARG_ENABLE(listbox, [ --enable-listbox use wxListBox class], wxUSE_LISTBOX)
WX_ARG_ENABLE(listctrl, [ --enable-listctrl use wxListCtrl class], wxUSE_LISTCTRL)
WX_ARG_ENABLE(notebook, [ --enable-notebook use wxNotebook class], wxUSE_NOTEBOOK)
WX_ARG_ENABLE(listbox, [ --enable-listbox use wxListBox class], wxUSE_LISTBOX)
WX_ARG_ENABLE(listctrl, [ --enable-listctrl use wxListCtrl class], wxUSE_LISTCTRL)
WX_ARG_ENABLE(notebook, [ --enable-notebook use wxNotebook class], wxUSE_NOTEBOOK)
-WX_ARG_ENABLE(odcombo, [ --enable-odcombo use wxOwnerDrawnComboBox class], wxUSE_OWNERDRAWNCOMBOBOX)
+WX_ARG_ENABLE(odcombobox, [ --enable-odcombobox use wxOwnerDrawnComboBox class], wxUSE_ODCOMBOBOX)
WX_ARG_ENABLE(radiobox, [ --enable-radiobox use wxRadioBox class], wxUSE_RADIOBOX)
WX_ARG_ENABLE(radiobtn, [ --enable-radiobtn use wxRadioButton class], wxUSE_RADIOBTN)
WX_ARG_ENABLE(sash, [ --enable-sash use wxSashWindow class], wxUSE_SASH)
WX_ARG_ENABLE(radiobox, [ --enable-radiobox use wxRadioBox class], wxUSE_RADIOBOX)
WX_ARG_ENABLE(radiobtn, [ --enable-radiobtn use wxRadioButton class], wxUSE_RADIOBTN)
WX_ARG_ENABLE(sash, [ --enable-sash use wxSashWindow class], wxUSE_SASH)
-if test "$wxUSE_COMBOCONTROL" = "yes"; then
- AC_DEFINE(wxUSE_COMBOCONTROL)
+if test "$wxUSE_COMBOCTRL" = "yes"; then
+ AC_DEFINE(wxUSE_COMBOCTRL)
SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS notebook"
fi
SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS notebook"
fi
-if test "$wxUSE_OWNERDRAWNCOMBOBOX" = "yes"; then
- AC_DEFINE(wxUSE_OWNERDRAWNCOMBOBOX)
+if test "$wxUSE_ODCOMBOBOX" = "yes"; then
+ AC_DEFINE(wxUSE_ODCOMBOBOX)
USES_CONTROLS=1
SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS combo"
fi
USES_CONTROLS=1
SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS combo"
fi
-- Added wxComboControl and wxOwnerDrawnComboBox (Jaakko Salli)
+- Added wxComboCtrl and wxOwnerDrawnComboBox (Jaakko Salli)
- Added wxTreebook (uses a wxTreeCtrl to control pages).
- Added wxDC::GradientFillLinear/Concentric()
- Added wxRadioBox::SetItemToolTip()
- Added wxTreebook (uses a wxTreeCtrl to control pages).
- Added wxDC::GradientFillLinear/Concentric()
- Added wxRadioBox::SetItemToolTip()
# endif
#endif /* !defined(wxUSE_COMBOBOX) */
# endif
#endif /* !defined(wxUSE_COMBOBOX) */
-#ifndef wxUSE_COMBOCONTROL
# ifdef wxABORT_ON_CONFIG_ERROR
# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_COMBOCONTROL must be defined."
+# error "wxUSE_COMBOCTRL must be defined."
-# define wxUSE_COMBOCONTROL 0
+# define wxUSE_COMBOCTRL 0
-#endif /* !defined(wxUSE_COMBOCONTROL) */
+#endif /* !defined(wxUSE_COMBOCTRL) */
#ifndef wxUSE_DATAOBJ
# ifdef wxABORT_ON_CONFIG_ERROR
#ifndef wxUSE_DATAOBJ
# ifdef wxABORT_ON_CONFIG_ERROR
# endif
#endif /* !defined(wxUSE_NOTEBOOK) */
# endif
#endif /* !defined(wxUSE_NOTEBOOK) */
-#ifndef wxUSE_OWNERDRAWNCOMBOBOX
+#ifndef wxUSE_ODCOMBOBOX
# ifdef wxABORT_ON_CONFIG_ERROR
# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_OWNERDRAWNCOMBOBOX must be defined."
+# error "wxUSE_ODCOMBOBOX must be defined."
-# define wxUSE_OWNERDRAWNCOMBOBOX 0
+# define wxUSE_ODCOMBOBOX 0
-#endif /* !defined(wxUSE_OWNERDRAWNCOMBOBOX) */
+#endif /* !defined(wxUSE_ODCOMBOBOX) */
#ifndef wxUSE_PALETTE
# ifdef wxABORT_ON_CONFIG_ERROR
#ifndef wxUSE_PALETTE
# ifdef wxABORT_ON_CONFIG_ERROR
///////////////////////////////////////////////////////////////////////////////
// Name: wx/combo.h
///////////////////////////////////////////////////////////////////////////////
// Name: wx/combo.h
-// Purpose: wxComboControl declaration
+// Purpose: wxComboCtrl declaration
// Author: Jaakko Salli
// Modified by:
// Created: Apr-30-2006
// Author: Jaakko Salli
// Modified by:
// Created: Apr-30-2006
/*
A few words about all the classes defined in this file are probably in
/*
A few words about all the classes defined in this file are probably in
- order: why do we need extra wxComboControl and wxComboPopup classes?
+ order: why do we need extra wxComboCtrl and wxComboPopup classes?
This is because a traditional combobox is a combination of a text control
(with a button allowing to open the pop down list) with a listbox and
This is because a traditional combobox is a combination of a text control
(with a button allowing to open the pop down list) with a listbox and
combinations - in fact, we want to allow anything at all to be used as pop
down list, not just a wxListBox.
combinations - in fact, we want to allow anything at all to be used as pop
down list, not just a wxListBox.
- So we define a base wxComboControl which can use any control as pop down
+ So we define a base wxComboCtrl which can use any control as pop down
list and wxComboBox deriving from it which implements the standard wxWidgets
list and wxComboBox deriving from it which implements the standard wxWidgets
- combobox API. wxComboControl needs to be told somehow which control to use
+ combobox API. wxComboCtrl needs to be told somehow which control to use
and this is done by SetPopupControl(). However, we need something more than
just a wxControl in this method as, for example, we need to call
SetSelection("initial text value") and wxControl doesn't have such method.
and this is done by SetPopupControl(). However, we need something more than
just a wxControl in this method as, for example, we need to call
SetSelection("initial text value") and wxControl doesn't have such method.
class WXDLLEXPORT wxComboPopup;
//
class WXDLLEXPORT wxComboPopup;
//
-// New window styles for wxComboControlBase
+// New window styles for wxComboCtrlBase
-// wxComboControl internal flags
+// wxComboCtrl internal flags
enum
{
// First those that can be passed to Customize.
enum
{
// First those that can be passed to Customize.
-// Namespace for wxComboControl feature flags
-struct wxComboControlFeatures
+// Namespace for wxComboCtrl feature flags
+struct wxComboCtrlFeatures
-class WXDLLEXPORT wxComboControlBase : public wxControl
+class WXDLLEXPORT wxComboCtrlBase : public wxControl
{
friend class wxComboPopup;
public:
// ctors and such
{
friend class wxComboPopup;
public:
// ctors and such
- wxComboControlBase() : wxControl() { Init(); }
+ wxComboCtrlBase() : wxControl() { Init(); }
bool Create(wxWindow *parent,
wxWindowID id,
bool Create(wxWindow *parent,
wxWindowID id,
const wxValidator& validator,
const wxString& name);
const wxValidator& validator,
const wxString& name);
- virtual ~wxComboControlBase();
+ virtual ~wxComboCtrlBase();
// show/hide popup window
virtual void ShowPopup();
// show/hide popup window
virtual void ShowPopup();
void OnTextCtrlEvent(wxCommandEvent& event);
void OnSysColourChanged(wxSysColourChangedEvent& event);
void OnTextCtrlEvent(wxCommandEvent& event);
void OnSysColourChanged(wxSysColourChangedEvent& event);
- // Set customization flags (directs how wxComboControlBase helpers behave)
+ // Set customization flags (directs how wxComboCtrlBase helpers behave)
void Customize( wxUint32 flags ) { m_iFlags |= flags; }
// Dispatches size event and refreshes
void Customize( wxUint32 flags ) { m_iFlags |= flags; }
// Dispatches size event and refreshes
- DECLARE_ABSTRACT_CLASS(wxComboControlBase)
+ DECLARE_ABSTRACT_CLASS(wxComboCtrlBase)
};
// ----------------------------------------------------------------------------
// wxComboPopup is the interface which must be implemented by a control to be
};
// ----------------------------------------------------------------------------
// wxComboPopup is the interface which must be implemented by a control to be
-// used as a popup by wxComboControl
+// used as a popup by wxComboCtrl
// ----------------------------------------------------------------------------
// wxComboPopup internal flags
enum
{
// ----------------------------------------------------------------------------
// wxComboPopup internal flags
enum
{
- wxCP_IFLAG_CREATED = 0x0001 // Set by wxComboControlBase after Create is called
+ wxCP_IFLAG_CREATED = 0x0001 // Set by wxComboCtrlBase after Create is called
};
class WXDLLEXPORT wxComboPopup
{
};
class WXDLLEXPORT wxComboPopup
{
- friend class wxComboControlBase;
+ friend class wxComboCtrlBase;
- m_combo = (wxComboControlBase*) NULL;
+ m_combo = (wxComboCtrlBase*) NULL;
// Default implementation draws value as string.
virtual void PaintComboControl( wxDC& dc, const wxRect& rect );
// Default implementation draws value as string.
virtual void PaintComboControl( wxDC& dc, const wxRect& rect );
- // Receives key events from the parent wxComboControl.
+ // Receives key events from the parent wxComboCtrl.
// Events not handled should be skipped, as usual.
virtual void OnComboKeyEvent( wxKeyEvent& event );
// Implement if you need to support special action when user
// Events not handled should be skipped, as usual.
virtual void OnComboKeyEvent( wxKeyEvent& event );
// Implement if you need to support special action when user
- // double-clicks on the parent wxComboControl.
+ // double-clicks on the parent wxComboCtrl.
virtual void OnComboDoubleClick();
// Return final size of popup. Called on every popup, just prior to OnShow.
virtual void OnComboDoubleClick();
// Return final size of popup. Called on every popup, just prior to OnShow.
}
// Default PaintComboControl behaviour
}
// Default PaintComboControl behaviour
- static void DefaultPaintComboControl( wxComboControlBase* combo,
+ static void DefaultPaintComboControl( wxComboCtrlBase* combo,
wxDC& dc,
const wxRect& rect );
protected:
wxDC& dc,
const wxRect& rect );
protected:
- wxComboControlBase* m_combo;
+ wxComboCtrlBase* m_combo;
wxUint32 m_iFlags;
private:
wxUint32 m_iFlags;
private:
- // Called in wxComboControlBase::SetPopupControl
- void InitBase(wxComboControlBase *combo)
+ // Called in wxComboCtrlBase::SetPopupControl
+ void InitBase(wxComboCtrlBase *combo)
// Any ports may need generic as an alternative
#include "wx/generic/combo.h"
// Any ports may need generic as an alternative
#include "wx/generic/combo.h"
-#endif // wxUSE_COMBOCONTROL
+#endif // wxUSE_COMBOCTRL
#endif
// _WX_COMBOCONTROL_H_BASE_
#endif
// _WX_COMBOCONTROL_H_BASE_
/////////////////////////////////////////////////////////////////////////////
// Name: wx/generic/combo.h
/////////////////////////////////////////////////////////////////////////////
// Name: wx/generic/combo.h
-// Purpose: Generic wxComboControl
+// Purpose: Generic wxComboCtrl
// Author: Jaakko Salli
// Modified by:
// Created: Apr-30-2006
// Author: Jaakko Salli
// Modified by:
// Created: Apr-30-2006
#ifndef _WX_GENERIC_COMBOCONTROL_H_
#define _WX_GENERIC_COMBOCONTROL_H_
#ifndef _WX_GENERIC_COMBOCONTROL_H_
#define _WX_GENERIC_COMBOCONTROL_H_
// Only define generic if native doesn't have all the features
#if !defined(wxCOMBOCONTROL_FULLY_FEATURED)
// ----------------------------------------------------------------------------
// Only define generic if native doesn't have all the features
#if !defined(wxCOMBOCONTROL_FULLY_FEATURED)
// ----------------------------------------------------------------------------
-// Generic wxComboControl
// ----------------------------------------------------------------------------
#if defined(__WXUNIVERSAL__)
// ----------------------------------------------------------------------------
#if defined(__WXUNIVERSAL__)
-class WXDLLEXPORT wxGenericComboControl : public wxComboControlBase
+class WXDLLEXPORT wxGenericComboControl : public wxComboCtrlBase
{
public:
// ctors and such
{
public:
// ctors and such
- wxGenericComboControl() : wxComboControlBase() { Init(); }
+ wxGenericComboControl() : wxComboCtrlBase() { Init(); }
wxGenericComboControl(wxWindow *parent,
wxWindowID id = wxID_ANY,
wxGenericComboControl(wxWindow *parent,
wxWindowID id = wxID_ANY,
long style = 0,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxComboBoxNameStr)
long style = 0,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxComboBoxNameStr)
virtual ~wxGenericComboControl();
virtual ~wxGenericComboControl();
- static int GetFeatures() { return wxComboControlFeatures::All; }
+ static int GetFeatures() { return wxComboCtrlFeatures::All; }
#if defined(__WXUNIVERSAL__)
// we have our own input handler and our own actions
#if defined(__WXUNIVERSAL__)
// we have our own input handler and our own actions
#ifndef _WX_COMBOCONTROL_H_
#ifndef _WX_COMBOCONTROL_H_
-// If native wxComboControl was not defined, then prepare a simple
+// If native wxComboCtrl was not defined, then prepare a simple
// front-end so that wxRTTI works as expected.
// front-end so that wxRTTI works as expected.
-class WXDLLEXPORT wxComboControl : public wxGenericComboControl
+class WXDLLEXPORT wxComboCtrl : public wxGenericComboControl
- wxComboControl() : wxGenericComboControl() {}
+ wxComboCtrl() : wxGenericComboControl() {}
- wxComboControl(wxWindow *parent,
+ wxComboCtrl(wxWindow *parent,
wxWindowID id = wxID_ANY,
const wxString& value = wxEmptyString,
const wxPoint& pos = wxDefaultPosition,
wxWindowID id = wxID_ANY,
const wxString& value = wxEmptyString,
const wxPoint& pos = wxDefaultPosition,
(void)Create(parent, id, value, pos, size, style, validator, name);
}
(void)Create(parent, id, value, pos, size, style, validator, name);
}
- virtual ~wxComboControl() {}
+ virtual ~wxComboCtrl() {}
- DECLARE_DYNAMIC_CLASS(wxComboControl)
+ DECLARE_DYNAMIC_CLASS(wxComboCtrl)
};
#endif // _WX_COMBOCONTROL_H_
#else
};
#endif // _WX_COMBOCONTROL_H_
#else
-#define wxGenericComboControl wxComboControl
+#define wxGenericComboControl wxComboCtrl
#endif // !defined(wxCOMBOCONTROL_FULLY_FEATURED)
#endif // !defined(wxCOMBOCONTROL_FULLY_FEATURED)
-#endif // wxUSE_COMBOCONTROL
+#endif // wxUSE_COMBOCTRL
#endif
// _WX_GENERIC_COMBOCONTROL_H_
#endif
// _WX_GENERIC_COMBOCONTROL_H_
// Recommended setting: 1 (it doesn't cost almost anything)
#define wxUSE_MINIFRAME 1
// Recommended setting: 1 (it doesn't cost almost anything)
#define wxUSE_MINIFRAME 1
-// wxComboControl and related classes: combobox with custom popup window and
+// wxComboCtrl and related classes: combobox with custom popup window and
// not necessarily a listbox.
//
// Default is 1.
//
// Recommended setting: 1 but can be safely set to 0 except for wxUniv where it
// it used by wxComboBox
// not necessarily a listbox.
//
// Default is 1.
//
// Recommended setting: 1 but can be safely set to 0 except for wxUniv where it
// it used by wxComboBox
-#define wxUSE_COMBOCONTROL 1
+#define wxUSE_COMBOCTRL 1
// wxOwnerDrawnComboBox is a custom combobox allowing to paint the combobox
// items.
// wxOwnerDrawnComboBox is a custom combobox allowing to paint the combobox
// items.
// Default is 1.
//
// Recommended setting: 1 but can be safely set to 0
// Default is 1.
//
// Recommended setting: 1 but can be safely set to 0
-#define wxUSE_OWNERDRAWNCOMBOBOX 1
+#define wxUSE_ODCOMBOBOX 1
// ----------------------------------------------------------------------------
// Miscellaneous GUI stuff
// ----------------------------------------------------------------------------
// Miscellaneous GUI stuff
// Recommended setting: 1 (it doesn't cost almost anything)
#define wxUSE_MINIFRAME 1
// Recommended setting: 1 (it doesn't cost almost anything)
#define wxUSE_MINIFRAME 1
-// wxComboControl and related classes: combobox with custom popup window and
+// wxComboCtrl and related classes: combobox with custom popup window and
// not necessarily a listbox.
//
// Default is 1.
//
// Recommended setting: 1 but can be safely set to 0 except for wxUniv where it
// it used by wxComboBox
// not necessarily a listbox.
//
// Default is 1.
//
// Recommended setting: 1 but can be safely set to 0 except for wxUniv where it
// it used by wxComboBox
-#define wxUSE_COMBOCONTROL 1
+#define wxUSE_COMBOCTRL 1
// wxOwnerDrawnComboBox is a custom combobox allowing to paint the combobox
// items.
// wxOwnerDrawnComboBox is a custom combobox allowing to paint the combobox
// items.
// Default is 1.
//
// Recommended setting: 1 but can be safely set to 0
// Default is 1.
//
// Recommended setting: 1 but can be safely set to 0
-#define wxUSE_OWNERDRAWNCOMBOBOX 1
+#define wxUSE_ODCOMBOBOX 1
// ----------------------------------------------------------------------------
// Miscellaneous GUI stuff
// ----------------------------------------------------------------------------
// Miscellaneous GUI stuff
/////////////////////////////////////////////////////////////////////////////
// Name: wx/msw/combo.h
/////////////////////////////////////////////////////////////////////////////
// Name: wx/msw/combo.h
-// Purpose: wxComboControl class
+// Purpose: wxComboCtrl class
// Author: Jaakko Salli
// Modified by:
// Created: Apr-30-2006
// Author: Jaakko Salli
// Modified by:
// Created: Apr-30-2006
#define _WX_COMBOCONTROL_H_
// NB: Definition of _WX_COMBOCONTROL_H_ is used in wx/generic/combo.h to
#define _WX_COMBOCONTROL_H_
// NB: Definition of _WX_COMBOCONTROL_H_ is used in wx/generic/combo.h to
-// determine whether there is native wxComboControl, so make sure you
-// use it in all native wxComboControls.
+// determine whether there is native wxComboCtrl, so make sure you
+// use it in all native wxComboCtrls.
// ----------------------------------------------------------------------------
// ----------------------------------------------------------------------------
-// Native wxComboControl
// ----------------------------------------------------------------------------
// Define this only if native implementation includes all features
#define wxCOMBOCONTROL_FULLY_FEATURED
// ----------------------------------------------------------------------------
// Define this only if native implementation includes all features
#define wxCOMBOCONTROL_FULLY_FEATURED
-class WXDLLEXPORT wxComboControl : public wxComboControlBase
+class WXDLLEXPORT wxComboCtrl : public wxComboCtrlBase
{
public:
// ctors and such
{
public:
// ctors and such
- wxComboControl() : wxComboControlBase() { Init(); }
+ wxComboCtrl() : wxComboCtrlBase() { Init(); }
- wxComboControl(wxWindow *parent,
+ wxComboCtrl(wxWindow *parent,
wxWindowID id = wxID_ANY,
const wxString& value = wxEmptyString,
const wxPoint& pos = wxDefaultPosition,
wxWindowID id = wxID_ANY,
const wxString& value = wxEmptyString,
const wxPoint& pos = wxDefaultPosition,
long style = 0,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxComboBoxNameStr)
long style = 0,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxComboBoxNameStr)
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxComboBoxNameStr);
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxComboBoxNameStr);
- virtual ~wxComboControl();
+ virtual ~wxComboCtrl();
virtual void DrawFocusBackground( wxDC& dc, const wxRect& rect, int flags );
virtual void DrawFocusBackground( wxDC& dc, const wxRect& rect, int flags );
- static int GetFeatures() { return wxComboControlFeatures::All; }
+ static int GetFeatures() { return wxComboCtrlFeatures::All; }
- DECLARE_DYNAMIC_CLASS(wxComboControl)
+ DECLARE_DYNAMIC_CLASS(wxComboCtrl)
-#endif // wxUSE_COMBOCONTROL
+#endif // wxUSE_COMBOCTRL
#endif
// _WX_COMBOCONTROL_H_
#endif
// _WX_COMBOCONTROL_H_
// Recommended setting: 1 (it doesn't cost almost anything)
#define wxUSE_MINIFRAME 1
// Recommended setting: 1 (it doesn't cost almost anything)
#define wxUSE_MINIFRAME 1
-// wxComboControl and related classes: combobox with custom popup window and
+// wxComboCtrl and related classes: combobox with custom popup window and
// not necessarily a listbox.
//
// Default is 1.
//
// Recommended setting: 1 but can be safely set to 0 except for wxUniv where it
// it used by wxComboBox
// not necessarily a listbox.
//
// Default is 1.
//
// Recommended setting: 1 but can be safely set to 0 except for wxUniv where it
// it used by wxComboBox
-#define wxUSE_COMBOCONTROL 1
+#define wxUSE_COMBOCTRL 1
// wxOwnerDrawnComboBox is a custom combobox allowing to paint the combobox
// items.
// wxOwnerDrawnComboBox is a custom combobox allowing to paint the combobox
// items.
// Default is 1.
//
// Recommended setting: 1 but can be safely set to 0
// Default is 1.
//
// Recommended setting: 1 but can be safely set to 0
-#define wxUSE_OWNERDRAWNCOMBOBOX 1
+#define wxUSE_ODCOMBOBOX 1
// ----------------------------------------------------------------------------
// Miscellaneous GUI stuff
// ----------------------------------------------------------------------------
// Miscellaneous GUI stuff
// Recommended setting: 1 (it doesn't cost almost anything)
#define wxUSE_MINIFRAME 1
// Recommended setting: 1 (it doesn't cost almost anything)
#define wxUSE_MINIFRAME 1
-// wxComboControl and related classes: combobox with custom popup window and
+// wxComboCtrl and related classes: combobox with custom popup window and
// not necessarily a listbox.
//
// Default is 1.
//
// Recommended setting: 1 but can be safely set to 0 except for wxUniv where it
// it used by wxComboBox
// not necessarily a listbox.
//
// Default is 1.
//
// Recommended setting: 1 but can be safely set to 0 except for wxUniv where it
// it used by wxComboBox
-#define wxUSE_COMBOCONTROL 1
+#define wxUSE_COMBOCTRL 1
// wxOwnerDrawnComboBox is a custom combobox allowing to paint the combobox
// items.
// wxOwnerDrawnComboBox is a custom combobox allowing to paint the combobox
// items.
// Default is 1.
//
// Recommended setting: 1 but can be safely set to 0
// Default is 1.
//
// Recommended setting: 1 but can be safely set to 0
-#define wxUSE_OWNERDRAWNCOMBOBOX 1
+#define wxUSE_ODCOMBOBOX 1
// ----------------------------------------------------------------------------
// Miscellaneous GUI stuff
// ----------------------------------------------------------------------------
// Miscellaneous GUI stuff
-#if wxUSE_OWNERDRAWNCOMBOBOX
#include "wx/combo.h"
#include "wx/ctrlsub.h"
#include "wx/combo.h"
#include "wx/ctrlsub.h"
//
// Notes:
// wxOwnerDrawnComboBox uses this as its popup. However, it always derives
//
// Notes:
// wxOwnerDrawnComboBox uses this as its popup. However, it always derives
-// from native wxComboControl. If you need to use this popup with
+// from native wxComboCtrl. If you need to use this popup with
// wxGenericComboControl, then remember that vast majority of item manipulation
// functionality is implemented in the wxVListBoxComboPopup class itself.
//
// wxGenericComboControl, then remember that vast majority of item manipulation
// functionality is implemented in the wxVListBoxComboPopup class itself.
//
// ----------------------------------------------------------------------------
// wxOwnerDrawnComboBox: a generic wxComboBox that allows custom paint items
// in addition to many other types of customization already allowed by
// ----------------------------------------------------------------------------
// wxOwnerDrawnComboBox: a generic wxComboBox that allows custom paint items
// in addition to many other types of customization already allowed by
// ----------------------------------------------------------------------------
// ----------------------------------------------------------------------------
-class WXDLLIMPEXP_ADV wxOwnerDrawnComboBox : public wxComboControl,
+class WXDLLIMPEXP_ADV wxOwnerDrawnComboBox : public wxComboCtrl,
public wxItemContainer
{
friend class wxComboPopupWindow;
public wxItemContainer
{
friend class wxComboPopupWindow;
- friend class wxComboControlBase;
+ friend class wxComboCtrlBase;
public:
// ctors and such
public:
// ctors and such
- wxOwnerDrawnComboBox() : wxComboControl() { Init(); }
+ wxOwnerDrawnComboBox() : wxComboCtrl() { Init(); }
wxOwnerDrawnComboBox(wxWindow *parent,
wxWindowID id,
wxOwnerDrawnComboBox(wxWindow *parent,
wxWindowID id,
long style = 0,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxComboBoxNameStr)
long style = 0,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxComboBoxNameStr)
-#endif // wxUSE_OWNERDRAWNCOMBOBOX
+#endif // wxUSE_ODCOMBOBOX
// Recommended setting: 1 (it doesn't cost almost anything)
#define wxUSE_MINIFRAME 1
// Recommended setting: 1 (it doesn't cost almost anything)
#define wxUSE_MINIFRAME 1
-// wxComboControl and related classes: combobox with custom popup window and
+// wxComboCtrl and related classes: combobox with custom popup window and
// not necessarily a listbox.
//
// Default is 1.
//
// Recommended setting: 1 but can be safely set to 0 except for wxUniv where it
// it used by wxComboBox
// not necessarily a listbox.
//
// Default is 1.
//
// Recommended setting: 1 but can be safely set to 0 except for wxUniv where it
// it used by wxComboBox
-#define wxUSE_COMBOCONTROL 1
+#define wxUSE_COMBOCTRL 1
// wxOwnerDrawnComboBox is a custom combobox allowing to paint the combobox
// items.
// wxOwnerDrawnComboBox is a custom combobox allowing to paint the combobox
// items.
// Default is 1.
//
// Recommended setting: 1 but can be safely set to 0
// Default is 1.
//
// Recommended setting: 1 but can be safely set to 0
-#define wxUSE_OWNERDRAWNCOMBOBOX 1
+#define wxUSE_ODCOMBOBOX 1
// ----------------------------------------------------------------------------
// Miscellaneous GUI stuff
// ----------------------------------------------------------------------------
// Miscellaneous GUI stuff
// Recommended setting: 1 (it doesn't cost almost anything)
#define wxUSE_MINIFRAME 1
// Recommended setting: 1 (it doesn't cost almost anything)
#define wxUSE_MINIFRAME 1
-// wxComboControl and related classes: combobox with custom popup window and
+// wxComboCtrl and related classes: combobox with custom popup window and
// not necessarily a listbox.
//
// Default is 1.
//
// Recommended setting: 1 but can be safely set to 0 except for wxUniv where it
// it used by wxComboBox
// not necessarily a listbox.
//
// Default is 1.
//
// Recommended setting: 1 but can be safely set to 0 except for wxUniv where it
// it used by wxComboBox
-#define wxUSE_COMBOCONTROL 1
+#define wxUSE_COMBOCTRL 1
// wxOwnerDrawnComboBox is a custom combobox allowing to paint the combobox
// items.
// wxOwnerDrawnComboBox is a custom combobox allowing to paint the combobox
// items.
// Default is 1.
//
// Recommended setting: 1 but can be safely set to 0
// Default is 1.
//
// Recommended setting: 1 but can be safely set to 0
-#define wxUSE_OWNERDRAWNCOMBOBOX 1
+#define wxUSE_ODCOMBOBOX 1
// ----------------------------------------------------------------------------
// Miscellaneous GUI stuff
// ----------------------------------------------------------------------------
// Miscellaneous GUI stuff
// ----------------------------------------------------------------------------
class WXDLLEXPORT wxComboBox;
// ----------------------------------------------------------------------------
class WXDLLEXPORT wxComboBox;
-class WXDLLEXPORT wxComboControl;
+class WXDLLEXPORT wxComboCtrl;
class WXDLLEXPORT wxPopupComboWindow : public wxPopupTransientWindow
{
public:
wxPopupComboWindow() { m_combo = NULL; }
class WXDLLEXPORT wxPopupComboWindow : public wxPopupTransientWindow
{
public:
wxPopupComboWindow() { m_combo = NULL; }
- wxPopupComboWindow(wxComboControl *parent);
+ wxPopupComboWindow(wxComboCtrl *parent);
- bool Create(wxComboControl *parent);
+ bool Create(wxComboCtrl *parent);
// position the window correctly relatively to the combo
void PositionNearCombo();
// position the window correctly relatively to the combo
void PositionNearCombo();
void OnKeyDown(wxKeyEvent& event);
// the parent combobox
void OnKeyDown(wxKeyEvent& event);
// the parent combobox
- wxComboControl *m_combo;
DECLARE_EVENT_TABLE()
DECLARE_DYNAMIC_CLASS(wxPopupComboWindow)
DECLARE_EVENT_TABLE()
DECLARE_DYNAMIC_CLASS(wxPopupComboWindow)
// Recommended setting: 1 (it doesn't cost almost anything)
#define wxUSE_MINIFRAME 1
// Recommended setting: 1 (it doesn't cost almost anything)
#define wxUSE_MINIFRAME 1
-// wxComboControl and related classes: combobox with custom popup window and
+// wxComboCtrl and related classes: combobox with custom popup window and
// not necessarily a listbox.
//
// Default is 1.
//
// Recommended setting: 1 but can be safely set to 0 except for wxUniv where it
// it used by wxComboBox
// not necessarily a listbox.
//
// Default is 1.
//
// Recommended setting: 1 but can be safely set to 0 except for wxUniv where it
// it used by wxComboBox
-#define wxUSE_COMBOCONTROL 1
+#define wxUSE_COMBOCTRL 1
// wxOwnerDrawnComboBox is a custom combobox allowing to paint the combobox
// items.
// wxOwnerDrawnComboBox is a custom combobox allowing to paint the combobox
// items.
// Default is 1.
//
// Recommended setting: 1 but can be safely set to 0
// Default is 1.
//
// Recommended setting: 1 but can be safely set to 0
-#define wxUSE_OWNERDRAWNCOMBOBOX 1
+#define wxUSE_ODCOMBOBOX 1
// ----------------------------------------------------------------------------
// Miscellaneous GUI stuff
// ----------------------------------------------------------------------------
// Miscellaneous GUI stuff
// wxComboBox: a combination of text control and a listbox
// ----------------------------------------------------------------------------
// wxComboBox: a combination of text control and a listbox
// ----------------------------------------------------------------------------
-class WXDLLEXPORT wxComboBox : public wxComboControl, public wxComboBoxBase
+class WXDLLEXPORT wxComboBox : public wxComboCtrl, public wxComboBoxBase
{
public:
// ctors and such
{
public:
// ctors and such
wxCONTROL_ITEMCONTAINER_CLIENTDATAOBJECT_RECAST
// we have our own input handler and our own actions
wxCONTROL_ITEMCONTAINER_CLIENTDATAOBJECT_RECAST
// we have our own input handler and our own actions
- // (but wxComboControl already handled Popup/Dismiss)
+ // (but wxComboCtrl already handled Popup/Dismiss)
/*
virtual bool PerformAction(const wxControlAction& action,
long numArg = 0l,
/*
virtual bool PerformAction(const wxControlAction& action,
long numArg = 0l,
/////////////////////////////////////////////////////////////////////////////
// Name: combo.cpp
/////////////////////////////////////////////////////////////////////////////
// Name: combo.cpp
-// Purpose: wxComboControl sample
+// Purpose: wxComboCtrl sample
// Author: Jaakko Salli
// Modified by:
// Created: Apr-30-2006
// Author: Jaakko Salli
// Modified by:
// Created: Apr-30-2006
#include "wx/wx.h"
#endif
#include "wx/wx.h"
#endif
-#if !wxUSE_COMBOCONTROL
- #error "Please set wxUSE_COMBOCONTROL to 1 and rebuild the library."
+#if !wxUSE_COMBOCTRL
+ #error "Please set wxUSE_COMBOCTRL to 1 and rebuild the library."
#endif
#include "wx/image.h"
#endif
#include "wx/image.h"
void OnQuit(wxCommandEvent& event);
void OnAbout(wxCommandEvent& event);
void OnQuit(wxCommandEvent& event);
void OnAbout(wxCommandEvent& event);
- // log wxComboControl events
+ // log wxComboCtrl events
void OnComboBoxUpdate( wxCommandEvent& event );
protected:
void OnComboBoxUpdate( wxCommandEvent& event );
protected:
bool MyApp::OnInit()
{
// create the main application window
bool MyApp::OnInit()
{
// create the main application window
- MyFrame *frame = new MyFrame(_T("wxComboControl Sample"));
+ MyFrame *frame = new MyFrame(_T("wxComboCtrl Sample"));
// and show it (the frames, unlike simple controls, are not shown when
// created initially)
// and show it (the frames, unlike simple controls, are not shown when
// created initially)
- ListViewComboPopup(wxComboControlBase* combo)
+ ListViewComboPopup(wxComboCtrlBase* combo)
: wxListView(), wxComboPopup(combo)
{
m_value = -1;
: wxListView(), wxComboPopup(combo)
{
m_value = -1;
- TreeCtrlComboPopup(wxComboControlBase* combo)
+ TreeCtrlComboPopup(wxComboCtrlBase* combo)
: wxTreeCtrl(), wxComboPopup(combo)
{
}
: wxTreeCtrl(), wxComboPopup(combo)
{
}
};
// ----------------------------------------------------------------------------
};
// ----------------------------------------------------------------------------
-// wxComboControl with entirely custom button action (opens file dialog)
+// wxComboCtrl with entirely custom button action (opens file dialog)
// ----------------------------------------------------------------------------
// ----------------------------------------------------------------------------
-class wxFileSelectorCombo : public wxComboControl
+class wxFileSelectorCombo : public wxComboCtrl
- wxFileSelectorCombo() : wxComboControl() { Init(); }
+ wxFileSelectorCombo() : wxComboCtrl() { Init(); }
wxFileSelectorCombo(wxWindow *parent,
wxWindowID id = wxID_ANY,
wxFileSelectorCombo(wxWindow *parent,
wxWindowID id = wxID_ANY,
long style = 0,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxComboBoxNameStr)
long style = 0,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxComboBoxNameStr)
{
Init();
Create(parent,id,value,
{
Init();
Create(parent,id,value,
// Make sure GetFeatures is implemented
// Make sure GetFeatures is implemented
- int features = wxComboControl::GetFeatures();
- wxLogDebug(wxT("wxComboControl features: 0x%X (all features: 0x%X)"),
- features,wxComboControlFeatures::All);
+ int features = wxComboCtrl::GetFeatures();
+ wxLogDebug(wxT("wxComboCtrl features: 0x%X (all features: 0x%X)"),
+ features,wxComboCtrlFeatures::All);
wxGenericComboControl* gcc;
wxOwnerDrawnComboBox* odc;
wxGenericComboControl* gcc;
wxOwnerDrawnComboBox* odc;
- // List View wxComboControl
+ // List View wxComboCtrl
//
rowSizer = new wxBoxSizer ( wxHORIZONTAL );
//
rowSizer = new wxBoxSizer ( wxHORIZONTAL );
- rowSizer->Add( new wxStaticText(panel,wxID_ANY,wxT("List View wxComboControl:")), 1,
+ rowSizer->Add( new wxStaticText(panel,wxID_ANY,wxT("List View wxComboCtrl:")), 1,
wxALIGN_CENTER_VERTICAL|wxRIGHT, 4 );
rowSizer->Add( new wxStaticText(panel,wxID_ANY,wxT("Tree Ctrl wxGenericComboControl:")), 1,
wxALIGN_CENTER_VERTICAL|wxRIGHT, 4 );
colSizer->Add( rowSizer, 0, wxEXPAND|wxALL, 5 );
rowSizer = new wxBoxSizer ( wxHORIZONTAL );
wxALIGN_CENTER_VERTICAL|wxRIGHT, 4 );
rowSizer->Add( new wxStaticText(panel,wxID_ANY,wxT("Tree Ctrl wxGenericComboControl:")), 1,
wxALIGN_CENTER_VERTICAL|wxRIGHT, 4 );
colSizer->Add( rowSizer, 0, wxEXPAND|wxALL, 5 );
rowSizer = new wxBoxSizer ( wxHORIZONTAL );
- cc = new wxComboControl(panel,2,wxEmptyString,
+ cc = new wxComboCtrl(panel,2,wxEmptyString,
wxDefaultPosition, wxDefaultSize);
cc->SetPopupMinWidth(300);
wxDefaultPosition, wxDefaultSize);
cc->SetPopupMinWidth(300);
- // Tree Ctrl wxComboControl
+ // Tree Ctrl wxComboCtrl
//
// Note that we test that wxGenericComboControl works
//
// Note that we test that wxGenericComboControl works
- // wxComboControl with totally custom button action (open file dialog)
+ // wxComboCtrl with totally custom button action (open file dialog)
//
rowSizer = new wxBoxSizer ( wxHORIZONTAL );
rowSizer->Add( new wxStaticText(panel,wxID_ANY,
//
rowSizer = new wxBoxSizer ( wxHORIZONTAL );
rowSizer->Add( new wxStaticText(panel,wxID_ANY,
- wxT("wxComboControl with custom button action:")), 1,
+ wxT("wxComboCtrl with custom button action:")), 1,
wxALIGN_CENTER_VERTICAL|wxRIGHT, 4 );
wxALIGN_CENTER_VERTICAL|wxRIGHT, 4 );
wxMessageBox(wxString::Format(
_T("Welcome to %s!\n")
_T("\n")
wxMessageBox(wxString::Format(
_T("Welcome to %s!\n")
_T("\n")
- _T("This is the wxWidgets wxComboControl sample\n")
+ _T("This is the wxWidgets wxComboCtrl sample\n")
_T("running under %s."),
wxVERSION_STRING,
wxGetOsDescription().c_str()
),
_T("running under %s."),
wxVERSION_STRING,
wxGetOsDescription().c_str()
),
- _T("About wxComboControl sample"),
+ _T("About wxComboCtrl sample"),
wxOK | wxICON_INFORMATION,
this);
}
wxOK | wxICON_INFORMATION,
this);
}
#define wxUSE_MINIFRAME 0
#define wxUSE_MINIFRAME 0
-#define wxUSE_COMBOCONTROL 0
+#define wxUSE_COMBOCTRL 0
-#define wxUSE_OWNERDRAWNCOMBOBOX 0
+#define wxUSE_ODCOMBOBOX 0
/////////////////////////////////////////////////////////////////////////////
// Name: combocmn.cpp
/////////////////////////////////////////////////////////////////////////////
// Name: combocmn.cpp
-// Purpose: wxComboControlBase
+// Purpose: wxComboCtrlBase
// Author: Jaakko Salli
// Modified by:
// Created: Apr-30-2006
// Author: Jaakko Salli
// Modified by:
// Created: Apr-30-2006
#ifndef WX_PRECOMP
#include "wx/defs.h"
#ifndef WX_PRECOMP
#include "wx/defs.h"
class wxComboFrameEventHandler : public wxEvtHandler
{
public:
class wxComboFrameEventHandler : public wxEvtHandler
{
public:
- wxComboFrameEventHandler( wxComboControlBase* pCb );
+ wxComboFrameEventHandler( wxComboCtrlBase* pCb );
~wxComboFrameEventHandler();
void OnPopup();
~wxComboFrameEventHandler();
void OnPopup();
protected:
wxWindow* m_focusStart;
protected:
wxWindow* m_focusStart;
- wxComboControlBase* m_combo;
+ wxComboCtrlBase* m_combo;
private:
DECLARE_EVENT_TABLE()
private:
DECLARE_EVENT_TABLE()
EVT_CLOSE(wxComboFrameEventHandler::OnClose)
END_EVENT_TABLE()
EVT_CLOSE(wxComboFrameEventHandler::OnClose)
END_EVENT_TABLE()
-wxComboFrameEventHandler::wxComboFrameEventHandler( wxComboControlBase* combo )
+wxComboFrameEventHandler::wxComboFrameEventHandler( wxComboCtrlBase* combo )
: wxEvtHandler()
{
m_combo = combo;
: wxEvtHandler()
{
m_combo = combo;
// ----------------------------------------------------------------------------
// wxComboPopupWindow is wxPopupWindow customized for
// ----------------------------------------------------------------------------
// wxComboPopupWindow is wxPopupWindow customized for
// ----------------------------------------------------------------------------
class wxComboPopupWindow : public wxComboPopupWindowBase
{
public:
// ----------------------------------------------------------------------------
class wxComboPopupWindow : public wxComboPopupWindowBase
{
public:
- wxComboPopupWindow( wxComboControlBase *parent, int style = wxBORDER_NONE );
+ wxComboPopupWindow( wxComboCtrlBase *parent, int style = wxBORDER_NONE );
#if USE_TRANSIENT_POPUP
virtual bool ProcessLeftDown(wxMouseEvent& event);
#if USE_TRANSIENT_POPUP
virtual bool ProcessLeftDown(wxMouseEvent& event);
-wxComboPopupWindow::wxComboPopupWindow( wxComboControlBase *parent,
+wxComboPopupWindow::wxComboPopupWindow( wxComboCtrlBase *parent,
int style )
#if wxUSE_POPUPWIN
: wxComboPopupWindowBase(parent,style)
int style )
#if wxUSE_POPUPWIN
: wxComboPopupWindowBase(parent,style)
if ( !event.GetActive() )
{
// Tell combo control that we are dismissed.
if ( !event.GetActive() )
{
// Tell combo control that we are dismissed.
- wxComboControl* combo = (wxComboControl*) GetParent();
+ wxComboCtrl* combo = (wxComboCtrl*) GetParent();
- wxASSERT( combo->IsKindOf(CLASSINFO(wxComboControl)) );
+ wxASSERT( combo->IsKindOf(CLASSINFO(wxComboCtrl)) );
// First thing that happens when a transient popup closes is that this method gets called.
void wxComboPopupWindow::OnDismiss()
{
// First thing that happens when a transient popup closes is that this method gets called.
void wxComboPopupWindow::OnDismiss()
{
- wxComboControlBase* combo = (wxComboControlBase*) GetParent();
- wxASSERT_MSG( combo->IsKindOf(CLASSINFO(wxComboControlBase)),
- wxT("parent might not be wxComboControl, but check IMPLEMENT_DYNAMIC_CLASS(2) macro for correctness") );
+ wxComboCtrlBase* combo = (wxComboCtrlBase*) GetParent();
+ wxASSERT_MSG( combo->IsKindOf(CLASSINFO(wxComboCtrlBase)),
+ wxT("parent might not be wxComboCtrl, but check IMPLEMENT_DYNAMIC_CLASS(2) macro for correctness") );
combo->OnPopupDismiss();
}
combo->OnPopupDismiss();
}
return wxSize(minWidth,prefHeight);
}
return wxSize(minWidth,prefHeight);
}
-void wxComboPopup::DefaultPaintComboControl( wxComboControlBase* combo,
+void wxComboPopup::DefaultPaintComboControl( wxComboCtrlBase* combo,
wxDC& dc, const wxRect& rect )
{
if ( combo->GetWindowStyle() & wxCB_READONLY ) // ie. no textctrl
wxDC& dc, const wxRect& rect )
{
if ( combo->GetWindowStyle() & wxCB_READONLY ) // ie. no textctrl
- wxComboBoxExtraInputHandler( wxComboControlBase* combo )
+ wxComboBoxExtraInputHandler( wxComboCtrlBase* combo )
: wxEvtHandler()
{
m_combo = combo;
: wxEvtHandler()
{
m_combo = combo;
void OnFocus(wxFocusEvent& event);
protected:
void OnFocus(wxFocusEvent& event);
protected:
- wxComboControlBase* m_combo;
+ wxComboCtrlBase* m_combo;
private:
DECLARE_EVENT_TABLE()
private:
DECLARE_EVENT_TABLE()
- wxComboPopupExtraEventHandler( wxComboControlBase* combo )
+ wxComboPopupExtraEventHandler( wxComboCtrlBase* combo )
: wxEvtHandler()
{
m_combo = combo;
: wxEvtHandler()
{
m_combo = combo;
void OnMouseEvent( wxMouseEvent& event );
void OnMouseEvent( wxMouseEvent& event );
- // Called from wxComboControlBase::OnPopupDismiss
+ // Called from wxComboCtrlBase::OnPopupDismiss
void OnPopupDismiss()
{
m_beenInside = false;
}
protected:
void OnPopupDismiss()
{
m_beenInside = false;
}
protected:
- wxComboControlBase* m_combo;
+ wxComboCtrlBase* m_combo;
}
// ----------------------------------------------------------------------------
}
// ----------------------------------------------------------------------------
// ----------------------------------------------------------------------------
// ----------------------------------------------------------------------------
-BEGIN_EVENT_TABLE(wxComboControlBase, wxControl)
- EVT_TEXT(wxID_ANY,wxComboControlBase::OnTextCtrlEvent)
- EVT_SIZE(wxComboControlBase::OnSizeEvent)
- EVT_SET_FOCUS(wxComboControlBase::OnFocusEvent)
- EVT_KILL_FOCUS(wxComboControlBase::OnFocusEvent)
- //EVT_BUTTON(wxID_ANY,wxComboControlBase::OnButtonClickEvent)
- EVT_TEXT_ENTER(wxID_ANY,wxComboControlBase::OnTextCtrlEvent)
- EVT_SYS_COLOUR_CHANGED(wxComboControlBase::OnSysColourChanged)
+BEGIN_EVENT_TABLE(wxComboCtrlBase, wxControl)
+ EVT_TEXT(wxID_ANY,wxComboCtrlBase::OnTextCtrlEvent)
+ EVT_SIZE(wxComboCtrlBase::OnSizeEvent)
+ EVT_SET_FOCUS(wxComboCtrlBase::OnFocusEvent)
+ EVT_KILL_FOCUS(wxComboCtrlBase::OnFocusEvent)
+ //EVT_BUTTON(wxID_ANY,wxComboCtrlBase::OnButtonClickEvent)
+ EVT_TEXT_ENTER(wxID_ANY,wxComboCtrlBase::OnTextCtrlEvent)
+ EVT_SYS_COLOUR_CHANGED(wxComboCtrlBase::OnSysColourChanged)
-IMPLEMENT_ABSTRACT_CLASS(wxComboControlBase, wxControl)
+IMPLEMENT_ABSTRACT_CLASS(wxComboCtrlBase, wxControl)
// Have global double buffer - should be enough for multiple combos
static wxBitmap* gs_doubleBuffer = (wxBitmap*) NULL;
// Have global double buffer - should be enough for multiple combos
static wxBitmap* gs_doubleBuffer = (wxBitmap*) NULL;
-void wxComboControlBase::Init()
+void wxComboCtrlBase::Init()
{
m_winPopup = (wxWindow *)NULL;
m_popup = (wxWindow *)NULL;
{
m_winPopup = (wxWindow *)NULL;
m_popup = (wxWindow *)NULL;
m_timeCanAcceptClick = 0;
}
m_timeCanAcceptClick = 0;
}
-bool wxComboControlBase::Create(wxWindow *parent,
+bool wxComboCtrlBase::Create(wxWindow *parent,
wxWindowID id,
const wxString& value,
const wxPoint& pos,
wxWindowID id,
const wxString& value,
const wxPoint& pos,
-void wxComboControlBase::InstallInputHandlers( bool alsoTextCtrl )
+void wxComboCtrlBase::InstallInputHandlers( bool alsoTextCtrl )
{
if ( m_text && alsoTextCtrl )
{
{
if ( m_text && alsoTextCtrl )
{
m_extraEvtHandler = inputHandler;
}
m_extraEvtHandler = inputHandler;
}
-void wxComboControlBase::CreateTextCtrl( int extraStyle, const wxValidator& validator )
+void wxComboCtrlBase::CreateTextCtrl( int extraStyle, const wxValidator& validator )
{
if ( !(m_windowStyle & wxCB_READONLY) )
{
{
if ( !(m_windowStyle & wxCB_READONLY) )
{
-void wxComboControlBase::OnThemeChange()
+void wxComboCtrlBase::OnThemeChange()
{
SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOW));
}
{
SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOW));
}
-wxComboControlBase::~wxComboControlBase()
+wxComboCtrlBase::~wxComboCtrlBase()
{
if ( HasCapture() )
ReleaseMouse();
{
if ( HasCapture() )
ReleaseMouse();
// ----------------------------------------------------------------------------
// Recalculates button and textctrl areas
// ----------------------------------------------------------------------------
// Recalculates button and textctrl areas
-void wxComboControlBase::CalculateAreas( int btnWidth )
+void wxComboCtrlBase::CalculateAreas( int btnWidth )
{
wxSize sz = GetClientSize();
int customBorder = m_widthCustomBorder;
{
wxSize sz = GetClientSize();
int customBorder = m_widthCustomBorder;
-void wxComboControlBase::PositionTextCtrl( int textCtrlXAdjust, int textCtrlYAdjust )
+void wxComboCtrlBase::PositionTextCtrl( int textCtrlXAdjust, int textCtrlYAdjust )
-wxSize wxComboControlBase::DoGetBestSize() const
+wxSize wxComboCtrlBase::DoGetBestSize() const
{
wxSize sizeText(150,0);
{
wxSize sizeText(150,0);
-void wxComboControlBase::DoMoveWindow(int x, int y, int width, int height)
+void wxComboCtrlBase::DoMoveWindow(int x, int y, int width, int height)
{
// SetSize is called last in create, so it marks the end of creation
m_iFlags |= wxCC_IFLAG_CREATED;
{
// SetSize is called last in create, so it marks the end of creation
m_iFlags |= wxCC_IFLAG_CREATED;
wxControl::DoMoveWindow(x, y, width, height);
}
wxControl::DoMoveWindow(x, y, width, height);
}
-void wxComboControlBase::OnSizeEvent( wxSizeEvent& event )
+void wxComboCtrlBase::OnSizeEvent( wxSizeEvent& event )
{
if ( !IsCreated() )
return;
{
if ( !IsCreated() )
return;
- // defined by actual wxComboControls
+ // defined by actual wxComboCtrls
OnResize();
event.Skip();
OnResize();
event.Skip();
// standard operations
// ----------------------------------------------------------------------------
// standard operations
// ----------------------------------------------------------------------------
-bool wxComboControlBase::Enable(bool enable)
+bool wxComboCtrlBase::Enable(bool enable)
{
if ( !wxControl::Enable(enable) )
return false;
{
if ( !wxControl::Enable(enable) )
return false;
-bool wxComboControlBase::Show(bool show)
+bool wxComboCtrlBase::Show(bool show)
{
if ( !wxControl::Show(show) )
return false;
{
if ( !wxControl::Show(show) )
return false;
-bool wxComboControlBase::SetFont ( const wxFont& font )
+bool wxComboCtrlBase::SetFont ( const wxFont& font )
{
if ( !wxControl::SetFont(font) )
return false;
{
if ( !wxControl::SetFont(font) )
return false;
-void wxComboControlBase::DoSetToolTip(wxToolTip *tooltip)
+void wxComboCtrlBase::DoSetToolTip(wxToolTip *tooltip)
{
wxControl::DoSetToolTip(tooltip);
{
wxControl::DoSetToolTip(tooltip);
// ----------------------------------------------------------------------------
// draw focus background on area in a way typical on platform
// ----------------------------------------------------------------------------
// draw focus background on area in a way typical on platform
-void wxComboControlBase::DrawFocusBackground( wxDC& dc, const wxRect& rect, int flags )
+void wxComboCtrlBase::DrawFocusBackground( wxDC& dc, const wxRect& rect, int flags )
{
wxSize sz = GetClientSize();
bool isEnabled;
{
wxSize sz = GetClientSize();
bool isEnabled;
dc.DrawRectangle( selRect );
}
dc.DrawRectangle( selRect );
}
-void wxComboControlBase::DrawButton( wxDC& dc, const wxRect& rect, bool paintBg )
+void wxComboCtrlBase::DrawButton( wxDC& dc, const wxRect& rect, bool paintBg )
{
int drawState = m_btnState;
{
int drawState = m_btnState;
-void wxComboControlBase::RecalcAndRefresh()
+void wxComboCtrlBase::RecalcAndRefresh()
-wxBitmap& wxComboControlBase::GetBufferBitmap( const wxSize& sz ) const
+wxBitmap& wxComboCtrlBase::GetBufferBitmap( const wxSize& sz ) const
{
// If size is larger, recalculate double buffer bitmap
if ( !gs_doubleBuffer ||
{
// If size is larger, recalculate double buffer bitmap
if ( !gs_doubleBuffer ||
// miscellaneous event handlers
// ----------------------------------------------------------------------------
// miscellaneous event handlers
// ----------------------------------------------------------------------------
-void wxComboControlBase::OnTextCtrlEvent(wxCommandEvent& event)
+void wxComboCtrlBase::OnTextCtrlEvent(wxCommandEvent& event)
{
// Change event id and relay it forward
event.SetId(GetId());
{
// Change event id and relay it forward
event.SetId(GetId());
}
// call if cursor is on button area or mouse is captured for the button
}
// call if cursor is on button area or mouse is captured for the button
-bool wxComboControlBase::HandleButtonMouseEvent( wxMouseEvent& event,
+bool wxComboCtrlBase::HandleButtonMouseEvent( wxMouseEvent& event,
int flags )
{
int type = event.GetEventType();
int flags )
{
int type = event.GetEventType();
// Conversion to double-clicks and some basic filtering
// returns true if event was consumed or filtered
// Conversion to double-clicks and some basic filtering
// returns true if event was consumed or filtered
-//bool wxComboControlBase::PreprocessMouseEvent( wxMouseEvent& event, bool isOnButtonArea )
-bool wxComboControlBase::PreprocessMouseEvent( wxMouseEvent& event,
+//bool wxComboCtrlBase::PreprocessMouseEvent( wxMouseEvent& event, bool isOnButtonArea )
+bool wxComboCtrlBase::PreprocessMouseEvent( wxMouseEvent& event,
int flags )
{
wxLongLong t = ::wxGetLocalTimeMillis();
int flags )
{
wxLongLong t = ::wxGetLocalTimeMillis();
-void wxComboControlBase::HandleNormalMouseEvent( wxMouseEvent& event )
+void wxComboCtrlBase::HandleNormalMouseEvent( wxMouseEvent& event )
{
int evtType = event.GetEventType();
{
int evtType = event.GetEventType();
-void wxComboControlBase::OnFocusEvent( wxFocusEvent& )
+void wxComboCtrlBase::OnFocusEvent( wxFocusEvent& )
{
// First click is the first part of double-click
// Some platforms don't generate down-less mouse up-event
{
// First click is the first part of double-click
// Some platforms don't generate down-less mouse up-event
-void wxComboControlBase::OnSysColourChanged(wxSysColourChangedEvent& WXUNUSED(event))
+void wxComboCtrlBase::OnSysColourChanged(wxSysColourChangedEvent& WXUNUSED(event))
{
OnThemeChange();
// indentation may also have changed
{
OnThemeChange();
// indentation may also have changed
// ----------------------------------------------------------------------------
// Create popup window and the child control
// ----------------------------------------------------------------------------
// Create popup window and the child control
-void wxComboControlBase::CreatePopup()
+void wxComboCtrlBase::CreatePopup()
{
wxComboPopup* popupInterface = m_popupInterface;
wxWindow* popup;
{
wxComboPopup* popupInterface = m_popupInterface;
wxWindow* popup;
popupInterface->m_iFlags |= wxCP_IFLAG_CREATED;
}
popupInterface->m_iFlags |= wxCP_IFLAG_CREATED;
}
-void wxComboControlBase::SetPopupControl( wxComboPopup* iface )
+void wxComboCtrlBase::SetPopupControl( wxComboPopup* iface )
- wxCHECK_RET( iface, wxT("no popup interface set for wxComboControl") );
+ wxCHECK_RET( iface, wxT("no popup interface set for wxComboCtrl") );
delete m_popupInterface;
delete m_winPopup;
delete m_popupInterface;
delete m_winPopup;
}
// Ensures there is atleast the default popup
}
// Ensures there is atleast the default popup
-void wxComboControlBase::EnsurePopupControl()
+void wxComboCtrlBase::EnsurePopupControl()
{
if ( !m_popupInterface )
SetPopupControl(NULL);
}
{
if ( !m_popupInterface )
SetPopupControl(NULL);
}
-void wxComboControlBase::OnButtonClick()
+void wxComboCtrlBase::OnButtonClick()
{
// Derived classes can override this method for totally custom
// popup action
ShowPopup();
}
{
// Derived classes can override this method for totally custom
// popup action
ShowPopup();
}
-void wxComboControlBase::ShowPopup()
+void wxComboCtrlBase::ShowPopup()
{
EnsurePopupControl();
wxCHECK_RET( !IsPopupShown(), wxT("popup window already shown") );
{
EnsurePopupControl();
wxCHECK_RET( !IsPopupShown(), wxT("popup window already shown") );
-void wxComboControlBase::OnPopupDismiss()
+void wxComboCtrlBase::OnPopupDismiss()
{
// Just in case, avoid double dismiss
if ( !m_isPopupShown )
{
// Just in case, avoid double dismiss
if ( !m_isPopupShown )
-void wxComboControlBase::HidePopup()
+void wxComboCtrlBase::HidePopup()
{
// Should be able to call this without popup interface
//wxCHECK_RET( m_popupInterface, _T("no popup interface") );
{
// Should be able to call this without popup interface
//wxCHECK_RET( m_popupInterface, _T("no popup interface") );
// customization methods
// ----------------------------------------------------------------------------
// customization methods
// ----------------------------------------------------------------------------
-void wxComboControlBase::SetButtonPosition( int width, int height,
+void wxComboCtrlBase::SetButtonPosition( int width, int height,
int side, int spacingX )
{
m_btnWid = width;
int side, int spacingX )
{
m_btnWid = width;
-void wxComboControlBase::SetButtonBitmaps( const wxBitmap& bmpNormal,
+void wxComboCtrlBase::SetButtonBitmaps( const wxBitmap& bmpNormal,
bool blankButtonBg,
const wxBitmap& bmpPressed,
const wxBitmap& bmpHover,
bool blankButtonBg,
const wxBitmap& bmpPressed,
const wxBitmap& bmpHover,
-void wxComboControlBase::SetCustomPaintWidth( int width )
+void wxComboCtrlBase::SetCustomPaintWidth( int width )
-void wxComboControlBase::SetTextIndent( int indent )
+void wxComboCtrlBase::SetTextIndent( int indent )
-wxCoord wxComboControlBase::GetNativeTextIndent() const
+wxCoord wxComboCtrlBase::GetNativeTextIndent() const
{
return DEFAULT_TEXT_INDENT;
}
{
return DEFAULT_TEXT_INDENT;
}
// methods forwarded to wxTextCtrl
// ----------------------------------------------------------------------------
// methods forwarded to wxTextCtrl
// ----------------------------------------------------------------------------
-wxString wxComboControlBase::GetValue() const
+wxString wxComboCtrlBase::GetValue() const
{
if ( m_text )
return m_text->GetValue();
return m_valueString;
}
{
if ( m_text )
return m_text->GetValue();
return m_valueString;
}
-void wxComboControlBase::SetValue(const wxString& value)
+void wxComboCtrlBase::SetValue(const wxString& value)
}
// In this SetValue variant wxComboPopup::SetStringValue is not called
}
// In this SetValue variant wxComboPopup::SetStringValue is not called
-void wxComboControlBase::SetText(const wxString& value)
+void wxComboCtrlBase::SetText(const wxString& value)
{
// Unlike in SetValue(), this must be called here or
// the behaviour will no be consistent in readonlys.
{
// Unlike in SetValue(), this must be called here or
// the behaviour will no be consistent in readonlys.
-void wxComboControlBase::Copy()
+void wxComboCtrlBase::Copy()
{
if ( m_text )
m_text->Copy();
}
{
if ( m_text )
m_text->Copy();
}
-void wxComboControlBase::Cut()
+void wxComboCtrlBase::Cut()
{
if ( m_text )
m_text->Cut();
}
{
if ( m_text )
m_text->Cut();
}
-void wxComboControlBase::Paste()
+void wxComboCtrlBase::Paste()
{
if ( m_text )
m_text->Paste();
}
{
if ( m_text )
m_text->Paste();
}
-void wxComboControlBase::SetInsertionPoint(long pos)
+void wxComboCtrlBase::SetInsertionPoint(long pos)
{
if ( m_text )
m_text->SetInsertionPoint(pos);
}
{
if ( m_text )
m_text->SetInsertionPoint(pos);
}
-void wxComboControlBase::SetInsertionPointEnd()
+void wxComboCtrlBase::SetInsertionPointEnd()
{
if ( m_text )
m_text->SetInsertionPointEnd();
}
{
if ( m_text )
m_text->SetInsertionPointEnd();
}
-long wxComboControlBase::GetInsertionPoint() const
+long wxComboCtrlBase::GetInsertionPoint() const
{
if ( m_text )
return m_text->GetInsertionPoint();
{
if ( m_text )
return m_text->GetInsertionPoint();
-long wxComboControlBase::GetLastPosition() const
+long wxComboCtrlBase::GetLastPosition() const
{
if ( m_text )
return m_text->GetLastPosition();
{
if ( m_text )
return m_text->GetLastPosition();
-void wxComboControlBase::Replace(long from, long to, const wxString& value)
+void wxComboCtrlBase::Replace(long from, long to, const wxString& value)
{
if ( m_text )
m_text->Replace(from, to, value);
}
{
if ( m_text )
m_text->Replace(from, to, value);
}
-void wxComboControlBase::Remove(long from, long to)
+void wxComboCtrlBase::Remove(long from, long to)
{
if ( m_text )
m_text->Remove(from, to);
}
{
if ( m_text )
m_text->Remove(from, to);
}
-void wxComboControlBase::SetSelection(long from, long to)
+void wxComboCtrlBase::SetSelection(long from, long to)
{
if ( m_text )
m_text->SetSelection(from, to);
}
{
if ( m_text )
m_text->SetSelection(from, to);
}
-void wxComboControlBase::Undo()
+void wxComboCtrlBase::Undo()
{
if ( m_text )
m_text->Undo();
}
{
if ( m_text )
m_text->Undo();
}
-#endif // wxUSE_COMBOCONTROL
+#endif // wxUSE_COMBOCTRL
#include "wx/popupwin.h"
#ifndef WX_PRECOMP
#include "wx/popupwin.h"
#ifndef WX_PRECOMP
- #include "wx/combobox.h" // wxComboControl
+ #include "wx/combobox.h" // wxComboCtrl
#include "wx/app.h" // wxPostEvent
#include "wx/log.h"
#endif //WX_PRECOMP
#include "wx/app.h" // wxPostEvent
#include "wx/log.h"
#endif //WX_PRECOMP
EVT_KEY_DOWN(wxPopupComboWindow::OnKeyDown)
END_EVENT_TABLE()
EVT_KEY_DOWN(wxPopupComboWindow::OnKeyDown)
END_EVENT_TABLE()
-wxPopupComboWindow::wxPopupComboWindow(wxComboControl *parent)
+wxPopupComboWindow::wxPopupComboWindow(wxComboCtrl *parent)
: wxPopupTransientWindow(parent)
{
m_combo = parent;
}
: wxPopupTransientWindow(parent)
{
m_combo = parent;
}
-bool wxPopupComboWindow::Create(wxComboControl *parent)
+bool wxPopupComboWindow::Create(wxComboCtrl *parent)
/////////////////////////////////////////////////////////////////////////////
// Name: src/generic/combog.cpp
/////////////////////////////////////////////////////////////////////////////
// Name: src/generic/combog.cpp
-// Purpose: Generic wxComboControl
+// Purpose: Generic wxComboCtrl
// Author: Jaakko Salli
// Modified by:
// Created: Apr-30-2006
// Author: Jaakko Salli
// Modified by:
// Created: Apr-30-2006
// wxGenericComboControl
// ----------------------------------------------------------------------------
// wxGenericComboControl
// ----------------------------------------------------------------------------
-BEGIN_EVENT_TABLE(wxGenericComboControl, wxComboControlBase)
+BEGIN_EVENT_TABLE(wxGenericComboControl, wxComboCtrlBase)
EVT_PAINT(wxGenericComboControl::OnPaintEvent)
EVT_MOUSE_EVENTS(wxGenericComboControl::OnMouseEvent)
END_EVENT_TABLE()
EVT_PAINT(wxGenericComboControl::OnPaintEvent)
EVT_MOUSE_EVENTS(wxGenericComboControl::OnMouseEvent)
END_EVENT_TABLE()
-IMPLEMENT_DYNAMIC_CLASS(wxGenericComboControl, wxComboControlBase)
+IMPLEMENT_DYNAMIC_CLASS(wxGenericComboControl, wxComboCtrlBase)
void wxGenericComboControl::Init()
{
void wxGenericComboControl::Init()
{
m_iFlags |= wxCC_POPUP_ON_MOUSE_UP;
// create main window
m_iFlags |= wxCC_POPUP_ON_MOUSE_UP;
// create main window
- if ( !wxComboControlBase::Create(parent,
+ if ( !wxComboCtrlBase::Create(parent,
id,
value,
wxDefaultPosition,
id,
value,
wxDefaultPosition,
#endif // __WXUNIVERSAL__
#endif // __WXUNIVERSAL__
-// If native wxComboControl was not defined, then prepare a simple
+// If native wxComboCtrl was not defined, then prepare a simple
// front-end so that wxRTTI works as expected.
#ifndef _WX_COMBOCONTROL_H_
// front-end so that wxRTTI works as expected.
#ifndef _WX_COMBOCONTROL_H_
-IMPLEMENT_DYNAMIC_CLASS(wxComboControl, wxGenericComboControl)
+IMPLEMENT_DYNAMIC_CLASS(wxComboCtrl, wxGenericComboControl)
#endif
#endif // !wxCOMBOCONTROL_FULLY_FEATURED
#endif
#endif // !wxCOMBOCONTROL_FULLY_FEATURED
-#endif // wxUSE_COMBOCONTROL
+#endif // wxUSE_COMBOCTRL
-#if wxUSE_OWNERDRAWNCOMBOBOX
// ----------------------------------------------------------------------------
// ----------------------------------------------------------------------------
-BEGIN_EVENT_TABLE(wxOwnerDrawnComboBox, wxComboControl)
+BEGIN_EVENT_TABLE(wxOwnerDrawnComboBox, wxComboCtrl)
-IMPLEMENT_DYNAMIC_CLASS2(wxOwnerDrawnComboBox, wxComboControl, wxControlWithItems)
+IMPLEMENT_DYNAMIC_CLASS2(wxOwnerDrawnComboBox, wxComboCtrl, wxControlWithItems)
void wxOwnerDrawnComboBox::Init()
{
void wxOwnerDrawnComboBox::Init()
{
const wxValidator& validator,
const wxString& name)
{
const wxValidator& validator,
const wxString& name)
{
- return wxComboControl::Create(parent,id,value,pos,size,style,validator,name);
+ return wxComboCtrl::Create(parent,id,value,pos,size,style,validator,name);
}
wxOwnerDrawnComboBox::wxOwnerDrawnComboBox(wxWindow *parent,
}
wxOwnerDrawnComboBox::wxOwnerDrawnComboBox(wxWindow *parent,
long style,
const wxValidator& validator,
const wxString& name)
long style,
const wxValidator& validator,
const wxString& name)
popup = new wxVListBoxComboPopup();
}
popup = new wxVListBoxComboPopup();
}
- wxComboControl::SetPopupControl(popup);
+ wxComboCtrl::SetPopupControl(popup);
wxASSERT(popup);
m_popupInterface = (wxVListBoxComboPopup*) popup;
wxASSERT(popup);
m_popupInterface = (wxVListBoxComboPopup*) popup;
return (wxClientData*) DoGetItemClientData(n);
}
return (wxClientData*) DoGetItemClientData(n);
}
-#endif // wxUSE_OWNERDRAWNCOMBOBOX
+#endif // wxUSE_ODCOMBOBOX
/////////////////////////////////////////////////////////////////////////////
// Name: combo.cpp
/////////////////////////////////////////////////////////////////////////////
// Name: combo.cpp
-// Purpose: wxMSW wxComboControl
+// Purpose: wxMSW wxComboCtrl
// Author: Jaakko Salli
// Modified by:
// Created: Apr-30-2006
// Author: Jaakko Salli
// Modified by:
// Created: Apr-30-2006
#ifndef WX_PRECOMP
#include "wx/log.h"
#ifndef WX_PRECOMP
#include "wx/log.h"
// ============================================================================
// ============================================================================
-BEGIN_EVENT_TABLE(wxComboControl, wxComboControlBase)
- EVT_PAINT(wxComboControl::OnPaintEvent)
- EVT_MOUSE_EVENTS(wxComboControl::OnMouseEvent)
+BEGIN_EVENT_TABLE(wxComboCtrl, wxComboCtrlBase)
+ EVT_PAINT(wxComboCtrl::OnPaintEvent)
+ EVT_MOUSE_EVENTS(wxComboCtrl::OnMouseEvent)
-IMPLEMENT_DYNAMIC_CLASS(wxComboControl, wxComboControlBase)
+IMPLEMENT_DYNAMIC_CLASS(wxComboCtrl, wxComboCtrlBase)
-void wxComboControl::Init()
+void wxComboCtrl::Init()
-bool wxComboControl::Create(wxWindow *parent,
+bool wxComboCtrl::Create(wxWindow *parent,
wxWindowID id,
const wxString& value,
const wxPoint& pos,
wxWindowID id,
const wxString& value,
const wxPoint& pos,
- if ( !wxComboControlBase::Create(parent,
+ if ( !wxComboCtrlBase::Create(parent,
id,
value,
wxDefaultPosition,
id,
value,
wxDefaultPosition,
-wxComboControl::~wxComboControl()
+wxComboCtrl::~wxComboCtrl()
-void wxComboControl::OnThemeChange()
+void wxComboCtrl::OnThemeChange()
{
wxUxThemeEngine* theme = wxUxThemeEngine::GetIfActive();
if ( theme )
{
wxUxThemeEngine* theme = wxUxThemeEngine::GetIfActive();
if ( theme )
-void wxComboControl::OnResize()
+void wxComboCtrl::OnResize()
{
//
// Recalculates button and textctrl areas
{
//
// Recalculates button and textctrl areas
}
// draw focus background on area in a way typical on platform
}
// draw focus background on area in a way typical on platform
-void wxComboControl::DrawFocusBackground( wxDC& dc, const wxRect& rect, int flags )
+void wxComboCtrl::DrawFocusBackground( wxDC& dc, const wxRect& rect, int flags )
{
wxUxThemeEngine* theme = (wxUxThemeEngine*) NULL;
wxUxThemeHandle hTheme(this, L"COMBOBOX");
{
wxUxThemeEngine* theme = (wxUxThemeEngine*) NULL;
wxUxThemeHandle hTheme(this, L"COMBOBOX");
-void wxComboControl::OnPaintEvent( wxPaintEvent& WXUNUSED(event) )
+void wxComboCtrl::OnPaintEvent( wxPaintEvent& WXUNUSED(event) )
{
// TODO: Convert drawing in this function to Windows API Code
{
// TODO: Convert drawing in this function to Windows API Code
-void wxComboControl::OnMouseEvent( wxMouseEvent& event )
+void wxComboCtrl::OnMouseEvent( wxMouseEvent& event )
{
bool isOnButtonArea = m_btnArea.Inside(event.m_x,event.m_y);
int handlerFlags = isOnButtonArea ? wxCC_MF_ON_BUTTON : 0;
{
bool isOnButtonArea = m_btnArea.Inside(event.m_x,event.m_y);
int handlerFlags = isOnButtonArea ? wxCC_MF_ON_BUTTON : 0;
-wxCoord wxComboControl::GetNativeTextIndent() const
+wxCoord wxComboCtrl::GetNativeTextIndent() const
{
if ( wxUxThemeEngine::GetIfActive() )
return NATIVE_TEXT_INDENT_XP;
{
if ( wxUxThemeEngine::GetIfActive() )
return NATIVE_TEXT_INDENT_XP;
-#endif // wxUSE_COMBOCONTROL
+#endif // wxUSE_COMBOCTRL
EVT_LEFT_UP(wxComboListBox::OnLeftUp)
END_EVENT_TABLE()
EVT_LEFT_UP(wxComboListBox::OnLeftUp)
END_EVENT_TABLE()
-IMPLEMENT_DYNAMIC_CLASS2(wxComboBox, wxControl, wxComboControl)
+IMPLEMENT_DYNAMIC_CLASS2(wxComboBox, wxControl, wxComboCtrl)
// ============================================================================
// implementation
// ============================================================================
// implementation
{
// we don't let the listbox handle this as instead of just using the
// single key presses, as usual, we use the text ctrl value as prefix
{
// we don't let the listbox handle this as instead of just using the
// single key presses, as usual, we use the text ctrl value as prefix
- // and this is done by wxComboControl itself
+ // and this is done by wxComboCtrl itself
const wxValidator& validator,
const wxString& name)
{
const wxValidator& validator,
const wxString& name)
{
- if ( !wxComboControl::Create(parent, id, value, pos, size, style,
+ if ( !wxComboCtrl::Create(parent, id, value, pos, size, style,
validator, name) )
{
return false;
validator, name) )
{
return false;
wxString wxComboBox::GetValue() const
{
wxString wxComboBox::GetValue() const
{
- return wxComboControl::GetValue();
+ return wxComboCtrl::GetValue();
}
void wxComboBox::SetValue(const wxString& value)
{
}
void wxComboBox::SetValue(const wxString& value)
{
- wxComboControl::SetValue(value);
+ wxComboCtrl::SetValue(value);
}
void wxComboBox::Copy()
}
void wxComboBox::Copy()