CCamView Class Reference

This OIL class implements many window functions, such as scrolling and sizing the editing windows. As such, it acts as an intermediary between the kernel and the host operating system. It is derived from the wx class wxView, which provides comprehensive methods for managing the client area of a window. More...

#include <camview.h>

Inheritance diagram for CCamView:

ScreenView ScreenCamView List of all members.

Public Member Functions

 CCamView ()
 Default constructor for a CCamView window. Sets the pointers to the child windows to null, so that an incomplete construction of the view that is later destroyed won't try to delete invalid pointers. The Windows side of construction is done later, in the OnCreate() message handler.
virtual ~CCamView ()
 Destroys a CCamView window. Deletes child windows first. Updates the CCamView population counter.
virtual bool OnCreate (wxDocument *doc, long flags)
bool OnClose (bool deleteWindow=TRUE)
wxMDIChildFrame * GetParentFrame () const
CCamDocGetDocument () const
ViewStateGetViewState () const
ViewStateSetViewState (ViewState *pvs)
void SetViewStateFromThis () const
void SetThisFromViewState ()
BOOL IsTopmost () const
 Tests if this ScreenView is the active view, ie. is on top of all other views.
virtual CNativeDCGetRenderDC () const
virtual void AllocateDC () const
virtual void DoneWithDC () const
void GetClientSize (int *width, int *height) const
virtual void OnDraw (wxDC *pDc)
virtual BOOL OnPreparePrinting (CCPrintInfo *pInfo)
virtual void OnFilePrint ()
virtual void OnFilePrintPreview ()
CRenderWndGetRenderWindow () const
void InvalidateView (const OilRect *pRect=0, BOOL updatenow=FALSE)
void OnSize (wxSizeEvent &event)
 Resizes and repositions all child windows to fit the new size of the ScreenView. Updates the ViewState object with the size and position of the view, in an OS-independent manner. Resets the scroller's page and line size, and forces an immediate redraw of all affected windows.
void OnLButtonDown (wxMouseEvent &event)
 Called by MFC upon receipt of a left-button-down mouse message. Finds out which other buttons are down (eg. SHIFT) and passes the message on to the kernel. Note that the mouse message will have originally come from the RendWnd object, a child window of ScreenView.
void OnLButtonDblClk (wxMouseEvent &event)
 Passes a left-button double-click to CCamView::HandleDragEvent().
void OnLButtonUp (wxMouseEvent &event)
 Passes the event on to HandleButtonUp().
void OnMButtonDown (wxMouseEvent &event)
 Called by MFC upon receipt of a middle-button-down mouse message. Finds out which other buttons are down (eg. SHIFT) and passes the message on to the kernel. Note that the mouse message will have originally come from the RendWnd object, a child window of ScreenView.
void OnMButtonDblClk (wxMouseEvent &event)
 Passes a middle-button double-click to CCamView::HandleDragEvent().
void OnMButtonUp (wxMouseEvent &event)
 Passes the event on to HandleButtonUp().
void OnRButtonDown (wxMouseEvent &event)
 Same as for CCamView::OnLButtonDown(), but for the right mouse button.
void OnRButtonDblClk (wxMouseEvent &event)
 Same as CCamView::OnLButtonDblClk(), bit for the right button.
void OnRButtonUp (wxMouseEvent &event)
 Same as CCamView::OnLButtonUp(), but for the right mouse button.
void OnMouseMove (wxMouseEvent &event)
 Packages up OIL-layer mouse-move messages before passing them on to DocView::DragPointerMove(). If ScreenView is not in "drag mode" the event is passed to our DocView, which will forward it to the current tool. Otherwise, checks if a CLICKTYPE_DRAG message has been sent to the kernel, sending one if it hasn't (this smooths the difference between Windows and RISC OS, the former system providing little support for drag operations).
void OnMouseWheel (wxMouseEvent &event)
 Scope: Protected.
void OnScroll (wxScrollEvent &event)
 Handles all the scroll events.
void OnDragIdle (wxTimerEvent &event)
 Sends DragPointerIdle "events" to the kernel, when dragging. As Windows doesn't support such "idle" messages, the OIL drag system sets up a timer when a drag starts, and sends idle messages every time the timer elapses, until the drag is finished.
void OnSetCursor (wxSetCursorEvent &event)
 Eat the cursor update requests to stop anyone else playing with them, this is needed on MSW or the cursor reverts to the normal arrow.
bool OnDropFiles (wxCoord x, wxCoord y, const wxArrayString &filenames)
void SetWorkAreaExtent (const WorkRect &area, BOOL redraw=TRUE)
void GetScrollOffset (WorkCoord *pOffset) const
void SetScrollOffset (const WorkCoord &pos, BOOL redraw=TRUE)
void ShowScrollers (BOOL Show)
void ShowRulers (BOOL Show)
WorkRect GetMaxScrollRect () const
 Find the legal area in which scroll offsets can exist.
BOOL AreRulersVisible ()
BOOL AreScrollersVisible ()
 

MouseOverRulerHit IsMouseOverRuler ()
 

void RecaptureMouseOnNextUpdate (void)
BOOL StartDrag (Operation *pOp, DragType type, BOOL KeepAccuracy)
BOOL EndDrag (Operation *pOp)
BOOL ChangeDragType (DragType Type)
 Allows someone to change the type of a drag (eg have Auto Scrolling on in some situations, but not in others). This function is mostly called from the Kernel (DocView) version of the same function.
void ClearClickState ()
BOOL InvokeDragOp (String_256 *pOpToken, OpParam *pParam, UINT32 Flags, wxPoint point)
 This func provides a mechanism that allows a drag op to be invoked as if it has been started as a result of clicking in the view. This allows drag ops to be invoked that aren't associated to a given tool.
BOOL InvokeDragOp (String_256 *pOpToken, OpParam *pParam, ClickModifiers clickmods, wxPoint point)
BOOL IsWaitingMouseMove ()
BOOL GetCurrentMousePos (OilCoord *pMousePos) const
BOOL CreateDragTarget (DragInformation *DragInfo)
 will create drag targets for appropriate drags
DocViewGetDocViewPtr () const
BOOL IsSingleClickReallyTriple () const
BOOL IsSingleClickReallyQuad () const
void DontSkipNextMouse ()

Static Public Member Functions

static BOOL ReadViewPrefs ()
static DocViewGetDocViewFromWindow (wxWindow *pWindow)
 Given a window handle of a ScreenView render window, this function will return a pointer to the kernel DocView object that renders into that window, or NULL if there isn't one.
static void SetUseVisibleDefaults (BOOL state)
static BOOL GetUseVisibleDefaults ()
static BOOL GetDefaultRulersState ()
static BOOL GetDefaultScrollersState ()
static void SetDefaultRulersState (BOOL State)
static void SetDefaultScrollersState (BOOL State)
static void GetClickMods (wxMouseEvent &event, ClickModifiers *p)
 Helps convert an OIL-layer mouse event into a form acceptable to the kernel. Sets the fields of the ClickModifier according to which button is down/up, whether the SHIFT, CONTROL, or ALT key is held down etc. Note that as the fields of a ClickModifier are only one bit wide, we must be carefule when assigning the (integer) results of logical tests to them.
static DocViewGetDocViewFromWindowID (CWindowID WindowID)
 Given a window handle of a ScreenView render window, this function will return a pointer to the kernel DocView object that renders into that window, or NULL if there isn't one.

Static Public Attributes

static INT32 s_MouseMoveEliminationPeriod

Protected Member Functions

void GrabKernelAttention () const
void SetCurrentStates ()
virtual BOOL CreateNewDocView ()
virtual BOOL IsARalphView ()
LRESULT OnRenderView (WPARAM wp, LPARAM lp)
void ScrollTo (const WorkCoord &offset)
 Scroll the client area of the window to the specified position. The offset must be converted to OS coordinates before being passed to Windows. If the new position of the view does not overlap the old position then the client area is completely redrawn. Otherwise, the Windows USER module is called to scroll the window.
void ScrollBy (INT32 dx, INT32 dy)
 Scrolls the view by asking the DocView to do it so it can remove and replace blobs.
void HandleDragEvent (UINT32 Button, UINT32 nFlags, wxPoint point, ClickType t)
 Gathers together Windows information about a mouse event and passes it on to the kernel, by calling DocView::OnClick() HandleDragEvent needs to be called from OnTimer code so rather than synthesizing a wxMouseEvent object this function has been left taking non-wx params.
void HandleDragEvent (UINT32 Button, ClickModifiers clickmods, wxPoint point, ClickType t)
BOOL HandleMouseWheelEvent (wxMouseEvent &event)
void HandleDragScrolling (wxPoint point)
 Checks if the view window needs to be scrolled because the cursor has been dragged outside the window. The window will be scrolled if the current mode is AUTO_SCROLL (and the Scroll Lock key isn't latched!!). The scrolling itself is done by calling the routine in DocView, not ScreenView, so that the kernel has fair warning to remove any blobbies before the blit is done.
void CalcScrollDeltas (wxPoint point, WinRect wrSize, INT32 *dx, INT32 *dy)
 Calculates the scroll deltas due to the current mouse position being outside the allowed rectangle. Helper function.
void HandleButtonUp (UINT32 Button, wxMouseEvent &event)
 Finishes the current drag, if there is one, by elucidating the state of the buttons etc and calling DragDFinished() in the kernel (DocView). Called whenever a mouse button is released.
BOOL PrintPaper (wxDC *pPrintDC, CCPrintInfo *pPrintInfo, PrintControl *pPrintControl)
WinRect GetPrintClipRect (wxDC *pPrintDC, CCPrintInfo *pPrintInfo)
void EnumeratePagePatches (CCPrintInfo *pPrintInfo)
void UpdateViewPosition () const
virtual void OnInitialUpdate ()
virtual void OnUpdate (wxView *sender, wxObject *hint=(wxObject *) NULL)
virtual void OnActivateView (bool bActivate, wxView *pActiveView, wxView *pDeactiveView)

Static Protected Member Functions

static void wxPoint2Coord (const wxPoint &point, Coord *pcoord)
 Converts a wxPoint to a kernel Coord.
static void Coord2wxPoint (const Coord &coord, wxPoint *ppoint)
 Converts a kernel Coord to a wxPoint.
static void wxRect2Rect (const wxRect &rect, Rect *pkrect)
 Converts a wxRect into a kernel Rect.
static void Rect2wxRect (const Rect &krect, wxRect *prect)
 Converts a kernel Rect into a wxRect.

Protected Attributes

wxMDIChildFrame * m_pFrame
CRenderWndRenderWindow
CWinScrollerHScrollBar
CWinScrollerVScrollBar
CScrollerCornerCorner
OILHorizontalRulerHRuler
OILVerticalRulerVRuler
OriginGadgetOGadget
DocViewpDocView
PrintViewpPrintView
ViewStateStatus
BOOL fSetupDone
BOOL fInitialUpdate
BOOL fJustCreated
WinRect CurrentSize
WorkRect WorkArea
WorkCoord OldOffset
String_256 DragOpToken
OpParampDragOpParam
BOOL DragOpInvoke
MonotonicTime TimeOfLastClick
wxPoint LastDoubleClickPos
BOOL ThisSingleIsTriple
BOOL ThisDoubleIsQuad
wxTimer m_DragIdleTimer
MonotonicTime m_OLELastOutTime
BOOL DragKeepAccuracy
BOOL AutoScrollExcludeRulers
ClickType LastClickType
UINT32 LastClickButton
wxPoint LastClickPoint
wxPoint CurrentMousePos
ClickModifiers LastClickMods
UINT32 FirstClickButton
OperationpCurrentDragOp
DragType CurrentDragType
WinRect MouseClipRect
BOOL OLERecaptureMouse
INT32 m_LastMouseState
wxPoint m_LastMousePosition
INT32 m_LastMouseUsedTimestamp
BOOL m_CouldSkipNextMouse

Static Protected Attributes

static const INT32 WID_RENDERWINDOW = 1
static const INT32 WID_HSCROLLBAR = 2
static const INT32 WID_VSCROLLBAR = 3
static const INT32 WID_SIZECORNER = 4
static const INT32 WID_HRULER = 5
static const INT32 WID_VRULER = 6
static const INT32 WID_RULERORIGIN = 7
static const INT32 DragIdleID = 100
static INT32 PopCount
static ViewStatepReadyMadeViewState
static BOOL DefaultScrollersState
static BOOL DefaultRulersState
static BOOL UseVisibleDefaults
static INT32 DragLatency
static INT32 DragDelay
static MonotonicTime DragTimer
static INT32 ScrollBarSize

Detailed Description

This OIL class implements many window functions, such as scrolling and sizing the editing windows. As such, it acts as an intermediary between the kernel and the host operating system. It is derived from the wx class wxView, which provides comprehensive methods for managing the client area of a window.

Author:
Luke_Hart (Xara Group Ltd) <camelotdev@xara.com> H
Date:
01/07/05
On creation, a CCamView asks its Document to provide a pointer to the DocView that is to be associated with this object. Once that link has been made, any changes in the state of the CCamView, eg. the user maximises it, are passed on in a device-independent form to the DocView. This trick is done using a shared ViewState object.

Definition at line 157 of file camview.h.


Constructor & Destructor Documentation

CCamView::CCamView  ) 
 

Default constructor for a CCamView window. Sets the pointers to the child windows to null, so that an incomplete construction of the view that is later destroyed won't try to delete invalid pointers. The Windows side of construction is done later, in the OnCreate() message handler.

/

IMPLEMENT_DYNAMIC_CLASS( CCamView, wxView ) CC_IMPLEMENT_DYNAMIC( ViewDragTarget, OilDragTarget ) CC_IMPLEMENT_DYNCREATE( PageDropInfo, CCObject )

Declare smart memory handling in Debug builds define new CAM_DEBUG_NEW

This user preference controls how many pixels the mouse must move before a drag is initiated. INT32 CCamView::DragLatency = 3;

INT32 CCamView::s_MouseMoveEliminationPeriod = 0;

Used to start drags after user has clicked but not moved mouse for n milliseconds. INT32 CCamView::DragDelay = 500; MonotonicTime CCamView::DragTimer;

INT32 CCamView::PopCount = 0; ViewState* CCamView::pReadyMadeViewState = NULL; BOOL CCamView::DefaultScrollersState = TRUE; BOOL CCamView::DefaultRulersState = FALSE; BOOL CCamView::UseVisibleDefaults = TRUE;

Default to a nonsense size. Will be fixed up in OnSize INT32 CCamView::ScrollBarSize = 1;

BEGIN_EVENT_TABLE( CCamView, wxView ) EVT_SIZE(CCamView::OnSize) EVT_SCROLL(CCamView::OnScroll) EVT_TIMER(DragIdleID, CCamView::OnDragIdle) END_EVENT_TABLE()

