xml-copy-editor-code/src/findreplacepanel.h

60 lines
1.5 KiB
C
Raw Normal View History

2007-09-07 23:17:30 +02:00
#ifndef FINDREPLACEPANEL_H
#define FINDREPLACEPANEL_H
#include <wx/wx.h>
#include <iostream>
#include <fstream>
class wxFindReplaceData;
enum
{
2007-09-08 00:25:30 +02:00
ID_FINDREPLACE_FIND_NEXT,
ID_FINDREPLACE_REPLACE,
ID_FINDREPLACE_REPLACE_ALL,
ID_FINDREPLACE_MATCH_CASE,
ID_FINDREPLACE_REGEX
2007-09-07 23:17:30 +02:00
};
class FindReplacePanel : public wxPanel
{
2007-09-08 00:25:30 +02:00
public:
FindReplacePanel (
wxWindow *parent,
int id,
wxFindReplaceData *findDataParameter,
bool isReplacePanel = true,
bool isRegex = true );
2007-09-07 23:17:30 +02:00
~FindReplacePanel();
2007-09-08 00:25:30 +02:00
void OnFindNext ( wxCommandEvent& event );
void OnReplace ( wxCommandEvent& event );
void OnReplaceAll ( wxCommandEvent& event );
2007-09-07 23:17:30 +02:00
void focusOnFind();
bool getIncrementalFind();
bool getRegex();
void refresh();
2007-09-08 00:25:30 +02:00
void setReplaceVisible ( bool b );
void setMatchCase ( bool b );
void setRegex ( bool b );
void flagNotFound ( bool b );
void enableButtons ( bool b );
private:
2007-09-07 23:17:30 +02:00
wxTextCtrl *findEdit, *replaceEdit;
wxStaticText *label1, *label2, *spacer1, *spacer2;
wxButton *findNextButton, *replaceButton, *replaceAllButton;
wxCheckBox *matchCaseBox, *regexBox;
wxFindReplaceData *findData;
wxBoxSizer *sizer;
wxWindow *parent;
size_t findEditLength;
bool matchCaseMemory, regexMemory;
bool incrementalFind, isReplaceDialog, notFoundSet, isRegex;
2007-09-08 00:25:30 +02:00
void OnIdle ( wxIdleEvent& event );
void sendFindEvent ( size_t flags );
2007-09-07 23:17:30 +02:00
DECLARE_EVENT_TABLE()
};
#endif