OWLNext    7.0
Borland's Object Windows Library for the modern age
Loading...
Searching...
No Matches
controlg.h
Go to the documentation of this file.
1//----------------------------------------------------------------------------
2// ObjectWindows
3// Copyright (c) 1992, 1996 by Borland International, All Rights Reserved
4//
5/// \file
6/// Class TControlGadget definition. TControlGadget is a gadget that takes a
7/// TWindow and allows it to be inserted into a gadget window. In effect it is
8/// an adapter that allows arbitrary controls to be used like gadgets in a tool
9/// bar, status bar, etc.
10//----------------------------------------------------------------------------
11
12#if !defined(OWL_CONTROLG_H)
13#define OWL_CONTROLG_H
14
15#include <owl/private/defs.h>
16#if defined(BI_HAS_PRAGMA_ONCE)
17# pragma once
18#endif
19
20#include <owl/gadget.h>
21
22
23namespace owl {
24
25#include <owl/preclass.h>
26
27/// \addtogroup gadgets
28/// @{
29/// \class TControlGadget
30// ~~~~~ ~~~~~~~~~~~~~~
31/// TControlGadget serves as a surrogate for TControl so that you can place TControl
32/// objects such as edit controls, buttons, sliders, gauges, or third-party
33/// controls, into a gadget window. If necessary, TControlGadget sets a parent
34/// window and creates the control gadget. See TGadget for more information about
35/// gadget objects.
36//
38 public:
40 ~TControlGadget() override;
41
42 void SetVisible(bool visible) override;
43
44 protected:
45 void Created() override;
46 void Inserted() override;
47 void Removed() override;
48
49 void InvalidateRect(const TRect& rect, bool erase = true);
50 void Update(); // Paint now if possible
51
52 void SetBounds(const TRect&) override;
53 void GetDesiredSize(TSize&) override;
54
55 public:
56 TWindow* GetControl() const;
57 void SetControl(TWindow* control);
58
60/// Points to the control window that is managed by this TControlGadget.
61 TWindow* Control;
62
63 private:
64 // Hidden to prevent accidental copying or assignment
65 //
68};
69/// @}
70
71#include <owl/posclass.h>
72
73//----------------------------------------------------------------------------
74// Inline Implementations
75//
76
77//
78/// Return the control that is simulating a gadget.
79//
81 return Control;
82}
83
84//
85/// Set the control that is simulating a gadget.
86//
88 Control = control;
89}
90
91} // OWL namespace
92
93
94#endif // OWL_CONTROLG_H
TControlGadget serves as a surrogate for TControl so that you can place TControl objects such as edit...
Definition controlg.h:37
TWindow * GetControl() const
Return the control that is simulating a gadget.
Definition controlg.h:80
void SetControl(TWindow *control)
Set the control that is simulating a gadget.
Definition controlg.h:87
TGadget is the base class for the following derived gadget classes:
Definition gadget.h:120
TBorderStyle
Gadget border styles.
Definition gadget.h:127
TRect is a mathematical class derived from tagRect.
Definition geometry.h:308
The tagSIZE struct is defined as.
Definition geometry.h:234
TWindow, derived from TEventHandler and TStreamableBase, provides window-specific behavior and encaps...
Definition window.h:414
Base class TGadget and simple derived TSeparatorGadget.
Object Windows Library (OWLNext Core)
Definition animctrl.h:22
#define protected_data
Definition defs.h:208
#define _OWLCLASS
Definition defs.h:338