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

version 1.9, 2002/03/07 18:42:42 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 mOutlineView;     
    IBOutlet id mAddButton;  IBOutlet id mBrowserWindowController;
    IBOutlet id mDeleteButton;  IBOutlet id mAddButton;       
   IBOutlet id mDeleteButton;
 
   NSString* mCachedHref;
 }  }
   
 -(id) init;  -(id) init;
Line 62  class nsIAtom; Line 66  class nsIAtom;
 -(void) ensureBookmarks;  -(void) ensureBookmarks;
   
 -(IBAction)addBookmark:(id)aSender;  -(IBAction)addBookmark:(id)aSender;
-(IBAction)deleteBookmark: (id)aSender;-(void)endAddBookmark: (int)aCode;
 
 -(IBAction)deleteBookmarks: (id)aSender;
 -(void)deleteBookmark: (id)aItem;
 
 -(IBAction)addFolder:(id)aSender;
 
 -(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 77  class nsIAtom; Line 88  class nsIAtom;
   
 @interface BookmarkItem : NSObject  @interface BookmarkItem : NSObject
 {  {
    nsIContent* mContentNode;  nsIContent* mContentNode;
 }  }
   
 -(nsIContent*)contentNode;  -(nsIContent*)contentNode;
Line 88  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();
    void NotifyObserver(nsIContent* aContainer, PRBool aReloadChildren);
    static void NotifyObservers(nsIContent* aContainer, PRBool aReloadChildren);  static void BookmarkAdded(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);
private:  static NSMenu* LocateMenu(nsIContent* aContent);
    // Global counter and pointers to our singletons.
    static PRUint32 gRefCnt;  static void ConstructAddBookmarkFolderList(NSPopUpButton* aPopup, BookmarkItem* aItem);
      
    // A dictionary that maps from content IDs (which uniquely identify content nodes)  static void EnsureToolbarRoot();
    // 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 nsIAtom* gFolderAtom;  static PRUint32 gRefCnt;
    static nsIAtom* gNameAtom;
    static nsIAtom* gHrefAtom;  // A dictionary that maps from content IDs (which uniquely identify content nodes)
    static nsIAtom* gBookmarkAtom;  // to Obj-C bookmarkItem objects.  These objects are handed back to UI elements like
    static nsIDocument* gBookmarks;  // the outline view.
    static nsVoidArray* gInstances;  static NSMutableDictionary* gDictionary;
          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.9  
changed lines
  Added in v.1.16


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