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

version 1.11, 2002/04/14 21:41:21 version 1.12, 2002/04/17 07:38:31
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;
   nsIContent* mCachedParent;
 }  }
   
 -(id) init;  -(id) init;
Line 84  class nsIAtom; Line 86  class nsIAtom;
   
 @interface BookmarkItem : NSObject  @interface BookmarkItem : NSObject
 {  {
    nsIContent* mContentNode;  nsIContent* mContentNode;
 }  }
   
 -(nsIContent*)contentNode;  -(nsIContent*)contentNode;
Line 95  class nsIAtom; Line 97  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);
   
     void ConstructBookmarksToolbar();
     
 private:  private:
    // Global counter and pointers to our singletons.  // Global counter and pointers to our singletons.
    static PRUint32 gRefCnt;  static PRUint32 gRefCnt;
    
    // A dictionary that maps from content IDs (which uniquely identify content nodes)  // 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  // to Obj-C bookmarkItem objects.  These objects are handed back to UI elements like
    // the outline view.  // the outline view.
    static NSMutableDictionary* gDictionary;  static NSMutableDictionary* gDictionary;
          
 public:  public:
    static MainController* gMainController;  static MainController* gMainController;
    static NSMenu* gBookmarksMenu;  static NSMenu* gBookmarksMenu;
    static nsIAtom* gFolderAtom;  static nsIAtom* gFolderAtom;
    static nsIAtom* gNameAtom;  static nsIAtom* gNameAtom;
    static nsIAtom* gHrefAtom;  static nsIAtom* gHrefAtom;
    static nsIAtom* gBookmarkAtom;  static nsIAtom* gBookmarkAtom;
    static nsIDocument* gBookmarks;  static nsIDocument* gBookmarks;
    static nsVoidArray* gInstances;  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.12


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