Changeset 245
- Timestamp:
- Mar 10, 2007, 4:21:32 PM (18 years ago)
- Location:
- trunk/desktop
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/desktop/class_c/wpfolder.c
r244 r245 168 168 */ 169 169 NOM_Scope gulong NOMLINK impl_WPFolder_wpAddToContent(WPFolder* nomSelf, const PWPObject wpObject, 170 const CORBA_char * chrFileName,CORBA_Environment *ev)170 CORBA_Environment *ev) 171 171 { 172 172 WPFolderData* nomThis=WPFolderGetData(nomSelf); … … 176 176 pValue->pGTree=_fldrObjects; 177 177 pValue->wpObject=wpObject; 178 pValue->chrKey=NOMPath_copyCString( WPFileSystem_wpQueryFileName( wpObject, FALSE, NULLHANDLE)178 pValue->chrKey=NOMPath_copyCString( WPFileSystem_wpQueryFileName((WPFileSystem*)wpObject, FALSE, NULLHANDLE) 179 179 , NULLHANDLE); 180 180 … … 188 188 { 189 189 190 g_message("%s: key % x (%s), value %x, data %d", __FUNCTION__, key, key, pValue,data);190 g_message("%s: key %p (%s), value %p, data %d", __FUNCTION__, key, (char*)key, pValue, (int)data); 191 191 return FALSE; 192 192 } … … 218 218 g_tree_remove() will reinsert any object coming by so g_tree_remove() can't 219 219 be used. */ 220 g_tree_steal(_fldrObjects, NOMPath_queryCString(WPFileSystem_wpQueryFileName(wpObject, FALSE, NULLHANDLE), 220 g_tree_steal(_fldrObjects, NOMPath_queryCString(WPFileSystem_wpQueryFileName((WPFileSystem*)wpObject, 221 FALSE, NULLHANDLE), 221 222 NULLHANDLE)); 222 223 224 223 return TRUE; 225 224 } … … 242 241 243 242 #warning !!!!! Use Title here? !!!!! 244 display_name=NOMPath_copyCString(WPFileSystem_wpQueryFileName( wpObject, FALSE, NULLHANDLE),243 display_name=NOMPath_copyCString(WPFileSystem_wpQueryFileName((WPFileSystem*)wpObject, FALSE, NULLHANDLE), 245 244 NULLHANDLE);/* Do we need a copy here? */ 246 245 … … 280 279 if(_pListStore) 281 280 { 282 /* Each object which is added to a store*/281 /* Find the correct STOREITEM for this folder */ 283 282 pui=_wpFindUseItem(wpObject, USAGE_STORE, 284 283 NULLHANDLE, NULLHANDLE); … … 296 295 } 297 296 pui--; 298 pui=_wpFindUseItem(wpObject, USAGE_STORE, 299 pui, NULLHANDLE); 297 pui=_wpFindUseItem(wpObject, USAGE_STORE, pui, NULLHANDLE); 300 298 } 301 299 } … … 366 364 #endif 367 365 /* insert into contents list */ 368 WPFolder_wpAddToContent(nomSelf, wpObject, gchrCurrentEntry,NULLHANDLE);366 WPFolder_wpAddToContent(nomSelf, wpObject, NULLHANDLE); 369 367 }/* if(nomIsObj(wpObject)) */ 370 368 g_free (path); … … 501 499 } 502 500 503 gtkIconView= WPFolderWindow_wpQueryContainerHandle(wpFldrWindow, NULLHANDLE);501 gtkIconView=(GtkIconView*)WPFolderWindow_wpQueryContainerHandle(wpFldrWindow, NULLHANDLE); 504 502 505 503 gtk_icon_view_set_model(GTK_ICON_VIEW (gtkIconView), -
trunk/desktop/class_c/wpobject.c
r244 r245 843 843 844 844 /* Insert into the new folder */ 845 _wpAddToContent(wpTargetFolder, nomSelf, NULLHANDLE , NULLHANDLE);845 _wpAddToContent(wpTargetFolder, nomSelf, NULLHANDLE); 846 846 _wpAddToStore(wpTargetFolder, nomSelf, NULLHANDLE); 847 847 -
trunk/desktop/dox/desktop.dox
r224 r245 48 48 # the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES 49 49 50 EXTRACT_ALL = YES50 EXTRACT_ALL = NO 51 51 52 52 # If the EXTRACT_PRIVATE tag is set to YES all private members of a class … … 324 324 # subdirectory from a directory tree whose root is specified with the INPUT tag. 325 325 326 EXCLUDE = 326 EXCLUDE = ./../class_h/ 327 327 328 328 # If the value of the INPUT tag contains directories, you can use the … … 330 330 # certain files from those directories. 331 331 332 EXCLUDE_PATTERNS = *.*~ 332 EXCLUDE_PATTERNS = *.*~ 333 333 334 334 # The EXAMPLE_PATH tag can be used to specify one or more files or -
trunk/desktop/idl/wpdatafile.idl
r203 r245 32 32 * 33 33 * ***** END LICENSE BLOCK ***** */ 34 /** \file 35 36 */ 34 37 35 38 #ifndef wpdataf_idl … … 39 42 40 43 NOMMETACLASS(M_WPDataFile); 44 45 /** \interface WPDataFile 46 47 This is the root of all desktop classes. 48 */ 41 49 interface WPDataFile : WPFileSystem 42 50 { 43 51 NOMCLASSVERSION(1, 0); 52 /** 53 Query the size of a file. 54 55 \note The return type may change to long long. 56 */ 44 57 long wpQueryFileSize(); 45 58 long wpSetFileSizeInfo(in long cbFileSize, -
trunk/desktop/idl/wpfilesystem.idl
r243 r245 32 32 * 33 33 * ***** END LICENSE BLOCK ***** */ 34 /** \file 35 36 */ 34 37 35 38 #ifndef wpfsys_idl … … 45 48 NOMMETACLASS(M_WPFileSystem); 46 49 50 /** \interface WPFileSystem 51 52 Any object which represents a filesystem object is a subclass of this class, e.g. 53 WPDataFile or WPFolder. 54 */ 47 55 interface WPFileSystem : WPObject 48 56 { 49 57 NOMCLASSVERSION(1, 0); 50 58 51 void tstSetFullPath(in string fullPath); 59 void tstSetFullPath(in string fullPath); 60 /** 61 Query the filename of this object. 62 63 \remarks This name may be different from the displayed title because of filename 64 encoding on disk. 65 66 \param bFullPath If set to TRUE the fully qualified path is returned. 67 */ 52 68 PNOMPath wpQueryFileName(in boolean bFullPath); 53 69 70 /** 71 wpMoveObject() must be overriden to physically move a file or folder when requested. 72 The method implementation of WPObject only handles the graphical representation on the 73 desktop by inserting icons into folder windows. 74 */ 54 75 NOMOVERRIDE(wpMoveObject); 55 76 NOMOVERRIDE(wpCopyObject); -
trunk/desktop/idl/wpfolder.idl
r244 r245 32 32 * 33 33 * ***** END LICENSE BLOCK ***** */ 34 34 /** \file 35 36 */ 35 37 #ifndef WPFOLDER_IDL_INCLUDED 36 38 #define WPFOLDER_IDL_INCLUDED … … 45 47 NOMMETACLASS(M_WPFolder); 46 48 49 /** \interface WPFolder 50 51 A desktop class representing directories. 52 */ 47 53 interface WPFolder : WPFileSystem 48 54 { 49 55 NOMCLASSVERSION(1, 0); 50 56 57 /** 58 This method gathers the content of a folder (by searching the filesystem) 59 and creates the objects it contains. This means the representation of the 60 files and folders on disk. 61 All found objects are inserted into the internal list of objects. 62 63 \remarks This method does not create a folder window nor does it add any 64 objects to the store holding objects to be shown in a folder window. 65 66 \param fFoldersOnly If set to TRUE only directories are inserted into the 67 content list. This is useful when building tree views. 68 69 \return TRUE on success FALSE otherwise. 70 71 */ 51 72 boolean wpPopulate(in unsigned long ulReserved, 52 73 in string pszPath, 53 74 in boolean fFoldersOnly); 75 76 /** 77 Create a window which may show the objects in this folder. The default folder 78 window is just a toplevel window with a container for the icons. 79 This method is called when a new folder view is created. No objects are inserted 80 during execution of this method. 81 82 \remarks The default window is of class WPFolderWindow. If you want to 83 replace the window make sure you have at least one container window (an 84 icon view) into which objects may be inserted 85 86 \par How to override: 87 This method may be overriden if the default folder window doesn't fit your 88 needs. 89 90 \note This method and the WPFolderWindow class need some detailed explanation 91 about subclassing and replacing. 92 */ 54 93 PWPFolderWindow wpCreateFolderWindow(); 55 56 #if 057 WPObject wpQueryContent(in WPObject Object,58 in ULONG ulOption);59 60 BOOL wpAddToContent(in WPObject Object);61 #endif62 94 63 95 gulong wpQueryFldrFlags(); 64 96 boolean wpSetFldrFlags(in gulong ulFlags, in gulong ulMask); 65 97 66 gulong wpAddToContent(in PWPObject wpObject, in string chrFileName); 98 /** 99 Add an object to the internal list of objects held by 100 the folder. 101 102 \remarks The object is not added to the store which is used 103 for displaying objects in the folder window. It's necessary to call 104 wpAddToStore() for this. 105 106 \par How to override: 107 This method may be overriden to track the insertion of objects into 108 a folder. The parent should be called first. 109 110 \param wpObject The object to be added. 111 112 \return TRUE on success FALSE otherwise. 113 114 \sa wpQueryContent(), wpDeleteFromContent(), wpAddToStore() 115 */ 116 gulong wpAddToContent(in PWPObject wpObject); 117 118 /** 119 This method needs implementation. The signature will change. 120 121 Don't use! 122 */ 67 123 PWPObject wpQueryContent(); 68 124 … … 75 131 \return TRUE on success FALSE otherwise. 76 132 77 \sa wpQueryContent s(), wpAddToContents()133 \sa wpQueryContent(), wpAddToContent() 78 134 */ 79 135 boolean wpDeleteFromContent(in PWPObject wpObject); 80 136 137 /** 138 Add an object to the store of the folder. By adding the object 139 to the store it will show in the folder window. 140 141 \remarks Don't insert an object into the folders store which is not 142 already in the internal list of folder objects. Use wpAddToContent() 143 to do that. If there's no store yet this methods does nothing. A folder 144 only has a store if any view was created. 145 146 \param wpObject The object to be added to the store. Using NULL here is 147 save and will do nothing. 148 149 \return TRUE on success FALSE otherwise. 150 151 \sa wpAddToContent(), wpDeleteFromStore() 152 */ 81 153 PUSEITEM wpAddToStore(in PWPObject wpObject); 154 155 /** 156 Delete an object from the store. The store holds all the objects which 157 are visible in the folder window. 158 159 \remarks An object must first be removed from the folders store before it 160 is removed from the folders content list. 161 162 \param wpObject The object to be removed from the folders store. 163 164 \sa wpAddToStore(), wpDeleteFromContent() 165 */ 82 166 PUSEITEM wpDeleteFromStore(in PWPObject wpObject); 83 167 84 168 NOMOVERRIDE(wpInitData); 169 /** 170 Override of the wpOpen() method. The WPFolder implementation calls 171 wpPopulate(), creates a new folder window and inserts the objects into the 172 window. 173 */ 85 174 NOMOVERRIDE(wpOpen); 86 175 NOMOVERRIDE(wpQueryIcon); … … 89 178 NOMOVERRIDE(wpDrop); 90 179 180 /** 181 This variable will go away. 182 */ 91 183 NOMINSTANCEVAR(PPRIVFOLDERDATA privFolderData); /* This will go away... */ 184 /** 185 This varable holds the binary tree containing all the objects inserted into this 186 folder. The key for accessing the objects is the objects name. This way a fast 187 search for duplicates is possible. 188 189 \remarks This variable is private and can only be accessed from within the class. 190 191 \sa wpAddToContent(), wpDeleteFromContent() 192 */ 92 193 NOMINSTANCEVAR(PGTree fldrObjects); 194 195 /** 196 Container flags. 197 198 \remarks This variable has access methods for setting and querying. 199 200 \sa wpQueryFldrFlags(), wpSetFldrFlags(), 201 */ 93 202 NOMINSTANCEVAR(gulong ulFldrFlags); 203 /** 204 This private instance variable holds the store of this folder. The store contains 205 all the objects which are shown in the container. 206 207 \remarks This variable is private and can only be accessed from within the class. 208 209 \sa wpAddToStore(), wpDeleteFromStore() 210 */ 94 211 NOMINSTANCEVAR(PGtkListStore pListStore); 95 212 }; -
trunk/desktop/idl/wpfolderwindow.idl
r188 r245 33 33 * ***** END LICENSE BLOCK ***** */ 34 34 35 /** \file 36 37 */ 38 35 39 #ifndef WPFLDRWINDOW_IDL_INCLUDED 36 40 #define WPFLDRWINDOW_IDL_INCLUDED … … 52 56 #include "wpwindow.idl" 53 57 58 /** \interface WPFolderWindow 59 60 Default desktop window used by folders to show objects to the user. 61 62 */ 54 63 interface WPFolderWindow : WPWindow 55 64 { -
trunk/desktop/idl/wpobject.idl
r244 r245 38 38 #include <nomobj.idl> 39 39 40 /** \file wpobject.idl 41 42 */ 40 43 NOMCLASSNAME(WPObject); 41 44 … … 64 67 NOMMETACLASS(M_WPObject); 65 68 69 /** \interface WPObject 70 71 This is the root of all desktop classes. 72 */ 66 73 interface WPObject : NOMObject 67 74 { … … 304 311 305 312 /** 313 Find a useitem previously registerd using wpAddToObjUseList(). 314 315 \param ulType The type of the useitem e.g. USAGE_MEMORY. 316 \param pCurrentItem If set to NULL the first item is returned. When set 317 to a useitem pointer the next matching useitem is searched. 318 319 \return A pointer to a useitem or NULL if no matchin item can be found. 320 306 321 \sa wpAddToObjUseList(), wpDeleteFromObjUseList(), wpFindViewItem() 307 322 */ 308 323 PUSEITEM wpFindUseItem( in gulong ulType, in PUSEITEM pCurrentUseItem); 324 309 325 PVIEWITEM wpFindViewItem( in gulong ulView, in nomId nameSpaceId, in PVIEWITEM pCurrentItem); 310 326 … … 353 369 Move an object to a new location. 354 370 371 \remark This method removes the object from the content list of the 372 source folder and inserts it into the list of the target folder using 373 wpDeleteFromContent() and wpAddToContent(). The same is done for the stores 374 held by the source and target folders. 375 Note that this method must be overriden by subclasses to actually perform 376 any moving of files. 377 355 378 \par How to override: 356 379 This method is overriden by classes which need special processing when 357 objects are moved. 380 objects are moved. The parent method must be called last. 358 381 359 382 \param wpTargetFolder The new folder into which the object will be moved. 383 If this is not a valid object FALSE is returned. 360 384 361 385 \return TRUE when success. … … 425 449 NOMINSTANCEVAR(PGSList glstObjectInUse); 426 450 NOMINSTANCEVAR(PNOMString pnomStringTitle); 451 /** 452 This instance variable holds the pointer to the folder containing this 453 object. 454 455 \remarks This variable may be accessed using wpQueryFolder() and wpSetFolder() 456 457 \sa wpQueryFolder(), wpSetFolder() 458 */ 427 459 NOMINSTANCEVAR(PWPFolder wpParentFldr); 428 460 }; -
trunk/desktop/idl/wpwindow.idl
r237 r245 32 32 * 33 33 * ***** END LICENSE BLOCK ***** */ 34 /** \file 35 36 */ 34 37 35 38 #ifndef WPWINDOW_IDL_INCLUDED … … 57 60 #endif 58 61 62 /** \interface WPWindow 63 64 Base class for all windows created by desktop objects. This class offers methods to 65 store and retrieve associated desktop objects. 66 */ 59 67 interface WPWindow : NOMWindow 60 68 {
Note:
See TracChangeset
for help on using the changeset viewer.