OWLNext    7.0
Borland's Object Windows Library for the modern age
Loading...
Searching...
No Matches
psview.h
Go to the documentation of this file.
1//----------------------------------------------------------------------------
2// ObjectWindows
3// Copyright (c) 1998, by Yura Bidus, All Rights Reserved
4//
5/// \file
6/// Class definition for TPaneSplitterView (TPaneSplitter, TView).
7//
8//----------------------------------------------------------------------------
9
10#if !defined(OWL_PSVIEW_H) // Sentry, use file only if it's not already included.
11#define OWL_PSVIEW_H
12
13#include <owl/private/defs.h>
14#if defined(BI_HAS_PRAGMA_ONCE)
15# pragma once
16#endif
17
18#include <owl/panespli.h>
19#include <owl/docview.h>
20
21namespace owl {
22
23#include <owl/preclass.h>
24
25/// \addtogroup docview
26/// @{
27/// \class TPaneSplitterView
28// ~~~~~ ~~~~~~~~~~~~~~~~~
29//
31 public:
34 virtual ~TPaneSplitterView();
35
36 static LPCTSTR StaticName();
37
38 // Override virtuals from TWindow
39 //
40 auto CanClose() -> bool override;
41
42 // Override virtuals from TView
43 //
44 auto GetViewName() -> LPCTSTR override;
45 auto GetWindow() -> TWindow* override;
46 auto SetDocTitle(LPCTSTR docname, int index) -> bool override;
47 using TView::SetDocTitle; ///< String-aware overload
48
49 private:
50 // Event handlers
51 //
52 bool VnIsWindow(HWND hWnd);
53
55
56};
57/// @}
58
59#include <owl/posclass.h>
60
61//-------------------------------------------------------------------------
62//
63// Inlines
64//
65//
66//
68 return _T("PaneSplitter View");
69}
70//
72 return TPaneSplitter::CanClose() &&
73 (Doc->NextView(this) ||
74 Doc->NextView(nullptr) != this ||
75 Doc->CanClose());
76}
77//
81//
83 return static_cast<TWindow*>(this);
84}
85//
86/// Does a given HWND belong to this view? Yes if it is us, or a child of us
87//
88inline bool TPaneSplitterView::VnIsWindow(HWND hWnd){
89 return hWnd == GetHandle() || IsChild(hWnd);
90}
91//
95
96//
97
98} // OWL namespace
99
100#endif // PSVIEW_H sentry.
An abstract base class, TDocument is the base class for all document objects and serves as an interfa...
Definition docview.h:187
TPaneSplitter is a class that acts as a container for child windows (called panes) and splitters (pan...
Definition panespli.h:52
auto CanClose() -> bool override
Definition psview.h:71
static LPCTSTR StaticName()
Definition psview.h:67
auto SetDocTitle(LPCTSTR docname, int index) -> bool override
Definition psview.h:92
auto GetWindow() -> TWindow *override
Definition psview.h:82
auto GetViewName() -> LPCTSTR override
Definition psview.h:78
Abstract base class for view access from document.
Definition docview.h:397
TWindow, derived from TEventHandler and TStreamableBase, provides window-specific behavior and encaps...
Definition window.h:414
virtual bool SetDocTitle(LPCTSTR docname, int index)
Default behavior for updating document title is to pass it to parent frame.
Definition window.cpp:778
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 bool CanClose()
Use this function to determine if it is okay to close a window.
Definition window.cpp:2795
HWND GetHandle() const
Returns the handle of the window.
Definition window.h:2020
#define _T(x)
Definition cygwin.h:51
Definition of classes TDocument, TView, TWindowView, TStream, TInStream, TOutStream.
#define DECLARE_RESPONSE_TABLE(cls)
Definition eventhan.h:436
Object Windows Library (OWLNext Core)
Definition animctrl.h:22
#define _OWLCLASS
Definition defs.h:338