Get the OS X Cocoa native combobox building by having the native code compile if wxOSX_USE_NATIVE_COMBOBOX is defined. It must be explicitly enabled by adding that define to the build flags as the native implementation is mostly just stubs right now.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63053 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Kevin Ollivier
2010-01-04 01:57:42 +00:00
parent da8b1d4b3b
commit f941a30bef
6 changed files with 109 additions and 394 deletions

View File

@@ -2232,6 +2232,7 @@ IMPORTANT: please read docs/tech/tn0016.txt before modifying this file!
src/osx/checkbox_osx.cpp src/osx/checkbox_osx.cpp
src/osx/checklst_osx.cpp src/osx/checklst_osx.cpp
src/osx/choice_osx.cpp src/osx/choice_osx.cpp
src/osx/combobox_osx.cpp
src/osx/gauge_osx.cpp src/osx/gauge_osx.cpp
src/osx/listbox_osx.cpp src/osx/listbox_osx.cpp
src/osx/menu_osx.cpp src/osx/menu_osx.cpp
@@ -2464,6 +2465,7 @@ IMPORTANT: please read docs/tech/tn0016.txt before modifying this file!
src/osx/cocoa/checkbox.mm src/osx/cocoa/checkbox.mm
src/osx/cocoa/choice.mm src/osx/cocoa/choice.mm
src/osx/cocoa/colour.mm src/osx/cocoa/colour.mm
src/osx/cocoa/combobox.mm
src/osx/cocoa/dialog.mm src/osx/cocoa/dialog.mm
src/osx/cocoa/dirdlg.mm src/osx/cocoa/dirdlg.mm
src/osx/cocoa/evtloop.mm src/osx/cocoa/evtloop.mm

View File

@@ -30,9 +30,11 @@ class WXDLLIMPEXP_CORE wxComboBox : public wxControl, public wxComboBoxBase
public: public:
virtual ~wxComboBox(); virtual ~wxComboBox();
#ifndef wxOSX_USE_NATIVE_COMBOBOX
// forward these functions to all subcontrols // forward these functions to all subcontrols
virtual bool Enable(bool enable = true); virtual bool Enable(bool enable = true);
virtual bool Show(bool show = true); virtual bool Show(bool show = true);
#endif
// callback functions // callback functions
virtual void DelegateTextChanged( const wxString& value ); virtual void DelegateTextChanged( const wxString& value );
@@ -129,9 +131,11 @@ class WXDLLIMPEXP_CORE wxComboBox : public wxControl, public wxComboBoxBase
virtual bool OSXHandleClicked( double timestampsec ); virtual bool OSXHandleClicked( double timestampsec );
#ifndef wxOSX_USE_NATIVE_COMBOBOX
wxCONTROL_ITEMCONTAINER_CLIENTDATAOBJECT_RECAST wxCONTROL_ITEMCONTAINER_CLIENTDATAOBJECT_RECAST
WX_DECLARE_CONTROL_CONTAINER(); WX_DECLARE_CONTROL_CONTAINER();
#endif
protected: protected:
// common part of all ctors // common part of all ctors
@@ -145,9 +149,11 @@ protected:
virtual wxString DoGetValue() const; virtual wxString DoGetValue() const;
virtual wxWindow *GetEditableWindow() { return this; } virtual wxWindow *GetEditableWindow() { return this; }
#ifndef wxOSX_USE_NATIVE_COMBOBOX
// override the base class virtuals involved in geometry calculations // override the base class virtuals involved in geometry calculations
virtual wxSize DoGetBestSize() const; virtual wxSize DoGetBestSize() const;
virtual void DoMoveWindow(int x, int y, int width, int height); virtual void DoMoveWindow(int x, int y, int width, int height);
#endif
virtual int DoInsertItems(const wxArrayStringsAdapter& items, virtual int DoInsertItems(const wxArrayStringsAdapter& items,
unsigned int pos, unsigned int pos,
@@ -164,7 +170,9 @@ protected:
wxComboBoxText* m_text; wxComboBoxText* m_text;
wxComboBoxChoice* m_choice; wxComboBoxChoice* m_choice;
#ifndef wxOSX_USE_NATIVE_COMBOBOX
DECLARE_EVENT_TABLE() DECLARE_EVENT_TABLE()
#endif
}; };
#endif // _WX_COMBOBOX_H_ #endif // _WX_COMBOBOX_H_