/*!

Author:
Justin_Flude (Xara Group Ltd) <camelotdev@xara.com>
Date:
ages ago
Parameters:
- [INPUTS]
- [OUTPUTS]
Returns:
-
Updates the CCamView population counter. Called from somewhere deep inside MFC.
Returns:
Errors: - Scope: Protected.
See also:
CCamView::OnCreate(); CCamView::~CCamView()

Definition at line 189 of file camview.cpp.

00190 {
00191     TRACEUSER("Gerry", _T("Creating CCamView at 0x%08x\n"), this);
00192 
00193     // No child windows or connections yet.
00194     pDocView = NULL;
00195     pPrintView = NULL;
00196 
00197     // Create a ViewState object to maintain device-independent information.
00198     Status = new ViewState;
00199 
00200     RenderWindow = NULL;
00201     HScrollBar = NULL;
00202     VScrollBar = NULL;
00203     Corner = NULL;
00204     HRuler = NULL;
00205     VRuler = NULL;
00206     OGadget= NULL;
00207 
00208     // Set/clear these internal flags.
00209     fSetupDone = FALSE;
00210     fInitialUpdate = FALSE;
00211 
00212     // Not dragging or scrolling either.
00213     pCurrentDragOp = NULL;
00214 
00215     OLERecaptureMouse = FALSE;
00216 
00217     // Set up click event variables
00218     LastClickType = CLICKTYPE_NONE;
00219     LastClickButton = 0;
00220     LastClickPoint.x = 0;
00221     LastClickPoint.y = 0;
00222     CurrentMousePos.x = 0;
00223     CurrentMousePos.y = 0;
00224     FirstClickButton = 0;
00225     DragKeepAccuracy = TRUE;
00226     AutoScrollExcludeRulers = FALSE;
00227     
00228     // Bump the population.
00229     PopCount++;
00230 
00231     // Vars used by InvokeDragOp() mechanism
00232     DragOpToken = "";
00233     pDragOpParam = NULL;
00234     DragOpInvoke = FALSE;
00235 
00236     // Set up the drag idle timer
00237     m_DragIdleTimer.SetOwner(this, DragIdleID);
00238 
00239     // Triple and quad click support
00240     LastDoubleClickPos = wxPoint( 0, 0 );
00241     ThisSingleIsTriple = FALSE;
00242     ThisDoubleIsQuad = FALSE;
00243 
00244     // Set this flag until we have been through OnActivateView once, after which we can
00245     // include this view in the eat-activating-click system.
00246     fJustCreated = TRUE;
00247 
00248     // Mouse move handling
00249     m_LastMouseState=0;
00250     m_LastMousePosition=wxDefaultPosition;
00251     m_LastMouseUsedTimestamp=0;
00252     m_CouldSkipNextMouse=FALSE;
00253 
00254     OldOffset = WorkCoord(0, 0); // need to initialize it to something
00255 }

CCamView::~CCamView  )  [virtual]
 

Destroys a CCamView window. Deletes child windows first. Updates the CCamView population counter.

Author:
Justin_Flude (Xara Group Ltd) <camelotdev@xara.com>
Date:
ages ago
Parameters:
- [INPUTS]
- [OUTPUTS]
Returns:
-

Errors: - Scope: Public

See also:
CCamView::CCamView()

Definition at line 273 of file camview.cpp.

00274 {
00275     TRACEUSER("Gerry", _T("Deleting CCamView at 0x%08x\n"), this);
00276 
00277     PopCount--;         // one less ScreenView in the world, sigh
00278 
00279     if(pDocView != NULL)
00280         delete pDocView;
00281     
00282     if(Status != NULL)
00283         delete Status;
00284 
00285     pDocView = NULL;
00286     Status = NULL;
00287 
00288     // We shouldn't have a print view here!
00289     if (pPrintView != NULL)
00290     {
00291         ERROR3("CCamView is dying when it still has a PrintView attached!");
00292         delete pPrintView;
00293     }
00294 }


Member Function Documentation

virtual void CCamView::AllocateDC  )  const [virtual]
 

BOOL CCamView::AreRulersVisible  ) 
 

Reimplemented in ScreenView.

BOOL CCamView::AreScrollersVisible  ) 
 

Author:
Chris_Snook (Xara Group Ltd) <camelotdev@xara.com>
Date:
ages ago
Parameters:
- [INPUTS]
- [OUTPUTS]
Returns:
Scroller Visible state.

Errors: - Scope: Public

Reimplemented in ScreenView.

Definition at line 2793 of file camview.cpp.

02794 { 
02795     if(Status)
02796         return Status->ScrollersVisible;
02797     return FALSE;       
02798 }

void CCamView::CalcScrollDeltas wxPoint  point,
WinRect  wrSize,
INT32 *  dx,
INT32 *  dy
[protected]
 

Calculates the scroll deltas due to the current mouse position being outside the allowed rectangle. Helper function.

Author:
Phil_Martin (Xara Group Ltd) <camelotdev@xara.com> (from Justin)
Date:
22/9/96
Parameters:
point The current position of the mouse cursor. [INPUTS] wrSize The rectangle controlling scrolling.
dx The amount to scroll in the X axis. [OUTPUTS] dy The amount to scroll in the Y axis.
Returns:
-

Errors: - Scope: Protected

See also:
CCamView::HandleDragScrolling

Reimplemented in ScreenView.

Definition at line 4908 of file camview.cpp.

04909 {
04910     if( point.x < wrSize.GetLeft() )
04911         *dx = max(point.x - wrSize.GetLeft(), -ScrollBarSize);
04912     else if( point.x >= wrSize.GetRight() )
04913         *dx = min(point.x - wrSize.GetRight(), ScrollBarSize);
04914     else
04915         *dx = 0;
04916 
04917     if( point.y < wrSize.GetTop() )
04918         *dy = max(point.y - wrSize.GetTop(), -ScrollBarSize);
04919     else if( point.y >= wrSize.GetBottom() )
04920         *dy = min(point.y - wrSize.GetBottom(), ScrollBarSize);
04921     else
04922         *dy = 0;
04923 }

BOOL CCamView::ChangeDragType DragType  Type  ) 
 

Allows someone to change the type of a drag (eg have Auto Scrolling on in some situations, but not in others). This function is mostly called from the Kernel (DocView) version of the same function.

Author:
Rik_Heywood (Xara Group Ltd) <camelotdev@xara.com>
Date:
3/4/95
Parameters:
Type - the type of drag to change to [INPUTS]
Returns:
TRUE
See also:
DocView::ChangeDragType

Reimplemented in ScreenView.

Definition at line 4723 of file camview.cpp.

04724 {
04725     // Change the current drag type
04726     CurrentDragType = Type;
04727     m_OLELastOutTime.Sample();
04728     OLERecaptureMouse = FALSE;
04729 
04730     return TRUE;
04731 }

void CCamView::ClearClickState  ) 
 

Reimplemented in ScreenView.

void CCamView::Coord2wxPoint const Coord coord,
wxPoint *  ppoint
[static, protected]
 

Converts a kernel Coord to a wxPoint.

Author:
Justin_Flude (Xara Group Ltd) <camelotdev@xara.com>
Date:
7/4/94
Parameters:
- [INPUTS]
- [OUTPUTS]
Returns:
-

Errors: -

See also:
-

Definition at line 4044 of file camview.cpp.

04045 {
04046     ppoint->x = (INT32) coord.x;
04047     ppoint->y = (INT32) coord.y;
04048 }

BOOL CCamView::CreateDragTarget DragInformation DragInfo  ) 
 

will create drag targets for appropriate drags

Author:
Chris_Parks (Xara Group Ltd) <camelotdev@xara.com>
Date:
21/1/95
Parameters:
DragInfo : details about the current drag [INPUTS]
- [OUTPUTS]
Returns:
Errors: -

Reimplemented in ScreenView.

Definition at line 5107 of file camview.cpp.

05108 {
05109 #if !defined(EXCLUDE_FROM_RALPH)
05110     // TEMPORARY - only create drag targets for the selected (frontmost/input-focus)
05111     // DocView. This stops us allowing colour drags to go into the wrong document
05112     // if the user ctrl-tabs to a different window during the drag.
05113     // Ideally, drags will be allowed, but the colour will be copied to the destination
05114     // document before being applied, but currently we don't have time to implement all that
05115     if (pDocView != DocView::GetSelected())
05116         return FALSE;
05117 
05118     if (DragInfo->CanDropOnPage())
05119     {
05120         // If the drag can be dropped onto an object or the page, then we will accept it
05121         ViewDragTarget * NewTarget;
05122         NewTarget = new ViewDragTarget(RenderWindow,NULL,DragInfo);
05123         return TRUE;
05124     }
05125 #endif
05126     return FALSE;
05127 }

virtual BOOL CCamView::CreateNewDocView  )  [protected, virtual]
 

virtual void CCamView::DoneWithDC  )  const [virtual]
 

void CCamView::DontSkipNextMouse  )  [inline]
 

Definition at line 409 of file camview.h.

BOOL CCamView::EndDrag Operation pOp  ) 
 

Reimplemented in ScreenView.

void CCamView::EnumeratePagePatches CCPrintInfo pPrintInfo  )  [protected]
 

Reimplemented in ScreenView.

void CCamView::GetClickMods wxMouseEvent &  event,
ClickModifiers p
[static]
 

Helps convert an OIL-layer mouse event into a form acceptable to the kernel. Sets the fields of the ClickModifier according to which button is down/up, whether the SHIFT, CONTROL, or ALT key is held down etc. Note that as the fields of a ClickModifier are only one bit wide, we must be carefule when assigning the (integer) results of logical tests to them.

Author:
Justin_Flude (Xara Group Ltd) <camelotdev@xara.com>
Date:
ages ago
Parameters:
The mouse event passed by wx to a mouse message-handler function. [INPUTS]
Changes the ClickModifier to reflect the button flags. [OUTPUTS]
Returns:
-

Errors: - Scope: Public

See also:
CCamView::HandleDragEvent()

Reimplemented in ScreenView.

Definition at line 4883 of file camview.cpp.

04884 {
04885     *p = ClickModifiers::GetClickModifiers(event);
04886 }

void CCamView::GetClientSize int *  width,
int *  height
const
 

Reimplemented in ScreenView.

BOOL CCamView::GetCurrentMousePos OilCoord pMousePos  )  const
 

Reimplemented in ScreenView.

static BOOL CCamView::GetDefaultRulersState  )  [inline, static]
 

Reimplemented in ScreenView.

Definition at line 271 of file camview.h.

00271 { return DefaultRulersState;};

static BOOL CCamView::GetDefaultScrollersState  )  [inline, static]
 

Reimplemented in ScreenView.

Definition at line 272 of file camview.h.

00272 { return DefaultScrollersState;};

CCamDoc* CCamView::GetDocument  )  const
 

DocView * CCamView::GetDocViewFromWindow wxWindow *  pWindow  )  [static]
 

Given a window handle of a ScreenView render window, this function will return a pointer to the kernel DocView object that renders into that window, or NULL if there isn't one.

Author:
Justin_Flude (Xara Group Ltd) <camelotdev@xara.com>
Date:
28/7/94
Parameters:
The handle of the render window to find. [INPUTS]
- [OUTPUTS]
Returns:
A pointer to the DocView associated with a render window, or NULL if there isn't one.

Errors: -

See also:
-

Definition at line 5047 of file camview.cpp.

05048 {
05049     // For all kernel documents in existence . . .
05050     List* pDocList = &(GetApplication()->Documents);
05051     for (Document* pKernelDoc = (Document*) pDocList->GetHead();
05052          pKernelDoc != NULL;
05053          pKernelDoc = (Document*) pDocList->GetNext(pKernelDoc))
05054     {
05055         if (pKernelDoc->IsARalphDoc())
05056         {
05057             // a bit unpleasent - only works because Ralph Docs have only one view..
05058             // get the first (and only) docview
05059             DocView * pDocView = pKernelDoc->GetFirstDocView();
05060             // check handles
05061             if (pDocView)
05062                 if( pDocView->GetRenderWindow() == pWindow )
05063                     return pDocView;
05064         }
05065         else
05066         {
05067              // Convert from a kernel document to an OIL document.
05068             CCamDoc* pCamDoc = pKernelDoc->GetOilDoc();
05069 
05070             wxNode *node = pCamDoc->GetViews().GetFirst();
05071             while (node)
05072             {
05073                 // Compare the handle of the view's render window to the given handle,
05074                 // returning the associated DocView if they match.
05075                 CCamView* pCamView = (CCamView*) node->GetData();
05076 
05077                 // Not interested unless it is a ScreenView (it could be a print preview view)
05078 //              if (pCamView->IsKindOf(RUNTIME_CLASS(CCamView)))
05079 //              {
05080                     if (pCamView->GetRenderWindow() == pWindow)
05081                     {
05082                         return pCamView->pDocView;
05083                     }
05084 //              }
05085                 node = node->GetNext();
05086             }
05087         }
05088     } 
05089 
05090     // Couldn't find the handle, so return nothing.
05091     return NULL;
05092 }   

DocView * CCamView::GetDocViewFromWindowID CWindowID  WindowID  )  [static]
 

Given a window handle of a ScreenView render window, this function will return a pointer to the kernel DocView object that renders into that window, or NULL if there isn't one.

Author:
Justin_Flude (Xara Group Ltd) <camelotdev@xara.com>
Date:
28/7/94
Parameters:
The handle of the render window to find. [INPUTS]
- [OUTPUTS]
Returns:
A pointer to the DocView associated with a render window, or NULL if there isn't one.

Errors: -

See also:
-

Reimplemented in ScreenView.

Definition at line 5146 of file camview.cpp.

05147 {
05148     // For all kernel documents in existence . . .
05149     List* pDocList = &(GetApplication()->Documents);
05150     for (Document* pKernelDoc = (Document*) pDocList->GetHead();
05151          pKernelDoc != NULL;
05152          pKernelDoc = (Document*) pDocList->GetNext(pKernelDoc))
05153     {
05154 
05155         DocView * pDocView = pKernelDoc->GetFirstDocView();
05156         
05157         while (pDocView)
05158         {
05159             if ( pDocView->GetRenderWindow() == WindowID )
05160                 return pDocView;
05161             pDocView = pKernelDoc->GetNextDocView(pDocView);
05162         }
05163     } 
05164 
05165     // Couldn't find the handle, so return nothing.
05166     return NULL;
05167 }   

DocView* CCamView::GetDocViewPtr  )  const [inline]
 

Reimplemented in ScreenView.

Definition at line 317 of file camview.h.

00318     {
00319         return pDocView;
00320     }

WorkRect CCamView::GetMaxScrollRect  )  const
 

Find the legal area in which scroll offsets can exist.

Author:
Phil_Martin (Xara Group Ltd) <camelotdev@xara.com>
Date:
31/May/2006
Parameters:
- [INPUTS]
- [OUTPUTS]
Returns:
WorkRect describing legal area for scroll offsets

Errors: -

See also:
-

Definition at line 4987 of file camview.cpp.

04988 {
04989     WorkRect wrScrollRect = Status->WorkAreaExtent;
04990 
04991     FIXED16 PixelWidth, PixelHeight;
04992     pDocView->GetPixelSize(&PixelWidth, &PixelHeight);
04993 
04994     WorkCoord WindowSize;
04995     WindowSize.x = CurrentSize.GetWidth() * PixelWidth;
04996     WindowSize.y = CurrentSize.GetHeight() * PixelHeight;
04997 
04998     if (WindowSize.x > wrScrollRect.hi.x)       // If window wider than document
04999         wrScrollRect.hi.x = wrScrollRect.lo.x;  // no horz scrolling is possible
05000     else
05001         wrScrollRect.hi.x -= WindowSize.x;      // Restrict scrollable area to ensure view never sees outside workarea
05002 
05003     if (WindowSize.y < wrScrollRect.lo.y)       // If window wider than document
05004         wrScrollRect.lo.y = wrScrollRect.hi.y;  // no vert scrolling is possible
05005     else
05006         wrScrollRect.lo.y += WindowSize.y;      // Restrict scrollable area to ensure view never sees outside workarea
05007 
05008     return wrScrollRect;
05009 }

wxMDIChildFrame* CCamView::GetParentFrame  )  const [inline]
 

Definition at line 170 of file camview.h.

00171     {
00172         return m_pFrame;
00173     }

WinRect CCamView::GetPrintClipRect wxDC *  pPrintDC,
CCPrintInfo pPrintInfo
[protected]
 

Reimplemented in ScreenView.

virtual CNativeDC* CCamView::GetRenderDC  )  const [virtual]
 

Reimplemented in ScreenView.

CRenderWnd* CCamView::GetRenderWindow  )  const [inline]
 

Reimplemented in ScreenView.

Definition at line 222 of file camview.h.

00222 { return(RenderWindow); }

void CCamView::GetScrollOffset WorkCoord pOffset  )  const
 

Reimplemented in ScreenView.

static BOOL CCamView::GetUseVisibleDefaults  )  [inline, static]
 

Reimplemented in ScreenView.

Definition at line 270 of file camview.h.

00270 { return UseVisibleDefaults;};

ViewState* CCamView::GetViewState  )  const
 

void CCamView::GrabKernelAttention  )  const [protected]
 

void CCamView::HandleButtonUp UINT32  Button,
wxMouseEvent &  event
[protected]
 

Finishes the current drag, if there is one, by elucidating the state of the buttons etc and calling DragDFinished() in the kernel (DocView). Called whenever a mouse button is released.

Author:
Justin_Flude (Xara Group Ltd) <camelotdev@xara.com>
Date:
9th Sept 1993
Parameters:
Button - which mouse button has been released. [INPUTS] nFlags - The mouse button flags. point - the coordinate of the mouse cursor.
- [OUTPUTS]
Returns:
-

Errors: - Scope: Private

See also:
CCamView::GetClickMods(); CCamView::OnLButtonDown(); CCamView::OnRButtonDown() DocView::OnClick()

Reimplemented in ScreenView.

Definition at line 4437 of file camview.cpp.

04438 {
04439     //Graham 18/6/96: Changed the logical conditions of this function
04440     //to support clicks with one mouse button while another button is
04441     //dragging
04442     
04443     if (DocView::GetSelected() != pDocView)
04444     {
04445         ENSURE(pCurrentDragOp == NULL, "Drag operation in a view that isn't 'selected' !!");
04446 //      TRACEUSER( "JustinF", _T("Ignored button-up cos not in the selected view\n"));
04447         return;
04448     }
04449 
04450     // Set Current states...
04451     SetCurrentStates();
04452 
04453     //Graham: Here's the change - in the logical conditions only. The actual
04454     //functions called are the same.
04455 
04456     WinCoord            point;
04457     event.GetPosition( &point.x, &point.y );
04458 
04459     //Was the button that went up the first one that went down?
04460     if (Button==FirstClickButton)
04461     {
04462         //Yes it was.
04463         //Is there a drag currently running?
04464         if (pCurrentDragOp != NULL)
04465         {
04466             // Yes there is.
04467             // Release the capture and terminate the drag.  Note that we try to release
04468             // the mouse capture as soon as possible after a drag has finished, in case the
04469             // DragFinished method below brings up a dialog box or something.
04470             if (GetRenderWindow() && GetRenderWindow()->GetCapture()==GetRenderWindow())
04471                 GetRenderWindow()->ReleaseMouse();
04472             pDocView->DragFinished(pCurrentDragOp, ((WinCoord*) &point)->ToOil(pDocView, TRUE), 
04473                                LastClickMods, TRUE);
04474 
04475 
04476             // Now cater for the special case that the user used the PushCentreTool Click Modifier
04477             // and they didn't move the mouse - this means they either wanted to Centre the
04478             // view about the cursor, ZoomIn() or ZoomOut() depending on the modifiers....
04479             if ((LastClickPoint == CurrentMousePos) && LastClickMods.PushCentreTool)
04480             {
04481                 // Did we want to ZoomIn()?
04482                 if( event.ControlDown() )
04483                 {
04484                     OpZoom* pZoomOp = new OpZoom;
04485                     ERROR3IF(!pZoomOp,"Couldn't create pZoomOp");
04486 
04487                     // Find the mid-point of the view, in work coordinates...
04488                     WorkRect wrView = pDocView->GetViewRect();
04489                     WorkCoord wcMidView((wrView.lo.x + wrView.hi.x) / 2, (wrView.lo.y + wrView.hi.y) / 2);
04490 
04491                     pZoomOp->ZoomIn(wcMidView);
04492                 }
04493                 // Did we want to ZoomOut()?
04494                 else if( event.ShiftDown() )
04495                 {
04496                     OpZoom* pZoomOp = new OpZoom;
04497                     ERROR3IF(!pZoomOp,"Couldn't create pZoomOp");
04498 
04499                     // Find the mid-point of the view, in work coordinates...
04500                     WorkRect wrView = pDocView->GetViewRect();
04501                     WorkCoord wcMidView((wrView.lo.x + wrView.hi.x) / 2, (wrView.lo.y + wrView.hi.y) / 2);
04502 
04503                     pZoomOp->ZoomOut(wcMidView);
04504                 }
04505                 else
04506                 {
04507                     // Then we must have wanted to centre the screen about the cursor...
04508 
04509                     DocCoord MousePos;
04510                     Spread *pSpread = Document::GetSelectedSpread();
04511                     if(!DocView::GetCurrentMousePos(&pSpread, &MousePos))
04512                     {
04513                         return;
04514                     }
04515 
04516 
04517                     WorkCoord testwork(MousePos.ToWork(pSpread, pDocView));
04518 
04519 
04520                     // Find out where the middle of the current view is...
04521                     DocRect ViewRect = (pDocView->GetDocViewRect(pSpread)).ToSpread(pSpread, pDocView);
04522                     DocCoord ViewMidPoint(0,0);
04523                     ViewMidPoint.x = INT32(ViewRect.lo.x + (ViewRect.hi.x - ViewRect.lo.x)/2.0);
04524                     ViewMidPoint.y = INT32(ViewRect.lo.y - (ViewRect.lo.y - ViewRect.hi.y)/2.0);
04525 
04526                     // Work out what the offset between the centre of the screen and the MousePos is...
04527                     DocCoord Offset = MousePos - ViewMidPoint;
04528 
04529                     WorkCoord ScrollOffset;
04530                     WorkCoord WorkOffset;
04531 
04532                     WorkOffset.x = (XLONG) (MakeXLong(Offset.x) * pDocView->GetViewScale());
04533                     WorkOffset.y = (XLONG) (MakeXLong(Offset.y) * pDocView->GetViewScale());
04534 
04535                     ScrollOffset = pDocView->GetScrollOffsets();
04536                     ScrollOffset.x = ScrollOffset.x + WorkOffset.x;
04537                     ScrollOffset.y = ScrollOffset.y + WorkOffset.y;
04538 
04539                     if (ScrollOffset.x < (XLONG) 0) ScrollOffset.x = (XLONG) 0;
04540                     if (ScrollOffset.y > (XLONG) 0) ScrollOffset.y = (XLONG) 0;
04541 
04542                     // Scroll the screen to centre about the cursor!
04543                     pDocView->SetScrollOffsets(ScrollOffset, TRUE);
04544                 }
04545             }
04546         }
04547         else
04548         {
04549             // No there isn't.
04550             // Kill the timer started in HandleDragEvent(), 
04551             // as we don't want to wait for a drag anymore.
04552             m_DragIdleTimer.Stop();
04553 
04554             FirstClickButton = 0;
04555 
04556             //Then pass the Up-Click message to CCamView::OnClick
04557             pDocView->OnClick(((WinCoord*) &point)->ToOil(pDocView, TRUE), CLICKTYPE_UP, LastClickMods);
04558         }
04559     }
04560     else
04561     {
04562         //No, the button that went up was not the first one to go down.
04563         //In that case, we expect the first button that went down is still down and
04564         //hence there is a drag running.
04565         //Is there a drag running?
04566         if (pCurrentDragOp != NULL)
04567         {
04568             //Yes, as expected.
04569             //Pass the Up-Click message to CCamView::OnClick
04570             pDocView->OnClick(((WinCoord*) &point)->ToOil(pDocView, TRUE), CLICKTYPE_UP, LastClickMods);
04571         }
04572         //If not, something odd has happened - perhaps the user has clicked fast
04573         //with the mouse. This need not worry us but we should not do anything
04574         //with the up-click message.
04575         //The only problem that could occur is if we are in a button-up-drag. This
04576         //is handled below.
04577         
04578     }
04579 
04580     //Ensure there is not a button-up drag in progress
04581     //That is, there is a drag in progress AND no buttons down
04582 //  ERROR3IF((Operation::GetCurrentDragOp()==NULL)&&(nFlags & ~(MK_SHIFT | MK_CONTROL) == 0),
04583 //      "CCamView::HandleButtonUp - drag operation in progress but no buttons down");
04584 }

void CCamView::HandleDragEvent UINT32  Button,
ClickModifiers  clickmods,
wxPoint  point,
ClickType  t
[protected]
 

Definition at line 4147 of file camview.cpp.

04148 {
04149     if (DocView::GetSelected() != pDocView)
04150     {
04151 //      TRACEUSER( "JustinF", _T("Ignored drag-event cos not in the selected view\n"));
04152         // If selected doc is null, let's select it anyway.
04153         if (DocView::GetSelected() == NULL)
04154         {
04155             // We're in a weird state that should never happen but does - a document
04156             // has the focus, but isn't selected
04157             Document* pKDoc =NULL;
04158             if(pDocView)
04159                 pKDoc = pDocView->GetDoc();
04160 
04161             if (pKDoc)
04162             {
04163                 Document::SetSelectedViewAndSpread(pKDoc, pDocView, NULL);
04164             }
04165             
04166         }
04167         return; 
04168     }
04169 
04170     SetCurrentStates();
04171 
04172     // Find out which buttons etc are down.
04173     LastClickMods = clickmods;
04174 
04175     // If it's the first single click, then reset the drag delay timer, and ask for a 
04176     // Windows timer.
04177     if (((t == CLICKTYPE_SINGLE) || (t == CLICKTYPE_DOUBLE)) && 
04178         (FirstClickButton == 0))
04179     {
04180         // Remember this event.
04181         LastClickPoint = point;
04182         LastClickType = t;
04183         LastClickButton = Button;
04184         FirstClickButton = Button;
04185         DragTimer.Sample();
04186 
04187 #if (_OLE_VER >= 0x200)
04188         // The user's doing something so don't update any container docs
04189         CCamDoc::ResetContainerUpdateTimer();
04190 #endif
04191 
04192         // Ask the system for a timer.
04193         // The timer is used to generate DragPointerIdle events, which are not directly
04194         // supported by Windows.
04195         UINT32 rate = 100;
04196 PORTNOTE("other","Removed reading of keyboard autorepeat rate")
04197 #ifndef EXCLUDE_FROM_XARALX
04198         ::SystemParametersInfo(SPI_GETKEYBOARDSPEED, 0, &rate, 0);
04199 #endif
04200 
04201         m_DragIdleTimer.Start(rate);
04202     }
04203 
04204     if (DragOpInvoke)
04205     {
04206         OpDescriptor* pOpDesc = OpDescriptor::FindOpDescriptor(DragOpToken);
04207 
04208         ERROR3IF_PF(pOpDesc == NULL,("FindOpDescriptor(%s) failed",(TCHAR*)DragOpToken));
04209 
04210         if (pOpDesc != NULL)
04211             pOpDesc->Invoke(pDragOpParam);
04212 
04213         // Reset the vars ready for the next call to InvokeDragOp()
04214         DragOpInvoke = FALSE;
04215         pDragOpParam = NULL;
04216     }
04217     else
04218     {
04219         // Convert the click position to OIL coordinates before passing to the kernel.
04220         //  pDocView->SetCurrent();
04221         WinCoord wpoint(point.x, point.y);
04222         pDocView->OnClick( ( (WinCoord *)&point )->ToOil(pDocView, TRUE), t, LastClickMods);
04223     }
04224 }                                                             

void CCamView::HandleDragEvent UINT32  Button,
UINT32  nFlags,
wxPoint  point,
ClickType  t
[protected]
 

Gathers together Windows information about a mouse event and passes it on to the kernel, by calling DocView::OnClick() HandleDragEvent needs to be called from OnTimer code so rather than synthesizing a wxMouseEvent object this function has been left taking non-wx params.

Technical notes (by Tim):

The Button is parameter is necessary, because sometimes when we get the *first* button down event, nFlags has more than one mouse button bit set. This only happens when you rampantly click buttons very quickly but nevertheless we *do* need to know which button was pressed, otherwise we never release the drag event and we end up with button-up-drag city.

I assume this is due to some latency in Windows, e.g., it gets a button down event, and while preparing it goes and reads the mouse button state and meanwhile another button has been pressed so we get a button down event with nFlags indicating more than one button is down.

Definition at line 4139 of file camview.cpp.

04140 {
04141     // Find out which buttons etc are down.
04142     ClickModifiers clickmods = ClickModifiers::GetClickModifiers(nFlags);
04143 
04144     HandleDragEvent(Button, clickmods, point, t);
04145 }

void CCamView::HandleDragScrolling wxPoint  point  )  [protected]
 

Checks if the view window needs to be scrolled because the cursor has been dragged outside the window. The window will be scrolled if the current mode is AUTO_SCROLL (and the Scroll Lock key isn't latched!!). The scrolling itself is done by calling the routine in DocView, not ScreenView, so that the kernel has fair warning to remove any blobbies before the blit is done.

Author:
Justin_Flude (Xara Group Ltd) <camelotdev@xara.com>
Date:
20th Sept 1993
Parameters:
The current position of the mouse cursor. [INPUTS]
- [OUTPUTS]
Returns:
-
Called when ScreenView receives mouse-move messages and timer ("mouse-idle") messages. Also handles DEFERRED_SCROLLING.
Returns:
Errors: - Scope: Private
See also:
CCamView::OnMouseMove; CCamView::OnTimer

Reimplemented in ScreenView.

Definition at line 4756 of file camview.cpp.

04757 {
04758     // First we check for the type that does nothing and get out quick
04759     if (CurrentDragType == DRAGTYPE_NOSCROLL)
04760         return;
04761 
04762     // Get the size of the view.  We may have to deflate the rectangle a little here, if the
04763     // bottom-right edges of the view coincide with the bottom-right edges of the screen,
04764     // otherwise it is not possible to auto-scroll to the right or down as the mouse never
04765     // leaves the view window.
04766 
04767     WinRect wrSize = CurrentSize;
04768 //  TRACEUSER("Gerry", _T("wrSize = (%d, %d) [%d, %d]\n"), wrSize.x, wrSize.y, wrSize.width, wrSize.height);
04769 //  TRACEUSER("Gerry", _T("Point = (%d, %d)\n"), point.x, point.y);
04770     point = GetRenderWindow()->ClientToScreen( point );
04771     point = GetFrame()->ScreenToClient( point );
04772 
04773 //  TRACEUSER("Gerry", _T("AdjPoint = (%d, %d)\n"), point.x, point.y);
04774     
04775     // This is used to allow guidelines to be deleted by dropping on to the rulers - normally
04776     // we would start to auto scroll at this point which is a little off putting..
04777     if (AutoScrollExcludeRulers && CurrentDragType != DRAGTYPE_OLESCROLL)
04778     {
04779         UINT32 RulerWidth = OILRuler::GetWidth();
04780 //      wrSize.left -= RulerWidth;
04781 //      wrSize.top -= RulerWidth;
04782         wrSize.SetLeft(wrSize.GetLeft()-RulerWidth);
04783         wrSize.SetTop(wrSize.GetTop()-RulerWidth);
04784     }
04785 
04786     // Now check for deferred scrolling
04787     if (CurrentDragType == DRAGTYPE_DEFERSCROLL)
04788     {
04789         // If the mouse is within the window, and we are performing deferred-scrolling
04790         // then we can change over to auto-scrolling.
04791         if (!wrSize.IsEmpty() && wrSize.Inside(point))
04792         {
04793             CurrentDragType = DRAGTYPE_AUTOSCROLL;
04794             AutoScrollExcludeRulers = TRUE;
04795         }
04796         return;
04797     }
04798 
04799     // Initialise Deltas...
04800     INT32 dx = 0;
04801     INT32 dy = 0;
04802 
04803     WinRect Outer = wrSize;
04804 
04805     // Set auto-scroll region to be one scrollbar width within the current view
04806     // (as per The Windows Interface Guidelines Chapter 5).
04807     wrSize.Inflate(-ScrollBarSize,-ScrollBarSize);
04808 
04809     // Has the mouse moved outside there bounds?
04810     if (!wrSize.IsEmpty() && !wrSize.Inside(point))
04811     {
04812         BOOL bCalcDeltas = TRUE;
04813 #if !defined(EXCLUDE_FROM_XARALX)
04814         if (CurrentDragType == DRAGTYPE_OLESCROLL)
04815         {
04816             if (Outer.Inside(point))        // and still inside visible window
04817             {
04818                 // If we've not been in the OLE scroll region for long enough
04819                 if (!m_OLELastOutTime.Elapsed(100))
04820                 {
04821                     bCalcDeltas = FALSE;
04822                 }
04823             }
04824             else
04825             {
04826                 // We've dragged beyond the OLE scroll area, so we can now convert the drag
04827                 // into an OLE export drag if we so desire.
04828                 HandleOleDragOutOfView(point);
04829                 bCalcDeltas = FALSE;
04830             }
04831         }
04832 #endif
04833         if (bCalcDeltas)
04834         {
04835             // The mouse is outside the view, and we have to scroll the view
04836             // proportionate to how far outside it is.
04837             CalcScrollDeltas(point,wrSize,&dx,&dy);
04838             TRACEUSER("Gerry", _T("ScrollDeltas = (%d, %d)\n"), dx, dy);
04839         }
04840     }
04841 #if !defined(EXCLUDE_FROM_XARALX)
04842     else if (CurrentDragType == DRAGTYPE_OLESCROLL)
04843     {
04844         // We're not in the OLE scroll region so reset the timer
04845         m_OLELastOutTime.Sample();
04846     }
04847 #endif
04848 
04849     //------------------------------------
04850     // Now do the scroll if necessary...
04851     // If dx<>0 or dy<>0 and scroll lock is disabled
04852 
04853     // Test if the SCROLL LOCK key has been set.
04854     if( !wxGetKeyState( CAMKEY(SCROLL) ) && !(dx==0 && dy==0))
04855     {
04856         // Set Current states...
04857         SetCurrentStates();
04858 
04859         // Do the scroll
04860         ScrollBy(dx, dy);
04861     }
04862 }

BOOL CCamView::HandleMouseWheelEvent wxMouseEvent &  event  )  [protected]
 

Reimplemented in ScreenView.

Definition at line 4239 of file camview.cpp.

04240 {
04241     // Reasons Why This Is Done As It Is...
04242     // ************************************
04243     //
04244     // The WM_MOUSEWHEEL message is only ever sent to the window with focus. Galleries
04245     // never have the focus, even though they show they have (their windows are highlighted)
04246     // as this is done using rendering onto a blank window (as is their grey-ing out)
04247     // As a result of this, a Gallery is never sent a WM_MOUSEWHEEL message.
04248     // We therefore need to trap the message (here is as good a place as any) and check if the
04249     // user was actually over a gallery...
04250     // Finding out if they are over a Gallery SHOULD have been quite easy (eg WindowFromPoint())
04251     // EXCEPT that we don't create the Galleries in any sensible manner, thus they aren't
04252     // children of the current window - they are children of the Program Manager - sensible...
04253     // So, when we ask for the appropriate HWND it returns a nonsense value... Anyhow, the
04254     // following code gets around this and gives us the real HWND of the Gallery underneath the
04255     // mouse, OR returns NULL if no bar was found.
04256     // In the case where we get the Gallery HWND, we dispatch a message to scroll up/down according
04257     // to mousewheel delta. In the case where we have no HWND we check if the mouse lies within the
04258     // currently selected view and if it does, then scroll appropriately.
04259     // If anyone can see an easier way, then let me know!!!
04260     // Matt 1/11/00
04261 
04262     INT32 zDelta = event.GetWheelRotation();
04263     INT32 zStep = event.GetWheelDelta();
04264 
04265     PORTNOTETRACE("other","CCamView::HandleMouseWheelEvent - removed gallery bits");
04266 #ifndef EXCLUDE_FROM_XARALX
04267     // We need to know if the mouse pointer is over a Gallery, and if it is what the
04268     // HWND of that Gallery is, so that I can send it a scroll message...
04269     HWND OverBar = GetMainFrame()->IsScreenPointInBar(pt);
04270 
04271     if (OverBar)
04272     {
04273         if (zDelta < 0)
04274         {
04275             BROADCAST_TO_CLASS(DialogMsg(OverBar, DIM_MOUSEWHEEL_DOWN, 256), DialogOp);
04276         }
04277         else
04278         {
04279             BROADCAST_TO_CLASS(DialogMsg(OverBar, DIM_MOUSEWHEEL_UP, 256), DialogOp);
04280         }
04281     }
04282     else
04283 #endif
04284     {
04285         //Preliminary Checks...
04286         if (DocView::GetSelected() != pDocView)
04287         {
04288             // If selected doc is null, let's select it anyway.
04289             if (DocView::GetSelected() == NULL)
04290             {
04291                 // We're in a weird state that should never happen but does - a document
04292                 // has the focus, but isn't selected
04293                 Document* pKDoc =NULL;
04294                 if(pDocView)
04295                 {
04296                     pKDoc = pDocView->GetDoc();
04297                 }
04298 
04299                 if (pKDoc)
04300                 {
04301                     Document::SetSelectedViewAndSpread(pKDoc, pDocView, NULL);
04302                 }
04303             
04304             }
04305             return FALSE;   
04306         }
04307 
04308         SetCurrentStates();
04309 
04310         // We now need to work out if the Mouse is currently over part of the document - if it isn't
04311         // then we should ignore the message and let something else handle it...
04312         Spread* pSpread = Document::GetSelectedSpread();
04313         if (pSpread == NULL)    {   return FALSE;   }
04314 
04315         DocCoord MousePos;
04316         if(!DocView::GetCurrentMousePos(&pSpread, &MousePos))
04317         {
04318             return FALSE;
04319         }
04320 
04321 
04322 #if (_OLE_VER >= 0x200)
04323         // The user's doing something so don't update any container docs
04324         CCamDoc::ResetContainerUpdateTimer();
04325 #endif
04326 
04327         //If the user is holding down CTRL whilst scrolling the wheel, then we should do the standard zoom-in/out
04328         if (event.ControlDown())
04329         {
04330 //          TRACEUSER( "Matt", _T("MouseWheel + CTRL = Zoom, in ScreenView\n"));
04331 
04332             // Try to create an instance of the zoom operation.
04333             OpZoom* pZoomOp = new OpZoom;
04334             if (pZoomOp == NULL)
04335             {
04336                 // We ran out of memory, so sorry.
04337                 InformError(_R(IDE_NOMORE_MEMORY));
04338                 return FALSE;
04339             }
04340 
04341             DocCoord DocMouse = MousePos.ToDoc(pSpread, pDocView);
04342             WorkCoord WorkMouse;
04343             WorkMouse = DocMouse.ToWork(pSpread, pDocView);
04344 
04345             // Get the current view's scaling factor as a rounded precentage.
04346             INT32 nOldScalePercent = ((pDocView->GetViewScale() * 100) + FIXED16_DBL(0.5)).MakeInt();
04347 
04348             // Zoom in or out around the mouse position...
04349             if (zDelta > 0)
04350             {
04351                 // Search backwards until we find a higher zoom, or the end of the table
04352                 for (INT32 i = cZoomTableSize - 1; i >= 0; i--)
04353                 {
04354                     // Found a higher zoom?  If so, set it, remember it's position and return.
04355                     if (nOldScalePercent < pZoomOp->GetPresetZoomPercent(i))
04356                     {
04357                         // Do the zoom.  We will (optionally) end the operation.
04358                         pDocView->SetZoomTableIndex(i);
04359                         pZoomOp->MouseWheelZoomAtPoint(WorkMouse, pZoomOp->GetPresetZoomScale(i), FALSE);
04360                         break;
04361                     }
04362                 }
04363             }
04364             else
04365             {
04366                 // Search forwards through the zoom table until we find a lower zoom factor
04367                 for (INT32 i = 0; i < cZoomTableSize; i++)
04368                 {
04369                     // Found a lower zoom?  If so, set it, remember it's position in the zoom table
04370                     if (nOldScalePercent > pZoomOp->GetPresetZoomPercent(i))
04371                     {
04372                         // Do the zoom.  We will (optionally) end the operation.
04373                         pDocView->SetZoomTableIndex(i);
04374                         pZoomOp->MouseWheelZoomAtPoint(WorkMouse, pZoomOp->GetPresetZoomScale(i), FALSE);
04375                         break;
04376                     }
04377                 }
04378             }
04379 
04380             // Tidy away...
04381             delete pZoomOp;
04382 
04383             return TRUE;
04384         }
04385         else
04386         {
04387             // The CTRL key was not pressed, so we should simply (is anything simple around here)
04388             // scroll the viewport up/down. (OR left/right if SHIFT is held down - Matt 16/11/2000)
04389 
04390             if (event.ShiftDown())
04391             {
04392                 // Get the current Horizontal Scroll Position, increment it by a zoom-dependent amount
04393                 // and set the Horizontal Scroll Position to be this value, flagging it to redraw...
04394                 ScrollBy(-(zDelta/zStep) * 20, 0);
04395             }
04396             else
04397             {
04398                 // Get the current Vertical Scroll Position, increment it by a zoom-dependent amount
04399                 // and set the Vertical Scroll Position to be this value, flagging it to redraw...
04400                 ScrollBy(0, -(zDelta/zStep) * 20);
04401             }
04402 
04403             // NOTE : If we wanted to be really flash, we could make the scroll distance affected by the
04404             // user's settings in the Control Panel - ie, default is to scroll 3 lines on 120 zDelta, but
04405             // can be adjusted so we could look at that value...
04406         }
04407         // tell everyone we've changed the screen
04408         BROADCAST_TO_ALL(ScreenChangeMsg());
04409     }
04410 
04411     // If we get to here, then we must have handled the MouseWheel, so return true...
04412     return TRUE;
04413 }

void CCamView::InvalidateView const OilRect pRect = 0,
BOOL  updatenow = FALSE
 

Reimplemented in ScreenView.

BOOL CCamView::InvokeDragOp String_256 pOpToken,
OpParam pParam,
ClickModifiers  clickmods,
wxPoint  point
 

Definition at line 4688 of file camview.cpp.

04689 {
04690     DragOpToken  = *pOpToken;
04691     pDragOpParam = pParam;
04692     DragOpInvoke = TRUE;
04693 
04694     // NOTE: May need to post a pseudo mouse event here if some of the subtleties of click
04695     // handling are required, but this works fine for simple drags
04696     HandleDragEvent(MK_LBUTTON, clickmods, point, CLICKTYPE_SINGLE);
04697 
04698     return TRUE;
04699 }

BOOL CCamView::InvokeDragOp String_256 pOpToken,
OpParam pParam,
UINT32  Flags,
wxPoint  point
 

This func provides a mechanism that allows a drag op to be invoked as if it has been started as a result of clicking in the view. This allows drag ops to be invoked that aren't associated to a given tool.

Author:
Mark_Neves (Xara Group Ltd) <camelotdev@xara.com>
Date:
21/9/95
Parameters:
OpToken = Op token of op to invoke [INPUTS] pParam = ptr to a param block that's passed to the op NOTE! Object at *pParam must have a long life time. I.e. do NOT call this func with ptr to a local OpParam var Flags = flags that specify which modifiers were down during the click clickmods = Kernel abstraction of modifiers point = screen coord of the start of the drag
- [OUTPUTS]
Returns:
Returns TRUE if successful. Returns FALSE if not
This allows a drag op to be started directly, instead of being a result of a tool handling the click. This allows you to write drag ops in the usual way.

If pParam is NULL, the op's Do() function will be called. If pParam != NULL, the op's DoWithParam(pParam) func will be called. Either way, Operation::StartDrag() should be called as a result.

It was introduced to allow the rulers to create guidelines undoably, no matter what tool you are in. See winoil.cpp & kernel.cpp & OpGuideLine

Returns:
Errors: - Scope: -
See also:
-

Reimplemented in ScreenView.

Definition at line 4675 of file camview.cpp.

04676 {
04677     DragOpToken  = *pOpToken;
04678     pDragOpParam = pParam;
04679     DragOpInvoke = TRUE;
04680 
04681     // NOTE: May need to post a pseudo mouse event here if some of the subtleties of click
04682     // handling are required, but this works fine for simple drags
04683     HandleDragEvent(MK_LBUTTON, Flags, point, CLICKTYPE_SINGLE);
04684 
04685     return TRUE;
04686 }

virtual BOOL CCamView::IsARalphView  )  [inline, protected, virtual]
 

Definition at line 185 of file camview.h.

00185 { return FALSE;};

MouseOverRulerHit CCamView::IsMouseOverRuler  ) 
 

Author:
Chris_Snook (Xara Group Ltd) <camelotdev@xara.com>
Date:
1/10/95
Parameters:
- [INPUTS]
- [OUTPUTS]
Returns:
enum MouseOverRulerHit can be OVER_NO_RULERS, OVER_HORIZONTAL, OVER_VERTICAL, OVER_ORIGIN_GADGET.

Errors: - Scope: Public

Reimplemented in ScreenView.

Definition at line 2818 of file camview.cpp.

02819 { 
02820 #if !defined(EXCLUDE_FROM_RALPH)
02821     // check that we have some rulers
02822     if (!HRuler||!VRuler||!OGadget)
02823         return OVER_NO_RULERS;
02824 
02825     // Find the window the pointer is over
02826     wxWindow* pWindow = ::wxChildWindowFromPoint(::wxGetMousePosition(), false, -1);
02827 
02828     // check the HWND against the rulers
02829     if (pWindow == (wxWindow*)HRuler)
02830         return OVER_HORIZONTAL;
02831     else if (pWindow == (wxWindow*)VRuler)
02832         return OVER_VERTICAL;
02833     else if (pWindow == (wxWindow*)OGadget)
02834         return OVER_ORIGIN_GADGET;
02835 #endif
02836 
02837     return OVER_NO_RULERS;      
02838  };

BOOL CCamView::IsSingleClickReallyQuad  )  const [inline]
 

Reimplemented in ScreenView.

Definition at line 343 of file camview.h.

00343 {return ThisDoubleIsQuad;}

BOOL CCamView::IsSingleClickReallyTriple  )  const [inline]
 

Reimplemented in ScreenView.

Definition at line 342 of file camview.h.

00342 {return ThisSingleIsTriple;}

BOOL CCamView::IsTopmost  )  const
 

Tests if this ScreenView is the active view, ie. is on top of all other views.

Author:
Justin_Flude (Xara Group Ltd) <camelotdev@xara.com>
Date:
17/11/93
Parameters:
- [INPUTS]
- [OUTPUTS]
Returns:
TRUE if this view is the active view.

Errors: -

See also:
-

Reimplemented in ScreenView.

Definition at line 5025 of file camview.cpp.

05026 {
05027     return( wxGetApp().CCamApp::GetDocumentManager()->GetCurrentView() == this );
05028 }

BOOL CCamView::IsWaitingMouseMove  ) 
 

Reimplemented in ScreenView.

virtual void CCamView::OnActivateView bool  bActivate,
wxView *  pActiveView,
wxView *  pDeactiveView
[protected, virtual]
 

Reimplemented in ScreenView.

bool CCamView::OnClose bool  deleteWindow = TRUE  ) 
 

virtual bool CCamView::OnCreate wxDocument *  doc,
long  flags
[virtual]
 

Reimplemented in ScreenCamView.

void CCamView::OnDragIdle wxTimerEvent &  event  ) 
 

Sends DragPointerIdle "events" to the kernel, when dragging. As Windows doesn't support such "idle" messages, the OIL drag system sets up a timer when a drag starts, and sends idle messages every time the timer elapses, until the drag is finished.

Author:
Justin_Flude (Xara Group Ltd) <camelotdev@xara.com>
Date:
ages ago
Parameters:
The elapsed timer's numeric identifier (not used). [INPUTS]
- [OUTPUTS]
Returns:
-

Errors: - Scope: Protected

See also:
CCamView::HandleDragEvent(); DocView::DragPointerMove(); CCamView::GetClickMods();

Definition at line 3849 of file camview.cpp.

03850 {
03851     DontSkipNextMouse();
03852     // Ignore if system is disabled
03853     if (CCamApp::IsDisabled())
03854         return;                             // If the system is disabled, ignore
03855 
03856     // This window should never get a timer event that does not occur between calls to
03857     // StartDrag() and EndDrag().
03858 //  ENSURE(pCurrentDragOp != 0, "CCamView::StartDrag: pCurrentDragOp is null");
03859 
03860     // Find out which keys/buttons are being held down at the moment.  The mouse buttons
03861     // are more difficult, as they may have been swapped.
03862     UINT32 nFlags = ClickModifiers::SynthesizeMouseEventFlags();
03863 
03864     SetCurrentStates();
03865 
03866     if (pCurrentDragOp == NULL)
03867     {
03868         // We are not dragging at the moment, so check for a time-out condition to 
03869         // start a drag:
03870         // If a mouse button is down, and the timer has expired, then start a drag.
03871         if (LastClickType!=CLICKTYPE_NONE
03872             && (nFlags & (MK_LBUTTON|MK_MBUTTON|MK_RBUTTON))
03873             && DragTimer.Elapsed(DragDelay)
03874             && GetCurrentMousePos(NULL)
03875             )
03876         {
03877             // Inform the kernel that a drag is starting.
03878             HandleDragEvent(FirstClickButton, nFlags, LastClickPoint, CLICKTYPE_DRAG);
03879         }
03880     }
03881     else
03882     {
03883         // If we're doing an OLE drag and drop operation, then our DragOperation is still
03884         // active, but we have lost the Mouse Capture, so we should not update anything.
03885         // If the user drags back into our view window, the OLE drag will be shut down
03886         // and we will be given back our mouse capture so we can continue as if nothing
03887         // had happened. This just stops us scrolling while the OLE system is in charge!
03888         if (GetRenderWindow()->GetCapture() == GetRenderWindow())
03889         {
03890             WorkCoord OldScrollOffset;
03891             GetScrollOffset(&OldScrollOffset);
03892 
03893             // Check if we need to scroll the screen . . .
03894             HandleDragScrolling(CurrentMousePos);
03895 
03896             // We need to know if we have scrolled
03897             WorkCoord NewScrollOffset;
03898             GetScrollOffset(&NewScrollOffset);
03899             BOOL bScrolled = (NewScrollOffset.x != OldScrollOffset.x) || (NewScrollOffset.y != OldScrollOffset.y);
03900 
03901             // The above call may have aborted the current DragOp, so we must check if it is NULL
03902             if (pCurrentDragOp != NULL)
03903             {
03904                 // Now "fake" a mouse event for the kernel . . .
03905                 LastClickMods = ClickModifiers::GetClickModifiers(nFlags);
03906                 OilCoord CurDragOilPoint = ((WinCoord*)&CurrentMousePos)->ToOil(pDocView, TRUE);
03907                 if (bScrolled)
03908                 {
03909 //                  TRACEUSER("Gerry", _T("DragMove (%d, %d)\n"), (INT32)CurDragOilPoint.x, (INT32)CurDragOilPoint.y);
03910                     pDocView->DragPointerMove(pCurrentDragOp, CurDragOilPoint, LastClickMods);
03911                 }
03912                 else
03913                 {
03914 //                  TRACEUSER("Gerry", _T("DragIdle (%d, %d)\n"), (INT32)CurDragOilPoint.x, (INT32)CurDragOilPoint.y);
03915                     pDocView->DragPointerIdle(pCurrentDragOp, CurDragOilPoint, LastClickMods);
03916                 }
03917             }
03918         }
03919         else
03920         {
03921             // We don't own the capture - but if the user was OLE dragging and has dragged back into our
03922             // view window, then the OLE drag will have been cancelled, and we need to recapture the
03923             // mouse so that we can continue processing the drag as if nothing happened. Our OLE DropSource
03924             // will set our OLERecaptureMouse flag if it cancels itself and wishes us to continue...
03925             if (OLERecaptureMouse)
03926             {
03927                 GetRenderWindow()->CaptureMouse();
03928                 OLERecaptureMouse = FALSE;      // Only capture it back once!
03929             }
03930         }
03931     }
03932 }

virtual void CCamView::OnDraw wxDC *  pDc  )  [virtual]
 

Reimplemented in ScreenView.

bool CCamView::OnDropFiles wxCoord  x,
wxCoord  y,
const wxArrayString &  filenames
 

Definition at line 5170 of file camview.cpp.

05171 {
05172     // Set the correct docivew (and hence document)
05173     pDocView->SetCurrent();
05174 
05175     // Create the drop info object
05176     FileDropInfo DropInfo(WinCoord(x, y));
05177     List* pList = DropInfo.GetFileList();
05178 
05179     size_t Index;
05180     for (Index = 0; Index < filenames.GetCount(); Index++)
05181     {
05182         wxString TempStr(filenames[Index]);
05183 
05184         // A bit of a nasty hack here to work around a bug in wxWidgets
05185         // Filenames with multibyte characters are not correctly decoded
05186         // into the wxString so it still contains multi-byte sequences
05187         // We will check if all the chars are single byte and if so,
05188         // force it into a char buffer and convert using wxConvFileName
05189         // This should mean that this code will not interfere if someone
05190         // fixes wxWidgets
05191         UINT32 i = 0;
05192         while (TempStr[i] != 0 && (TempStr[i] & 0xFF) == TempStr[i])
05193             i++;
05194 
05195         if (TempStr[i] == 0)
05196         {
05197             // All the chars are bytes so try sticking them into a char array 
05198             // and converting them with wxConvFileName
05199             char* pBuf = (char*)CCMalloc(i + 1);
05200             if (pBuf)
05201             {
05202                 i = 0;
05203                 while (TempStr[i] != 0)
05204                 {
05205                     pBuf[i] = (char)(TempStr[i] & 0xFF);
05206                     i++;
05207                 }
05208                 pBuf[i] = 0;
05209 
05210                 TempStr = wxConvFileName->cMB2WX(pBuf);
05211                 CCFree(pBuf);
05212             }
05213         }
05214 
05215         String_256 Str(TempStr);
05216 
05217         StringListItem* pItem = new StringListItem(Str);
05218         if (pItem)
05219             pList->AddTail(pItem);
05220     }
05221 
05222     // Invoke the dropped files operation
05223     OpDescriptor *pOpDesc = OpDescriptor::FindOpDescriptor(OPTOKEN_DROPPEDFILE);
05224     if (pOpDesc)
05225         pOpDesc->Invoke((OpParam *) &DropInfo);
05226 
05227     return(true);
05228 }

virtual void CCamView::OnFilePrint  )  [virtual]
 

Reimplemented in ScreenView.

virtual void CCamView::OnFilePrintPreview  )  [virtual]
 

Reimplemented in ScreenView.

virtual void CCamView::OnInitialUpdate  )  [protected, virtual]
 

Reimplemented in ScreenView.

void CCamView::OnLButtonDblClk wxMouseEvent &  event  ) 
 

Passes a left-button double-click to CCamView::HandleDragEvent().

Author:
Justin_Flude (Xara Group Ltd) <camelotdev@xara.com>
Date:
ages ago
Parameters:
Flags describing which buttons & keys were down when the message was sent; [INPUTS] the coordinates of the mouse cursor.
- [OUTPUTS]
Returns:
-

Errors: - Scope: Protected

See also:
class CRendWnd; CCamView::HandleDragEvent()

Reimplemented in ScreenView.

Definition at line 3120 of file camview.cpp.

03121 {
03122     DontSkipNextMouse();
03123     // If the event is not from the RenderWindow then skip it
03124     INT32 nID = event.GetId();
03125     if (nID != WID_RENDERWINDOW)
03126     {
03127 //      TRACEUSER("Gerry", _T("Ignoring mouse event in window %d\n"), nID);
03128         event.Skip();
03129         return;
03130     }
03131 
03132     wxPoint point = event.GetPosition();
03133     UINT32 nFlags = ClickModifiers::SynthesizeMouseEventFlags(event);
03134 
03135     // Support quad clicks
03136     wxRect ClickBounds( LastDoubleClickPos.x-LocalEnvironment::GetXMouseDoubleClickMove(),
03137                         LastDoubleClickPos.y-LocalEnvironment::GetYMouseDoubleClickMove(),
03138                         LastDoubleClickPos.x+LocalEnvironment::GetXMouseDoubleClickMove(),
03139                         LastDoubleClickPos.y+LocalEnvironment::GetYMouseDoubleClickMove());
03140     MonotonicTime ThisClickTime( event.GetTimestamp() );
03141     MonotonicTime ClickGap(LocalEnvironment::GetMouseDoubleClickDelay());
03142     // Is click within allowed movement rectangle and permitted time delay
03143     INT32 TimeDelay = (ThisClickTime - TimeOfLastClick);
03144     if (ClickBounds.Inside( point ) && (TimeDelay <= (INT32)ClickGap))
03145         ThisDoubleIsQuad = TRUE;
03146     else
03147         ThisDoubleIsQuad = FALSE;
03148 
03149     HandleDragEvent(MK_LBUTTON, nFlags, point, CLICKTYPE_DOUBLE);
03150 
03151     TimeOfLastClick.Sample();
03152     LastDoubleClickPos = point;
03153 }

void CCamView::OnLButtonDown wxMouseEvent &  event  ) 
 

Called by MFC upon receipt of a left-button-down mouse message. Finds out which other buttons are down (eg. SHIFT) and passes the message on to the kernel. Note that the mouse message will have originally come from the RendWnd object, a child window of ScreenView.

Author:
Justin_Flude (Xara Group Ltd) <camelotdev@xara.com>
Date:
ages ago
Parameters:
Flags describing which buttons & keys were down when the message was sent; [INPUTS] the coordinates of the mouse cursor.
- [OUTPUTS]
Returns:
-

Errors: - Scope: Protected

See also:
class CRendWnd; CCamView::HandleDragEvent()

Reimplemented in ScreenView.

Definition at line 2862 of file camview.cpp.

02863 {
02864     DontSkipNextMouse();
02865     // If the event is not from the RenderWindow then skip it
02866 //TRACEUSER("Phil", _T("OnLButtonDown\n"));
02867     INT32 nID = event.GetId();
02868     if (nID != WID_RENDERWINDOW)
02869     {
02870 //      TRACEUSER("Gerry", _T("Ignoring mouse event in window %d\n"), nID);
02871         event.Skip();
02872         return;
02873     }
02874 
02875     wxPoint point = event.GetPosition();
02876     UINT32 nFlags = ClickModifiers::SynthesizeMouseEventFlags(event);
02877 
02878 #if !defined(EXCLUDE_FROM_RALPH) && !defined(EXCLUDE_FROM_XARALX)
02879 // WEBSTER - markn 25/4/97
02880 // No pen stuff required in Webster
02881 // Taken out by vector stroking code Neville 2/10/97
02882 #ifdef VECTOR_STROKING
02883     // Setup pressure if pen active
02884     (Camelot.GetPressurePen())->CheckMouseMessage(WM_LBUTTONDOWN, point);
02885 #endif // VECTOR_STROKING
02886 #endif
02887 
02888     // Support triple clicks
02889     wxRect ClickBounds( LastDoubleClickPos.x - LocalEnvironment::GetXMouseDoubleClickMove(),
02890                         LastDoubleClickPos.y - LocalEnvironment::GetYMouseDoubleClickMove(),
02891                         LocalEnvironment::GetXMouseDoubleClickMove() * 2,
02892                         LocalEnvironment::GetYMouseDoubleClickMove() * 2 );
02893     
02894     MonotonicTime ThisClickTime( event.GetTimestamp() );
02895     MonotonicTime ClickGap(LocalEnvironment::GetMouseDoubleClickDelay());
02896 
02897     // Is click within allowed movement rectangle and permitted time delay
02898     INT32 TimeDelay = (ThisClickTime - TimeOfLastClick);
02899     if( ClickBounds.Inside( point ) && ( TimeDelay <= (INT32)ClickGap ) )
02900         ThisSingleIsTriple = TRUE;
02901     else
02902         ThisSingleIsTriple = FALSE;
02903 
02904     // Deal with the click
02905     HandleDragEvent( MK_LBUTTON, nFlags, point, CLICKTYPE_SINGLE );
02906 
02907     TimeOfLastClick.Sample();
02908 }

void CCamView::OnLButtonUp wxMouseEvent &  event  ) 
 

Passes the event on to HandleButtonUp().

Author:
Justin_Flude (Xara Group Ltd) <camelotdev@xara.com>
Date:
ages ago
Parameters:
Flags describing which buttons & keys were down when the message was sent; [INPUTS] the coordinates of the mouse cursor
- [OUTPUTS]
Returns:
-

Errors: - Scope: Protected

See also:
class CRendWnd; CCamView::OnLButtonDown(); CCamView::GetClickMods(); DocView::DragFinished(); CCamView::HandleButtonUp()

Reimplemented in ScreenView.

Definition at line 3015 of file camview.cpp.

03016 {
03017     DontSkipNextMouse();
03018     // If the event is not from the RenderWindow then skip it
03019 //TRACEUSER("Phil", _T("OnLButtonUp\n"));
03020     INT32 nID = event.GetId();
03021     if (nID != WID_RENDERWINDOW)
03022     {
03023 //      TRACEUSER("Gerry", _T("Ignoring mouse event in window %d\n"), nID);
03024         event.Skip();
03025         return;
03026     }
03027 
03028     HandleButtonUp(MK_LBUTTON, event);
03029 }

void CCamView::OnMButtonDblClk wxMouseEvent &  event  ) 
 

Passes a middle-button double-click to CCamView::HandleDragEvent().

Author:
Justin_Flude (Xara Group Ltd) <camelotdev@xara.com>
Date:
ages ago
Parameters:
Flags describing which buttons & keys were down when the message was sent; [INPUTS] the coordinates of the mouse cursor.
- [OUTPUTS]
Returns:
-

Errors: - Scope: Protected

See also:
class CRendWnd; CCamView::HandleDragEvent()

Reimplemented in ScreenView.

Definition at line 3174 of file camview.cpp.

03175 {
03176     DontSkipNextMouse();
03177     // If the event is not from the RenderWindow then skip it
03178     INT32 nID = event.GetId();
03179     if (nID != WID_RENDERWINDOW)
03180     {
03181 //      TRACEUSER("Gerry", _T("Ignoring mouse event in window %d\n"), nID);
03182         event.Skip();
03183         return;
03184     }
03185 
03186     wxPoint point = event.GetPosition();
03187     UINT32 nFlags = ClickModifiers::SynthesizeMouseEventFlags(event);
03188 
03189     HandleDragEvent(MK_MBUTTON, nFlags, point, CLICKTYPE_DOUBLE);
03190 }

void CCamView::OnMButtonDown wxMouseEvent &  event  ) 
 

Called by MFC upon receipt of a middle-button-down mouse message. Finds out which other buttons are down (eg. SHIFT) and passes the message on to the kernel. Note that the mouse message will have originally come from the RendWnd object, a child window of ScreenView.

Author:
Justin_Flude (Xara Group Ltd) <camelotdev@xara.com>
Date:
ages ago
Parameters:
Flags describing which buttons & keys were down when the message was sent; [INPUTS] the coordinates of the mouse cursor.
- [OUTPUTS]
Returns:
-

Errors: - Scope: Protected

See also:
class CRendWnd; CCamView::HandleDragEvent()

Reimplemented in ScreenView.

Definition at line 2929 of file camview.cpp.

02930 {
02931     DontSkipNextMouse();
02932     // If the event is not from the RenderWindow then skip it
02933     INT32 nID = event.GetId();
02934     if (nID != WID_RENDERWINDOW)
02935     {
02936 //      TRACEUSER("Gerry", _T("Ignoring mouse event in window %d\n"), nID);
02937         event.Skip();
02938         return;
02939     }
02940 
02941     wxPoint point = event.GetPosition();
02942     UINT32 nFlags = ClickModifiers::SynthesizeMouseEventFlags(event);
02943 
02944 #if !defined(EXCLUDE_FROM_RALPH) && !defined(EXCLUDE_FROM_XARALX)
02945 // WEBSTER - markn 25/4/97
02946 // No pen stuff required in Webster
02947 // Taken out by vector stroking code Neville 2/10/97
02948 #ifdef VECTOR_STROKING
02949     (Camelot.GetPressurePen())->CheckMouseMessage(WM_MBUTTONDOWN, point);
02950 #endif // VECTOR_STROKING
02951 #endif
02952     HandleDragEvent(MK_MBUTTON, nFlags, point, CLICKTYPE_SINGLE);
02953 }

void CCamView::OnMButtonUp wxMouseEvent &  event  ) 
 

Passes the event on to HandleButtonUp().

Author:
Justin_Flude (Xara Group Ltd) <camelotdev@xara.com>
Date:
ages ago
Parameters:
Flags describing which buttons & keys were down when the message was sent; [INPUTS] the coordinates of the mouse cursor.
- [OUTPUTS]
Returns:
-

Errors: - Scope: Protected

See also:
class CRendWnd; CCamView::OnMButtonDown(); CCamView::GetClickMods(); DocView::DragFinished(); CCamView::HandleButtonUp()

Reimplemented in ScreenView.

Definition at line 3051 of file camview.cpp.

03052 {
03053     DontSkipNextMouse();
03054     // If the event is not from the RenderWindow then skip it
03055     INT32 nID = event.GetId();
03056     if (nID != WID_RENDERWINDOW)
03057     {
03058 //      TRACEUSER("Gerry", _T("Ignoring mouse event in window %d\n"), nID);
03059         event.Skip();
03060         return;
03061     }
03062 
03063     HandleButtonUp(MK_MBUTTON, event);
03064 }

void CCamView::OnMouseMove wxMouseEvent &  event  ) 
 

Packages up OIL-layer mouse-move messages before passing them on to DocView::DragPointerMove(). If ScreenView is not in "drag mode" the event is passed to our DocView, which will forward it to the current tool. Otherwise, checks if a CLICKTYPE_DRAG message has been sent to the kernel, sending one if it hasn't (this smooths the difference between Windows and RISC OS, the former system providing little support for drag operations).

Author:
Justin_Flude (Xara Group Ltd) <camelotdev@xara.com>
Date:
ages ago
Parameters:
Flags describing which buttons & keys were down when the message was sent; [INPUTS] the coordinates of the mouse cursor.
- [OUTPUTS]
Returns:
-

Errors: - Scope: Protected

See also:
class CRendWnd; CCamView::HandleDragEvent(); DocView::DragPointerMove(); CCamView::GetClickMods(); CCamView::HandleDragScrolling(); DocView::OnMouseMove()

Reimplemented in ScreenView.

Definition at line 3268 of file camview.cpp.

03269 {
03270     // Ignore if system is disabled
03271     if (CCamApp::IsDisabled())
03272         return;                             // If the system is disabled, ignore
03273 
03274 //TRACEUSER("Phil", _T("OnMouseMove %d %d %x\n"), event.LeftIsDown(), event.ShiftDown(), pCurrentDragOp);
03275     wxPoint point = event.GetPosition();
03276     
03277     // Only respond to real mouse move messages
03278     if (point == CurrentMousePos)
03279         return;
03280 
03281     UINT32 nFlags = ClickModifiers::SynthesizeMouseEventFlags(event);
03282     
03283     // Ignore mouse moves if we're not the foreground window.
03284     if (pDocView != DocView::GetSelected())
03285     {
03286         return;
03287     }
03288 
03289     StatusLine* pStatusLine=NULL;
03290     // flag that the StatusLine's mouse position field needs updating
03291 #ifndef RALPH
03292 
03293     pStatusLine=GetApplication()->GetpStatusLine();
03294     if (pStatusLine)
03295         pStatusLine->FlagMousePosNeedsUpdating();
03296 #endif
03297 
03298     SetCurrentStates();
03299 
03300     wxMouseState WXCMS = ::wxGetMouseState();
03301     wxPoint CurrentMousePosition(WXCMS.GetX(), WXCMS.GetY());
03302     // Make a number representing the current button and control key state - we don't use this for anything
03303     // other than seeing whether it has changed
03304     INT32 CurrentMouseState =
03305         (WXCMS.LeftDown()   ?1:0) |
03306         (WXCMS.MiddleDown() ?2:0) |
03307         (WXCMS.RightDown()  ?4:0) |
03308         (WXCMS.ControlDown()?8:0) |
03309         (WXCMS.ShiftDown()  ?16:0) |
03310         (WXCMS.AltDown()    ?32:0) |
03311         (WXCMS.MetaDown()   ?64:0);
03312 #if 0
03313     TRACEUSER("amb", _T("CCamView:OnMouseMove XY (%d,%d) was (%d,%d) State %2x was %2x"),
03314         CurrentMousePosition.x,
03315         CurrentMousePosition.y,
03316         m_LastMousePosition.x,
03317         m_LastMousePosition.y,
03318         CurrentMouseState,
03319         m_LastMouseState);
03320 #endif
03321     INT32 CurrentTimestamp = event.GetTimestamp();
03322 
03323     BOOL SkipThis = FALSE;
03324     // wxWidgets compliant version of the PeekMessage code
03325     if (!DragKeepAccuracy && s_MouseMoveEliminationPeriod)
03326     {
03327         // What the windows version did was look ahead in the message queue for further
03328         // mouse moves. We don't have the luxury of that, so we do something slightly
03329         // different, which is that we look at where the mouse pointer has gone.
03330         // If it's moved, we know another mouse move event will be generated. So there
03331         // is the possibility of ignoring this one. We do this if the mouse BUTTON
03332         // state has not changed, the new mouse position is over the current window,
03333         // and some external event hasn't happened (normally a keypress)
03334 
03335         // If this isn't a motion event or the button state has changed, don't skip this
03336         // event, or the next pure move
03337         if ((event.GetEventType() != wxEVT_MOTION) || (CurrentMouseState != m_LastMouseState))
03338         {
03339             // Don't skip the next mouse event and don't skip this one
03340             m_CouldSkipNextMouse = FALSE;
03341         }
03342         else
03343         {
03344             m_CouldSkipNextMouse = TRUE; // next mouse move is a candidate for skipping
03345 
03346             // we know the buttons are in the same position as before (and the modifiers)
03347             // and this is solely a motion event - a candidate to be skipped
03348             if (m_CouldSkipNextMouse && (CurrentMousePosition != m_LastMousePosition) /*&& (CurrentMousePosition != event.GetPosition())*/)
03349             {
03350                 // OK, we know the mouse is moving. Insert a point every 20ms regardless
03351                 if ((CurrentTimestamp - m_LastMouseUsedTimestamp) < s_MouseMoveEliminationPeriod)
03352                 {
03353                     SkipThis = TRUE;
03354                 }
03355             }
03356         }
03357     }
03358     else
03359     {
03360         m_CouldSkipNextMouse = FALSE;
03361     }
03362 
03363     m_LastMouseState = CurrentMouseState;
03364     m_LastMousePosition = CurrentMousePosition;
03365 
03366     if (SkipThis)
03367     {
03368         return;
03369     }
03370 
03371     m_LastMouseUsedTimestamp = CurrentTimestamp;
03372 
03373 PORTNOTE("other","Remove PeekMessage related code")
03374 #ifndef EXCLUDE_FROM_XARALX
03375     // Only discard mouse move messages if the initiator of the drag has requested this.
03376     if (!DragKeepAccuracy)
03377     {
03378         // Due to problems with auto-repeat on modifier keys, we can lag a long way behind
03379         // with mouse messages, so we discard all except the most recent mouse move messages.
03380         // However we stop discarding mouse move messages if we come across any other mouse
03381         // messages such as button up/down events.
03382         MSG Msg;
03383         BOOL FoundMsg = FALSE;
03384 
03385         for(;;)
03386         {
03387             // We have to test that the window handles match because of a bug in PeekMessage (we 
03388             // get messages which aren't for the window we specified, strangely).
03389 
03390             if (::PeekMessage(&Msg, m_hWnd, WM_MOUSEFIRST, WM_MOUSELAST, PM_NOREMOVE) &&
03391                 (m_hWnd == Msg.hwnd) && 
03392                 (Msg.message == WM_MOUSEMOVE))
03393             {
03394                 // Found a mouse move message on the queue...
03395                 // Remember it then discard it.
03396                 nFlags = (UINT32) Msg.wParam;
03397 
03398                 // Have to cast to INT8 so we get correct sign-extension.
03399                 point.x = (INT8) LOWORD(Msg.lParam);
03400                 point.y = (INT8) HIWORD(Msg.lParam);
03401 
03402                 // Discard the message
03403                 PeekMessage(&Msg, m_hWnd, WM_MOUSEMOVE, WM_MOUSEMOVE, PM_REMOVE);
03404                 FoundMsg = TRUE;
03405             }
03406             else
03407             {
03408                 // Either: there are no messages, or it's not for our window, or it's a mouse
03409                 // event which is not a mouse *move* event - whatever it is, stop looking
03410                 // for mouse events.
03411                 break;
03412             }
03413         }
03414 
03415         // If we found any other mouse messages, use the data from the most recent one and
03416         // ignore the others.
03417         if (FoundMsg)
03418         {
03419             ENSURE(m_hWnd == Msg.hwnd, "Bad message in OnMouseMove");
03420             nFlags = (UINT32) Msg.wParam;
03421             point.x = (INT8) LOWORD(Msg.lParam);
03422             point.y = (INT8) HIWORD(Msg.lParam);
03423 
03424         
03425         }
03426     }
03427     
03428     // Slow mouse reponse due to key auto-repeat msgs?
03429     //
03430     // We could be experiencing delayed mouse move messages due to the message
03431     // queue getting flooded with key auto-repeat msgs.
03432     //
03433     // To overcome this, we remove all mouse move messages, keeping only the most 
03434     // recent msg's coords & flags.
03435     // 
03436     // Stripping the message cue in this way means we get less mouse moves to drag handlers, hence less accurate
03437     // mouse move data.  But, as we only do this if we get an auto-repeated key stroke, accuracy should not be
03438     // a problem, even for the freehand tool.  Freehand drags have two key modifiers (Alt for straught line and
03439     // Shift for rubbing out) that only require the latest mouse move event
03440 
03441     MSG Msg;
03442     // Has there been a key msg during the mouse move?
03443     if (::PeekMessage(&Msg, m_hWnd, WM_KEYFIRST, WM_KEYLAST, PM_NOREMOVE))
03444     {
03445         // Have a look at the key msg (use KeyPressSysMsg to turn the msg into a system-independant format)
03446         KeyPressSysMsg KeySysMsg(&Msg);
03447 
03448         // Is the key msg an auto-repeated key press (i.e. previously down)?
03449         if (KeySysMsg.IsValid() && KeySysMsg.PrevDown)
03450         {
03451             // Auto repeat key msg found, so get the latest mouse move msg
03452             // Note: We don't remove the msg from the queue, it may need to be processed elsewhere (e.g. button-ups)
03453             while (::PeekMessage(&Msg, m_hWnd, WM_MOUSEFIRST, WM_MOUSELAST, PM_NOREMOVE))
03454             {
03455                 // Is the mouse msg a mouse move msgs?
03456                 if (Msg.message == WM_MOUSEMOVE)
03457                 {
03458                     // Found a mouse move message on the queue so remember it 
03459                     nFlags = (UINT32) Msg.wParam;
03460 
03461                     // Have to cast to INT8 so we get correct sign-extension.
03462                     point.x = (INT8) LOWORD(Msg.lParam);
03463                     point.y = (INT8) HIWORD(Msg.lParam);
03464 
03465                     // Remove the mouse move msg, and get the next mouse msg in the queue
03466                     ::PeekMessage(&Msg, m_hWnd, WM_MOUSEFIRST, WM_MOUSELAST, PM_REMOVE);
03467                 }
03468                 else
03469                 {
03470                     // We have got a mouse msg that's not a mouse move msg, so break out of 'while' loop
03471                     // This could be a button-up msg, in which case we should stop looking for
03472                     // mouse moves as they may be irrelevent to the current drag
03473                     break;  
03474                 }
03475             }
03476         }
03477     }
03478 #endif
03479 
03480 #if !defined(EXCLUDE_FROM_RALPH) && !defined(EXCLUDE_FROM_XARALX)
03481 // WEBSTER - markn 25/4/97
03482 // No pen stuff required in Webster
03483 // Taken out by vector stroking code Neville 2/10/97
03484 #ifdef VECTOR_STROKING
03485 
03486     // Now check the Mouse Message to see if it has any pressure information
03487     (Camelot.GetPressurePen())->CheckMouseMessage(WM_MOUSEMOVE, point);
03488 #endif // VECTOR_STROKING
03489 #endif
03490 
03491     // Set the DocView (and Document)
03492 //  pDocView->SetCurrent();
03493 
03494 
03495     // Find out which buttons/keys are down.
03496     GetClickMods(event, &LastClickMods);
03497 
03498     // Are we dragging at the moment?
03499     if (pCurrentDragOp)
03500     {
03501         // Yes, but just check that the drag isn't "paused" while we do an OLE drag outside the window
03502         if (GetRenderWindow()->GetCapture() == GetRenderWindow())
03503         {
03504             // Check if we need to scroll this view.
03505             HandleDragScrolling(point);
03506 
03507             WinCoord wpoint(point.x, point.y);
03508             OilCoord CurDragOilPoint = wpoint.ToOil(pDocView, TRUE);
03509 //          TRACEUSER("Gerry", _T("DragMove (%d, %d)\n"), (INT32)CurDragOilPoint.x, (INT32)CurDragOilPoint.y);
03510             // Send an on-going drag event to the kernel.
03511             pDocView->DragPointerMove(pCurrentDragOp, CurDragOilPoint, LastClickMods);
03512         }
03513     }
03514     else
03515     {
03516         // We are not dragging at the moment, but are we about to start a drag?  If the
03517         // last mouse event was a single click, the same buttons are down, and the mouse
03518         // has either moved (3 or more), then a drag is beginning.
03519         INT32   dx  = point.x - LastClickPoint.x;
03520         INT32   dy  = point.y - LastClickPoint.y;
03521         INT32   dz2 = (dx * dx) + (dy * dy);
03522         if ((nFlags & FirstClickButton) && (dz2 >= (DragLatency * DragLatency)))
03523         {
03524             // Inform the kernel that a drag is starting.
03525             HandleDragEvent(FirstClickButton, nFlags, LastClickPoint, CLICKTYPE_DRAG);
03526         }
03527         else
03528         {
03529             WinCoord wpoint(point.x, point.y);
03530             // We are not dragging, just moving the mouse around, so pass the position 
03531             // of the mouse to the tool, giving it an opportunity to set the cursor etc.
03532             pDocView->OnMouseMove( wpoint.ToOil(pDocView, TRUE), LastClickMods);        
03533         }
03534     }
03535 
03536     // Remember the last position of the mouse passed on to the kernel.  The position
03537     // passed on any subsequent DragPointerIdle events must be the same as this!
03538     CurrentMousePos = point;
03539 
03540 #if !defined(EXCLUDE_FROM_RALPH)
03541     // if status line has not already been updated by someone calling CSnap::Snap(), call
03542     // CSnap::Snap(), snapping to grid only, to update status line (and ruler mouse followers)
03543     if (pStatusLine && pStatusLine->MousePosNeedsUpdating())
03544     {
03545         OilCoord OilPos=((WinCoord*)&point)->ToOil(pDocView, TRUE);
03546         DocCoord DocPos(0,0);
03547         Spread*  pSpread=pDocView->OilToSpreadCoord(OilPos,&DocPos);
03548         if (pSpread)
03549             pDocView->Snap(pSpread,&DocPos,TRUE,TRUE);
03550     }
03551 #endif
03552 }

