diff options
| author | Michele Calgaro <michele.calgaro@yahoo.it> | 2025-10-29 09:54:27 +0900 |
|---|---|---|
| committer | Michele Calgaro <michele.calgaro@yahoo.it> | 2025-10-29 09:54:27 +0900 |
| commit | f607154a59961ca71d792d7130425effe40aca20 (patch) | |
| tree | b5e4c34c0ce4d32aeb452806988144a1718ac632 /doc/en/java.docbook | |
| parent | 086012dcad8a976a0dabbb7cbc20c9cb612cdfa9 (diff) | |
| download | krusader-f607154a59961ca71d792d7130425effe40aca20.tar.gz krusader-f607154a59961ca71d792d7130425effe40aca20.zip | |
Restructure doc folder to allow used of 'tde_conditional_add_project_docs' macro in cmake build
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
Diffstat (limited to 'doc/en/java.docbook')
| -rw-r--r-- | doc/en/java.docbook | 88 |
1 files changed, 0 insertions, 88 deletions
diff --git a/doc/en/java.docbook b/doc/en/java.docbook deleted file mode 100644 index cc3b975..0000000 --- a/doc/en/java.docbook +++ /dev/null @@ -1,88 +0,0 @@ -<sect1 id="javascript_console"> - <title>JavaScript Console</title> - <indexterm> - <primary>JavaScript Console</primary> - </indexterm> - <para> - <keycombo action="simul">&Alt;&Ctrl; - <keycap>j</keycap></keycombo> opens the JavaScript console. - (only available if libkjsembed is present at compile- and - runtime)</para> - <para>The JavaScript console is an interface to the embedded - JS-Interpreter which can be used for amusement or - testing.</para> - </sect1> - - <sect1 id="javascript_interface"> - <title>JavaScript interface</title> - <indexterm> - <primary>JavaScript interface</primary> - </indexterm> - <para> - <emphasis role="bold">Warning:</emphasis> The JS-Support is - quite stable, and you can not lose any data by using it. However, - your scripts may not work with future versions of - &krusader;, as the JS-Support is changing.</para> - <tip> - <para>Please - <link linkend="help_krusader">upload your favorite JavaScript - Extensions</link> so that they become available for the - &krusader; community. Thanks!</para> - </tip> - <para>JavaScript applications usually have 2 files - <filename>foo.js</filename>and - <filename>foo.ui</filename>. They will be installed in - <filename>~/.trinity/share/apps/krusader/js/</filename>, a - user action with a "%_Script" action will start the - Javascripting. Currently we have 2 JS demos - <filename>root-mount-extension.tar.bz2</filename> and - <filename>js-demo-calc.tar.bz2</filename> that will be more - explanatory.</para> - <para>When a script is executed, the script doesn't know its - origin (or maybe there is a way to do so that we do not know of) - and all relative paths are relative to the current working-dir. - But this dir is (normally) not the one where the script is - located but the current dir of the active Panel of Krusader. - This needs to stay like this. However, for referencing - additional files like .ui (Userinterface, exported by - &TQt;'s Designer) one needs the path of the script. - The alternative where absolute paths are used is more than - unhandy. For this reason the Variable "scriptDir" was - introduced. If a Script wants to load a &GUI; from a - .ui-file this can be done this way: - <emphasis>var ui = Factory.loadui( scriptDir + 'filename.ui' - );</emphasis> I recommend using Dialog as a base when designing - &GUI;s to be used with JS. Execute the dialog with: - <emphasis>ui.exec();</emphasis> The elements of the - &GUI; may be accessed in the following way: - <emphasis>ui.child('widgetName')</emphasis></para> - <para>Currently only the objects 'Krusader' and - 'PanelManager' are exposed C++ objects without a logic - behind them. They can be inspected using the JS-Console and the - functions 'properties()', 'children()' and 'slots()'. The - children can be accessed with the function - 'child("nameOfChild")' with returns an object itself. Currently, the Variable scriptDir is more useful. Following the root-mount - extension it is already possible to create advanced - &GUI;s for command line tools</para> - <para>You can play around with 'Krusader.setCaption("Hey Ho, - Let's go!");', 'Krusader.children();', - 'Krusader.child("help").slots();', - 'alert(Krusader.properties())' or - 'Krusader.child("help").show();'.... In addition, a new - placeholder for the &useractions-lnk;, %_Script()%, - will execute an external file.</para> - <para>NOTE: The object 'Krusader' will change. We have not made - decisions about the JS-interface yet (at the time of the - 1.70.0-release). Any ideas are welcome. Plase use our - &kruforum-url; for feedback.</para> - <para>The JavaScript-support is based on - &kjsembed-url;. Some examples which show the power - of this library can be found - <ulink url="http://xmelegance.org/kjsembed/examples/index.html"> - here</ulink>. Support for all of TDE's ground-laying technologies - such as DCOP or KParts is provided. You can even load whole - GUIs from .ui-files, created with &TQt;'s Designer. - An example extension making use of this can be found - <ulink url="http://www.krusader.org/phpBB/viewtopic.php?p=4832#4832"> - here</ulink>.</para> -</sect1> |