View File

@@ -470,6 +470,17 @@ public :
long style, long style,
long extraStyle); long extraStyle);
#ifdef wxOSX_USE_NATIVE_COMBOBOX
static wxWidgetImplType* CreateComboBox( wxWindowMac* wxpeer,
wxWindowMac* parent,
wxWindowID id,
wxMenu* menu,
const wxPoint& pos,
const wxSize& size,
long style,
long extraStyle);
#endif
// converts from Toplevel-Content relative to local // converts from Toplevel-Content relative to local
static void Convert( wxPoint *pt , wxWidgetImpl *from , wxWidgetImpl *to ); static void Convert( wxPoint *pt , wxWidgetImpl *from , wxWidgetImpl *to );
protected : protected :

View File

@@ -11,7 +11,7 @@
#include "wx/wxprec.h" #include "wx/wxprec.h"
#if wxUSE_COMBOBOX #if wxUSE_COMBOBOX && !defined(wxOSX_USE_NATIVE_COMBOBOX)
#include "wx/combobox.h" #include "wx/combobox.h"
@@ -686,4 +686,4 @@ bool wxComboBox::OSXHandleClicked( double WXUNUSED(timestampsec) )
return true ; return true ;
} }
#endif // wxUSE_COMBOBOX #endif // wxUSE_COMBOBOX && !defined(wxOSX_USE_NATIVE_COMBOBOX)

View File

@@ -11,7 +11,7 @@
#include "wx/wxprec.h" #include "wx/wxprec.h"
#if wxUSE_COMBOBOX #if wxUSE_COMBOBOX && defined(wxOSX_USE_NATIVE_COMBOBOX)
#include "wx/combobox.h" #include "wx/combobox.h"
@@ -64,9 +64,9 @@ wxWidgetImplType* wxWidgetImpl::CreateComboBox( wxWindowMac* wxpeer,
long WXUNUSED(extraStyle)) long WXUNUSED(extraStyle))
{ {
NSRect r = wxOSXGetFrameForControl( wxpeer, pos , size ) ; NSRect r = wxOSXGetFrameForControl( wxpeer, pos , size ) ;
wxNSComboBox* v = [[wxNSComboBox alloc] initWithFrame:r pullsDown:NO]; wxNSComboBox* v = [[wxNSComboBox alloc] initWithFrame:r];
wxWidgetCocoaImpl* c = new wxWidgetCocoaImpl( wxpeer, v ); wxWidgetCocoaImpl* c = new wxWidgetCocoaImpl( wxpeer, v );
return c; return c;
} }
#endif // wxUSE_CHOICE #endif // wxUSE_COMBOBOX && defined(wxOSX_USE_NATIVE_COMBOBOX)

View File

