renamed wxComboControl to wxComboCtrl and related wxUSE_XXX and configure switches for consistency with the other ones

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@39167 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2006-05-16 22:57:40 +00:00
parent 87419e97c6
commit a57d600f1a
25 changed files with 290 additions and 290 deletions

68
configure vendored
View File

@@ -979,7 +979,7 @@ Optional Features:
--enable-choice use wxChoice class --enable-choice use wxChoice class
--enable-choicebook use wxChoicebook class --enable-choicebook use wxChoicebook class
--enable-combobox use wxComboBox class --enable-combobox use wxComboBox class
--enable-combocontrol use wxComboControl class --enable-comboctrl use wxComboCtrl class
--enable-datepick use wxDatePickerCtrl class --enable-datepick use wxDatePickerCtrl class
--enable-display use wxDisplay class --enable-display use wxDisplay class
--enable-gauge use wxGauge class --enable-gauge use wxGauge class
@@ -990,7 +990,7 @@ Optional Features:
--enable-listbox use wxListBox class --enable-listbox use wxListBox class
--enable-listctrl use wxListCtrl class --enable-listctrl use wxListCtrl class
--enable-notebook use wxNotebook class --enable-notebook use wxNotebook class
--enable-odcombo use wxOwnerDrawnComboBox class --enable-odcombobox use wxOwnerDrawnComboBox class
--enable-radiobox use wxRadioBox class --enable-radiobox use wxRadioBox class
--enable-radiobtn use wxRadioButton class --enable-radiobtn use wxRadioButton class
--enable-sash use wxSashWindow class --enable-sash use wxSashWindow class
@@ -2198,7 +2198,7 @@ if test $DEBUG_CONFIGURE = 1; then
DEFAULT_wxUSE_CHOICE=no DEFAULT_wxUSE_CHOICE=no
DEFAULT_wxUSE_CHOICEBOOK=no DEFAULT_wxUSE_CHOICEBOOK=no
DEFAULT_wxUSE_COMBOBOX=no DEFAULT_wxUSE_COMBOBOX=no
DEFAULT_wxUSE_COMBOCONTROL=no DEFAULT_wxUSE_COMBOCTRL=no
DEFAULT_wxUSE_DATEPICKCTRL=no DEFAULT_wxUSE_DATEPICKCTRL=no
DEFAULT_wxUSE_DISPLAY=no DEFAULT_wxUSE_DISPLAY=no
DEFAULT_wxUSE_GAUGE=no DEFAULT_wxUSE_GAUGE=no
@@ -2209,7 +2209,7 @@ if test $DEBUG_CONFIGURE = 1; then
DEFAULT_wxUSE_LISTBOX=no DEFAULT_wxUSE_LISTBOX=no
DEFAULT_wxUSE_LISTCTRL=no DEFAULT_wxUSE_LISTCTRL=no
DEFAULT_wxUSE_NOTEBOOK=no DEFAULT_wxUSE_NOTEBOOK=no
DEFAULT_wxUSE_OWNERDRAWNCOMBOBOX=no DEFAULT_wxUSE_ODCOMBOBOX=no
DEFAULT_wxUSE_RADIOBOX=no DEFAULT_wxUSE_RADIOBOX=no
DEFAULT_wxUSE_RADIOBTN=no DEFAULT_wxUSE_RADIOBTN=no
DEFAULT_wxUSE_SASH=no DEFAULT_wxUSE_SASH=no
@@ -2404,7 +2404,7 @@ else
DEFAULT_wxUSE_CHOICE=yes DEFAULT_wxUSE_CHOICE=yes
DEFAULT_wxUSE_CHOICEBOOK=yes DEFAULT_wxUSE_CHOICEBOOK=yes
DEFAULT_wxUSE_COMBOBOX=yes DEFAULT_wxUSE_COMBOBOX=yes
DEFAULT_wxUSE_COMBOCONTROL=yes DEFAULT_wxUSE_COMBOCTRL=yes
DEFAULT_wxUSE_DATEPICKCTRL=yes DEFAULT_wxUSE_DATEPICKCTRL=yes
DEFAULT_wxUSE_DISPLAY=yes DEFAULT_wxUSE_DISPLAY=yes
DEFAULT_wxUSE_GAUGE=yes DEFAULT_wxUSE_GAUGE=yes
@@ -2415,7 +2415,7 @@ else
DEFAULT_wxUSE_LISTBOX=yes DEFAULT_wxUSE_LISTBOX=yes
DEFAULT_wxUSE_LISTCTRL=yes DEFAULT_wxUSE_LISTCTRL=yes
DEFAULT_wxUSE_NOTEBOOK=yes DEFAULT_wxUSE_NOTEBOOK=yes
DEFAULT_wxUSE_OWNERDRAWNCOMBOBOX=yes DEFAULT_wxUSE_ODCOMBOBOX=yes
DEFAULT_wxUSE_RADIOBOX=yes DEFAULT_wxUSE_RADIOBOX=yes
DEFAULT_wxUSE_RADIOBTN=yes DEFAULT_wxUSE_RADIOBTN=yes
DEFAULT_wxUSE_SASH=yes DEFAULT_wxUSE_SASH=yes
@@ -8044,38 +8044,38 @@ echo "${ECHO_T}no" >&6
enablestring= enablestring=
echo "$as_me:$LINENO: checking for --${enablestring:-enable}-combocontrol" >&5 echo "$as_me:$LINENO: checking for --${enablestring:-enable}-comboctrl" >&5
echo $ECHO_N "checking for --${enablestring:-enable}-combocontrol... $ECHO_C" >&6 echo $ECHO_N "checking for --${enablestring:-enable}-comboctrl... $ECHO_C" >&6
no_cache=0 no_cache=0
# Check whether --enable-combocontrol or --disable-combocontrol was given. # Check whether --enable-comboctrl or --disable-comboctrl was given.
if test "${enable_combocontrol+set}" = set; then if test "${enable_comboctrl+set}" = set; then
enableval="$enable_combocontrol" 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'
else else
ac_cv_use_combocontrol='wxUSE_COMBOCONTROL=no' ac_cv_use_comboctrl='wxUSE_COMBOCTRL=no'
fi fi
else else
LINE=`grep "wxUSE_COMBOCONTROL" ${wx_arg_cache_file}` LINE=`grep "wxUSE_COMBOCTRL" ${wx_arg_cache_file}`
if test "x$LINE" != x ; then if test "x$LINE" != x ; then
eval "DEFAULT_$LINE" eval "DEFAULT_$LINE"
else else
no_cache=1 no_cache=1
fi fi
ac_cv_use_combocontrol='wxUSE_COMBOCONTROL='$DEFAULT_wxUSE_COMBOCONTROL ac_cv_use_comboctrl='wxUSE_COMBOCTRL='$DEFAULT_wxUSE_COMBOCTRL
fi; fi;
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
fi fi
if test "$wxUSE_COMBOCONTROL" = yes; then if test "$wxUSE_COMBOCTRL" = yes; then
echo "$as_me:$LINENO: result: yes" >&5 echo "$as_me:$LINENO: result: yes" >&5
echo "${ECHO_T}yes" >&6 echo "${ECHO_T}yes" >&6
else else
@@ -8495,38 +8495,38 @@ echo "${ECHO_T}no" >&6
enablestring= enablestring=
echo "$as_me:$LINENO: checking for --${enablestring:-enable}-odcombo" >&5 echo "$as_me:$LINENO: checking for --${enablestring:-enable}-odcombobox" >&5
echo $ECHO_N "checking for --${enablestring:-enable}-odcombo... $ECHO_C" >&6 echo $ECHO_N "checking for --${enablestring:-enable}-odcombobox... $ECHO_C" >&6
no_cache=0 no_cache=0
# Check whether --enable-odcombo or --disable-odcombo was given. # Check whether --enable-odcombobox or --disable-odcombobox was given.
if test "${enable_odcombo+set}" = set; then if test "${enable_odcombobox+set}" = set; then
enableval="$enable_odcombo" 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'
else else
ac_cv_use_odcombo='wxUSE_OWNERDRAWNCOMBOBOX=no' ac_cv_use_odcombobox='wxUSE_ODCOMBOBOX=no'
fi fi
else else
LINE=`grep "wxUSE_OWNERDRAWNCOMBOBOX" ${wx_arg_cache_file}` LINE=`grep "wxUSE_ODCOMBOBOX" ${wx_arg_cache_file}`
if test "x$LINE" != x ; then if test "x$LINE" != x ; then
eval "DEFAULT_$LINE" eval "DEFAULT_$LINE"
else else
no_cache=1 no_cache=1
fi fi
ac_cv_use_odcombo='wxUSE_OWNERDRAWNCOMBOBOX='$DEFAULT_wxUSE_OWNERDRAWNCOMBOBOX ac_cv_use_odcombobox='wxUSE_ODCOMBOBOX='$DEFAULT_wxUSE_ODCOMBOBOX
fi; fi;
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
fi fi
if test "$wxUSE_OWNERDRAWNCOMBOBOX" = yes; then if test "$wxUSE_ODCOMBOBOX" = yes; then
echo "$as_me:$LINENO: result: yes" >&5 echo "$as_me:$LINENO: result: yes" >&5
echo "${ECHO_T}yes" >&6 echo "${ECHO_T}yes" >&6
else else
@@ -43716,9 +43716,9 @@ _ACEOF
USES_CONTROLS=1 USES_CONTROLS=1
fi fi
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
_ACEOF _ACEOF
USES_CONTROLS=1 USES_CONTROLS=1
@@ -43846,9 +43846,9 @@ _ACEOF
SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS notebook" SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS notebook"
fi 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
_ACEOF _ACEOF
USES_CONTROLS=1 USES_CONTROLS=1

View File

