diff options
author | Daniel Wilhelm <daniel@wili.li> | 2015-10-02 14:53:55 +0200 |
---|---|---|
committer | Daniel Wilhelm <daniel@wili.li> | 2015-10-02 14:53:55 +0200 |
commit | 9321c6bdfc559db6cf436d4ea88198983ce59846 (patch) | |
tree | e711c3373711b70b26de188aa4a893ffd30a1754 /wx+ | |
parent | 6.11 (diff) | |
download | FreeFileSync-9321c6bdfc559db6cf436d4ea88198983ce59846.tar.gz FreeFileSync-9321c6bdfc559db6cf436d4ea88198983ce59846.tar.bz2 FreeFileSync-9321c6bdfc559db6cf436d4ea88198983ce59846.zip |
6.12
Diffstat (limited to 'wx+')
-rw-r--r-- | wx+/app_main.h | 2 | ||||
-rw-r--r-- | wx+/bitmap_button.h | 2 | ||||
-rw-r--r-- | wx+/choice_enum.h | 2 | ||||
-rw-r--r-- | wx+/context_menu.h | 2 | ||||
-rw-r--r-- | wx+/dc.h | 4 | ||||
-rw-r--r-- | wx+/file_drop.h | 2 | ||||
-rw-r--r-- | wx+/font_size.h | 10 | ||||
-rw-r--r-- | wx+/graph.cpp | 2 | ||||
-rw-r--r-- | wx+/graph.h | 2 | ||||
-rw-r--r-- | wx+/grid.cpp | 4 | ||||
-rw-r--r-- | wx+/grid.h | 2 | ||||
-rw-r--r-- | wx+/image_resources.cpp | 2 | ||||
-rw-r--r-- | wx+/image_resources.h | 2 | ||||
-rw-r--r-- | wx+/image_tools.cpp | 2 | ||||
-rw-r--r-- | wx+/image_tools.h | 2 | ||||
-rw-r--r-- | wx+/key_event.h | 118 | ||||
-rw-r--r-- | wx+/no_flicker.h | 2 | ||||
-rw-r--r-- | wx+/popup_dlg.cpp | 4 | ||||
-rw-r--r-- | wx+/popup_dlg.h | 2 | ||||
-rw-r--r-- | wx+/rtl.h | 2 | ||||
-rw-r--r-- | wx+/std_button_layout.h | 2 | ||||
-rw-r--r-- | wx+/string_conv.h | 2 | ||||
-rw-r--r-- | wx+/timespan.h | 2 | ||||
-rw-r--r-- | wx+/toggle_button.h | 2 | ||||
-rw-r--r-- | wx+/tooltip.cpp | 2 | ||||
-rw-r--r-- | wx+/tooltip.h | 2 | ||||
-rw-r--r-- | wx+/zlib_wrap.cpp | 6 | ||||
-rw-r--r-- | wx+/zlib_wrap.h | 2 |
28 files changed, 36 insertions, 154 deletions
diff --git a/wx+/app_main.h b/wx+/app_main.h index a13a122d..b97a25ef 100644 --- a/wx+/app_main.h +++ b/wx+/app_main.h @@ -1,6 +1,6 @@ // ************************************************************************** // * This file is part of the FreeFileSync project. It is distributed under * -// * GNU General Public License: http://www.gnu.org/licenses/gpl.html * +// * GNU General Public License: http://www.gnu.org/licenses/gpl-3.0 * // * Copyright (C) Zenju (zenju AT gmx DOT de) - All Rights Reserved * // ************************************************************************** diff --git a/wx+/bitmap_button.h b/wx+/bitmap_button.h index 14476324..6c186926 100644 --- a/wx+/bitmap_button.h +++ b/wx+/bitmap_button.h @@ -1,6 +1,6 @@ // ************************************************************************** // * This file is part of the FreeFileSync project. It is distributed under * -// * GNU General Public License: http://www.gnu.org/licenses/gpl.html * +// * GNU General Public License: http://www.gnu.org/licenses/gpl-3.0 * // * Copyright (C) Zenju (zenju AT gmx DOT de) - All Rights Reserved * // ************************************************************************** diff --git a/wx+/choice_enum.h b/wx+/choice_enum.h index 57718158..6a795d4a 100644 --- a/wx+/choice_enum.h +++ b/wx+/choice_enum.h @@ -1,6 +1,6 @@ // ************************************************************************** // * This file is part of the FreeFileSync project. It is distributed under * -// * GNU General Public License: http://www.gnu.org/licenses/gpl.html * +// * GNU General Public License: http://www.gnu.org/licenses/gpl-3.0 * // * Copyright (C) Zenju (zenju AT gmx DOT de) - All Rights Reserved * // ************************************************************************** diff --git a/wx+/context_menu.h b/wx+/context_menu.h index a498c429..2ae85162 100644 --- a/wx+/context_menu.h +++ b/wx+/context_menu.h @@ -1,6 +1,6 @@ // ************************************************************************** // * This file is part of the FreeFileSync project. It is distributed under * -// * GNU General Public License: http://www.gnu.org/licenses/gpl.html * +// * GNU General Public License: http://www.gnu.org/licenses/gpl-3.0 * // * Copyright (C) Zenju (zenju AT gmx DOT de) - All Rights Reserved * // ************************************************************************** @@ -1,6 +1,6 @@ // ************************************************************************** // * This file is part of the FreeFileSync project. It is distributed under * -// * GNU General Public License: http://www.gnu.org/licenses/gpl.html * +// * GNU General Public License: http://www.gnu.org/licenses/gpl-3.0 * // * Copyright (C) Zenju (zenju AT gmx DOT de) - All Rights Reserved * // ************************************************************************** @@ -84,7 +84,7 @@ private: #ifndef wxALWAYS_NATIVE_DOUBLE_BUFFER -#error we need this one! + #error we need this one! #endif #if wxALWAYS_NATIVE_DOUBLE_BUFFER diff --git a/wx+/file_drop.h b/wx+/file_drop.h index 55772a03..664b4387 100644 --- a/wx+/file_drop.h +++ b/wx+/file_drop.h @@ -1,6 +1,6 @@ // ************************************************************************** // * This file is part of the FreeFileSync project. It is distributed under * -// * GNU General Public License: http://www.gnu.org/licenses/gpl.html * +// * GNU General Public License: http://www.gnu.org/licenses/gpl-3.0 * // * Copyright (C) Zenju (zenju AT gmx DOT de) - All Rights Reserved * // ************************************************************************** diff --git a/wx+/font_size.h b/wx+/font_size.h index 4639d194..c1ea47cd 100644 --- a/wx+/font_size.h +++ b/wx+/font_size.h @@ -1,6 +1,6 @@ // ************************************************************************** // * This file is part of the FreeFileSync project. It is distributed under * -// * GNU General Public License: http://www.gnu.org/licenses/gpl.html * +// * GNU General Public License: http://www.gnu.org/licenses/gpl-3.0 * // * Copyright (C) Zenju (zenju AT gmx DOT de) - All Rights Reserved * // ************************************************************************** @@ -10,10 +10,10 @@ #include <zen/basic_math.h> #include <wx/window.h> #ifdef ZEN_WIN -#include <zen/dll.h> -#include <Uxtheme.h> -#include <vsstyle.h> //TEXT_MAININSTRUCTION -#include <vssym32.h> //TMT_COLOR + #include <zen/dll.h> + #include <Uxtheme.h> + #include <vsstyle.h> //TEXT_MAININSTRUCTION + #include <vssym32.h> //TMT_COLOR #endif namespace zen diff --git a/wx+/graph.cpp b/wx+/graph.cpp index 67f8e354..cc844144 100644 --- a/wx+/graph.cpp +++ b/wx+/graph.cpp @@ -1,6 +1,6 @@ // ************************************************************************** // * This file is part of the FreeFileSync project. It is distributed under * -// * GNU General Public License: http://www.gnu.org/licenses/gpl.html * +// * GNU General Public License: http://www.gnu.org/licenses/gpl-3.0 * // * Copyright (C) Zenju (zenju AT gmx DOT de) - All Rights Reserved * // ************************************************************************** diff --git a/wx+/graph.h b/wx+/graph.h index 00b0b469..34c7ab3c 100644 --- a/wx+/graph.h +++ b/wx+/graph.h @@ -1,6 +1,6 @@ // ************************************************************************** // * This file is part of the FreeFileSync project. It is distributed under * -// * GNU General Public License: http://www.gnu.org/licenses/gpl.html * +// * GNU General Public License: http://www.gnu.org/licenses/gpl-3.0 * // * Copyright (C) Zenju (zenju AT gmx DOT de) - All Rights Reserved * // ************************************************************************** diff --git a/wx+/grid.cpp b/wx+/grid.cpp index de50d4c6..377510ae 100644 --- a/wx+/grid.cpp +++ b/wx+/grid.cpp @@ -1,6 +1,6 @@ // ************************************************************************** // * This file is part of the FreeFileSync project. It is distributed under * -// * GNU General Public License: http://www.gnu.org/licenses/gpl.html * +// * GNU General Public License: http://www.gnu.org/licenses/gpl-3.0 * // * Copyright (C) Zenju (zenju AT gmx DOT de) - All Rights Reserved * // ************************************************************************** @@ -20,7 +20,7 @@ #include "dc.h" #ifdef ZEN_LINUX -#include <gtk/gtk.h> + #include <gtk/gtk.h> #endif using namespace zen; @@ -1,6 +1,6 @@ // ************************************************************************** // * This file is part of the FreeFileSync project. It is distributed under * -// * GNU General Public License: http://www.gnu.org/licenses/gpl.html * +// * GNU General Public License: http://www.gnu.org/licenses/gpl-3.0 * // * Copyright (C) Zenju (zenju AT gmx DOT de) - All Rights Reserved * // ************************************************************************** diff --git a/wx+/image_resources.cpp b/wx+/image_resources.cpp index 062ad88c..a76a2822 100644 --- a/wx+/image_resources.cpp +++ b/wx+/image_resources.cpp @@ -1,6 +1,6 @@ // ************************************************************************** // * This file is part of the FreeFileSync project. It is distributed under * -// * GNU General Public License: http://www.gnu.org/licenses/gpl.html * +// * GNU General Public License: http://www.gnu.org/licenses/gpl-3.0 * // * Copyright (C) Zenju (zenju AT gmx DOT de) - All Rights Reserved * // ************************************************************************** diff --git a/wx+/image_resources.h b/wx+/image_resources.h index b16544ac..8d7c9b49 100644 --- a/wx+/image_resources.h +++ b/wx+/image_resources.h @@ -1,6 +1,6 @@ // ************************************************************************** // * This file is part of the FreeFileSync project. It is distributed under * -// * GNU General Public License: http://www.gnu.org/licenses/gpl.html * +// * GNU General Public License: http://www.gnu.org/licenses/gpl-3.0 * // * Copyright (C) Zenju (zenju AT gmx DOT de) - All Rights Reserved * // ************************************************************************** diff --git a/wx+/image_tools.cpp b/wx+/image_tools.cpp index b1732032..c6be3852 100644 --- a/wx+/image_tools.cpp +++ b/wx+/image_tools.cpp @@ -1,6 +1,6 @@ // ************************************************************************** // * This file is part of the FreeFileSync project. It is distributed under * -// * GNU General Public License: http://www.gnu.org/licenses/gpl.html * +// * GNU General Public License: http://www.gnu.org/licenses/gpl-3.0 * // * Copyright (C) Zenju (zenju AT gmx DOT de) - All Rights Reserved * // ************************************************************************** diff --git a/wx+/image_tools.h b/wx+/image_tools.h index d3a20a45..cb8da60b 100644 --- a/wx+/image_tools.h +++ b/wx+/image_tools.h @@ -1,6 +1,6 @@ // ************************************************************************** // * This file is part of the FreeFileSync project. It is distributed under * -// * GNU General Public License: http://www.gnu.org/licenses/gpl.html * +// * GNU General Public License: http://www.gnu.org/licenses/gpl-3.0 * // * Copyright (C) Zenju (zenju AT gmx DOT de) - All Rights Reserved * // ************************************************************************** diff --git a/wx+/key_event.h b/wx+/key_event.h deleted file mode 100644 index aa094b4a..00000000 --- a/wx+/key_event.h +++ /dev/null @@ -1,118 +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 KEY_EVENT_H_086130871086708354674 -#define KEY_EVENT_H_086130871086708354674 - -#include <functional> -#include <zen/scope_guard.h> -#include <wx/toplevel.h> -#include <wx/window.h> -#include <wx/event.h> - -namespace zen -{ -//wxWidgets provides no elegant way to register shortcut keys scoped for dialog windows -// => enable dialog-specific local key events! - -//setup in wxDialog-derived class' constructor, e.g.: -// setupLocalKeyEvents(*this, [this](wxKeyEvent& event){ this->onLocalKeyEvent(event); }); -// -// => redirects local key events to: -// void MyDlg::onLocalKeyEvent(wxKeyEvent& event); -void setupLocalKeyEvents(wxWindow& wnd, const std::function<void(wxKeyEvent& event)>& callback); //callback held during life time of "wnd"! - - - - - - - -//pretty much the same like "bool wxWindowBase::IsDescendant(wxWindowBase* child) const" but without the obvious misnomer -inline -bool isComponentOf(const wxWindow* child, const wxWindow* top) -{ - for (const wxWindow* wnd = child; wnd != nullptr; wnd = wnd->GetParent()) - if (wnd == top) - return true; - return false; -} - - -namespace impl -{ -inline -const wxTopLevelWindow* getTopLevelWindow(const wxWindow* child) -{ - for (const wxWindow* wnd = child; wnd != nullptr; wnd = wnd->GetParent()) - if (auto tlw = dynamic_cast<const wxTopLevelWindow*>(wnd)) - return tlw; - return nullptr; -} - - -class LokalKeyEventHandler : public wxWindow //private wxEvtHandler -{ -public: - LokalKeyEventHandler(wxWindow& parent, const std::function<void(wxKeyEvent& event)>& callback) : wxWindow(&parent, wxID_ANY), //use a dummy child window to bind instance life time to parent - parent_(parent), - callback_(callback), - processingCallback(false) - { - Hide(); //this is just a dummy window so that its parent can have ownership - Disable(); // - - //register global hotkeys (without needing explicit menu entry) - wxTheApp->Connect(wxEVT_KEY_DOWN, wxKeyEventHandler(LokalKeyEventHandler::onGlobalKeyEvent), nullptr, this); - wxTheApp->Connect(wxEVT_CHAR_HOOK, wxKeyEventHandler(LokalKeyEventHandler::onGlobalKeyEvent), nullptr, this); //capture direction keys - } - - ~LokalKeyEventHandler() - { - //important! event source wxTheApp lives longer than this instance -> disconnect! - wxTheApp->Disconnect(wxEVT_KEY_DOWN, wxKeyEventHandler(LokalKeyEventHandler::onGlobalKeyEvent), nullptr, this); - wxTheApp->Disconnect(wxEVT_CHAR_HOOK, wxKeyEventHandler(LokalKeyEventHandler::onGlobalKeyEvent), nullptr, this); - } - -private: - void onGlobalKeyEvent(wxKeyEvent& event) - { - const wxWindow* focus = wxWindow::FindFocus(); - const wxTopLevelWindow* tlw = getTopLevelWindow(&parent_); - - //avoid recursion!!! -> this ugly construct seems to be the only (portable) way to avoid re-entrancy - //recursion may happen in multiple situations: e.g. modal dialogs, Grid::ProcessEvent()! - if (processingCallback || - !isComponentOf(focus, &parent_) || - !parent_.IsEnabled() || //only handle if window is in use and no modal dialog is shown: - !tlw || !const_cast<wxTopLevelWindow*>(tlw)->IsActive()) //thanks to wxWidgets non-portability we need both checks: - //IsEnabled() is sufficient for Windows, IsActive() is needed on OS X since it does NOT disable the parent when showing a modal dialog - { - event.Skip(); - return; - } - processingCallback = true; - ZEN_ON_SCOPE_EXIT(processingCallback = false;) - - callback_(event); - } - - wxWindow& parent_; - const std::function<void(wxKeyEvent& event)> callback_; - bool processingCallback; -}; -} - - -inline -void setupLocalKeyEvents(wxWindow& wnd, const std::function<void(wxKeyEvent& event)>& callback) -{ - new impl::LokalKeyEventHandler(wnd, callback); //ownership passed to "wnd"! -} - -} - -#endif //KEY_EVENT_H_086130871086708354674 diff --git a/wx+/no_flicker.h b/wx+/no_flicker.h index c5b0d238..fb0585ca 100644 --- a/wx+/no_flicker.h +++ b/wx+/no_flicker.h @@ -1,6 +1,6 @@ // ************************************************************************** // * This file is part of the FreeFileSync project. It is distributed under * -// * GNU General Public License: http://www.gnu.org/licenses/gpl.html * +// * GNU General Public License: http://www.gnu.org/licenses/gpl-3.0 * // * Copyright (C) Zenju (zenju AT gmx DOT de) - All Rights Reserved * // ************************************************************************** diff --git a/wx+/popup_dlg.cpp b/wx+/popup_dlg.cpp index ff0bf125..480021eb 100644 --- a/wx+/popup_dlg.cpp +++ b/wx+/popup_dlg.cpp @@ -1,6 +1,6 @@ // ************************************************************************** // * This file is part of the FreeFileSync project. It is distributed under * -// * GNU General Public License: http://www.gnu.org/licenses/gpl.html * +// * GNU General Public License: http://www.gnu.org/licenses/gpl-3.0 * // * Copyright (C) Zenju (zenju AT gmx DOT de) - All Rights Reserved * // ************************************************************************** @@ -12,7 +12,7 @@ #include "popup_dlg_generated.h" #ifdef ZEN_WIN -#include <wx+/mouse_move_dlg.h> + #include <wx+/mouse_move_dlg.h> #endif using namespace zen; diff --git a/wx+/popup_dlg.h b/wx+/popup_dlg.h index ab988702..eef7ab79 100644 --- a/wx+/popup_dlg.h +++ b/wx+/popup_dlg.h @@ -1,6 +1,6 @@ // ************************************************************************** // * This file is part of the FreeFileSync project. It is distributed under * -// * GNU General Public License: http://www.gnu.org/licenses/gpl.html * +// * GNU General Public License: http://www.gnu.org/licenses/gpl-3.0 * // * Copyright (C) Zenju (zenju AT gmx DOT de) - All Rights Reserved * // ************************************************************************** @@ -1,6 +1,6 @@ // ************************************************************************** // * This file is part of the FreeFileSync project. It is distributed under * -// * GNU General Public License: http://www.gnu.org/licenses/gpl.html * +// * GNU General Public License: http://www.gnu.org/licenses/gpl-3.0 * // * Copyright (C) Zenju (zenju AT gmx DOT de) - All Rights Reserved * // ************************************************************************** diff --git a/wx+/std_button_layout.h b/wx+/std_button_layout.h index b5e30472..f497de2c 100644 --- a/wx+/std_button_layout.h +++ b/wx+/std_button_layout.h @@ -1,6 +1,6 @@ // ************************************************************************** // * This file is part of the FreeFileSync project. It is distributed under * -// * GNU General Public License: http://www.gnu.org/licenses/gpl.html * +// * GNU General Public License: http://www.gnu.org/licenses/gpl-3.0 * // * Copyright (C) Zenju (zenju AT gmx DOT de) - All Rights Reserved * // ************************************************************************** diff --git a/wx+/string_conv.h b/wx+/string_conv.h index e9150223..229a9825 100644 --- a/wx+/string_conv.h +++ b/wx+/string_conv.h @@ -1,6 +1,6 @@ // ************************************************************************** // * This file is part of the FreeFileSync project. It is distributed under * -// * GNU General Public License: http://www.gnu.org/licenses/gpl.html * +// * GNU General Public License: http://www.gnu.org/licenses/gpl-3.0 * // * Copyright (C) Zenju (zenju AT gmx DOT de) - All Rights Reserved * // ************************************************************************** diff --git a/wx+/timespan.h b/wx+/timespan.h index 28c9e673..09469ccb 100644 --- a/wx+/timespan.h +++ b/wx+/timespan.h @@ -1,6 +1,6 @@ // ************************************************************************** // * This file is part of the FreeFileSync project. It is distributed under * -// * GNU General Public License: http://www.gnu.org/licenses/gpl.html * +// * GNU General Public License: http://www.gnu.org/licenses/gpl-3.0 * // * Copyright (C) Zenju (zenju AT gmx DOT de) - All Rights Reserved * // ************************************************************************** diff --git a/wx+/toggle_button.h b/wx+/toggle_button.h index e532d9d8..faa72f66 100644 --- a/wx+/toggle_button.h +++ b/wx+/toggle_button.h @@ -1,6 +1,6 @@ // ************************************************************************** // * This file is part of the FreeFileSync project. It is distributed under * -// * GNU General Public License: http://www.gnu.org/licenses/gpl.html * +// * GNU General Public License: http://www.gnu.org/licenses/gpl-3.0 * // * Copyright (C) Zenju (zenju AT gmx DOT de) - All Rights Reserved * // ************************************************************************** diff --git a/wx+/tooltip.cpp b/wx+/tooltip.cpp index d4bcf302..91298db4 100644 --- a/wx+/tooltip.cpp +++ b/wx+/tooltip.cpp @@ -1,6 +1,6 @@ // ************************************************************************** // * This file is part of the FreeFileSync project. It is distributed under * -// * GNU General Public License: http://www.gnu.org/licenses/gpl.html * +// * GNU General Public License: http://www.gnu.org/licenses/gpl-3.0 * // * Copyright (C) Zenju (zenju AT gmx DOT de) - All Rights Reserved * // ************************************************************************** diff --git a/wx+/tooltip.h b/wx+/tooltip.h index 7f58ff27..d4236186 100644 --- a/wx+/tooltip.h +++ b/wx+/tooltip.h @@ -1,6 +1,6 @@ // ************************************************************************** // * This file is part of the FreeFileSync project. It is distributed under * -// * GNU General Public License: http://www.gnu.org/licenses/gpl.html * +// * GNU General Public License: http://www.gnu.org/licenses/gpl-3.0 * // * Copyright (C) Zenju (zenju AT gmx DOT de) - All Rights Reserved * // ************************************************************************** diff --git a/wx+/zlib_wrap.cpp b/wx+/zlib_wrap.cpp index eccf8698..d25c2c3e 100644 --- a/wx+/zlib_wrap.cpp +++ b/wx+/zlib_wrap.cpp @@ -1,14 +1,14 @@ // ************************************************************************** // * This file is part of the FreeFileSync project. It is distributed under * -// * GNU General Public License: http://www.gnu.org/licenses/gpl.html * +// * GNU General Public License: http://www.gnu.org/licenses/gpl-3.0 * // * Copyright (C) Zenju (zenju AT gmx DOT de) - All Rights Reserved * // ************************************************************************** #include "zlib_wrap.h" #ifdef ZEN_WIN -#include <wx/../../src/zlib/zlib.h> //not really a "nice" place to look for a stable solution + #include <wx/../../src/zlib/zlib.h> //not really a "nice" place to look for a stable solution #elif defined ZEN_LINUX || defined ZEN_MAC -#include <zlib.h> //let's pray this is the same version wxWidgets is linking against! + #include <zlib.h> //let's pray this is the same version wxWidgets is linking against! #endif using namespace zen; diff --git a/wx+/zlib_wrap.h b/wx+/zlib_wrap.h index c271276f..815d8361 100644 --- a/wx+/zlib_wrap.h +++ b/wx+/zlib_wrap.h @@ -1,6 +1,6 @@ // ************************************************************************** // * This file is part of the FreeFileSync project. It is distributed under * -// * GNU General Public License: http://www.gnu.org/licenses/gpl.html * +// * GNU General Public License: http://www.gnu.org/licenses/gpl-3.0 * // * Copyright (C) Zenju (zenju AT gmx DOT de) - All Rights Reserved * // ************************************************************************** |