OWLNext    7.0
Borland's Object Windows Library for the modern age
Loading...
Searching...
No Matches
pager.cpp
Go to the documentation of this file.
1//----------------------------------------------------------------------------
2// ObjectWindows
3// Copyright (c) 1998 by Bidus Yura, All Rights Reserved
4//
5/// \file
6/// Implementation of the TPageScroller class
7//----------------------------------------------------------------------------
8#include <owl/pch.h>
9
10#include <owl/pager.h>
11
12
13namespace owl {
14
16DIAG_DECLARE_GROUP(OwlCommCtrl); // CommonCtrl Diagnostic group
17
18//
19//
20//
21TPageScroller::TPageScroller(TWindow* parent, int id, TWindow* child, int x, int y,
22 int w, int h, TModule* module)
23:
24 TControl(parent,id,_T(""),x,y,w,h,module),
25 ChildWindow(child)
26{
27 InitializeCommonControls(ICC_PAGESCROLLER_CLASS);
28}
29
30
31//
32//
33//
34TPageScroller::TPageScroller(TWindow* parent, int resourceId, TWindow* child,
35 TModule* module)
36:
37 TControl(parent, resourceId, module),
38 ChildWindow(child)
39{
40 InitializeCommonControls(ICC_PAGESCROLLER_CLASS);
42}
43
44//
45//
46//
50
51
52// Return the proper class name.
53// Windows class: WC_PAGESCROLLER is defined in commctrl.h
55{
56 return TWindowClassName{WC_PAGESCROLLER};
57}
58
59//
60//
61//
62void
64{
65 ChildWindow = child;
66 if(child && GetHandle()){
67 if(!child->GetHandle())
68 child->Create();
69 SendMessage(PGM_SETCHILD,0,TParam2(child->GetHandle()));
70 }
71}
72
73void
80} // OWL namespace
81/* ========================================================================== */
TControl(TWindow *parent, int id, LPCTSTR title, int x, int y, int w, int h, TModule *module=nullptr)
Invokes TWindow's constructor, passing it parent (parent window), title (caption text),...
Definition control.cpp:43
ObjectWindows dynamic-link libraries (DLLs) construct an instance of TModule, which acts as an object...
Definition module.h:78
TPageScroller(TWindow *parent, int id, TWindow *child, int x, int y, int w, int h, TModule *module=0)
Definition pager.cpp:21
void SetChild(TWindow *child)
Definition pager.cpp:63
TWindow * ChildWindow
Definition pager.h:78
virtual auto GetWindowClassName() -> TWindowClassName
Definition pager.cpp:54
void SetupWindow()
Definition pager.cpp:74
Type-safe encapsulation of a Windows class name, a union between ATOM and LPCTSTR.
Definition module.h:50
TWindow, derived from TEventHandler and TStreamableBase, provides window-specific behavior and encaps...
Definition window.h:414
virtual bool Create()
Creates the window interface element to be associated with this ObjectWindows interface element.
Definition window.cpp:2399
void DisableTransfer()
Disables (for the interface object) the transfer mechanism, which allows state data to be transferred...
Definition window.h:1835
TResult SendMessage(TMsgId, TParam1=0, TParam2=0) const
Sends a message (msg) to a specified window or windows.
Definition window.cpp:3288
virtual void SetupWindow()
Performs setup following creation of an associated MS-Windows window.
Definition window.cpp:2575
HWND GetHandle() const
Returns the handle of the window.
Definition window.h:2020
#define _T(x)
Definition cygwin.h:51
Object Windows Library (OWLNext Core).
Definition animctrl.h:22
void InitializeCommonControls(uint controlFlags)
Wrapper for the Windows API function InitCommmonControlsEx.
Definition commctrl.cpp:19
LPARAM TParam2
Second parameter type.
Definition dispatch.h:55
OWL_DIAGINFO
Definition animctrl.cpp:14
DIAG_DECLARE_GROUP(OwlThread)
Definition of class TPageScroller.