OWLNext    7.0
Borland's Object Windows Library for the modern age
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
oleview.cpp
Go to the documentation of this file.
1//----------------------------------------------------------------------------
2// ObjectComponents
3// Copyright (c) 1994, 1996 by Borland International, All Rights Reserved
4//
5/// \file
6/// Implementation of TOleView. Doc/View view derived from TOleWindow that
7/// supports OLE 2 using OCF TOcView & TOcRemView
8//----------------------------------------------------------------------------
9#include <ocf/pch.h>
10
11#include <owl/window.h>
12#include <owl/gdiobjec.h>
13#include <owl/scroller.h>
14#include <owl/docmanag.h>
15#include <owl/docview.rh>
16#include <ocf/oleview.rh>
17#include <ocf/oleframe.h>
18#include <ocf/oleview.h>
19#include <ocf/oledoc.h>
20
21namespace ocf {
22
23using namespace owl;
24
26
27//----------------------------------------------------------------------------
28// TOleView
29//
30
33
34 // Container specific messages
35 //
40
41 // Server specific messages
42 //
53
54//
55/// Constructs a TOleView object associated with the given document object (doc) and
56/// parent window (parent).
57//
59:
60 TView(doc),
61 TOleWindow(parent, doc.GetDocManager().GetApplication())
62{
63 Destroying = false;
66 OcDoc = oleDoc->GetOcDoc(); // Let OleWindow member point to it for accessor
67}
68
69//
70/// Destroys the TOleView object and detaches the view from the associated document.
71//
73{
74 Destroying = true;
75 if (IsRemote())
76 Destroy(); // Make sure that derived TWindow shutdown virtuals get called
77 OcDoc = 0; // We don't own it, don't let TOleWindow delete it
78}
79
80//
81/// Override TOleWindow's version to pass info to TOleDocument & provide a
82/// second chance to find the RegLink.
83///
84/// Creates an ObjectComponents view associated with the embedded object. Associates
85/// the view with the document template specified in tpl. The isEmbedded parameter
86/// is true if the view is an embedded object. The outer parameter refers to the
87/// IUnknown interface with which the view will aggregate itself.
88//
91{
92 // Assume an embedded document until we find out later if we are a link
93 // or a load-from-file
94 //
95 if (isRemote)
97
100}
101
102//
103/// Overrides TView's GetViewMenu to make an on-the-fly decision about which menu to
104/// use: normal, or embedded.
105//
108{
109 if (TView::GetViewMenu())
110 return TView::GetViewMenu();
111
112// !CQ && not a link!
113 if (IsRemote() && GetModule()->FindResource(IDM_OLEVIEWEMBED, RT_MENU))
115 else
117
118 return TView::GetViewMenu();
119}
120
121//
122/// Does a given THandle belong to this view? Yes if it is us, or a child of us
123//
124bool
125TOleView::VnIsWindow(THandle hWnd)
126{
127 return hWnd == GetHandle() || IsChild(hWnd);
128}
129
130//
131/// A view uses this function to verify whether or not it can shut down. If this is
132/// a server's view window, CanClose checks to see if any open-editing is occurring
133/// on any of the embedded objects in the frame window. If so, CanClose closes this
134/// open-editing session by disconnecting the embedded object from its server. Then,
135/// it hides the server's frame window and returns true when appropriate. If this
136/// is a container, CanClose queries all documents and views and returns true when
137/// all documents and views can be closed.
138///
139/// \note Unlike in-place editing, which takes place in the container's window,
140/// open-editing occurs in the server's frame window.
141//
142bool
144{
145 // We don't want to close the view for DLL servers
146 //
149 CHECK(olefr);
150 olefr->ShowWindow(SW_HIDE);
152 return false;
153 }
154
155 // Say yes if there are more than one TOleView's attached to the document
156 //
157 if (OtherViewExists() || GetOcRemView())
158 return true;
159
160 if (Doc->CanClose()) {
161 if (OcDoc)
162 OcDoc->Close();
163 return true;
164 }
165 return false;
166}
167
168//
169/// Checks whether another TOleView already exists.
170//
171bool
173{
175 while (curView) {
177 if (!oleLinkView && curView != this)
178 return true;
179
180 curView = curView->GetNextView();
181 }
182
183 return false;
184}
185
186//
187/// Performs a normal CleanupWindow. Also lets the OcView object know we have closed.
188//
189void
191{
192 if (!OtherViewExists()) {
193
195
196 // Delete the TOleView now rather wait until ~TOleFrame if its parent
197 // is TRemViewBucket
198 //
200 TOleFrame);
201 if (mainWindow && mainWindow->GetRemViewBucket() == Parent && !Destroying)
202 GetApplication()->Condemn(this);
203 }
204}
205
206//
207/// Shuts down the associated OCF partners if possible.
208//
209bool
211{
212 // if dll server open edit return
215 else {
217 if (OcDoc && !OtherViewExists())
218 OcDoc->Close();
219 }
220 return true;
221}
222
223
224//
225/// Invalidates the view region specified by p. Use this function to invalidate the
226/// bounding rectangle surrounding an embedded object if the object has been
227/// changed, usually as a result of in-place editing. If successful, returns true.
228//
229bool
231{
232 InvalidateRect(rect, true);
233
234 return true;
235}
236
237//
238/// Ensures that TOleView's data members, such as DragPart, Pos, and Scale, are
239/// initialized properly after a revert operation, which cancels any changes made to
240/// the document since the last time the document was saved to storage.
241//
242bool
244{
245 DragPart = 0;
246 Pos.SetNull();
247 Scale.Reset();
248 return true;
249}
250
251//
252/// Sets the OcDoc data member to 0.
253//
254bool
256{
257 OcDoc = 0;
258 return true;
259}
260
261//
262/// Asks the server to close the view associated with this document. Tests to see if
263/// the document has been changed since it was last saved. Returns true if the
264/// document and its associated view are closed.
265//
266bool
268{
270
271 // When TOcRemView gets shut down in the Embed From File case,
272 // we need to cleanup the document and view right away. Otherwise,
273 // the document and view will be shut down as part of the frame shut down
274 // process.
275 //
276 if (ocRemView && ocRemView->GetKind() == TOcRemView::LoadFromFile) {
277 OcView = 0; // OcView is going away, so don't mess with it
278 OcDoc = 0; // OleDoc will delete OcDoc, so don't mess with it
279 delete &GetDocument();
280 }
281 else {
283 }
284
285 return true;
286}
287
288//
289/// Asks the server to save the embedded object's data to storage. To save the
290/// object, EvOcViewSavePart calls upon the TOleDocument object, which creates
291/// storage as necessary for each embedded object. Saves the dimensions of the
292/// server's view, which the server uses to tell the container how to redraw the
293/// embedded object in the container's window.
294//
295bool
297{
298 PRECONDITION(ocSave.StorageI);
299
301 if (!doc)
302 return false;
303
304 doc->SetStorage(ocSave.StorageI, (ocSave.SameAsLoad || ocSave.Remember));
305
306 bool status;
307 if (ocSave.SaveSelection) {
308 status = doc->CommitSelection(*this, ocSave.UserData);
309 }
310 else {
311 // Save view remote view info such as origin and extent
312 //
314 if (ocRemView)
315 ocRemView->Save(ocSave.StorageI);
316
317 status = doc->Commit(true);
318 }
319
320 // Restore the original storage
321 //
322 if (!ocSave.SameAsLoad && !ocSave.Remember)
323 doc->RestoreStorage();
324
325 return status;
326}
327
328//
329/// Asks the server to load itself from storage. Loads the document and its
330/// associated view.
331//
332bool
334{
335 PRECONDITION(ocLoad.StorageI);
336
338 doc->SetStorage(ocLoad.StorageI);
339
340 // Load view remote view info such as origin and extent
341 //
343 GetOcRemView()->Load(ocLoad.StorageI);
344
345 bool status = GetDocument().Open(doc->GetOpenMode());
346
347 if (!ocLoad.Remember)
348 doc->SetStorage(0);
349
350 return status;
351}
352
353//
354/// Asks the container application to open an existing document so the document can
355/// receive embedded and linked objects. (Actually, TOleView calls on the
356/// TOleDocument object to read the document from storage, using the standard OLE
357/// IStorage and IStream interfaces). Assigns a unique string identifier to the
358/// document and returns true if successful.
359//
360bool
362{
364 CHECK(oleDoc && GetOcDoc());
365
366 oleDoc->SetEmbedded(false); // must really be a link or load-from-file
367 oleDoc->SetStorage(0); // release the current storage
368 oleDoc->SetDocPath(path);
369 oleDoc->InitDoc();
370 oleDoc->Open(ofRead, path);
371
372 owl::tstring newName(oleDoc->GetDocPath());
374 Invalidate();
375 return true;
376}
377
378//
379/// Inserts the server's menu into the composite menu. Determines the number of
380/// groups and the number of pop-up menu items to insert within each group. The
381/// shared menu (sharedMenu) is the container's menu merged with the server's menu
382/// groups.
383//
384bool
386{
387 // Recreate a temporary composite menu for frame and child
388 //
389 TMenuDescr compMenuDesc; // empty menudescr
390 if (GetViewMenu()) {
391 compMenuDesc.Merge(*GetViewMenu());
392 compMenuDesc.Merge(TMenuDescr(0, -1, 0, -1, 0, -1, 0));
393 }
394
396 sharedMenu.Width[0],
397 sharedMenu.Width[1],
398 sharedMenu.Width[2],
399 sharedMenu.Width[3],
400 sharedMenu.Width[4],
401 sharedMenu.Width[5]);
403
404 for (int i = 0; i < 6; i++)
405 sharedMenu.Width[i] = shMenuDescr.GetGroupCount(i);
406
407 return true;
408}
409
410//
411/// Notifies the active view of any changes made to the embedded object's data
412/// (changeInfo). Also, notifies any other views associated with this document that
413/// the bounding rectangle for the document is invalid and needs to be repainted.
414/// EvOcViewPartInvalid always returns true.
415//
416bool
418{
419 if (changeInfo.IsDataChange())
420 GetDocument().SetDirty(true);
421
422 // Reflect the change in part in other (non-active) views
423 //
424 TRect rect(changeInfo.GetPart()->GetRect());
425 rect.right++;
426 rect.bottom++;
427 TOleClientDC dc(*this);
428 dc.LPtoDP((TPoint*)&rect, 2);
429
430 GetDocument().NotifyViews(vnInvalidate, reinterpret_cast<TParam2>(&rect));
431
432 // Notify container if this is an intermediate container
433 //
435
436 return true; // stop further processing by OCF
437}
438
439//
440/// Attaches this view to its ObjectWindows parent window so the embedded object can
441/// be either opened and edited or deactivated. To attach a view to an embedded
442/// object, set the attach parameter to true. To detach the embedded object, set the
443/// attach parameter to false.
444//
445bool
447{
449 TOleFrame);
450 if (!mainWindow)
451 return false; // server app is shutting down
452
453 // There won't be any TOcRemView if we're reestablishing the link
454 //
455 if (attach) {
456 if (IsOpenEditing()) {
457 // Get the normal app notify handler to set up the parent for us
458 // knowing that we are now open editing
459 //
460 if (mainWindow->GetRemViewBucket() == Parent) {
462 }
463 }
464 }
465 else {
466 if (IsOpenEditing() && Parent != mainWindow)
467 Parent->PostMessage(WM_CLOSE);
468 SetParent(mainWindow->GetRemViewBucket()); // simple reparent
469 }
470 return true;
471}
472
473//
474/// Finds the item name for whole document or for the selection.
475//
476bool
478{
479 if (item.Selection) {
480 if (DragPart) {
481 item.Name = DragPart->GetName();
482 return true;
483 }
484 }
485 else {
486 item.Name = _T("Content"); // item name representing the whole document
487 return true;
488 }
489 return false;
490}
491
492//----------------------------------------------------------------------------
493// Linking Spport
494//
495
496//
497/// Responds to an OC_VIEWSETLINK message TOcLinkView sends when the server document
498/// provides a link to a container document. EvOcViewSetLink establishes the link
499/// between a TOleLinkView and a TOcLinkView. The view parameter references the view
500/// with which the document or selection is associated. Returns false if
501/// unsuccessful.
502/// Non-Doc/View applications use TOleWIndow's implementation of the function.
503//
504bool
506{
507 return false;
508}
509
510//
511/// Responds to an OC_VIEWBREAKLINK message that TOcLinkView sends when the server
512/// document that provides the link shuts down. EvOcViewBreakLink breaks the link
513/// with a server document or a selection by deleting the TOleLinkView associated
514/// with the TOcLinkView (view). After the link is broken, the container application
515/// is left holding a static representation (that is, a metafile) of the linked
516/// document. Returns false if unsuccessful.
517/// Non-Doc/View applications use TOleWindow's implementation of this function.
518//
519bool
521{
522 // Find the link view with the moniker
523 //
524 TView* target = GetDocument().QueryViews(vnLinkView, reinterpret_cast<TParam2>(&view), this);
525
526 // Delete a linked view to this document
527 //
528 delete target;
529 return true;
530}
531
533
534#if OWL_PERSISTENT_STREAMS
535
536//
537//
538//
539void*
540TOleView::Streamer::Read(ipstream& is, uint32 /*version*/) const
541{
542 owl::ReadBaseObject((TOleWindow*)GetObject(), is);
543 owl::ReadBaseObject((TView*)GetObject(), is);
544
545 GetObject()->Destroying = false;
546 TOleDocument* oleDoc = TYPESAFE_DOWNCAST(&GetObject()->GetDocument(), TOleDocument);
547 CHECK(oleDoc);
548 GetObject()->OcDoc = oleDoc->GetOcDoc(); // Let OleWindow member point to it for accessor
549 CHECK(oleDoc);
550
551 return GetObject();
552}
553
554//
555//
556//
557void
558TOleView::Streamer::Write(opstream& os) const
559{
560 owl::WriteBaseObject((TOleWindow*)GetObject(), os);
561 owl::WriteBaseObject((TView*)GetObject(), os);
562}
563
564#endif
565
566//----------------------------------------------------------------------------
567// TOleLinkView
568//
569
570DEFINE_RESPONSE_TABLE(TOleLinkView)
574
575//
576/// Constructs a TOleLinkView object associated with the given document object (doc)
577/// and view (view).
578//
580:
581 TView(doc),
582 OcLinkView(view)
583{
584 view.AddRef();
585}
586
587//
588/// Destroys the TOleLinkView object and detaches the view from the associated
589/// document.
590//
595
596//
597/// Returns true if a TOleLinkView object is associated with the server's
598/// TOcRemView, the server's remote link view object. A TOcRemView is the object
599/// created by a linking and embedding server so that the server can draw its OLE
600/// object in a metafile used by the container. In contrast to VnLinkMoniker, this
601/// function searches for the TOleLinkView object using a reference to the view.
602//
603bool
605{
606 if (&OcLinkView == &view)
607 return true;
608
609 return false;
610}
611
612//
613/// Returns true if a TOleLinkView object is associated with the given server's
614/// TOcRemView. In contrast to VnLinkView, this function searches for the view using
615/// the specified server's moniker.
616/// When the document receives a request for the TOleLinkView associated with a
617/// particular moniker, the document sends a vnLinkView notification message to all
618/// its attached views. The handler for vnLinkMoniker in TOleLinkView simply returns
619/// true if the handler finds a view associated with the moniker.
620//
621bool
623{
625 return true;
626
627 return false;
628}
629
630//
631/// When any changes occur to the server document, UpdateLinks updates all
632/// containers linked to the view of the server document. If successful, it returns
633/// true.
634//
635bool
637{
639 return true;
640}
641
642//
643/// Returns the moniker for the selection in a server document associated with this
644/// TOleLinkView container's view. By looking at the moniker, the application can
645/// find the corresponding objects in its document.
646//
647/// \note Monker is the source file's path name and the object hierarchy for a linked object.
648/// A moniker functions much like a map by showing where the linked object's data is
649/// stored and explaining how to find the data. For example, the moniker returned
650/// from a word processor for a selected range of text could be the start and end
651/// offset of a text stream. The moniker returned for a spreadsheet range could be
652/// something like A1:D6. Anything that a server application can use to map to its
653/// data can be used as a moniker.
654TString&
659
660} // OCF namespace
661
662//==============================================================================
663
#define CHECK(condition)
Definition checks.h:239
#define PRECONDITION(condition)
Definition checks.h:227
bool IsOptionSet(owl::uint32 option) const
Definition ocapp.h:302
void SetName(const owl::tstring &newName)
Notify container that doc pathname has changed.
Definition ocdoc.cpp:349
Used to obtain the item name for building monikers.
Definition ocview.h:403
owl::TString Name
Item moniker.
Definition ocview.h:409
bool Selection
Whether we want name for the whole or part(selection)
Definition ocview.h:410
View/Data change info.
Definition ocpart.h:216
owl::TString GetName()
Definition ocpart.h:91
Remote Viewer object for a server document.
Definition ocremvie.h:26
@ LoadFromFile
Transient load-from-file.
Definition ocremvie.h:66
bool Load(IStorage *storageI)
Load remote view specific information.
Definition ocremvie.cpp:358
Use when doing parts save and load.
Definition ocview.h:326
The TOcView partner is a container (viewer) of a given (server/client) document.
Definition ocview.h:136
Derived from TClientDC, TOleClientDC is a helper class that translates between two different coordina...
Definition olewindo.h:385
Derived from TStorageDocument, TOleDocument implements the document half of the Doc/View pair.
Definition oledoc.h:47
Decorated frame that supports OLE 2 using OCF.
Definition oleframe.h:65
The OLE2 window view class. Used as a view in doc/view model.
Definition oleview.h:123
bool EvOcViewClose()
Asks the server to close the view associated with this document.
Definition oleview.cpp:267
~TOleView()
Destroys the TOleView object and detaches the view from the associated document.
Definition oleview.cpp:72
bool VnDocOpened(int omode)
Ensures that TOleView's data members, such as DragPart, Pos, and Scale, are initialized properly afte...
Definition oleview.cpp:243
auto GetViewMenu() -> owl::TMenuDescr *override
Overrides TView's GetViewMenu to make an on-the-fly decision about which menu to use: normal,...
Definition oleview.cpp:107
bool EvOcViewGetItemName(TOcItemName &item)
Finds the item name for whole document or for the selection.
Definition oleview.cpp:477
auto CanClose() -> bool override
A view uses this function to verify whether or not it can shut down.
Definition oleview.cpp:143
bool EvOcViewAttachWindow(bool attach)
Attaches this view to its ObjectWindows parent window so the embedded object can be either opened and...
Definition oleview.cpp:446
auto CreateOcView(owl::TRegLink *, bool isEmbedded, IUnknown *outer) -> TOcView *override
Override TOleWindow's version to pass info to TOleDocument & provide a second chance to find the RegL...
Definition oleview.cpp:90
bool EvOcViewLoadPart(TOcSaveLoad &ocLoad)
Asks the server to load itself from storage.
Definition oleview.cpp:333
bool EvOcViewSavePart(TOcSaveLoad &ocSave)
Asks the server to save the embedded object's data to storage.
Definition oleview.cpp:296
bool VnDocClosed(int omode)
Sets the OcDoc data member to 0.
Definition oleview.cpp:255
bool VnInvalidate(owl::TRect &rect)
Invalidates the view region specified by p.
Definition oleview.cpp:230
bool EvOcViewSetLink(TOcLinkView &view)
Responds to an OC_VIEWSETLINK message TOcLinkView sends when the server document provides a link to a...
Definition oleview.cpp:505
bool EvOcViewBreakLink(TOcLinkView &view)
Responds to an OC_VIEWBREAKLINK message that TOcLinkView sends when the server document that provides...
Definition oleview.cpp:520
void CleanupWindow() override
Performs a normal CleanupWindow. Also lets the OcView object know we have closed.
Definition oleview.cpp:190
bool EvOcViewOpenDoc(LPCTSTR path)
Asks the container application to open an existing document so the document can receive embedded and ...
Definition oleview.cpp:361
bool EvOcViewInsMenus(TOcMenuDescr &sharedMenu)
Inserts the server's menu into the composite menu.
Definition oleview.cpp:385
auto EvOcViewPartInvalid(TOcPartChangeInfo &changeInfo) -> bool override
Notifies the active view of any changes made to the embedded object's data (changeInfo).
Definition oleview.cpp:417
auto OleShutDown() -> bool override
Shuts down the associated OCF partners if possible.
Definition oleview.cpp:210
bool OtherViewExists()
Checks whether another TOleView already exists.
Definition oleview.cpp:172
The generic OLE2 window. Use as a client of a frame window.
Definition olewindo.h:91
virtual void InvalidatePart(TOcInvalidate invalid)
Invalidates the area where the embedded object exists.
Definition olewindo.cpp:424
TOcDocument * OcDoc
Holds the ObjectComponents document associated with this TOleWindow.
Definition olewindo.h:338
bool IsOpenEditing() const
Checks whether the window is in Open-Edit mode.
Definition olewindo.cpp:434
virtual bool OleShutDown()
Shuts down the associated ObjectComponents partners, if possible.
owl::TRect Pos
Holds the current area in the window where the object is embedded.
Definition olewindo.h:335
TOcPart * DragPart
Points to the embedded object (the part) being dragged.
Definition olewindo.h:310
TOcScaleFactor Scale
Holds the current scaling factor. The server uses this information to determine how to scale the docu...
Definition olewindo.h:331
bool EvOcViewClose()
Asks the server to close a currently open document and its associated view.
void CleanupWindow() override
Performs normal window cleanup and informs the TOcView object that the window is closed.
TOcRemView * GetOcRemView()
Returns the server's view associated with this window.
Definition olewindo.h:426
TOcApp * OcApp
Holds the ObjectComponents application associated with this TOleWindow.
Definition olewindo.h:344
bool IsRemote() const
Returns true if the window represents an embedded server.
Definition olewindo.h:448
virtual TOcView * CreateOcView(owl::TRegLink *link, bool isRemote, IUnknown *outer)
Called to perform the actual setting up of the OcView member.
Definition olewindo.cpp:307
TOcView * OcView
Holds the ObjectComponents view or remote view (the server's) associated with the TOleWindow view.
Definition olewindo.h:341
TOcDocument * GetOcDoc()
Returns the ObjectComponents document associated with this window.
Definition olewindo.h:405
void Condemn(TWindow *win)
Condemns the given window to be deleted the at the next available safe time.
bool LPtoDP(TPoint *points, int count=1) const
Converts each of the count points in the points array from logical points to device points.
Definition dc.h:1423
virtual void PostEvent(int id, TDocument &doc)
changed doc status
An abstract base class, TDocument is the base class for all document objects and serves as an interfa...
Definition docview.h:187
TDocTemplate * GetTemplate()
Gets the template used for document creation.
Definition docview.h:866
bool NotifyViews(int eventId, TParam2=0, TView *exclude=nullptr)
Notifies the views of this document, and the views of any child documents, of a change.
Definition document.cpp:629
TDocManager & GetDocManager()
Returns a pointer to the current document manager.
Definition docview.h:850
TView * QueryViews(int eventId, TParam2=0, TView *exclude=nullptr)
Queries the views of the current document, and the views of any child documents, about a specified ev...
Definition document.cpp:699
void SetDirty(bool dirty=true)
Updates the document's dirty flag using the specified parameter.
Definition docview.h:888
TView * GetViewList() const
Return pointer to the head of the link list of views associated with this document.
Definition docview.h:947
virtual bool Open(int mode, LPCTSTR path=nullptr)
Opens the document using the path specified by DocPath.
Definition docview.h:843
void SetEmbedded(bool embed)
Marks the document as being embedded in an OLE 2 container.
Definition docview.h:920
Menu with information used to allow merging.
Definition menu.h:206
TPoint is a support class, derived from tagPOINT.
Definition geometry.h:87
TRect is a mathematical class derived from tagRect.
Definition geometry.h:308
void SetNull()
Sets the left, top, right, and bottom of the rectangle to 0.
Definition geometry.h:1075
Reference to reference counted string object TUString Lightweight reference object consisting of a po...
Definition string.h:67
Abstract base class for view access from document.
Definition docview.h:397
virtual TMenuDescr * GetViewMenu()
Returns the menu descriptor for this view.
Definition docview.h:1019
void SetViewMenu(TMenuDescr *menu)
Definition view.cpp:95
TDocument & GetDocument()
Returns a reference to the view's document.
Definition docview.h:1004
TWindow, derived from TEventHandler and TStreamableBase, provides window-specific behavior and encaps...
Definition window.h:414
virtual void SetParent(TWindow *newParent)
Sets the parent for the specified window by setting Parent to the specified new Parent window object.
Definition window.cpp:738
TApplication * GetApplication() const
Gets a pointer to the TApplication object associated with this.
Definition window.h:1855
virtual void Destroy(int retVal=0)
Destroys an MS-Windows element associated with the TWindow.
Definition window.cpp:2160
virtual void InvalidateRect(const TRect &rect, bool erase=true)
Invalidates a specified client area.
Definition window.h:2834
TModule * GetModule() const
Returns a pointer to the module object.
Definition window.h:1841
bool IsChild(HWND hWnd) const
Returns true if the window is a child window or a descendant window of this window.
Definition window.h:3176
virtual void Invalidate(bool erase=true)
Invalidates (mark for painting) the entire client area of a window.
Definition window.h:2822
HWND GetHandle() const
Returns the handle of the window.
Definition window.h:2020
ipstream, a specialized input stream derivative of pstream, is the base class for reading (extracting...
Definition objstrm.h:391
Base class for writing streamable objects.
Definition objstrm.h:480
#define _T(x)
Definition cygwin.h:51
Definition of class TDocManager.
#define DEFINE_RESPONSE_TABLE(cls)
Macro to define a response table for a class with no base response tables.
Definition eventhan.h:479
#define DEFINE_RESPONSE_TABLE1(cls, base)
Macro to define a response table for a class with one base.
Definition eventhan.h:492
Definition of abstract GDI object class and derived classes.
void ReadBaseObject(Base *base, ipstream &in)
Definition objstrm.h:1159
#define IMPLEMENT_STREAMABLE2(cls, base1, base2)
Definition objstrm.h:1726
void WriteBaseObject(Base *base, opstream &out)
Definition objstrm.h:1150
@ dnCreate
New document or view has been created.
Definition docmanag.h:52
@ ofRead
ios::in, open for reading
Definition docview.h:63
Include for OC, gets common headers when precompiled headers are enabled.
Object Component Framework (COM encapsulation)
Definition appdesc.h:22
EV_OC_VIEWSETLINK
Definition oleview.cpp:49
EV_OC_VIEWCLOSE
Definition oleview.cpp:46
EV_VN_DOCOPENED
Definition oleview.cpp:37
EV_OC_VIEWINSMENUS
Definition oleview.cpp:45
TOcInvalidate
Definition ocobject.h:59
@ invView
Definition ocobject.h:61
EV_OC_VIEWOPENDOC
Definition oleview.cpp:47
EV_OC_VIEWPARTINVALID
EV_OC_VIEWDISCARDUNDO, // !CQ not processing this yet...
Definition oleview.cpp:39
const owl::uint vnInvalidate
Definition oleview.h:24
EV_VN_INVALIDATE
Definition oleview.cpp:36
class _OCFCLASS TOleWindow
Definition oledoc.h:27
Parent
Definition occtrl.cpp:152
EV_OC_VIEWGETITEMNAME
Definition oleview.cpp:51
EV_VN_LINKVIEW
Definition oleview.cpp:571
EV_OC_VIEWSAVEPART
Definition oleview.cpp:43
EV_VN_LINKMONIKER
Definition oleview.cpp:572
EV_OC_VIEWATTACHWINDOW
Definition oleview.cpp:48
@ amExeMode
may be overridden per instance if running DLL
Definition ocreg.h:88
EV_OC_VIEWBREAKLINK
Definition oleview.cpp:50
EV_OC_VIEWLOADPART
Definition oleview.cpp:44
const owl::uint vnLinkView
Definition oleview.h:25
Object Windows Library (OWLNext Core)
Definition animctrl.h:22
EV_VN_DOCCLOSED
Definition editview.cpp:26
EV_VN_ISWINDOW
Definition commview.cpp:26
OWL_DIAGINFO
Definition animctrl.cpp:14
END_RESPONSE_TABLE
Definition button.cpp:26
std::string tstring
Definition defs.h:79
#define TYPESAFE_DOWNCAST(object, toClass)
Definition defs.h:269
Definition of class TScroller.
Base window class TWindow definition, including HWND encapsulation.