void CCamView::OnMouseWheel wxMouseEvent &  event  ) 
 

Scope: Protected.

Author:
Priestley (Xara Group Ltd) <camelotdev@xara.com>
Date:
25/10/2000

Reimplemented in ScreenView.

Definition at line 3240 of file camview.cpp.

03241 {
03242     DontSkipNextMouse();
03243     HandleMouseWheelEvent( event );
03244 }

virtual BOOL CCamView::OnPreparePrinting CCPrintInfo pInfo  )  [virtual]
 

void CCamView::OnRButtonDblClk wxMouseEvent &  event  ) 
 

Same as CCamView::OnLButtonDblClk(), bit for the right button.

Author:
Justin_Flude (Xara Group Ltd) <camelotdev@xara.com>
Date:
ages ago
Parameters:
Flags describing which buttons & keys were down when the message was sent; [INPUTS] the coordinates of the mouse cursor
- [OUTPUTS]
Returns:
-

Errors: - Scope: Protected

See also:
class CRendWnd; CCamView::OnLButtonDblClk()

Reimplemented in ScreenView.

Definition at line 3211 of file camview.cpp.

03212 {
03213     DontSkipNextMouse();
03214     // If the event is not from the RenderWindow then skip it
03215     INT32 nID = event.GetId();
03216     if (nID != WID_RENDERWINDOW)
03217     {
03218 //      TRACEUSER("Gerry", _T("Ignoring mouse event in window %d\n"), nID);
03219         event.Skip();
03220         return;
03221     }
03222 
03223     wxPoint point = event.GetPosition();
03224     UINT32 nFlags = ClickModifiers::SynthesizeMouseEventFlags(event);
03225 
03226     HandleDragEvent(MK_RBUTTON, nFlags, point, CLICKTYPE_DOUBLE);
03227 }

