#include <camview.h>
Inheritance diagram for CCamView:

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 |
| CCamDoc * | GetDocument () const |
| ViewState * | GetViewState () const |
| ViewState * | SetViewState (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 CNativeDC * | GetRenderDC () 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 () |
| CRenderWnd * | GetRenderWindow () 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 | |
| DocView * | GetDocViewPtr () const |
| BOOL | IsSingleClickReallyTriple () const |
| BOOL | IsSingleClickReallyQuad () const |
| void | DontSkipNextMouse () |
Static Public Member Functions | |
| static BOOL | ReadViewPrefs () |
| static DocView * | GetDocViewFromWindow (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 DocView * | GetDocViewFromWindowID (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 |
| CRenderWnd * | RenderWindow |
| CWinScroller * | HScrollBar |
| CWinScroller * | VScrollBar |
| CScrollerCorner * | Corner |
| OILHorizontalRuler * | HRuler |
| OILVerticalRuler * | VRuler |
| OriginGadget * | OGadget |
| DocView * | pDocView |
| PrintView * | pPrintView |
| ViewState * | Status |
| BOOL | fSetupDone |
| BOOL | fInitialUpdate |
| BOOL | fJustCreated |
| WinRect | CurrentSize |
| WorkRect | WorkArea |
| WorkCoord | OldOffset |
| String_256 | DragOpToken |
| OpParam * | pDragOpParam |
| 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 |
| Operation * | pCurrentDragOp |
| 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 ViewState * | pReadyMadeViewState |
| static BOOL | DefaultScrollersState |
| static BOOL | DefaultRulersState |
| static BOOL | UseVisibleDefaults |
| static INT32 | DragLatency |
| static INT32 | DragDelay |
| static MonotonicTime | DragTimer |
| static INT32 | ScrollBarSize |
Definition at line 157 of file camview.h.
|
|
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() /*!
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 }
|
|
|
Destroys a CCamView window. Deletes child windows first. Updates the CCamView population counter.
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 }
|
|
|
|
|
|
Reimplemented in ScreenView. |
|
|
Reimplemented in ScreenView. Definition at line 2793 of file camview.cpp. 02794 { 02795 if(Status) 02796 return Status->ScrollersVisible; 02797 return FALSE; 02798 }
|
|
||||||||||||||||||||
|
Calculates the scroll deltas due to the current mouse position being outside the allowed rectangle. Helper function.
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 }
|
|
|
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.
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 }
|
|
|
Reimplemented in ScreenView. |
|
||||||||||||
|
Converts a kernel Coord to a wxPoint.
Definition at line 4044 of file camview.cpp.
|
|
|
will create drag targets for appropriate drags
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 }
|
|
|
|
|
|
|
|
|
Definition at line 409 of file camview.h. 00409 {m_CouldSkipNextMouse=FALSE;}
|
|
|
Reimplemented in ScreenView. |
|
|
Reimplemented in ScreenView. |
|
||||||||||||
|
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.
Reimplemented in ScreenView. Definition at line 4883 of file camview.cpp. 04884 { 04885 *p = ClickModifiers::GetClickModifiers(event); 04886 }
|
|
||||||||||||
|
Reimplemented in ScreenView. |
|
|
Reimplemented in ScreenView. |
|
|
Reimplemented in ScreenView. Definition at line 271 of file camview.h. 00271 { return DefaultRulersState;};
|
|
|
Reimplemented in ScreenView. Definition at line 272 of file camview.h. 00272 { return DefaultScrollersState;};
|
|
|
|
|
|
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.
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 }
|
|
|
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.
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 }
|
|
|
Reimplemented in ScreenView. Definition at line 317 of file camview.h. 00318 { 00319 return pDocView; 00320 }
|
|
|
Find the legal area in which scroll offsets can exist.
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 }
|
|
|
Definition at line 170 of file camview.h. 00171 { 00172 return m_pFrame; 00173 }
|
|
||||||||||||
|
Reimplemented in ScreenView. |
|
|
Reimplemented in ScreenView. |
|
|
Reimplemented in ScreenView. Definition at line 222 of file camview.h. 00222 { return(RenderWindow); }
|
|
|
Reimplemented in ScreenView. |
|
|
Reimplemented in ScreenView. Definition at line 270 of file camview.h. 00270 { return UseVisibleDefaults;};
|
|
|
|
|
|
|
|
||||||||||||
|
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.
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 |