--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-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
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_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_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_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
enablestring=
- 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
no_cache=0
- # 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
- ac_cv_use_combocontrol='wxUSE_COMBOCONTROL=yes'
+ ac_cv_use_comboctrl='wxUSE_COMBOCTRL=yes'
else
- ac_cv_use_combocontrol='wxUSE_COMBOCONTROL=no'
+ ac_cv_use_comboctrl='wxUSE_COMBOCTRL=no'
fi
else
- 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
- ac_cv_use_combocontrol='wxUSE_COMBOCONTROL='$DEFAULT_wxUSE_COMBOCONTROL
+ ac_cv_use_comboctrl='wxUSE_COMBOCTRL='$DEFAULT_wxUSE_COMBOCTRL
fi;
- eval "$ac_cv_use_combocontrol"
+ eval "$ac_cv_use_comboctrl"
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
- 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
enablestring=
- 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
no_cache=0
- # 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
- ac_cv_use_odcombo='wxUSE_OWNERDRAWNCOMBOBOX=yes'
+ ac_cv_use_odcombobox='wxUSE_ODCOMBOBOX=yes'
else
- ac_cv_use_odcombo='wxUSE_OWNERDRAWNCOMBOBOX=no'
+ ac_cv_use_odcombobox='wxUSE_ODCOMBOBOX=no'
fi
else
- 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
- ac_cv_use_odcombo='wxUSE_OWNERDRAWNCOMBOBOX='$DEFAULT_wxUSE_OWNERDRAWNCOMBOBOX
+ ac_cv_use_odcombobox='wxUSE_ODCOMBOBOX='$DEFAULT_wxUSE_ODCOMBOBOX
fi;
- eval "$ac_cv_use_odcombo"
+ eval "$ac_cv_use_odcombobox"
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
- 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
USES_CONTROLS=1
fi
-if test "$wxUSE_COMBOCONTROL" = "yes"; then
+if test "$wxUSE_COMBOCTRL" = "yes"; then
cat >>confdefs.h <<\_ACEOF
-#define wxUSE_COMBOCONTROL 1
+#define wxUSE_COMBOCTRL 1
_ACEOF
USES_CONTROLS=1
SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS notebook"
fi
-if test "$wxUSE_OWNERDRAWNCOMBOBOX" = "yes"; then
+if test "$wxUSE_ODCOMBOBOX" = "yes"; then
cat >>confdefs.h <<\_ACEOF
-#define wxUSE_OWNERDRAWNCOMBOBOX 1
+#define wxUSE_ODCOMBOBOX 1
_ACEOF
USES_CONTROLS=1
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_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_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_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
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(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)
USES_CONTROLS=1
fi
-if test "$wxUSE_COMBOCONTROL" = "yes"; then
- AC_DEFINE(wxUSE_COMBOCONTROL)
+if test "$wxUSE_COMBOCTRL" = "yes"; then
+ AC_DEFINE(wxUSE_COMBOCTRL)
USES_CONTROLS=1
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
All (GUI):
-- 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()
# endif
#endif /* !defined(wxUSE_COMBOBOX) */
-#ifndef wxUSE_COMBOCONTROL
+#ifndef wxUSE_COMBOCTRL
# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_COMBOCONTROL must be defined."
+# error "wxUSE_COMBOCTRL must be defined."
# else
-# define wxUSE_COMBOCONTROL 0
+# define wxUSE_COMBOCTRL 0
# endif
-#endif /* !defined(wxUSE_COMBOCONTROL) */
+#endif /* !defined(wxUSE_COMBOCTRL) */
#ifndef wxUSE_DATAOBJ
# ifdef wxABORT_ON_CONFIG_ERROR
# endif
#endif /* !defined(wxUSE_NOTEBOOK) */
-#ifndef wxUSE_OWNERDRAWNCOMBOBOX
+#ifndef wxUSE_ODCOMBOBOX
# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_OWNERDRAWNCOMBOBOX must be defined."
+# error "wxUSE_ODCOMBOBOX must be defined."
# else
-# define wxUSE_OWNERDRAWNCOMBOBOX 0
+# define wxUSE_ODCOMBOBOX 0
# endif
-#endif /* !defined(wxUSE_OWNERDRAWNCOMBOBOX) */
+#endif /* !defined(wxUSE_ODCOMBOBOX) */
#ifndef wxUSE_PALETTE
# ifdef wxABORT_ON_CONFIG_ERROR
///////////////////////////////////////////////////////////////////////////////
// Name: wx/combo.h
-// Purpose: wxComboControl declaration
+// Purpose: wxComboCtrl declaration
// Author: Jaakko Salli
// Modified by:
// Created: Apr-30-2006
/*
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
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
- 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.
#include "wx/defs.h"
-#if wxUSE_COMBOCONTROL
+#if wxUSE_COMBOCTRL
#include "wx/textctrl.h"
class WXDLLEXPORT wxComboPopup;
//
-// New window styles for wxComboControlBase
+// New window styles for wxComboCtrlBase
//
enum
{
};
-// wxComboControl internal flags
+// wxComboCtrl internal flags
enum
{
// First those that can be passed to Customize.
};
-// Namespace for wxComboControl feature flags
-struct wxComboControlFeatures
+// Namespace for wxComboCtrl feature flags
+struct wxComboCtrlFeatures
{
enum
{
};
-class WXDLLEXPORT wxComboControlBase : public wxControl
+class WXDLLEXPORT wxComboCtrlBase : public wxControl
{
friend class wxComboPopup;
public:
// ctors and such
- wxComboControlBase() : wxControl() { Init(); }
+ wxComboCtrlBase() : wxControl() { Init(); }
bool Create(wxWindow *parent,
wxWindowID id,
const wxValidator& validator,
const wxString& name);
- virtual ~wxComboControlBase();
+ virtual ~wxComboCtrlBase();
// show/hide popup window
virtual void ShowPopup();
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
DECLARE_EVENT_TABLE()
- DECLARE_ABSTRACT_CLASS(wxComboControlBase)
+ DECLARE_ABSTRACT_CLASS(wxComboCtrlBase)
};
// ----------------------------------------------------------------------------
// 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
{
- 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
{
- friend class wxComboControlBase;
+ friend class wxComboCtrlBase;
public:
wxComboPopup()
{
- m_combo = (wxComboControlBase*) NULL;
+ m_combo = (wxComboCtrlBase*) NULL;
m_iFlags = 0;
}
// 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
- // 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.
}
// Default PaintComboControl behaviour
- static void DefaultPaintComboControl( wxComboControlBase* combo,
+ static void DefaultPaintComboControl( wxComboCtrlBase* combo,
wxDC& dc,
const wxRect& rect );
protected:
- wxComboControlBase* m_combo;
+ wxComboCtrlBase* m_combo;
wxUint32 m_iFlags;
private:
- // Called in wxComboControlBase::SetPopupControl
- void InitBase(wxComboControlBase *combo)
+ // Called in wxComboCtrlBase::SetPopupControl
+ void InitBase(wxComboCtrlBase *combo)
{
m_combo = combo;
}
// Any ports may need generic as an alternative
#include "wx/generic/combo.h"
-#endif // wxUSE_COMBOCONTROL
+#endif // wxUSE_COMBOCTRL
#endif
// _WX_COMBOCONTROL_H_BASE_
/////////////////////////////////////////////////////////////////////////////
// Name: wx/generic/combo.h
-// Purpose: Generic wxComboControl
+// Purpose: Generic wxComboCtrl
// Author: Jaakko Salli
// Modified by:
// Created: Apr-30-2006
#ifndef _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
#if !defined(wxCOMBOCONTROL_FULLY_FEATURED)
// ----------------------------------------------------------------------------
-// Generic wxComboControl
+// Generic wxComboCtrl
// ----------------------------------------------------------------------------
#if defined(__WXUNIVERSAL__)
#endif
-class WXDLLEXPORT wxGenericComboControl : public wxComboControlBase
+class WXDLLEXPORT wxGenericComboControl : public wxComboCtrlBase
{
public:
// ctors and such
- wxGenericComboControl() : wxComboControlBase() { Init(); }
+ wxGenericComboControl() : wxComboCtrlBase() { Init(); }
wxGenericComboControl(wxWindow *parent,
wxWindowID id = wxID_ANY,
long style = 0,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxComboBoxNameStr)
- : wxComboControlBase()
+ : wxComboCtrlBase()
{
Init();
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
#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.
-class WXDLLEXPORT wxComboControl : public wxGenericComboControl
+class WXDLLEXPORT wxComboCtrl : public wxGenericComboControl
{
public:
- wxComboControl() : wxGenericComboControl() {}
+ wxComboCtrl() : wxGenericComboControl() {}
- wxComboControl(wxWindow *parent,
+ wxComboCtrl(wxWindow *parent,
wxWindowID id = wxID_ANY,
const wxString& value = wxEmptyString,
const wxPoint& pos = wxDefaultPosition,
(void)Create(parent, id, value, pos, size, style, validator, name);
}
- virtual ~wxComboControl() {}
+ virtual ~wxComboCtrl() {}
protected:
private:
- DECLARE_DYNAMIC_CLASS(wxComboControl)
+ DECLARE_DYNAMIC_CLASS(wxComboCtrl)
};
#endif // _WX_COMBOCONTROL_H_
#else
-#define wxGenericComboControl wxComboControl
+#define wxGenericComboControl wxComboCtrl
#endif // !defined(wxCOMBOCONTROL_FULLY_FEATURED)
-#endif // wxUSE_COMBOCONTROL
+#endif // wxUSE_COMBOCTRL
#endif
// _WX_GENERIC_COMBOCONTROL_H_
// 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
-#define wxUSE_COMBOCONTROL 1
+#define wxUSE_COMBOCTRL 1
// wxOwnerDrawnComboBox is a custom combobox allowing to paint the combobox
// items.
// Default is 1.
//
// Recommended setting: 1 but can be safely set to 0
-#define wxUSE_OWNERDRAWNCOMBOBOX 1
+#define wxUSE_ODCOMBOBOX 1
// ----------------------------------------------------------------------------
// Miscellaneous GUI stuff
// 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
-#define wxUSE_COMBOCONTROL 1
+#define wxUSE_COMBOCTRL 1
// wxOwnerDrawnComboBox is a custom combobox allowing to paint the combobox
// items.
// Default is 1.
//
// Recommended setting: 1 but can be safely set to 0
-#define wxUSE_OWNERDRAWNCOMBOBOX 1
+#define wxUSE_ODCOMBOBOX 1
// ----------------------------------------------------------------------------
// Miscellaneous GUI stuff
/////////////////////////////////////////////////////////////////////////////
// Name: wx/msw/combo.h
-// Purpose: wxComboControl class
+// Purpose: wxComboCtrl class
// 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
-// 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.
-#if wxUSE_COMBOCONTROL
+#if wxUSE_COMBOCTRL
// ----------------------------------------------------------------------------
-// Native wxComboControl
+// Native wxComboCtrl
// ----------------------------------------------------------------------------
// 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
- wxComboControl() : wxComboControlBase() { Init(); }
+ wxComboCtrl() : wxComboCtrlBase() { Init(); }
- wxComboControl(wxWindow *parent,
+ wxComboCtrl(wxWindow *parent,
wxWindowID id = wxID_ANY,
const wxString& value = wxEmptyString,
const wxPoint& pos = wxDefaultPosition,
long style = 0,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxComboBoxNameStr)
- : wxComboControlBase()
+ : wxComboCtrlBase()
{
Init();
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxComboBoxNameStr);
- virtual ~wxComboControl();
+ virtual ~wxComboCtrl();
virtual void DrawFocusBackground( wxDC& dc, const wxRect& rect, int flags );
- static int GetFeatures() { return wxComboControlFeatures::All; }
+ static int GetFeatures() { return wxComboCtrlFeatures::All; }
protected:
DECLARE_EVENT_TABLE()
- DECLARE_DYNAMIC_CLASS(wxComboControl)
+ DECLARE_DYNAMIC_CLASS(wxComboCtrl)
};
-#endif // wxUSE_COMBOCONTROL
+#endif // wxUSE_COMBOCTRL
#endif
// _WX_COMBOCONTROL_H_
// 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
-#define wxUSE_COMBOCONTROL 1
+#define wxUSE_COMBOCTRL 1
// wxOwnerDrawnComboBox is a custom combobox allowing to paint the combobox
// items.
// Default is 1.
//
// Recommended setting: 1 but can be safely set to 0
-#define wxUSE_OWNERDRAWNCOMBOBOX 1
+#define wxUSE_ODCOMBOBOX 1
// ----------------------------------------------------------------------------
// Miscellaneous GUI stuff
// 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
-#define wxUSE_COMBOCONTROL 1
+#define wxUSE_COMBOCTRL 1
// wxOwnerDrawnComboBox is a custom combobox allowing to paint the combobox
// items.
// Default is 1.
//
// Recommended setting: 1 but can be safely set to 0
-#define wxUSE_OWNERDRAWNCOMBOBOX 1
+#define wxUSE_ODCOMBOBOX 1
// ----------------------------------------------------------------------------
// Miscellaneous GUI stuff
#include "wx/defs.h"
-#if wxUSE_OWNERDRAWNCOMBOBOX
+#if wxUSE_ODCOMBOBOX
#include "wx/combo.h"
#include "wx/ctrlsub.h"
//
// 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.
//
// ----------------------------------------------------------------------------
// wxOwnerDrawnComboBox: a generic wxComboBox that allows custom paint items
// 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
{
friend class wxComboPopupWindow;
- friend class wxComboControlBase;
+ friend class wxComboCtrlBase;
public:
// ctors and such
- wxOwnerDrawnComboBox() : wxComboControl() { Init(); }
+ wxOwnerDrawnComboBox() : wxComboCtrl() { Init(); }
wxOwnerDrawnComboBox(wxWindow *parent,
wxWindowID id,
long style = 0,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxComboBoxNameStr)
- : wxComboControl()
+ : wxComboCtrl()
{
Init();
};
-#endif // wxUSE_OWNERDRAWNCOMBOBOX
+#endif // wxUSE_ODCOMBOBOX
#endif
// _WX_ODCOMBO_H_
// 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
-#define wxUSE_COMBOCONTROL 1
+#define wxUSE_COMBOCTRL 1
// wxOwnerDrawnComboBox is a custom combobox allowing to paint the combobox
// items.
// Default is 1.
//
// Recommended setting: 1 but can be safely set to 0
-#define wxUSE_OWNERDRAWNCOMBOBOX 1
+#define wxUSE_ODCOMBOBOX 1
// ----------------------------------------------------------------------------
// Miscellaneous GUI stuff
// 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
-#define wxUSE_COMBOCONTROL 1
+#define wxUSE_COMBOCTRL 1
// wxOwnerDrawnComboBox is a custom combobox allowing to paint the combobox
// items.
// Default is 1.
//
// Recommended setting: 1 but can be safely set to 0
-#define wxUSE_OWNERDRAWNCOMBOBOX 1
+#define wxUSE_ODCOMBOBOX 1
// ----------------------------------------------------------------------------
// Miscellaneous GUI stuff
// ----------------------------------------------------------------------------
class WXDLLEXPORT wxComboBox;
-class WXDLLEXPORT wxComboControl;
+class WXDLLEXPORT wxComboCtrl;
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();
void OnKeyDown(wxKeyEvent& event);
// the parent combobox
- wxComboControl *m_combo;
+ wxComboCtrl *m_combo;
DECLARE_EVENT_TABLE()
DECLARE_DYNAMIC_CLASS(wxPopupComboWindow)
// 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
-#define wxUSE_COMBOCONTROL 1
+#define wxUSE_COMBOCTRL 1
// wxOwnerDrawnComboBox is a custom combobox allowing to paint the combobox
// items.
// Default is 1.
//
// Recommended setting: 1 but can be safely set to 0
-#define wxUSE_OWNERDRAWNCOMBOBOX 1
+#define wxUSE_ODCOMBOBOX 1
// ----------------------------------------------------------------------------
// Miscellaneous GUI stuff
// 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
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,
/////////////////////////////////////////////////////////////////////////////
// Name: combo.cpp
-// Purpose: wxComboControl sample
+// Purpose: wxComboCtrl sample
// Author: Jaakko Salli
// Modified by:
// Created: Apr-30-2006
#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"
void OnQuit(wxCommandEvent& event);
void OnAbout(wxCommandEvent& event);
- // log wxComboControl events
+ // log wxComboCtrl events
void OnComboBoxUpdate( wxCommandEvent& event );
protected:
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)
public:
/*
- ListViewComboPopup(wxComboControlBase* combo)
+ ListViewComboPopup(wxComboCtrlBase* combo)
: wxListView(), wxComboPopup(combo)
{
m_value = -1;
public:
/*
- TreeCtrlComboPopup(wxComboControlBase* combo)
+ TreeCtrlComboPopup(wxComboCtrlBase* 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
{
public:
- wxFileSelectorCombo() : wxComboControl() { Init(); }
+ wxFileSelectorCombo() : wxComboCtrl() { Init(); }
wxFileSelectorCombo(wxWindow *parent,
wxWindowID id = wxID_ANY,
long style = 0,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxComboBoxNameStr)
- : wxComboControl()
+ : wxComboCtrl()
{
Init();
Create(parent,id,value,
// 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);
wxComboBox* cb;
- wxComboControl* cc;
+ wxComboCtrl* cc;
wxGenericComboControl* gcc;
wxOwnerDrawnComboBox* odc;
//
- // List View wxComboControl
+ // List View wxComboCtrl
//
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 );
- cc = new wxComboControl(panel,2,wxEmptyString,
+ cc = new wxComboCtrl(panel,2,wxEmptyString,
wxDefaultPosition, wxDefaultSize);
cc->SetPopupMinWidth(300);
//
- // Tree Ctrl wxComboControl
+ // Tree Ctrl wxComboCtrl
//
// 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,
- wxT("wxComboControl with custom button action:")), 1,
+ wxT("wxComboCtrl with custom button action:")), 1,
wxALIGN_CENTER_VERTICAL|wxRIGHT, 4 );
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("About wxComboControl sample"),
+ _T("About wxComboCtrl sample"),
wxOK | wxICON_INFORMATION,
this);
}
#define wxUSE_MINIFRAME 0
-#define wxUSE_COMBOCONTROL 0
+#define wxUSE_COMBOCTRL 0
-#define wxUSE_OWNERDRAWNCOMBOBOX 0
+#define wxUSE_ODCOMBOBOX 0
#define wxUSE_ACCEL 0
/////////////////////////////////////////////////////////////////////////////
// Name: combocmn.cpp
-// Purpose: wxComboControlBase
+// Purpose: wxComboCtrlBase
// Author: Jaakko Salli
// Modified by:
// Created: Apr-30-2006
#pragma hdrstop
#endif
-#if wxUSE_COMBOCONTROL
+#if wxUSE_COMBOCTRL
#ifndef WX_PRECOMP
#include "wx/defs.h"
class wxComboFrameEventHandler : public wxEvtHandler
{
public:
- wxComboFrameEventHandler( wxComboControlBase* pCb );
+ wxComboFrameEventHandler( wxComboCtrlBase* pCb );
~wxComboFrameEventHandler();
void OnPopup();
protected:
wxWindow* m_focusStart;
- wxComboControlBase* m_combo;
+ wxComboCtrlBase* m_combo;
private:
DECLARE_EVENT_TABLE()
EVT_CLOSE(wxComboFrameEventHandler::OnClose)
END_EVENT_TABLE()
-wxComboFrameEventHandler::wxComboFrameEventHandler( wxComboControlBase* combo )
+wxComboFrameEventHandler::wxComboFrameEventHandler( wxComboCtrlBase* combo )
: wxEvtHandler()
{
m_combo = combo;
// ----------------------------------------------------------------------------
// wxComboPopupWindow is wxPopupWindow customized for
-// wxComboControl.
+// wxComboCtrl.
// ----------------------------------------------------------------------------
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);
END_EVENT_TABLE()
-wxComboPopupWindow::wxComboPopupWindow( wxComboControlBase *parent,
+wxComboPopupWindow::wxComboPopupWindow( wxComboCtrlBase *parent,
int style )
#if wxUSE_POPUPWIN
: wxComboPopupWindowBase(parent,style)
if ( !event.GetActive() )
{
// Tell combo control that we are dismissed.
- wxComboControl* combo = (wxComboControl*) GetParent();
+ wxComboCtrl* combo = (wxComboCtrl*) GetParent();
wxASSERT( combo );
- wxASSERT( combo->IsKindOf(CLASSINFO(wxComboControl)) );
+ wxASSERT( combo->IsKindOf(CLASSINFO(wxComboCtrl)) );
combo->HidePopup();
// 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();
}
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
{
public:
- wxComboBoxExtraInputHandler( wxComboControlBase* combo )
+ wxComboBoxExtraInputHandler( wxComboCtrlBase* combo )
: wxEvtHandler()
{
m_combo = combo;
void OnFocus(wxFocusEvent& event);
protected:
- wxComboControlBase* m_combo;
+ wxComboCtrlBase* m_combo;
private:
DECLARE_EVENT_TABLE()
{
public:
- wxComboPopupExtraEventHandler( wxComboControlBase* combo )
+ wxComboPopupExtraEventHandler( wxComboCtrlBase* combo )
: wxEvtHandler()
{
m_combo = combo;
void OnMouseEvent( wxMouseEvent& event );
- // Called from wxComboControlBase::OnPopupDismiss
+ // Called from wxComboCtrlBase::OnPopupDismiss
void OnPopupDismiss()
{
m_beenInside = false;
}
protected:
- wxComboControlBase* m_combo;
+ wxComboCtrlBase* m_combo;
bool m_beenInside;
}
// ----------------------------------------------------------------------------
-// wxComboControlBase
+// wxComboCtrlBase
// ----------------------------------------------------------------------------
-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)
END_EVENT_TABLE()
-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;
-void wxComboControlBase::Init()
+void wxComboCtrlBase::Init()
{
m_winPopup = (wxWindow *)NULL;
m_popup = (wxWindow *)NULL;
m_timeCanAcceptClick = 0;
}
-bool wxComboControlBase::Create(wxWindow *parent,
+bool wxComboCtrlBase::Create(wxWindow *parent,
wxWindowID id,
const wxString& value,
const wxPoint& pos,
return true;
}
-void wxComboControlBase::InstallInputHandlers( bool alsoTextCtrl )
+void wxComboCtrlBase::InstallInputHandlers( bool alsoTextCtrl )
{
if ( m_text && alsoTextCtrl )
{
m_extraEvtHandler = inputHandler;
}
-void wxComboControlBase::CreateTextCtrl( int extraStyle, const wxValidator& validator )
+void wxComboCtrlBase::CreateTextCtrl( int extraStyle, const wxValidator& validator )
{
if ( !(m_windowStyle & wxCB_READONLY) )
{
}
}
-void wxComboControlBase::OnThemeChange()
+void wxComboCtrlBase::OnThemeChange()
{
SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOW));
}
-wxComboControlBase::~wxComboControlBase()
+wxComboCtrlBase::~wxComboCtrlBase()
{
if ( HasCapture() )
ReleaseMouse();
// ----------------------------------------------------------------------------
// Recalculates button and textctrl areas
-void wxComboControlBase::CalculateAreas( int btnWidth )
+void wxComboCtrlBase::CalculateAreas( int btnWidth )
{
wxSize sz = GetClientSize();
int customBorder = m_widthCustomBorder;
*/
}
-void wxComboControlBase::PositionTextCtrl( int textCtrlXAdjust, int textCtrlYAdjust )
+void wxComboCtrlBase::PositionTextCtrl( int textCtrlXAdjust, int textCtrlYAdjust )
{
if ( !m_text )
return;
}
}
-wxSize wxComboControlBase::DoGetBestSize() const
+wxSize wxComboCtrlBase::DoGetBestSize() const
{
wxSize sizeText(150,0);
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
m_iFlags |= wxCC_IFLAG_CREATED;
wxControl::DoMoveWindow(x, y, width, height);
}
-void wxComboControlBase::OnSizeEvent( wxSizeEvent& event )
+void wxComboCtrlBase::OnSizeEvent( wxSizeEvent& event )
{
if ( !IsCreated() )
return;
- // defined by actual wxComboControls
+ // defined by actual wxComboCtrls
OnResize();
event.Skip();
// standard operations
// ----------------------------------------------------------------------------
-bool wxComboControlBase::Enable(bool enable)
+bool wxComboCtrlBase::Enable(bool enable)
{
if ( !wxControl::Enable(enable) )
return false;
return true;
}
-bool wxComboControlBase::Show(bool show)
+bool wxComboCtrlBase::Show(bool show)
{
if ( !wxControl::Show(show) )
return false;
return true;
}
-bool wxComboControlBase::SetFont ( const wxFont& font )
+bool wxComboCtrlBase::SetFont ( const wxFont& font )
{
if ( !wxControl::SetFont(font) )
return false;
}
#if wxUSE_TOOLTIPS
-void wxComboControlBase::DoSetToolTip(wxToolTip *tooltip)
+void wxComboCtrlBase::DoSetToolTip(wxToolTip *tooltip)
{
wxControl::DoSetToolTip(tooltip);
// ----------------------------------------------------------------------------
// 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;
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;
}
}
-void wxComboControlBase::RecalcAndRefresh()
+void wxComboCtrlBase::RecalcAndRefresh()
{
if ( IsCreated() )
{
}
}
-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 ||
// miscellaneous event handlers
// ----------------------------------------------------------------------------
-void wxComboControlBase::OnTextCtrlEvent(wxCommandEvent& event)
+void wxComboCtrlBase::OnTextCtrlEvent(wxCommandEvent& event)
{
// Change event id and relay it forward
event.SetId(GetId());
}
// 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();
// 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();
return false;
}
-void wxComboControlBase::HandleNormalMouseEvent( wxMouseEvent& event )
+void wxComboCtrlBase::HandleNormalMouseEvent( wxMouseEvent& event )
{
int evtType = event.GetEventType();
event.Skip();
}
-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
Refresh();
}
-void wxComboControlBase::OnSysColourChanged(wxSysColourChangedEvent& WXUNUSED(event))
+void wxComboCtrlBase::OnSysColourChanged(wxSysColourChangedEvent& WXUNUSED(event))
{
OnThemeChange();
// indentation may also have changed
// ----------------------------------------------------------------------------
// Create popup window and the child control
-void wxComboControlBase::CreatePopup()
+void wxComboCtrlBase::CreatePopup()
{
wxComboPopup* popupInterface = m_popupInterface;
wxWindow* popup;
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;
}
// Ensures there is atleast the default popup
-void wxComboControlBase::EnsurePopupControl()
+void wxComboCtrlBase::EnsurePopupControl()
{
if ( !m_popupInterface )
SetPopupControl(NULL);
}
-void wxComboControlBase::OnButtonClick()
+void wxComboCtrlBase::OnButtonClick()
{
// 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") );
}
-void wxComboControlBase::OnPopupDismiss()
+void wxComboCtrlBase::OnPopupDismiss()
{
// 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") );
// customization methods
// ----------------------------------------------------------------------------
-void wxComboControlBase::SetButtonPosition( int width, int height,
+void wxComboCtrlBase::SetButtonPosition( int width, int height,
int side, int spacingX )
{
m_btnWid = width;
RecalcAndRefresh();
}
-void wxComboControlBase::SetButtonBitmaps( const wxBitmap& bmpNormal,
+void wxComboCtrlBase::SetButtonBitmaps( const wxBitmap& bmpNormal,
bool blankButtonBg,
const wxBitmap& bmpPressed,
const wxBitmap& bmpHover,
RecalcAndRefresh();
}
-void wxComboControlBase::SetCustomPaintWidth( int width )
+void wxComboCtrlBase::SetCustomPaintWidth( int width )
{
if ( m_text )
{
RecalcAndRefresh();
}
-void wxComboControlBase::SetTextIndent( int indent )
+void wxComboCtrlBase::SetTextIndent( int indent )
{
if ( indent < 0 )
{
RecalcAndRefresh();
}
-wxCoord wxComboControlBase::GetNativeTextIndent() const
+wxCoord wxComboCtrlBase::GetNativeTextIndent() const
{
return DEFAULT_TEXT_INDENT;
}
// methods forwarded to wxTextCtrl
// ----------------------------------------------------------------------------
-wxString wxComboControlBase::GetValue() const
+wxString wxComboCtrlBase::GetValue() const
{
if ( m_text )
return m_text->GetValue();
return m_valueString;
}
-void wxComboControlBase::SetValue(const wxString& value)
+void wxComboCtrlBase::SetValue(const wxString& value)
{
if ( m_text )
{
}
// 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.
Refresh();
}
-void wxComboControlBase::Copy()
+void wxComboCtrlBase::Copy()
{
if ( m_text )
m_text->Copy();
}
-void wxComboControlBase::Cut()
+void wxComboCtrlBase::Cut()
{
if ( m_text )
m_text->Cut();
}
-void wxComboControlBase::Paste()
+void wxComboCtrlBase::Paste()
{
if ( m_text )
m_text->Paste();
}
-void wxComboControlBase::SetInsertionPoint(long pos)
+void wxComboCtrlBase::SetInsertionPoint(long pos)
{
if ( m_text )
m_text->SetInsertionPoint(pos);
}
-void wxComboControlBase::SetInsertionPointEnd()
+void wxComboCtrlBase::SetInsertionPointEnd()
{
if ( m_text )
m_text->SetInsertionPointEnd();
}
-long wxComboControlBase::GetInsertionPoint() const
+long wxComboCtrlBase::GetInsertionPoint() const
{
if ( m_text )
return m_text->GetInsertionPoint();
return 0;
}
-long wxComboControlBase::GetLastPosition() const
+long wxComboCtrlBase::GetLastPosition() const
{
if ( m_text )
return m_text->GetLastPosition();
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 )
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);
}
-void wxComboControlBase::SetSelection(long from, long to)
+void wxComboCtrlBase::SetSelection(long from, long to)
{
if ( m_text )
m_text->SetSelection(from, to);
}
-void wxComboControlBase::Undo()
+void wxComboCtrlBase::Undo()
{
if ( m_text )
m_text->Undo();
}
-#endif // wxUSE_COMBOCONTROL
+#endif // wxUSE_COMBOCTRL
#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
EVT_KEY_DOWN(wxPopupComboWindow::OnKeyDown)
END_EVENT_TABLE()
-wxPopupComboWindow::wxPopupComboWindow(wxComboControl *parent)
+wxPopupComboWindow::wxPopupComboWindow(wxComboCtrl *parent)
: wxPopupTransientWindow(parent)
{
m_combo = parent;
}
-bool wxPopupComboWindow::Create(wxComboControl *parent)
+bool wxPopupComboWindow::Create(wxComboCtrl *parent)
{
m_combo = parent;
/////////////////////////////////////////////////////////////////////////////
// Name: src/generic/combog.cpp
-// Purpose: Generic wxComboControl
+// Purpose: Generic wxComboCtrl
// Author: Jaakko Salli
// Modified by:
// Created: Apr-30-2006
#pragma hdrstop
#endif
-#if wxUSE_COMBOCONTROL
+#if wxUSE_COMBOCTRL
#include "wx/combo.h"
// wxGenericComboControl
// ----------------------------------------------------------------------------
-BEGIN_EVENT_TABLE(wxGenericComboControl, wxComboControlBase)
+BEGIN_EVENT_TABLE(wxGenericComboControl, wxComboCtrlBase)
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()
{
m_iFlags |= wxCC_POPUP_ON_MOUSE_UP;
// create main window
- if ( !wxComboControlBase::Create(parent,
+ if ( !wxComboCtrlBase::Create(parent,
id,
value,
wxDefaultPosition,
#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_
-IMPLEMENT_DYNAMIC_CLASS(wxComboControl, wxGenericComboControl)
+IMPLEMENT_DYNAMIC_CLASS(wxComboCtrl, wxGenericComboControl)
#endif
#endif // !wxCOMBOCONTROL_FULLY_FEATURED
-#endif // wxUSE_COMBOCONTROL
+#endif // wxUSE_COMBOCTRL
#pragma hdrstop
#endif
-#if wxUSE_OWNERDRAWNCOMBOBOX
+#if wxUSE_ODCOMBOBOX
#include "wx/odcombo.h"
// ----------------------------------------------------------------------------
-BEGIN_EVENT_TABLE(wxOwnerDrawnComboBox, wxComboControl)
+BEGIN_EVENT_TABLE(wxOwnerDrawnComboBox, wxComboCtrl)
END_EVENT_TABLE()
-IMPLEMENT_DYNAMIC_CLASS2(wxOwnerDrawnComboBox, wxComboControl, wxControlWithItems)
+IMPLEMENT_DYNAMIC_CLASS2(wxOwnerDrawnComboBox, wxComboCtrl, wxControlWithItems)
void wxOwnerDrawnComboBox::Init()
{
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,
long style,
const wxValidator& validator,
const wxString& name)
- : wxComboControl()
+ : wxComboCtrl()
{
Init();
popup = new wxVListBoxComboPopup();
}
- wxComboControl::SetPopupControl(popup);
+ wxComboCtrl::SetPopupControl(popup);
wxASSERT(popup);
m_popupInterface = (wxVListBoxComboPopup*) popup;
return (wxClientData*) DoGetItemClientData(n);
}
-#endif // wxUSE_OWNERDRAWNCOMBOBOX
+#endif // wxUSE_ODCOMBOBOX
/////////////////////////////////////////////////////////////////////////////
// Name: combo.cpp
-// Purpose: wxMSW wxComboControl
+// Purpose: wxMSW wxComboCtrl
// Author: Jaakko Salli
// Modified by:
// Created: Apr-30-2006
#pragma hdrstop
#endif
-#if wxUSE_COMBOCONTROL
+#if wxUSE_COMBOCTRL
#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)
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,
const wxString& value,
const wxPoint& pos,
}
// create main window
- if ( !wxComboControlBase::Create(parent,
+ if ( !wxComboCtrlBase::Create(parent,
id,
value,
wxDefaultPosition,
return true;
}
-wxComboControl::~wxComboControl()
+wxComboCtrl::~wxComboCtrl()
{
}
-void wxComboControl::OnThemeChange()
+void wxComboCtrl::OnThemeChange()
{
wxUxThemeEngine* theme = wxUxThemeEngine::GetIfActive();
if ( theme )
}
}
-void wxComboControl::OnResize()
+void wxComboCtrl::OnResize()
{
//
// Recalculates button and textctrl areas
}
// 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");
}
-void wxComboControl::OnPaintEvent( wxPaintEvent& WXUNUSED(event) )
+void wxComboCtrl::OnPaintEvent( wxPaintEvent& WXUNUSED(event) )
{
// 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;
}
-wxCoord wxComboControl::GetNativeTextIndent() const
+wxCoord wxComboCtrl::GetNativeTextIndent() const
{
if ( wxUxThemeEngine::GetIfActive() )
return NATIVE_TEXT_INDENT_XP;
}
-#endif // wxUSE_COMBOCONTROL
+#endif // wxUSE_COMBOCTRL
EVT_LEFT_UP(wxComboListBox::OnLeftUp)
END_EVENT_TABLE()
-IMPLEMENT_DYNAMIC_CLASS2(wxComboBox, wxControl, wxComboControl)
+IMPLEMENT_DYNAMIC_CLASS2(wxComboBox, wxControl, wxComboCtrl)
// ============================================================================
// 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
- // and this is done by wxComboControl itself
+ // and this is done by wxComboCtrl itself
return true;
}
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;
wxString wxComboBox::GetValue() const
{
- return wxComboControl::GetValue();
+ return wxComboCtrl::GetValue();
}
void wxComboBox::SetValue(const wxString& value)
{
- wxComboControl::SetValue(value);
+ wxComboCtrl::SetValue(value);
}
void wxComboBox::Copy()