2013-01-11 18:35:39 +01:00
|
|
|
// Copyright (c) 2013, Thomas Goyne <plorkyeran@aegisub.org>
|
2006-01-16 22:02:54 +01:00
|
|
|
//
|
2013-01-11 18:35:39 +01:00
|
|
|
// Permission to use, copy, modify, and distribute this software for any
|
|
|
|
// purpose with or without fee is hereby granted, provided that the above
|
|
|
|
// copyright notice and this permission notice appear in all copies.
|
2006-01-16 22:02:54 +01:00
|
|
|
//
|
2013-01-11 18:35:39 +01:00
|
|
|
// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
|
|
|
// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
|
|
|
// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
|
|
|
// ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
|
|
|
// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
|
|
|
// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
|
|
|
// OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
2006-01-16 22:02:54 +01:00
|
|
|
//
|
2009-07-29 07:43:02 +02:00
|
|
|
// Aegisub Project http://www.aegisub.org/
|
|
|
|
|
|
|
|
/// @file dialog_search_replace.h
|
|
|
|
/// @see dialog_search_replace.cpp
|
|
|
|
/// @ingroup secondary_ui
|
|
|
|
///
|
2006-01-16 22:02:54 +01:00
|
|
|
|
2013-06-10 15:58:13 +02:00
|
|
|
#include <memory>
|
2013-01-11 18:35:39 +01:00
|
|
|
|
2007-09-12 01:22:26 +02:00
|
|
|
#include <wx/dialog.h>
|
2006-01-16 22:02:54 +01:00
|
|
|
|
2011-01-16 08:17:36 +01:00
|
|
|
namespace agi { struct Context; }
|
2013-01-11 18:35:39 +01:00
|
|
|
class SearchReplaceEngine;
|
|
|
|
struct SearchReplaceSettings;
|
2013-01-11 06:22:10 +01:00
|
|
|
class wxComboBox;
|
2006-01-16 22:02:54 +01:00
|
|
|
|
2014-03-13 02:39:07 +01:00
|
|
|
class DialogSearchReplace final : public wxDialog {
|
2013-01-11 17:53:36 +01:00
|
|
|
agi::Context *c;
|
2013-06-10 15:58:13 +02:00
|
|
|
std::unique_ptr<SearchReplaceSettings> settings;
|
2013-01-11 18:35:39 +01:00
|
|
|
bool has_replace;
|
|
|
|
wxComboBox *find_edit;
|
|
|
|
wxComboBox *replace_edit;
|
2006-01-16 22:02:54 +01:00
|
|
|
|
2006-12-29 23:58:09 +01:00
|
|
|
void UpdateDropDowns();
|
2013-01-11 18:35:39 +01:00
|
|
|
void FindReplace(bool (SearchReplaceEngine::*func)());
|
2006-12-29 23:58:09 +01:00
|
|
|
|
2006-01-16 22:02:54 +01:00
|
|
|
public:
|
2013-01-11 18:35:39 +01:00
|
|
|
static void Show(agi::Context *context, bool with_replace);
|
|
|
|
|
|
|
|
DialogSearchReplace(agi::Context* c, bool with_replace);
|
2006-01-16 22:02:54 +01:00
|
|
|
~DialogSearchReplace();
|
|
|
|
};
|