Adding core CalCanvas implementation

This commit is contained in:
spider%netscape.com 1998-09-15 20:08:35 +00:00
Родитель 2cef6d00a9
Коммит cb67a43c58
7 изменённых файлов: 21 добавлений и 5 удалений

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

@ -52,6 +52,8 @@ static NS_DEFINE_IID(kIViewIID, NS_IVIEW_IID);
static NS_DEFINE_IID(kViewCID, NS_VIEW_CID);
static NS_DEFINE_IID(kWidgetCID, NS_CHILD_CID);
static NS_DEFINE_IID(kCCalCanvasCID, NS_CAL_CANVAS_CID);
// hardcode names of dll's
#ifdef NS_WIN32
#define CALUI_DLL "calui10.dll"
@ -577,6 +579,7 @@ nsresult nsCalendarContainer::RegisterFactories()
nsRepository::RegisterFactory(kCCalComponentCID, CALUI_DLL, PR_FALSE, PR_FALSE);
nsRepository::RegisterFactory(kCCalContextControllerCID, CALUI_DLL, PR_FALSE, PR_FALSE);
nsRepository::RegisterFactory(kCCalTimebarContextControllerCID, CALUI_DLL, PR_FALSE, PR_FALSE);
nsRepository::RegisterFactory(kCCalCanvasCID, CALUI_DLL, PR_FALSE, PR_FALSE);
nsRepository::RegisterFactory(kCCalMonthContextControllerCID, CALUI_DLL, PR_FALSE, PR_FALSE);
nsRepository::RegisterFactory(kCCalToolkitCID, CALUI_DLL, PR_FALSE, PR_FALSE);
nsRepository::RegisterFactory(kCVectorCID, XPFC_DLL, PR_FALSE, PR_FALSE);

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

@ -23,6 +23,7 @@ PRIVATE_EXPORTS = \
nsCalTimebarTimeHeading.h \
nsCalTimebarScale.h \
nsCalMultiDayViewCanvas.h \
nsCalCanvas.h \
nsCalDayViewCanvas.h \
events.h \
$(NULL)

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

@ -23,8 +23,9 @@
#include "nsXPFCCanvas.h"
#include "nsICalTimeContext.h"
#include "nsCalCanvas.h"
class nsCalTimebarCanvas : public nsXPFCCanvas
class nsCalTimebarCanvas : public nsCalCanvas
{
public:

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

@ -29,6 +29,7 @@ CPPSRCS = \
nsCalTimebarScale.cpp \
nsCalMultiDayViewCanvas.cpp \
nsCalDayViewCanvas.cpp \
nsCalCanvas.cpp \
events.cpp \
$(NULL)

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

@ -24,7 +24,7 @@ static NS_DEFINE_IID(kCalTimebarCanvasCID, NS_CAL_TIMEBARCANVAS_CID);
#define LOCAL_INSET 1
nsCalTimebarCanvas :: nsCalTimebarCanvas(nsISupports* outer) : nsXPFCCanvas(outer)
nsCalTimebarCanvas :: nsCalTimebarCanvas(nsISupports* outer) : nsCalCanvas(outer)
{
NS_INIT_REFCNT();
mTimeContext = nsnull;
@ -52,7 +52,7 @@ nsresult nsCalTimebarCanvas::QueryInterface(REFNSIID aIID, void** aInstancePtr)
AddRef();
return NS_OK;
}
return (nsXPFCCanvas::QueryInterface(aIID, aInstancePtr));
return (nsCalCanvas::QueryInterface(aIID, aInstancePtr));
}
NS_IMPL_ADDREF(nsCalTimebarCanvas)
@ -156,7 +156,7 @@ nsEventStatus nsCalTimebarCanvas :: PaintBackground(nsIRenderingContext& aRender
*/
nsRect rect;
nsXPFCCanvas::PaintBackground(aRenderingContext,aDirtyRect);
nsCalCanvas::PaintBackground(aRenderingContext,aDirtyRect);
/*
* Now paint the TimeContext over the base canvas background
@ -230,6 +230,6 @@ nsresult nsCalTimebarCanvas::PaintInterval(nsIRenderingContext& aRenderingContex
nsresult nsCalTimebarCanvas :: SetParameter(nsString& aKey, nsString& aValue)
{
return (nsXPFCCanvas::SetParameter(aKey, aValue));
return (nsCalCanvas::SetParameter(aKey, aValue));
}

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

@ -68,6 +68,11 @@
{ 0x6e645390, 0xedba, 0x11d1, \
{ 0xbe, 0xc6, 0x00, 0x80, 0x5f, 0x8a, 0x8d, 0xbd } }
//11faca40-4cd5-11d2-924a-00805f8a7ab6
#define NS_CAL_CANVAS_CID \
{ 0x11faca40, 0x4cd5, 0x11d2, \
{ 0x92, 0x4a, 0x00, 0x80, 0x5f, 0x8a, 0x7a, 0xb6 } }
//025d7730-edbc-11d1-bec6-00805f8a8dbd
#define NS_CAL_TIMEBARCOMPONENTCANVAS_CID \
{ 0x025d7730, 0xedbc, 0x11d1, \

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

@ -55,6 +55,7 @@ static NS_DEFINE_IID(kICalTimeContext, NS_ICAL_TIME_CONTEXT_IID);
static NS_DEFINE_IID(kICalContextController, NS_ICAL_CONTEXT_CONTROLLER_IID);
static NS_DEFINE_IID(kCCalTimebarCanvas, NS_CAL_TIMEBARCANVAS_CID);
static NS_DEFINE_IID(kCCalCanvas, NS_CAL_CANVAS_CID);
static NS_DEFINE_IID(kCCalStatusCanvas, NS_CAL_STATUSCANVAS_CID);
static NS_DEFINE_IID(kCCalCommandCanvas, NS_CAL_COMMANDCANVAS_CID);
static NS_DEFINE_IID(kCCalTimebarComponentCanvas, NS_CAL_TIMEBARCOMPONENTCANVAS_CID);
@ -185,6 +186,10 @@ nsresult nsCalFactory::CreateInstance(nsISupports *aOuter,
nsXPFCCanvas * canvas = (nsXPFCCanvas *)new nsCalTimebarCanvas(aOuter);
canvas->QueryInterface(kISupportsIID,(void **)&inst);
}
else if (mClassID.Equals(kCCalCanvas)) {
nsXPFCCanvas * canvas = (nsXPFCCanvas *)new nsCalCanvas(aOuter);
canvas->QueryInterface(kISupportsIID,(void **)&inst);
}
else if (mClassID.Equals(kCCalStatusCanvas)) {
nsXPFCCanvas * canvas = (nsXPFCCanvas *)new nsCalStatusCanvas(aOuter);
canvas->QueryInterface(kISupportsIID,(void **)&inst);