osx new layout

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@55419 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Stefan Csomor
2008-09-02 16:53:23 +00:00
parent 70231bce2d
commit 524c47aa3a
149 changed files with 10286 additions and 9751 deletions

View File

@@ -92,22 +92,7 @@ bool wxDisclosureTriangle::Create(wxWindow *parent, wxWindowID id, const wxStrin
if ( !wxControl::Create(parent, id, pos, size, style, validator, name) )
return false;
#if wxOSX_USE_CARBON
Rect bounds = wxMacGetBoundsForControl( this , pos , size ) ;
m_peer = new wxMacControl(this) ;
OSStatus err = CreateDisclosureTriangleControl(
MAC_WXHWND(parent->MacGetTopLevelWindowRef()) , &bounds,
kControlDisclosureTrianglePointDefault,
wxCFStringRef( label ),
0, // closed
TRUE, // draw title
TRUE, // auto toggle back and forth
m_peer->GetControlRefAddr() );
verify_noerr( err );
#endif
wxASSERT_MSG( m_peer != NULL && m_peer->IsOk() , wxT("No valid Mac control") ) ;
m_peer = wxWidgetImpl::CreateDisclosureTriangle(this, parent, id, label, pos, size, style, GetExtraStyle() );
MacPostControlCreate( pos, size );
// passing the text in the param doesn't seem to work, so lets do if again
@@ -118,16 +103,12 @@ bool wxDisclosureTriangle::Create(wxWindow *parent, wxWindowID id, const wxStrin
void wxDisclosureTriangle::SetOpen( bool open )
{
#if wxOSX_USE_CARBON
m_peer->SetValue( open ? 1 : 0 );
#endif
}
bool wxDisclosureTriangle::IsOpen() const
{
#if wxOSX_USE_CARBON
return m_peer->GetValue() == 1;
#endif
}
bool wxDisclosureTriangle::HandleClicked( double timestampsec )