OWLNext    7.0
Borland's Object Windows Library for the modern age
Loading...
Searching...
No Matches
pager.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/// Definition of class TPageScroller.
7//----------------------------------------------------------------------------
8
9#if !defined(OWL_PAGER_H)
10#define OWL_PAGER_H
11
12#include <owl/private/defs.h>
13#if defined(BI_HAS_PRAGMA_ONCE)
14# pragma once
15#endif
16
17#include <owl/control.h>
18#include <owl/commctrl.h>
19#include <owl/shellitm.h>
20
21namespace owl {
22
23#include <owl/preclass.h>
24
25/// \addtogroup newctrl
26/// @{
27/// \class TPageScroller
28// ~~~~~ ~~~~~~~~~~~~~
29//
31 public:
33 pbTopOrLeft = PGB_TOPORLEFT,
34 pbBottomOrRight = PGB_BOTTOMORRIGHT,
35 };
36
37 TPageScroller (TWindow* parent,
38 int id,
40 int x, int y, int w, int h,
41 TModule* module = 0);
42
43 TPageScroller (TWindow* parent,
44 int resourceId,
46 TModule* module = 0);
48
49 void ForwardMouse(bool forward = true);
50
51 void SetBkColor(const TColor& clr);
52 TColor GetBkColor() const;
53
54 void SetBorder(int border);
55 int GetBorder() const;
56
57 void SetButtonSize(int btnsize);
58 int GetButtonSize() const;
59
60 int GetButtonState(TPagerButton button) const;
61 TDropTarget GetDropTarget();
62 void SetPosition(int position);
63 int GetPosition() const;
64
65 void RecalcSize();
66
67 void SetChild(TWindow* child);
68
69 // Override TWindow virtual member functions
70 //
71 void SetupWindow();
72
73 protected:
74 // Override TWindow virtual member functions
75 //
76 virtual auto GetWindowClassName() -> TWindowClassName;
77
79
80 private:
81 // Hidden to prevent accidental copying or assignment
82 //
85};
86
87/// @}
88
89#include <owl/posclass.h>
90
91//
92// inlines
93//
94
99
100//
103 SendMessage(PGM_SETBKCOLOR, 0, TParam2(static_cast<COLORREF>(clr)));
104}
105
106//
109 return static_cast<COLORREF>(CONST_CAST(TPageScroller*,this)->SendMessage(PGM_GETBKCOLOR,0,0));
110}
111
112//
117
118//
119inline int TPageScroller::GetBorder() const{
121 return static_cast<int>(CONST_CAST(TPageScroller*,this)->SendMessage(PGM_GETBORDER,0,0));
122}
123
124//
129
130//
133 return static_cast<int>(CONST_CAST(TPageScroller*,this)->SendMessage(PGM_GETBUTTONSIZE,0,0));
134}
135
138 return static_cast<int>(CONST_CAST(TPageScroller*,this)->SendMessage(PGM_GETBUTTONSTATE,0,TParam2(button)));
139}
140
147
148//
153
154//
155inline int TPageScroller::GetPosition() const{
157 return static_cast<int>(CONST_CAST(TPageScroller*,this)->SendMessage(PGM_GETPOS,0,0));
158}
159
160//
165
166} // OWL namespace
167
168#endif // OWL_MONTHCAL_H
#define PRECONDITION(condition)
Definition checks.h:227
Class wrapper for management of color values.
Definition color.h:245
TControl unifies its derived control classes, such as TScrollBar, TControlGadget, and TButton.
Definition control.h:38
Wraps the IDropTarget interface (currently lightweight).
Definition shellitm.h:150
ObjectWindows dynamic-link libraries (DLLs) construct an instance of TModule, which acts as an object...
Definition module.h:75
int GetPosition() const
Definition pager.h:155
void ForwardMouse(bool forward=true)
Definition pager.h:95
TColor GetBkColor() const
Definition pager.h:107
void SetPosition(int position)
Definition pager.h:149
void RecalcSize()
Definition pager.h:161
int GetButtonSize() const
Definition pager.h:131
void SetBkColor(const TColor &clr)
Definition pager.h:101
void SetButtonSize(int btnsize)
Definition pager.h:125
int GetButtonState(TPagerButton button) const
Definition pager.h:136
TWindow * ChildWindow
Definition pager.h:78
void SetBorder(int border)
Definition pager.h:113
int GetBorder() const
Definition pager.h:119
TDropTarget GetDropTarget()
Definition pager.h:141
Type-safe encapsulation of a Windows class name, a union between ATOM and LPCTSTR.
Definition module.h:47
TWindow, derived from TEventHandler and TStreamableBase, provides window-specific behavior and encaps...
Definition window.h:414
TResult SendMessage(TMsgId, TParam1=0, TParam2=0) const
Sends a message (msg) to a specified window or windows.
Definition window.cpp:3288
HWND GetHandle() const
Returns the handle of the window.
Definition window.h:2020
Definition of classes for CommonControl encapsulation.
Definition of class TControl.
Object Windows Library (OWLNext Core)
Definition animctrl.h:22
LPARAM TParam2
Second parameter type.
Definition dispatch.h:55
WPARAM TParam1
First parameter type.
Definition dispatch.h:54
#define CONST_CAST(targetType, object)
Definition defs.h:273
#define _OWLCLASS
Definition defs.h:338
Definitions of Win95 Shell Clases: TShellItem, TShellItemIterator, TPidl, TShellMalloc.