void CCamView::OnRButtonDown wxMouseEvent &  event  ) 
 

Same as for CCamView::OnLButtonDown(), but for the right mouse button.

Author:
Justin_Flude (Xara Group Ltd) <camelotdev@xara.com>
Date:
ages ago
Parameters:
Flags describing which buttons & keys were down when the message was sent; [INPUTS] the coordinates of the mouse cursor.
- [OUTPUTS]
Returns:
-

Errors: - Scope: Protected

See also:
class CRendWnd; CCamView::HandleDragEvent(); CCamView::OnLButtonDown()

Reimplemented in ScreenView.

Definition at line 2971 of file camview.cpp.

02972 {
02973     DontSkipNextMouse();
02974     // If the event is not from the RenderWindow then skip it
02975     INT32 nID = event.GetId();
02976     if (nID != WID_RENDERWINDOW)
02977     {
02978 //      TRACEUSER("Gerry", _T("Ignoring mouse event in window %d\n"), nID);
02979         event.Skip();
02980         return;
02981     }
02982 
02983     wxPoint point = event.GetPosition();
02984     UINT32 nFlags = ClickModifiers::SynthesizeMouseEventFlags(event);
02985 
02986 #if !defined(EXCLUDE_FROM_RALPH) && !defined(EXCLUDE_FROM_XARALX)
02987 // WEBSTER - markn 25/4/97
02988 // No pen stuff required in Webster
02989 // Taken out by vector stroking code Neville 2/10/97
02990 #ifdef VECTOR_STROKING
02991     (Camelot.GetPressurePen())->CheckMouseMessage( WM_RBUTTONDOWN, event.GetPosition() );
02992 #endif // VECTOR_STROKING
02993 #endif
02994     HandleDragEvent(MK_RBUTTON, nFlags, point, CLICKTYPE_SINGLE);
02995 }

