/[eiffelstudio]/branches/Eiffel_57_docking/Src/Eiffel/interface/new_graphical/tools/eb_search_report_tool.e
ViewVC logotype

Contents of /branches/Eiffel_57_docking/Src/Eiffel/interface/new_graphical/tools/eb_search_report_tool.e

Parent Directory Parent Directory | Revision Log Revision Log


Revision 61961 - (show annotations)
Sun Jul 30 06:03:51 2006 UTC (13 years, 4 months ago) by manus
File size: 5715 byte(s)
EiffelStudio docking branch. It only contains modified classes needed to get the docking version of EiffelStudio.
1 indexing
2 description: "Search report tool"
3 legal: "See notice at end of class."
4 status: "See notice at end of class."
5 author: ""
6 date: "$Date$"
7 revision: "$Revision$"
8
9 class
10 EB_SEARCH_REPORT_TOOL
11
12 inherit
13 EB_CONSTANTS
14
15 EB_RECYCLABLE
16
17 create
18 make
19
20 feature {NONE} -- Initialization
21
22 make (a_search_tool: EB_MULTI_SEARCH_TOOL) is
23 -- Initialization
24 require
25 a_search_tool_not_void: a_search_tool /= Void
26 do
27 search_tool := a_search_tool
28 report_box := build_report_box
29 ensure
30 search_tool_not_void: search_tool /= Void
31 end
32
33 build_report_box : EV_VERTICAL_BOX is
34 -- Create and return a box containing result grid.
35 local
36 frm: EV_FRAME
37 report_toolbar: EV_TOOL_BAR
38 hbox: EV_HORIZONTAL_BOX
39 do
40 create report_button.make_with_text (Interface_names.l_Search_report_hide)
41 report_button.select_actions.extend (agent toggle_search_report)
42 create report_toolbar
43 report_toolbar.disable_vertical_button_style
44 report_toolbar.extend (report_button)
45 create frm
46 -- This is a small workaround for a bug on Windows, where a toolbar
47 -- directly inserted within an EV_FRAME, overlaps the bottom of the frame.
48 -- There is currently no easy fix for this so this code has been added temporarily
49 -- as a work around. Julian.
50 create hbox
51 frm.extend (hbox)
52 hbox.extend (report_toolbar)
53 create summary_label.default_create
54 hbox.extend (summary_label)
55 hbox.disable_item_expand (summary_label)
56 hbox.disable_item_expand (report_toolbar)
57
58 create new_search_tool_bar
59 hbox.extend (new_search_tool_bar)
60 hbox.disable_item_expand (new_search_tool_bar)
61 create new_search_button.make_with_text (interface_names.b_new_search)
62 new_search_tool_bar.extend (new_search_button)
63 new_search_tool_bar.disable_vertical_button_style
64 new_search_tool_bar.extend (create {EV_TOOL_BAR_SEPARATOR})
65 new_search_tool_bar.hide
66
67 create shortcut_tool_bar
68 shortcut_tool_bar.disable_vertical_button_style
69 hbox.extend (create {EV_CELL})
70 hbox.extend (shortcut_tool_bar)
71 hbox.disable_item_expand (shortcut_tool_bar)
72 shortcut_tool_bar.extend (create {EV_TOOL_BAR_SEPARATOR})
73 create expand_all_button.make_with_text (interface_names.b_expand_all)
74 create collapse_all_button.make_with_text (interface_names.b_collapse_all)
75 shortcut_tool_bar.extend (expand_all_button)
76 shortcut_tool_bar.extend (create {EV_TOOL_BAR_SEPARATOR})
77 shortcut_tool_bar.extend (collapse_all_button)
78
79 create search_report_grid.make (search_tool)
80
81 create Result
82 Result.extend (frm)
83 Result.disable_item_expand (frm)
84
85 create report
86
87 report.extend (search_report_grid)
88 Result.extend (report)
89 end
90
91 feature -- Access
92
93 search_report_grid: EB_SEARCH_REPORT_GRID
94 -- Grid to contain search report
95
96 search_tool: EB_MULTI_SEARCH_TOOL
97
98 report_box: EV_VERTICAL_BOX
99 -- Widget
100
101 feature -- Element Change
102
103 set_summary (a_string: STRING) is
104 -- Set summary label text.
105 require
106 a_string_not_void: a_string /= Void
107 do
108 summary_label.set_text (a_string)
109 end
110
111 set_new_search_button_visible (a_visible: BOOLEAN) is
112 -- Change new search button status.
113 do
114 if a_visible then
115 new_search_tool_bar.show
116 else
117 new_search_tool_bar.hide
118 end
119 end
120
121 feature {EB_MULTI_SEARCH_TOOL, EB_SEARCH_REPORT_GRID} -- Widgets
122
123 report_button : EV_TOOL_BAR_BUTTON
124 -- Button to hide or show report.
125
126 summary_label : EV_LABEL
127 -- Label to show search summary.
128
129 shortcut_tool_bar: EV_TOOL_BAR
130 -- Tool bar contains expand all button etc.
131
132 new_search_tool_bar: EV_TOOL_BAR
133 -- Tool bar contains new search button.
134
135 new_search_button: EV_TOOL_BAR_BUTTON
136 -- Button to force a new search.
137
138 expand_all_button: EV_TOOL_BAR_BUTTON
139 -- Button to expand all.
140
141 collapse_all_button: EV_TOOL_BAR_BUTTON
142 -- Button to collapse all.
143
144 report : EV_FRAME
145 -- Report container
146
147 feature -- Recyclable
148
149 recycle is
150 -- Recyclable
151 do
152 search_tool := Void
153 search_report_grid.wipe_out
154 end
155
156 feature {NONE} -- Implementation
157
158 toggle_search_report is
159 -- Hide report if it is shown, show it if it is hidden.
160 do
161 if report.is_show_requested then
162 report.hide
163 report_button.set_text (Interface_names.l_Search_report_show)
164 else
165 report.show
166 report_button.set_text (Interface_names.l_Search_report_hide)
167 end
168 end
169
170 invariant
171 invariant_clause: True -- Your invariant here
172
173 indexing
174 copyright: "Copyright (c) 1984-2006, Eiffel Software"
175 license: "GPL version 2 (see http://www.eiffel.com/licensing/gpl.txt)"
176 licensing_options: "http://www.eiffel.com/licensing"
177 copying: "[
178 This file is part of Eiffel Software's Eiffel Development Environment.
179
180 Eiffel Software's Eiffel Development Environment is free
181 software; you can redistribute it and/or modify it under
182 the terms of the GNU General Public License as published
183 by the Free Software Foundation, version 2 of the License
184 (available at the URL listed under "license" above).
185
186 Eiffel Software's Eiffel Development Environment is
187 distributed in the hope that it will be useful, but
188 WITHOUT ANY WARRANTY; without even the implied warranty
189 of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
190 See the GNU General Public License for more details.
191
192 You should have received a copy of the GNU General Public
193 License along with Eiffel Software's Eiffel Development
194 Environment; if not, write to the Free Software Foundation,
195 Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
196 ]"
197 source: "[
198 Eiffel Software
199 356 Storke Road, Goleta, CA 93117 USA
200 Telephone 805-685-1006, Fax 805-685-6869
201 Website http://www.eiffel.com
202 Customer support http://support.eiffel.com
203 ]"
204
205 end

Properties

Name Value
svn:eol-style native
svn:keywords Author Date ID Revision

  ViewVC Help
Powered by ViewVC 1.1.23