diff options
Diffstat (limited to 'wx+')
-rw-r--r-- | wx+/file_drop.h | 6 | ||||
-rw-r--r-- | wx+/graph.cpp | 2 | ||||
-rw-r--r-- | wx+/image_resources.cpp | 12 | ||||
-rw-r--r-- | wx+/image_resources.h | 2 | ||||
-rw-r--r-- | wx+/popup_dlg_generated.cpp | 8 |
5 files changed, 15 insertions, 15 deletions
diff --git a/wx+/file_drop.h b/wx+/file_drop.h index 5a28096d..47019a04 100644 --- a/wx+/file_drop.h +++ b/wx+/file_drop.h @@ -87,11 +87,11 @@ public: private: virtual bool OnDropFiles(wxCoord x, wxCoord y, const wxArrayString& fileArray) { - std::vector<wxString> filenames(fileArray.begin(), fileArray.end()); - if (!filenames.empty()) + std::vector<wxString> filepaths(fileArray.begin(), fileArray.end()); + if (!filepaths.empty()) //create a custom event on drop window: execute event after file dropping is completed! (after mouse is released) if (wxEvtHandler* handler = dropWindow_.GetEventHandler()) - handler->AddPendingEvent(FileDropEvent(filenames, dropWindow_, wxPoint(x, y))); + handler->AddPendingEvent(FileDropEvent(filepaths, dropWindow_, wxPoint(x, y))); return true; } diff --git a/wx+/graph.cpp b/wx+/graph.cpp index 1a8f4376..22358922 100644 --- a/wx+/graph.cpp +++ b/wx+/graph.cpp @@ -10,7 +10,6 @@ #include <numeric> #include <zen/basic_math.h> #include <zen/scope_guard.h> -//#include <wx/settings.h> #include "dc.h" using namespace zen; @@ -224,6 +223,7 @@ void cutPoints(std::vector<CurvePoint>& curvePoints, std::vector<char>& oobMarke { assert(curvePoints.size() == oobMarker.size()); if (curvePoints.size() != oobMarker.size() || curvePoints.empty()) return; + auto isMarkedOob = [&](size_t index) { return oobMarker[index] != 0; }; //test if point is start of a OOB line std::vector<CurvePoint> curvePointsTmp; diff --git a/wx+/image_resources.cpp b/wx+/image_resources.cpp index 09a34de0..3c471e2c 100644 --- a/wx+/image_resources.cpp +++ b/wx+/image_resources.cpp @@ -46,26 +46,26 @@ public: return inst; } - void init(const Zstring& filename); + void init(const Zstring& filepath); const wxBitmap& getImage(const wxString& name) const; const wxAnimation& getAnimation(const wxString& name) const; private: GlobalResources() {} - GlobalResources(const GlobalResources&); - GlobalResources& operator=(const GlobalResources&); + GlobalResources (const GlobalResources&) = delete; + GlobalResources& operator=(const GlobalResources&) = delete; std::map<wxString, wxBitmap> bitmaps; std::map<wxString, wxAnimation> anims; }; -void GlobalResources::init(const Zstring& filename) +void GlobalResources::init(const Zstring& filepath) { assert(bitmaps.empty() && anims.empty()); - wxFFileInputStream input(utfCvrtTo<wxString>(filename)); + wxFFileInputStream input(utfCvrtTo<wxString>(filepath)); if (input.IsOk()) //if not... we don't want to react too harsh here { //activate support for .png files @@ -115,7 +115,7 @@ const wxAnimation& GlobalResources::getAnimation(const wxString& name) const } -void zen::initResourceImages(const Zstring& filename) { GlobalResources::instance().init(filename); } +void zen::initResourceImages(const Zstring& filepath) { GlobalResources::instance().init(filepath); } const wxBitmap& zen::getResourceImage(const wxString& name) { return GlobalResources::instance().getImage(name); } diff --git a/wx+/image_resources.h b/wx+/image_resources.h index 61e0b61c..b16544ac 100644 --- a/wx+/image_resources.h +++ b/wx+/image_resources.h @@ -13,7 +13,7 @@ namespace zen { -void initResourceImages(const Zstring& filename); //pass resources .zip file at application startup +void initResourceImages(const Zstring& filepath); //pass resources .zip file at application startup const wxBitmap& getResourceImage (const wxString& name); const wxAnimation& getResourceAnimation(const wxString& name); diff --git a/wx+/popup_dlg_generated.cpp b/wx+/popup_dlg_generated.cpp index f823ed5e..a0a4cd5d 100644 --- a/wx+/popup_dlg_generated.cpp +++ b/wx+/popup_dlg_generated.cpp @@ -52,18 +52,18 @@ PopupDialogGenerated::PopupDialogGenerated( wxWindow* parent, wxWindowID id, con bSizer25 = new wxBoxSizer( wxVERTICAL ); m_checkBoxCustom = new wxCheckBox( this, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); - bSizer25->Add( m_checkBoxCustom, 0, wxALIGN_CENTER_HORIZONTAL|wxTOP|wxRIGHT|wxLEFT, 5 ); + bSizer25->Add( m_checkBoxCustom, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5 ); bSizerStdButtons = new wxBoxSizer( wxHORIZONTAL ); m_buttonAffirmative = new wxButton( this, wxID_YES, _("dummy"), wxDefaultPosition, wxSize( -1,-1 ), 0 ); - bSizerStdButtons->Add( m_buttonAffirmative, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 ); + bSizerStdButtons->Add( m_buttonAffirmative, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); m_buttonNegative = new wxButton( this, wxID_NO, _("dummy"), wxDefaultPosition, wxSize( -1,-1 ), 0 ); - bSizerStdButtons->Add( m_buttonNegative, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 5 ); + bSizerStdButtons->Add( m_buttonNegative, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT, 5 ); m_buttonCancel = new wxButton( this, wxID_CANCEL, _("Cancel"), wxDefaultPosition, wxSize( -1,-1 ), 0 ); - bSizerStdButtons->Add( m_buttonCancel, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 5 ); + bSizerStdButtons->Add( m_buttonCancel, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT, 5 ); bSizer25->Add( bSizerStdButtons, 0, wxALIGN_RIGHT, 5 ); |