/[eiffelstudio]/branches/Eiffel_57_docking/Src/Eiffel/interface/new_graphical/commands/eb_show_toolbar_command.e
ViewVC logotype

Annotation of /branches/Eiffel_57_docking/Src/Eiffel/interface/new_graphical/commands/eb_show_toolbar_command.e

Parent Directory Parent Directory | Revision Log Revision Log


Revision 56535 - (hide annotations)
Tue Jan 17 01:37:10 2006 UTC (14 years ago) by manus
Original Path: trunk/Src/bench/Eiffel/interface/new_graphical/commands/eb_show_toolbar_command.e
File size: 3772 byte(s)
Added text of the GPL license to all classes of the compiler.

1 manus 26913 indexing
2     description : "Command to show/hide a toolbar"
3 manus 56535 legal: "See notice at end of class."
4     status: "See notice at end of class."
5 manus 26913 date : "$Date$"
6     revision : "$Revision$"
7     author : "Arnaud PICHERY [ aranud@mail.dotcom.fr ]"
8    
9     class
10     EB_SHOW_TOOLBAR_COMMAND
11    
12     inherit
13     EB_SHOW_WIDGET_COMMAND
14     rename
15     make as command_make
16     redefine
17     enable_visible,
18 xavier 30015 disable_visible
19 manus 26913 end
20    
21     EB_MENUABLE_COMMAND
22     redefine
23 xavier 30015 new_menu_item
24 manus 26913 end
25    
26     create
27     make
28    
29     feature {NONE} -- Initialization
30    
31     make (a_target: like target; a_menu_name: STRING) is
32     -- Initialize Current with target `a_target' and `menu_name' set to `a_menu_name'.
33     do
34     command_make (a_target)
35     menu_name := a_menu_name
36     name := a_menu_name
37     end
38    
39     feature -- Status setting
40    
41     enable_visible is
42     -- Set `is_visible' to True.
43     local
44     menu_items: like managed_menu_items
45     citem: EB_COMMAND_CHECK_MENU_ITEM
46     do
47     if not is_visible then
48     is_visible := True
49     target.show
50     menu_items := managed_menu_items
51     if menu_items /= Void then
52     from
53     menu_items.start
54     until
55     menu_items.after
56     loop
57     citem := menu_items.item
58     if not citem.is_selected then
59     citem.select_actions.block
60     citem.enable_select
61     citem.select_actions.resume
62     end
63     menu_items.forth
64     end
65     end
66     end
67     end
68    
69     disable_visible is
70     -- Set `is_visible' to True.
71     local
72     menu_items: like managed_menu_items
73     citem: EB_COMMAND_CHECK_MENU_ITEM
74     do
75     if is_visible then
76     menu_items := managed_menu_items
77     if menu_items /= Void then
78     from
79     menu_items.start
80     until
81     menu_items.after
82     loop
83     citem := menu_items.item
84     if citem.is_selected then
85     citem.select_actions.block
86     citem.disable_select
87     citem.select_actions.resume
88     end
89     menu_items.forth
90     end
91     end
92     is_visible := False
93     target.hide
94     end
95     end
96    
97     feature -- Basic operations
98    
99     new_menu_item: EB_COMMAND_CHECK_MENU_ITEM is
100     -- Create a new menu entry for this command.
101     do
102     -- Create the menu item
103     create Result.make (Current)
104 king 46373 initialize_menu_item (Result)
105 king 46376 Result.enable_sensitive
106     if is_visible then
107     Result.enable_select
108     else
109     Result.disable_select
110     end
111 julieng 37681 Result.select_actions.extend (agent execute)
112 manus 26913 end
113    
114     feature -- Access
115    
116     menu_name: STRING
117     -- Name as it appears in the menu.
118    
119 manus 56535 name: STRING;
120 manus 26913 -- Name for the command.
121    
122 manus 56535 indexing
123     copyright: "Copyright (c) 1984-2006, Eiffel Software"
124     license: "GPL version 2 see http://www.eiffel.com/licensing/gpl.txt)"
125     licensing_options: "http://www.eiffel.com/licensing"
126     copying: "[
127     This file is part of Eiffel Software's Eiffel Development Environment.
128    
129     Eiffel Software's Eiffel Development Environment is free
130     software; you can redistribute it and/or modify it under
131     the terms of the GNU General Public License as published
132     by the Free Software Foundation, version 2 of the License
133     (available at the URL listed under "license" above).
134    
135     Eiffel Software's Eiffel Development Environment is
136     distributed in the hope that it will be useful, but
137     WITHOUT ANY WARRANTY; without even the implied warranty
138     of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
139     See the GNU General Public License for more details.
140    
141     You should have received a copy of the GNU General Public
142     License along with Eiffel Software's Eiffel Development
143     Environment; if not, write to the Free Software Foundation,
144     Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
145     ]"
146     source: "[
147     Eiffel Software
148     356 Storke Road, Goleta, CA 93117 USA
149     Telephone 805-685-1006, Fax 805-685-6869
150     Website http://www.eiffel.com
151     Customer support http://support.eiffel.com
152     ]"
153    
154 manus 26913 end -- class EB_SHOW_TOOLBAR_COMMAND

Properties

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

  ViewVC Help
Powered by ViewVC 1.1.23