(parent,
id, caption, pos,
size, style);
77SetExtraStyle(wxWS_EX_BLOCK_EVENTS);
78wxFrame::Create( parent,
id, caption, pos,
size, style );
83GetSizer()->SetSizeHints(
this);
85Centre(wxBOTH|wxCENTRE_ON_SCREEN);
109wxBoxSizer* itemBoxSizer1 =
newwxBoxSizer(wxVERTICAL);
110SetSizer(itemBoxSizer1);
112wxPanel* itemCBulkCmdDlg1 =
newwxPanel(
this,
wxID_ANY);
113itemBoxSizer1->Add(itemCBulkCmdDlg1, 1, wxGROW, 0);
115wxBoxSizer* itemBoxSizer2 =
newwxBoxSizer(wxVERTICAL);
116itemCBulkCmdDlg1->SetSizer(itemBoxSizer2);
118wxBoxSizer* itemBoxSizer4 =
newwxBoxSizer(wxHORIZONTAL);
119itemBoxSizer2->Add(itemBoxSizer4, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
121wxStaticText* itemStaticText5 =
newwxStaticText( itemCBulkCmdDlg1, wxID_STATIC,
_(
"Pattern Word"), wxDefaultPosition, wxDefaultSize, 0 );
122itemBoxSizer4->Add(itemStaticText5, 0, wxALIGN_LEFT|wxALL, 5);
124 m_Pattern=
newwxTextCtrl(itemCBulkCmdDlg1,
wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize(250, -1), 0);
125itemBoxSizer4->Add(
m_Pattern, 0, wxALIGN_LEFT|wxALL, 5);
127 m_Subst=
newwxTextCtrl( itemCBulkCmdDlg1,
wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize(250, 90), wxTE_MULTILINE );
128itemBoxSizer2->Add(
m_Subst, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
130wxBoxSizer* itemBoxSizer12 =
newwxBoxSizer(wxHORIZONTAL);
131itemBoxSizer2->Add(itemBoxSizer12, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
133 m_IgnoreCase=
newwxCheckBox( itemCBulkCmdDlg1,
wxID_ANY,
_(
"Ignore Case"), wxDefaultPosition, wxDefaultSize, 0 );
135itemBoxSizer12->Add(
m_IgnoreCase, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
137 m_WholeWord=
newwxCheckBox( itemCBulkCmdDlg1,
wxID_ANY,
_(
"Whole Word"), wxDefaultPosition, wxDefaultSize, 0 );
139itemBoxSizer12->Add(
m_WholeWord, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
141wxButton* itemButton13 =
newwxButton( itemCBulkCmdDlg1,
ID_WORDSUBST_ADD,
_(
"Add Word Substitution"), wxDefaultPosition, wxDefaultSize, 0 );
142itemBoxSizer2->Add(itemButton13, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
144wxStaticLine *
line1=
newwxStaticLine (itemCBulkCmdDlg1,
wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL);
145itemBoxSizer2->Add(
line1, 0, wxALIGN_CENTER_HORIZONTAL|wxALL|wxSHAPED, 5);
150wxButton* itemButton14 =
newwxButton( itemCBulkCmdDlg1,
ID_WORDSUBST_REMOVE,
_(
"Remove Word Substitution"), wxDefaultPosition, wxDefaultSize, 0 );
151itemBoxSizer2->Add(itemButton14, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
153wxBoxSizer* itemBoxSizer3 =
newwxBoxSizer(wxHORIZONTAL);
154itemBoxSizer2->Add(itemBoxSizer3, 0, wxALIGN_CENTER_HORIZONTAL, 0);
156wxButton* itemButton15 =
newwxButton( itemCBulkCmdDlg1, wxID_OK,
_(
"Accept"), wxDefaultPosition, wxDefaultSize, 0 );
157itemBoxSizer3->Add(itemButton15, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
159wxButton* itemButton16 =
newwxButton( itemCBulkCmdDlg1, wxID_CANCEL,
_(
"Cancel"), wxDefaultPosition, wxDefaultSize, 0 );
160itemBoxSizer3->Add(itemButton16, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
196word_subst->Set().push_back(ws);
199wxWindow* parent = GetParent();
209 if(pattern.empty() || syn.empty())
213ws->SetWord(pattern);
215vector<string> lines;
218 for(
auto&
l: lines)
223ws->SetSynonyms().push_back(
str);
241wxArrayInt checked_items;
244 for(
size_t i= 0;
i< checked_items.GetCount();
i++)
246 intj = checked_items.Item(
i);
251 for(
autorit=to_delete.rbegin(); rit != to_delete.rend(); ++rit)
262 if(ws && ws->IsSetWord() && ws->IsSetSynonyms() && !ws->GetSynonyms().empty())
264 str=
"allow "+ ws->GetWord() +
" to be replaced by "+
NStr::Join(ws->GetSynonyms(),
", ");
266 if(ws->IsSetCase_sensitive() && ws->GetCase_sensitive())
267 str+=
", case-sensitive";
268 if(ws->IsSetWhole_word() && ws->GetWhole_word())
269 str+=
", whole word";
276 if(word_subst && word_subst->IsSet())
278 for(
autows : word_subst->Set())
User-defined methods of the data storage class.
void OnRemove(wxCommandEvent &event)
map< string, CRef< objects::CWord_substitution > > m_label_to_subst
wxCheckListBox * m_CheckListBox
void InitSubstitutions(CRef< objects::CWord_substitution_set > word_subst)
static string GetDescription(CRef< objects::CWord_substitution > ws)
void OnCancel(wxCommandEvent &event)
wxBitmap GetBitmapResource(const wxString &name)
wxIcon GetIconResource(const wxString &name)
wxCheckBox * m_IgnoreCase
void OnAccept(wxCommandEvent &event)
static bool ShowToolTips()
bool Create(wxWindow *parent, wxWindowID id=wxID_ANY, const wxString &caption=_("Word Substitution List"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxCAPTION|wxRESIZE_BORDER|wxSYSTEM_MENU|wxCLOSE_BOX|wxTAB_TRAVERSAL)
void OnAdd(wxCommandEvent &event)
virtual void AddWordSubstSet(CRef< objects::CWord_substitution_set > word_subst)=0
const_iterator end() const
const_iterator find(const key_type &key) const
iterator_bool insert(const value_type &val)
static char line1[1024 *16]
static const char * str(char *buf, int n)
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
static list< string > & Split(const CTempString str, const CTempString delim, list< string > &arr, TSplitFlags flags=0, vector< SIZE_TYPE > *token_pos=NULL)
Split a string using specified delimiters.
static string Join(const TContainer &arr, const CTempString &delim)
Join strings using the specified delimiter.
static string & ReplaceInPlace(string &src, const string &search, const string &replace, SIZE_TYPE start_pos=0, SIZE_TYPE max_replace=0, SIZE_TYPE *num_replace=0)
Replace occurrences of a substring within a string.
static string TruncateSpaces(const string &str, ETrunc where=eTrunc_Both)
Truncate whitespace in a string.
static const char label[]
const struct ncbi::grid::netcache::search::fields::SIZE size
static SLJIT_INLINE sljit_ins l(sljit_gpr r, sljit_s32 d, sljit_gpr x, sljit_gpr b)
#define ID_WORDSUBST_REMOVE
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4