void CCamView::OnRButtonUp wxMouseEvent &  event  ) 
 

Same as CCamView::OnLButtonUp(), but for the right mouse button.

Author:
Justin_Flude (Xara Group Ltd) <camelotdev@xara.com>
Date:
ages ago
Parameters:
Flags describing which buttons & keys were down when the message was sent; [INPUTS] the coordinates of the mouse cursor.
- [OUTPUTS]
Returns:
-

Errors: - Scope: Protected

See also:
class CRendWnd; CCamView::OnRButtonDown(); CCamView::GetClickMods(); DocView::DragFinished(); CCamView::HandleButtonUp()

Reimplemented in ScreenView.

Definition at line 3086 of file camview.cpp.

03087 {   
03088     DontSkipNextMouse();
03089     // If the event is not from the RenderWindow then skip it
03090     INT32 nID = event.GetId();
03091     if (nID != WID_RENDERWINDOW)
03092     {
03093 //      TRACEUSER("Gerry", _T("Ignoring mouse event in window %d\n"), nID);
03094         event.Skip();
03095         return;
03096     }
03097 
03098     HandleButtonUp(MK_RBUTTON, event);
03099 } 

LRESULT CCamView::OnRenderView WPARAM  wp,
LPARAM  lp
[protected]
 

Reimplemented in ScreenView.

