X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/64fa6f167ebb404e5441eddcee5bbd0808466d7a..6ac23e25b85468c7885f6ab43ca0a45f6458af2e:/src/mac/carbon/combobxc.cpp diff --git a/src/mac/carbon/combobxc.cpp b/src/mac/carbon/combobxc.cpp index 59c2d1db3b..a0fad78acd 100644 --- a/src/mac/carbon/combobxc.cpp +++ b/src/mac/carbon/combobxc.cpp @@ -25,9 +25,7 @@ #endif #endif -#if !USE_SHARED_LIBRARY IMPLEMENT_DYNAMIC_CLASS(wxComboBox, wxControl) -#endif // composite combobox implementation by Dan "Bud" Keith bud@otsys.com @@ -165,7 +163,7 @@ protected: event.SetEventObject(def); def->Command(event); return ; - } + } } return; @@ -219,7 +217,7 @@ private: }; BEGIN_EVENT_TABLE(wxComboBoxChoice, wxChoice) - EVT_CHOICE(-1, wxComboBoxChoice::OnChoice) + EVT_CHOICE(wxID_ANY, wxComboBoxChoice::OnChoice) END_EVENT_TABLE() wxComboBox::~wxComboBox() @@ -275,13 +273,13 @@ void wxComboBox::DoMoveWindow(int x, int y, int width, int height) { { // 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 } @@ -383,7 +381,7 @@ bool wxComboBox::Create(wxWindow *parent, wxWindowID id, //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 ) ); @@ -419,7 +417,7 @@ bool wxComboBox::Create(wxWindow *parent, wxWindowID id, else { m_text = new wxComboBoxText(this); - if ( size.y == -1 ) { + if ( size.y == wxDefaultCoord ) { csize.y = m_text->GetSize().y ; } } @@ -846,4 +844,3 @@ wxInt32 wxComboBox::MacControlHit(WXEVENTHANDLERREF WXUNUSED(handler) , WXEVENTR ProcessCommand(event); return noErr ; } -