From e391c9d62752eb7c94ffb26d2bdec6b9fde905fd Mon Sep 17 00:00:00 2001 From: rods Date: Mon, 15 Jun 1998 20:24:17 +0000 Subject: [PATCH] no longer derived nsWindow, it is truely a delegated helper --- widget/src/motif/nsTextHelper.cpp | 41 ++++++++++++++++--------------- widget/src/motif/nsTextHelper.h | 7 +++--- 2 files changed, 25 insertions(+), 23 deletions(-) diff --git a/widget/src/motif/nsTextHelper.cpp b/widget/src/motif/nsTextHelper.cpp index f303ba8a8fac..2e0a36814b08 100644 --- a/widget/src/motif/nsTextHelper.cpp +++ b/widget/src/motif/nsTextHelper.cpp @@ -27,6 +27,27 @@ #define DBG 0 +//------------------------------------------------------------------------- +// +// nsTextHelper constructor +// +//------------------------------------------------------------------------- + +nsTextHelper::nsTextHelper(Widget aWidget) +{ + mWidget = aWidget; + mIsReadOnly = PR_FALSE; + mIsPassword = PR_FALSE; +} + +//------------------------------------------------------------------------- +// +// nsTextHelper destructor +// +//------------------------------------------------------------------------- +nsTextHelper::~nsTextHelper() +{ +} //------------------------------------------------------------------------- void nsTextHelper::SetMaxTextLength(PRUint32 aChars) @@ -141,26 +162,6 @@ PRUint32 nsTextHelper::GetCaretPosition() return (PRUint32)XmTextGetInsertionPosition(mWidget); } -//------------------------------------------------------------------------- -// -// nsTextHelper constructor -// -//------------------------------------------------------------------------- - -nsTextHelper::nsTextHelper(nsISupports *aOuter) : nsWindow(aOuter) -{ - mIsReadOnly = PR_FALSE; - mIsPassword = PR_FALSE; -} - -//------------------------------------------------------------------------- -// -// nsTextHelper destructor -// -//------------------------------------------------------------------------- -nsTextHelper::~nsTextHelper() -{ -} //------------------------------------------------------------------------- PRBool nsTextHelper::AutoErase() diff --git a/widget/src/motif/nsTextHelper.h b/widget/src/motif/nsTextHelper.h index 481963dc156e..b565cacca52c 100644 --- a/widget/src/motif/nsTextHelper.h +++ b/widget/src/motif/nsTextHelper.h @@ -20,16 +20,17 @@ #include "nsITextWidget.h" #include "nsWindow.h" +#include /** * Base class for nsTextAreaWidget and nsTextWidget */ -class nsTextHelper : public nsWindow +class nsTextHelper { public: - nsTextHelper(nsISupports *aOuter); + nsTextHelper(Widget aWidget); virtual ~nsTextHelper(); virtual void SelectAll(); @@ -48,7 +49,7 @@ public: virtual PRBool AutoErase(); protected: - + Widget mWidget; PRBool mIsPassword; PRBool mIsReadOnly;