void CCamView::OnScroll wxScrollEvent &  event  ) 
 

Handles all the scroll events.

Author:
Justin_Flude (Xara Group Ltd) <camelotdev@xara.com>
Date:
ages ago
Parameters:
The wxScrollEvent object [INPUTS]
- [OUTPUTS]
Returns:
-

Errors: -

See also:

Definition at line 3632 of file camview.cpp.

03633 {
03634 //  TRACEUSER("Gerry", _T("CCamView::OnScroll  Orient = %d  Position = %d\n"), event.GetOrientation(), event.GetPosition());
03635 
03636     wxEventType Type = event.GetEventType();
03637 
03638 /*  if (Type == wxEVT_SCROLL_CHANGED)
03639     {
03640         TRACEUSER("Gerry", _T("wxEVT_SCROLL_CHANGED\n"));
03641         if (event.GetOrientation() == wxHORIZONTAL)
03642         {
03643             TRACEUSER("Gerry", _T("Horizontal = %d\n"), event.GetPosition());
03644         }
03645         else
03646         {
03647             TRACEUSER("Gerry", _T("Vertical = %d\n"), event.GetPosition());
03648         }
03649     }*/
03650 
03651     if (Type == wxEVT_SCROLL_LINEUP)
03652     {
03653 //      TRACEUSER("Gerry", _T("wxEVT_SCROLL_LINEUP\n"));
03654         CWinScroller* pBar = NULL;
03655         if (event.GetOrientation() == wxHORIZONTAL)
03656             pBar = HScrollBar;
03657         else
03658             pBar = VScrollBar;
03659         if (pBar)
03660             pBar->SetThumbPosition(pBar->GetThumbPosition() - 20);
03661     }
03662     else if (Type == wxEVT_SCROLL_LINEDOWN)
03663     {
03664 //      TRACEUSER("Gerry", _T("wxEVT_SCROLL_LINEDOWN\n"));
03665         CWinScroller* pBar = NULL;
03666         if (event.GetOrientation() == wxHORIZONTAL)
03667             pBar = HScrollBar;
03668         else
03669             pBar = VScrollBar;
03670         if (pBar)
03671             pBar->SetThumbPosition(pBar->GetThumbPosition() + 20);
03672     }
03673 
03674 //  TRACEUSER("Gerry", _T("Pos = (%d, %d)\n"), HPos, VPos);
03675     SetCurrentStates();
03676     if (Status && fSetupDone)
03677     {
03678         WorkCoord temp;
03679         GetScrollOffset(&temp);
03680         Status->SetScrollPos(temp);
03681         ScrollTo(temp);
03682     }
03683 }

