/////////////////////////////////////////////////////////////////////////////
-// Name: combobox.cpp
+// Name: src/mac/classic/combobox.cpp
// Purpose: wxComboBox class
// Author: Stefan Csomor
// Modified by:
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
-#ifdef __GNUG__
-#pragma implementation "combobox.h"
-#endif
-
#include "wx/combobox.h"
#include "wx/button.h"
#include "wx/menu.h"
#include "wx/mac/uma.h"
-#if !USE_SHARED_LIBRARY
IMPLEMENT_DYNAMIC_CLASS(wxComboBox, wxControl)
-#endif
// composite combobox implementation by Dan "Bud" Keith bud@otsys.com
bool wxComboBox::Enable(bool enable)
{
if ( !wxControl::Enable(enable) )
- return FALSE;
+ return false;
- return TRUE;
+ return true;
}
bool wxComboBox::Show(bool show)
{
if ( !wxControl::Show(show) )
- return FALSE;
+ return false;
- return TRUE;
+ return true;
}
void wxComboBox::SetFocus()
if ( !wxControl::Create(parent, id, wxDefaultPosition, wxDefaultSize, style ,
wxDefaultValidator, name) )
{
- return FALSE;
+ return false;
}
m_choice = new wxComboBoxChoice(this, style );
m_choice->DoAppend( choices[ i ] );
}
- return TRUE;
+ return true;
}
wxString wxComboBox::GetValue() const
return 0;
}
-long wxComboBox::GetLastPosition() const
+wxTextPos wxComboBox::GetLastPosition() const
{
// TODO
return 0;
}
}
-int wxComboBox::FindString(const wxString& s) const
+int wxComboBox::FindString(const wxString& s, bool bCase ) const
{
- return m_choice->FindString( s );
+ return m_choice->FindString( s , bCase );
}
wxString wxComboBox::GetString(int n) const
return wxEmptyString;
}
-bool wxComboBox::SetStringSelection(const wxString& sel)
-{
- int s = FindString (sel);
- if (s > -1)
- {
- SetSelection (s);
- return TRUE;
- }
- else
- return FALSE;
-}
-
void wxComboBox::SetString(int n, const wxString& s)
{
m_choice->SetString( n , s ) ;
bool wxComboBox::IsEditable() const
{
-
- return m_text != NULL && !HasFlag(wxCB_READONLY);
+ return m_text != NULL && !HasFlag(wxCB_READONLY);
}
void wxComboBox::Undo()
event.SetString(GetStringSelection());
ProcessCommand(event);
}
-