10 |
EB_COMMAND_FEEDBACK |
EB_COMMAND_FEEDBACK |
11 |
|
|
12 |
inherit |
inherit |
13 |
EB_COMMAND |
EB_GRAPHICAL_COMMAND |
14 |
|
|
15 |
feature -- Initialization |
feature -- Initialization |
16 |
|
|
25 |
properly_set: button = a_button |
properly_set: button = a_button |
26 |
end |
end |
27 |
|
|
28 |
|
set_sd_button (a_button: like sd_button) IS |
29 |
|
-- Set `a_button' to `sd_button'. |
30 |
|
require |
31 |
|
not_void: a_button /= Void |
32 |
|
do |
33 |
|
sd_button := a_button |
34 |
|
sd_button.select_actions.extend (agent execute) |
35 |
|
ensure |
36 |
|
set: sd_button = a_button |
37 |
|
end |
38 |
|
|
39 |
set_menu_item (a_menu_item: like menu_item) is |
set_menu_item (a_menu_item: like menu_item) is |
40 |
-- Set `menu_item' to `a_menu_item'. |
-- Set `menu_item' to `a_menu_item'. |
41 |
require |
require |
56 |
if button /= Void then |
if button /= Void then |
57 |
button.enable_sensitive |
button.enable_sensitive |
58 |
end |
end |
59 |
|
if sd_button /= Void then |
60 |
|
sd_button.enable_sensitive |
61 |
|
end |
62 |
if menu_item /= Void then |
if menu_item /= Void then |
63 |
menu_item.enable_sensitive |
menu_item.enable_sensitive |
64 |
end |
end |
65 |
|
is_sensitive := True |
66 |
end |
end |
67 |
|
|
68 |
disable_sensitive is |
disable_sensitive is |
72 |
if button /= Void then |
if button /= Void then |
73 |
button.disable_sensitive |
button.disable_sensitive |
74 |
end |
end |
75 |
|
if sd_button /= Void then |
76 |
|
sd_button.disable_sensitive |
77 |
|
end |
78 |
if menu_item /= Void then |
if menu_item /= Void then |
79 |
menu_item.disable_sensitive |
menu_item.disable_sensitive |
80 |
end |
end |
81 |
|
is_sensitive := False |
82 |
end |
end |
83 |
|
|
84 |
feature -- Access |
feature -- Access |
85 |
|
|
86 |
button: EV_TOOL_BAR_BUTTON |
button: EV_TOOL_BAR_BUTTON |
87 |
-- Button on the toolbar. |
-- Button on toolbar. |
88 |
|
|
89 |
|
sd_button: SD_TOOL_BAR_BUTTON |
90 |
|
-- Button on toolbar. |
91 |
|
|
92 |
menu_item: EV_MENU_ITEM; |
menu_item: EV_MENU_ITEM; |
93 |
-- Menu entry in the menu. |
-- Menu entry in the menu. |