/src/wrappers/gtk/examples/expander/my_expander.e
http://github.com/tybor/Liberty · Specman e · 31 lines · 30 code · 1 blank · 0 comment · 2 complexity · f92e25d384d256dd50e9233a3ceb9af5 MD5 · raw file
- class MY_EXPANDER
- inherit
- GTK_EXPANDER
- rename make as make_expander
- export {} make_expander
- redefine on_activate
- end
- creation make
- feature make (a_statusbar: GTK_STATUS_BAR) is
- require valid_statusbar: a_statusbar/=Void
- do
- statusbar:= a_statusbar
- make_with_mnemonic (expander_label)
- enable_on_activate
- end
- on_activate is
- require statusbar_set: statusbar /= Void
- do
- if not statusbar.is_empty then
- statusbar.pop
- end
- if is_expanded then
- statusbar.push ("The expander clicked when it was expanded.")
- else
- statusbar.push ("The expander clicked when it was collapsed.")
- end
- end
- statusbar: GTK_STATUS_BAR
- expander_label: STRING is "_An expander"
- end