void CCamView::OnSetCursor wxSetCursorEvent &  event  ) 
 

Eat the cursor update requests to stop anyone else playing with them, this is needed on MSW or the cursor reverts to the normal arrow.

Author:
Luke_Hart (Xara Group Ltd) <camelotdev@xara.com>
Date:
08/02/06
Parameters:
The event. [INPUTS]
- [OUTPUTS]
Returns:
-

Errors: - Scope: Protected

See also:

Definition at line 3570 of file camview.cpp.

03571 {
03572 //  TRACEUSER("Gerry", _T("CCamView::OnSetCursor"));
03573 #if !defined(EXCLUDE_FROM_XARALX)
03574     // Child windows assume responsibility for setting their own cursor.
03575     if( event.GetEventObject() == RenderWindow )
03576     {
03577 #endif
03578         // Ignore if system is disabled
03579         if (CCamApp::IsDisabled())
03580             return;                         // If the system is disabled, ignore
03581 
03582         SetCurrentStates();
03583 
03584         Cursor* pCursor = NULL;
03585         
03586         if (IsTopmost() ||
03587             CursorStack::GIsActive(Cursor::Busy) ||
03588             CursorStack::GIsActive(Cursor::Progress))
03589         {
03590             // The view window is active, or the machine is busy on a slow task, so we must show
03591             // the cursor on the top of the cursor stack.
03592             pCursor = CursorStack::GetActive();
03593 //          TRACEUSER("Gerry", _T("Setting CursorStack::GetActive (0x%08x)"), pCursor);
03594         }
03595         else
03596         {
03597             // This view is overlapped and the machine isn't busy, so show a normal arrow cursor.
03598 //          TRACEUSER("Gerry", _T("Setting Cursor::Arrow"));
03599             pCursor = Cursor::Arrow;
03600         }
03601     
03602         if( NULL != pCursor )
03603         {
03604 //          TRACEUSER("Gerry", _T("Setting event cursor to 0x%08x"), pCursor->Handle());
03605             event.SetCursor( *(pCursor->Handle()) );
03606         }
03607 
03608 #if !defined(EXCLUDE_FROM_XARALX)
03609     }
03610     else
03611     if( event.GetEventObject() == Corner )
03612         Corner->OnSetCursor( event );
03613 #endif
03614 }

void CCamView::OnSize wxSizeEvent &  event  ) 
 

Resizes and repositions all child windows to fit the new size of the ScreenView. Updates the ViewState object with the size and position of the view, in an OS-independent manner. Resets the scroller's page and line size, and forces an immediate redraw of all affected windows.

Author:
Justin_Flude (Xara Group Ltd) <camelotdev@xara.com>
Date:
ages ago
Parameters:
A flag indicating whether the window is maximised, minimised [INPUTS] etc., the width and height of the ScreenView client area.
- [OUTPUTS]
Returns:
-

Errors: - Scope: Protected

See also:
CScroller::CalcPosFromParentClient(); CScroller::SetPageSize(); CScroller::SetLineSize(); class CRendWnd; class CScrollerCorner; struct ViewState; DocView::ViewStateChanged()

Reimplemented in ScreenCamView, and ScreenView.

Definition at line 3709 of file camview.cpp.

03710 {
03711     TRACEUSER("Gerry", _T("CCamView::OnSize(%d, %d)\n"), event.m_size.x, event.m_size.y);
03712 
03713     // This is called early, so if pDocView is null do nothing
03714     if( NULL == pDocView )
03715         return;
03716 
03717     SetCurrentStates();
03718 
03719     Document* pCurDoc = Document::GetCurrent();
03720     DocView* pCurView = DocView::GetCurrent();
03721 
03722     wxSize NewSize( event.GetSize() );
03723 //  TRACEUSER("Gerry", _T("CCamView::OnSize Size = (%d, %d)\n"), NewSize.x, NewSize.y);
03724 
03725     wxRect ClientRect = m_pFrame->GetClientRect();
03726     wxRect RenderRect = ClientRect;
03727 
03728     // Check for irrelevant or potty messages.
03729     if (NewSize.x <= 0 || NewSize.y <= 0)
03730     {
03731         TRACE(_T("Bad size in CCamView::OnSize(%d, %d)\n"), NewSize.x, NewSize.y);
03732         return;
03733     }
03734 
03735     if (Status->RulersVisible)
03736     {
03737         // Get size of rulers and shove the left and top of the RenderRect in
03738         WinRect hRect, vRect, oRect;
03739 
03740         HRuler->CalcPosFromParentClient(&hRect);
03741         HRuler->SetSize(hRect);
03742         HRuler->PositionLegend();
03743         
03744         RenderRect.y += hRect.GetHeight();
03745         RenderRect.height -= hRect.GetHeight();
03746             
03747         VRuler->CalcPosFromParentClient(&vRect);
03748         VRuler->SetSize(vRect);
03749 
03750         RenderRect.x += vRect.GetWidth();
03751         RenderRect.width -= vRect.GetWidth();
03752 
03753         OGadget->CalcPosFromParentClient(&oRect);
03754         OGadget->SetSize(oRect);
03755     }
03756 
03757     if (Status->ScrollersVisible)
03758     {
03759         // Resize and reposition the proportional scrollers.
03760 
03761         wxSize HScrSize;
03762         HScrollBar->GetBestSize(&HScrSize.x, &HScrSize.y);
03763 //      TRACEUSER("Gerry", _T("HScroll BestSize = (%d, %d)\n"), HScrSize.x, HScrSize.y);
03764         wxSize VScrSize;
03765         VScrollBar->GetBestSize(&VScrSize.x, &VScrSize.y);
03766 //      TRACEUSER("Gerry", _T("VScroll BestSize = (%d, %d)\n"), VScrSize.x, VScrSize.y);
03767 
03768         wxRect HScrRect(RenderRect.x, ClientRect.height - HScrSize.y, RenderRect.width - VScrSize.x, HScrSize.y);
03769 //      TRACEUSER("Gerry", _T("HScrRect = (%d, %d) [%d, %d]\n"), HScrRect.x, HScrRect.y, HScrRect.width, HScrRect.height);
03770         HScrollBar->SetSize(HScrRect);
03771 
03772         wxRect VScrRect(ClientRect.width - VScrSize.x, RenderRect.y, VScrSize.x, RenderRect.height - HScrSize.y);
03773 //      TRACEUSER("Gerry", _T("VScrRect = (%d, %d) [%d, %d]\n"), VScrRect.x, VScrRect.y, VScrRect.width, VScrRect.height);
03774         VScrollBar->SetSize(VScrRect);
03775 
03776         // Reposition the corner window at the bottom-right.
03777         wxRect CornerRect(VScrRect.x, HScrRect.y, VScrRect.width, HScrRect.height);
03778 //      Corner->SetSize(CornerRect);
03779 
03780         // Adjust the RenderRect to account for the scroll bars
03781         RenderRect.width -= VScrSize.x;
03782         RenderRect.height -= HScrSize.y;
03783         ScrollBarSize = max(VScrSize.x, HScrSize.y);
03784     }
03785 
03786     wxRect OldRect = RenderWindow->GetRect();
03787 //  TRACEUSER("Gerry", _T("OldRect = (%d, %d) [%d, %d]\n"), OldRect.x, OldRect.y, OldRect.width, OldRect.height);
03788 
03789     // Resize/reposition the rendering window.
03790     CurrentSize = RenderRect;
03791 //  TRACEUSER("Gerry", _T("RenderRect = (%d, %d) [%d, %d]\n"), RenderRect.x, RenderRect.y, RenderRect.width, RenderRect.height);
03792     RenderWindow->SetSize(RenderRect);
03793 
03794     // Update the rest of the window placement information.
03795     UpdateViewPosition();
03796 
03797     // Calculate the work area, page & line sizes etc etc.
03798 //  FIXED16 PixelWidth, PixelHeight;
03799 //  pDocView->GetPixelSize(&PixelWidth, &PixelHeight);
03800 
03801 //  XLONG x1 = CurrentSize.GetWidth() * PixelWidth;
03802 //  XLONG x2 = CurrentSize.GetHeight() * PixelHeight;
03803 //  HScrollBar->SetPageSize(x1);
03804 //  VScrollBar->SetPageSize(x2);
03805 //  HScrollBar->SetLineSize(x1 / xlong(10) + xlong(1)); 
03806 //  VScrollBar->SetLineSize(x2 / xlong(10) + xlong(1));
03807 
03808     SetWorkAreaExtent(Status->WorkAreaExtent, FALSE);
03809 
03810     // Make sure the scroll offsets are valid - if we resize the bottom of the window
03811     // when at the extreme bottom of the view, then the scroll offsets should be
03812     // changed - we use the scrollers' own integrity checks to do this automatically.
03813     // Don't do this until the setup flag is TRUE, so we don't overwrite scroll offsets
03814     // that have been reloaded.
03815     if (fSetupDone)
03816     {
03817         TRACEUSER("Gerry", _T("fSetupDone so setting scroll offsets\n"));
03818         WorkCoord CurrScrollPos;
03819         GetScrollOffset(&CurrScrollPos);
03820         SetScrollOffset(CurrScrollPos, TRUE);
03821     }
03822 
03823     // Inform the associated DocView object that something has happened.
03824     pDocView->ViewStateChanged();
03825     pCurDoc->SetCurrent();
03826     pCurView->SetCurrent();
03827 }

virtual void CCamView::OnUpdate wxView *  sender,
wxObject *  hint = (wxObject *) NULL
[protected, virtual]
 

Reimplemented in ScreenView.

BOOL CCamView::PrintPaper wxDC *  pPrintDC,
CCPrintInfo pPrintInfo,
PrintControl pPrintControl
[protected]
 

Reimplemented in ScreenView.

static BOOL CCamView::ReadViewPrefs  )  [static]
 

Reimplemented in ScreenView.

void CCamView::RecaptureMouseOnNextUpdate void   ) 
 

Reimplemented in ScreenView.

void CCamView::Rect2wxRect const Rect krect,
wxRect *  prect
[static, protected]
 

Converts a kernel Rect into a wxRect.

Author:
Justin_Flude (Xara Group Ltd) <camelotdev@xara.com>
Date:
7/4/94
Parameters:
- [INPUTS]
- [OUTPUTS]
Returns:
-

Errors: -

See also:
-

Definition at line 4087 of file camview.cpp.

