mirror of https://github.com/PCSX2/pcsx2.git
Delete various unused px stuff.
This commit is contained in:
parent
13e09953af
commit
7d71e28bfc
|
@ -115,13 +115,6 @@ void pxCheckBox::OnCheckpartCommand(wxCommandEvent& evt)
|
|||
GetEventHandler()->ProcessEvent(newevt);
|
||||
}
|
||||
|
||||
void pxCheckBox::OnSubtextClicked(wxCommandEvent& evt)
|
||||
{
|
||||
// TODO?
|
||||
// We can enable the ability to allow clicks on the subtext desc/label to toggle
|
||||
// the checkmark. Not sure if that's desirable.
|
||||
}
|
||||
|
||||
void operator+=(wxSizer& target, pxCheckBox* src)
|
||||
{
|
||||
if (src)
|
||||
|
|
|
@ -90,7 +90,6 @@ public:
|
|||
protected:
|
||||
void Init(const wxString& label, const wxString& subtext, int flags);
|
||||
void OnCheckpartCommand(wxCommandEvent& evt);
|
||||
void OnSubtextClicked(wxCommandEvent& evt);
|
||||
};
|
||||
|
||||
extern void operator+=(wxSizer& target, pxCheckBox& src);
|
||||
|
|
|
@ -107,40 +107,6 @@ pxStaticText& pxStaticText::Bold()
|
|||
return *this;
|
||||
}
|
||||
|
||||
pxStaticText& pxStaticText::PaddingPixH(int pixels)
|
||||
{
|
||||
m_paddingPix_horiz = pixels;
|
||||
UpdateWrapping(false);
|
||||
Refresh();
|
||||
return *this;
|
||||
}
|
||||
|
||||
pxStaticText& pxStaticText::PaddingPixV(int pixels)
|
||||
{
|
||||
m_paddingPix_vert = pixels;
|
||||
Refresh();
|
||||
return *this;
|
||||
}
|
||||
|
||||
pxStaticText& pxStaticText::PaddingPctH(float pct)
|
||||
{
|
||||
pxAssert(pct < 0.5);
|
||||
|
||||
m_paddingPct_horiz = pct;
|
||||
UpdateWrapping(false);
|
||||
Refresh();
|
||||
return *this;
|
||||
}
|
||||
|
||||
pxStaticText& pxStaticText::PaddingPctV(float pct)
|
||||
{
|
||||
pxAssert(pct < 0.5);
|
||||
|
||||
m_paddingPct_vert = pct;
|
||||
Refresh();
|
||||
return *this;
|
||||
}
|
||||
|
||||
pxStaticText& pxStaticText::Unwrapped()
|
||||
{
|
||||
m_autowrap = false;
|
||||
|
@ -200,30 +166,6 @@ wxSize pxStaticText::GetBestWrappedSize(const wxClientDC& dc) const
|
|||
return dc.GetMultiLineTextExtent(pxTextWrapper().Wrap(this, m_label, idealWidth - calcPaddingWidth(idealWidth)).GetResult());
|
||||
}
|
||||
|
||||
pxStaticText& pxStaticText::WrapAt(int width)
|
||||
{
|
||||
m_autowrap = false;
|
||||
|
||||
if ((width <= 1) || (width == m_wrappedWidth))
|
||||
return *this;
|
||||
|
||||
wxString wrappedLabel;
|
||||
m_wrappedWidth = width;
|
||||
|
||||
if (width > 1)
|
||||
wrappedLabel = pxTextWrapper().Wrap(this, m_label, width).GetResult();
|
||||
|
||||
if (m_wrappedLabel != wrappedLabel)
|
||||
{
|
||||
m_wrappedLabel = wrappedLabel;
|
||||
wxSize area = wxClientDC(this).GetMultiLineTextExtent(m_wrappedLabel);
|
||||
SetMinSize(wxSize(
|
||||
area.GetWidth() + calcPaddingWidth(area.GetWidth()),
|
||||
area.GetHeight() + calcPaddingHeight(area.GetHeight())));
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
|
||||
bool pxStaticText::_updateWrapping(bool textChanged)
|
||||
{
|
||||
if (!m_autowrap)
|
||||
|
@ -329,32 +271,6 @@ void pxStaticText::paintEvent(wxPaintEvent& evt)
|
|||
//dc.DrawRectangle(wxPoint(), dc.GetSize());
|
||||
}
|
||||
|
||||
// Overloaded form wxPanel and friends.
|
||||
wxSize pxStaticText::DoGetBestSize() const
|
||||
{
|
||||
wxClientDC dc(const_cast<pxStaticText*>(this));
|
||||
dc.SetFont(GetFontOk());
|
||||
|
||||
wxSize best;
|
||||
|
||||
if (m_autowrap)
|
||||
{
|
||||
best = GetBestWrappedSize(dc);
|
||||
//best.x = wxDefaultCoord;
|
||||
}
|
||||
else
|
||||
{
|
||||
// No autowrapping, so we can force a specific size here!
|
||||
best = dc.GetMultiLineTextExtent(GetLabel());
|
||||
best.x += calcPaddingWidth(best.x);
|
||||
}
|
||||
|
||||
best.y += calcPaddingHeight(best.y);
|
||||
|
||||
CacheBestSize(best);
|
||||
return best;
|
||||
}
|
||||
|
||||
// --------------------------------------------------------------------------------------
|
||||
// pxStaticHeading (implementations)
|
||||
// --------------------------------------------------------------------------------------
|
||||
|
|
|
@ -75,23 +75,14 @@ public:
|
|||
pxStaticText& SetHeight(int lines);
|
||||
pxStaticText& Align(wxAlignment align);
|
||||
pxStaticText& Bold();
|
||||
pxStaticText& WrapAt(int width);
|
||||
|
||||
pxStaticText& Unwrapped();
|
||||
|
||||
pxStaticText& PaddingPixH(int pixels);
|
||||
pxStaticText& PaddingPixV(int pixels);
|
||||
|
||||
pxStaticText& PaddingPctH(float pct);
|
||||
pxStaticText& PaddingPctV(float pct);
|
||||
//pxStaticText& DoBestGuessHeight();
|
||||
|
||||
protected:
|
||||
void SetPaddingDefaults();
|
||||
void Init(const wxString& label);
|
||||
|
||||
wxSize GetBestWrappedSize(const wxClientDC& dc) const;
|
||||
wxSize DoGetBestSize() const;
|
||||
|
||||
int calcPaddingWidth(int newWidth) const;
|
||||
int calcPaddingHeight(int newHeight) const;
|
||||
|
|
|
@ -81,12 +81,6 @@ pxWindowTextWriter& pxWindowTextWriter::SetY(int ypos)
|
|||
return *this;
|
||||
}
|
||||
|
||||
pxWindowTextWriter& pxWindowTextWriter::MoveY(int ydelta)
|
||||
{
|
||||
m_curpos.y += ydelta;
|
||||
return *this;
|
||||
}
|
||||
|
||||
void pxWindowTextWriter::_DoWriteLn(const wxString& msg)
|
||||
{
|
||||
int tWidth, tHeight;
|
||||
|
@ -145,15 +139,6 @@ pxWindowTextWriter& pxWindowTextWriter::WriteLn(const wxChar* fmt)
|
|||
return *this;
|
||||
}
|
||||
|
||||
pxWindowTextWriter& pxWindowTextWriter::FormatLn(const wxChar* fmt, ...)
|
||||
{
|
||||
va_list args;
|
||||
va_start(args, fmt);
|
||||
_DoWrite(pxsFmtV(fmt, args));
|
||||
va_end(args);
|
||||
return *this;
|
||||
}
|
||||
|
||||
pxWindowTextWriter& pxWindowTextWriter::WriteLn(const wxString fmt)
|
||||
{
|
||||
_DoWrite(fmt.wc_str());
|
||||
|
|
|
@ -688,7 +688,6 @@ public:
|
|||
virtual void OnFontChanged();
|
||||
|
||||
pxWindowTextWriter& WriteLn();
|
||||
pxWindowTextWriter& FormatLn(const wxChar* fmt, ...);
|
||||
pxWindowTextWriter& WriteLn(const wxChar* fmt);
|
||||
pxWindowTextWriter& SetFont(const wxFont& font);
|
||||
pxWindowTextWriter& Align(const wxAlignment& align);
|
||||
|
@ -728,7 +727,6 @@ public:
|
|||
}
|
||||
|
||||
pxWindowTextWriter& SetY(int ypos);
|
||||
pxWindowTextWriter& MoveY(int ydelta);
|
||||
};
|
||||
|
||||
// --------------------------------------------------------------------------------------
|
||||
|
@ -818,7 +816,6 @@ extern wxTextCtrl* CreateNumericalTextCtrl(wxWindow* parent, int digits, long fl
|
|||
|
||||
//////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
extern bool pxDialogExists(const wxString& name);
|
||||
extern bool pxIsValidWindowPosition(const wxWindow& window, const wxPoint& windowPos);
|
||||
extern wxRect wxGetDisplayArea();
|
||||
extern wxString pxGetAppName();
|
||||
|
|
|
@ -65,11 +65,6 @@ void pxFitToDigits(wxSpinCtrl* win, int digits)
|
|||
win->SetMinSize(wxSize(ex + 10 + MagicSpinnerSize, wxDefaultCoord)); // +10 for text control borders/insets and junk.
|
||||
}
|
||||
|
||||
bool pxDialogExists(const wxString& name)
|
||||
{
|
||||
return wxFindWindowByName(name) != NULL;
|
||||
}
|
||||
|
||||
// =====================================================================================================
|
||||
// wxDialogWithHelpers Class Implementations
|
||||
// =====================================================================================================
|
||||
|
|
Loading…
Reference in New Issue