diff --git a/pcsx2/gui/pxCheckBox.cpp b/pcsx2/gui/pxCheckBox.cpp index 13edae381c..0a57f5abee 100644 --- a/pcsx2/gui/pxCheckBox.cpp +++ b/pcsx2/gui/pxCheckBox.cpp @@ -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) diff --git a/pcsx2/gui/pxCheckBox.h b/pcsx2/gui/pxCheckBox.h index 05262a9b80..a90423b00a 100644 --- a/pcsx2/gui/pxCheckBox.h +++ b/pcsx2/gui/pxCheckBox.h @@ -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); diff --git a/pcsx2/gui/pxStaticText.cpp b/pcsx2/gui/pxStaticText.cpp index 536c3ecdc9..f9c1659c6a 100644 --- a/pcsx2/gui/pxStaticText.cpp +++ b/pcsx2/gui/pxStaticText.cpp @@ -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(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) // -------------------------------------------------------------------------------------- diff --git a/pcsx2/gui/pxStaticText.h b/pcsx2/gui/pxStaticText.h index 13f1d63aa1..abe158c656 100644 --- a/pcsx2/gui/pxStaticText.h +++ b/pcsx2/gui/pxStaticText.h @@ -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; diff --git a/pcsx2/gui/pxWindowTextWriter.cpp b/pcsx2/gui/pxWindowTextWriter.cpp index 1106399cc2..89de27f5b3 100644 --- a/pcsx2/gui/pxWindowTextWriter.cpp +++ b/pcsx2/gui/pxWindowTextWriter.cpp @@ -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()); diff --git a/pcsx2/gui/wxGuiTools.h b/pcsx2/gui/wxGuiTools.h index 79ab0ad2df..7cca4fb268 100644 --- a/pcsx2/gui/wxGuiTools.h +++ b/pcsx2/gui/wxGuiTools.h @@ -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(); diff --git a/pcsx2/gui/wxHelpers.cpp b/pcsx2/gui/wxHelpers.cpp index 706902d478..dd103bd0f5 100644 --- a/pcsx2/gui/wxHelpers.cpp +++ b/pcsx2/gui/wxHelpers.cpp @@ -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 // =====================================================================================================