Merge branch 'master' of git+ssh://repo.or.cz/srv/git/jben
[jben.git] / src / frame_ksearch.h
blob77d3f4bbc54eedaf8c5f50fe5e4835e76328cf50
1 /*
2 Project: J-Ben
3 Author: Paul Goins
4 Website: http://www.vultaire.net/software/jben/
5 License: GNU General Public License (GPL) version 2
6 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt)
8 File: frame_ksearch.h
10 This program is free software; you can redistribute it and/or modify
11 it under the terms of the GNU General Public License as published by
12 the Free Software Foundation; either version 2 of the License, or
13 (at your option) any later version.
15 This program is distributed in the hope that it will be useful,
16 but WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 GNU General Public License for more details.
20 You should have received a copy of the GNU General Public License
21 along with this program. If not, see <http://www.gnu.org/licenses/>
24 #ifndef frame_ksearch
25 #define frame_ksearch
27 #include <gtkmm/window.h>
28 #include <gtkmm/paned.h>
29 #include <gtkmm/statusbar.h>
30 #include <gtkmm/frame.h>
31 #include <gtkmm/scrolledwindow.h>
32 #include <gtkmm/box.h>
33 #include <gtkmm/buttonbox.h>
34 #include <gtkmm/comboboxtext.h>
35 #include <gtkmm/button.h>
36 #include <gtkmm/textview.h>
37 #include <string>
38 #include <list>
40 class FrameKSearch : public Gtk::Window {
41 public:
42 FrameKSearch();
43 ~FrameKSearch();
44 void Clear();
45 void Update();
46 private:
47 void OnAdd();
48 void OnDrop(Gtk::Widget *pWidget);
49 bool OnDeleteEvent(GdkEventAny* event);
50 void OnResultClick(Gtk::Button *pButton);
51 void UpdateResultLayout();
53 Gtk::VPaned panes;
54 Gtk::Statusbar statusBar;
55 Gtk::Frame topFrame, bottomFrame;
56 Gtk::VBox topLayout;
57 Gtk::VBox bottomLayout;
58 Gtk::HBox searchBar;
59 Gtk::Label searchLabel;
60 Gtk::ComboBoxText searchOpts;
61 Gtk::HButtonBox searchButtonsUpper;
62 Gtk::Button btnAdd, btnClear;
63 Gtk::ScrolledWindow searchGUIWindow;
64 Gtk::VBox searchGUIBox;
65 Gtk::HButtonBox searchButtonsLower;
66 Gtk::Button btnSearch;
67 Gtk::ScrolledWindow resultWindow;
68 /* Result box implementation: 2 ideas
69 1. -BUNCH- of buttons, like gjiten
70 2. GtkTextView with event tags
71 First: trying bunch of buttons together with GtkTextView.
72 (Studying gjiten, it appears this is how they implemented their results
73 area... since I can't get an object's width easily w/o realizing it,
74 let's just realize it within a word-wrappable container.) */
75 Gtk::TextView resultLayout;
76 std::list<Gtk::Button *> resultButtonList;
79 #endif