mirror of
https://github.com/PCSX2/pcsx2.git
synced 2026-11-18 20:14:23 +01:00
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:
1 parent
2f69597052
commit
dd021b1ea1
13 files changed
+163
-491
No files matched your search
@@ -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
|
||||
// --------------------------------------------------------------------------------------
|
||||
|
||||
Reference in new issue
Block a user