diff options
author | Daniel Wilhelm <daniel@wili.li> | 2014-04-18 17:29:28 +0200 |
---|---|---|
committer | Daniel Wilhelm <daniel@wili.li> | 2014-04-18 17:29:28 +0200 |
commit | 75c07011b7c4d06acd7b45dabdcd60ab9d80f385 (patch) | |
tree | 8853c3978dd152ef377e652239448b1352320206 /ui/dir_name.h | |
parent | 5.22 (diff) | |
download | FreeFileSync-75c07011b7c4d06acd7b45dabdcd60ab9d80f385.tar.gz FreeFileSync-75c07011b7c4d06acd7b45dabdcd60ab9d80f385.tar.bz2 FreeFileSync-75c07011b7c4d06acd7b45dabdcd60ab9d80f385.zip |
5.23
Diffstat (limited to 'ui/dir_name.h')
-rw-r--r-- | ui/dir_name.h | 64 |
1 files changed, 0 insertions, 64 deletions
diff --git a/ui/dir_name.h b/ui/dir_name.h deleted file mode 100644 index 21f2b574..00000000 --- a/ui/dir_name.h +++ /dev/null @@ -1,64 +0,0 @@ -// ************************************************************************** -// * This file is part of the FreeFileSync project. It is distributed under * -// * GNU General Public License: http://www.gnu.org/licenses/gpl.html * -// * Copyright (C) Zenju (zenju AT gmx DOT de) - All Rights Reserved * -// ************************************************************************** - -#ifndef DRAGANDDROP_H_INCLUDED -#define DRAGANDDROP_H_INCLUDED - -#include <vector> -#include <wx/event.h> -#include <wx/sizer.h> -#include <wx+/file_drop.h> -#include <wx/stattext.h> -#include <wx/button.h> - -namespace zen -{ -//handle drag and drop, tooltip, label and manual input, coordinating a wxWindow, wxButton, and wxComboBox/wxTextCtrl -/* -Reasons NOT to use wxDirPickerCtrl, but wxButton instead: - - Crash on GTK 2: http://favapps.wordpress.com/2012/06/11/freefilesync-crash-in-linux-when-syncing-solved/ - - still uses outdated ::SHBrowseForFolder() (even on Windows 7) - - selection dialog remembers size, but NOT position => if user enlarges window, the next time he opens the dialog it may leap out of visible screen - - hard-codes "Browse" button label -*/ - -extern const wxEventType EVENT_ON_DIR_SELECTED; //directory is changed by the user (except manual type-in) -extern const wxEventType EVENT_ON_DIR_MANUAL_CORRECTION; //manual type-in -//example: wnd.Connect(EVENT_ON_DIR_SELECTED, wxCommandEventHandler(MyDlg::OnDirSelected), nullptr, this); - -template <class NameControl> //NameControl may be wxTextCtrl, FolderHistoryBox -class DirectoryName: public wxEvtHandler -{ -public: - DirectoryName(wxWindow& dropWindow, - wxButton& selectButton, - NameControl& dirName, - wxStaticText* staticText = nullptr, //optional - wxWindow* dropWindow2 = nullptr); // - - ~DirectoryName(); - - wxString getName() const; - void setName(const wxString& dirname); - -private: - virtual bool acceptDrop(const std::vector<wxString>& droppedFiles, const wxPoint& clientPos, const wxWindow& wnd) { return true; }; //return true if drop should be processed - - void onMouseWheel (wxMouseEvent& event); - void onFilesDropped (FileDropEvent& event); - void onWriteDirManually(wxCommandEvent& event); - void onSelectDir (wxCommandEvent& event); - - wxWindow& dropWindow_; - wxWindow* dropWindow2_; - wxButton& selectButton_; - NameControl& dirName_; - wxStaticText* staticText_; //optional -}; -} - - -#endif // DRAGANDDROP_H_INCLUDED |