@@ -11,9 +11,10 @@
#include "wx/wxprec.h" #include "wx/wxprec.h"
#if wxUSE_COMBOBOX #if wxUSE_COMBOBOX && defined(wxOSX_USE_NATIVE_COMBOBOX)
#include "wx/combobox.h" #include "wx/combobox.h"
#include "wx/osx/private.h"
#ifndef WX_PRECOMP #ifndef WX_PRECOMP
#endif #endif
@@ -26,6 +27,10 @@ wxComboBox::~wxComboBox()
{ {
} }
void wxComboBox::Init()
{
}
bool wxComboBox::Create(wxWindow *parent, wxWindowID id, bool wxComboBox::Create(wxWindow *parent, wxWindowID id,
const wxString& value, const wxString& value,
const wxPoint& pos, const wxPoint& pos,
@@ -58,16 +63,10 @@ bool wxComboBox::Create(wxWindow *parent, wxWindowID id,
if ( !wxControl::Create( parent, id, pos, size, style, validator, name ) ) if ( !wxControl::Create( parent, id, pos, size, style, validator, name ) )
return false; return false;
m_peer = wxWidgetImpl::CreateComboBox( this, parent, id, m_popUpMenu, pos, size, style, GetExtraStyle() ); m_peer = wxWidgetImpl::CreateComboBox( this, parent, id, NULL, pos, size, style, GetExtraStyle() );
MacPostControlCreate( pos, size ); MacPostControlCreate( pos, size );
#if !wxUSE_STL
if ( style & wxCB_SORT )
// autosort
m_strings = wxArrayString( 1 );
#endif
Append(n, choices); Append(n, choices);
// Set the first item as being selected // Set the first item as being selected
@@ -80,539 +79,234 @@ bool wxComboBox::Create(wxWindow *parent, wxWindowID id,
return true; return true;
} }
// ----------------------------------------------------------------------------
// geometry
// ----------------------------------------------------------------------------
wxSize wxComboBox::DoGetBestSize() const
{
#if USE_HICOMBOBOX
return wxControl::DoGetBestSize();
#else
wxSize size = m_choice->GetBestSize();
if ( m_text != NULL )
{
wxSize sizeText = m_text->GetBestSize();
size.x = POPUPWIDTH + sizeText.x + MARGIN;
}
return size;
#endif
}
void wxComboBox::DoMoveWindow(int x, int y, int width, int height) {
#if USE_HICOMBOBOX
wxControl::DoMoveWindow(x, y, width, height);
#else
height = POPUPHEIGHT;
wxControl::DoMoveWindow(x, y, width, height);
if ( m_text == NULL )
{
// we might not be fully constructed yet, therefore watch out...
if ( m_choice )
m_choice->SetSize(0, 0 , width, wxDefaultCoord);
}
else
{
wxCoord wText = width - POPUPWIDTH - MARGIN;
m_text->SetSize(0, 0, wText, height);
m_choice->SetSize(0 + wText + MARGIN, 0, POPUPWIDTH, wxDefaultCoord);
}
#endif
}
// ----------------------------------------------------------------------------
// operations forwarded to the subcontrols
// ----------------------------------------------------------------------------
bool wxComboBox::Enable(bool enable)
{
if ( !wxControl::Enable(enable) )
return false;
return true;
}
bool wxComboBox::Show(bool show)
{
if ( !wxControl::Show(show) )
return false;
return true;
}
void wxComboBox::SetFocus()
{
#if USE_HICOMBOBOX
wxControl::SetFocus();
#else
if ( m_text != NULL) {
m_text->SetFocus();
}
#endif
}
void wxComboBox::DelegateTextChanged( const wxString& value ) void wxComboBox::DelegateTextChanged( const wxString& value )
{ {
SetStringSelection( value ); SetStringSelection( value );
} }
void wxComboBox::DelegateChoice( const wxString& value ) void wxComboBox::DelegateChoice( const wxString& value )
{ {
SetStringSelection( value ); SetStringSelection( value );
} }
bool wxComboBox::Create(wxWindow *parent, wxWindowID id,
const wxString& value,
const wxPoint& pos,
const wxSize& size,
int n, const wxString choices[],
long style,
const wxValidator& validator,
const wxString& name)
{
m_text = NULL;
m_choice = NULL;
#if USE_HICOMBOBOX
m_macIsUserPane = false;
#endif
if ( !wxControl::Create(parent, id, wxDefaultPosition, wxDefaultSize, style ,
wxDefaultValidator, name) )
{
return false;
}
#if USE_HICOMBOBOX
Rect bounds = wxMacGetBoundsForControl( this , pos , size );
HIRect hiRect;
hiRect.origin.x = 20; //bounds.left;
hiRect.origin.y = 25; //bounds.top;
hiRect.size.width = 120;// bounds.right - bounds.left;
hiRect.size.height = 24;
//For some reason, this code causes the combo box not to be displayed at all.
//hiRect.origin.x = bounds.left;
//hiRect.origin.y = bounds.top;
//hiRect.size.width = bounds.right - bounds.left;
//hiRect.size.height = bounds.bottom - bounds.top;
//printf("left = %d, right = %d, top = %d, bottom = %d\n", bounds.left, bounds.right, bounds.top, bounds.bottom);
//printf("x = %d, y = %d, width = %d, height = %d\n", hibounds.origin.x, hibounds.origin.y, hibounds.size.width, hibounds.size.height);
m_peer = new wxMacControl(this);
verify_noerr( HIComboBoxCreate( &hiRect, CFSTR(""), NULL, NULL, kHIComboBoxStandardAttributes, m_peer->GetControlRefAddr() ) );
m_peer->SetMinimum( 0 );
m_peer->SetMaximum( 100);
if ( n > 0 )
m_peer->SetValue( 1 );
MacPostControlCreate(pos,size);
Append( choices[ i ] );
HIViewSetVisible( m_peer->GetControlRef(), true );
SetSelection(0);
EventHandlerRef comboEventHandler;
InstallControlEventHandler( m_peer->GetControlRef(), GetwxMacComboBoxEventHandlerUPP(),
GetEventTypeCount(eventList), eventList, this,
(EventHandlerRef *)&comboEventHandler);
#else
m_choice = new wxComboBoxChoice(this, style );
m_choice->SetMinSize( wxSize( POPUPWIDTH , POPUPHEIGHT ) );
wxSize csize = size;
if ( style & wxCB_READONLY )
{
m_text = NULL;
}
else
{
m_text = new wxComboBoxText(this);
if ( size.y == wxDefaultCoord ) {
csize.y = m_text->GetSize().y;
}
}
DoSetSize(pos.x, pos.y, csize.x, csize.y);
m_choice->Append( n, choices );
SetInitialSize(csize); // Needed because it is a wxControlWithItems
#endif
return true;
}
wxString wxComboBox::GetValue() const wxString wxComboBox::GetValue() const
{ {
#if USE_HICOMBOBOX wxFAIL_MSG("Method Not Implemented.");
CFStringRef myString; return wxEmptyString;
HIComboBoxCopyTextItemAtIndex( m_peer->GetControlRef(), (CFIndex)GetSelection(), &myString );
return wxMacCFStringHolder( myString, GetFont().GetEncoding() ).AsString();
#else
wxString result;
if ( m_text == NULL )
{
result = m_choice->GetString( m_choice->GetSelection() );
}
else
{
result = m_text->GetValue();
}
return result;
#endif
} }
void wxComboBox::SetValue(const wxString& value) void wxComboBox::SetValue(const wxString& value)
{ {
#if USE_HICOMBOBOX wxFAIL_MSG("Method Not Implemented.");
#else
int s = FindString (value);
if (s == wxNOT_FOUND && !HasFlag(wxCB_READONLY) )
{
m_choice->Append(value);
}
SetStringSelection( value );
#endif
} }
// Clipboard operations // Clipboard operations
void wxComboBox::Copy() void wxComboBox::Copy()
{ {
if ( m_text != NULL ) wxFAIL_MSG("Method Not Implemented.");
{
m_text->Copy();
}
} }
void wxComboBox::Cut() void wxComboBox::Cut()
{ {
if ( m_text != NULL ) wxFAIL_MSG("Method Not Implemented.");
{
m_text->Cut();
}
} }
void wxComboBox::Paste() void wxComboBox::Paste()
{ {
if ( m_text != NULL ) wxFAIL_MSG("Method Not Implemented.");
{
m_text->Paste();
}
} }
void wxComboBox::SetEditable(bool editable) void wxComboBox::SetEditable(bool editable)
{ {
if ( ( m_text == NULL ) && editable ) wxFAIL_MSG("Method Not Implemented.");
{
m_text = new wxComboBoxText( this );
}
else if ( ( m_text != NULL ) && !editable )
{
delete m_text;
m_text = NULL;
}
int currentX, currentY;
GetPosition( &currentX, &currentY );
int currentW, currentH;
GetSize( &currentW, &currentH );
DoMoveWindow( currentX, currentY, currentW, currentH );
} }
void wxComboBox::SetInsertionPoint(long pos) void wxComboBox::SetInsertionPoint(long pos)
{ {
// TODO wxFAIL_MSG("Method Not Implemented.");
} }
void wxComboBox::SetInsertionPointEnd() void wxComboBox::SetInsertionPointEnd()
{ {
// TODO wxFAIL_MSG("Method Not Implemented.");
} }
long wxComboBox::GetInsertionPoint() const long wxComboBox::GetInsertionPoint() const
{ {
// TODO wxFAIL_MSG("Method Not Implemented.");
return 0; return 0;
} }
wxTextPos wxComboBox::GetLastPosition() const wxTextPos wxComboBox::GetLastPosition() const
{ {
// TODO wxFAIL_MSG("Method Not Implemented.");
return 0; return 0;
} }
void wxComboBox::Replace(long from, long to, const wxString& value) void wxComboBox::Replace(long from, long to, const wxString& value)
{ {
// TODO wxFAIL_MSG("Method Not Implemented.");
} }
void wxComboBox::Remove(long from, long to) void wxComboBox::Remove(long from, long to)
{ {
// TODO wxFAIL_MSG("Method Not Implemented.");
} }
void wxComboBox::SetSelection(long from, long to) void wxComboBox::SetSelection(long from, long to)
{ {
// TODO wxFAIL_MSG("Method Not Implemented.");
} }
int wxComboBox::DoInsertItems(const wxArrayStringsAdapter& items, int wxComboBox::DoInsertItems(const wxArrayStringsAdapter& items,
unsigned int pos, unsigned int pos,
void **clientData, wxClientDataType type) void **clientData, wxClientDataType type)
{ {
#if USE_HICOMBOBOX wxFAIL_MSG("Method Not Implemented.");
const unsigned int count = items.GetCount(); return 0;
for ( unsigned int i = 0; i < count; ++i, ++pos )
{
HIComboBoxInsertTextItemAtIndex(m_peer->GetControlRef(),
(CFIndex)pos,
wxMacCFStringHolder(items[i],
GetFont().GetEncoding()));
AssignNewItemClientData(pos, clientData, i, type);
}
//SetControl32BitMaximum( m_peer->GetControlRef(), GetCount() );
return pos - 1;
#else
return m_choice->DoInsertItems( items, pos, clientData, type );
#endif
} }
void wxComboBox::DoSetItemClientData(unsigned int n, void* clientData) void wxComboBox::DoSetItemClientData(unsigned int n, void* clientData)
{ {
#if USE_HICOMBOBOX wxFAIL_MSG("Method Not Implemented.");
return; //TODO
#else
return m_choice->DoSetItemClientData( n , clientData );
#endif
} }
void* wxComboBox::DoGetItemClientData(unsigned int n) const void* wxComboBox::DoGetItemClientData(unsigned int n) const
{ {
#if USE_HICOMBOBOX wxFAIL_MSG("Method Not Implemented.");
return NULL; //TODO return NULL;
#else
return m_choice->DoGetItemClientData( n );
#endif
} }
unsigned int wxComboBox::GetCount() const { unsigned int wxComboBox::GetCount() const
#if USE_HICOMBOBOX {
return (unsigned int) HIComboBoxGetItemCount( m_peer->GetControlRef() ); wxFAIL_MSG("Method Not Implemented.");
#else return 0;
return m_choice->GetCount();
#endif
} }
void wxComboBox::DoDeleteOneItem(unsigned int n) void wxComboBox::DoDeleteOneItem(unsigned int n)
{ {
#if USE_HICOMBOBOX wxFAIL_MSG("Method Not Implemented.");
HIComboBoxRemoveItemAtIndex( m_peer->GetControlRef(), (CFIndex)n );
#else
m_choice->Delete( n );
#endif
} }
void wxComboBox::DoClear() void wxComboBox::DoClear()
{ {
#if USE_HICOMBOBOX wxFAIL_MSG("Method Not Implemented.");
for ( CFIndex i = GetCount() - 1; i >= 0; ++ i )
verify_noerr( HIComboBoxRemoveItemAtIndex( m_peer->GetControlRef(), i ) );
m_peer->SetData<CFStringRef>(kHIComboBoxEditTextPart,kControlEditTextCFStringTag,CFSTR(""));
#else
m_choice->Clear();
#endif
} }
int wxComboBox::GetSelection() const int wxComboBox::GetSelection() const
{ {
#if USE_HICOMBOBOX wxFAIL_MSG("Method Not Implemented.");
return FindString( GetStringSelection() ); return 0;
#else }
return m_choice->GetSelection();
#endif void wxComboBox::GetSelection(long *from, long *to) const
{
wxFAIL_MSG("Method Not Implemented.");
} }
void wxComboBox::SetSelection(int n) void wxComboBox::SetSelection(int n)
{ {
#if USE_HICOMBOBOX wxFAIL_MSG("Method Not Implemented.");
SetControl32BitValue( m_peer->GetControlRef() , n + 1 );
#else
m_choice->SetSelection( n );
if ( m_text != NULL )
{
m_text->SetValue(GetString(n));
}
#endif
} }
int wxComboBox::FindString(const wxString& s, bool bCase) const int wxComboBox::FindString(const wxString& s, bool bCase) const
{ {
#if USE_HICOMBOBOX wxFAIL_MSG("Method Not Implemented.");
for( unsigned int i = 0 ; i < GetCount() ; i++ ) return 0;
{
if (GetString(i).IsSameAs(s, bCase) )
return i ;
}
return wxNOT_FOUND;
#else
return m_choice->FindString( s, bCase );
#endif
} }
wxString wxComboBox::GetString(unsigned int n) const wxString wxComboBox::GetString(unsigned int n) const
{ {
#if USE_HICOMBOBOX wxFAIL_MSG("Method Not Implemented.");
CFStringRef itemText; return wxEmptyString;
HIComboBoxCopyTextItemAtIndex( m_peer->GetControlRef(), (CFIndex)n, &itemText );
return wxMacCFStringHolder(itemText).AsString();
#else
return m_choice->GetString( n );
#endif
} }
wxString wxComboBox::GetStringSelection() const wxString wxComboBox::GetStringSelection() const
{ {
#if USE_HICOMBOBOX wxFAIL_MSG("Method Not Implemented.");
return wxMacCFStringHolder(m_peer->GetData<CFStringRef>(kHIComboBoxEditTextPart,kControlEditTextCFStringTag)).AsString();
#else
int sel = GetSelection ();
if (sel != wxNOT_FOUND)
return wxString(this->GetString((unsigned int)sel));
else
return wxEmptyString; return wxEmptyString;
#endif
} }
void wxComboBox::SetString(unsigned int n, const wxString& s) void wxComboBox::SetString(unsigned int n, const wxString& s)
{ {
#if USE_HICOMBOBOX wxFAIL_MSG("Method Not Implemented.");
verify_noerr ( HIComboBoxInsertTextItemAtIndex( m_peer->GetControlRef(), (CFIndex) n,
wxMacCFStringHolder(s, GetFont().GetEncoding()) ) );
verify_noerr ( HIComboBoxRemoveItemAtIndex( m_peer->GetControlRef(), (CFIndex) n + 1 ) );
#else
m_choice->SetString( n , s );
#endif
} }
bool wxComboBox::IsEditable() const bool wxComboBox::IsEditable() const
{ {
#if USE_HICOMBOBOX
// TODO
return !HasFlag(wxCB_READONLY); return !HasFlag(wxCB_READONLY);
#else
return m_text != NULL && !HasFlag(wxCB_READONLY);
#endif
} }
void wxComboBox::Undo() void wxComboBox::Undo()
{ {
#if USE_HICOMBOBOX wxFAIL_MSG("Method Not Implemented.");
// TODO
#else
if (m_text != NULL)
m_text->Undo();
#endif
} }
void wxComboBox::Redo() void wxComboBox::Redo()
{ {
#if USE_HICOMBOBOX wxFAIL_MSG("Method Not Implemented.");
// TODO
#else
if (m_text != NULL)
m_text->Redo();
#endif
} }
void wxComboBox::SelectAll() void wxComboBox::SelectAll()
{ {
#if USE_HICOMBOBOX wxFAIL_MSG("Method Not Implemented.");
// TODO
#else
if (m_text != NULL)
m_text->SelectAll();
#endif
} }
bool wxComboBox::CanCopy() const bool wxComboBox::CanCopy() const
{ {
#if USE_HICOMBOBOX wxFAIL_MSG("Method Not Implemented.");
// TODO
return false; return false;
#else
if (m_text != NULL)
return m_text->CanCopy();
else
return false;
#endif
} }
bool wxComboBox::CanCut() const bool wxComboBox::CanCut() const
{ {
#if USE_HICOMBOBOX wxFAIL_MSG("Method Not Implemented.");
// TODO
return false; return false;
#else
if (m_text != NULL)
return m_text->CanCut();
else
return false;
#endif
} }
bool wxComboBox::CanPaste() const bool wxComboBox::CanPaste() const
{ {
#if USE_HICOMBOBOX wxFAIL_MSG("Method Not Implemented.");
// TODO
return false; return false;
#else
if (m_text != NULL)
return m_text->CanPaste();
else
return false;
#endif
} }
bool wxComboBox::CanUndo() const bool wxComboBox::CanUndo() const
{ {
#if USE_HICOMBOBOX wxFAIL_MSG("Method Not Implemented.");
// TODO
return false; return false;
#else
if (m_text != NULL)
return m_text->CanUndo();
else
return false;
#endif
} }
bool wxComboBox::CanRedo() const bool wxComboBox::CanRedo() const
{ {
#if USE_HICOMBOBOX wxFAIL_MSG("Method Not Implemented.");
// TODO
return false; return false;
#else }
if (m_text != NULL)
return m_text->CanRedo(); void wxComboBox::EnableTextChangedEvents(bool enable)
else {
return false; wxFAIL_MSG("Method Not Implemented.");
#endif }
void wxComboBox::WriteText(const wxString& text)
{
wxFAIL_MSG("Method Not Implemented.");
}
wxString wxComboBox::DoGetValue() const
{
wxFAIL_MSG("Method Not Implemented.");
return wxEmptyString;
}
wxClientDataType wxComboBox::GetClientDataType() const
{
wxFAIL_MSG("Method Not Implemented.");
return wxClientData_None;
}
void wxComboBox::SetClientDataType(wxClientDataType clientDataItemsType)
{
wxFAIL_MSG("Method Not Implemented.");
} }
bool wxComboBox::OSXHandleClicked( double timestampsec ) bool wxComboBox::OSXHandleClicked( double timestampsec )
@@ -625,4 +319,4 @@ bool wxComboBox::OSXHandleClicked( double timestampsec )
return true; return true;
} }
#endif #endif // wxUSE_COMBOBOX && defined(wxOSX_USE_NATIVE_COMBOBOX)