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

Contents of /branches/Eiffel_57_docking/Src/Eiffel/interface/new_graphical/commands/eb_hex_format.e

Parent Directory Parent Directory | Revision Log Revision Log


Revision 62171 - (show annotations)
Tue Aug 1 01:27:17 2006 UTC (13 years, 4 months ago) by larryl
File size: 3875 byte(s)
First commit docking tabbed Eiffel Studio.
1 indexing
2 description: ""
3 legal: "See notice at end of class."
4 status: "See notice at end of class."
5 author: "$Author$"
6 date: "$Date$"
7 revision: "$Revision$"
8
9 class
10 EB_HEX_FORMAT_CMD
11
12 -- Replace ANY below by the name of parent class if any (adding more parents
13 -- if necessary); otherwise you can remove inheritance clause altogether.
14 inherit
15 EB_TOOLBARABLE_COMMAND
16 redefine
17 mini_pixmap,
18 new_mini_toolbar_item
19 end
20
21 create
22 make
23
24 feature -- Initialization
25
26 make (a_callback: like command_call_back) is
27 -- Initialize `Current' and associate it with `tool'.
28 do
29 command_call_back := a_callback
30 end
31
32 feature -- Access
33
34 pixmap: EV_PIXMAP is
35 -- Pixmap representing the command.
36 do
37 --| No big pixmap is required for this command.
38 end
39
40 pixel_buffer: EV_PIXEL_BUFFER is
41 -- Pixel buffer representing the command.
42 do
43 --| No big pixmap is required for this command.
44 end
45
46 mini_pixmap: EV_PIXMAP is
47 -- Pixmap representing the command for mini toolbars.
48 do
49 Result := pixmaps.mini_pixmaps.debugger_show_hex_value_icon
50 end
51
52 tooltip: STRING is
53 -- Tooltip for the toolbar button.
54 do
55 Result := Interface_names.e_switch_num_format_to_hex
56 end
57
58 feature -- Measurement
59
60 feature -- Status report
61
62 command_call_back: PROCEDURE [ANY, TUPLE [BOOLEAN]]
63 -- Call back procedure to execute current
64
65 name: STRING is
66 -- Name of the command.
67 do
68 Result := Interface_names.e_Switch_num_formating
69 end
70
71 description: STRING is
72 -- Description of the command.
73 do
74 Result := Interface_names.l_Switch_num_format_desc
75 end
76
77 feature -- Execution
78
79 execute is
80 -- Remove an object from `tool'.
81 do
82 if command_call_back /= Void then
83 command_call_back.call ([toggle_button.is_selected])
84 end
85 if toggle_button.is_selected then
86 toggle_button.set_tooltip (interface_names.e_Switch_num_format_to_dec)
87 else
88 toggle_button.set_tooltip (interface_names.e_Switch_num_format_to_hex)
89 end
90 end
91
92 feature -- Basic operations
93
94 new_mini_toolbar_item: EB_COMMAND_TOGGLE_TOOL_BAR_BUTTON is
95 -- Create a new mini toolbar button for this command.
96 do
97 create Result.make (Current)
98 Result.set_pixmap (mini_pixmap)
99 if is_sensitive then
100 Result.enable_sensitive
101 else
102 Result.disable_sensitive
103 end
104 Result.set_tooltip (tooltip)
105 Result.select_actions.extend (agent execute)
106
107 toggle_button := Result
108 end
109
110 feature -- Obsolete
111
112 feature -- Inapplicable
113
114 feature {NONE} -- Implementation
115
116 toggle_button: EV_TOOL_BAR_TOGGLE_BUTTON;
117
118 indexing
119 copyright: "Copyright (c) 1984-2006, Eiffel Software"
120 license: "GPL version 2 (see http://www.eiffel.com/licensing/gpl.txt)"
121 licensing_options: "http://www.eiffel.com/licensing"
122 copying: "[
123 This file is part of Eiffel Software's Eiffel Development Environment.
124
125 Eiffel Software's Eiffel Development Environment is free
126 software; you can redistribute it and/or modify it under
127 the terms of the GNU General Public License as published
128 by the Free Software Foundation, version 2 of the License
129 (available at the URL listed under "license" above).
130
131 Eiffel Software's Eiffel Development Environment is
132 distributed in the hope that it will be useful, but
133 WITHOUT ANY WARRANTY; without even the implied warranty
134 of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
135 See the GNU General Public License for more details.
136
137 You should have received a copy of the GNU General Public
138 License along with Eiffel Software's Eiffel Development
139 Environment; if not, write to the Free Software Foundation,
140 Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
141 ]"
142 source: "[
143 Eiffel Software
144 356 Storke Road, Goleta, CA 93117 USA
145 Telephone 805-685-1006, Fax 805-685-6869
146 Website http://www.eiffel.com
147 Customer support http://support.eiffel.com
148 ]"
149
150 end -- class EB_HEX_FORMAT_CMD

Properties

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

  ViewVC Help
Powered by ViewVC 1.1.23