Move EClickState to Netscape_Constants

This commit is contained in:
pinkerton%netscape.com 1998-08-24 23:58:57 +00:00
parent bed4ed474f
commit 6657dfedfc
4 changed files with 11 additions and 26 deletions

View File

@ -194,7 +194,7 @@ Boolean CHTMLClickRecord::PixelReallyInElement(
}
//-----------------------------------
CHTMLClickRecord::EClickState CHTMLClickRecord::WaitForMouseAction(
EClickState CHTMLClickRecord::WaitForMouseAction(
const SMouseDownEvent& inMouseDown,
LAttachable* inAttachable,
Int32 inDelay,
@ -209,14 +209,14 @@ CHTMLClickRecord::EClickState CHTMLClickRecord::WaitForMouseAction(
CContextMenuAttachment::SExecuteParams params;
params.inMouseDown = &inMouseDown;
params.outResult = (CContextMenuAttachment::EClickState)eUndefined;
params.outResult = eMouseUndefined;
if (inExecuteContextMenuAttachment)
{
inAttachable->ExecuteAttachments(
CContextMenuAttachment::msg_ContextMenu,
(void*)&params);
}
if (params.outResult != eUndefined)
if (params.outResult != eMouseUndefined)
return (EClickState)params.outResult;
// ¥ The old way.
@ -227,7 +227,7 @@ CHTMLClickRecord::EClickState CHTMLClickRecord::WaitForMouseAction(
} // CHTMLClickRecord::WaitForMouseAction
//-----------------------------------
CHTMLClickRecord::EClickState CHTMLClickRecord::WaitForMouseAction(
EClickState CHTMLClickRecord::WaitForMouseAction(
const Point& inInitialPoint,
Int32 inWhen,
Int32 inDelay)
@ -246,8 +246,8 @@ CHTMLClickRecord::EClickState CHTMLClickRecord::WaitForMouseAction(
Point theCurrentPoint;
::GetMouse(&theCurrentPoint);
if ((abs(theCurrentPoint.h - inInitialPoint.h) >= eMouseHystersis) ||
(abs(theCurrentPoint.v - inInitialPoint.v) >= eMouseHystersis))
if ((abs(theCurrentPoint.h - inInitialPoint.h) >= kMouseHysteresis) ||
(abs(theCurrentPoint.v - inInitialPoint.v) >= kMouseHysteresis))
return eMouseDragging;
Int32 now = ::TickCount();

View File

@ -36,15 +36,6 @@ class CHTMLClickRecord
public:
enum EClickState {
eUndefined = 0,
eMouseHystersis = 6,
eMouseDragging = 1,
eMouseTimeout,
eMouseUpEarly,
eHandledByAttachment
};
CHTMLClickRecord(
Point inLocalWhere,
const SPoint32& inImageWhere,

View File

@ -41,7 +41,7 @@ CContextMenuAttachment::~CContextMenuAttachment()
} // CContextMenuAttachment::CContextMenuAttachment
//-----------------------------------
CContextMenuAttachment::EClickState CContextMenuAttachment::WaitMouseAction(
EClickState CContextMenuAttachment::WaitMouseAction(
const Point& inInitialPoint,
Int32 inWhen,
Int32 inDelay)
@ -61,8 +61,8 @@ CContextMenuAttachment::EClickState CContextMenuAttachment::WaitMouseAction(
{
Point theCurrentPoint;
::GetMouse(&theCurrentPoint);
if ((abs(theCurrentPoint.h - inInitialPoint.h) >= eMouseHysteresis) ||
(abs(theCurrentPoint.v - inInitialPoint.v) >= eMouseHysteresis))
if ((abs(theCurrentPoint.h - inInitialPoint.h) >= kMouseHysteresis) ||
(abs(theCurrentPoint.v - inInitialPoint.v) >= kMouseHysteresis))
return eMouseDragging;
Int32 now = ::TickCount();
if (abs( now - inWhen ) > inDelay)
@ -215,7 +215,7 @@ void CContextMenuAttachment::DoPopup(const SMouseDownEvent& inMouseDown, EClickS
whereGlobal.h - 5,
defaultItem);
mExecuteHost = false;
outResult = eHandledByAttachment;
outResult = eMouseHandledByAttachment;
// Restore the system font
::LMSetSysFontFam(saveFont);
::LMSetSysFontSize(saveSize);

View File

@ -21,6 +21,7 @@
#pragma once
#include <LAttachment.h>
#include "Netscape_Constants.h" // for EClickState
class LCommander;
struct SMouseDownEvent;
@ -50,13 +51,6 @@ public:
CContextMenuAttachment(LStream* inStream);
virtual ~CContextMenuAttachment();
enum EClickState {
eMouseHysteresis = 6
, eMouseDragging = 1
, eMouseTimeout
, eMouseUpEarly
, eHandledByAttachment
};
struct SExecuteParams
{
const SMouseDownEvent* inMouseDown;