indexing description: "[ An exhibit box that gives a basic overview of this example. ]" author: "" date: "$Date$" revision: "$Revision$" class EXHIBIT_HELP_BOX inherit EXHIBIT_BOX create make feature -- Access title: STRING is -- Title of exhibit "General overview / Help" description: STRING is -- Description "This example provides an overview over most of the classes in the % %Viz-cluster of the EiffelMedia library. % %Below you'll find a short description of each page and a list of % %key-bindings that can be used to control this example.%N% %" feature -- Manufacturing create_exhibit is -- Create exhibit local index: EM_VIZ_TEXT_BOX keys: EM_VIZ_TEXT_BOX vbox: EM_VIZ_VERTICAL_BOX [EM_VIZ_BOX] do -- Make layout with 2 columns create_column_layout (2) -- Make sure text is right below column title column_layout.set_row_alignment (3, Align_top) -- Text for page index create index.make_auto_sized ( "1 - General Overview / Help%N% % You are here!%N% %%N% %2 - Text Boxes%N% % Lotsa blabla%N% %%N% %3 - V-/H-/D-Boxes%N% % Group together other boxes%N% %%N% %4 - Tables%N% % Layouting made easy%N% % (group boxes pt.2)%N% %%N% %5 - Border and Background%N% % Make it look professional%N% %%N% %6 - Eye-Candy%N% % Lights, camera, ACTION!%N% % The stuff that makes it worthwile%N% %%N% %7 - Diagram components%N% % Some nice animated diagrams%N% % and charts (The original idea%N% % of this project!)%N% %", Viz_options.code_font_format ) put_column_title ("Page Index", 1) put_column_content (index, 1) -- Text for keybindings create keys.make_auto_sized ( "escape - Quit this example%N% %h - Go directly to this page%N% %space - Advance one page%N% %backspace - Go back one page%N% %%N% %a - Animate scene %N% %s - Stop animating%N% %q - Toggle quality%N% % (antialiasing on/off)%N% %d - Toggle debugging hints%N% % (bounding boxes on/off)%N% %p - Toggle point snapping%N% %o - Toggle orthographic projection%N% %%N% %left - Rotate scene around y-axis%N% %right - ditto, but other direction%N% %up - Rotate scene around x-axis%N% %down - ditto, but other direction%N% %pageup - Zoom in%N% %pagedown - Zoom out%N% %", Viz_options.code_font_format ) -- You're not supposed to see this, go find it yourself by -- randomly pressing keys on the first page... ;-) create vbox.make vbox.put_last (keys) create_easter_egg vbox.put_last (easter_egg) put_column_title ("Keybindings", 2) put_column_content (vbox, 2) -- Exhibit columns which we have filled with our content exhibit := column_layout end feature -- Easteregg hidden_message:STRING is "Nothing to animate here. Please move along........" -- What it says easter_egg: EM_VIZ_TEXT_BOX -- Nothing to see here, please move along! create_easter_egg is -- Lay an egg local red_format: EM3D_FONT_FORMAT do create red_format.make_with_color (Viz_options.text_font_format.font, [255, 0, 0]) create easter_egg.make ([column_layout.column_width (2), 0.0, 0.0], "", red_format) end feature -- Animation go_to_time (a_time: INTEGER) is -- Nothing to animate,really. Believe me. local s: STRING do easter_egg.set_text (hidden_message.substring (1, (a_time // 50) \\ hidden_message.count + 1)) end end