Added toolbar stub implementations.

This commit is contained in:
waterson%netscape.com 1998-11-11 19:57:16 +00:00
Родитель daf8cc32db
Коммит 4d0bda72b2
5 изменённых файлов: 231 добавлений и 7 удалений

Просмотреть файл

@ -35,13 +35,15 @@ C_OBJS=\
$(NULL)
CPP_OBJS=\
.\$(OBJDIR)\comwrap.obj \
.\$(OBJDIR)\netglue.obj \
.\$(OBJDIR)\nsRDFDataModel.obj \
.\$(OBJDIR)\nsRDFDataModelItem.obj \
.\$(OBJDIR)\nsRDFTreeColumn.obj \
.\$(OBJDIR)\nsRDFTreeDataModel.obj \
.\$(OBJDIR)\nsRDFTreeDataModelItem.obj \
.\$(OBJDIR)\comwrap.obj \
.\$(OBJDIR)\netglue.obj \
.\$(OBJDIR)\nsRDFDataModel.obj \
.\$(OBJDIR)\nsRDFDataModelItem.obj \
.\$(OBJDIR)\nsRDFToolbarDataModel.obj \
.\$(OBJDIR)\nsRDFToolbarDataModelItem.obj \
.\$(OBJDIR)\nsRDFTreeColumn.obj \
.\$(OBJDIR)\nsRDFTreeDataModel.obj \
.\$(OBJDIR)\nsRDFTreeDataModelItem.obj \
$(NULL)
LLIBS=\

Просмотреть файл

@ -0,0 +1,54 @@
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* The contents of this file are subject to the Netscape Public License
* Version 1.0 (the "NPL"); you may not use this file except in
* compliance with the NPL. You may obtain a copy of the NPL at
* http://www.mozilla.org/NPL/
*
* Software distributed under the NPL is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
* for the specific language governing rights and limitations under the
* NPL.
*
* The Initial Developer of this code under the NPL is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
* Reserved.
*/
#include "nsRDFToolbarDataModel.h"
static NS_DEFINE_IID(kIToolbarDataModelIID, NS_ITOOLBARDATAMODEL_IID);
////////////////////////////////////////////////////////////////////////
nsRDFToolbarDataModel::nsRDFToolbarDataModel(nsIRDFDataBase& db, RDF_Resource& root)
: nsRDFDataModel(db), mRoot(root)
{
}
nsRDFToolbarDataModel::~nsRDFToolbarDataModel(void)
{
}
NS_IMETHODIMP
nsRDFToolbarDataModel::QueryInterface(const nsIID& iid, void** result)
{
if (NULL == result)
return NS_ERROR_NULL_POINTER;
*result = NULL;
if (iid.Equals(kIToolbarDataModelIID)) {
*result = static_cast<nsIToolbarDataModel*>(this);
nsRDFDataModel::AddRef(); // delegate to the superclass
return NS_OK;
}
// delegate to the superclass.
return nsRDFDataModel::QueryInterface(iid, result);
}

Просмотреть файл

@ -0,0 +1,58 @@
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* The contents of this file are subject to the Netscape Public License
* Version 1.0 (the "NPL"); you may not use this file except in
* compliance with the NPL. You may obtain a copy of the NPL at
* http://www.mozilla.org/NPL/
*
* Software distributed under the NPL is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
* for the specific language governing rights and limitations under the
* NPL.
*
* The Initial Developer of this code under the NPL is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
* Reserved.
*/
#ifndef nsRDFToolbarDataModel_h__
#define nsRDFToolbarDataModel_h__
#include "nsRDFDataModel.h"
#include "nsIToolbarDataModel.h"
#include "rdf.h"
////////////////////////////////////////////////////////////////////////
/**
* An implementation for the Toolbar widget model.
*/
class nsRDFToolbarDataModel : public nsRDFDataModel, nsIToolbarDataModel {
public:
nsRDFToolbarDataModel(nsIRDFDataBase& db, RDF_Resource& root);
virtual ~nsRDFToolbarDataModel(void);
////////////////////////////////////////////////////////////////////////
// nsISupports interface
// XXX Note that we'll just use the parent class's implementation
// of AddRef() and Release()
// NS_IMETHOD_(nsrefcnt) AddRef(void);
// NS_IMETHOD_(nsrefcnt) Release(void);
NS_IMETHOD QueryInterface(const nsIID& iid, void** result);
////////////////////////////////////////////////////////////////////////
// nsIToolbarDataModel interface
private:
RDF_Resource& mRoot;
};
#endif // nsRDFToolbarDataModel_h__