04088 {
04089     prect->x = (INT32) krect.lo.x;
04090     prect->y = (INT32) krect.lo.y;
04091     prect->width = (INT32) krect.Width();
04092     prect->height = (INT32) krect.Height();
04093 }

void CCamView::ScrollBy INT32  dx,
INT32  dy
[protected]
 

Scrolls the view by asking the DocView to do it so it can remove and replace blobs.

Author:
Phil_Martin (Xara Group Ltd) <camelotdev@xara.com> (from Justin)
Date:
22/9/96
Parameters:
dx The amount to scroll in the X axis. [INPUTS] dy The amount to scroll in the Y axis.
Returns:
-

Errors: - Scope: Protected

Definition at line 4941 of file camview.cpp.

04942 {
04943     // If we're not scrolling then don't bother
04944     if (dx == 0 && dy == 0)
04945         return;
04946 
04947     // Convert these pixel values into a WorkCoord offset, add to the
04948     // scroll position and update the scroll bars etc.  Note that the
04949     // y offset is subtracted as the y-axis is reversed compared to
04950     // Windows . . .
04951     WorkCoord offset;
04952     GetScrollOffset(&offset);
04953 //  TRACEUSER("Gerry", _T("OldOffset = (%d, %d)\n"), (INT32)offset.x, (INT32)offset.y);
04954 
04955     FIXED16 PixelWidth, PixelHeight;
04956     pDocView->GetPixelSize(&PixelWidth, &PixelHeight);
04957     offset.x += dx * PixelWidth;
04958     offset.y -= dy * PixelHeight;
04959 
04960     WorkRect wrScrollRect = GetMaxScrollRect();
04961     if (offset.x < wrScrollRect.lo.x)   offset.x = wrScrollRect.lo.x;
04962     if (offset.y < wrScrollRect.lo.y)   offset.y = wrScrollRect.lo.y;
04963     if (offset.x > wrScrollRect.hi.x)   offset.x = wrScrollRect.hi.x;
04964     if (offset.y > wrScrollRect.hi.y)   offset.y = wrScrollRect.hi.y;
04965 //  TRACEUSER("Gerry", _T("NewOffset = (%d, %d)\n"), (INT32)offset.x, (INT32)offset.y);
04966 
04967     // By calling DocView to do the scroll we give it a chance to remove
04968     // any blobbies it might have put on the screen.  Note that the scrollers
04969     // will prevent any overscroll.
04970     pDocView->SetScrollOffsets(offset, TRUE);
04971 }

void CCamView::ScrollTo const WorkCoord offset  )  [protected]
 

Scroll the client area of the window to the specified position. The offset must be converted to OS coordinates before being passed to Windows. If the new position of the view does not overlap the old position then the client area is completely redrawn. Otherwise, the Windows USER module is called to scroll the window.

Author:
Justin_Flude (Xara Group Ltd) <camelotdev@xara.com>
Date:
ages ago
Parameters:
The position, in WorkCoords, that the top-left corner of the view is to [INPUTS] move to.
- [OUTPUTS]
Returns:
-

Errors: - Scope: Private

See also:
CCamView::SetScrollPos()

Reimplemented in ScreenView.

Definition at line 3954 of file camview.cpp.

03955 {
03956 //  TRACEUSER("Gerry", _T("CCamView::ScrollTo(%d, %d)\n"), (INT32)offset.x, (INT32)offset.y);
03957     // Calculate the difference between where we are and where we want to be.  Notice
03958     // the asymmetry in the calculations, to account for the Windows coordinate origin
03959     // being in the top-left, not the bottom-left.
03960     FIXED16 PixelWidth, PixelHeight;
03961     pDocView->GetPixelSize(&PixelWidth, &PixelHeight);
03962     INT32 dx = ((offset.x - OldOffset.x) / PixelWidth.MakeLong() );
03963     INT32 dy = ((OldOffset.y - offset.y) / PixelHeight.MakeLong() );
03964     if (dx == 0 && dy == 0)
03965     {
03966 //      TRACEUSER("Gerry", _T("No change\n"));
03967         return;
03968     }
03969     
03970     // Scroll part of, or redraw the whole of, the client area.
03971     if (Abs(dx) >= CurrentSize.GetRight() || Abs(dy) >= CurrentSize.GetBottom() )
03972     {
03973 //      TRACEUSER("Gerry", _T("Full refresh\n"));
03974         GetRenderWindow()->Refresh(true);
03975     }
03976     else
03977     {
03978 //      TRACEUSER("Gerry", _T("ScrollWindow(%d, %d)\n"), -dx, -dy);
03979         GetRenderWindow()->ScrollWindow(-dx, -dy);
03980     }
03981     
03982 #if !defined(EXCLUDE_FROM_RALPH)
03983     if (Status->RulersVisible)
03984     {
03985         if(HRuler)
03986             HRuler->ScrollRuler(-dx);
03987         if(VRuler)
03988             VRuler->ScrollRuler(-dy);
03989 
03990     }
03991 #endif
03992 
03993     // Remember this scroll offset, which corresponds to what will be drawn on the screen,
03994     // and force an immediate repaint of the invalid area.
03995     OldOffset = offset;
03996     GetRenderWindow()->Update();
03997 //  TRACEUSER("Gerry", _T("Done update\n"));
03998 
03999 #if !defined(EXCLUDE_FROM_RALPH)    // && !defined(EXCLUDE_FROM_XARALX)
04000     // Make sure that the system will update the state of gadgets after this, some of
04001     // which may now be "greyed" because what they apply to is no longer visible etc.
04002     // This is the best place to put this, as all scroll requests, whether they come
04003     // from the user or are internally generated, go through this function.
04004     DialogBarOp::SetSystemStateChanged(TRUE);
04005 #endif
04006 }

void CCamView::SetCurrentStates  )  [protected]
 

static void CCamView::SetDefaultRulersState BOOL  State  )  [inline, static]
 

Reimplemented in ScreenView.

Definition at line 273 of file camview.h.

00273 { DefaultRulersState = State;};

static void CCamView::SetDefaultScrollersState BOOL  State  )  [inline, static]
 

Reimplemented in ScreenView.

Definition at line 274 of file camview.h.

00274 { DefaultScrollersState = State;};

void CCamView::SetScrollOffset const WorkCoord pos,
BOOL  redraw = TRUE
 

Reimplemented in ScreenView.

void CCamView::SetThisFromViewState  ) 
 

Reimplemented in ScreenView.

static void CCamView::SetUseVisibleDefaults BOOL  state  )  [inline, static]
 

Reimplemented in ScreenView.

Definition at line 256 of file camview.h.

00256 { UseVisibleDefaults = state;};

ViewState* CCamView::SetViewState ViewState pvs  ) 
 

void CCamView::SetViewStateFromThis  )  const
 

Reimplemented in ScreenView.

void CCamView::SetWorkAreaExtent const WorkRect area,
BOOL  redraw = TRUE
 

Reimplemented in ScreenView.

void CCamView::ShowRulers BOOL  Show  ) 
 

Reimplemented in ScreenView.

void CCamView::ShowScrollers BOOL  Show  ) 
 

Reimplemented in ScreenView.

BOOL CCamView::StartDrag Operation pOp,
DragType  type,
BOOL  KeepAccuracy
 

Reimplemented in ScreenView.

void CCamView::UpdateViewPosition  )  const [protected]
 

Reimplemented in ScreenView.

void CCamView::wxPoint2Coord const wxPoint &  point,
Coord pcoord
[static, protected]
 

Converts a wxPoint to a kernel Coord.

Author:
Justin_Flude (Xara Group Ltd) <camelotdev@xara.com>
Date:
7/4/94
Parameters:
- [INPUTS]
- [OUTPUTS]
Returns:
-

Errors: -

See also:
-

Definition at line 4023 of file camview.cpp.

04024 {
04025     pcoord->x = point.x;
04026     pcoord->y = point.y;
04027 }

void CCamView::wxRect2Rect const wxRect &  rect,
Rect pkrect
[static, protected]
 

Converts a wxRect into a kernel Rect.

Author:
Justin_Flude (Xara Group Ltd) <camelotdev@xara.com>
Date:
7/4/94
Parameters:
- [INPUTS]
- [OUTPUTS]
Returns:
-

Errors: -

See also:
-

Definition at line 4065 of file camview.cpp.

04066 {
04067     pkrect->lo.x = rect.GetLeft();
04068     pkrect->lo.y = rect.GetTop();
04069     pkrect->hi.x = rect.GetLeft() + rect.GetWidth();
04070     pkrect->hi.y = rect.GetTop() + rect.GetHeight();
04071 }


Member Data Documentation

BOOL CCamView::AutoScrollExcludeRulers [protected]
 

Reimplemented in ScreenView.

Definition at line 383 of file camview.h.

CScrollerCorner* CCamView::Corner [protected]
 

Reimplemented in ScreenView.

Definition at line 351 of file camview.h.

DragType CCamView::CurrentDragType [protected]
 

Reimplemented in ScreenView.

Definition at line 396 of file camview.h.

wxPoint CCamView::CurrentMousePos [protected]
 

Reimplemented in ScreenView.

Definition at line 389 of file camview.h.

WinRect CCamView::CurrentSize [protected]
 

Reimplemented in ScreenView.

Definition at line 364 of file camview.h.

BOOL CCamView::DefaultRulersState [static, protected]
 

Reimplemented in ScreenView.

Definition at line 436 of file camview.h.

BOOL CCamView::DefaultScrollersState [static, protected]
 

Reimplemented in ScreenView.

Definition at line 435 of file camview.h.

INT32 CCamView::DragDelay [static, protected]
 

Reimplemented in ScreenView.

Definition at line 440 of file camview.h.

const INT32 CCamView::DragIdleID = 100 [static, protected]
 

Definition at line 430 of file camview.h.

BOOL CCamView::DragKeepAccuracy [protected]
 

Reimplemented in ScreenView.

Definition at line 381 of file camview.h.

INT32 CCamView::DragLatency [static, protected]
 

Reimplemented in ScreenView.

Definition at line 439 of file camview.h.

BOOL CCamView::DragOpInvoke [protected]
 

Reimplemented in ScreenView.

Definition at line 371 of file camview.h.

String_256 CCamView::DragOpToken [protected]
 

Reimplemented in ScreenView.

Definition at line 369 of file camview.h.

MonotonicTime CCamView::DragTimer [static, protected]
 

Reimplemented in ScreenView.

Definition at line 442 of file camview.h.

BOOL CCamView::fInitialUpdate [protected]
 

Reimplemented in ScreenView.

Definition at line 361 of file camview.h.

UINT32 CCamView::FirstClickButton [protected]
 

Reimplemented in ScreenView.

Definition at line 393 of file camview.h.

BOOL CCamView::fJustCreated [protected]
 

Reimplemented in ScreenView.

Definition at line 362 of file camview.h.

BOOL CCamView::fSetupDone [protected]
 

Reimplemented in ScreenView.

Definition at line 360 of file camview.h.

OILHorizontalRuler* CCamView::HRuler [protected]
 

Reimplemented in ScreenView.

Definition at line 352 of file camview.h.

CWinScroller* CCamView::HScrollBar [protected]
 

Reimplemented in ScreenView.

Definition at line 349 of file camview.h.

UINT32 CCamView::LastClickButton [protected]
 

Reimplemented in ScreenView.

Definition at line 387 of file camview.h.

ClickModifiers CCamView::LastClickMods [protected]
 

Reimplemented in ScreenView.

Definition at line 390 of file camview.h.

wxPoint CCamView::LastClickPoint [protected]
 

Reimplemented in ScreenView.

Definition at line 388 of file camview.h.

ClickType CCamView::LastClickType [protected]
 

Reimplemented in ScreenView.

Definition at line 386 of file camview.h.

wxPoint CCamView::LastDoubleClickPos [protected]
 

Reimplemented in ScreenView.

Definition at line 374 of file camview.h.

BOOL CCamView::m_CouldSkipNextMouse [protected]
 

Definition at line 406 of file camview.h.

wxTimer CCamView::m_DragIdleTimer [protected]
 

Definition at line 378 of file camview.h.

wxPoint CCamView::m_LastMousePosition [protected]
 

Definition at line 404 of file camview.h.

INT32 CCamView::m_LastMouseState [protected]
 

Definition at line 403 of file camview.h.

INT32 CCamView::m_LastMouseUsedTimestamp [protected]
 

Definition at line 405 of file camview.h.

MonotonicTime CCamView::m_OLELastOutTime [protected]
 

Reimplemented in ScreenView.

Definition at line 379 of file camview.h.

wxMDIChildFrame* CCamView::m_pFrame [protected]
 

Definition at line 347 of file camview.h.

WinRect CCamView::MouseClipRect [protected]
 

Reimplemented in ScreenView.

Definition at line 397 of file camview.h.

OriginGadget* CCamView::OGadget [protected]
 

Reimplemented in ScreenView.

Definition at line 354 of file camview.h.

WorkCoord CCamView::OldOffset [protected]
 

Reimplemented in ScreenView.

Definition at line 366 of file camview.h.

BOOL CCamView::OLERecaptureMouse [protected]
 

Reimplemented in ScreenView.

Definition at line 399 of file camview.h.

Operation* CCamView::pCurrentDragOp [protected]
 

Reimplemented in ScreenView.

Definition at line 395 of file camview.h.

DocView* CCamView::pDocView [protected]
 

Definition at line 356 of file camview.h.

OpParam* CCamView::pDragOpParam [protected]
 

Reimplemented in ScreenView.

Definition at line 370 of file camview.h.

INT32 CCamView::PopCount [static, protected]
 

Reimplemented in ScreenView.

Definition at line 432 of file camview.h.

PrintView* CCamView::pPrintView [protected]
 

Definition at line 357 of file camview.h.

ViewState* CCamView::pReadyMadeViewState [static, protected]
 

Reimplemented in ScreenView.

Definition at line 433 of file camview.h.

CRenderWnd* CCamView::RenderWindow [protected]
 

Definition at line 348 of file camview.h.

INT32 CCamView::s_MouseMoveEliminationPeriod [static]
 

Definition at line 447 of file camview.h.

INT32 CCamView::ScrollBarSize [static, protected]
 

Definition at line 444 of file camview.h.

ViewState* CCamView::Status [protected]
 

Definition at line 358 of file camview.h.

BOOL CCamView::ThisDoubleIsQuad [protected]
 

Reimplemented in ScreenView.

Definition at line 376 of file camview.h.

BOOL CCamView::ThisSingleIsTriple [protected]
 

Reimplemented in ScreenView.

Definition at line 375 of file camview.h.

MonotonicTime CCamView::TimeOfLastClick [protected]
 

Reimplemented in ScreenView.

Definition at line 373 of file camview.h.

BOOL CCamView::UseVisibleDefaults [static, protected]
 

Reimplemented in ScreenView.

Definition at line 437 of file camview.h.

OILVerticalRuler* CCamView::VRuler [protected]
 

Reimplemented in ScreenView.

Definition at line 353 of file camview.h.

CWinScroller* CCamView::VScrollBar [protected]
 

Reimplemented in ScreenView.

Definition at line 350 of file camview.h.

const INT32 CCamView::WID_HRULER = 5 [static, protected]
 

Definition at line 427 of file camview.h.

const INT32 CCamView::WID_HSCROLLBAR = 2 [static, protected]
 

Definition at line 424 of file camview.h.

const INT32 CCamView::WID_RENDERWINDOW = 1 [static, protected]
 

Definition at line 423 of file camview.h.

const INT32 CCamView::WID_RULERORIGIN = 7 [static, protected]
 

Definition at line 429 of file camview.h.

const INT32 CCamView::WID_SIZECORNER = 4 [static, protected]
 

Definition at line 426 of file camview.h.

const INT32 CCamView::WID_VRULER = 6 [static, protected]
 

Definition at line 428 of file camview.h.

const INT32 CCamView::WID_VSCROLLBAR = 3 [static, protected]
 

Definition at line 425 of file camview.h.

WorkRect CCamView::WorkArea [protected]
 

Reimplemented in ScreenView.

Definition at line 365 of file camview.h.


The documentation for this class was generated from the following files:
Generated on Sat Nov 10 03:52:02 2007 for Camelot by  doxygen 1.4.4