/////////////////////////////////////////////////////////////////////////////
-// Name: combobox.cpp
+// Name: src/mac/carbon/combobox.cpp
// Purpose: wxComboBox class
// Author: Stefan Csomor
// Modified by:
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
-#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
-#pragma implementation "combobox.h"
-#endif
-
#include "wx/wxprec.h"
#include "wx/combobox.h"
#endif
#endif
-#if !USE_SHARED_LIBRARY
IMPLEMENT_DYNAMIC_CLASS(wxComboBox, wxControl)
-#endif
// composite combobox implementation by Dan "Bud" Keith bud@otsys.com
event.SetEventObject(def);
def->Command(event);
return ;
- }
+ }
}
return;
};
BEGIN_EVENT_TABLE(wxComboBoxChoice, wxChoice)
- EVT_CHOICE(-1, wxComboBoxChoice::OnChoice)
+ EVT_CHOICE(wxID_ANY, wxComboBoxChoice::OnChoice)
END_EVENT_TABLE()
wxComboBox::~wxComboBox()
{
// we might not be fully constructed yet, therefore watch out...
if ( m_choice )
- m_choice->SetSize(0, 0 , width, -1);
+ 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, -1);
+ m_choice->SetSize(0 + wText + MARGIN, 0, POPUPWIDTH, wxDefaultCoord);
}
#endif
}
//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() ;
+ m_peer = new wxMacControl(this) ;
verify_noerr( HIComboBoxCreate( &hiRect, CFSTR(""), NULL, NULL, kHIComboBoxStandardAttributes, *m_peer ) );
else
{
m_text = new wxComboBoxText(this);
- if ( size.y == -1 ) {
+ if ( size.y == wxDefaultCoord ) {
csize.y = m_text->GetSize().y ;
}
}
#endif
}
-int wxComboBox::FindString(const wxString& s) const
+int wxComboBox::FindString(const wxString& s, bool bCase) const
{
#if USE_HICOMBOBOX
for( int i = 0 ; i < GetCount() ; i++ )
{
- if ( GetString( i ).IsSameAs(s, false) )
+ if ( GetString( i ).IsSameAs(s, bCase) )
return i ;
}
return wxNOT_FOUND ;
#else
- return m_choice->FindString( s );
+ return m_choice->FindString( s, bCase );
#endif
}
ProcessCommand(event);
return noErr ;
}
-