@@ -509,7 +509,7 @@ if test $DEBUG_CONFIGURE = 1; then
DEFAULT_wxUSE_CHOICE=no DEFAULT_wxUSE_CHOICE=no
DEFAULT_wxUSE_CHOICEBOOK=no DEFAULT_wxUSE_CHOICEBOOK=no
DEFAULT_wxUSE_COMBOBOX=no DEFAULT_wxUSE_COMBOBOX=no
DEFAULT_wxUSE_COMBOCONTROL=no DEFAULT_wxUSE_COMBOCTRL=no
DEFAULT_wxUSE_DATEPICKCTRL=no DEFAULT_wxUSE_DATEPICKCTRL=no
DEFAULT_wxUSE_DISPLAY=no DEFAULT_wxUSE_DISPLAY=no
DEFAULT_wxUSE_GAUGE=no DEFAULT_wxUSE_GAUGE=no
@@ -520,7 +520,7 @@ if test $DEBUG_CONFIGURE = 1; then
DEFAULT_wxUSE_LISTBOX=no DEFAULT_wxUSE_LISTBOX=no
DEFAULT_wxUSE_LISTCTRL=no DEFAULT_wxUSE_LISTCTRL=no
DEFAULT_wxUSE_NOTEBOOK=no DEFAULT_wxUSE_NOTEBOOK=no
DEFAULT_wxUSE_OWNERDRAWNCOMBOBOX=no DEFAULT_wxUSE_ODCOMBOBOX=no
DEFAULT_wxUSE_RADIOBOX=no DEFAULT_wxUSE_RADIOBOX=no
DEFAULT_wxUSE_RADIOBTN=no DEFAULT_wxUSE_RADIOBTN=no
DEFAULT_wxUSE_SASH=no DEFAULT_wxUSE_SASH=no
@@ -715,7 +715,7 @@ else
DEFAULT_wxUSE_CHOICE=yes DEFAULT_wxUSE_CHOICE=yes
DEFAULT_wxUSE_CHOICEBOOK=yes DEFAULT_wxUSE_CHOICEBOOK=yes
DEFAULT_wxUSE_COMBOBOX=yes DEFAULT_wxUSE_COMBOBOX=yes
DEFAULT_wxUSE_COMBOCONTROL=yes DEFAULT_wxUSE_COMBOCTRL=yes
DEFAULT_wxUSE_DATEPICKCTRL=yes DEFAULT_wxUSE_DATEPICKCTRL=yes
DEFAULT_wxUSE_DISPLAY=yes DEFAULT_wxUSE_DISPLAY=yes
DEFAULT_wxUSE_GAUGE=yes DEFAULT_wxUSE_GAUGE=yes
@@ -726,7 +726,7 @@ else
DEFAULT_wxUSE_LISTBOX=yes DEFAULT_wxUSE_LISTBOX=yes
DEFAULT_wxUSE_LISTCTRL=yes DEFAULT_wxUSE_LISTCTRL=yes
DEFAULT_wxUSE_NOTEBOOK=yes DEFAULT_wxUSE_NOTEBOOK=yes
DEFAULT_wxUSE_OWNERDRAWNCOMBOBOX=yes DEFAULT_wxUSE_ODCOMBOBOX=yes
DEFAULT_wxUSE_RADIOBOX=yes DEFAULT_wxUSE_RADIOBOX=yes
DEFAULT_wxUSE_RADIOBTN=yes DEFAULT_wxUSE_RADIOBTN=yes
DEFAULT_wxUSE_SASH=yes DEFAULT_wxUSE_SASH=yes
@@ -1116,7 +1116,7 @@ WX_ARG_ENABLE(checklst, [ --enable-checklst use wxCheckListBox (listbo
WX_ARG_ENABLE(choice, [ --enable-choice use wxChoice class], wxUSE_CHOICE) 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(choicebook, [ --enable-choicebook use wxChoicebook class], wxUSE_CHOICEBOOK)
WX_ARG_ENABLE(combobox, [ --enable-combobox use wxComboBox class], wxUSE_COMBOBOX) 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(datepick, [ --enable-datepick use wxDatePickerCtrl class], wxUSE_DATEPICKCTRL)
WX_ARG_ENABLE(display, [ --enable-display use wxDisplay class], wxUSE_DISPLAY) 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(gauge, [ --enable-gauge use wxGauge class], wxUSE_GAUGE)
@@ -1127,7 +1127,7 @@ WX_ARG_ENABLE(listbook, [ --enable-listbook use wxListbook class], wxU
WX_ARG_ENABLE(listbox, [ --enable-listbox use wxListBox class], wxUSE_LISTBOX) 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(listctrl, [ --enable-listctrl use wxListCtrl class], wxUSE_LISTCTRL)
WX_ARG_ENABLE(notebook, [ --enable-notebook use wxNotebook class], wxUSE_NOTEBOOK) 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(radiobox, [ --enable-radiobox use wxRadioBox class], wxUSE_RADIOBOX)
WX_ARG_ENABLE(radiobtn, [ --enable-radiobtn use wxRadioButton class], wxUSE_RADIOBTN) 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(sash, [ --enable-sash use wxSashWindow class], wxUSE_SASH)
@@ -6281,8 +6281,8 @@ if test "$wxUSE_COMBOBOX" = "yes"; then
USES_CONTROLS=1 USES_CONTROLS=1
fi fi
if test "$wxUSE_COMBOCONTROL" = "yes"; then if test "$wxUSE_COMBOCTRL" = "yes"; then
AC_DEFINE(wxUSE_COMBOCONTROL) AC_DEFINE(wxUSE_COMBOCTRL)
USES_CONTROLS=1 USES_CONTROLS=1
fi fi
@@ -6365,8 +6365,8 @@ if test "$wxUSE_NOTEBOOK" = "yes"; then
SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS notebook" SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS notebook"
fi fi
if test "$wxUSE_OWNERDRAWNCOMBOBOX" = "yes"; then if test "$wxUSE_ODCOMBOBOX" = "yes"; then
AC_DEFINE(wxUSE_OWNERDRAWNCOMBOBOX) AC_DEFINE(wxUSE_ODCOMBOBOX)
USES_CONTROLS=1 USES_CONTROLS=1
SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS combo" SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS combo"
fi fi

View File

@@ -78,7 +78,7 @@ All:
All (GUI): All (GUI):
- Added wxComboControl and wxOwnerDrawnComboBox (Jaakko Salli) - Added wxComboCtrl and wxOwnerDrawnComboBox (Jaakko Salli)
- Added wxTreebook (uses a wxTreeCtrl to control pages). - Added wxTreebook (uses a wxTreeCtrl to control pages).
- Added wxDC::GradientFillLinear/Concentric() - Added wxDC::GradientFillLinear/Concentric()
- Added wxRadioBox::SetItemToolTip() - Added wxRadioBox::SetItemToolTip()

View File

@@ -392,13 +392,13 @@
# endif # endif
#endif /* !defined(wxUSE_COMBOBOX) */ #endif /* !defined(wxUSE_COMBOBOX) */
#ifndef wxUSE_COMBOCONTROL #ifndef wxUSE_COMBOCTRL
# ifdef wxABORT_ON_CONFIG_ERROR # ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_COMBOCONTROL must be defined." # error "wxUSE_COMBOCTRL must be defined."
# else # else
# define wxUSE_COMBOCONTROL 0 # define wxUSE_COMBOCTRL 0
# endif # endif
#endif /* !defined(wxUSE_COMBOCONTROL) */ #endif /* !defined(wxUSE_COMBOCTRL) */
#ifndef wxUSE_DATAOBJ #ifndef wxUSE_DATAOBJ
# ifdef wxABORT_ON_CONFIG_ERROR # ifdef wxABORT_ON_CONFIG_ERROR
@@ -629,13 +629,13 @@
# endif # endif
#endif /* !defined(wxUSE_NOTEBOOK) */ #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."
# else # else
# define wxUSE_OWNERDRAWNCOMBOBOX 0 # define wxUSE_ODCOMBOBOX 0
# endif # endif
#endif /* !defined(wxUSE_OWNERDRAWNCOMBOBOX) */ #endif /* !defined(wxUSE_ODCOMBOBOX) */
#ifndef wxUSE_PALETTE #ifndef wxUSE_PALETTE
# ifdef wxABORT_ON_CONFIG_ERROR # ifdef wxABORT_ON_CONFIG_ERROR

View File

@@ -1,6 +1,6 @@
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
// Name: wx/combo.h // Name: wx/combo.h
// Purpose: wxComboControl declaration // Purpose: wxComboCtrl declaration
// Author: Jaakko Salli // Author: Jaakko Salli
// Modified by: // Modified by:
// Created: Apr-30-2006 // Created: Apr-30-2006
@@ -15,7 +15,7 @@
/* /*
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 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 (with a button allowing to open the pop down list) with a listbox and
@@ -23,9 +23,9 @@
combinations - in fact, we want to allow anything at all to be used as pop combinations - in fact, we want to allow anything at all to be used as pop
down list, not just a wxListBox. 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 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 just a wxControl in this method as, for example, we need to call
SetSelection("initial text value") and wxControl doesn't have such method. SetSelection("initial text value") and wxControl doesn't have such method.
@@ -40,7 +40,7 @@
#include "wx/defs.h" #include "wx/defs.h"
#if wxUSE_COMBOCONTROL #if wxUSE_COMBOCTRL
#include "wx/textctrl.h" #include "wx/textctrl.h"
@@ -53,7 +53,7 @@
class WXDLLEXPORT wxComboPopup; class WXDLLEXPORT wxComboPopup;
// //
// New window styles for wxComboControlBase // New window styles for wxComboCtrlBase
// //
enum enum
{ {
@@ -70,7 +70,7 @@ enum
}; };
// wxComboControl internal flags // wxComboCtrl internal flags
enum enum
{ {
// First those that can be passed to Customize. // First those that can be passed to Customize.
@@ -101,8 +101,8 @@ enum
}; };
// Namespace for wxComboControl feature flags // Namespace for wxComboCtrl feature flags
struct wxComboControlFeatures struct wxComboCtrlFeatures
{ {
enum enum
{ {
@@ -129,12 +129,12 @@ struct wxComboControlFeatures
}; };
class WXDLLEXPORT wxComboControlBase : public wxControl class WXDLLEXPORT wxComboCtrlBase : public wxControl
{ {
friend class wxComboPopup; friend class wxComboPopup;
public: public:
// ctors and such // ctors and such
wxComboControlBase() : wxControl() { Init(); } wxComboCtrlBase() : wxControl() { Init(); }
bool Create(wxWindow *parent, bool Create(wxWindow *parent,
wxWindowID id, wxWindowID id,
@@ -145,7 +145,7 @@ public:
const wxValidator& validator, const wxValidator& validator,
const wxString& name); const wxString& name);
virtual ~wxComboControlBase(); virtual ~wxComboCtrlBase();
// show/hide popup window // show/hide popup window
virtual void ShowPopup(); virtual void ShowPopup();
@@ -396,7 +396,7 @@ protected:
void OnTextCtrlEvent(wxCommandEvent& event); void OnTextCtrlEvent(wxCommandEvent& event);
void OnSysColourChanged(wxSysColourChangedEvent& 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; } void Customize( wxUint32 flags ) { m_iFlags |= flags; }
// Dispatches size event and refreshes // Dispatches size event and refreshes
@@ -511,30 +511,30 @@ private:
DECLARE_EVENT_TABLE() DECLARE_EVENT_TABLE()
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 // wxComboPopup internal flags
enum 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;
public: public:
wxComboPopup() wxComboPopup()
{ {
m_combo = (wxComboControlBase*) NULL; m_combo = (wxComboCtrlBase*) NULL;
m_iFlags = 0; m_iFlags = 0;
} }
@@ -570,12 +570,12 @@ public:
// Default implementation draws value as string. // Default implementation draws value as string.
virtual void PaintComboControl( wxDC& dc, const wxRect& rect ); 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. // Events not handled should be skipped, as usual.
virtual void OnComboKeyEvent( wxKeyEvent& event ); virtual void OnComboKeyEvent( wxKeyEvent& event );
// Implement if you need to support special action when user // 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(); virtual void OnComboDoubleClick();
// Return final size of popup. Called on every popup, just prior to OnShow. // Return final size of popup. Called on every popup, just prior to OnShow.
@@ -605,17 +605,17 @@ public:
} }
// Default PaintComboControl behaviour // Default PaintComboControl behaviour
static void DefaultPaintComboControl( wxComboControlBase* combo, static void DefaultPaintComboControl( wxComboCtrlBase* combo,
wxDC& dc, wxDC& dc,
const wxRect& rect ); const wxRect& rect );
protected: protected:
wxComboControlBase* m_combo; wxComboCtrlBase* m_combo;
wxUint32 m_iFlags; wxUint32 m_iFlags;
private: private:
// Called in wxComboControlBase::SetPopupControl // Called in wxComboCtrlBase::SetPopupControl
void InitBase(wxComboControlBase *combo) void InitBase(wxComboCtrlBase *combo)
{ {
m_combo = combo; m_combo = combo;
} }
@@ -635,7 +635,7 @@ private:
// Any ports may need generic as an alternative // Any ports may need generic as an alternative
#include "wx/generic/combo.h" #include "wx/generic/combo.h"
#endif // wxUSE_COMBOCONTROL #endif // wxUSE_COMBOCTRL
#endif #endif
// _WX_COMBOCONTROL_H_BASE_ // _WX_COMBOCONTROL_H_BASE_

View File

@@ -1,6 +1,6 @@
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// Name: wx/generic/combo.h // Name: wx/generic/combo.h
// Purpose: Generic wxComboControl // Purpose: Generic wxComboCtrl
// Author: Jaakko Salli // Author: Jaakko Salli
// Modified by: // Modified by:
// Created: Apr-30-2006 // Created: Apr-30-2006
@@ -12,13 +12,13 @@
#ifndef _WX_GENERIC_COMBOCONTROL_H_ #ifndef _WX_GENERIC_COMBOCONTROL_H_
#define _WX_GENERIC_COMBOCONTROL_H_ #define _WX_GENERIC_COMBOCONTROL_H_
#if wxUSE_COMBOCONTROL #if wxUSE_COMBOCTRL
// Only define generic if native doesn't have all the features // Only define generic if native doesn't have all the features
#if !defined(wxCOMBOCONTROL_FULLY_FEATURED) #if !defined(wxCOMBOCONTROL_FULLY_FEATURED)
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// Generic wxComboControl // Generic wxComboCtrl
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
#if defined(__WXUNIVERSAL__) #if defined(__WXUNIVERSAL__)
@@ -32,11 +32,11 @@
#endif #endif
class WXDLLEXPORT wxGenericComboControl : public wxComboControlBase class WXDLLEXPORT wxGenericComboControl : public wxComboCtrlBase
{ {
public: public:
// ctors and such // ctors and such
wxGenericComboControl() : wxComboControlBase() { Init(); } wxGenericComboControl() : wxComboCtrlBase() { Init(); }
wxGenericComboControl(wxWindow *parent, wxGenericComboControl(wxWindow *parent,
wxWindowID id = wxID_ANY, wxWindowID id = wxID_ANY,
@@ -46,7 +46,7 @@ public:
long style = 0, long style = 0,
const wxValidator& validator = wxDefaultValidator, const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxComboBoxNameStr) const wxString& name = wxComboBoxNameStr)
: wxComboControlBase() : wxComboCtrlBase()
{ {
Init(); Init();
@@ -64,7 +64,7 @@ public:
virtual ~wxGenericComboControl(); virtual ~wxGenericComboControl();
static int GetFeatures() { return wxComboControlFeatures::All; } static int GetFeatures() { return wxComboCtrlFeatures::All; }
#if defined(__WXUNIVERSAL__) #if defined(__WXUNIVERSAL__)
// we have our own input handler and our own actions // we have our own input handler and our own actions
@@ -93,15 +93,15 @@ private:
#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
{ {
public: public:
wxComboControl() : wxGenericComboControl() {} wxComboCtrl() : wxGenericComboControl() {}
wxComboControl(wxWindow *parent, wxComboCtrl(wxWindow *parent,
wxWindowID id = wxID_ANY, wxWindowID id = wxID_ANY,
const wxString& value = wxEmptyString, const wxString& value = wxEmptyString,
const wxPoint& pos = wxDefaultPosition, const wxPoint& pos = wxDefaultPosition,
@@ -114,22 +114,22 @@ public:
(void)Create(parent, id, value, pos, size, style, validator, name); (void)Create(parent, id, value, pos, size, style, validator, name);
} }
virtual ~wxComboControl() {} virtual ~wxComboCtrl() {}
protected: protected:
private: private:
DECLARE_DYNAMIC_CLASS(wxComboControl) DECLARE_DYNAMIC_CLASS(wxComboCtrl)
}; };
#endif // _WX_COMBOCONTROL_H_ #endif // _WX_COMBOCONTROL_H_
#else #else
#define wxGenericComboControl wxComboControl #define wxGenericComboControl wxComboCtrl
#endif // !defined(wxCOMBOCONTROL_FULLY_FEATURED) #endif // !defined(wxCOMBOCONTROL_FULLY_FEATURED)
#endif // wxUSE_COMBOCONTROL #endif // wxUSE_COMBOCTRL
#endif #endif
// _WX_GENERIC_COMBOCONTROL_H_ // _WX_GENERIC_COMBOCONTROL_H_

View File

@@ -674,14 +674,14 @@
// Recommended setting: 1 (it doesn't cost almost anything) // Recommended setting: 1 (it doesn't cost almost anything)
#define wxUSE_MINIFRAME 1 #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. // not necessarily a listbox.
// //
// Default is 1. // Default is 1.
// //
// Recommended setting: 1 but can be safely set to 0 except for wxUniv where it // Recommended setting: 1 but can be safely set to 0 except for wxUniv where it
// it used by wxComboBox // it used by wxComboBox
#define wxUSE_COMBOCONTROL 1 #define wxUSE_COMBOCTRL 1
// wxOwnerDrawnComboBox is a custom combobox allowing to paint the combobox // wxOwnerDrawnComboBox is a custom combobox allowing to paint the combobox
// items. // items.
@@ -689,7 +689,7 @@
// Default is 1. // Default is 1.
// //
// Recommended setting: 1 but can be safely set to 0 // Recommended setting: 1 but can be safely set to 0
#define wxUSE_OWNERDRAWNCOMBOBOX 1 #define wxUSE_ODCOMBOBOX 1
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// Miscellaneous GUI stuff // Miscellaneous GUI stuff

View File

@@ -673,14 +673,14 @@
// Recommended setting: 1 (it doesn't cost almost anything) // Recommended setting: 1 (it doesn't cost almost anything)
#define wxUSE_MINIFRAME 1 #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. // not necessarily a listbox.
// //
// Default is 1. // Default is 1.
// //
// Recommended setting: 1 but can be safely set to 0 except for wxUniv where it // Recommended setting: 1 but can be safely set to 0 except for wxUniv where it
// it used by wxComboBox // it used by wxComboBox
#define wxUSE_COMBOCONTROL 1 #define wxUSE_COMBOCTRL 1
// wxOwnerDrawnComboBox is a custom combobox allowing to paint the combobox // wxOwnerDrawnComboBox is a custom combobox allowing to paint the combobox
// items. // items.
@@ -688,7 +688,7 @@
// Default is 1. // Default is 1.
// //
// Recommended setting: 1 but can be safely set to 0 // Recommended setting: 1 but can be safely set to 0
#define wxUSE_OWNERDRAWNCOMBOBOX 1 #define wxUSE_ODCOMBOBOX 1
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// Miscellaneous GUI stuff // Miscellaneous GUI stuff

View File

@@ -1,6 +1,6 @@
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// Name: wx/msw/combo.h // Name: wx/msw/combo.h
// Purpose: wxComboControl class // Purpose: wxComboCtrl class
// Author: Jaakko Salli // Author: Jaakko Salli
// Modified by: // Modified by:
// Created: Apr-30-2006 // Created: Apr-30-2006
@@ -13,25 +13,25 @@
#define _WX_COMBOCONTROL_H_ #define _WX_COMBOCONTROL_H_
// NB: Definition of _WX_COMBOCONTROL_H_ is used in wx/generic/combo.h to // NB: Definition of _WX_COMBOCONTROL_H_ is used in wx/generic/combo.h to
// determine whether there is native wxComboControl, so make sure you // determine whether there is native wxComboCtrl, so make sure you
// use it in all native wxComboControls. // use it in all native wxComboCtrls.
#if wxUSE_COMBOCONTROL #if wxUSE_COMBOCTRL
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// Native wxComboControl // Native wxComboCtrl
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// Define this only if native implementation includes all features // Define this only if native implementation includes all features
#define wxCOMBOCONTROL_FULLY_FEATURED #define wxCOMBOCONTROL_FULLY_FEATURED
class WXDLLEXPORT wxComboControl : public wxComboControlBase class WXDLLEXPORT wxComboCtrl : public wxComboCtrlBase
{ {
public: public:
// ctors and such // ctors and such
wxComboControl() : wxComboControlBase() { Init(); } wxComboCtrl() : wxComboCtrlBase() { Init(); }
wxComboControl(wxWindow *parent, wxComboCtrl(wxWindow *parent,
wxWindowID id = wxID_ANY, wxWindowID id = wxID_ANY,
const wxString& value = wxEmptyString, const wxString& value = wxEmptyString,
const wxPoint& pos = wxDefaultPosition, const wxPoint& pos = wxDefaultPosition,
@@ -39,7 +39,7 @@ public:
long style = 0, long style = 0,
const wxValidator& validator = wxDefaultValidator, const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxComboBoxNameStr) const wxString& name = wxComboBoxNameStr)
: wxComboControlBase() : wxComboCtrlBase()
{ {
Init(); Init();
@@ -55,11 +55,11 @@ public:
const wxValidator& validator = wxDefaultValidator, const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxComboBoxNameStr); 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; }
protected: protected:
@@ -77,10 +77,10 @@ private:
DECLARE_EVENT_TABLE() DECLARE_EVENT_TABLE()
DECLARE_DYNAMIC_CLASS(wxComboControl) DECLARE_DYNAMIC_CLASS(wxComboCtrl)
}; };
#endif // wxUSE_COMBOCONTROL #endif // wxUSE_COMBOCTRL
#endif #endif
// _WX_COMBOCONTROL_H_ // _WX_COMBOCONTROL_H_

View File

@@ -673,14 +673,14 @@
// Recommended setting: 1 (it doesn't cost almost anything) // Recommended setting: 1 (it doesn't cost almost anything)
#define wxUSE_MINIFRAME 1 #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. // not necessarily a listbox.
// //
// Default is 1. // Default is 1.
// //
// Recommended setting: 1 but can be safely set to 0 except for wxUniv where it // Recommended setting: 1 but can be safely set to 0 except for wxUniv where it
// it used by wxComboBox // it used by wxComboBox
#define wxUSE_COMBOCONTROL 1 #define wxUSE_COMBOCTRL 1
// wxOwnerDrawnComboBox is a custom combobox allowing to paint the combobox // wxOwnerDrawnComboBox is a custom combobox allowing to paint the combobox
// items. // items.
@@ -688,7 +688,7 @@
// Default is 1. // Default is 1.
// //
// Recommended setting: 1 but can be safely set to 0 // Recommended setting: 1 but can be safely set to 0
#define wxUSE_OWNERDRAWNCOMBOBOX 1 #define wxUSE_ODCOMBOBOX 1
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// Miscellaneous GUI stuff // Miscellaneous GUI stuff

View File

@@ -673,14 +673,14 @@
// Recommended setting: 1 (it doesn't cost almost anything) // Recommended setting: 1 (it doesn't cost almost anything)
#define wxUSE_MINIFRAME 1 #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. // not necessarily a listbox.
// //
// Default is 1. // Default is 1.
// //
// Recommended setting: 1 but can be safely set to 0 except for wxUniv where it // Recommended setting: 1 but can be safely set to 0 except for wxUniv where it
// it used by wxComboBox // it used by wxComboBox
#define wxUSE_COMBOCONTROL 1 #define wxUSE_COMBOCTRL 1
// wxOwnerDrawnComboBox is a custom combobox allowing to paint the combobox // wxOwnerDrawnComboBox is a custom combobox allowing to paint the combobox
// items. // items.
@@ -688,7 +688,7 @@
// Default is 1. // Default is 1.
// //
// Recommended setting: 1 but can be safely set to 0 // Recommended setting: 1 but can be safely set to 0
#define wxUSE_OWNERDRAWNCOMBOBOX 1 #define wxUSE_ODCOMBOBOX 1
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// Miscellaneous GUI stuff // Miscellaneous GUI stuff

View File

@@ -14,7 +14,7 @@
#include "wx/defs.h" #include "wx/defs.h"
#if wxUSE_OWNERDRAWNCOMBOBOX #if wxUSE_ODCOMBOBOX
#include "wx/combo.h" #include "wx/combo.h"
#include "wx/ctrlsub.h" #include "wx/ctrlsub.h"
@@ -52,7 +52,7 @@ enum
// //
// Notes: // Notes:
// wxOwnerDrawnComboBox uses this as its popup. However, it always derives // 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 // wxGenericComboControl, then remember that vast majority of item manipulation
// functionality is implemented in the wxVListBoxComboPopup class itself. // functionality is implemented in the wxVListBoxComboPopup class itself.
// //
@@ -175,18 +175,18 @@ private:
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// wxOwnerDrawnComboBox: a generic wxComboBox that allows custom paint items // wxOwnerDrawnComboBox: a generic wxComboBox that allows custom paint items
// in addition to many other types of customization already allowed by // in addition to many other types of customization already allowed by
// the wxComboControl. // the wxComboCtrl.
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
class WXDLLIMPEXP_ADV wxOwnerDrawnComboBox : public wxComboControl, class WXDLLIMPEXP_ADV wxOwnerDrawnComboBox : public wxComboCtrl,
public wxItemContainer public wxItemContainer
{ {
friend class wxComboPopupWindow; friend class wxComboPopupWindow;
friend class wxComboControlBase; friend class wxComboCtrlBase;
public: public:
// ctors and such // ctors and such
wxOwnerDrawnComboBox() : wxComboControl() { Init(); } wxOwnerDrawnComboBox() : wxComboCtrl() { Init(); }
wxOwnerDrawnComboBox(wxWindow *parent, wxOwnerDrawnComboBox(wxWindow *parent,
wxWindowID id, wxWindowID id,
@@ -198,7 +198,7 @@ public:
long style = 0, long style = 0,
const wxValidator& validator = wxDefaultValidator, const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxComboBoxNameStr) const wxString& name = wxComboBoxNameStr)
: wxComboControl() : wxComboCtrl()
{ {
Init(); Init();
@@ -293,6 +293,6 @@ private:
}; };
#endif // wxUSE_OWNERDRAWNCOMBOBOX #endif // wxUSE_ODCOMBOBOX
#endif #endif
// _WX_ODCOMBO_H_ // _WX_ODCOMBO_H_

View File

@@ -673,14 +673,14 @@
// Recommended setting: 1 (it doesn't cost almost anything) // Recommended setting: 1 (it doesn't cost almost anything)
#define wxUSE_MINIFRAME 1 #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. // not necessarily a listbox.
// //
// Default is 1. // Default is 1.
// //
// Recommended setting: 1 but can be safely set to 0 except for wxUniv where it // Recommended setting: 1 but can be safely set to 0 except for wxUniv where it
// it used by wxComboBox // it used by wxComboBox
#define wxUSE_COMBOCONTROL 1 #define wxUSE_COMBOCTRL 1
// wxOwnerDrawnComboBox is a custom combobox allowing to paint the combobox // wxOwnerDrawnComboBox is a custom combobox allowing to paint the combobox
// items. // items.
@@ -688,7 +688,7 @@
// Default is 1. // Default is 1.
// //
// Recommended setting: 1 but can be safely set to 0 // Recommended setting: 1 but can be safely set to 0
#define wxUSE_OWNERDRAWNCOMBOBOX 1 #define wxUSE_ODCOMBOBOX 1
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// Miscellaneous GUI stuff // Miscellaneous GUI stuff

View File

@@ -673,14 +673,14 @@
// Recommended setting: 1 (it doesn't cost almost anything) // Recommended setting: 1 (it doesn't cost almost anything)
#define wxUSE_MINIFRAME 1 #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. // not necessarily a listbox.
// //
// Default is 1. // Default is 1.
// //
// Recommended setting: 1 but can be safely set to 0 except for wxUniv where it // Recommended setting: 1 but can be safely set to 0 except for wxUniv where it
// it used by wxComboBox // it used by wxComboBox
#define wxUSE_COMBOCONTROL 1 #define wxUSE_COMBOCTRL 1
// wxOwnerDrawnComboBox is a custom combobox allowing to paint the combobox // wxOwnerDrawnComboBox is a custom combobox allowing to paint the combobox
// items. // items.
@@ -688,7 +688,7 @@
// Default is 1. // Default is 1.
// //
// Recommended setting: 1 but can be safely set to 0 // Recommended setting: 1 but can be safely set to 0
#define wxUSE_OWNERDRAWNCOMBOBOX 1 #define wxUSE_ODCOMBOBOX 1
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// Miscellaneous GUI stuff // Miscellaneous GUI stuff

View File

@@ -156,15 +156,15 @@ protected:
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
class WXDLLEXPORT wxComboBox; class WXDLLEXPORT wxComboBox;
class WXDLLEXPORT wxComboControl; class WXDLLEXPORT wxComboCtrl;
class WXDLLEXPORT wxPopupComboWindow : public wxPopupTransientWindow class WXDLLEXPORT wxPopupComboWindow : public wxPopupTransientWindow
{ {
public: public:
wxPopupComboWindow() { m_combo = NULL; } 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 // position the window correctly relatively to the combo
void PositionNearCombo(); void PositionNearCombo();
@@ -177,7 +177,7 @@ protected:
void OnKeyDown(wxKeyEvent& event); void OnKeyDown(wxKeyEvent& event);
// the parent combobox // the parent combobox
wxComboControl *m_combo; wxComboCtrl *m_combo;
DECLARE_EVENT_TABLE() DECLARE_EVENT_TABLE()
DECLARE_DYNAMIC_CLASS(wxPopupComboWindow) DECLARE_DYNAMIC_CLASS(wxPopupComboWindow)

View File

@@ -669,14 +669,14 @@
// Recommended setting: 1 (it doesn't cost almost anything) // Recommended setting: 1 (it doesn't cost almost anything)
#define wxUSE_MINIFRAME 1 #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. // not necessarily a listbox.
// //
// Default is 1. // Default is 1.
// //
// Recommended setting: 1 but can be safely set to 0 except for wxUniv where it // Recommended setting: 1 but can be safely set to 0 except for wxUniv where it
// it used by wxComboBox // it used by wxComboBox
#define wxUSE_COMBOCONTROL 1 #define wxUSE_COMBOCTRL 1
// wxOwnerDrawnComboBox is a custom combobox allowing to paint the combobox // wxOwnerDrawnComboBox is a custom combobox allowing to paint the combobox
// items. // items.
@@ -684,7 +684,7 @@
// Default is 1. // Default is 1.
// //
// Recommended setting: 1 but can be safely set to 0 // Recommended setting: 1 but can be safely set to 0
#define wxUSE_OWNERDRAWNCOMBOBOX 1 #define wxUSE_ODCOMBOBOX 1
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// Miscellaneous GUI stuff // Miscellaneous GUI stuff

View File

@@ -31,7 +31,7 @@ class WXDLLEXPORT wxListBox;
// 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: public:
// ctors and such // ctors and such
@@ -129,7 +129,7 @@ public:
wxCONTROL_ITEMCONTAINER_CLIENTDATAOBJECT_RECAST wxCONTROL_ITEMCONTAINER_CLIENTDATAOBJECT_RECAST
// we have our own input handler and our own actions // 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, virtual bool PerformAction(const wxControlAction& action,
long numArg = 0l, long numArg = 0l,

View File

@@ -1,6 +1,6 @@
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// Name: combo.cpp // Name: combo.cpp
// Purpose: wxComboControl sample // Purpose: wxComboCtrl sample
// Author: Jaakko Salli // Author: Jaakko Salli
// Modified by: // Modified by:
// Created: Apr-30-2006 // Created: Apr-30-2006
@@ -30,8 +30,8 @@
#include "wx/wx.h" #include "wx/wx.h"
#endif #endif
#if !wxUSE_COMBOCONTROL #if !wxUSE_COMBOCTRL
#error "Please set wxUSE_COMBOCONTROL to 1 and rebuild the library." #error "Please set wxUSE_COMBOCTRL to 1 and rebuild the library."
#endif #endif
#include "wx/image.h" #include "wx/image.h"
@@ -78,7 +78,7 @@ public:
void OnQuit(wxCommandEvent& event); void OnQuit(wxCommandEvent& event);
void OnAbout(wxCommandEvent& event); void OnAbout(wxCommandEvent& event);
// log wxComboControl events // log wxComboCtrl events
void OnComboBoxUpdate( wxCommandEvent& event ); void OnComboBoxUpdate( wxCommandEvent& event );
protected: protected:
@@ -140,7 +140,7 @@ IMPLEMENT_APP(MyApp)
bool MyApp::OnInit() bool MyApp::OnInit()
{ {
// create the main application window // 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 // and show it (the frames, unlike simple controls, are not shown when
// created initially) // created initially)
@@ -164,7 +164,7 @@ class ListViewComboPopup : public wxListView, public wxComboPopup
public: public:
/* /*
ListViewComboPopup(wxComboControlBase* combo) ListViewComboPopup(wxComboCtrlBase* combo)
: wxListView(), wxComboPopup(combo) : wxListView(), wxComboPopup(combo)
{ {
m_value = -1; m_value = -1;
@@ -266,7 +266,7 @@ class TreeCtrlComboPopup : public wxTreeCtrl, public wxComboPopup
public: public:
/* /*
TreeCtrlComboPopup(wxComboControlBase* combo) TreeCtrlComboPopup(wxComboCtrlBase* combo)
: wxTreeCtrl(), wxComboPopup(combo) : wxTreeCtrl(), wxComboPopup(combo)
{ {
} }
@@ -534,13 +534,13 @@ public:
}; };
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// 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
{ {
public: public:
wxFileSelectorCombo() : wxComboControl() { Init(); } wxFileSelectorCombo() : wxComboCtrl() { Init(); }
wxFileSelectorCombo(wxWindow *parent, wxFileSelectorCombo(wxWindow *parent,
wxWindowID id = wxID_ANY, wxWindowID id = wxID_ANY,
@@ -550,7 +550,7 @@ public:
long style = 0, long style = 0,
const wxValidator& validator = wxDefaultValidator, const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxComboBoxNameStr) const wxString& name = wxComboBoxNameStr)
: wxComboControl() : wxComboCtrl()
{ {
Init(); Init();
Create(parent,id,value, Create(parent,id,value,
@@ -667,13 +667,13 @@ MyFrame::MyFrame(const wxString& title)
// Make sure GetFeatures is implemented // Make sure GetFeatures is implemented
int features = wxComboControl::GetFeatures(); int features = wxComboCtrl::GetFeatures();
wxLogDebug(wxT("wxComboControl features: 0x%X (all features: 0x%X)"), wxLogDebug(wxT("wxComboCtrl features: 0x%X (all features: 0x%X)"),
features,wxComboControlFeatures::All); features,wxComboCtrlFeatures::All);
wxComboBox* cb; wxComboBox* cb;
wxComboControl* cc; wxComboCtrl* cc;
wxGenericComboControl* gcc; wxGenericComboControl* gcc;
wxOwnerDrawnComboBox* odc; wxOwnerDrawnComboBox* odc;
@@ -846,18 +846,18 @@ MyFrame::MyFrame(const wxString& title)
// //
// 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 ); wxALIGN_CENTER_VERTICAL|wxRIGHT, 4 );
rowSizer->Add( new wxStaticText(panel,wxID_ANY,wxT("Tree Ctrl wxGenericComboControl:")), 1, rowSizer->Add( new wxStaticText(panel,wxID_ANY,wxT("Tree Ctrl wxGenericComboControl:")), 1,
wxALIGN_CENTER_VERTICAL|wxRIGHT, 4 ); wxALIGN_CENTER_VERTICAL|wxRIGHT, 4 );
colSizer->Add( rowSizer, 0, wxEXPAND|wxALL, 5 ); colSizer->Add( rowSizer, 0, wxEXPAND|wxALL, 5 );
rowSizer = new wxBoxSizer ( wxHORIZONTAL ); rowSizer = new wxBoxSizer ( wxHORIZONTAL );
cc = new wxComboControl(panel,2,wxEmptyString, cc = new wxComboCtrl(panel,2,wxEmptyString,
wxDefaultPosition, wxDefaultSize); wxDefaultPosition, wxDefaultSize);
cc->SetPopupMinWidth(300); cc->SetPopupMinWidth(300);
@@ -888,7 +888,7 @@ MyFrame::MyFrame(const wxString& title)
// //
// Tree Ctrl wxComboControl // Tree Ctrl wxComboCtrl
// //
// Note that we test that wxGenericComboControl works // Note that we test that wxGenericComboControl works
@@ -989,11 +989,11 @@ MyFrame::MyFrame(const wxString& title)
// //
// wxComboControl with totally custom button action (open file dialog) // wxComboCtrl with totally custom button action (open file dialog)
// //
rowSizer = new wxBoxSizer ( wxHORIZONTAL ); rowSizer = new wxBoxSizer ( wxHORIZONTAL );
rowSizer->Add( new wxStaticText(panel,wxID_ANY, 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 );
@@ -1053,12 +1053,12 @@ void MyFrame::OnAbout(wxCommandEvent& WXUNUSED(event))
wxMessageBox(wxString::Format( wxMessageBox(wxString::Format(
_T("Welcome to %s!\n") _T("Welcome to %s!\n")
_T("\n") _T("\n")
_T("This is the wxWidgets wxComboControl sample\n") _T("This is the wxWidgets wxComboCtrl sample\n")
_T("running under %s."), _T("running under %s."),
wxVERSION_STRING, wxVERSION_STRING,
wxGetOsDescription().c_str() wxGetOsDescription().c_str()
), ),
_T("About wxComboControl sample"), _T("About wxComboCtrl sample"),
wxOK | wxICON_INFORMATION, wxOK | wxICON_INFORMATION,
this); this);
} }

View File

@@ -340,9 +340,9 @@
#define wxUSE_MINIFRAME 0 #define wxUSE_MINIFRAME 0
#define wxUSE_COMBOCONTROL 0 #define wxUSE_COMBOCTRL 0
#define wxUSE_OWNERDRAWNCOMBOBOX 0 #define wxUSE_ODCOMBOBOX 0
#define wxUSE_ACCEL 0 #define wxUSE_ACCEL 0

View File

@@ -1,6 +1,6 @@
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// Name: combocmn.cpp // Name: combocmn.cpp
// Purpose: wxComboControlBase // Purpose: wxComboCtrlBase
// Author: Jaakko Salli // Author: Jaakko Salli
// Modified by: // Modified by:
// Created: Apr-30-2006 // Created: Apr-30-2006
@@ -23,7 +23,7 @@
#pragma hdrstop #pragma hdrstop
#endif #endif
#if wxUSE_COMBOCONTROL #if wxUSE_COMBOCTRL
#ifndef WX_PRECOMP #ifndef WX_PRECOMP
#include "wx/defs.h" #include "wx/defs.h"
@@ -139,7 +139,7 @@
class wxComboFrameEventHandler : public wxEvtHandler class wxComboFrameEventHandler : public wxEvtHandler
{ {
public: public:
wxComboFrameEventHandler( wxComboControlBase* pCb ); wxComboFrameEventHandler( wxComboCtrlBase* pCb );
~wxComboFrameEventHandler(); ~wxComboFrameEventHandler();
void OnPopup(); void OnPopup();
@@ -154,7 +154,7 @@ public:
protected: protected:
wxWindow* m_focusStart; wxWindow* m_focusStart;
wxComboControlBase* m_combo; wxComboCtrlBase* m_combo;
private: private:
DECLARE_EVENT_TABLE() DECLARE_EVENT_TABLE()
@@ -172,7 +172,7 @@ BEGIN_EVENT_TABLE(wxComboFrameEventHandler, wxEvtHandler)
EVT_CLOSE(wxComboFrameEventHandler::OnClose) EVT_CLOSE(wxComboFrameEventHandler::OnClose)
END_EVENT_TABLE() END_EVENT_TABLE()
wxComboFrameEventHandler::wxComboFrameEventHandler( wxComboControlBase* combo ) wxComboFrameEventHandler::wxComboFrameEventHandler( wxComboCtrlBase* combo )
: wxEvtHandler() : wxEvtHandler()
{ {
m_combo = combo; m_combo = combo;
@@ -250,14 +250,14 @@ void wxComboFrameEventHandler::OnMove( wxMoveEvent& event )
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// wxComboPopupWindow is wxPopupWindow customized for // wxComboPopupWindow is wxPopupWindow customized for
// wxComboControl. // wxComboCtrl.
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
class wxComboPopupWindow : public wxComboPopupWindowBase class wxComboPopupWindow : public wxComboPopupWindowBase
{ {
public: public:
wxComboPopupWindow( wxComboControlBase *parent, int style = wxBORDER_NONE ); wxComboPopupWindow( wxComboCtrlBase *parent, int style = wxBORDER_NONE );
#if USE_TRANSIENT_POPUP #if USE_TRANSIENT_POPUP
virtual bool ProcessLeftDown(wxMouseEvent& event); virtual bool ProcessLeftDown(wxMouseEvent& event);
@@ -291,7 +291,7 @@ BEGIN_EVENT_TABLE(wxComboPopupWindow, wxComboPopupWindowBase)
END_EVENT_TABLE() END_EVENT_TABLE()
wxComboPopupWindow::wxComboPopupWindow( wxComboControlBase *parent, wxComboPopupWindow::wxComboPopupWindow( wxComboCtrlBase *parent,
int style ) int style )
#if wxUSE_POPUPWIN #if wxUSE_POPUPWIN
: wxComboPopupWindowBase(parent,style) : wxComboPopupWindowBase(parent,style)
@@ -327,9 +327,9 @@ void wxComboPopupWindow::OnActivate( wxActivateEvent& event )
if ( !event.GetActive() ) if ( !event.GetActive() )
{ {
// Tell combo control that we are dismissed. // Tell combo control that we are dismissed.
wxComboControl* combo = (wxComboControl*) GetParent(); wxComboCtrl* combo = (wxComboCtrl*) GetParent();
wxASSERT( combo ); wxASSERT( combo );
wxASSERT( combo->IsKindOf(CLASSINFO(wxComboControl)) ); wxASSERT( combo->IsKindOf(CLASSINFO(wxComboCtrl)) );
combo->HidePopup(); combo->HidePopup();
@@ -349,9 +349,9 @@ bool wxComboPopupWindow::ProcessLeftDown(wxMouseEvent& event )
// First thing that happens when a transient popup closes is that this method gets called. // First thing that happens when a transient popup closes is that this method gets called.
void wxComboPopupWindow::OnDismiss() void wxComboPopupWindow::OnDismiss()
{ {
wxComboControlBase* combo = (wxComboControlBase*) GetParent(); wxComboCtrlBase* combo = (wxComboCtrlBase*) GetParent();
wxASSERT_MSG( combo->IsKindOf(CLASSINFO(wxComboControlBase)), wxASSERT_MSG( combo->IsKindOf(CLASSINFO(wxComboCtrlBase)),
wxT("parent might not be wxComboControl, but check IMPLEMENT_DYNAMIC_CLASS(2) macro for correctness") ); wxT("parent might not be wxComboCtrl, but check IMPLEMENT_DYNAMIC_CLASS(2) macro for correctness") );
combo->OnPopupDismiss(); combo->OnPopupDismiss();
} }
@@ -381,7 +381,7 @@ wxSize wxComboPopup::GetAdjustedSize( int minWidth,
return wxSize(minWidth,prefHeight); return wxSize(minWidth,prefHeight);
} }
void wxComboPopup::DefaultPaintComboControl( wxComboControlBase* combo, void wxComboPopup::DefaultPaintComboControl( wxComboCtrlBase* combo,
wxDC& dc, const wxRect& rect ) wxDC& dc, const wxRect& rect )
{ {
if ( combo->GetWindowStyle() & wxCB_READONLY ) // ie. no textctrl if ( combo->GetWindowStyle() & wxCB_READONLY ) // ie. no textctrl
@@ -434,7 +434,7 @@ class wxComboBoxExtraInputHandler : public wxEvtHandler
{ {
public: public:
wxComboBoxExtraInputHandler( wxComboControlBase* combo ) wxComboBoxExtraInputHandler( wxComboCtrlBase* combo )
: wxEvtHandler() : wxEvtHandler()
{ {
m_combo = combo; m_combo = combo;
@@ -444,7 +444,7 @@ public:
void OnFocus(wxFocusEvent& event); void OnFocus(wxFocusEvent& event);
protected: protected:
wxComboControlBase* m_combo; wxComboCtrlBase* m_combo;
private: private:
DECLARE_EVENT_TABLE() DECLARE_EVENT_TABLE()
@@ -547,7 +547,7 @@ class wxComboPopupExtraEventHandler : public wxEvtHandler
{ {
public: public:
wxComboPopupExtraEventHandler( wxComboControlBase* combo ) wxComboPopupExtraEventHandler( wxComboCtrlBase* combo )
: wxEvtHandler() : wxEvtHandler()
{ {
m_combo = combo; m_combo = combo;
@@ -557,14 +557,14 @@ public:
void OnMouseEvent( wxMouseEvent& event ); void OnMouseEvent( wxMouseEvent& event );
// Called from wxComboControlBase::OnPopupDismiss // Called from wxComboCtrlBase::OnPopupDismiss
void OnPopupDismiss() void OnPopupDismiss()
{ {
m_beenInside = false; m_beenInside = false;
} }
protected: protected:
wxComboControlBase* m_combo; wxComboCtrlBase* m_combo;
bool m_beenInside; bool m_beenInside;
@@ -635,27 +635,27 @@ void wxComboPopupExtraEventHandler::OnMouseEvent( wxMouseEvent& event )
} }
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// wxComboControlBase // wxComboCtrlBase
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
BEGIN_EVENT_TABLE(wxComboControlBase, wxControl) BEGIN_EVENT_TABLE(wxComboCtrlBase, wxControl)
EVT_TEXT(wxID_ANY,wxComboControlBase::OnTextCtrlEvent) EVT_TEXT(wxID_ANY,wxComboCtrlBase::OnTextCtrlEvent)
EVT_SIZE(wxComboControlBase::OnSizeEvent) EVT_SIZE(wxComboCtrlBase::OnSizeEvent)
EVT_SET_FOCUS(wxComboControlBase::OnFocusEvent) EVT_SET_FOCUS(wxComboCtrlBase::OnFocusEvent)
EVT_KILL_FOCUS(wxComboControlBase::OnFocusEvent) EVT_KILL_FOCUS(wxComboCtrlBase::OnFocusEvent)
//EVT_BUTTON(wxID_ANY,wxComboControlBase::OnButtonClickEvent) //EVT_BUTTON(wxID_ANY,wxComboCtrlBase::OnButtonClickEvent)
EVT_TEXT_ENTER(wxID_ANY,wxComboControlBase::OnTextCtrlEvent) EVT_TEXT_ENTER(wxID_ANY,wxComboCtrlBase::OnTextCtrlEvent)
EVT_SYS_COLOUR_CHANGED(wxComboControlBase::OnSysColourChanged) EVT_SYS_COLOUR_CHANGED(wxComboCtrlBase::OnSysColourChanged)
END_EVENT_TABLE() END_EVENT_TABLE()
IMPLEMENT_ABSTRACT_CLASS(wxComboControlBase, wxControl) IMPLEMENT_ABSTRACT_CLASS(wxComboCtrlBase, wxControl)
// Have global double buffer - should be enough for multiple combos // Have global double buffer - should be enough for multiple combos
static wxBitmap* gs_doubleBuffer = (wxBitmap*) NULL; static wxBitmap* gs_doubleBuffer = (wxBitmap*) NULL;
void wxComboControlBase::Init() void wxComboCtrlBase::Init()
{ {
m_winPopup = (wxWindow *)NULL; m_winPopup = (wxWindow *)NULL;
m_popup = (wxWindow *)NULL; m_popup = (wxWindow *)NULL;
@@ -693,7 +693,7 @@ void wxComboControlBase::Init()
m_timeCanAcceptClick = 0; m_timeCanAcceptClick = 0;
} }
bool wxComboControlBase::Create(wxWindow *parent, bool wxComboCtrlBase::Create(wxWindow *parent,
wxWindowID id, wxWindowID id,
const wxString& value, const wxString& value,
const wxPoint& pos, const wxPoint& pos,
@@ -720,7 +720,7 @@ bool wxComboControlBase::Create(wxWindow *parent,
return true; return true;
} }
void wxComboControlBase::InstallInputHandlers( bool alsoTextCtrl ) void wxComboCtrlBase::InstallInputHandlers( bool alsoTextCtrl )
{ {
if ( m_text && alsoTextCtrl ) if ( m_text && alsoTextCtrl )
{ {
@@ -733,7 +733,7 @@ void wxComboControlBase::InstallInputHandlers( bool 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) )
{ {
@@ -757,12 +757,12 @@ void wxComboControlBase::CreateTextCtrl( int extraStyle, const wxValidator& vali
} }
} }
void wxComboControlBase::OnThemeChange() void wxComboCtrlBase::OnThemeChange()
{ {
SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOW)); SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOW));
} }
wxComboControlBase::~wxComboControlBase() wxComboCtrlBase::~wxComboCtrlBase()
{ {
if ( HasCapture() ) if ( HasCapture() )
ReleaseMouse(); ReleaseMouse();
@@ -800,7 +800,7 @@ wxComboControlBase::~wxComboControlBase()
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// Recalculates button and textctrl areas // Recalculates button and textctrl areas
void wxComboControlBase::CalculateAreas( int btnWidth ) void wxComboCtrlBase::CalculateAreas( int btnWidth )
{ {
wxSize sz = GetClientSize(); wxSize sz = GetClientSize();
int customBorder = m_widthCustomBorder; int customBorder = m_widthCustomBorder;
@@ -910,7 +910,7 @@ void wxComboControlBase::CalculateAreas( int btnWidth )
*/ */
} }
void wxComboControlBase::PositionTextCtrl( int textCtrlXAdjust, int textCtrlYAdjust ) void wxComboCtrlBase::PositionTextCtrl( int textCtrlXAdjust, int textCtrlYAdjust )
{ {
if ( !m_text ) if ( !m_text )
return; return;
@@ -952,7 +952,7 @@ void wxComboControlBase::PositionTextCtrl( int textCtrlXAdjust, int textCtrlYAdj
} }
} }
wxSize wxComboControlBase::DoGetBestSize() const wxSize wxComboCtrlBase::DoGetBestSize() const
{ {
wxSize sizeText(150,0); wxSize sizeText(150,0);
@@ -999,7 +999,7 @@ wxSize wxComboControlBase::DoGetBestSize() const
return ret; return ret;
} }
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 // SetSize is called last in create, so it marks the end of creation
m_iFlags |= wxCC_IFLAG_CREATED; m_iFlags |= wxCC_IFLAG_CREATED;
@@ -1007,12 +1007,12 @@ void wxComboControlBase::DoMoveWindow(int x, int y, int width, int height)
wxControl::DoMoveWindow(x, y, width, height); wxControl::DoMoveWindow(x, y, width, height);
} }
void wxComboControlBase::OnSizeEvent( wxSizeEvent& event ) void wxComboCtrlBase::OnSizeEvent( wxSizeEvent& event )
{ {
if ( !IsCreated() ) if ( !IsCreated() )
return; return;
// defined by actual wxComboControls // defined by actual wxComboCtrls
OnResize(); OnResize();
event.Skip(); event.Skip();
@@ -1022,7 +1022,7 @@ void wxComboControlBase::OnSizeEvent( wxSizeEvent& event )
// standard operations // standard operations
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
bool wxComboControlBase::Enable(bool enable) bool wxComboCtrlBase::Enable(bool enable)
{ {
if ( !wxControl::Enable(enable) ) if ( !wxControl::Enable(enable) )
return false; return false;
@@ -1035,7 +1035,7 @@ bool wxComboControlBase::Enable(bool enable)
return true; return true;
} }
bool wxComboControlBase::Show(bool show) bool wxComboCtrlBase::Show(bool show)
{ {
if ( !wxControl::Show(show) ) if ( !wxControl::Show(show) )
return false; return false;
@@ -1049,7 +1049,7 @@ bool wxComboControlBase::Show(bool show)
return true; return true;
} }
bool wxComboControlBase::SetFont ( const wxFont& font ) bool wxComboCtrlBase::SetFont ( const wxFont& font )
{ {
if ( !wxControl::SetFont(font) ) if ( !wxControl::SetFont(font) )
return false; return false;
@@ -1061,7 +1061,7 @@ bool wxComboControlBase::SetFont ( const wxFont& font )
} }
#if wxUSE_TOOLTIPS #if wxUSE_TOOLTIPS
void wxComboControlBase::DoSetToolTip(wxToolTip *tooltip) void wxComboCtrlBase::DoSetToolTip(wxToolTip *tooltip)
{ {
wxControl::DoSetToolTip(tooltip); wxControl::DoSetToolTip(tooltip);
@@ -1085,7 +1085,7 @@ void wxComboControlBase::DoSetToolTip(wxToolTip *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(); wxSize sz = GetClientSize();
bool isEnabled; bool isEnabled;
@@ -1150,7 +1150,7 @@ void wxComboControlBase::DrawFocusBackground( wxDC& dc, const wxRect& rect, int
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;
@@ -1239,7 +1239,7 @@ void wxComboControlBase::DrawButton( wxDC& dc, const wxRect& rect, bool paintBg
} }
} }
void wxComboControlBase::RecalcAndRefresh() void wxComboCtrlBase::RecalcAndRefresh()
{ {
if ( IsCreated() ) if ( IsCreated() )
{ {
@@ -1249,7 +1249,7 @@ void wxComboControlBase::RecalcAndRefresh()
} }
} }
wxBitmap& wxComboControlBase::GetBufferBitmap( const wxSize& sz ) const wxBitmap& wxComboCtrlBase::GetBufferBitmap( const wxSize& sz ) const
{ {
// If size is larger, recalculate double buffer bitmap // If size is larger, recalculate double buffer bitmap
if ( !gs_doubleBuffer || if ( !gs_doubleBuffer ||
@@ -1266,7 +1266,7 @@ wxBitmap& wxComboControlBase::GetBufferBitmap( const wxSize& sz ) const
// miscellaneous event handlers // miscellaneous event handlers
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
void wxComboControlBase::OnTextCtrlEvent(wxCommandEvent& event) void wxComboCtrlBase::OnTextCtrlEvent(wxCommandEvent& event)
{ {
// Change event id and relay it forward // Change event id and relay it forward
event.SetId(GetId()); event.SetId(GetId());
@@ -1274,7 +1274,7 @@ void wxComboControlBase::OnTextCtrlEvent(wxCommandEvent& event)
} }
// 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 flags )
{ {
int type = event.GetEventType(); int type = event.GetEventType();
@@ -1364,8 +1364,8 @@ bool wxComboControlBase::HandleButtonMouseEvent( wxMouseEvent& event,
// Conversion to double-clicks and some basic filtering // Conversion to double-clicks and some basic filtering
// returns true if event was consumed or filtered // returns true if event was consumed or filtered
//bool wxComboControlBase::PreprocessMouseEvent( wxMouseEvent& event, bool isOnButtonArea ) //bool wxComboCtrlBase::PreprocessMouseEvent( wxMouseEvent& event, bool isOnButtonArea )
bool wxComboControlBase::PreprocessMouseEvent( wxMouseEvent& event, bool wxComboCtrlBase::PreprocessMouseEvent( wxMouseEvent& event,
int flags ) int flags )
{ {
wxLongLong t = ::wxGetLocalTimeMillis(); wxLongLong t = ::wxGetLocalTimeMillis();
@@ -1423,7 +1423,7 @@ bool wxComboControlBase::PreprocessMouseEvent( wxMouseEvent& event,
return false; return false;
} }
void wxComboControlBase::HandleNormalMouseEvent( wxMouseEvent& event ) void wxComboCtrlBase::HandleNormalMouseEvent( wxMouseEvent& event )
{ {
int evtType = event.GetEventType(); int evtType = event.GetEventType();
@@ -1467,7 +1467,7 @@ void wxComboControlBase::HandleNormalMouseEvent( wxMouseEvent& event )
event.Skip(); event.Skip();
} }
void wxComboControlBase::OnFocusEvent( wxFocusEvent& ) void wxComboCtrlBase::OnFocusEvent( wxFocusEvent& )
{ {
// First click is the first part of double-click // First click is the first part of double-click
// Some platforms don't generate down-less mouse up-event // Some platforms don't generate down-less mouse up-event
@@ -1486,7 +1486,7 @@ void wxComboControlBase::OnFocusEvent( wxFocusEvent& )
Refresh(); Refresh();
} }
void wxComboControlBase::OnSysColourChanged(wxSysColourChangedEvent& WXUNUSED(event)) void wxComboCtrlBase::OnSysColourChanged(wxSysColourChangedEvent& WXUNUSED(event))
{ {
OnThemeChange(); OnThemeChange();
// indentation may also have changed // indentation may also have changed
@@ -1500,7 +1500,7 @@ void wxComboControlBase::OnSysColourChanged(wxSysColourChangedEvent& WXUNUSED(ev
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// Create popup window and the child control // Create popup window and the child control
void wxComboControlBase::CreatePopup() void wxComboCtrlBase::CreatePopup()
{ {
wxComboPopup* popupInterface = m_popupInterface; wxComboPopup* popupInterface = m_popupInterface;
wxWindow* popup; wxWindow* popup;
@@ -1522,9 +1522,9 @@ void wxComboControlBase::CreatePopup()
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_popupInterface;
delete m_winPopup; delete m_winPopup;
@@ -1552,20 +1552,20 @@ void wxComboControlBase::SetPopupControl( wxComboPopup* iface )
} }
// Ensures there is atleast the default popup // Ensures there is atleast the default popup
void wxComboControlBase::EnsurePopupControl() void wxComboCtrlBase::EnsurePopupControl()
{ {
if ( !m_popupInterface ) if ( !m_popupInterface )
SetPopupControl(NULL); SetPopupControl(NULL);
} }
void wxComboControlBase::OnButtonClick() void wxComboCtrlBase::OnButtonClick()
{ {
// Derived classes can override this method for totally custom // Derived classes can override this method for totally custom
// popup action // popup action
ShowPopup(); ShowPopup();
} }
void wxComboControlBase::ShowPopup() void wxComboCtrlBase::ShowPopup()
{ {
EnsurePopupControl(); EnsurePopupControl();
wxCHECK_RET( !IsPopupShown(), wxT("popup window already shown") ); wxCHECK_RET( !IsPopupShown(), wxT("popup window already shown") );
@@ -1708,7 +1708,7 @@ void wxComboControlBase::ShowPopup()
} }
void wxComboControlBase::OnPopupDismiss() void wxComboCtrlBase::OnPopupDismiss()
{ {
// Just in case, avoid double dismiss // Just in case, avoid double dismiss
if ( !m_isPopupShown ) if ( !m_isPopupShown )
@@ -1758,7 +1758,7 @@ void wxComboControlBase::OnPopupDismiss()
} }
void wxComboControlBase::HidePopup() void wxComboCtrlBase::HidePopup()
{ {
// Should be able to call this without popup interface // Should be able to call this without popup interface
//wxCHECK_RET( m_popupInterface, _T("no popup interface") ); //wxCHECK_RET( m_popupInterface, _T("no popup interface") );
@@ -1781,7 +1781,7 @@ void wxComboControlBase::HidePopup()
// customization methods // customization methods
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
void wxComboControlBase::SetButtonPosition( int width, int height, void wxComboCtrlBase::SetButtonPosition( int width, int height,
int side, int spacingX ) int side, int spacingX )
{ {
m_btnWid = width; m_btnWid = width;
@@ -1792,7 +1792,7 @@ void wxComboControlBase::SetButtonPosition( int width, int height,
RecalcAndRefresh(); RecalcAndRefresh();
} }
void wxComboControlBase::SetButtonBitmaps( const wxBitmap& bmpNormal, void wxComboCtrlBase::SetButtonBitmaps( const wxBitmap& bmpNormal,
bool blankButtonBg, bool blankButtonBg,
const wxBitmap& bmpPressed, const wxBitmap& bmpPressed,
const wxBitmap& bmpHover, const wxBitmap& bmpHover,
@@ -1819,7 +1819,7 @@ void wxComboControlBase::SetButtonBitmaps( const wxBitmap& bmpNormal,
RecalcAndRefresh(); RecalcAndRefresh();
} }
void wxComboControlBase::SetCustomPaintWidth( int width ) void wxComboCtrlBase::SetCustomPaintWidth( int width )
{ {
if ( m_text ) if ( m_text )
{ {
@@ -1836,7 +1836,7 @@ void wxComboControlBase::SetCustomPaintWidth( int width )
RecalcAndRefresh(); RecalcAndRefresh();
} }
void wxComboControlBase::SetTextIndent( int indent ) void wxComboCtrlBase::SetTextIndent( int indent )
{ {
if ( indent < 0 ) if ( indent < 0 )
{ {
@@ -1852,7 +1852,7 @@ void wxComboControlBase::SetTextIndent( int indent )
RecalcAndRefresh(); RecalcAndRefresh();
} }
wxCoord wxComboControlBase::GetNativeTextIndent() const wxCoord wxComboCtrlBase::GetNativeTextIndent() const
{ {
return DEFAULT_TEXT_INDENT; return DEFAULT_TEXT_INDENT;
} }
@@ -1861,14 +1861,14 @@ wxCoord wxComboControlBase::GetNativeTextIndent() const
// methods forwarded to wxTextCtrl // methods forwarded to wxTextCtrl
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
wxString wxComboControlBase::GetValue() const wxString wxComboCtrlBase::GetValue() const
{ {
if ( m_text ) if ( m_text )
return m_text->GetValue(); return m_text->GetValue();
return m_valueString; return m_valueString;
} }
void wxComboControlBase::SetValue(const wxString& value) void wxComboCtrlBase::SetValue(const wxString& value)
{ {
if ( m_text ) if ( m_text )
{ {
@@ -1890,7 +1890,7 @@ void wxComboControlBase::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 // Unlike in SetValue(), this must be called here or
// the behaviour will no be consistent in readonlys. // the behaviour will no be consistent in readonlys.
@@ -1901,37 +1901,37 @@ void wxComboControlBase::SetText(const wxString& value)
Refresh(); Refresh();
} }
void wxComboControlBase::Copy() void wxComboCtrlBase::Copy()
{ {
if ( m_text ) if ( m_text )
m_text->Copy(); m_text->Copy();
} }
void wxComboControlBase::Cut() void wxComboCtrlBase::Cut()
{ {
if ( m_text ) if ( m_text )
m_text->Cut(); m_text->Cut();
} }
void wxComboControlBase::Paste() void wxComboCtrlBase::Paste()
{ {
if ( m_text ) if ( m_text )
m_text->Paste(); m_text->Paste();
} }
void wxComboControlBase::SetInsertionPoint(long pos) void wxComboCtrlBase::SetInsertionPoint(long pos)
{ {
if ( m_text ) if ( m_text )
m_text->SetInsertionPoint(pos); m_text->SetInsertionPoint(pos);
} }
void wxComboControlBase::SetInsertionPointEnd() void wxComboCtrlBase::SetInsertionPointEnd()
{ {
if ( m_text ) if ( m_text )
m_text->SetInsertionPointEnd(); m_text->SetInsertionPointEnd();
} }
long wxComboControlBase::GetInsertionPoint() const long wxComboCtrlBase::GetInsertionPoint() const
{ {
if ( m_text ) if ( m_text )
return m_text->GetInsertionPoint(); return m_text->GetInsertionPoint();
@@ -1939,7 +1939,7 @@ long wxComboControlBase::GetInsertionPoint() const
return 0; return 0;
} }
long wxComboControlBase::GetLastPosition() const long wxComboCtrlBase::GetLastPosition() const
{ {
if ( m_text ) if ( m_text )
return m_text->GetLastPosition(); return m_text->GetLastPosition();
@@ -1947,28 +1947,28 @@ long wxComboControlBase::GetLastPosition() const
return 0; return 0;
} }
void wxComboControlBase::Replace(long from, long to, const wxString& value) void wxComboCtrlBase::Replace(long from, long to, const wxString& value)
{ {
if ( m_text ) if ( m_text )
m_text->Replace(from, to, value); m_text->Replace(from, to, value);
} }
void wxComboControlBase::Remove(long from, long to) void wxComboCtrlBase::Remove(long from, long to)
{ {
if ( m_text ) if ( m_text )
m_text->Remove(from, to); m_text->Remove(from, to);
} }
void wxComboControlBase::SetSelection(long from, long to) void wxComboCtrlBase::SetSelection(long from, long to)
{ {
if ( m_text ) if ( m_text )
m_text->SetSelection(from, to); m_text->SetSelection(from, to);
} }
void wxComboControlBase::Undo() void wxComboCtrlBase::Undo()
{ {
if ( m_text ) if ( m_text )
m_text->Undo(); m_text->Undo();
} }
#endif // wxUSE_COMBOCONTROL #endif // wxUSE_COMBOCTRL

View File

@@ -29,7 +29,7 @@
#include "wx/popupwin.h" #include "wx/popupwin.h"
#ifndef WX_PRECOMP #ifndef WX_PRECOMP
#include "wx/combobox.h" // wxComboControl #include "wx/combobox.h" // wxComboCtrl
#include "wx/app.h" // wxPostEvent #include "wx/app.h" // wxPostEvent
#include "wx/log.h" #include "wx/log.h"
#endif //WX_PRECOMP #endif //WX_PRECOMP
@@ -402,13 +402,13 @@ BEGIN_EVENT_TABLE(wxPopupComboWindow, wxPopupTransientWindow)
EVT_KEY_DOWN(wxPopupComboWindow::OnKeyDown) EVT_KEY_DOWN(wxPopupComboWindow::OnKeyDown)
END_EVENT_TABLE() END_EVENT_TABLE()
wxPopupComboWindow::wxPopupComboWindow(wxComboControl *parent) wxPopupComboWindow::wxPopupComboWindow(wxComboCtrl *parent)
: wxPopupTransientWindow(parent) : wxPopupTransientWindow(parent)
{ {
m_combo = parent; m_combo = parent;
} }
bool wxPopupComboWindow::Create(wxComboControl *parent) bool wxPopupComboWindow::Create(wxComboCtrl *parent)
{ {
m_combo = parent; m_combo = parent;

View File

@@ -1,6 +1,6 @@
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// Name: src/generic/combog.cpp // Name: src/generic/combog.cpp
// Purpose: Generic wxComboControl // Purpose: Generic wxComboCtrl
// Author: Jaakko Salli // Author: Jaakko Salli
// Modified by: // Modified by:
// Created: Apr-30-2006 // Created: Apr-30-2006
@@ -23,7 +23,7 @@
#pragma hdrstop #pragma hdrstop
#endif #endif
#if wxUSE_COMBOCONTROL #if wxUSE_COMBOCTRL
#include "wx/combo.h" #include "wx/combo.h"
@@ -89,13 +89,13 @@
// wxGenericComboControl // wxGenericComboControl
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
BEGIN_EVENT_TABLE(wxGenericComboControl, wxComboControlBase) BEGIN_EVENT_TABLE(wxGenericComboControl, wxComboCtrlBase)
EVT_PAINT(wxGenericComboControl::OnPaintEvent) EVT_PAINT(wxGenericComboControl::OnPaintEvent)
EVT_MOUSE_EVENTS(wxGenericComboControl::OnMouseEvent) EVT_MOUSE_EVENTS(wxGenericComboControl::OnMouseEvent)
END_EVENT_TABLE() END_EVENT_TABLE()
IMPLEMENT_DYNAMIC_CLASS(wxGenericComboControl, wxComboControlBase) IMPLEMENT_DYNAMIC_CLASS(wxGenericComboControl, wxComboCtrlBase)
void wxGenericComboControl::Init() void wxGenericComboControl::Init()
{ {
@@ -147,7 +147,7 @@ bool wxGenericComboControl::Create(wxWindow *parent,
m_iFlags |= wxCC_POPUP_ON_MOUSE_UP; m_iFlags |= wxCC_POPUP_ON_MOUSE_UP;
// create main window // create main window
if ( !wxComboControlBase::Create(parent, if ( !wxComboCtrlBase::Create(parent,
id, id,
value, value,
wxDefaultPosition, wxDefaultPosition,
@@ -362,12 +362,12 @@ bool wxGenericComboControl::PerformAction(const wxControlAction& action,
#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. // front-end so that wxRTTI works as expected.
#ifndef _WX_COMBOCONTROL_H_ #ifndef _WX_COMBOCONTROL_H_
IMPLEMENT_DYNAMIC_CLASS(wxComboControl, wxGenericComboControl) IMPLEMENT_DYNAMIC_CLASS(wxComboCtrl, wxGenericComboControl)
#endif #endif
#endif // !wxCOMBOCONTROL_FULLY_FEATURED #endif // !wxCOMBOCONTROL_FULLY_FEATURED
#endif // wxUSE_COMBOCONTROL #endif // wxUSE_COMBOCTRL

View File

@@ -23,7 +23,7 @@
#pragma hdrstop #pragma hdrstop
#endif #endif
#if wxUSE_OWNERDRAWNCOMBOBOX #if wxUSE_ODCOMBOBOX
#include "wx/odcombo.h" #include "wx/odcombo.h"
@@ -557,11 +557,11 @@ void wxVListBoxComboPopup::Populate( const wxArrayString& choices )
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
BEGIN_EVENT_TABLE(wxOwnerDrawnComboBox, wxComboControl) BEGIN_EVENT_TABLE(wxOwnerDrawnComboBox, wxComboCtrl)
END_EVENT_TABLE() END_EVENT_TABLE()
IMPLEMENT_DYNAMIC_CLASS2(wxOwnerDrawnComboBox, wxComboControl, wxControlWithItems) IMPLEMENT_DYNAMIC_CLASS2(wxOwnerDrawnComboBox, wxComboCtrl, wxControlWithItems)
void wxOwnerDrawnComboBox::Init() void wxOwnerDrawnComboBox::Init()
{ {
@@ -577,7 +577,7 @@ bool wxOwnerDrawnComboBox::Create(wxWindow *parent,
const wxValidator& validator, const wxValidator& validator,
const wxString& name) 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,
@@ -589,7 +589,7 @@ wxOwnerDrawnComboBox::wxOwnerDrawnComboBox(wxWindow *parent,
long style, long style,
const wxValidator& validator, const wxValidator& validator,
const wxString& name) const wxString& name)
: wxComboControl() : wxComboCtrl()
{ {
Init(); Init();
@@ -653,7 +653,7 @@ void wxOwnerDrawnComboBox::SetPopupControl( wxComboPopup* popup )
popup = new wxVListBoxComboPopup(); popup = new wxVListBoxComboPopup();
} }
wxComboControl::SetPopupControl(popup); wxComboCtrl::SetPopupControl(popup);
wxASSERT(popup); wxASSERT(popup);
m_popupInterface = (wxVListBoxComboPopup*) popup; m_popupInterface = (wxVListBoxComboPopup*) popup;
@@ -780,4 +780,4 @@ wxClientData* wxOwnerDrawnComboBox::DoGetItemClientObject(unsigned int n) const
return (wxClientData*) DoGetItemClientData(n); return (wxClientData*) DoGetItemClientData(n);
} }
#endif // wxUSE_OWNERDRAWNCOMBOBOX #endif // wxUSE_ODCOMBOBOX

View File

@@ -1,6 +1,6 @@
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// Name: combo.cpp // Name: combo.cpp
// Purpose: wxMSW wxComboControl // Purpose: wxMSW wxComboCtrl
// Author: Jaakko Salli // Author: Jaakko Salli
// Modified by: // Modified by:
// Created: Apr-30-2006 // Created: Apr-30-2006
@@ -23,7 +23,7 @@
#pragma hdrstop #pragma hdrstop
#endif #endif
#if wxUSE_COMBOCONTROL #if wxUSE_COMBOCTRL
#ifndef WX_PRECOMP #ifndef WX_PRECOMP
#include "wx/log.h" #include "wx/log.h"
@@ -76,19 +76,19 @@
// ============================================================================ // ============================================================================
BEGIN_EVENT_TABLE(wxComboControl, wxComboControlBase) BEGIN_EVENT_TABLE(wxComboCtrl, wxComboCtrlBase)
EVT_PAINT(wxComboControl::OnPaintEvent) EVT_PAINT(wxComboCtrl::OnPaintEvent)
EVT_MOUSE_EVENTS(wxComboControl::OnMouseEvent) EVT_MOUSE_EVENTS(wxComboCtrl::OnMouseEvent)
END_EVENT_TABLE() END_EVENT_TABLE()
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, wxWindowID id,
const wxString& value, const wxString& value,
const wxPoint& pos, const wxPoint& pos,
@@ -118,7 +118,7 @@ bool wxComboControl::Create(wxWindow *parent,
} }
// create main window // create main window
if ( !wxComboControlBase::Create(parent, if ( !wxComboCtrlBase::Create(parent,
id, id,
value, value,
wxDefaultPosition, wxDefaultPosition,
@@ -146,11 +146,11 @@ bool wxComboControl::Create(wxWindow *parent,
return true; return true;
} }
wxComboControl::~wxComboControl() wxComboCtrl::~wxComboCtrl()
{ {
} }
void wxComboControl::OnThemeChange() void wxComboCtrl::OnThemeChange()
{ {
wxUxThemeEngine* theme = wxUxThemeEngine::GetIfActive(); wxUxThemeEngine* theme = wxUxThemeEngine::GetIfActive();
if ( theme ) if ( theme )
@@ -170,7 +170,7 @@ void wxComboControl::OnThemeChange()
} }
} }
void wxComboControl::OnResize() void wxComboCtrl::OnResize()
{ {
// //
// Recalculates button and textctrl areas // Recalculates button and textctrl areas
@@ -239,7 +239,7 @@ static void wxMSWDrawFocusRect( wxDC& dc, const wxRect& rect )
} }
// 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; wxUxThemeEngine* theme = (wxUxThemeEngine*) NULL;
wxUxThemeHandle hTheme(this, L"COMBOBOX"); wxUxThemeHandle hTheme(this, L"COMBOBOX");
@@ -369,7 +369,7 @@ void wxComboControl::DrawFocusBackground( wxDC& dc, const wxRect& rect, int flag
} }
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
@@ -473,7 +473,7 @@ void wxComboControl::OnPaintEvent( wxPaintEvent& WXUNUSED(event) )
} }
} }
void wxComboControl::OnMouseEvent( wxMouseEvent& event ) void wxComboCtrl::OnMouseEvent( wxMouseEvent& event )
{ {
bool isOnButtonArea = m_btnArea.Inside(event.m_x,event.m_y); bool isOnButtonArea = m_btnArea.Inside(event.m_x,event.m_y);
int handlerFlags = isOnButtonArea ? wxCC_MF_ON_BUTTON : 0; int handlerFlags = isOnButtonArea ? wxCC_MF_ON_BUTTON : 0;
@@ -513,7 +513,7 @@ void wxComboControl::OnMouseEvent( wxMouseEvent& event )
} }
wxCoord wxComboControl::GetNativeTextIndent() const wxCoord wxComboCtrl::GetNativeTextIndent() const
{ {
if ( wxUxThemeEngine::GetIfActive() ) if ( wxUxThemeEngine::GetIfActive() )
return NATIVE_TEXT_INDENT_XP; return NATIVE_TEXT_INDENT_XP;
@@ -521,4 +521,4 @@ wxCoord wxComboControl::GetNativeTextIndent() const
} }
#endif // wxUSE_COMBOCONTROL #endif // wxUSE_COMBOCTRL

View File

@@ -90,7 +90,7 @@ BEGIN_EVENT_TABLE(wxComboListBox, wxListBox)
EVT_LEFT_UP(wxComboListBox::OnLeftUp) EVT_LEFT_UP(wxComboListBox::OnLeftUp)
END_EVENT_TABLE() END_EVENT_TABLE()
IMPLEMENT_DYNAMIC_CLASS2(wxComboBox, wxControl, wxComboControl) IMPLEMENT_DYNAMIC_CLASS2(wxComboBox, wxControl, wxComboCtrl)
// ============================================================================ // ============================================================================
// implementation // implementation
@@ -149,7 +149,7 @@ bool wxComboListBox::PerformAction(const wxControlAction& action,
{ {
// we don't let the listbox handle this as instead of just using the // 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 // 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
return true; return true;
} }
@@ -232,7 +232,7 @@ bool wxComboBox::Create(wxWindow *parent,
const wxValidator& validator, const wxValidator& validator,
const wxString& name) const wxString& name)
{ {
if ( !wxComboControl::Create(parent, id, value, pos, size, style, if ( !wxComboCtrl::Create(parent, id, value, pos, size, style,
validator, name) ) validator, name) )
{ {
return false; return false;
@@ -257,12 +257,12 @@ wxComboBox::~wxComboBox()
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()