[Wnd-commit] wnd/wnd_doc/doc/api/shell/shelllink shelllink.dtpl,NONE,1.1
Status: Alpha
Brought to you by:
jurner
|
From: jürgen u. <cer...@us...> - 2005-07-02 09:34:37
|
Update of /cvsroot/wnd/wnd/wnd_doc/doc/api/shell/shelllink In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14136 Added Files: shelllink.dtpl Log Message: bit of this and a bit of that --- NEW FILE: shelllink.dtpl --- ::site:: class ShellLink <code class=import>defined in: wnd.api.shell</code><br><br> <code>ShellLink()</code><br> <br> This class wraps all the methods needed to deal with links. <br><br> Some sample code of how to create a link <pre> lnk= ShellLink() lnk.SetTarget(MyTarget) lnk.SetDescription('my description here') print lnk.IsDirty() >> True lnk.Save(path) print lnk.IsDirty() >> False </pre> <br><br> Some sample code of how to load and save a link <pre> lnk= ShellLink() lnk.Load(MyPath) lnk.SetDescription('my description here') print lnk.IsDirty() >> True lnk.Save(path) print lnk.IsDirty() >> False </pre> ::folder:: ShellLink methods ::item:: SetArgs <code>SetArgs(args)</code><br> <P>Sets the arguments (string) passed to the link target </P> ::item:: GetArgs <code>GetArgs()</code><br> <P>returns the argument string of the link </P> ::item:: SetTarget <code>SetTarget(path)</code><br> <P>Sets the target of the link </P> ::item:: GetTarget <code>GetTarget()</code><br> <P>returns the path of the target the link points to </P> ::item:: SetDescription <code>SetDescription(text)</code><br> <P>sets the descriptive text for the link </P> ::item:: GetDescription <code>GetDescription()</code><br> <P>returns the descriptive text associated to the link </P> ::item:: SetHotkey <code>SetHotkey(vk, *modkeys)</code><br> <P>Sets the hotkey to be used along with the link. <br><br> <DL> <DT>vk <DD>the virtual key to use as hotkey <DT>*modkeys <DD>one or more of the following modifier keys: <br> 'shift', 'control', 'alt', 'extended' </DL> </P> ::item:: GetHotkey <code>GetHotkey()</code><br> <P>Returns the hotkey associated to the link <br><br> <b>Return value</b><br> a list[virtual-key, *modkeys] </P> ::item:: SetIcon <code>SetIcon(path, i)</code><br> <P>Sets the icon to be associated to the link <br><br> <DL> <DT>path <DD>the path of the file containing the icon <DT>i <DD>the index of the icon to use from the file </DL> <br><br> Normally the icon is taken from the target the link points to. It is possible to set an alternate icon using this method. </P> ::item:: GetIcon <code>GetIcon()</code><br> <P>Returns a tuple(icon-file-path, icon-index) of the icon associated to the link </P> ::item:: SetShowCommand <code>SetShowCommand(cmd)</code><br> <P>Sets the show command, i.e. how the target will be shown when inviked. <br><br> cmd can be one of the following: <br> 'hidden','normal', 'minimized','maximized' </P> ::item:: GetShowCommand <code>GetShowCommand()</code><br> <P>Returns th show command of the link <br><br> <b>Return value</b><br> 'hidden','normal', 'minimized','maximized' or 'unknown' </P> ::item:: SetDir <code>SetDir(path)</code><br> <P>Sets the working directory for the link </P> ::item:: GetDir <code>GetDir()</code><br> <P>Returns the working directory of the link </P> ::item:: Resolve <code>Resolve(flag=None, hwnd=None, timeout=0)</code><br> <P>Resolves the link <br><br> The system will try to find the link target if called <br><br> <DL> <DT>flag <DD><TABLE class="table1" BORDER="1"> <TR> <TD>'any_match'</TD> <TD>the system tgryes to resolve the link and displays a dialogbox if not sucessfull</TD> </TR> <TR> <TD>'no_ui'</TD> <TD>no dialog box is shown when the target can not be resolveed. timeout is the timeout the system tryes to resolve the link untill it returns. Default is 3 seconds</TD> </TR> <TR> <TD>'update'</TD> <TD>automatically updates the link if some aspects have changed</TD> </TR> <TR> <TD>'noupdate'</TD> <TD>prevents the system from updating the link if some aspects have changed</TD> </TR> </TABLE> <DT>hwnd <DD>the shell will use as parent window of the dialog box or None <DT>timeout <DD>the timeout to be used along with the 'no_ui' flag </DL> </P> ::item:: Save <code>Save(path)</code><br> <P>Saves the link at the specified path </P> ::item:: IsDirty <code>IsDirty()</code><br> <P>Returns True if some aspects of the link have changed, False otherwise </P> ::item:: Load <code>Load(path)</code><br> <P>Loads a link </P> ::item:: SetPidl <code>SetPidl(pIdl)</code><br> <P>Sets the pIdl for a link <br><br> The pIdl is not freed in the call </P> ::item:: GetPidl <code>GetPidl()</code><br> <P>Returns the pIdl associated to a link <br><br> The pIdl has to be freed whe done with it </P> |