Adobe Eve ASL: how to make an eve file in a gui window?

So, we have simple .eve and .adam files compiled by ASL , and all this is required for boost and adobe . We need a cross-platform function to make our layout visualized and moveable like a real window on our platform (we need this for Mac OS X, Windows, Linux). How to do it?

We started to try to simplify some of the tutorials that we found in the ASL ( begin ) folder, and got some results you can see here . But our approach is not cross-platform or in any way eazy for get = (So, we ask your halp how to display a simple window with the ok button defined by the adam and eve files?

Here is an example of simple Adam files and simple eve

 layout my_dialog { view dialog(name: localize(\"<xstr id='my_dialog_name'>My Dialog</xstr>\")) { slider(bind: @my_value, format: {first: 0, last: 100}); edit_number(name: 'Value:', bind: @my_value, format: '#', alt: 'Alters the value of the slider'); button (items: [ { name: localize(\"<xstr id='ok'>OK</xstr>\"), action: @ok, bind: @result, alt: 'Perform the command with the current settings' }, { name: localize(\"<xstr id='reset'>Reset</xstr>\"), action: @reset, modifiers: @opt, alt: 'Reset the dialog settings' } ]); } } 

 sheet my_sheet { interface: my_value: 42; output: result <== { value: my_value }; } 

which should create such a window in the windows:

enter image description here

Please, help.

+1
source share
1 answer

We did it here!) It's really simple.

A source:

 #include <boost/thread/tss.hpp> #include <adobe/future/modal_dialog_interface.hpp> #include <boost/filesystem/path.hpp> using namespace std; inline bool always_break(adobe::name_t, const adobe::any_regular_t&) { return true; } void dialog() { stringstream sheet; stringstream layout; boost::filesystem::path icon_directory_path; // The sheet for the dialog sheet << "sheet my_sheet\n" "{\n" "interface:\n" " my_value: 42;\n" "output:\n" " result <== { value: my_value };\n" "}\n" ; // the layout layout << "layout my_dialog\n" "{\n" " view dialog(name: 'My Dialog')\n" " {\n" " slider(bind: @my_value, format: {first: 0, last: 100});\n" " edit_number(name: 'Value:', bind: @my_value, format: '#', alt: 'Alters the value of the slider');\n" " button (items: [\n" " { name: 'OK', action: @ok, bind: @result, alt: 'Perform the command with the current settings' },\n" " { name: 'Reset', action: @reset, modifiers: @opt, alt: 'Reset the dialog settings' }\n" " ]);\n" " }\n" "}\n" ; // finally set up the params for the modal dialog interface call adobe::dialog_result_t result(adobe::handle_dialog(adobe::dictionary_t(), adobe::dictionary_t(), adobe::dictionary_t(), adobe::dialog_display_s, layout, sheet, &always_break, icon_directory_path)); int is_checked(result.command_m[adobe::static_name_t("value")].cast<int>()); cout << "return value: " << is_checked << endl; } int main( ) { dialog(); cin.get(); return 0; } 
+1
source

All Articles