removed clearing (done anyway)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@13114 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -128,44 +128,20 @@ void wxStaticText::OnDraw( wxDC &dc )
|
|||||||
if (m_width <= 0 || m_height <= 0)
|
if (m_width <= 0 || m_height <= 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
wxString paragraph;
|
wxString paragraph;
|
||||||
int i = 0 ;
|
int i = 0 ;
|
||||||
wxString text = m_label;
|
wxString text = m_label;
|
||||||
|
while (i < text.Length())
|
||||||
|
{
|
||||||
|
paragraph += text[i];
|
||||||
|
|
||||||
PrepareDC(dc);
|
if (text[i] == 13 || text[i] == 10)
|
||||||
|
DrawParagraph(dc, paragraph);
|
||||||
|
|
||||||
bool doClear = true ;
|
++i;
|
||||||
WindowRef window = GetMacRootWindow() ;
|
}
|
||||||
if ( window )
|
if (paragraph.Length() > 0)
|
||||||
{
|
DrawParagraph(dc, paragraph);
|
||||||
wxWindow* win = wxFindWinFromMacWindow( window ) ;
|
|
||||||
if ( win )
|
|
||||||
{
|
|
||||||
wxWindow* parent = GetParent() ;
|
|
||||||
while ( parent )
|
|
||||||
{
|
|
||||||
if( parent->MacGetWindowData() )
|
|
||||||
{
|
|
||||||
break ;
|
|
||||||
}
|
|
||||||
|
|
||||||
parent = parent->GetParent() ;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
while (i < text.Length())
|
|
||||||
{
|
|
||||||
paragraph += text[i];
|
|
||||||
|
|
||||||
if (text[i] == 13 || text[i] == 10)
|
|
||||||
DrawParagraph(dc, paragraph);
|
|
||||||
|
|
||||||
++i;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (paragraph.Length() > 0)
|
|
||||||
DrawParagraph(dc, paragraph);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxStaticText::OnPaint( wxPaintEvent &event )
|
void wxStaticText::OnPaint( wxPaintEvent &event )
|
||||||
@@ -227,13 +203,11 @@ wxSize wxStaticText::DoGetBestSize() const
|
|||||||
|
|
||||||
void wxStaticText::SetLabel(const wxString& st )
|
void wxStaticText::SetLabel(const wxString& st )
|
||||||
{
|
{
|
||||||
SetTitle( st ) ;
|
SetTitle( st ) ;
|
||||||
m_label = st ;
|
m_label = st ;
|
||||||
if ( !(GetWindowStyle() & wxST_NO_AUTORESIZE) )
|
if ( !(GetWindowStyle() & wxST_NO_AUTORESIZE) )
|
||||||
SetSize( GetBestSize() ) ;
|
SetSize( GetBestSize() ) ;
|
||||||
|
|
||||||
Refresh() ;
|
Refresh() ;
|
||||||
MacUpdateImmediately() ;
|
Update() ;
|
||||||
// wxClientDC dc(this);
|
|
||||||
// OnDraw( dc ) ;
|
|
||||||
}
|
}
|
||||||
|
@@ -128,44 +128,20 @@ void wxStaticText::OnDraw( wxDC &dc )
|
|||||||
if (m_width <= 0 || m_height <= 0)
|
if (m_width <= 0 || m_height <= 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
wxString paragraph;
|
wxString paragraph;
|
||||||
int i = 0 ;
|
int i = 0 ;
|
||||||
wxString text = m_label;
|
wxString text = m_label;
|
||||||
|
while (i < text.Length())
|
||||||
|
{
|
||||||
|
paragraph += text[i];
|
||||||
|
|
||||||
PrepareDC(dc);
|
if (text[i] == 13 || text[i] == 10)
|
||||||
|
DrawParagraph(dc, paragraph);
|
||||||
|
|
||||||
bool doClear = true ;
|
++i;
|
||||||
WindowRef window = GetMacRootWindow() ;
|
}
|
||||||
if ( window )
|
if (paragraph.Length() > 0)
|
||||||
{
|
DrawParagraph(dc, paragraph);
|
||||||
wxWindow* win = wxFindWinFromMacWindow( window ) ;
|
|
||||||
if ( win )
|
|
||||||
{
|
|
||||||
wxWindow* parent = GetParent() ;
|
|
||||||
while ( parent )
|
|
||||||
{
|
|
||||||
if( parent->MacGetWindowData() )
|
|
||||||
{
|
|
||||||
break ;
|
|
||||||
}
|
|
||||||
|
|
||||||
parent = parent->GetParent() ;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
while (i < text.Length())
|
|
||||||
{
|
|
||||||
paragraph += text[i];
|
|
||||||
|
|
||||||
if (text[i] == 13 || text[i] == 10)
|
|
||||||
DrawParagraph(dc, paragraph);
|
|
||||||
|
|
||||||
++i;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (paragraph.Length() > 0)
|
|
||||||
DrawParagraph(dc, paragraph);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxStaticText::OnPaint( wxPaintEvent &event )
|
void wxStaticText::OnPaint( wxPaintEvent &event )
|
||||||
@@ -227,13 +203,11 @@ wxSize wxStaticText::DoGetBestSize() const
|
|||||||
|
|
||||||
void wxStaticText::SetLabel(const wxString& st )
|
void wxStaticText::SetLabel(const wxString& st )
|
||||||
{
|
{
|
||||||
SetTitle( st ) ;
|
SetTitle( st ) ;
|
||||||
m_label = st ;
|
m_label = st ;
|
||||||
if ( !(GetWindowStyle() & wxST_NO_AUTORESIZE) )
|
if ( !(GetWindowStyle() & wxST_NO_AUTORESIZE) )
|
||||||
SetSize( GetBestSize() ) ;
|
SetSize( GetBestSize() ) ;
|
||||||
|
|
||||||
Refresh() ;
|
Refresh() ;
|
||||||
MacUpdateImmediately() ;
|
Update() ;
|
||||||
// wxClientDC dc(this);
|
|
||||||
// OnDraw( dc ) ;
|
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user