66 ClientAttr->hWindowMenu =
nullptr;
69 Attr.Param =
reinterpret_cast<LPVOID>(ClientAttr);
220 const auto canClose = std::all_of(
c.begin(),
c.end(), [](
TWindow&
w) { return w.CanClose(); });
232 auto cv = std::vector<TWindow*>{};
279 return reinterpret_cast<HWND>(result);
296 if (!
child.IsWindowVisible())
301 if (!
child.IsWindowEnabled())
303 child.EnableWindow(
true);
320 child.EnableWindow(
false);
338 Parent->ForwardMessage();
355#if OWL_PERSISTENT_STREAMS
365 if (GetObject()->ClientAttr == 0)
371 GetObject()->ClientAttr->hWindowMenu = (
HMENU) 0;
372 GetObject()->Attr.Param =
reinterpret_cast<LPVOID>(GetObject()->ClientAttr);
381TMDIClient::Streamer::Write(opstream&
os)
const
384 os << GetObject()->ClientAttr->idFirstChild;
Base class for an extensible interface for auto enabling/disabling of commands (menu items,...
TDropInfo is a simple class that supports file-name drag-and-drop operations using the WM_DROPFILES m...
TMDIChild defines the basic behavior of all MDI child windows.
Multiple Document Interface (MDI) client windows (represented by a TMDIClient object) manage the MDI ...
virtual bool CloseChildren()
Closes the TMDIChild windows owned by this MDI client.
auto GetWindowClassName() -> TWindowClassName override
Returns TMDIClient's registration class name, "MDICLIENT.".
TMDIClient(TModule *module=0)
Constructor for a TMDIClient.
void CmChildActionEnable(TCommandEnabler &commandEnabler)
If there are MDI child windows, CmChildActionEnalbe enables any one of the child window action menu i...
void EvDropFiles(TDropInfo)
Forwards dropped file messages by default to the parent (MDI Frame) where they can be handled,...
TMDIChild * GetActiveMDIChild()
Use the Windows message to get the active mdi child, and then down cast to our MDI child derived clas...
virtual TMDIChild * InitChild()
Constructs an instance of a TMDIChild with this TMDIClient as parent.
virtual void TileChildren(int tile=MDITILE_VERTICAL)
Sizes and arranges all of the non-iconized MDI child windows within the MDI client window.
virtual void ArrangeIcons()
Arranges the MDI child window icons at the bottom of the MDI client window.
~TMDIClient()
Frees the memory associated with ClientAttr.
auto Create() -> bool override
Creates the interface element associated with the MDI client window.
virtual TMDIChild * CreateChild()
Initializes and creates a new TMDIChild by calling InitChild and Create.
HWND EvMDICreate(MDICREATESTRUCT &createStruct)
Intercepts the WM_MDICREATE message sent when MDI child windows are created, and, if the client's sty...
virtual void CascadeChildren()
Sizes and arranges all of the non-iconized MDI child windows within the MDI client window.
auto PreProcessMsg(MSG &) -> bool override
Preprocess messages in order to translate MDI accelerator keys.
void EvMDIDestroy(HWND hWnd)
Destroys an MDI child window.
Multiple Document Interface (MDI) frame windows, represented by TMDIFrame, are overlapped windows tha...
static HMENU FindChildMenu(HMENU)
Find & return the child menu of an MDI frame's (or anyone's) menu bar.
ObjectWindows dynamic-link libraries (DLLs) construct an instance of TModule, which acts as an object...
TRect is a mathematical class derived from tagRect.
Type-safe encapsulation of a Windows class name, a union between ATOM and LPCTSTR.
TWindow, derived from TEventHandler and TStreamableBase, provides window-specific behavior and encaps...
auto GetChildren()
Returns a TWindow::TChildrenRange that can be iterated by standard means.
virtual bool Create()
Creates the window interface element to be associated with this ObjectWindows interface element.
TWindow * GetWindowPtr(HWND hWnd) const
Calls TApplication:GetWindowPtr on the application associated with this window.
void Init(TWindow *parent, LPCTSTR title, TModule *module)
Normal initialization of a default constructed TWindow.
void SetFlag(uint mask)
Sets the specified TWindow wfXxxx constant flags (for example wfAlias, wfTransfer,...
TWindow * GetParentO() const
Return the OWL's parent for this window.
HMENU GetMenu() const
Returns the handle to the menu of the indicated window.
TResult HandleMessage(TMsgId, TParam1=0, TParam2=0)
Dispatches the given message using the response table.
TResult DefaultProcessing()
Handles default processing of events, which includes continued processing of menu/accelerators comman...
TWindow * GetFirstChild()
Returns a pointer to the first child window, which is the first window created in the interface objec...
HWND THandle
TWindow encapsulates an HWND.
HWND GetHandle() const
Returns the handle of the window.
ipstream, a specialized input stream derivative of pstream, is the base class for reading (extracting...
#define DEFINE_RESPONSE_TABLE1(cls, base)
Macro to define a response table for a class with one base.
void ReadBaseObject(Base *base, ipstream &in)
#define IMPLEMENT_STREAMABLE1(cls, base1)
void WriteBaseObject(Base *base, opstream &out)
@ wfUnDisabled
Used temporarily when destroying MDI child.
@ wfUnHidden
Used temporarily when destroying MDI child.
@ wfStreamTop
This window is the topmost one to stream.
Definition of TMDIClient and TMDIFrame classes.
Object Windows Library (OWLNext Core)
const unsigned int IDW_MDICLIENT
ID of MDI client window.
WPARAM TParam1
First parameter type.
const unsigned int IDW_FIRSTMDICHILD
child window IDs, 32 max to 32032
#define TYPESAFE_DOWNCAST(object, toClass)
#define EV_COMMAND_ENABLE(id, method)
Response table entry for enabling a command.
#define EV_COMMAND(id, method)
Response table entry for a menu/accelerator/push button message.