OWLNext    7.0
Borland's Object Windows Library for the modern age
Loading...
Searching...
No Matches
decmdifr.cpp
Go to the documentation of this file.
1//----------------------------------------------------------------------------
2// ObjectWindows
3// Copyright (c) 1992, 1996 by Borland International, All Rights Reserved
4//
5/// \file
6/// Implementation of class TDecoratedMDIFrame
7//----------------------------------------------------------------------------
8#include <owl/pch.h>
9#include <owl/decmdifr.h>
10#include <type_traits>
11
12namespace owl {
13
15
16//
17// make sure that TDecoratedFrame is first in the list so we find its
18// WM_SIZE handler
19//
20DEFINE_RESPONSE_TABLE2(TDecoratedMDIFrame, TDecoratedFrame, TMDIFrame)
22
23//
24/// Constructs a decorated MDI frame of the specified client window with the
25/// indicated menu resource ID. By default, menu hint text is not displayed.
26///
27/// \note If nullptr is passed for `clientWnd`, then a default TMDIClient is created.
28//
33
34//
35/// String-aware overload.
36//
40
41#if defined(OWL5_COMPAT)
42
43//
44/// Old OWL 5 constructor.
45/// Use the new safe constructor instead.
46//
51 TModule* module)
52:
53 TWindow(0, title, module),
54 TFrameWindow(0, title, &clientWnd, false, module),
57{
58}
59
60//
61/// String-aware overload of the old OWL 5 constructor.
62/// Use the new safe constructor instead.
63//
64TDecoratedMDIFrame::TDecoratedMDIFrame(const tstring& title, TResId menu, TMDIClient& clientWnd, bool trackMenuSelection, TModule* module)
65:
66 TWindow(0, title.c_str(), module),
67 TFrameWindow(0, title.c_str(), &clientWnd, false, module),
68 TMDIFrame(title.c_str(), menu, clientWnd, module),
69 TDecoratedFrame(0, title.c_str(), &clientWnd, trackMenuSelection, module)
70{}
71
72#endif
73
74//
75/// Overrides TWindow::DefWindowProc . If the message parameter is WM_SIZE,
76/// DefWindowProc returns 0; otherwise, DefWindowProc returns the result of calling
77/// TMDIFRame::DefWindowProc.
78//
81{
82 //
83 // ::DefFrameProc() will response to WM_SIZE by making the MDI client the
84 // same size as the client rectangle; this conflicts with what TLayoutWindow
85 // has done
86 //
87 return message == WM_SIZE ?
88 0 :
90}
91
92
93
96#if OWL_PERSISTENT_STREAMS
97
98//
99//
100//
101void*
102TDecoratedMDIFrame::Streamer::Read(ipstream& is, uint32 /*version*/) const
103{
104 ReadBaseObject((TMDIFrame*)GetObject(), is);
105 ReadBaseObject((TDecoratedFrame*)GetObject(), is);
106 return GetObject();
107}
108
109//
110//
111//
112void
113TDecoratedMDIFrame::Streamer::Write(opstream& os) const
114{
115 WriteBaseObject((TMDIFrame*)GetObject(), os);
116 WriteBaseObject((TDecoratedFrame*)GetObject(), os);
117}
118
119#endif
120
121
122} // OWL namespace
123
TDecoratedFrame automatically positions its client window (you must supply a client window) so that i...
Definition decframe.h:74
Derived from both TMDIFrame and TDecoratedFrame, TDecoratedMDIFrame is an MDI frame that supports dec...
Definition decmdifr.h:39
virtual TResult DefWindowProc(TMsgId, TParam1, TParam2)
Overrides TWindow::DefWindowProc .
Definition decmdifr.cpp:80
TDecoratedMDIFrame(LPCTSTR title, TResId menuResId, std::unique_ptr< TMDIClient > clientWnd=nullptr, bool trackMenuSelection=false, TModule *=0)
Constructs a decorated MDI frame of the specified client window with the indicated menu resource ID.
Definition decmdifr.cpp:29
Derived from TWindow, TFrameWindow controls such window-specific behavior as keyboard navigation and ...
Definition framewin.h:96
Multiple Document Interface (MDI) client windows (represented by a TMDIClient object) manage the MDI ...
Definition mdi.h:37
Multiple Document Interface (MDI) frame windows, represented by TMDIFrame, are overlapped windows tha...
Definition mdi.h:122
virtual TResult DefWindowProc(TMsgId, TParam1, TParam2)
Overrides TWindow::DefWindowProc and provides default processing for any incoming message the MDI fra...
Definition mdiframe.cpp:243
ObjectWindows dynamic-link libraries (DLLs) construct an instance of TModule, which acts as an object...
Definition module.h:75
TWindow, derived from TEventHandler and TStreamableBase, provides window-specific behavior and encaps...
Definition window.h:414
ipstream, a specialized input stream derivative of pstream, is the base class for reading (extracting...
Definition objstrm.h:391
Definition of TDecoratedMDIFrame class.
#define DEFINE_RESPONSE_TABLE2(cls, base1, base2)
Macro to define a response table for a class with two bases.
Definition eventhan.h:506
void ReadBaseObject(Base *base, ipstream &in)
Definition objstrm.h:1159
#define IMPLEMENT_STREAMABLE4(cls, base1, base2, base3, base4)
Definition objstrm.h:1728
void WriteBaseObject(Base *base, opstream &out)
Definition objstrm.h:1150
Object Windows Library (OWLNext Core)
Definition animctrl.h:22
UINT TMsgId
Message ID type.
Definition dispatch.h:53
unsigned long uint32
Definition number.h:34
LPARAM TParam2
Second parameter type.
Definition dispatch.h:55
WPARAM TParam1
First parameter type.
Definition dispatch.h:54
OWL_DIAGINFO
Definition animctrl.cpp:14
END_RESPONSE_TABLE
Definition button.cpp:26
LRESULT TResult
Result type.
Definition dispatch.h:52
std::string tstring
Definition defs.h:79