show/hide via moving

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@15628 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Stefan Csomor
2002-05-21 20:44:36 +00:00
parent e6c1d9afee
commit fd4393b845
2 changed files with 70 additions and 0 deletions

View 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
// ----------------------------------------------------------------------------