Diff for /chimera/BookmarksService.h between versions 1.11 and 1.16

version 1.11, 2002/04/14 21:41:21 version 1.16, 2002/04/19 07:58:30
Line 42 Line 42
 #include "nsIDocumentObserver.h"  #include "nsIDocumentObserver.h"
 #include "nsVoidArray.h"  #include "nsVoidArray.h"
 #import "MainController.h"  #import "MainController.h"
   #import "BookmarksToolbar.h"
   
 class BookmarksService;  class BookmarksService;
 class nsIAtom;  class nsIAtom;
   
 @interface BookmarksDataSource : NSObject  @interface BookmarksDataSource : NSObject
 {  {
    BookmarksService* mBookmarks;  BookmarksService* mBookmarks;
    IBOutlet id mOutlineView; 
    IBOutlet id mBrowserWindowController; 
    IBOutlet id mAddButton; 
    IBOutlet id mDeleteButton; 
   
    NSString* mCachedHref;  IBOutlet id mOutlineView;     
    nsIContent* mCachedParent;  IBOutlet id mBrowserWindowController;
   IBOutlet id mAddButton;       
   IBOutlet id mDeleteButton;
 
   NSString* mCachedHref;
 }  }
   
 -(id) init;  -(id) init;
Line 67  class nsIAtom; Line 68  class nsIAtom;
 -(IBAction)addBookmark:(id)aSender;  -(IBAction)addBookmark:(id)aSender;
 -(void)endAddBookmark: (int)aCode;  -(void)endAddBookmark: (int)aCode;
   
-(IBAction)deleteBookmark: (id)aSender;-(IBAction)deleteBookmarks: (id)aSender;
 -(void)deleteBookmark: (id)aItem;
 
 -(IBAction)addFolder:(id)aSender;
   
-(void)addBookmark:(id)aSender useSelection:(BOOL)aSel;-(void)addBookmark:(id)aSender useSelection:(BOOL)aSel isFolder:(BOOL)aIsFolder;
   
 // Datasource methods.  // Datasource methods.
 - (id)outlineView:(NSOutlineView *)outlineView child:(int)index ofItem:(id)item;  - (id)outlineView:(NSOutlineView *)outlineView child:(int)index ofItem:(id)item;
Line 84  class nsIAtom; Line 88  class nsIAtom;
   
 @interface BookmarkItem : NSObject  @interface BookmarkItem : NSObject
 {  {
    nsIContent* mContentNode;  nsIContent* mContentNode;
 }  }
   
 -(nsIContent*)contentNode;  -(nsIContent*)contentNode;
Line 95  class nsIAtom; Line 99  class nsIAtom;
 class BookmarksService  class BookmarksService
 {  {
 public:  public:
    BookmarksService(BookmarksDataSource* aDataSource);  BookmarksService(BookmarksDataSource* aDataSource);
    virtual ~BookmarksService();  BookmarksService(BookmarksToolbar* aToolbar);
      virtual ~BookmarksService();
    void AddObserver();
    void RemoveObserver();  void AddObserver();
  void RemoveObserver();
    static void BookmarkAdded(nsIContent* aContainer, nsIContent* aChild);
    static void BookmarkChanged(nsIContent* aItem);  static void BookmarkAdded(nsIContent* aContainer, nsIContent* aChild);
    static void BookmarkRemoved(nsIContent* aContainer, nsIContent* aChild);  static void BookmarkChanged(nsIContent* aItem);
      static void BookmarkRemoved(nsIContent* aContainer, nsIContent* aChild);
   
 public:  public:
    static void GetRootContent(nsIContent** aResult);  static void GetRootContent(nsIContent** aResult);
    static BookmarkItem* GetWrapperFor(nsIContent* aItem);  static BookmarkItem* GetWrapperFor(nsIContent* aItem);
    static void FlushBookmarks();  static void FlushBookmarks();
    
    static void ConstructBookmarksMenu(NSMenu* aMenu, nsIContent* aContent);  static void ConstructBookmarksMenu(NSMenu* aMenu, nsIContent* aContent);
    static void OpenMenuBookmark(BrowserWindowController* aController, id aMenuItem);  static void OpenMenuBookmark(BrowserWindowController* aController, id aMenuItem);
    static void AddMenuBookmark(NSMenu* aMenu, nsIContent* aParent, nsIContent* aChild, PRInt32 aIndex);  static void AddMenuBookmark(NSMenu* aMenu, nsIContent* aParent, nsIContent* aChild, PRInt32 aIndex);
    static NSMenu* LocateMenu(nsIContent* aContent);  static NSMenu* LocateMenu(nsIContent* aContent);
private:  static void ConstructAddBookmarkFolderList(NSPopUpButton* aPopup, BookmarkItem* aItem);
    // Global counter and pointers to our singletons.  
    static PRUint32 gRefCnt;  static void EnsureToolbarRoot();
      
    // A dictionary that maps from content IDs (which uniquely identify content nodes) 
    // to Obj-C bookmarkItem objects.  These objects are handed back to UI elements like 
    // the outline view. 
    static NSMutableDictionary* gDictionary; 
         
 public:  public:
    static MainController* gMainController;  // Global counter and pointers to our singletons.
    static NSMenu* gBookmarksMenu;  static PRUint32 gRefCnt;
    static nsIAtom* gFolderAtom;
    static nsIAtom* gNameAtom;  // A dictionary that maps from content IDs (which uniquely identify content nodes)
    static nsIAtom* gHrefAtom;  // to Obj-C bookmarkItem objects.  These objects are handed back to UI elements like
    static nsIAtom* gBookmarkAtom;  // the outline view.
    static nsIDocument* gBookmarks;  static NSMutableDictionary* gDictionary;
    static nsVoidArray* gInstances;  static MainController* gMainController;
          static NSMenu* gBookmarksMenu;
   static nsIDOMElement* gToolbarRoot;
   static nsIAtom* gFolderAtom;
   static nsIAtom* gNameAtom;
   static nsIAtom* gHrefAtom;
   static nsIAtom* gBookmarkAtom;
   static nsIDocument* gBookmarks;
   static nsVoidArray* gInstances;
   
 private:  private:
    BookmarksDataSource* mDataSource;  // There are three kinds of bookmarks data sources:
   // tree views (mDataSource), the personal toolbar (mToolbar)
   // and menus (gBookmarksMenu).
   BookmarksToolbar* mToolbar;
   BookmarksDataSource* mDataSource;
 };  };

Removed from v.1.11  
changed lines
  Added in v.1.16


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>