]> git.saurik.com Git - wxWidgets.git/commitdiff
show/hide via moving
authorStefan Csomor <csomor@advancedconcepts.ch>
Tue, 21 May 2002 20:44:36 +0000 (20:44 +0000)
committerStefan Csomor <csomor@advancedconcepts.ch>
Tue, 21 May 2002 20:44:36 +0000 (20:44 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@15628 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/mac/carbon/textctrl.cpp
src/mac/textctrl.cpp

index 3b664ca789d737912aad8f15f5698c853f2ba6bf..3af794db3546dcce20df4798947a4fbaaf65d8a7 100644 (file)
@@ -185,6 +185,7 @@ static pascal void TPPaneDrawProc(ControlRef theControl, ControlPartCode thePart
     char state;
     Rect bounds;
         /* set up our globals */
+        
     tpvars = (STPTextPaneVars **) GetControlReference(theControl);
     if (tpvars != NULL) {
         state = HGetState((Handle) tpvars);
@@ -1349,6 +1350,40 @@ void wxTextCtrl::OnChar(wxKeyEvent& event)
     }
 }
 
+void  wxTextCtrl::MacSuperShown( bool show ) 
+{
+    bool former = m_macControlIsShown ;
+    wxControl::MacSuperShown( show ) ;
+    if ( (former != m_macControlIsShown) && m_macUsesTXN )
+    {
+        if ( m_macControlIsShown )
+               TXNSetFrameBounds( (TXNObject) m_macTXN, (**(STPTextPaneVars **)m_macTXNvars).fRTextArea.top, (**(STPTextPaneVars **)m_macTXNvars).fRTextArea.left, 
+                           (**(STPTextPaneVars **)m_macTXNvars).fRTextArea.bottom,(**(STPTextPaneVars **)m_macTXNvars).fRTextArea.right, (**(STPTextPaneVars **)m_macTXNvars).fTXNFrame);
+        else
+               TXNSetFrameBounds( (TXNObject) m_macTXN, (**(STPTextPaneVars **)m_macTXNvars).fRTextArea.top + 30000, (**(STPTextPaneVars **)m_macTXNvars).fRTextArea.left, 
+                          (**(STPTextPaneVars **)m_macTXNvars).fRTextArea.bottom + 30000, (**(STPTextPaneVars **)m_macTXNvars).fRTextArea.right, (**(STPTextPaneVars **)m_macTXNvars).fTXNFrame);
+    }
+}
+
+bool  wxTextCtrl::Show(bool show) 
+{
+    bool former = m_macControlIsShown ;
+    
+    bool retval = wxControl::Show( show ) ;
+    
+    if ( former != m_macControlIsShown )
+    {
+        if ( m_macControlIsShown )
+               TXNSetFrameBounds( (TXNObject) m_macTXN, (**(STPTextPaneVars **)m_macTXNvars).fRTextArea.top, (**(STPTextPaneVars **)m_macTXNvars).fRTextArea.left, 
+                           (**(STPTextPaneVars **)m_macTXNvars).fRTextArea.bottom,(**(STPTextPaneVars **)m_macTXNvars).fRTextArea.right, (**(STPTextPaneVars **)m_macTXNvars).fTXNFrame);
+        else
+               TXNSetFrameBounds( (TXNObject) m_macTXN, (**(STPTextPaneVars **)m_macTXNvars).fRTextArea.top + 30000, (**(STPTextPaneVars **)m_macTXNvars).fRTextArea.left, 
+                          (**(STPTextPaneVars **)m_macTXNvars).fRTextArea.bottom + 30000, (**(STPTextPaneVars **)m_macTXNvars).fRTextArea.right, (**(STPTextPaneVars **)m_macTXNvars).fTXNFrame);
+    }
+    
+    return retval ;
+}
+
 // ----------------------------------------------------------------------------
 // standard handlers for standard edit menu events
 // ----------------------------------------------------------------------------
index 3b664ca789d737912aad8f15f5698c853f2ba6bf..3af794db3546dcce20df4798947a4fbaaf65d8a7 100644 (file)
@@ -185,6 +185,7 @@ static pascal void TPPaneDrawProc(ControlRef theControl, ControlPartCode thePart
     char state;
     Rect bounds;
         /* set up our globals */
+        
     tpvars = (STPTextPaneVars **) GetControlReference(theControl);
     if (tpvars != NULL) {
         state = HGetState((Handle) tpvars);
@@ -1349,6 +1350,40 @@ void wxTextCtrl::OnChar(wxKeyEvent& event)
     }
 }
 
+void  wxTextCtrl::MacSuperShown( bool show ) 
+{
+    bool former = m_macControlIsShown ;
+    wxControl::MacSuperShown( show ) ;
+    if ( (former != m_macControlIsShown) && m_macUsesTXN )
+    {
+        if ( m_macControlIsShown )
+               TXNSetFrameBounds( (TXNObject) m_macTXN, (**(STPTextPaneVars **)m_macTXNvars).fRTextArea.top, (**(STPTextPaneVars **)m_macTXNvars).fRTextArea.left, 
+                           (**(STPTextPaneVars **)m_macTXNvars).fRTextArea.bottom,(**(STPTextPaneVars **)m_macTXNvars).fRTextArea.right, (**(STPTextPaneVars **)m_macTXNvars).fTXNFrame);
+        else
+               TXNSetFrameBounds( (TXNObject) m_macTXN, (**(STPTextPaneVars **)m_macTXNvars).fRTextArea.top + 30000, (**(STPTextPaneVars **)m_macTXNvars).fRTextArea.left, 
+                          (**(STPTextPaneVars **)m_macTXNvars).fRTextArea.bottom + 30000, (**(STPTextPaneVars **)m_macTXNvars).fRTextArea.right, (**(STPTextPaneVars **)m_macTXNvars).fTXNFrame);
+    }
+}
+
+bool  wxTextCtrl::Show(bool show) 
+{
+    bool former = m_macControlIsShown ;
+    
+    bool retval = wxControl::Show( show ) ;
+    
+    if ( former != m_macControlIsShown )
+    {
+        if ( m_macControlIsShown )
+               TXNSetFrameBounds( (TXNObject) m_macTXN, (**(STPTextPaneVars **)m_macTXNvars).fRTextArea.top, (**(STPTextPaneVars **)m_macTXNvars).fRTextArea.left, 
+                           (**(STPTextPaneVars **)m_macTXNvars).fRTextArea.bottom,(**(STPTextPaneVars **)m_macTXNvars).fRTextArea.right, (**(STPTextPaneVars **)m_macTXNvars).fTXNFrame);
+        else
+               TXNSetFrameBounds( (TXNObject) m_macTXN, (**(STPTextPaneVars **)m_macTXNvars).fRTextArea.top + 30000, (**(STPTextPaneVars **)m_macTXNvars).fRTextArea.left, 
+                          (**(STPTextPaneVars **)m_macTXNvars).fRTextArea.bottom + 30000, (**(STPTextPaneVars **)m_macTXNvars).fRTextArea.right, (**(STPTextPaneVars **)m_macTXNvars).fTXNFrame);
+    }
+    
+    return retval ;
+}
+
 // ----------------------------------------------------------------------------
 // standard handlers for standard edit menu events
 // ----------------------------------------------------------------------------