41 int x,
int y,
int w,
int h,
60 int x,
int y,
int w,
int h,
77 int x,
int y,
int w,
int h,
83 LedSpacing = ((Attr.H - 2*Margin) * 2) / 3 + 2*Margin;
84 LedThick = 100 * LedSpacing / (LedSpacing - 2*Margin);
183 else if (
value < Min)
188 if (
value != Value) {
207 if (
delta + Value > Max)
210 else if (
delta + Value < Min)
231 if (Value + Step < Max)
289 for (
int i = 0;
i < Margin;
i++) {
336 for (; x < right; x +=
ledStep) {
349 for (; y > top; y -=
ledStep) {
The GDI Brush class is derived from TGdiObject.
Class wrapper for management of color values.
static const TColor SysHighlight
The symbolic system color value for items selected in a control.
static const TColor Sys3dHilight
The symbolic system color value for highlighted 3-dimensional display elements (for edges facing the ...
static const TColor None
not-a-color
static const TColor Sys3dShadow
The symbolic system color value for the shadow regions of 3-dimensional display elements (for edges f...
static const TColor Sys3dFace
The symbolic system color value for the face color of 3-dimensional display elements.
TControl unifies its derived control classes, such as TScrollBar, TControlGadget, and TButton.
TDC is the root class for GDI DC wrappers.
bool FrameRect(int x1, int y1, int x2, int y2, const TBrush &brush)
Draws a border on this DC around the given rectangle, rect, using the given brush,...
void SelectObject(const TBrush &brush)
Selects the given GDI brush object into this DC.
bool GetTextExtent(const tstring &str, int stringLen, TSize &size) const
Computes the extent (width and height) in logical units of the text line consisting of stringLen char...
bool FillRect(int x1, int y1, int x2, int y2, const TBrush &brush)
Fills the given rectangle on this DC using the specified brush.
virtual bool ExtTextOut(int x, int y, uint16 options, const TRect *r, const tstring &str, int count=-1, const int *dx=nullptr)
Draws up to count characters of the given null-terminated string in the current font on this DC.
virtual TColor SetTextColor(const TColor &color)
Sets the current text color of this DC to the given color value.
int SetBkMode(int mode)
Sets the background mode to the given mode argument, which can be either OPAQUE or TRANSPARENT.
bool PatBlt(int x, int y, int w, int h, uint32 rop=PATCOPY)
virtual void PaintBorder(TDC &dc)
Paints the border (bevel and margin).
void SetupWindow() override
If a system control is being used, updates it to match our member settings.
void Paint(TDC &, bool erase, TRect &) override
Overrides TWindow::Paint and paints the area and the border of the gauge.
void SetValue(int value)
Set the value of the gauge.
auto GetWindowClassName() -> TWindowClassName override
Returns the class name of the gauge class.
TGauge(TWindow *parent, LPCTSTR title, int id, int x, int y, int w, int h=0, bool isHorizontal=true, int margin=1, TModule *module=0)
General constructor for a TGauge object - Use this constructor if you are creating an object whose fe...
void DeltaValue(int delta)
Changes the value of the gauge by the given delta.
void StepIt()
Adjusts the active gauge value by the Step increment.
void SetLed(int spacing, int thickPercent=90)
Sets the LedSpacing and LedThick data members to the values spacing and thick.
void SetBkgndColor(const TColor &color)
void SetColor(const TColor &color)
Sets the BarColor data member to the value specified in color.
void Init(bool isHorizontal, int margin)
bool EvEraseBkgnd(HDC)
Overrides the TWindow::EvEraseBkgnd function and erases the background of the gauge.
void SetRange(int minValue, int maxValue)
Sets the Min and Max data members to minValue and maxValue values returned by the constructor.
void SetStep(int step)
Sets the Step amount of the gauge for StepIt operations.
ObjectWindows dynamic-link libraries (DLLs) construct an instance of TModule, which acts as an object...
TRect is a mathematical class derived from tagRect.
The tagSIZE struct is defined as.
TUIMetric encapsulates the GetSystemMetric() API.
static const TUIMetric CyBorder
static const TUIMetric CxBorder
Type-safe encapsulation of a Windows class name, a union between ATOM and LPCTSTR.
TWindow, derived from TEventHandler and TStreamableBase, provides window-specific behavior and encaps...
void SetBkgndColor(TColor color, bool shouldUpdate=true)
Sets the background color for the window.
auto GetBkgndColor() const -> TColor
Returns the overriding background color set for the window.
LPCTSTR GetCaption() const
Returns the Title member of TWindow.
TRect GetClientRect() const
Gets the coordinates of the window's client area (the area in a window you can use for drawing).
virtual void SetupWindow()
Performs setup following creation of an associated MS-Windows window.
virtual void Invalidate(bool erase=true)
Invalidates (mark for painting) the entire client area of a window.
HWND GetHandle() const
Returns the handle of the window.
Definition of GDI DC encapsulation classes: TDC, TWindowDC, TScreenDC, TDesktopDC,...
#define DEFINE_RESPONSE_TABLE1(cls, base)
Macro to define a response table for a class with one base.
Definition of class TGauge, a gauge control encapsulation & implementation.
Object Windows Library (OWLNext Core)
void InUse(const T &arg)
Handy utility to avoid compiler warnings about unused parameters.
Definition of TUIMetric, a UI metrics provider class.