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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 61962 - (show annotations)
Sun Jul 30 06:04:02 2006 UTC (13 years, 4 months ago) by manus
File size: 3470 byte(s)
EiffelStudio docking branch. It only contains modified classes needed to get the docking version of EiffelStudio.
1 indexing
2 description : "Tool to view the favorites"
3 legal: "See notice at end of class."
4 status: "See notice at end of class."
5 date : "$Date$"
6 revision : "$Revision$"
7
8 class
9 EB_FAVORITES_TOOL
10
11 inherit
12 EB_TOOL
13 rename
14 make as tool_make
15 redefine
16 menu_name,
17 pixmap
18 end
19
20 create
21 make
22
23 feature {NONE} -- Initialization
24
25 make (a_manager: EB_TOOL_MANAGER; a_favorites_manager: EB_FAVORITES_MANAGER) is
26 -- Make a new favorites tool.
27 require
28 a_manager_exists: a_manager /= Void
29 a_favorites_manager_exists: a_favorites_manager /= Void
30 do
31 favorites_manager := a_favorites_manager
32 tool_make (a_manager)
33 end
34
35 build_interface is
36 -- Build all the tool's widgets.
37 do
38 -- The widget has already been created, so do nothing.
39 end
40
41 build_explorer_bar_item (explorer_bar: EB_EXPLORER_BAR) is
42 -- Build the associated explorer bar item and
43 -- Add it to `explorer_bar'
44 do
45 create explorer_bar_item.make (explorer_bar, widget, title, True)
46 explorer_bar_item.set_menu_name (menu_name)
47 if pixmap /= Void then
48 explorer_bar_item.set_pixmap (pixmap)
49 end
50 explorer_bar.add (explorer_bar_item)
51 end
52
53 feature -- Access
54
55 widget: EV_WIDGET is
56 -- Widget representing Current
57 do
58 Result := favorites_manager.widget
59 end
60
61 title: STRING is
62 -- Title of the tool
63 do
64 Result := Interface_names.t_Favorites_tool
65 end
66
67 menu_name: STRING is
68 -- Name as it may appear in a menu.
69 do
70 Result := Interface_names.m_Favorites_tool
71 end
72
73 pixmap: EV_PIXMAP is
74 -- Pixmap as it may appear in toolbars and menus.
75 do
76 Result := pixmaps.icon_pixmaps.tool_favorites_icon
77 end
78
79 feature -- Memory management
80
81 recycle is
82 -- Recycle `Current', but leave `Current' in an unstable state,
83 -- so that we know whether we're still referenced or not.
84 do
85 if explorer_bar_item /= Void then
86 explorer_bar_item.recycle
87 explorer_bar_item := Void
88 end
89 favorites_manager.recycle
90 favorites_manager := Void
91 manager := Void
92 end
93
94 feature {NONE} -- Implementation
95
96 favorites_manager: EB_FAVORITES_MANAGER;
97 -- Associated favorites manager.
98
99 indexing
100 copyright: "Copyright (c) 1984-2006, Eiffel Software"
101 license: "GPL version 2 (see http://www.eiffel.com/licensing/gpl.txt)"
102 licensing_options: "http://www.eiffel.com/licensing"
103 copying: "[
104 This file is part of Eiffel Software's Eiffel Development Environment.
105
106 Eiffel Software's Eiffel Development Environment is free
107 software; you can redistribute it and/or modify it under
108 the terms of the GNU General Public License as published
109 by the Free Software Foundation, version 2 of the License
110 (available at the URL listed under "license" above).
111
112 Eiffel Software's Eiffel Development Environment is
113 distributed in the hope that it will be useful, but
114 WITHOUT ANY WARRANTY; without even the implied warranty
115 of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
116 See the GNU General Public License for more details.
117
118 You should have received a copy of the GNU General Public
119 License along with Eiffel Software's Eiffel Development
120 Environment; if not, write to the Free Software Foundation,
121 Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
122 ]"
123 source: "[
124 Eiffel Software
125 356 Storke Road, Goleta, CA 93117 USA
126 Telephone 805-685-1006, Fax 805-685-6869
127 Website http://www.eiffel.com
128 Customer support http://support.eiffel.com
129 ]"
130
131 end -- class EB_FAVORITES_TOOL

Properties

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

  ViewVC Help
Powered by ViewVC 1.1.23