OWLNext
7.0
Borland's Object Windows Library for the modern age
Toggle main menu visibility
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
21
namespace
owl
{
22
23
#include <
owl/preclass.h
>
24
25
/// \addtogroup docview
26
/// @{
27
/// \class TPaneSplitterView
28
// ~~~~~ ~~~~~~~~~~~~~~~~~
29
//
30
class
_OWLCLASS
TPaneSplitterView
:
public
TPaneSplitter
,
public
TView
{
31
public
:
32
DECLARE_CASTABLE
;
33
TPaneSplitterView
(
TDocument
& doc,
TWindow
* parent=0);
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
54
DECLARE_RESPONSE_TABLE(
TPaneSplitterView
);
55
56
};
57
/// @}
58
59
#include <
owl/posclass.h
>
60
61
//-------------------------------------------------------------------------
62
//
63
// Inlines
64
//
65
//
66
//
67
inline
LPCTSTR
TPaneSplitterView::StaticName
(){
68
return
_T
(
"PaneSplitter View"
);
69
}
70
//
71
inline
bool
TPaneSplitterView::CanClose
(){
72
return
TPaneSplitter::CanClose
() &&
73
(Doc->NextView(
this
) ||
74
Doc->NextView(
nullptr
) !=
this
||
75
Doc->CanClose());
76
}
77
//
78
inline
LPCTSTR
TPaneSplitterView::GetViewName
(){
79
return
StaticName
();
80
}
81
//
82
inline
TWindow
*
TPaneSplitterView::GetWindow
(){
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
//
88
inline
bool
TPaneSplitterView::VnIsWindow(HWND hWnd){
89
return
hWnd ==
GetHandle
() ||
IsChild
(hWnd);
90
}
91
//
92
inline
bool
TPaneSplitterView::SetDocTitle
(LPCTSTR docname,
int
index){
93
return
TPaneSplitter::SetDocTitle
(docname, index);
94
}
95
96
//
97
98
}
// OWL namespace
99
100
#endif
// PSVIEW_H sentry.
owl::TPaneSplitter::TPaneSplitter
TPaneSplitter(TWindow *parent, LPCTSTR title=0, int splitterWidth=0, TModule *module=0)
Initializes data members.
Definition
panespli.cpp:991
owl::TPaneSplitterView::CanClose
auto CanClose() -> bool override
Definition
psview.h:71
owl::TPaneSplitterView::StaticName
static LPCTSTR StaticName()
Definition
psview.h:67
owl::TPaneSplitterView::SetDocTitle
auto SetDocTitle(LPCTSTR docname, int index) -> bool override
Definition
psview.h:92
owl::TPaneSplitterView::DECLARE_CASTABLE
DECLARE_CASTABLE
Definition
psview.h:32
owl::TPaneSplitterView::GetWindow
auto GetWindow() -> TWindow *override
Definition
psview.h:82
owl::TPaneSplitterView::GetViewName
auto GetViewName() -> LPCTSTR override
Definition
psview.h:78
owl::TPaneSplitterView::TPaneSplitterView
TPaneSplitterView(TDocument &doc, TWindow *parent=0)
Definition
psview.cpp:32
owl::TView::SetDocTitle
virtual bool SetDocTitle(LPCTSTR docname, int index)
Stores the document title.
Definition
docview.h:1071
owl::TView::TDocument
friend class TDocument
needs access to NextView
Definition
docview.h:477
owl::TView::TView
TView(TDocument &doc)
Constructs a TView object of the document associated with the view.
Definition
view.cpp:34
owl::TView::GetViewName
virtual LPCTSTR GetViewName()=0
Pure virtual function that returns 0.
owl::TView::GetWindow
virtual TWindow * GetWindow()
Returns the TWindow instance associated with the view, or 0 if no view exists.
Definition
docview.h:1049
owl::TWindow
TWindow, derived from TEventHandler and TStreamableBase, provides window-specific behavior and encaps...
Definition
window.h:414
owl::TWindow::SetDocTitle
virtual bool SetDocTitle(LPCTSTR docname, int index)
Default behavior for updating document title is to pass it to parent frame.
Definition
window.cpp:778
owl::TWindow::IsChild
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
owl::TWindow::CanClose
virtual bool CanClose()
Use this function to determine if it is okay to close a window.
Definition
window.cpp:2795
owl::TWindow::GetHandle
HWND GetHandle() const
Returns the handle of the window.
Definition
window.h:2020
_T
#define _T(x)
Definition
cygwin.h:51
docview.h
Definition of classes TDocument, TView, TWindowView, TStream, TInStream, TOutStream.
owl
Object Windows Library (OWLNext Core).
Definition
animctrl.h:22
defs.h
_OWLCLASS
#define _OWLCLASS
Definition
defs.h:338
panespli.h
posclass.h
preclass.h
include
owl
psview.h
Generated by
1.18.0