OpenASIP 2.2
Loading...
Searching...
No Matches
FindWindow.hh
Go to the documentation of this file.
1/*
2 Copyright (c) 2002-2017 Tampere University.
3
4 This file is part of TTA-Based Codesign Environment (TCE).
5
6 Permission is hereby granted, free of charge, to any person obtaining a
7 copy of this software and associated documentation files (the "Software"),
8 to deal in the Software without restriction, including without limitation
9 the rights to use, copy, modify, merge, publish, distribute, sublicense,
10 and/or sell copies of the Software, and to permit persons to whom the
11 Software is furnished to do so, subject to the following conditions:
12
13 The above copyright notice and this permission notice shall be included in
14 all copies or substantial portions of the Software.
15
16 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
19 THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21 FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
22 DEALINGS IN THE SOFTWARE.
23 */
24/**
25 * @file FindWindow.hh
26 *
27 * Declaration of FindWindow class.
28 *
29 * @author Alex Hirvonen 2017 (alex.hirvonen-no.spam-gmail.com)
30 * @note rating: red
31 */
32
33
34#ifndef TTA_FIND_WINDOW_HH
35#define TTA_FIND_WINDOW_HH
36
37
38#include <vector>
39#include <string>
40#include <wx/wx.h>
41#include <wx/checkbox.h>
42
44
45
46/**
47 * Window for searching text patterns in disassembly instructions.
48 */
50public:
51 FindWindow(ProximMainFrame* parent, int id);
52 virtual ~FindWindow();
53 virtual void reset();
54
55private:
56 void onInputText(wxCommandEvent& event);
57 void onFindPrev(wxCommandEvent& event);
58 void onFindNext(wxCommandEvent& event);
59 bool find(std::string searchString);
60
61 wxSizer* createContents(wxWindow *parent, bool call_fit, bool set_sizer);
62
63 wxTextCtrl* opInput_;
64 wxCheckBox* matchCase_;
65 wxStaticText* infoLabel_;
66 wxButton* findPrevBtn_;
67 wxButton* findNextBtn_;
68
69 /// List of code linenumbers where serached text was found
70 std::vector<int> matchedLines;
71 /// Currently displayed codeline index in matchedLines
73
74 /// Widget IDs.
75 enum {
81 };
82 DECLARE_EVENT_TABLE()
83};
84#endif
int matchedIndex
Currently displayed codeline index in matchedLines.
Definition FindWindow.hh:72
wxSizer * createContents(wxWindow *parent, bool call_fit, bool set_sizer)
wxTextCtrl * opInput_
Definition FindWindow.hh:63
void onFindNext(wxCommandEvent &event)
void onFindPrev(wxCommandEvent &event)
wxStaticText * infoLabel_
Definition FindWindow.hh:65
std::vector< int > matchedLines
List of code linenumbers where serached text was found.
Definition FindWindow.hh:70
virtual void reset()
Definition FindWindow.cc:76
virtual ~FindWindow()
Definition FindWindow.cc:68
wxButton * findNextBtn_
Definition FindWindow.hh:67
void onInputText(wxCommandEvent &event)
Definition FindWindow.cc:84
wxButton * findPrevBtn_
Definition FindWindow.hh:66
wxCheckBox * matchCase_
Definition FindWindow.hh:64
bool find(std::string searchString)