wnd-commit Mailing List for wnd (Page 5)
Status: Alpha
Brought to you by:
jurner
You can subscribe to this list here.
2005 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(125) |
Jun
|
Jul
(138) |
Aug
(13) |
Sep
|
Oct
|
Nov
|
Dec
|
---|---|---|---|---|---|---|---|---|---|---|---|---|
2008 |
Jan
|
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(1) |
From: jürgen u. <cer...@us...> - 2005-07-02 09:48:26
|
Update of /cvsroot/wnd/wnd/wnd_doc/doc/controls/custom controls/splitter In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21286 Modified Files: splitter.dtpl Log Message: bit of this and a bit of that Index: splitter.dtpl =================================================================== RCS file: /cvsroot/wnd/wnd/wnd_doc/doc/controls/custom controls/splitter/splitter.dtpl,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** splitter.dtpl 29 Apr 2005 15:17:08 -0000 1.1.1.1 --- splitter.dtpl 2 Jul 2005 09:48:17 -0000 1.2 *************** *** 93,105 **** The following styles are used with Splitter controls:<br><br> <TABLE class="table1" BORDER="1"> ! <TR> ! <TD>'horz'</TD> ! <TD>creates a horizontal splitter (this is the default). This style can not be changed at runtime</TD> ! </TR> ! <TR> ! <TD>'vert'</TD> ! <TD>creates a vertical splitter. This style can not be changed at runtime</TD> ! </TR> ! </TABLE> --- 93,114 ---- The following styles are used with Splitter controls:<br><br> <TABLE class="table1" BORDER="1"> ! <TR> ! <TD>'feedbackbar'</TD> ! <TD>if this style is set a bar is drawn indicating the desired position of ! the splitter. The splitter is moved no sooner as when the user ends ! draging the splitter. This may help in reducing flicker. ! If this style is not set the splitter is moved along dynamically with the ! mouse. ! </TD> ! </TR> ! <TR> ! <TD>'horz'</TD> ! <TD>creates a horizontal splitter (this is the default). This style can not be changed at runtime</TD> ! </TR> ! <TR> ! <TD>'vert'</TD> ! <TD>creates a vertical splitter. This style can not be changed at runtime</TD> ! </TR> ! </TABLE> |
From: jürgen u. <cer...@us...> - 2005-07-02 09:47:52
|
Update of /cvsroot/wnd/wnd/wnd_doc/doc/controls/custom controls/drivecombo In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20991 Added Files: .CVSIGNORE drivecombo.dtpl Log Message: bit of this and a bit of that --- NEW FILE: .CVSIGNORE --- *.html *.gif --- NEW FILE: drivecombo.dtpl --- ::defaultpage:: DriveCombo ::site:: DriveCombo <IMG SRC="DriveCombo.gif"></IMG> <br><br> <a HREF="contents.html">DriveCombo contents</a> <br><br> A DriveCombo control allows the user to select a drive from a list of avaiable drives. When the control is created it lists all currently available drives and displays them in the dropdown box. <br><br> <b>Notes:</b><br> <OL> <LI>By default the the selection field height of the DriveCombo is set to fit the displayed item. For that reason it is suggested to adjust your GUI right after creating the DriveCombo. This size is adjusted aswell when switching from 'smallicon' to 'largeicon' or vice versa, so GUI metrics might need some recalcultion by that time, too. <LI>currently the control does not update when drives are inserted or removed. This may change in future versions <LI>you should not change the font for the DriveCombo. Currently it is relying on the system-font. Changing the font to a custom font will result in messed up display of the items. </OL> ::site:: class DriveCombo <code class=import>defined in: wnd.controls.drivecombo</code><br><br> <code>DriveCombo(parent, x, y, w, h, *styles)</code><br> ::site:: DriveCombo messages Due to the fact that a DriveCombo is derrived from a Combobox it sends all the messages defined for Comboboxes to the message handler. The DriveCombo control adds the following messages:<br><br> <DL> <DT>'driveselected' <DD>whenever the user selects a drive from the list this message is send <br> lp=allways zero<br> wp=the drive selected, --'a:', 'c:' or whatever <br><br> this message is send instead of the Combobox message 'select' <br><br> This message is send instead of the Combobox method 'select' <br><br> <DT>'shellnotify' <DD>this message is send whenever the contents of the DriveCombo is affected by a file system operation. This message is send only if the 'monitorchanges' style is set<br> lp=the notification message<br> wp=depends on the notification message <br><br> For details see <a HREF="DriveCombo notification messages.html">DriveCombo notification messages</a> <br><br> </DL> ::site:: DriveCombo notification messages Whenever a drive is re´moved or added the control sends a notification message. This requires the 'monitorchanges' style set. <br><br> The message send is 'shellnotify' <br><br> <TABLE class="table1" BORDER="1"> <TR> <TD>wp= 'driveadd'</TD> <TD>a drive has been added</TD> <TD>lp= root of the drive</TD> </TR> <TR> <TD>wp='driveremoved'</TD> <TD>a drive has been removed</TD> <TD>lp= root of the drive</TD> </TR> <TR> <TD>'mediainserted'</TD> <TD>a media has been inserted</TD> <TD>lp=root of the media</TD> </TR> <TR> <TD>'mediaremoved'</TD> <TD>a media has been removed</TD> <TD>lp= root of the media</TD> </TR> </TABLE> ::site:: DriveCombo styles The following styles are used with DriveCombo controls:<br><br> <TABLE class="table1" BORDER="1"> <TR> <TD>'adjusth'</TD> <TD>automatically fits the height of the dropdown window to size, so that all items are visible when the dropdown is opened. <br><br> This stays valid untill you call a method that changes the DriveCombos height. Note that the height of the DriveCombo selection field is allways set to fit the displayed item. </TD> </TR> <TR> <TD>'largeicon'</TD> <TD>displays large icons for the drives</TD> </TR> <TR> <TD>'monitorchanges'</TD> <TD>monitors changes and updates itself if any drive is added or removed</TD> </TR> <TR> <TD>'showdetails'</TD> <TD>adds some additional information to the drives displayed, following more or less this schene: 'driveLetter: [driveName -mediumType-]'. By default only drive letters are displayed next to the icons.</TD> </TR> <TR> <TD>'smallicon'</TD> <TD>displays small icons for the drives. This is the default.</TD> </TR> </TABLE> ::folder:: DriveCombo methods DriveCombo controls support the following methods: ::item:: GetDrive <code>GetDrive()</code><br> <P>Returns the currently selected drive. </P> ::item:: SelectDrive <code>SelrctDrive(drive)</code><br> <P>Selects the drive to be displayed in the selection field. <br><br> <b>drive</b> can either be the drive letter with or without colon or the zero based index of the drive to select. </P> ::item:: Refresh <code>Refresh()</code><br> <P>Refreshes the contents of the DriveCombo. </P> ::item:: HasExtendedUI <code>HasExtendedUI()</code><br> <P> Returns True if the extended user interface is set, False otherwise. <br><br> See also: <a HREF="SetExtendedUI.html">RemoveExtendedUI</a> </P> ::item:: SetExtendedUI <code>SetExtendedUI(Bool)</code><br> <P> Sets or removes the extended user interface <br><br> If bool is True it is set, otherwise it is removed. <br><br> The extended interface is nothing more than the ability to open the dropdown using the arrow key. The default one uses the F4 key for this. By default the extended ui is not enabled for comboboxes. This could cause trouble in modal dialogs, where the arrow keys are used for other purposes. <br><br> See also: <a HREF="HasExtendedUI.html">RemoveExtendedUI</a> </P> ::item:: SetSelectionFieldHeight <code>SetSelectionFieldHeight(h)</code><br> <P>Sets the height of the selection field </P> ::item:: GetSelectionFieldHeight <code>GetSelectionFieldHeight()</code><br> <P>Returns the height of the selection field </P> ::item:: GetMinSelectionFieldSize <code>GetMinSelectionFieldSize()</code><br> <P>Returns the minimum with and height (in pixels) the selection field has to be set to, to display the items in the DriveCombo without cutting any chars of. <br><br> <b>Return value</b><br> tuple(w, h) </P> ::item:: GetItemHeight <code>GetItemHeight(i)</code><br> <P>Returns the height of an item in the DriveCombo. If i is set to -1 the height of the selection field is returned </P> ::item:: GetCombobox <code>GetCombobox()</code><br> <P>Returns the underlaying Combobox instance to call additional methods upon <br><br> You should not call any methods affecting position or size of the Combobox through this instance, cos it may mess up the DriveCombo </P> ::item:: GetContainer <code>GetContainer()</code><br> <P>Returns the instance of the container window hosting the Combobox to call additional methods upon <br><br> You should not call any methods affecting position or size of the Combobox through this instance, cos it may mess up the DriveCombo </P> # **************************************************************************** ::item:: SetStyle <code>SetStyle(*styles)</code><br> <P>Sets the styles for the DriveCombo. To set the styles for the underlaying ODCombobox use the <a HREF="GetCombobox.html">GetCombobox</a> method </P> ::item:: GetStyle <code>GetStyle(*styles)</code><br> <P>Retrieves the styles for the DriveCombo. To set the styles for the underlaying ODCombobox use the <a HREF="GetCombobox.html">GetCombobox</a> method </P> ::item:: SetWindowPosAndSize <code>SetWindowPosAndSize(self, x, y, w, h)</code><br> <P>Sets the x, y, width height of the combobox. <br><br> The height of the Combobox is the overall height of the DriveCombo dropdown open. </P> ::item:: SetWindowSize <code>SetWindowSize(w, h)</code><br> <P>Sets the width height of the combobox. <br><br> The height of the Combobox is the overall height of the DriveCombo dropdown open. </P> ::item:: OffsetWindowSize <code>OffsetWindowSize(offsW, offsH)</code><br> <P>Increases or decreases the width and height of the DriveCombo by the specified offsets. <br><br> The height of the Combobox is the overall height of the DriveCombo dropdown open. </P> ::item:: GetDropdownRect <code>GetDropdownRect()</code><br> <P>Returns the bounds ot the dropdown box as ||type-RECT|| </P> ::item:: GetWindowRect <code>GetWindowRect()</code><br> <P>Returns the bounds ot the DriveCombo box as ||type-RECT|| (screen coordinates) </P> ::item:: GetClientRect <code>GetClientRect()</code><br> <P>Returns the bounds ot the client area of the DriveCombo as ||tyope-RECT|| (client coordinates) </P> ::item:: Enable <code>Enable()</code><br> <P> Enables the DriveCombo </P> ::item:: Disable <code>Disable()</code><br> <P> Diasbles the DriveCombo. Same as WS_DISABLED style set. Note: you should not disable the DriveCombo with the keyboard focus set to it. Pass the focus to another window first if so. <pre> if self.HasFocus(): someOther.SetFocus() self.Disable() </pre> </P> ::item:: IsEnabled <code>IsEnabled()</code><br> <P> Returns True if the DriveCombo is enabled, False if it is disabled. </P> ::item:: IsVisible <code>IsVisible()</code><br> <P> Checks if the Combobox is visible.(True if the DriveCombo and its parent have the WS_VISIBLE style set, False otherwise) </P> ::item:: Hide <code>Hide()</code><br> <P> Hides the DriveCombo. Note: you should not hide a window with the keyboard focus set. Pass the focus to another window first if so and disable the control. <pre> if self.HasFocus(): SomeOther.SetFocus() self.Disable() self.Hide() </pre> </P> ::item:: Show <code>Show()</code><br> <P> Shows the DriveCombo </P> |
From: jürgen u. <cer...@us...> - 2005-07-02 09:46:03
|
Update of /cvsroot/wnd/wnd/wnd_doc/doc/controls/custom controls/dirlist In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20087 Added Files: .CVSIGNORE dirlist.dtpl Log Message: bit of this and a bit of that --- NEW FILE: .CVSIGNORE --- *.html *.gif --- NEW FILE: dirlist.dtpl --- ::site:: class DirList <code class=import>defined in: wnd.custom.dirlist</code><br><br> <code>DirList(x, y, w, h, *styles)</code><br> <P> This control is an an explorer like directory contents viewer. You can use it to let the user navigate through alll files and folders of the harddrive. <br><br> Features are: <UL> <LI>shell contextmenu support <LI>shell new menu support <LI>full drag and drop support <LI>shell change notify support (will update the view when the contents of a folder have changed) <LI>multiple view and sort options including details view </UL> <br><br> Combining two of these controls will give you all means to handle file system tasks like any other full blown explorer. Only downside is that explorer is faster for huge dirs, but, its pure python code doing all the work so you definitely have to love it. <br><br> if you are aiming at a pure filelist the control comes equipped to exclude folders from the view and disallow navigating through the directory tree. Combine these two options to form a DirList that most suites your needs. <br><br> <b>Known issues</b><br><br> <UL> <LI>filesystem and non-filesystem part of the view are handled different when it comes to processing shell notifications. <br><br> This may cause some of the actions triggered by folder related changes to act slightly different. <br><br> <LI>curently tooltips are not enabled for the view. (Still struggeling) </UL> <br><br> Some thanks finally: <br> For anyone knowing Nikos Bozinis <a HREF="http://www.netez.com/2xExplorer">2xexplorer</a> it should be pretty obvious that I modeled the view after this this file manager, imitating its functionality very closely. Sadly 2xexplorer has gone comercial in the new explorer2 releases, but for anyone interested there is still a freeware version of the old 2xexplorer available for download. <br><br> Also note that there is a link '2x Internals' on the homepage that will lead you to very well written tutorial called 'Shell Explorer's Cookbook' covering pretty much in detail all the required apis involved in building a decent file manager. </P> ::site:: DirList messages <DL> <DT>'command' <DD>Send when the user double clicks or hits return on a non folder item. <br> lp= iItem<br> wp=None<br> By default the default shell verb for the item is invoked. You can disallow this by returning False. <br><br> <DT>'dirchanged' <DD>Send when the directory displayed in the view is changed or updated. <br> lp= True/False<br> wp= tuple( oldpath, newpath)<br> lParam will be set to True if the change was performed sucessfully, False if an error was encountered during the change <br><br> the tuple passed in wParam will contain the file paths of the directories, wich may not be meaningfull for non filesystem folders. <br><br> <DT>'rmbup' <DD>Send when the right clicks the view and no contextmenus are enabled for the view <br> lp= always zero<br> wp=always zero<br> When the shell context menu is not enabled the message is send when the user clicks an item, when the second context menu is not enabled this message is send when the user clicks empty space in the view aswell <br><br> <DT>'itemchanged' <DD>an item state has changed<br> wp=iItem<br> lp=tuple(OldState, NewState)<br> <br><br> OldState and NewState are two lists containg the states of the item. wich may contain one or more of the following string, describing the state of the item: <br> 'focused', 'selected', 'cuthilighted', 'drophilighted', 'glowing', 'activating' <br><br> <DT>'shell_contextmenu' <DD>By default the shells context menu is displayed for items on right mouse button up. You can adjust and control its behaviour by processing this message. <br><br> <OL> <LI>In the first stage of the context menu display the control checks the item the mouse was released over. You will receive a message 'contextmenu'<br> lp= 'init'<br> wp= nItem<br> index of the first selected item the menu is queried for. You may return False here to disallow displaying of the context menu. <br> Vou can return one ore more of the following flags indicating to the shell which items to include in the contextmenu: <br><br> <TABLE class="table1" BORDER="1"> <TR> <TD>'canrename'</TD> <TD>includes the rname verb in the menu</TD> </TR> <TR> <TD>'noverbs'</TD> <TD>excludes shell verbs</TD> </TR> <TR> <TD>'verbsonly'</TD> <TD>includes only shell verbs</TD> </TR> </TABLE> <br><br> Default us to include all verbs + 'canrename', so you'll get the full context menu for an item <br><br> <LI>Next message you will receive will be 'contextmenu' right before the context menu is displayed. <br> lp= 'open'<br> wp= popupmenu<br> popupmenu will be the Popup instance already containing all items the shell found registered as context menu handlers for the item. <br><br> You can adjust the popup to your needs, insert additional items or whatever, before the menu is actually displayed. <br> Use the <a HREF="FileList methods/GetMinMenuID.html">GetMinMenuID</a> method to request the minimum ID of menu items you can use without conflicting with the items the shell inserts. All of your own menu items ahould have IDs equal or higher than this value. The popup menu passed will always have an ID of GetMinMenuID() - 1. <br><br> There is also the opportunety to pass your own popup in response to this message. But if you do so, you should take care, in case you inserted the popup passed into your own menu, to remove the popup from your own menu when done with displaying it. <br><br> <LI> If the user made a choice and you inserted own menu items the next message you will receive is 'contextmenu' <br> lp= 'command'<br> wp= ID<br> ID will be the command ID of your menu item <br><br> <LI>finally you will receive a message 'contextmenu' <br> lp= 'close'<br> wp= True/False<br> This is the right place to perform any cleanup actions required. If everything worked out fine lParam will be set to True, else it will be False <br> Use the <a HREF="FileList methods/GetLastError.html">GetLastError</a> method to get more detailed information if something went wrong <br><br> <LI>in case you get bored while the popup menu is displayed, there are some additional 'contextmenu' messages send in the meantime <br> lp= 'helpstring'<br> wp= string<br> wparam is the helpstring (if available) for the item currently hilighted. This is the same string explorer displays on the statusbar when hovering over a contextmenu. If no helpstring is available wParam will be empty string. <br><br> <LI>'measureitem' <br>Not yet implemeted <br><br> <LI>'drawitem' <br>Not yet implemeted <br><br> </OL> <DT>'header' <DD><UL> <LI>wp= 'rmbup'<br> lp= allways zero<br> The user clicked on the header with the right mouse button </UL> </DL> ::site:: DirList styles The following styles are used with DirLists:<br><br> <TABLE class="table1" BORDER="1"> <TR> <TD>'border'</TD> <TD>displays the view with a thin border drawn around it</TD> </TR> <TR> <TD>'clientedge'</TD> <TD>displays the view with a clientedge border drawn around it</TD> </TR> <TR> <TD>editlabels'</TD> <TD>enables label editing for the view. The user may rename items</TD> </TR> <TR> <TD>'icon'</TD> <TD>displays the items in icon view</TD> </TR> <TR> <TD>'largeicon'</TD> <TD>displays the items usinf large icons. Clear this style to display the items using small icons</TD> </TR> <TR> <TD>'list'</TD> <TD>displays the items in list view</TD> </TR> <TR> <TD>'nocontextmenu'</TD> <TD>disables the shell contextmenu for the view. When you right click an item the contextmenu is not shown. This style can not be changed at runtime</TD> </TR> <TR> <TD>'nocontextmenu2'</TD> <TD>disables the second contextmenu for the view. This will disalow the contextmenu you get when you right click on empty space in the view.This style can not be changed at runtime</TD> </TR> <TR> <TD>'nodragdrop'</TD> <TD>disables dradrop support for the view. This style can not be changed at runtime</TD> </TR> <TR> <TD>'nohandleerrors'</TD> <TD>disables default error handling of the view. Mesage boxes and eventual error corrections will not be handled by the view. This style can not be changed at runtime </TD> </TR> <TR> <TD>'noshellnotify'</TD> <TD>disables shell notify support for the view. The view does not get notified about changes in a liste dfolder. This style can not be changed at runtime</TD> </TR> <TR> <TD>'report'</TD> <TD>displays the items in report view (including details header)</TD> </TR> <TR> <TD>'showselalways'</TD> <TD>keeps the selection hilight if the control looses keyboard focus</TD> </TR> </TABLE> </DL> ::folder:: DirList methods DirList controls support the following methods: ::item:: 1 base methods <P> DirList controls support the following base methods: <P> SetFocus<br> Show<br> Hide<br> IsVisible <br><br> Disable<br> Enable<br> IsEnabled <br><br> GetWindowRect<br> GetClientRect <br><br> SetWindowPos<br> SetWindowSize <br> SetWindowPosAndSize<br> OffsetWindowPos<br> OffsetWindowSize<br> </P> </P> ::item:: 2 listview methods <P> DirList controls support the following listview methods: <P> __iter__ <br><br> GetSelectedCount<br> IterSelected<br> GetSelectedItem<br> IsitemSelected<br> DeselectItem<br> SelectItem <br><br> EnshureVisible </P> </P> ::item:: 3 ShellNamespace methods <P> DirList controls supports the following ShellNamespace methods: <P> GetIconIndex<br> IsFileSystem<br> IsFileSystemAnchestor<br> IsFolder<br> IsLink <br><br> IsHidden<br> IsReadOnly<br> IsShared<br> IsRemovable <br><br> CanCopy<br> CanMove <br> CanLink<br> CanRename <br><br> <b>Note</b><br> In difference to the ShellNamespace methods you pass the line number instead a pIdl as argument </P ::item:: GetMinMenuID <code>GetMinMenuID()</code><br> <P>returns the minimum allowable ID for user defined context menu items. <br><br> Use this method in conjunction with the shells context menu to insert own menu items into the popup menu. </P> ::item:: GetLastError <code>GetLastError()</code><br> <P>returns an error (string) describing the last error encountered or None. <br><br> The error is reset to None in this call </P> ::item:: ListDir <code>ListDir(path)</code><br> <P>Lists a directory in the view. <br><br> <DL> <DT>path <DD>can be one of the following: <OL> <LI>the fully qualified path of a folder to list <LI>the absolute pIdl of a folder <LI>the CLSIDL of a special folder as defined in the shell module <LI>one of the following strings representing a special folder: <br><br> <P> 'desktop'<br> 'internet'<br> 'programs'<br> 'controls'<br> 'printers'<br> 'personal'<br> 'favorites'<br> 'startup'<br> 'recent'<br> 'sendto'<br> 'bitbucket'<br> 'startmenu'<br> 'desktopdirectory'<br> 'drives'<br> 'network'<br> 'nethood'<br> 'fonts'<br> 'templates'<br> 'common_startmenu'<br> 'common_programs'<br> 'common_startup'<br> 'common_desktopdirectory'<br> 'appdata'<br> 'printhood'<br> 'altstartup'<br> 'common_altstartup'<br> 'common_favorites'<br> 'internet_cache'<br> 'cookies'<br> 'history'<br> </P> <OL> <br><br> </DL> <br><br> <b>Return value</b><br> True if the directory could be sucessfully listed to the view, False otherwise. <br> Use <a HREF="GetLastError.html">GetLastError</a> to find out if error informtion is available </P> ::item:: GetFilespec <code>GetFilespec()</code><br> <P>returns the current filespec for the view. <br><br> See <a HREF="SetFilespec.html">SetFilespec</a> <br><br> <b>Return value</b><br> a tuple(filespec, flag-matchfolders) </P> ::item:: SetFilespec <code>SetFilespec(filespec, matchfolders=False)</code><br> <P>Sets the current filespec for the view. <br><br> <DL> <DT>filespec <DD>a filespec like '*.txt' to filter files in the view. <DT>matchfolders <DD>Set to True if the filespec should be applied on foder items awell, False otherwise </DL> <br><br> For chnges to take effect you may have to <a HREF="Refresh.html">Refresh</a> the view </P> ::item:: Getlang <code>GetLang()</code><br> <P>returns the current language used for the view. </P> ::item:: SetLang <code>SetLang(lang_code)</code><br> <P>Sets the language used for the view. <br><br> languages currently supported are: <TABLE class="table1" BORDER="1"> <TR> <TD>'en'</TD> <TD>english</TD> <TR> <TR> <TD>'de'</TD> <TD>german</TD> <TR> </TABLE> <br><br> by default the language is set by from whatever locale.getdefaultlocale()[0] returns. If the language could not be found english is used as fallback languages. Quite reasonable though. <br><br> Translations of the string table as found in the 'dl_lang' folder are highly welcome. Feel free to supply a patch or post to the ist... </P> ::item:: Refresh <code>Refrsh()</code><br> <P>Refreshes the view. <br><br> <b>Return value</b><br> True if the directory could be sucessfully listed to the view, False otherwise. <br> Use <a HREF="GetLastError.html">GetLastError</a> to find out if error informtion is available </P> ::item:: GetCwd <code>GetCwd(path=False)</code><br> <P>Returns the absolute pIdl of the current directory. <br><br> If no directory is set to the view the pIdl returned will always point to the root of the shell namespace, the desktop. <br><br> The returned pIdl should be freed when done with it. <br><br> If path is True, the path of the current dir is returned. If the current dir does not point to a dolder within the file system '' (empty string) is returend. </P> ::item:: GetCLSIDL <code>GetCLSIDL()</code><br> <P>Returns the CLSIDL as tuple(CLSIDL, clsidl-name) of the current directory or None if the shell does not define a CLSIDL is defined for the dir. </P> ::item:: AllowNavigate <code>AllowNavigate(Bool)</code><br> <P>Allows or disallows navigating around in the view. <br><br> If you set 'Bool' to False the user is no longer allowed to climb the directory tree up or down; Opening of folders is disabled and the navigation header is hidden. Instead of opening the folder a 'command' message is send to the message handler wich you may process in response. If you don't take any actions the default shell verb for the item is triggered. <br><br> To allow navigation set Bool to True. </P> ::item:: ShowFolders <code>ShowFolders(Bool)</code><br> <P>Adjusts the view to include or exclude folders from being listed. <br><br> <br><br> For chnges to take effect you may have to <a HREF="Refresh.html">Refresh</a> the view </P> ::item:: AreFoldersVisible <code>AreFoldersVisible()</code><br> <P>Returns True if the view is adjusted to show both, files and folders, False if folders are excluded from the view. </P> ::item:: IsDesktopFolder <code>IsDesktopFolder()</code><br> <P>Returns True if the view currently displays the desktop folder (not '*\windows\desktop'), False otherwise. </P> ::item:: GetPidl <code>GetPidl(lineno)</code><br> <P>Returns the absolute pIdl of an item <br><br> <br><br> The pIdl returned has to be freed when done with it. Use the <a HREF="PiflFree.html">PidlFree</a> method. </P> ::item:: GetPidlRel <code>GetPidlrel(lineno)</code><br> <P>Returns the relative (to the current dir) pIdl of an item <br><br> The pIdl returned has to be freed when done with it. Use the <a HREF="PiflFree.html">PidlFree</a> method. </P> ::item:: PidlFree <code>PidlFree(pIdl)</code><br> <P>Frees a pIdl <br><br> </P> ::item:: GetName <code>GetName(lineno)</code><br> <P>Returns the name of the item at the specified line <br><br> </P> ::item:: GetSize <code>GetSize(lineno, asstring=False)</code><br> <P>Returns the size in (bytes) of the item at the specified line or none if not available <br><br> If asstring is True the formated string as shown in the view is returned <br><br> </P> ::item:: GetDate <code>GetDate(lineno, asstring=False)</code><br> <P>Returns the modification date of the item as ||type-FILETIME|| struct or None if not available <br><br> If asstring is True the formated string as shown in the view is returned </P> ::item:: GetPath <code>GetPath(lineno)</code><br> <P>returns the full path of an item or None if the item does not point to a filesystem object </P> ::item:: IsSmallIcon <code>IsSmallIcon()</code><br> <P>returns True if the view is in smallicon view, False if it shows large icons </P> ::item:: FormatInt <code>FormatSize(n)</code><br> <P>Formats an integer and returns it as nicely decimal sep padded string you can use to display wherever. <br><br> This is the same method the DirList uses to display the file sizes in details view </P> |
From: jürgen u. <cer...@us...> - 2005-07-02 09:45:04
|
Update of /cvsroot/wnd/wnd/wnd_doc/doc/controls/custom controls/drivecombo In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19635/drivecombo Log Message: Directory /cvsroot/wnd/wnd/wnd_doc/doc/controls/custom controls/drivecombo added to the repository |
From: jürgen u. <cer...@us...> - 2005-07-02 09:44:43
|
Update of /cvsroot/wnd/wnd/wnd_doc/doc/controls/custom controls/dirlist In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19409/dirlist Log Message: Directory /cvsroot/wnd/wnd/wnd_doc/doc/controls/custom controls/dirlist added to the repository |
From: jürgen u. <cer...@us...> - 2005-07-02 09:44:25
|
Update of /cvsroot/wnd/wnd/wnd_doc/doc/controls/control classes/treeview In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19088 Modified Files: treeview.dtpl Log Message: bit of this and a bit of that Index: treeview.dtpl =================================================================== RCS file: /cvsroot/wnd/wnd/wnd_doc/doc/controls/control classes/treeview/treeview.dtpl,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** treeview.dtpl 15 May 2005 10:09:32 -0000 1.2 --- treeview.dtpl 2 Jul 2005 09:44:10 -0000 1.3 *************** *** 395,399 **** </TR> <TR> ! <TD>'showselallways'</TD> <TD>Keeps the selection highlight when the control looses focus</TD> --- 395,399 ---- </TR> <TR> ! <TD>'showselalways'</TD> <TD>Keeps the selection highlight when the control looses focus</TD> *************** *** 897,900 **** --- 897,912 ---- </P> + + ::item:: EndEditLabel + <code>EndEditLabel(cancel=False)</code><br> + <P>ends label editing. + <br><br> + If cancel flag is True label editing is ended without saving the changes + <br><br> + <b>Return value</b><br> + True on success, False otherwise + </P> + + ::item:: GetEditControl <code>GetEditControl()</code><br> *************** *** 909,913 **** ::item:: ItemHittest <code>ItemHittest(x, y)</code><br> ! <P>Tests the specified coordinates for an item being there.<br> Return value is tuple(hItem, *flags) or --- 921,925 ---- ::item:: ItemHittest <code>ItemHittest(x, y)</code><br> ! <P>Tests the specified (screen) coordinates for an item being there.<br> Return value is tuple(hItem, *flags) or *************** *** 948,953 **** <code>EnshureVisible(handle)</code><br> <P>Enshures that the specified item is visible.<br> ! The listview is scrolled and items are expanded to ! enshure this.<br><br> Return value is True if any items had to be expanded, False otherwise. --- 960,966 ---- <code>EnshureVisible(handle)</code><br> <P>Enshures that the specified item is visible.<br> ! The treeview is scrolled and items are expanded to ! enshure this. ! <br><br> Return value is True if any items had to be expanded, False otherwise. |
From: jürgen u. <cer...@us...> - 2005-07-02 09:43:51
|
Update of /cvsroot/wnd/wnd/wnd_doc/doc/controls/control classes/tooltip In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18809 Modified Files: tooltip.dtpl Log Message: bit of this and a bit of that Index: tooltip.dtpl =================================================================== RCS file: /cvsroot/wnd/wnd/wnd_doc/doc/controls/control classes/tooltip/tooltip.dtpl,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** tooltip.dtpl 15 May 2005 10:08:59 -0000 1.2 --- tooltip.dtpl 2 Jul 2005 09:43:32 -0000 1.3 *************** *** 101,104 **** --- 101,117 ---- + ::site:: class TooltipFromHandle + <code class=import>defined in: wnd.controls.tooltip</code><br><br> + <code>TooltipFromHandle(hwnd, *styles)</code><br> + + <br><br> + This class wraps tooltip methods around a tooltip control handle + <br><br> + styles can be: 'debug', 'debugall', 'subclass', 'nosubclass' + <br><br> + The control is subclassed by default, you can prevent this by specifying the + 'nosubclass' style' + + *************** *** 163,167 **** <TR> <TD>'balloon'</TD> ! <TD>Displays tooltips as these weird looking bubbles</TD> </TR> <TR> --- 176,180 ---- <TR> <TD>'balloon'</TD> ! <TD>Displays tooltips as one of these weird looking bubbles</TD> </TR> <TR> |
From: jürgen u. <cer...@us...> - 2005-07-02 09:43:10
|
Update of /cvsroot/wnd/wnd/wnd_doc/doc/controls/control classes/statusbar In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18463 Modified Files: statusbar.dtpl Log Message: bit of this and a bit of that Index: statusbar.dtpl =================================================================== RCS file: /cvsroot/wnd/wnd/wnd_doc/doc/controls/control classes/statusbar/statusbar.dtpl,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** statusbar.dtpl 15 May 2005 10:07:20 -0000 1.2 --- statusbar.dtpl 2 Jul 2005 09:43:01 -0000 1.3 *************** *** 10,16 **** ! ::site:: class AnimationFromHandle ! <code class=import>defined in: wnd.controls.animation</code><br><br> ! <code>AnimationFromHandle(hwnd, *styles)</code><br> <P> Wraps Animation methods around a hwnd. --- 10,16 ---- ! ::site:: class StatusbarFromHandle ! <code class=import>defined in: wnd.controls.statusbar</code><br><br> ! <code>StatusbarFromHandle(hwnd, *styles)</code><br> <P> Wraps Animation methods around a hwnd. *************** *** 230,234 **** different content for each of the states. <br><br> ! <b>Return valu</b><br> True if the mode has changed, False otherwise --- 230,234 ---- different content for each of the states. <br><br> ! <b>Return value</b><br> True if the mode has changed, False otherwise |
From: jürgen u. <cer...@us...> - 2005-07-02 09:42:37
|
Update of /cvsroot/wnd/wnd/wnd_doc/doc/controls/control classes/menu In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18169 Modified Files: menu.dtpl Log Message: bit of this and a bit of that Index: menu.dtpl =================================================================== RCS file: /cvsroot/wnd/wnd/wnd_doc/doc/controls/control classes/menu/menu.dtpl,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** menu.dtpl 29 Apr 2005 15:19:02 -0000 1.1.1.1 --- menu.dtpl 2 Jul 2005 09:42:29 -0000 1.2 *************** *** 2,5 **** --- 2,8 ---- ::defaultpage:: menu + + + ::site:: Menu <IMG SRC="menu.gif"></IMG> *************** *** 75,78 **** --- 78,218 ---- + + ::site:: ownerdrawing menu items + If you set the ownerdraw flag for one or more menu item you will receive two + messages in the mainwindows message handler whenever an item needs to be + drawn: 'measureitem' and 'drawitem' + <br><br> + To draw the item it has to be measured to tell the system the size required + to display the item. You will receive a 'measureitem' message with lParam + set to a ||type-MEASUREITEMSTRUCT||. The + <b><b> + itemID</b> member will be set to the ID + of the menu item that needs to be measured and you should fill in the + <b>itemWidth</b> + and <b>itemHeight</b> members with the desired item size. + Usually the size you specify will be the width of the widest + menu item and the height of the highest. + + <br><br> + <br><br> + When the item needs to be drawn you will receive a 'drawitem' message + with lParam set to a ||type-DRAWITEMSTRUCT||. + <br> + The <b>itemID</b> member will be set to the ID of the menu item to be drawn. + <br><br> + The <b>itemAction</b> member will contain a value indicating the drawing action + required. The ||type-DRAWITEMSTRUCT|| carries along the necessary + constants to check for the action required: + + <TABLE class="table1" BORDER="1"> + <TH>item action flags</TH> + <TR> + <TD>DRAWENTIRE</TD> + <TD>the whole item needs to be drawn</TD> + </TR> + <TR> + <TD>SELECTCHANGE</TD> + <TD>the selection state has changed</TD> + </TR> + <TR> + <TD>FOCUSCHANGE</TD> + <TD>the focus has changed</TD> + </TR> + </TABLE> + + <br><br> + The <b>itemState</b> member will contain the state the item should be drawn in. + Use the constants carried along with in the ||type-DRAWITEMSTRUCT|| to + check for the state recomended: + + <TABLE class="table1" BORDER="1"> + <TH>item action flags</TH> + <TR> + <TD>CHECKED</TD> + <TD>the item is to be checked</TD> + </TR> + <TR> + <TD>DEFAULT</TD> + <TD>the item is to be drawn as default item</TD> + </TR> + <TR> + <TD>DISABLED</TD> + <TD>the item is to be drawn disabled</TD> + </TR> + <TR> + <TD>FOCUS</TD> + <TD>the item should be drawn with focus hilight</TD> + </TR> + <TR> + <TD>GRAYED</TD> + <TD>the item is to be drawn grayed</TD> + </TR> + <TR> + <TD>SELECTED</TD> + <TD>the item is to be drawn selected</TD> + </TR> + </TABLE> + + <br><br> + The <b>hwndItem</b> member will contain the handle of the menu the item belongs + to + + <br><br> + The <b>hDC</b> member will contain the handle of the device context to use for + drawing + to + + <br><br> + The <b>rcItem</b> member will contain a ||type-RECT|| with the bounds of the item + + + + + + ::site:: Menu item flags + The following flags are used with menu items:<br><br> + + <TABLE class="table1" BORDER="1"> + <TH>state flags</TH> + <TR> + <TD>'disabled'</TD> + <TD>the item is disabled</TD> + </TR> + <TR> + <TD>'checked'</TD> + <TD>the item is checked</TD> + </TR> + <TR> + <TD>'default'</TD> + <TD>the item is the default item. (each menu or popup can only have + one default item)</TD> + </TR> + </TABLE> + + <TABLE class="table1" BORDER="1"> + <TH></TH> + <TR> + <TD>'menubarbreak'</TD> + <TD>the item is a menubarbreak. The next item is displayed in the next + column separated by a vertical bar</TD> + </TR> + <TR> + <TD>'menubreak'</TD> + <TD>same as 'menubarbreak' but without the separating bar</TD> + </TR> + MFT_OWNERDRAW + <TR> + <TD>'ownerdraw'</TD> + <TD>the item is ownerdrawn. You will receive 'measureitem' and 'drawitem' + messages whenever the item needs to be drawn. + See <a HREF="ownerdrawing menu items.html">ownerdrawing menu items</a> + </TD> + </TR> + + </TABLE> + + + ::site:: Menu messages The following message are send by Menus:<br><br> *************** *** 115,118 **** --- 255,263 ---- + ::item:: Clear + <code>Clear(hMenu=None)</code><br> + <P>Removes all items from a menu + </P> + ::item:: Check <code>Check(ID)</code><br> *************** *** 549,559 **** - - - - - - - # ::item:: # <code></code><br> --- 694,697 ---- |
From: jürgen u. <cer...@us...> - 2005-07-02 09:42:10
|
Update of /cvsroot/wnd/wnd/wnd_doc/doc/controls/control classes/listview In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17741 Modified Files: listview.dtpl Log Message: bit of this and a bit of that Index: listview.dtpl =================================================================== RCS file: /cvsroot/wnd/wnd/wnd_doc/doc/controls/control classes/listview/listview.dtpl,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** listview.dtpl 17 May 2005 20:17:15 -0000 1.3 --- listview.dtpl 2 Jul 2005 09:42:01 -0000 1.4 *************** *** 618,622 **** lp=tuple(dwOldState, dwNewState)<br> The tuple contains the bit-flags of the items state. ! Use either the <a HREF="StateToString.html">StateToString</a> method to translate it into human readable strings, or use bitwise & on one of the LVIS_* constants as defined --- 618,622 ---- lp=tuple(dwOldState, dwNewState)<br> The tuple contains the bit-flags of the items state. ! Use either the <a HREF="Listview methods/StateToString.html">StateToString</a> method to translate it into human readable strings, or use bitwise & on one of the LVIS_* constants as defined *************** *** 638,642 **** <DT>'lmdoubble' ! <DD>left mouse double click on th elistview<br> wp=allways zero<br> lp=allways zero --- 638,642 ---- <DT>'lmdoubble' ! <DD>left mouse double click on the listview<br> wp=allways zero<br> lp=allways zero *************** *** 644,652 **** <DT>'lmbdown' ! <DT>left mouse button released<br> ! <DD>wp=allways zero<br> lp=allways zero <br><br> <DT>'return' <DD>send when the return key is hit<br> --- 644,658 ---- <DT>'lmbdown' ! <DD>left mouse button released<br> ! wp=allways zero<br> lp=allways zero <br><br> + <DT>'releasecapture' + <DD>send when the listview has released the mouse capture<br> + wp=allways zero<br> + lp=allways zero + <br><br> + <DT>'return' <DD>send when the return key is hit<br> *************** *** 705,709 **** ::item:: InsertItem ! <code>InsertItem(lineno, text, iImage=None, lp=None, iStateImage=0)</code><br> <P> Inserts an item. --- 711,715 ---- ::item:: InsertItem ! <code>InsertItem(lineno, text, iImage=None, lp=None, iOverlayImage=0, iStateImage=0)</code><br> <P> Inserts an item. *************** *** 721,724 **** --- 727,733 ---- the item. Can be any int or long with a meaning to the user. + <DT>iOverlayImage + <DD>Index of an overlay image in the associated + state image list <DT>iStateImage <DD>Index of the state image in the associated *************** *** 740,744 **** ::item:: Item ! <code>Item(text, iImage=None, lp=None, iStateImage=0)</code><br> <P> Append an item to the listview --- 749,753 ---- ::item:: Item ! <code>Item(text, iImage=None, lp=None, iOverlayImage=0, iStateImage=0)</code><br> <P> Append an item to the listview *************** *** 826,830 **** ::item:: CutSelectItem <code>CutSelectItem(lineno=-1)</code><br> ! <P>Marks the item as selected for a cut-and-paste selection <br><br> The default applies this to all items --- 835,839 ---- ::item:: CutSelectItem <code>CutSelectItem(lineno=-1)</code><br> ! <P>Marks the item as selected <br><br> The default applies this to all items *************** *** 844,848 **** </P> ! ::item::DropHilightItem <code>DropHilightItem(lineno=-1)</code><br> <P>Marks the item as drop-hilighted --- 853,857 ---- </P> ! ::item:: DropHilightItem <code>DropHilightItem(lineno=-1)</code><br> <P>Marks the item as drop-hilighted *************** *** 930,939 **** </P> ! ::item:: GetItemStateImage ! <code>GetItemStateImage(lineno)</code><br> ! <P> ! Returns the index of the state image currently ! assigned to the item. ! </P> --- 939,943 ---- </P> ! *************** *** 959,962 **** --- 963,989 ---- </P> + ::item:: GetItemStateImage + <code>GetItemStateImage(lineno)</code><br> + <P> + Returns the index of the state image currently + assigned to the item. + </P> + + + ::item:: SetItemOverlayImage + <code>SetItemOverlayImage(lineno, iOverlayImage)</code><br> + <P> + Sets the overlay image for the item. + If lineno is -1 the image applies to all items in the listview. + </P> + + ::item:: GetItemOverlayImage + <code>GetItemOverlayImage(lineno)</code><br> + <P> + Returns the index of the overlay image currently + assigned to the item. + </P> + + ::item:: Clear <code>Clear()</code><br> *************** *** 1151,1154 **** --- 1178,1197 ---- + ::item:: SetTooltips + <code>SetTooltips(Tooltip)</code><br> + <P>Associates a tooltip control to the Listview + <br><br> + <b>Return value</b><br> + the hwnd of the tooltip control previously asigned to the Listview + </P> + + ::item:: GetTooltips + <code>GetTooltips()</code><br> + <P>Returns the hwnd of the tooltip control assigned to the Listview or + None + </P> + + + ::item:: GetSelectedCount <code>GetSelectedCount()</code><br> |
From: jürgen u. <cer...@us...> - 2005-07-02 09:41:01
|
Update of /cvsroot/wnd/wnd/wnd_doc/doc/controls/control classes/imagelist In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17133 Modified Files: imagelist.dtpl Log Message: bit of this and a bit of that Index: imagelist.dtpl =================================================================== RCS file: /cvsroot/wnd/wnd/wnd_doc/doc/controls/control classes/imagelist/imagelist.dtpl,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** imagelist.dtpl 15 May 2005 10:03:02 -0000 1.2 --- imagelist.dtpl 2 Jul 2005 09:40:41 -0000 1.3 *************** *** 267,275 **** icon by icon, whenever an icon for a file is requested. On 9x systems the cache is shared amongst all processes. ! Currently only ! <a HREF="Imagelist methods/Drawicon.html">DrawIcon</a> and ! <a HREF="Imagelist methods/DrawiconEx.html">DrawIconEx</a> ! <a HREF="Imagelist methods/GetIconSize.html">GetIconSize</a> ! methods are supported by this class. --- 267,278 ---- icon by icon, whenever an icon for a file is requested. On 9x systems the cache is shared amongst all processes. ! Currently only the following methods are supported by this class<br> ! <a HREF="Imagelist methods/Draw.html">Draw</a> <br> ! <a HREF="Imagelist methods/DrawEx.html">DrawEx</a><br> ! <a HREF="Imagelist methods/GetIconSize.html">GetIconSize</a> <br> ! <a HREF="Imagelist methods/GetIconSize.html">GetIconSize</a> <br> ! <a HREF="Imagelist methods/SetBkColor.html">SetBkColor</a> <br> ! <a HREF="Imagelist methods/AddIcons.html">AddIcons</a> <br> ! *************** *** 487,491 **** to be drawn transparently over the image. <br> ! See <a HREF=">SetOverlayImage.htnl">SetOverlayImage</a> </P> --- 490,494 ---- to be drawn transparently over the image. <br> ! See <a HREF=">SetOverlayImage.html">SetOverlayImage</a> </P> |
From: jürgen u. <cer...@us...> - 2005-07-02 09:40:17
|
Update of /cvsroot/wnd/wnd/wnd_doc/doc/controls/control classes/combobox In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16845 Modified Files: combobox.dtpl Log Message: bit of this and a bit of that Index: combobox.dtpl =================================================================== RCS file: /cvsroot/wnd/wnd/wnd_doc/doc/controls/control classes/combobox/combobox.dtpl,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** combobox.dtpl 15 May 2005 10:01:44 -0000 1.2 --- combobox.dtpl 2 Jul 2005 09:40:08 -0000 1.3 *************** *** 9,12 **** --- 9,40 ---- + + <H3>Combobox how to guide</H3> + + <H4>How to process return messages</H4> + If you want to use a Combobox as commandline like control + you have to process 'return' messages when the user hits enter. + For this purpose you use either a 'simple' or 'dropdown' Combobox, + wich both host an editbox to take user input and process the messages for + the editbox. + + <pre> + + self.cmb = Combobox(self, 0, 0, 0, 0, 'dropdown') + self.ed=self.cmb.GetEditControl() + self.cmb.onMSG = self.ed.onMSG = self.on_cmb + + def on_cmb(self, msg, wp, lp): + if msg=='return' + command = self.cmb.GetText() + + </pre> + + + <HR> + + + + ::site:: class ComboboxFromHandle <code class=import>defined in: wnd.controls.combobox</code><br><br> *************** *** 115,119 **** <TD>'disablenoscroll'</TD> <TD>Keeps the scrollbar if there are not enough items ! in the combobox to scroll >grin<></TD> </TR> <TR> --- 143,147 ---- <TD>'disablenoscroll'</TD> <TD>Keeps the scrollbar if there are not enough items ! in the combobox to scroll >grin<</TD> </TR> <TR> *************** *** 367,371 **** ::item:: SetScrollWidth ! <code>SetScrollWidth(n)</code><br> </P> Sets the width the Combobox can be scrolled horizontally (in pixels). --- 395,399 ---- ::item:: SetScrollWidth ! <code>SetScrollWidth(w)</code><br> </P> Sets the width the Combobox can be scrolled horizontally (in pixels). |
From: jürgen u. <cer...@us...> - 2005-07-02 09:39:14
|
Update of /cvsroot/wnd/wnd/wnd_doc/doc/controls In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16219 Modified Files: controls.dtpl Log Message: bit of this and a bit of that Index: controls.dtpl =================================================================== RCS file: /cvsroot/wnd/wnd/wnd_doc/doc/controls/controls.dtpl,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** controls.dtpl 15 May 2005 09:58:20 -0000 1.2 --- controls.dtpl 2 Jul 2005 09:39:05 -0000 1.3 *************** *** 339,342 **** --- 339,346 ---- <br><br> When the window or control closes all timers still open will be killed + <br><br> + You can use the <a HREF="IsOwnTimer.html">IsOwnTimer</a> + method to check if the ID of a timer was registered using this + method or not </P> *************** *** 344,349 **** --- 348,365 ---- <code>KillTimer(ID)</code><br> <P>Kills a timer + <br><br> + See <a HREF="SetTimer.html">SetTimer</a> + </P> + ::item:: IsOwnTimer + <code>IsOwnTimer(ID)</code><br> + <P>Returns True if the ID of a timer was registered + by the window using the + <a HREF="SetTimer.html">SetTimer</a> method, False otherwise + </P> + + + ::item:: GetTimers <code>GetTimers()</code><br> *************** *** 535,539 **** <code>SetFont(Font)</code><br> <P> ! Sets the font for the window. Font should be a font class. </P> --- 551,556 ---- <code>SetFont(Font)</code><br> <P> ! Sets the font for the window. Font should be a font instance or a font ! handle as returned by a call to <a HREF="GetFont.html">GetFont</a>. </P> *************** *** 777,781 **** </P> ! ::item:: HasMouseCapture <code>HasMouseCapture()</code><br> <P> --- 794,798 ---- </P> ! ::item:: HasMouseCapture <code>HasMouseCapture()</code><br> <P> |
From: jürgen u. <cer...@us...> - 2005-07-02 09:38:42
|
Update of /cvsroot/wnd/wnd/wnd_doc/doc/api/wintime In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16072 Modified Files: wintime.dtpl Log Message: bit of this and a bit of that Index: wintime.dtpl =================================================================== RCS file: /cvsroot/wnd/wnd/wnd_doc/doc/api/wintime/wintime.dtpl,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** wintime.dtpl 29 Apr 2005 15:16:04 -0000 1.1.1.1 --- wintime.dtpl 2 Jul 2005 09:38:31 -0000 1.2 *************** *** 33,37 **** ::item:: FiletimeToSystemtime <code class=import>defined in: wnd.api.wintime</code><br><br> ! <code>FiletimeToSystemtime((filetime)</code><br> <P>Converts a ||type-FILETIME|| struct to a ||type-SYSTEMTIME|| struct and returns it --- 33,37 ---- ::item:: FiletimeToSystemtime <code class=import>defined in: wnd.api.wintime</code><br><br> ! <code>FiletimeToSystemtime(filetime)</code><br> <P>Converts a ||type-FILETIME|| struct to a ||type-SYSTEMTIME|| struct and returns it |
From: jürgen u. <cer...@us...> - 2005-07-02 09:38:15
|
Update of /cvsroot/wnd/wnd/wnd_doc/doc/api/winpath In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15843 Modified Files: winpath.dtpl Log Message: bit of this and a bit of that Index: winpath.dtpl =================================================================== RCS file: /cvsroot/wnd/wnd/wnd_doc/doc/api/winpath/winpath.dtpl,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** winpath.dtpl 15 May 2005 09:57:35 -0000 1.1 --- winpath.dtpl 2 Jul 2005 09:38:06 -0000 1.2 *************** *** 9,13 **** ! ::folder:: path methods ::item:: AddBackslash --- 9,13 ---- ! ::folder:: path functions ::item:: AddBackslash |
From: jürgen u. <cer...@us...> - 2005-07-02 09:37:53
|
Update of /cvsroot/wnd/wnd/wnd_doc/doc/api/shell/shellnotify In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15542 Modified Files: shellnotify.dtpl Log Message: bit of this and a bit of that Index: shellnotify.dtpl =================================================================== RCS file: /cvsroot/wnd/wnd/wnd_doc/doc/api/shell/shellnotify/shellnotify.dtpl,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** shellnotify.dtpl 15 May 2005 10:19:34 -0000 1.2 --- shellnotify.dtpl 2 Jul 2005 09:37:37 -0000 1.3 *************** *** 1,14 **** ::site:: class ShellNotify <code class=import>defined in: wnd.api.shell</code><br><br> <code>ShellNotify(Window, message, callback)</code><br> Sets a window for being the receiver of various shell ! notification messages. <DL> <DT>Window <DD>the parent window <DT>message ! <DD> Specify the message you want to receive in response to an event ! (WM_USER + x is recommendet here). <DT>callback <DD>should be a function taking --- 1,172 ---- + + ::site:: class ShellChangeNotification + <code class=import>defined in: wnd.api.shell</code><br><br> + <code>ShellChangeNotification()</code><br> + <br><br> + + This class handles registration of a notificaion handle to monitor changes + in a specified folder. + <br><br> + You will not get informed in detail about the events occuring in the folder + like when using the <a HREF="class ShellNotify.html>ShellNotify</a> + class. You get a notification that a change ocured and its up to you + to find out what happend. + + + + ::folder:: ShellChangeNotification methods + The ShellChangeNotification class defines the following methods: <br><br> + + ::item:: Close + <code>Close()</code><br> + <P> + Closes a previously registered handle + </P> + + ::item:: Regisdter + <code>Register(path, *flags, **kwargs)</code><br> + <P> + <DL> + <DT>path + <DD>the path of the folder to monitor + <DT>*flags + <DD>one ore more of the following flags to specify wich events + to monitor: + <br> + + <TABLE class="table1" BORDER="1"> + <TR> + <TD>'attributes'</TD> + <TD>monitors attribute changes</TD> + </TR> + + <TR> + <TD>'creation'</TD> + <TD>??. I do not have any documentation about this flag</TD> + </TR> + <TR> + <TD>'dirname'</TD> + <TD>monitors folder related changes. A folder is created, removed or similar</TD> + </TR> + <TR> + <TD>'filename'</TD> + <TD>monitors file related changes. A file is created, removed or similar</TD> + </TR> + <TR> + <TD>'lastaccess'</TD> + <TD>monitors changes affecting the last access time of a + file. This will fail on win9x systems</TD> + </TR> + <TR> + <TD>'lastwrite'</TD> + <TD>monitors changes affecting the last write time of a + file. This will fail on win9x systems</TD> + </TR> + <TR> + <TD>'size'</TD> + <TD>monitors changes affecting the size of a file</TD> + </TR> + <TR> + <TD>'security'</TD> + <TD>monitors changes affecting the security descriptor of a + file. This will fail on win9x systems</TD> + </TR> + </TABLE> + + + + <DT>**kwargs + <DD> + <TABLE class="table1" BORDER="1"> + <TR> + <TD>'hwnd'</TD> + <TD>can be a Hwnd of a window or any other identifyer + to be passed to the + <a HREF="onMSG.html">onMSG</a> method as hwnd + parameter. Use this for example if you want to tell multiple + notification handlers apart. + </TD> + </TR> + <TR> + <TD>'subtree'</TD> + <TD>If True changes are monitored for the whole directory tree</TD> + </TR> + <TR> + <TD>'timeout'</TD> + <TD>this is the timeout the handler will use when a message + arrives to wait for the next message, before it informs the user + that a message has arrived. + <br> + Many events trigger multiple messages and its quite likely + that many events of the same type occur in the folder. + The handler waits for the specified timeout to filter multiple + messages out. This help to reduce traffic. The timeout defaults + to 200 (miliseconds). Adjust to your needs. + </TD> + </TR> + </TABLE> + </DL> + + <br><br> + <b>Notes<b> + <UL> + <LI>You may receive multiple notifications for an event registered. + For example if you registered for 'size' notifications you may + and up with 5 notifications being send for one event. + <LI> + </UL> + + + + + + + + </P> + + ::item:: onMSG + <code>onMSG(hwnd, msg, wp, lp)</code><br> + <P> + The message handler for the class. + <br><br> + When an event occures the one and only message 'shellchange' + will be send to the handler. + + <DL> + <DT>hwnd + <DD>the hwnd you specified in the + <a HREF="Register.html">Register</a> method or 0 (zero) + <DT>msg + <DD>'shellchange' + <DT>wp + <DD>allways zero + <DT>lp + <DD>always zero + </DL> + + </P> + + + + + + ::site:: class ShellNotify <code class=import>defined in: wnd.api.shell</code><br><br> <code>ShellNotify(Window, message, callback)</code><br> + + <P> Sets a window for being the receiver of various shell ! notification messages. ! ! <DL> <DT>Window <DD>the parent window <DT>message ! <DD> Specify the message you want to receive in response to an event. ! Use <code class='import'>RegisterWindowMessage</code> (sorry ! no link here) to register a message. <DT>callback <DD>should be a function taking *************** *** 41,48 **** </pre> ! <br><br> ! See <a HREF="ShellNotify methods/HandleMessage.html">HandleMessage</a> ! for an overview of events. --- 199,235 ---- </pre> ! <br><br> ! See <a HREF="ShellNotify methods/HandleMessage.html">HandleMessage</a> ! for an overview of events. ! <br><br> ! This class has some advantages and some disadvantages over ! <a HREF="class ShellChangeNotification.html>ShellChangeNotification</a> ! <br><br> ! <OL> ! <LI> <b>+</b> is that you can specify a pIdl to monitor ! <br> ! This makes it possible to monitor changes in virtual folders that ! do not have a file system path - like 'drives' or 'printer' or similar. ! <br><br> ! ! <LI><b>+</b> is you get very detailed information on changes ! <br><br> ! ! <LI><b>-</b> is that the way this api is implemented is somewhat slow. ! The underlaying api hooks into Explorers notification loop, ! and there is a chance that it might not work with explorer not ! being present on the system. ! ! <br> ! ! ! </OL> ! <br><br> ! If you have to rely on geting notified more quickly use the ! <a HREF="class ShellChangeNotification.html>ShellChangeNotification</a> ! class + </P> + *************** *** 55,64 **** ::item:: Close <code>Close()</code><br> Closes the wrapper and frees all related resources. You should take care to call this method ! ::item:: ! <code></code><br> ! ::item:: Register <code>Register(pIdl, *flags)</code><br> --- 242,251 ---- ::item:: Close <code>Close()</code><br> + <P> Closes the wrapper and frees all related resources. You should take care to call this method + </P> ! ::item:: Register <code>Register(pIdl, *flags)</code><br> *************** *** 84,88 **** --- 271,277 ---- ::item:: HandleMessage + <code>HandleMessage(hwnd, msg, wp, lp)</code><br> + <P> The window should call HandleMessage in response to s notification message. This method translates the *************** *** 244,247 **** </UL> ! \ No newline at end of file --- 433,436 ---- </UL> ! <P> \ No newline at end of file |
From: jürgen u. <cer...@us...> - 2005-07-02 09:37:18
|
Update of /cvsroot/wnd/wnd/wnd_doc/doc/api/shell/shellnew In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15312 Added Files: shellnew.dtpl shellnew.gif Log Message: bit of this and a bit of that --- NEW FILE: shellnew.dtpl --- ::site:: function GetShellNew <code class=import>defined in: wnd.api.shell.shellnew</code><br><br> <code>GetShellNew()</code><br> <br><br> This function is used by <a HREF="class ShellNewMenu.html">ShellNewMenu</a> class to retrieve all (valid) 'shellnew' handlers from the registry. <br><br> The function assumes that the 'ShellNew' key cna be found either directly under the file asociation key or in an emidiate subkey of the key named after the default key of the asociation: <br> <pre> i.e. '.txt' --> 'ShellNew' or '.txt' --> 'text.file' --> 'ShellNew' </pre> Dono wether this is suficient or not. We'll see <br><br> <b>Return value<b/><br><br> A list of all available (valid!!) ShellNew asociations sorted. The list returned contains a list for each item [name, file-asoc, command, data] <TABLE class="table1" BORDER="1"> <TR> <TD>file-asoc</TD> <TD>something like: '.txt' or 'folder'</TD> </TR> <TR> <TD>'command'</TD> <TD>indicates how to create the file and how to use the data member can be one of the following: <P> 'command' (data is the shell command to create the new file) <br><br> 'data' (data is template data for a new file as bytes array) <br><br> 'filename' (data is a path to a template file to be used as new file) <br><br> 'folder' (data is ''. Should create a new folder) <br><br> 'nullfile' (data is '', the file should be created as empty 'txt' file) <br> </P> </TD> </TR> <TR> <TD>'data'</TD> <TD>data required to create the item</TD> </TR> </TABLE> ::site:: class ShellNewMenu <code class=import>defined in: wnd.api.shell.shellnew</code><br><br> <code>ShellNewMenu(minID, maxID)</code><br> <br><br> <P> This class handles all the details required to create an Explorer like 'ShellNew' menu <br><br> <IMG SRC="shellnew.gif"></IMG> <br><br> <DL> <DT>idMin <DD>the minimum allowable menu ID to be used by the menu <DT>idMax <DD>the maxinimum allowable menu ID to be used by the class </DL> <br><br> <P> ::site:: ShellNewMenu messages currently the ShellNewMenu does not send any message:<br><br> ::folder:: ShellNewMenu methods ShellNewMenu instances support the following methods: ::item:: QueryShellNewMenu <code>QueryShellNewMenu(Popup)</code><br> <P>fills the specified Popup instance with file asociations, registered as shell new handlers. </P> ::item:: IsMenuID <code>IsMenuID(ID)</code><br> <P>Returns True if a menu ID is in the range of the menu IDs used by the shell new menu, False otherwise. <br><br> This may usually be True only for IDs in the range from <b>idMin</b> up to <b>idMin + no items found</b>. </P> ::item:: HandleMessage <code>HandleMessage(hwnd, msg, wp, lp)</code><br> <P>This is the message handler responsible for drawing the items and processing all other menu related commands for the ShellNewmenu. <br><br> Passing 'cracked' messages like 'drawitem' or 'measureitem' into the handler does not have any effect. The hanldler requires the 'raw' messages to be passed in. <br><br> There is Two ways of passing the messages to the menu: One is to subclass the parent window by using <a HREF="SubclassParent.html">SubclassParent</a> and <a HREF="SRestoreParentProc.html">RestoreParentProc</a> <br> This will call this handler automatically doing all the required processing internally <br><br> The second is to pass all menu related mesages directly to this handler whenever the popup should be displayed. <br><br> <b>Return value</b><br><br> nonzero if the handler processed a message, zero otherwise </P> ::item:: MakeUniqueFilename <code>MakeUniqueFilename(path, name, ext=None, isdir=False)</code><br> <P>Helper method used by ShellNewmenu to create a unique file or directory name. <DL> <DT>path <DD>the filepath where the new item is intended to be created <DT>name <DD>the filename of the item <DT>ext <DD>the extension the item <DT>isdir <DD>flag to indicate if the item is supposd to be a directory </DL> <br><br> This method does its best to mimic micros~1 'New Foder (1)', 'New Foder (2)' standard names. Although this method is used internally you may find it usefull in some cases or may want to overwrite it. <br><br> <b>Return value</b><br> The full path to the new item </P> ::item:: InvokeCommand <code>InvokeCommand(ID, path)</code><br> <P>Invokes a comand, given its ID and the full path of the folder to invoke the command for. </P> ::item:: SubclassParent <code>SubclassParent(window)</code><br> <P>Subclasses the parent window to enshure proper menu message handling <br><br> The window remains subclassed untill you call <a HREF="RestoreParentProc.html">RestoreParentProc</a> </P> ::item:: RestoreParentProc <code>RestoreParentProc(window)</code><br> <P>Restores the default window proc of the parent window <br><br> See <a HREF="SubclassParent.html">SubclassParent</a> </P> --- NEW FILE: shellnew.gif --- (This appears to be a binary file; contents omitted.) |
From: jürgen u. <cer...@us...> - 2005-07-02 09:35:06
|
Update of /cvsroot/wnd/wnd/wnd_doc/doc/api/shell/shellnamespace In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14306 Modified Files: shellnamespace.dtpl Log Message: bit of this and a bit of that Index: shellnamespace.dtpl =================================================================== RCS file: /cvsroot/wnd/wnd/wnd_doc/doc/api/shell/shellnamespace/shellnamespace.dtpl,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** shellnamespace.dtpl 18 May 2005 19:33:57 -0000 1.4 --- shellnamespace.dtpl 2 Jul 2005 09:34:56 -0000 1.5 *************** *** 168,172 **** ::item:: GetData <code>GetData(pIdl)</code><br> ! <P>Returns some additional data for an iotem. <br><br> pIdl must be a pIdl relative to the current folder. --- 168,172 ---- ::item:: GetData <code>GetData(pIdl)</code><br> ! <P>Returns some additional data for an item. <br><br> pIdl must be a pIdl relative to the current folder. *************** *** 199,209 **** <code>GetContextMenu(version, pIdl=None)</code><br> <P> ! Returns the IContextMenu pointer for a folder or file. ! <br> ! TODO: <br> ! version is currently not implemented </P> ::item:: ParseDisplayName <code>ParseDisplayName(path)</code><br> --- 199,271 ---- <code>GetContextMenu(version, pIdl=None)</code><br> <P> ! Returns a tuple (IContextMenu, version) containing the IContextMenu pointer for the item and the version retrieved. In case something goes ! wrong, return value is None. For the desktop folder the return value ! is always None. pIdl may also be an aray of relative pIdls to ! retrieve the common context menu for a number of items. ! ! <br><br> ! Use the version parameter to request a specified version of the contextmenu. ! <TABLE class="table1" BORDER="1"> ! <TH>context menu versions</TH> ! <TR> ! <TD>None</TD> ! <TD>retrieves the highest available version</TD> ! </TR> ! <TR> ! <TD>1</TD> ! <TD>retrieves version 1</TD> ! </TR> ! <TR> ! <TD>2</TD> ! <TD>retrieves version 2 (not supported for all shell items)</TD> ! </TR> ! <TR> ! <TD>3</TD> ! <TD>retrieves version 3 (not supported for all shell items)</TD> ! </TR> ! ! </TABLE> ! </P> + ::item:: GetDataObject + <code>GetDataObject(pIdl=None)</code><br> + <P>Returns the DataObject of the folder or one or more items in the + folder. + <br><br> + pIdl may be a single pIdl relative to the parent folder or an array + of relative pIdls. + <br><br> + The DataObject returned will contain one ore more clipboard + formats describing the objects. + <br><br> + <b>Notes</b><br> + + <UL> + <LI>For the desktop folder the return value is always None + <br><br> + <LI>the DataObject returned does not allow for enumerating + formats that can be set, but nevertheless it is possible to + add any additional format to the DataObject. + <br><br> + + </UL> + <P> + + + ::item:: GetDropTarget + <code>GetDropTarget(pIdl=None)</code><br> + <P>Returns the DropTarget of the folder or an item in the + folder or None. + <br><br> + <b>Return value</b><br> + a DropTargetPointer instance as defined in + <code class="import">wnd.api.ole.dragdrop</code> + + <P> + + + ::item:: ParseDisplayName <code>ParseDisplayName(path)</code><br> *************** *** 248,251 **** --- 310,316 ---- Note:<br> Having some problems here. Returns allways False + <br><br> + pIdl may be an array of pIdls aswell to query the common attributes + of all objects </P> *************** *** 253,256 **** --- 318,323 ---- <code>IsFolder(pIdl=None)</code><br> <P>Returns True if the item is a folder. + <br><br> + pIdl may be an array of pIdls aswell to query if the attribute is common to all items </P> *************** *** 261,264 **** --- 328,333 ---- Returns True if the item is a file system thing (file/folder/root) + <br><br> + pIdl may be an array of pIdls aswell to query the common attributes </P> *************** *** 267,270 **** --- 336,341 ---- <P> Returns True if the item is removable media. + <br><br> + pIdl may be an array of pIdls aswell to query the common attributes </P> *************** *** 273,276 **** --- 344,349 ---- <P> Returns True if the item is a link. + <br><br> + pIdl may be an array of pIdls aswell to query the common attributes </P> *************** *** 280,283 **** --- 353,358 ---- Returns True when a ghosted icon should be used for displaying the item + <br><br> + pIdl may be an array of pIdls aswell to query the common attributes </P> *************** *** 287,290 **** --- 362,367 ---- <P> Returns True if the item is shared + <br><br> + pIdl may be an array of pIdls aswell to query the common attributes </P> *************** *** 293,296 **** --- 370,375 ---- <P> Returns True if the item is a droptarget + <br><br> + pIdl may be an array of pIdls aswell to query the common attributes </P> *************** *** 300,303 **** --- 379,384 ---- Returns True if the item is non-enumerated. ?? Dono what this is. + <br><br> + pIdl may be an array of pIdls aswell to query the common attributes </P> *************** *** 306,314 **** --- 387,401 ---- <P> Returns True if the item is In-place browsable + <br><br> + pIdl may be an array of pIdls aswell to query the common attributes </P> ::item:: IsCompressed <code>IsCompressed(pIdl=None)</code><br> + <P> Returns True if the item is compressed + <br><br> + pIdl may be an array of pIdls aswell to query the common attributes + </P> ::item:: IsNewContent *************** *** 317,320 **** --- 404,409 ---- Returns True if the item should show bold in explorer tree + <br><br> + pIdl may be an array of pIdls aswell to query the common attributes </P> *************** *** 324,327 **** --- 413,418 ---- Returns True if the item should be displayed using a ghosted icon. + <br><br> + pIdl may be an array of pIdls aswell to query the common attributes </P> *************** *** 331,334 **** --- 422,427 ---- <P> Returns True if the item has a property sheet + <br><br> + pIdl may be an array of pIdls aswell to query the common attributes </P> *************** *** 338,341 **** --- 431,436 ---- Returns True if the item has subfolder(s). Used to indicate the item is expandable in a directory tree. + <br><br> + pIdl may be an array of pIdls aswell to query the common attributes </P> *************** *** 346,349 **** --- 441,446 ---- <a HREF=" IsFileSystemAnchestor.html"> IsFileSystemAnchestor</a> instead + <br><br> + pIdl may be an array of pIdls aswell to query the common attributes </P> *************** *** 358,361 **** --- 455,460 ---- folder. + other virtual folders may have set themselves as root items aswell. + <br><br> + pIdl may be an array of pIdls aswell to query the common attributes </P> *************** *** 364,367 **** --- 463,468 ---- <P> Returns True if the item can be renamed + <br><br> + pIdl may be an array of pIdls aswell to query the common attributes </P> *************** *** 371,374 **** --- 472,477 ---- <P> Returns True if the item can be renamed + <br><br> + pIdl may be an array of pIdls aswell to query the common attributes </P> *************** *** 377,380 **** --- 480,485 ---- <P> Returns True if the item can be copied + <br><br> + pIdl may be an array of pIdls aswell to query the common attributes </P> *************** *** 383,406 **** <P> Returns True if the item can be moved </P> ::item:: CanLink <code>CanLink(pIdl=None)</code><br> ! <P>Returns True if the pIdl supports linking to it, False otherwise </P> ::item:: Validate ! <code>Validate(pIdl=None, validateall=False)</code><br> <P> The shell keeps all item attributes cached. ! Use this to update the cached information for the item. ! If 'validateall' is True all items in the folder the item ! resides in will be refreshed. If the item does no longer exist an error is be raised. </P> ::item:: GetAttributes ! <code>GetAttributes(pIdl, attr, nItems=1)</code><br> ! <P>Returns file attributes of pIdl. <br><br> attr should be the a combination of the SFGAO_* or DROPEFFECT_* --- 488,515 ---- <P> Returns True if the item can be moved + <br><br> + pIdl may be an array of pIdls aswell to query the common attributes </P> ::item:: CanLink <code>CanLink(pIdl=None)</code><br> ! <P>Returns True if the pIdl supports linking to it, False otherwise. ! <br><br> ! pIdl may be an array of pIdls aswell to query the common attributes </P> ::item:: Validate ! <code>Validate(pIdl=None,)</code><br> <P> The shell keeps all item attributes cached. ! Use this to update the cached information for one or more the items. ! <br><br> ! If pIdl is None the all nformation for the contents of the folder is refreshed </P> ::item:: GetAttributes ! <code>GetAttributes(pIdl, attr)</code><br> ! <P>Returns file attributes of pIdl or an array of pIdls. <br><br> attr should be the a combination of the SFGAO_* or DROPEFFECT_* *************** *** 421,424 **** --- 530,566 ---- <br><br> + For those being unfamilliar with ctypes arrays, here is the drill how to query + if an attribute is common to multiple items + <pre> + + pIdls= # assume a list of pIdls + arr= (PIDL*len(pIdls))() # setup an array of pIdls + for n, i in enumerate(pIdls): + arr[n]= i + + try: + attrs= GetAttributes(arr, shell.SFGAO_SHARE | shell.DROPEFFECT_COPY) + finally: + for i in pIdls: # or arr + PidlFree(i) + + if attrs & shell.SFGAO_SHARE: + print 'all items are shared' + + if attrs & shell.DROPEFFECT_COPY + print 'all items can be copied' + + + + </pre> + + + + + + + + + <br><br> This proceses slightly faster then requesting attribute by attribute if multiple attributes are requested. |
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> |
From: jürgen u. <cer...@us...> - 2005-07-02 09:33:53
|
Update of /cvsroot/wnd/wnd/wnd_doc/doc/api/shell/contextmenu In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13747 Added Files: contextmenu.dtpl Log Message: bit of this and a bit of that --- NEW FILE: contextmenu.dtpl --- ::site:: ShellContextMenu <code class=import>defined in: wnd.api.shell</code><br><br> <code>ShellContextMenu(minID=MIN_MENU_ID, maxID=MAX_MENU_ID)</code><br> <br><br> This class handles some of the messy low levell details of shell context menu invoking. Its aimed mainly at extension writers who want to include shell context menu functionality into their control. <br><br> COM provides three interfaces for dealing with context menus: <br> IContextMenu, IContextMenu2, IContextMenu3, This class wraps all the functionality to query the context menu for a shell item. <br><br> Use the <a HREF="ShellContextMenu methods/QueryContextMenu.html>QueryContextMenu</a> to fill a menu with items of shell verbs defined, <br> the <a HREF="ShellContextMenu methods/SubclassParent.html>SubclassParent</a> method to enshure proper message processing during the display of the popup, <br> the <a HREF="ShellContextMenu methods/GetCommandString.html>GetCommandString</a> method to retrieve the cannonical verb associated to a menu item, <br> and the <a HREF="ShellContextMenu methods/InvokeCommand.html>InvokeCommand</a> to execute the command associated to a menu item. <br><br> Some sample code of how to query the context menu for some items in a folder and execute a command. <pre> from wnd.api import shell MyPopup= Popup (...) MyWindow= Window (...) SHMenu= shell.ShellContextMenu() pIdlParent= pIdl childPidls= (shell.PIDL*n)(*myChildPidls) error= None if SHMenu.QueryContextMenu(pIdlParent, childPidls, MyPopup.handle): SHMenu.SubclassParent(Mywindow) ID= # popup the menu SHMenu.RestoreParentProc(MyWindow) cmd_string= SHMenu.GetCommandString(ID) \# (...) result= SHMenu.InvokeCommand(ID) if not result: error= SHMenu.GetLastError() if not error: \# no shell ID, process own menu IDs else: error= SHMenu.GetLastError() SHMenu.Reset() if error: \# do whatever </pre> <br><br> Some sample code of how to invoke the default verb for a pIdl. Let the shell fill the popup wíth items and invoke get the default item from the popup to invoke it. <pre> from wnd.api import shell SHMenu= shell.ShellContextMenu() MyPopup= Popup (...) pIdlParent= pIdl pIdlChild= pIdl error= None if SHMenu.QueryContextMenu(pIdlParent, pIdlChild, MyPopup.handle, 'defaultonly'): ID= MyPopup.GetDefaultItem() if ID != None: if not SHMenu.InvokeCommand(ID): error= SHMenu.GetLastError() else: error= SHMenu.GetLastError() SHMenu.Reset() if error: \# do whatever </pre> <br><br> Clicking with the right When you right click a file or folder in explorer the shell checks the registry to gather all verbs defined for the item stuffs them into a context menu and pops it up. <br><br> What the shell needs for this is the pIdl of the item to check for, a popup it can fill with items, and a parent window for the context menu to display. <br><br> ninID and maxID tells the shell to use this range of menu item IDs for its items. In this implemetation they default to 1-29999, assuming that this range is wide enough for the shell, leaving enough menu IDs above 29999 for own menu items. <br><br> After setting the rules for the shell you pass a pIdl a and a popup handle down, to get it filled with menu items. Pop the menu up and let the shell execute the returned menu ID. <br><br> There are three versions of the context menu differing slightly in functionality. IContextMenu does nothing elese but popup a menu. IContextMenu2 provides functionality for ownerdrawing menu items, and maybe someone got fired for this, but after releasing it they noticed that IContextMenu2 does not handle keyboard mnemonics. This is how IContextMenu3 came into play. <br><br> ::site:: ShellContextMenu messages A ShellContextMenu instance sends the following messages to the message handler while it is popped up:<br><br> <DL> <DT>'shell_contextmenu' <DD>send when the user hovers over the menu.<br> wp='helpstring<br> lp=the helpstring' or '' (empty string) <br><br> some items might have helpstrings associated. <DT>'shell_contextmenu' <DD>Not yet implemented<br> wp='drawitem'<br> lp= <br><br> <DT>'shell_contextmenu' <DD>Not yet implemented<br> wp='measureitem'<br> lp= <br><br> <DT>'shell_contextmenu' <DD>Not yet implemented<br> wp='menuchar'<br> lp= <br><br> </DL> ::folder:: ShellContextMenu methods ShellContextMenu instances support the following methods: ::item:: Reset <code>Reset()</code><br> <P>Resets the instance </P> ::item:: GetLastError <code>GetLastError()</code><br> <P>Returns a string containing error infoormation. <br><br> The error value is cleared in this call </P> ::item:: GetMinMenuID <code>GetMinMenuID()</code><br> <P>Returns the minimum allowable menu ID for user defined items <br><br> Should be MAX_MENU_ID + 1 </P> ::item:: GetMaxMenuID <code>GetMaxMenuID()</code><br> <P>Returns the maximum allowable menu ID for user defined items <br><br> Should be MIN_MENU_ID - 1 </P> ::item:: SubclassParent <code>SubclassParent(window)</code><br> <P>Subclasses the parent window to enshure proper menu message handling <br><br> The window remains subclassed untill you call <a HREF="RestoreParentProc.html">RestoreParentProc</a> </P> ::item:: RestoreParentProc <code>RestoreParentProc(window)</code><br> <P>Restores the default window proc of the parent window <br><br> See <a HREF="SubclassParent.html">SubclassParent</a> </P> ::item:: QueryContextMenu <code>QueryContextMenu(pIdlParent, pIdl, hMenu, *flags, **kwargs)</code><br> <P>Queries the context menu for the item with the pIdl specified. <DL> <DT>pIdlParent <DD>the absolute pIdl of the parent folder of the items <br><br> <DT>pIdl <DD>the relative pIdl of an item in the folder or an array of pIdls for multiple items <br><br> <DT>hMenu <DD>handle of the popup menu to fill <br><br> <DT>*flags <DD>One or more flags telling the shell wich items to include <br> <TABLE class="table1" BORDER="1"> <TR> <TD>'canrename'</TD> <TD>includes the rname verb in the menu</TD> </TR> <TR> <TD>'defaultonly'</TD> <TD>includes only the default item (dono if this works)</TD> </TR> <TR> <TD>'noverbs'</TD> <TD>excludes shell verbs</TD> </TR> <TR> <TD>'verbsonly'</TD> <TD>includes only shell verbs</TD> </TR> </TABLE> <br><br> <DT>**kwargs <DD>currently only one keyword arg is recognised: 'version'. <br><br> If for whatever reason you want to query for a specified version of the context menu use this argument. Value can be 1, 2, 3 or None to query for the highest avaiable version (this is the default) <br><br> </DL> </P> ::item:: GetCommandString <code>GetCommandString(ID)</code><br> <P>Returns the cannonical verb associated to the menu item ID or '' if either no cannonical verb was found or something went wrong. <br><br> Call <a HREF="GetLastError.html">GetLastError</a> to get extended error information if available </P> ::item:: InvokeCommand <code> InvokeCommand(ID, point=None)</code><br> <P>Invokes the command associated to a menu item ID. <br><br> <DL> <DT>ID <DD>the command id of the menu item selected or a verb (a string no unicode like 'copy', 'properties', (...)) supported by the the item(s) the context menu was queried for. This can come in handy for example if you want to copy files to the clipboard, letting the shell do all the clipboard work for you. <br><br> <DT>point <DD>a ||type-POINT|| you may specify to place the user interface wich may be invoked at the specified position <br><br> </DL> ID may also <br>Return value<br> True is all went ok, False otherwise. <br> Call <a HREF="GetLastError.html">GetLastError</a> to get extended error information if available <br><br> If no error occured the method did not handle the message cos it was not in the range of reserved IDs. </P> ::item:: IsMenuID <code>IsMenuID(self, ID)</code><br> <P>Returns true if the specified ID is within the range of reserved menu items, False otherwise. <br><br> Use this method to tell your own menu items appart from the items the shell has inserted into the menu. </P> ::item:: onMSG <code>onMSG(hwnd, msg, wp, lp)</code><br> <P>The message handlee of the ShellContextMenu class. <br><br> Overwrite this to process the messages the instance sends </P> |
From: jürgen u. <cer...@us...> - 2005-07-02 09:33:08
|
Update of /cvsroot/wnd/wnd/wnd_doc/doc/api/shell In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13259 Modified Files: shell.dtpl Log Message: bit of this and a bit of that Index: shell.dtpl =================================================================== RCS file: /cvsroot/wnd/wnd/wnd_doc/doc/api/shell/shell.dtpl,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** shell.dtpl 17 May 2005 20:15:51 -0000 1.2 --- shell.dtpl 2 Jul 2005 09:32:59 -0000 1.3 *************** *** 5,12 **** - ::folder:: Shell functions ::item:: HRESULT_CODE --- 5,33 ---- ::folder:: Shell functions + <br><br> + <b>Notes</b><br> + + <UL> + <LI>All pIdl functions are low level api calls. No python error check is applied + on them, so make shure to allways check for validness in case a pIdl is + returned. + </UL> + + This check should be performed for all pIdl methods + <br> + <pre> + pIdl= PidlFromPath(MyPath) + if pIdl: + \# process + else: + \# something went wrong + + </pre> + + + ::item:: HRESULT_CODE *************** *** 31,76 **** <DT>fileaction <DD>either 'move', 'copy', 'delete' or 'rename' <DT>From <DD>path of a singe file object ! or a list of file objects to move or rename <DT>To <DD>destination path or a list of destination paths to move or rename the ! file^objects to. This alows easy renaming of multiple files. If 'To' is any shorter or longer than From the first path encountered is assumend to be a directory to be created to stuff the file objects in. <DT>title <DD>Title of the progress dialog box <DT>hwnd <DD>Not yet tested. Currently should be 0. <DT>flags <DD> ! <DL> ! <DT>'allowundo' ! <DD>Preserves undo information. Ignored if 'From' is/are not fully ! qualified paths ! <DT>'filesonly' ! <DD>Performs the operation on files only ! if a wildcard is specified ! <DT>'noconfirm' ! <DD>responds yes to all dialog boxes ! <DT>'noconfirmmkdir' ! <DD> responds yes if a directory needs to ! be created in the operation ! <DT>'noerrorui' ! <DD>Does not display error message boxes ! <DT>'nosecurityattrs' ! <DD>NT only. Does not move security ! attributes along with the file objects. ! <DT>'renameoncollision' ! <DD>renames any colliding files object to ! 'copy of ...' ! <DT>'silent' ! <DD>does not display a progress dialog ! <DT>'simpleprogress' ! <DD>Displays a simple progress dialog ! without file object names. ! </DL> ! </DL> --- 52,126 ---- <DT>fileaction <DD>either 'move', 'copy', 'delete' or 'rename' + <br><br> + <DT>From <DD>path of a singe file object ! or a list of file paths to move or rename ! <br><br> ! <DT>To <DD>destination path or a list of destination paths to move or rename the ! file objects to. This alows easy renaming of multiple files. If 'To' is any shorter or longer than From the first path encountered is assumend to be a directory to be created to stuff the file objects in. + <br><br> + <DT>title <DD>Title of the progress dialog box + <br><br> + <DT>hwnd <DD>Not yet tested. Currently should be 0. + <br><br> + <DT>flags <DD> ! <TABLE class="table1" BORDER="1"> ! <TR> ! <TD>'allowundo'</TD> ! <TD>Preserves undo information. Ignored if 'From' is/are not fully ! qualified paths</TD> ! </TR> ! <TR> ! <TD>'filesonly'</TD> ! <TD>Performs the operation on files only ! if a wildcard is specified</TD> ! </TR> ! <TR> ! <TD>'noconfirm'</TD> ! <TD>responds yes to all dialog boxes</TD> ! </TR> ! <TR> ! <TD>'noconfirmmkdir'</TD> ! <TD>responds yes if a directory needs to ! be created in the operation</TD> ! </TR> ! <TR> ! <TD>'noerrorui'</TD> ! <TD>Does not display error message boxes</TD> ! </TR> ! <TR> ! <TD>'nosecurityattrs'</TD> ! <TD>NT only. Does not move security ! attributes along with the file objects.</TD> ! </TR> ! <TR> ! <TD>'renameoncollision'</TD> ! <TD>renames any colliding files object to ! 'copy of ...'</TD> ! </TR> ! <TR> ! <TD>'silent'</TD> ! <TD>does not display a progress dialog</TD> ! </TR> ! <TR> ! <TD>'simpleprogress' </TD> ! <TD>Displays a simple progress dialog ! without file object names.</TD> ! </TR> ! ! </TABLE> ! </DL> *************** *** 81,85 **** was encountered, True otherwise. <br><br> - The deal about FileOperation is, unlike os module, you get all the standard windows error dialogs. </P> --- 131,134 ---- *************** *** 109,112 **** --- 158,214 ---- </P> + ::item:: RenameFiles + <code>RenameFiles(From, To, title='', hwnd=0, *flags)</code><br> + <P> + Convenience wrapper for + <a HREF="FileOperation.html">FileOperation</a> 'rename' + <P> + + + ::item:: PidlFree + <code>PidlFree(pIdl)</code><br> + <P>Frees a pIdl + </P> + + ::item:: PidlRemoveLast + <code>PidlRemoveLast(pIdl)</code><br> + <P>removes the last part from the pIdl + </P> + + ::item:: PidlFromPath + <code>PidlFromPath(path)</code><br> + <P>Creates a pIdl from a path specified. + <br><br> + <b>Return value<b><br> + The new pIdl. + </P> + + ::item:: PidlGetNext + <code>PidlGetNext(pIdl)</code><br> + <P> + Returns a pointer to the the next part of a pIdl. + <br><br> + The pIdl returned is not a newly allocated pIdl, so do not free it. + </P> + + + + ::item:: PidlGetLast + <code>PidlGetLast(pIdl)</code><br> + <P>Returns a pointer to the last part of a pIdl. + <br><br> + The pIdl returned is not a newly allocated pIdl, so do not free it. + </P> + + + ::item:: PidlCopyFirst + <code>PidlCopyFirst(pIdl)</code><br> + <P>copies the first part of a pIdl and returns it. + <br><br> + Use some + <a HREF="PidlFree.html">PidlFree</a> to + free it. + </P> + ::item:: PidlCopy *************** *** 118,121 **** --- 220,246 ---- </P> + ::item:: PidlGetChild + <code>PidlGetChild(pIdlParent, pIdlChild)</code><br> + <P>Given the pIdl of a parent and the pIdl of a child, returns a pointer to the unique portion of the childPidl. + <br><br> + The pIdl returned is not a newly allocated pIdl, so do not free it. + </P> + + + ::item:: PidlAppend + <code>PidlAppend(pIdlParent, pIdlchild, toend)</code><br> + <P>Appends the child pIdl to the parent pidl. if toend is 0, inserts it + to the beginning, if 1, appends it. + <br><br> + <b>Return value</b><br> + The resulting pIdl. Use <a HREF="PidlFree.html">PidlFree</a> to + free it. + </P> + + ::item:: PidlIsEqual + <code>PidlIsEqual(pIdl1, pIdl2)</code><br> + <P>Returns nonzero if both pIdls are equal, zero otherwise + </P> + ::item:: PidlDidAlloc <code>PidlDidAlloc(pIdl)</code><br> *************** *** 123,127 **** Returns True if the pIdl was allocated using the shells allocator False otherwise. pIdls allocated with the shells ! allocator should be freed using this classes free method. </P> --- 248,256 ---- Returns True if the pIdl was allocated using the shells allocator False otherwise. pIdls allocated with the shells ! allocator should be freed using the <a HREF="PidlFree.html">PidlFree</a> function. ! <br><br> ! This is more or less a sanity check. Normally all pIdls should have been ! allocated by the shells allocator. ! </P> *************** *** 133,141 **** </P> ! ::item:: PidlFree ! <code>PidlFree(pIdl)</code><br> ! <P>Frees a pIdl ! </P> ::item:: PidlGetParent <code>PidlGetParent(pIdl)</code><br> --- 262,279 ---- </P> ! + ::item:: PidlisParent + <code>PidlIsParent(pIdlParent, pIdlChild, fEmidiate)</code><br> + <P>checks is the parent pIdl is a parent of child pIdl. + <br><br> + Set fEmidiate to 1 allow the child only to be an emidate descendend, + to 0 to indicate any descendency will do + <br><br> + <b>Return value</b><br> + nonzero if True, zero otherwise. + </P> + + ::item:: PidlGetParent <code>PidlGetParent(pIdl)</code><br> *************** *** 144,150 **** </P> ::item:: PidlGetSize <code>PidlGetSize(pIdl)</code><br> ! <P>Returns the size of a pIdl. </P> --- 282,303 ---- </P> + + + ::item:: ILIsZero + <code>ILIsZero(pIdl)</code><br> + <P>Returns True if the pIdl is zero, False otherwise. + <br><br> + A pIdl is zero either the memory allocated for the pIdl is zero + or the ITEMIDLIST pointed to has a length of zero. + The desktops pIdl has allways a zero lenght ITEMIDLIST + <br><br> + Use this method in enumerations for example to check if the next + pIdl returned points to a valid item + </P> + ::item:: PidlGetSize <code>PidlGetSize(pIdl)</code><br> ! <P>Returns the size of the allocated memory (in bytes) of a pIdl. ! </P> *************** *** 152,155 **** --- 305,309 ---- <code>PidlJoin(pIdlBase, pIdlAdd)</code><br> <P>Joins two pIdls (parent/child) and returns a new pIdl. + <br><br> Use some <a HREF="PidlFree.html">PidlFree to</a> to free it. </P> *************** *** 158,163 **** <code> PidlSplit(pIdl)</code><br> <P>Splits a pIdl in a pair root, trail. Return value is the ! trailing pIdl. The trailing pIdl is a newly allocated pIdl so ! remember to free it. </P> --- 312,318 ---- <code> PidlSplit(pIdl)</code><br> <P>Splits a pIdl in a pair root, trail. Return value is the ! trailing pIdl or None if the pIdl could not be split. ! <br><br> ! Use some <a HREF="PidlFree.html">PidlFree to</a> to free the returned pIdl it. </P> *************** *** 170,179 **** </P> ! ::item:: RenameFiles ! <code>RenameFiles(From, To, title='', hwnd=0, *flags)</code><br> ! <P> ! Convenience wrapper for ! <a HREF="FileOperation.html">FileOperation</a> 'rename' ! <P> \ No newline at end of file --- 325,357 ---- </P> ! ! ::item:: GetIShellFolder ! <code>GetIShellFolder(pIdl)</code><br> ! <P>Returns a pointer to the items IShellFolder interface given the absolute ! pIdl of a folder ! </P> ! ! ::item:: GetSpecialFolderPath ! <code>GetSpecialFolderPath(clsidl)</code><br> ! <P>Retrieves the file sysem path of a special folder or None. ! <br><br> ! <b>clsidl</b> should be one of the CLSIDL_* constants defined by the shell module ! </P> ! ! ! ::item:: CLSIDL_FromPidl ! <code>CLSIDL_FromPidl(pIdl)</code><br> ! <P>Maps an absolute pIdl of a folder to its CLSIDL. ! <br><br> ! <b>Return value<b><br> ! a tuple(CLSIDL, clsidl-name), where CLSIDL is one of the CLSIDL_* ! constants as defined in the shell and clsidl name is the framework ! name of the CLSIDL. So the returned tuple may look like this: ! <br><br> ! (0, 'desktop') ! <br><br> ! If the shell does not define a CLSIDL for the item, return value is None ! </P> ! \ No newline at end of file |
From: jürgen u. <cer...@us...> - 2005-07-02 09:32:45
|
Update of /cvsroot/wnd/wnd/wnd_doc/doc/api/shell/shellnew In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12958/shellnew Log Message: Directory /cvsroot/wnd/wnd/wnd_doc/doc/api/shell/shellnew added to the repository |
From: jürgen u. <cer...@us...> - 2005-07-02 09:31:50
|
Update of /cvsroot/wnd/wnd/wnd_doc/doc/api/shell/shelllink In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12575/shelllink Log Message: Directory /cvsroot/wnd/wnd/wnd_doc/doc/api/shell/shelllink added to the repository |
From: jürgen u. <cer...@us...> - 2005-07-02 09:31:38
|
Update of /cvsroot/wnd/wnd/wnd_doc/doc/api/shell/contextmenu In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12295/contextmenu Log Message: Directory /cvsroot/wnd/wnd/wnd_doc/doc/api/shell/contextmenu added to the repository |
From: jürgen u. <cer...@us...> - 2005-07-02 09:30:41
|
Update of /cvsroot/wnd/wnd/wnd_doc/doc/api/ole/dataobject In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11778 Added Files: dataobject.dtpl Log Message: bit of this and a bit of that --- NEW FILE: dataobject.dtpl --- ::site:: DataObject <code class=import>defined in: wnd.api.ole.dataobject</code><br><br> <code>DataObjec(*formats, **kwargs)</code><br> <br><br> DataObject is a python inplementation of the IDataObject interface. DataObject are used mainly in clipboard and drag-and-drop related operations to share data cross process boundaries. <br><br> For example a clipboard for operation is done roughly like this: <OL> <LI>create a data object, feed it with one ore more data descriptors, providing access to one ore more aspects of the data you provide. <LI>place the data object on the clipboard, where it will remain untill either someother object is taking your data objects place on the clipboard, or the clipboard is cleared, or you pass ownership of the data to the clipboard <LI>if someone wants to get some of the data you placed on the clipboard, he will ask your data object if it provides data of a certain type and if so request a copy of it. </OL> <br> The key to this way of sharing data are the format descriptors. Each format you provide should either match a predefined clipboard format or should be a format you registered on the fly. The system has quite a few predefined formats for example strings come in shapes of CF_TEXT, CF_UNICODETEXT, other formats cover gdi handles , riff's tiff's wav's and god knows what else. <br><br> I'm not planning to go into details here. The framework provides wrapper classes managing the packing and unpacking of the data. You simply pass the data to the data object, letting ole and python do their thing, while you have the hands free to do another. These format wrappers are not intended to be imported directly. This module provides the same stub classs <b>cf</b> (sorry no link yet) to handle the import from the clipformats library module. <br><br> This implementation of the DataObject currently can only handle mediums of type TYMED_HGLOBAL, streams, storages and gdi objects are yet to come. <br><br> You use this class if you want to implement your own data object wich can be called by any language capable of interfacing with ole objects. <br><br> To setup a DataObject you should feed it with one or more formats. <br><br> <b>**kwords</b><br> the only keyword recognised currently is <b>allowset</b>, wich should be a list of formats any consumer is allowed to set to or change in the DataObject. <pre> cf.text('my text here') do= DataObject(text, allowset= (text, )) </pre> This sets up a Dataobject containing text, and allowing any consumer to alter the text conained. <pre> cf.text('my text here') cf.unicodetext(u'my text here') do= DataObject(text, unicodetext, allowset= (cf.oemtext, )) </pre> This sets up a Dataobject containing text and unicodetext, and allowing any consumer to add oemtext to the object. ::site:: DataObjectFromPointer <code class=import>defined in: wnd.api.ole.dataobject</code><br><br> <code>DataObjecFromPointer(pDataObject)</code><br> <P>This class creates a DataObjectPointer you can pass to any api querying a pointer to a DtataObject. <br><br> You use this class if to wrap DataObject methods around a DataObject pointer <br><br> In difference to a <a HREF="DataObject.html">DataObject</a> you set up as a data provider this class does not define the <a HREF="DataObject methods.Close.html">Close</a>. <br><br> As an additional method the __nonzero__ method is defined, to let you check if the underlaying IDataObject pointer is alive. <br><br> ::site:: DataObjectPointer <code class=import>defined in: wnd.api.ole.dataobject</code><br><br> <code>DataObjecPointer()</code><br> <P>This class creates a DataObjectPointer you can pass to any api querying a pointer to a DtataObject. <br><br> You use this class if you want to want to retrieve a DataObject interface. The instance will define two attributes 'refiid' and 'ptr' you may find usefull to pass along to an interface retrieving method. Here is a non real world example to demonstrate: <br><br> <pre> do = DataObjectPointer() print not do \# >> True SomeInterfaceRetrievingMethod(do.refiid, do.ptr) \# ...instead of the more lengthy \# dataobj= POINTER(IDataObject) \# SomeInterfaceRetrievingMethod(REFIID(IDataObject._iid_), byref(dataobj)) \# dataobj= DataObjectFromPointer(dataobj) if do: print "sucessfully retrieved the interface" else: print "something went wrong, interface could not be retrieved" </pre> <br><br> In difference to a <a HREF="DataObject.html">DataObject</a> you set up as a data provider this class does not define the <a HREF="DataObject methods.Close.html">Close</a>. <br><br> As an additional method the __nonzero__ method is defined, to let you check if the underlaying IDataObject pointer is alive. <br><br> </p> ::folder:: DataObject methods DataObject instances support the following (python) methods: ::item:: GetComPointer <code>GetComPointer()</code><br> <P>Returns the com pointer of the Dataobject as parameter you can pass directly to any api expecting a ppIDtataObject as parameter </P> ::item:: GetData <code>GetData(format)</code><br> <P>Retrieves data of the specified format from the dataObject. <br><br> <b>Return value</b><br> True if succesfull, False otherwise </P> ::item:: HasFormat <code>HasFormat(self, format)</code><br> <P>Returns True if the DataObject contains data of the specified format, False otherwise </P> ::item:: CanSet <code>CanSet(format)</code><br> <P>Returns true if data of the specified format can be set to the dataqObject, False otherwise </P> ::item:: SetData <code>SetData(format, release=True)</code><br> <P>Setsdata of the specified format to the DataObject <br><br> The release flag instructs the DataObject how to handle the data. If release is True, the DataObject assumes that is should take over emidiate ownership of the data, taking care of freeing it. In this case you should not free the data anyhow. If release is False the DataObject copies the data to take ownership of a unique copy of the data. In this case freeing the data is up to you. <br><br> <b>Return value</b><br> True if succesfull, False otherwise </P> ::item:: Close <code>Close()</code><br> <P>Closes the DataObject. <br><br> All data associates to the DataObject is freed in this call </P> ::item:: ListFormats <code>ListFormats(self, get=True)</code><br> <P>Returns a list of all formats the Dataobject contains. <br><br> The formats returned have no data assigned to them. Use <a HREF="GetData.html">GetData</a> to actually retrieve data from the Dataobject <br><br> If get is True all formats that can be retrieved from the DataObject are returned, if False all formats that can be set are returned. </P> |