1998-07-31 09:27:32 +04:00
|
|
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
|
|
|
*
|
|
|
|
* 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 __FORM_HTMLAREA_H
|
|
|
|
#define __FORM_HTMLAREA_H
|
|
|
|
|
1998-09-11 01:15:28 +04:00
|
|
|
// This file is dedicated to one form type it uses the CEnderView as
|
1998-07-31 09:27:32 +04:00
|
|
|
// their implementation as requried by the XP layout
|
|
|
|
// library.
|
|
|
|
|
|
|
|
// Required includes.
|
|
|
|
#include "fmabstra.h"
|
1998-09-11 01:15:28 +04:00
|
|
|
#include "enderwrp.h"
|
1998-07-31 09:27:32 +04:00
|
|
|
|
|
|
|
class CFormHtmlarea : public CFormElement {
|
|
|
|
// Construction/destruction.
|
|
|
|
// Do not construct directly, use GetFormElement instead.
|
|
|
|
protected:
|
|
|
|
CFormHtmlarea();
|
|
|
|
virtual ~CFormHtmlarea();
|
|
|
|
friend CFormElement;
|
|
|
|
|
|
|
|
// The form element we represent.
|
|
|
|
// This can be called at various times, so always update
|
|
|
|
// our information when this function is called
|
|
|
|
// (refresh cached or calculated XP data).
|
|
|
|
protected:
|
|
|
|
virtual void SetElement(LO_FormElementStruct *pFormElement);
|
|
|
|
|
|
|
|
// This is called to inform us of the owning context.
|
|
|
|
// Once set, we should query it to decide how we will represent our
|
|
|
|
// selves (printing through a DC, existing as a window, etc).
|
|
|
|
protected:
|
|
|
|
virtual void SetContext(CAbstractCX *pCX);
|
|
|
|
|
|
|
|
// Actions that we've been told to take.
|
|
|
|
public:
|
|
|
|
virtual void DisplayFormElement(LTRB& Rect);
|
|
|
|
protected:
|
|
|
|
// Destroy the widget (window) implemenation of the form.
|
|
|
|
virtual void DestroyWidget();
|
|
|
|
|
|
|
|
// Create the widget (window) implementation of the form
|
|
|
|
// but DO NOT DISPLAY.
|
|
|
|
virtual void CreateWidget();
|
|
|
|
|
|
|
|
// Copy the current data out of the layout struct into the form
|
|
|
|
// widget, or mark that you should represent using the current data.
|
|
|
|
virtual void UseCurrentData();
|
|
|
|
|
|
|
|
// Copy the default data out of the layout struct into the form
|
|
|
|
// widget, or mark that you should represent using the default data.
|
|
|
|
virtual void UseDefaultData();
|
|
|
|
|
|
|
|
// Fill in the layout size information in the layout struct regarding
|
|
|
|
// the dimensions of the widget.
|
|
|
|
virtual void FillSizeInfo();
|
|
|
|
|
|
|
|
// Copy the current data out of the form element back into the
|
|
|
|
// layout struct.
|
1998-10-15 00:24:50 +04:00
|
|
|
virtual void UpdateCurrentData(BOOL bSubmit);
|
1998-07-31 09:27:32 +04:00
|
|
|
|
|
|
|
public:
|
|
|
|
virtual HWND GetRaw();
|
|
|
|
|
|
|
|
// The htmlarea widget.
|
|
|
|
private:
|
1998-09-11 01:15:28 +04:00
|
|
|
CEnderView *m_pWidget;
|
1998-07-31 09:27:32 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // __FORM_HTMLAREA_H
|
|
|
|
|