]> git.saurik.com Git - wxWidgets.git/commitdiff
moving collapsible pane a few steps forward os OSX
authorStefan Csomor <csomor@advancedconcepts.ch>
Sat, 8 Dec 2007 22:32:21 +0000 (22:32 +0000)
committerStefan Csomor <csomor@advancedconcepts.ch>
Sat, 8 Dec 2007 22:32:21 +0000 (22:32 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@50589 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/mac/carbon/button.cpp

index 0f95274ff4a2a42ecb7037c11b818ddfbe0f490a..1c04183a780c5c4870bc36300e4e93e5939e5703 100644 (file)
@@ -229,39 +229,30 @@ bool wxDisclosureTriangle::Create(wxWindow *parent, wxWindowID id, const wxStrin
     OSStatus err = CreateDisclosureTriangleControl(
             MAC_WXHWND(parent->MacGetTopLevelWindowRef()) , &bounds, 
             kControlDisclosureTrianglePointDefault,
-            CFSTR("Test"),
+            wxCFStringRef( label ),
             0,    // closed
             TRUE, // draw title
             TRUE, // auto toggle back and forth
             m_peer->GetControlRefAddr() );
-            
+           
     verify_noerr( err );
     wxASSERT_MSG( m_peer != NULL && m_peer->Ok() , wxT("No valid Mac control") ) ;
 
     MacPostControlCreate( pos, size );
-
+    // passing the text in the param doesn't seem to work, so lets do if again
+    SetLabel( label );
+    
     return true;
 }
 
 void wxDisclosureTriangle::SetOpen( bool open )
 {
-    // TODO
+    m_peer->SetValue( open ? 1 : 0 );
 }
 
 bool wxDisclosureTriangle::IsOpen() const
 {
-   // TODO
-   return true;
-}
-
-void wxDisclosureTriangle::SetLabel( const wxString &label )
-{
-    // TODO
-}
-
-wxString wxDisclosureTriangle::GetLabel() const
-{
-    return wxEmptyString;
+   return m_peer->GetValue() == 1;
 }
 
 wxInt32 wxDisclosureTriangle::MacControlHit( WXEVENTHANDLERREF WXUNUSED(handler) , WXEVENTREF WXUNUSED(event) )