Просмотреть файл

@ -0,0 +1,55 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* The contents of this file are subject to the Netscape Public License
* Version 1.0 (the "NPL"); you may not use this file except in
* compliance with the NPL. You may obtain a copy of the NPL at
* http://www.mozilla.org/NPL/
*
* Software distributed under the NPL is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
* for the specific language governing rights and limitations under the
* NPL.
*
* The Initial Developer of this code under the NPL is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
* Reserved.
*/
#include "nsRDFToolbarDataModelItem.h"
#include "nsRDFToolbarDataModel.h"
static NS_DEFINE_IID(kIToolbarDMItemIID, NS_ITOOLBARDMITEM_IID);
////////////////////////////////////////////////////////////////////////
nsRDFToolbarDataModelItem::nsRDFToolbarDataModelItem(nsRDFToolbarDataModel& Toolbar, RDF_Resource& resource)
: nsRDFDataModelItem(resource),
mToolbar(Toolbar)
{
}
nsRDFToolbarDataModelItem::~nsRDFToolbarDataModelItem(void)
{
}
NS_IMETHODIMP
nsRDFToolbarDataModelItem::QueryInterface(const nsIID& iid, void** result)
{
if (NULL == result)
return NS_ERROR_NULL_POINTER;
*result = NULL;
if (iid.Equals(kIToolbarDMItemIID)) {
*result = static_cast<nsIToolbarDMItem*>(this);
nsRDFDataModelItem::AddRef(); // delegate to the superclass
return NS_OK;
}
// delegate to the superclass.
return nsRDFDataModelItem::QueryInterface(iid, result);
}

Просмотреть файл

@ -0,0 +1,55 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* The contents of this file are subject to the Netscape Public License
* Version 1.0 (the "NPL"); you may not use this file except in
* compliance with the NPL. You may obtain a copy of the NPL at
* http://www.mozilla.org/NPL/
*
* Software distributed under the NPL is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
* for the specific language governing rights and limitations under the
* NPL.
*
* The Initial Developer of this code under the NPL is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
* Reserved.
*/
#ifndef nsRDFTreeDataModelItem_h__
#define nsRDFTreeDataModelItem_h__
#include "rdf.h"
#include "nsRDFDataModelItem.h"
#include "nsIToolbarDMItem.h"
class nsRDFToolbarDataModel;
////////////////////////////////////////////////////////////////////////
class nsRDFToolbarDataModelItem : public nsRDFDataModelItem, nsIToolbarDMItem {
public:
nsRDFToolbarDataModelItem(nsRDFToolbarDataModel& Toolbar, RDF_Resource& resource);
virtual ~nsRDFToolbarDataModelItem(void);
////////////////////////////////////////////////////////////////////////
// nsISupports interface
// XXX Note that we'll just use the parent class's implementation
// of AddRef() and Release()
// NS_IMETHOD_(nsrefcnt) AddRef(void);
// NS_IMETHOD_(nsrefcnt) Release(void);
NS_IMETHOD QueryInterface(const nsIID& iid, void** result);
////////////////////////////////////////////////////////////////////////
// nsIToolbarItem interface
private:
nsRDFToolbarDataModel& mToolbar;
};
////////////////////////////////////////////////////////////////////////
#endif // nsRDFToolbarDataModelItem_h__