X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/422644a3173c7309f1b67f138ed6cdfeaa24ddf1..a174f139e105c38ae852104eb6a894b3a0d88e07:/src/mac/carbon/listbox.cpp diff --git a/src/mac/carbon/listbox.cpp b/src/mac/carbon/listbox.cpp index 4358e40e2e..8aa4fda2a3 100644 --- a/src/mac/carbon/listbox.cpp +++ b/src/mac/carbon/listbox.cpp @@ -124,6 +124,7 @@ static pascal void wxMacListDefinition( short message, Boolean isSelected, Rect extern "C" void MacDrawStringCell(Rect *cellRect, Cell lCell, ListHandle theList, long refCon) ; const short kwxMacListWithVerticalScrollbar = 128 ; +const short kwxMacListItemHeight = 14 ; // ============================================================================ // list box control implementation @@ -162,12 +163,13 @@ bool wxListBox::Create(wxWindow *parent, wxWindowID id, macListDefUPP = NewListDefUPP( wxMacListDefinition ); } listDef.u.userProc = macListDefUPP ; + #if TARGET_CARBON Size asize; CreateListBoxControl( parent->MacGetRootWindow(), &bounds, false, 0, 1, false, true, - 14, 14, false, &listDef, &m_macControl ); + kwxMacListItemHeight, kwxMacListItemHeight, false, &listDef, &m_macControl ); GetControlData(m_macControl, kControlNoPart, kControlListBoxListHandleTag, sizeof(ListHandle), (Ptr) &m_macList, &asize); @@ -176,6 +178,7 @@ bool wxListBox::Create(wxWindow *parent, wxWindowID id, SetControlVisibility(m_macControl, false, false); #else + long result ; m_macControl = ::NewControl( parent->MacGetRootWindow() , &bounds , title , false , @@ -195,9 +198,8 @@ bool wxListBox::Create(wxWindow *parent, wxWindowID id, } Point pt = (**m_macList).cellSize ; - pt.v = 14 ; + pt.v = kwxMacListItemHeight ; LCellSize( pt , m_macList ) ; - LAddColumn( 1 , 0 , m_macList ) ; #endif OptionBits options = 0; @@ -585,12 +587,8 @@ void wxListBox::SetupColours() void wxListBox::Refresh(bool eraseBack, const wxRect *rect) { - // Set up port - WindowRef rootwindow = MacGetRootWindow() ; - wxWindow* wxrootwindow = wxFindWinFromMacWindow( rootwindow ) ; - wxMacDrawingHelper focus( wxrootwindow ); - - UMADrawControl(m_macControl); + wxControl::Refresh( eraseBack , rect ) ; +// MacRedrawControl() ; } #if wxUSE_OWNER_DRAWN