First pass of the htmlarea form element for macfe, aka Ender. module owners dagley and brade ok'd.

This commit is contained in:
jfrancis%netscape.com 1998-08-05 12:36:53 +00:00
Родитель 8324d3af87
Коммит 6f3e59624e
5 изменённых файлов: 63 добавлений и 3 удалений

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

@ -19,6 +19,7 @@
#include "meditor.h" // HandleModalDialog
#include "StBlockingDialogHandler.h"
#include "CEditView.h"
#include "mforms.h" // CFormHTMLArea
#include "macgui.h" // UGraphics::MakeLOColor
#include "CPaneEnabler.h"
#include "resgui.h" // EDITDLG_AUTOSAVE
@ -167,9 +168,14 @@ void FE_EditorDocumentLoaded( MWContext *pContext )
return;
CEditView *editView = (CEditView *)ExtractHyperView(pContext);
CFormHTMLArea *editForm = dynamic_cast<CFormHTMLArea*>(editView);
int32 iSave;
if ( pContext->bIsComposeWindow )
if ( editForm != NULL) // are we an embedded composer form?
{
iSave = 0; // no auto-save
}
else if ( pContext->bIsComposeWindow )
{
iSave = 0; // auto-save
@ -202,7 +208,7 @@ void FE_EditorDocumentLoaded( MWContext *pContext )
editView->mEditorDoneLoading = true;
// set color popup control to show correct default color (now that we have an mwcontext)
editView->mColorPopup->InitializeCurrentColor();
if (editView->mColorPopup) editView->mColorPopup->InitializeCurrentColor();
}
InitCursor();

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

@ -44,6 +44,7 @@
#include "layers.h" // mjc
#include "prefapi.h"
#include "intl_csi.h"
#include "edt.h"
// PP
//#include <LTextSelection.h>
@ -728,6 +729,22 @@ Boolean CFormBigText::HandleKeyPress(const EventRecord& inKeyEvent)
return handled;
}
#pragma mark == CFormHTMLArea ==
//---------------------------------------------------------------------------
// class CFormHTMLArea
//---------------------------------------------------------------------------
CFormHTMLArea::CFormHTMLArea(LStream *inStream)
: CEditView(inStream),
LFormElement()
{
}
CFormHTMLArea::~CFormHTMLArea()
{
}
#pragma mark == CFormList ==
@ -2744,6 +2761,20 @@ FE_SelectInputElement( MWContext * window,
textEdit->SelectAll();
break;
#ifdef ENDER
// embedded composer - select all
case FORM_TYPE_HTMLAREA:
if ( !GetFEData( formElement ) )
return;
if ( !GetFEDataPane( formElement ) )
return;
LPane *scroller2 = GetFEDataPane(formElement);
CFormHTMLArea *htmlEdit = (CFormHTMLArea*) scroller2->FindPaneByID(formHTMLAreaID); Assert_(htmlEdit != NULL);
EDT_SelectAll(((LFormElement*)htmlEdit)->GetContext());
break;
#endif /*ENDER*/
/* These are not selectable
@ -2898,6 +2929,7 @@ FE_ClickInputElement( MWContext * window,
case FORM_TYPE_PASSWORD:
case FORM_TYPE_ISINDEX:
case FORM_TYPE_TEXTAREA:
case FORM_TYPE_HTMLAREA:
case FORM_TYPE_FILE:
case FORM_TYPE_SELECT_ONE:
case FORM_TYPE_SELECT_MULT:
@ -3153,6 +3185,9 @@ LFormElement::MochaChanged()
LO_FormElementData* data = fLayoutElement->lo_form.element_data;
if (data != NULL &&
(data->type == FORM_TYPE_TEXTAREA ||
#ifdef ENDER
data->type == FORM_TYPE_HTMLAREA ||
#endif /*ENDER*/
data->type == FORM_TYPE_TEXT ||
data->type == FORM_TYPE_PASSWORD) &&
(fLayoutElement->lo_form.event_handler_present || HasKeyEventCapture(fContext)))

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

@ -34,6 +34,7 @@
#include "CSimpleTextView.h" // For CFormBigText
//#include "VEditField.h"
#include "CTSMEditField.h"
#include "CEditView.h" // for CFormHTMLArea
#include "CKeyUpReceiver.h" // mixin for forms that need to receive key up events
@ -314,6 +315,22 @@ protected:
void DrawSelf();// Draws background to white
};
/*****************************************************************************
* class CFormHTMLArea
* Large edit html field.
*****************************************************************************/
class CFormHTMLArea : public CEditView, public LFormElement {
public:
enum { class_ID = 'fhtm' };
// ĽĽ Constructors/destructors
CFormHTMLArea(LStream *inStream);
virtual ~CFormHTMLArea();
};
/*****************************************************************************
* class CFormList
* List used in forms.

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

@ -870,9 +870,11 @@
#define formGAResetButton 4016
#define formGAPlainButton 4017
#define formBigTextScroll 4018
#define formHTMLArea 4019
#define formScrollingListID 'list' // ID of the subview that is the list withing the scroller
#define formBigTextID 'text' // ID of the subview that is the TEXT withing the scroller
#define formHTMLAreaID 'ehtm' // ID of the subview that is the HTML within the scroller
#define formPopupChosen 2003

Двоичные данные
cmd/macfe/rsrc/communicator/Forms.cnst

Двоичный файл не отображается.