Working on a new replacement for pxStaticText, which should hopefully have more reliable centering and wrapping behavior. Will finish it up later.

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@3143 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
Jake.Stine committed 2010-06-02 15:58:34 +00:00
1 parent 2f69597052
commit dd021b1ea1
13 files changed
+163 -491

No files matched your search

+32 -2
View File
@@ -456,6 +456,7 @@ public:
}
pxTextWrapper& Wrap( const wxWindow& win, const wxString& text, int widthMax );
pxTextWrapper& Wrap( const wxWindow* win, const wxString& text, int widthMax );
protected:
virtual void OnOutputLine(const wxString& line);
@@ -484,8 +485,8 @@ public:
m_curpos = wxPoint();
m_align = wxALIGN_CENTER;
m_leading = 2;
OnFontChanged();
OnFontChanged();
}
virtual ~pxWindowTextWriter() throw()
@@ -537,6 +538,35 @@ public:
pxWindowTextWriter& MoveY( int ydelta );
};
// --------------------------------------------------------------------------------------
// pxStaticTextImproved
// --------------------------------------------------------------------------------------
class pxStaticTextImproved : public wxPanelWithHelpers
{
typedef wxPanelWithHelpers _parent;
protected:
wxAlignment m_align;
wxString m_wrappedLabel;
bool m_autowrap;
int m_wrappedWidth;
int m_padding_horiz;
public:
pxStaticTextImproved( wxWindow* parent=NULL, const wxString& label=wxEmptyString, wxAlignment align=wxALIGN_CENTER );
pxStaticTextImproved( wxWindow* parent, int heightInLines, const wxString& label=wxEmptyString, wxAlignment align=wxALIGN_CENTER );
virtual ~pxStaticTextImproved() throw() {}
virtual void SetLabel(const wxString& label);
pxStaticTextImproved& Unwrapped();
protected:
void Init();
void paintEvent(wxPaintEvent& evt);
void UpdateWrapping( bool textChanged );
};
// --------------------------------------------------------------------------------------
// MoreStockCursors
// --------------------------------------------------------------------------------------