9#if !defined(OWL_UIHELPER_H)
13#if defined(BI_HAS_PRAGMA_ONCE)
37#if !defined(DFC_CAPTION)
43#if !defined(DFC_SCROLL)
46#if !defined(DFC_BUTTON)
49#if !defined(DFCS_CAPTIONCLOSE)
50# define DFCS_CAPTIONCLOSE 0x0000
52#if !defined(DFCS_CAPTIONMIN)
53# define DFCS_CAPTIONMIN 0x0001
55#if !defined(DFCS_CAPTIONMAX)
56# define DFCS_CAPTIONMAX 0x0002
58#if !defined(DFCS_CAPTIONRESTORE)
59# define DFCS_CAPTIONRESTORE 0x0003
61#if !defined(DFCS_CAPTIONHELP)
62# define DFCS_CAPTIONHELP 0x0004
64#if !defined(DFCS_MENUARROW)
65# define DFCS_MENUARROW 0x0000
67#if !defined(DFCS_MENUCHECK)
68# define DFCS_MENUCHECK 0x0001
70#if !defined(DFCS_MENUBULLET)
71# define DFCS_MENUBULLET 0x0002
73#if !defined(DFCS_MENUARROWRIGHT)
74# define DFCS_MENUARROWRIGHT 0x0004
76#if !defined(DFCS_SCROLLUP)
77# define DFCS_SCROLLUP 0x0000
79#if !defined(DFCS_SCROLLDOWN)
80# define DFCS_SCROLLDOWN 0x0001
82#if !defined(DFCS_SCROLLLEFT)
83# define DFCS_SCROLLLEFT 0x0002
85#if !defined(DFCS_SCROLLRIGHT)
86# define DFCS_SCROLLRIGHT 0x0003
88#if !defined(DFCS_SCROLLCOMBOBOX)
89# define DFCS_SCROLLCOMBOBOX 0x0005
91#if !defined(DFCS_SCROLLSIZEGRIP)
92# define DFCS_SCROLLSIZEGRIP 0x0008
94#if !defined(DFCS_SCROLLSIZEGRIPRIGHT)
95# define DFCS_SCROLLSIZEGRIPRIGHT 0x0010
97#if !defined(DFCS_BUTTONCHECK)
98# define DFCS_BUTTONCHECK 0x0000
100#if !defined(DFCS_BUTTONRADIOIMAGE)
101# define DFCS_BUTTONRADIOIMAGE 0x0001
103#if !defined(DFCS_BUTTONRADIOMASK)
104# define DFCS_BUTTONRADIOMASK 0x0002
106#if !defined(DFCS_BUTTONRADIO)
107# define DFCS_BUTTONRADIO 0x0004
109#if !defined(DFCS_BUTTON3STATE)
110# define DFCS_BUTTON3STATE 0x0008
112#if !defined(DFCS_BUTTONPUSH)
113# define DFCS_BUTTONPUSH 0x0010
115#if !defined(DFCS_INACTIVE)
116# define DFCS_INACTIVE 0x0100
118#if !defined(DFCS_PUSHED)
119# define DFCS_PUSHED 0x0200
121#if !defined(DFCS_CHECKED)
122# define DFCS_CHECKED 0x0400
124#if !defined(DFCS_ADJUSTRECT)
125# define DFCS_ADJUSTRECT 0x2000
127#if !defined(DFCS_FLAT)
128# define DFCS_FLAT 0x4000
130#if !defined(DFCS_MONO)
131# define DFCS_MONO 0x8000
244 uint style = HandlesIn|Grapples|HatchBorder,
248 void MoveTo(
int x,
int y);
249 void Move(
int dx,
int dy);
250 void Size(
int w,
int h);
251 TRect GetBoundingRect()
const;
253 TWhere HitTest(
const TPoint& point)
const;
254 void Paint(
TDC& dc)
const;
256 static uint16 GetCursorId(TWhere where);
329 void MoveTo(
int x,
int y);
330 void Move(
int dx,
int dy);
331 void Size(
int w,
int h);
332 TRect GetBoundingRect()
const;
333 TRect GetClientRect()
const;
335 void Paint(
TDC& dc)
const;
343 static void PaintFrame(
TDC& dc,
const TRect& frame,
uint flags,
345 static void PaintFrameC(
TDC& dc,
const TRect& frame,
uint flags,
389 void Paint(
TDC& dc,
const TPoint& dstPt, TState state,
bool pressed,
390 bool fillFace =
true);
392 TState state,
bool pressed,
bool fillFace =
true);
393 void PaintMask(
TDC& dc,
const TPoint& pt);
397 static bool Draw(
TDC& dc, HBRUSH hbr, LPARAM lp, WPARAM wp,
398 int x,
int y,
int cx,
int cy,
uint flags);
402 static void PaintBm(
const TBitmap& glyph,
const TRect& glyphSrcRect,
404 TState state,
bool pressed,
bool fillFace,
406 static void PaintIcon(
const TIcon& icon,
const TRect& glyphSrcRect,
408 TState state,
bool pressed,
bool fillFace,
410 static void PaintText(
const tstring& text,
TDC& dc,
const TRect& faceRect,
411 const TPoint& dstPt, TState state,
bool pressed,
417 static void BuildMask(
TDC& maskDC,
const TPoint& maskDst,
const TSize& maskSize,
418 TDC& glyphDC,
const TRect& glyphRect,
420 static void FillBackground(
TDC& dc,
TDC& maskDC,
422 static void DitherBackground(
TDC& dc,
TDC& maskDC,
const TRect& dstRect);
423 static int DrawTextEtched(
TDC& dc,
const tstring& str,
int count,
430 enum TSource {sText, sBitmap, sIcon};
437 const TColor BkgndColor;
438 const TColor FillColor;
494 bool Paint(
TDC& dc,
TRect& rect, TType type, TState state);
495 bool DrawFrameControl(
TDC& dc,
TRect& rect, TType type, TState state);
525 SourceType(sBitmap), Text(), Bm(&bm), Icon(), Rect(faceRect),BkgndColor(bkgndColor),
526 FillColor(fillColor),Format(0)
537 SourceType(sText), Text(text), Bm(), Icon(), Rect(faceRect), BkgndColor(
TColor::None),
538 FillColor(fillColor),Format(format)
549 SourceType(sIcon), Text(), Bm(), Icon(&icon), Rect(faceRect),
550 BkgndColor(
TColor::None), FillColor(fillColor),Format(0)
TBitmap is the GDI bitmap class derived from TGdiObject.
The GDI Brush class is derived from TGdiObject.
Class wrapper for management of color values.
static const TColor Sys3dFace
The symbolic system color value for the face color of 3-dimensional display elements.
TDC is the root class for GDI DC wrappers.
Derived from TBrush, THatch8x8Brush defines a small, 8x8, monochrome, configurable hatch brush.
TIcon, derived from TGdiObject, represents the GDI object icon class.
TPoint is a support class, derived from tagPOINT.
TRect is a mathematical class derived from tagRect.
The tagSIZE struct is defined as.
Assists in drawing borders of many styles.
TFlag
Constructor flags to limit or modify border.
@ Diagonal
Draw diagonal edge (NotAvail intrnl).
@ Flat
Flat instead of 3d for use in non-3d windows.
@ Adjust
Adjust passed rect to client (Not Applicable).
@ Soft
Soft edge look for buttons.
TEdge
Enumeration describing the type of edge to be drawn.
@ EdgeOuter
Mask for outer edge bits.
@ RaisedOuter
Raised outer edge only.
@ RaisedInner
Raised inner edge only.
@ SunkenInner
Sunken inner edge only.
@ SunkenOuter
Sunken outer edge only.
@ EdgeInner
Mask for inner edge bits.
@ EdgeSunken
Both inner & outer sunken.
@ EdgeRaised
Both inner & outer raised.
@ EdgeEtched
Outer sunken, inner raised.
@ EdgeBump
Outer raised, inner sunken.
TStyle
Enumeration describing hilevel border styles.
@ Raised
Status field style raised.
@ ButtonUp3x
Button in up position, Win 3.x style.
@ None
No border painted at all.
@ Plain
Plain plain window frame.
@ WndRaised
Raised window outer+inner edge.
@ WellSet
Well option set (auto grows + 1) // !CQ W4 cant do.
@ WndRecessed
Input field & other window recessed.
@ Recessed
Status field style recessed.
@ ButtonDn
Button in down position.
@ Grooved
Grouping groove.
@ Embossed
Grouping raised emboss bead.
@ ButtonDn3x
Button in down position, Win 3.x style.
@ ButtonUp
Button in up position.
TUIBorder(const TRect &frame, TStyle style, uint flags=0)
Constructs a UIBorder object given a frame and a high-level style type.
TUIFace assists in painting UI elements in various states.
TState
Enumeration describing the state of the bitmap to be drawn.
@ Disabled
Disabled or Unavailable state (embossed 3d no color).
@ Indeterm
Indeterminant, or mixed-value state.
@ Default
Default btn state (bold).
@ Down
Down or Option set state (hilit background, +1,+1).
TUIFace(const TRect &faceRect, const TBitmap &bm, const TColor &bgndColor=TColor::Sys3dFace, const TColor &fillColor=TColor::Sys3dFace)
Initializes the button face with a bitmap.
Assists in drawing user manupulators for on-screen objects.
TWhere
Enumeration describing the location of a grapple selection.
@ BottomRight
Lower right corner.
@ MidRight
Middle of right edge.
@ TopLeft
Upper left corner.
@ MidLeft
Middle of left edge.
@ Outside
Hit completely outside the object.
@ TopCenter
Middle of upper edge.
@ BottomLeft
Lower left corner.
@ MidCenter
Somewhere inside the rectangle.
@ Inside
Hit inside object, not on handles, & InsideSpecial is set.
@ TopRight
Upper right corner.
@ BottomCenter
Middle of lower edge.
TUIHandle(const TRect &frame, uint style=HandlesIn|Grapples|HatchBorder, int thickness=5)
Constructs a TUIHandle object for the specified frame, with eight grapples drawn in a hatched border ...
TStyle
Enumeration describing the type of grapples to be drawn.
@ Grapples
Eight grapple boxes are drawn.
@ DashFramed
Frame rect is drawn dashed.
@ HandlesOut
Handles on the outside of the rectangle.
@ HandlesIn
Handles on the inside of the rectange.
@ HatchRect
Whole rect drawn hatched.
@ HatchBorder
Border handle area drawn hatched.
@ Framed
Frame rect is drawn solid.
@ InsideSpecial
Inside area hit-tested independently.
Wrapper for misc. Win4 USER functions.
static HANDLE LoadImage(HINSTANCE hI, LPCTSTR, uint, int, int, uint)
static bool DrawState(HDC, HBRUSH, DRAWSTATEPROC, TParam2, TParam1, int, int, int, int, UINT)
Encapsulates the DrawFrameControl 32-bit API.
TState
Enumeration describing the various glyphs available for buttons, captions, menus and scrollbar parts.
@ CaptionRestore
Restore button.
@ CaptionMax
Maximize button.
@ ScrollSizeGrip
Size grip in bottom-right corner of window.
@ ScrollLeft
Left arrow of scroll bar.
@ Mono
Draw button with monochrome border.
@ ButtonRadioImage
Image for radio button (nonsquare needs image).
@ ScrollUp
Up arrow of scroll bar.
@ Inactive
Draw button grayed.
@ ScrollRight
Right arrow of scroll bar.
@ ScrollCombo
Combo box scroll bar.
@ Pushed
Draw button pushed.
@ Checked
Draw button as checked.
@ CaptionClose
Close button.
@ ScrollDown
Down arrow of scroll bar.
@ ButtonRadioMask
Mask for radio button (nonsquare needs mask).
@ MenuArrow
Submenu arrow.
@ Button3State
Three-state button.
@ ButtonRadio
Radio button.
@ Flat
Draw button with flat border.
@ CaptionMin
Minimize button.
@ CaptionHelp
Help button.
TType
Enumeration describing the part to be drawn.
@ uiScroll
Draw a scroll bar glyph.
@ uiMenu
Draw a menu glyph.
@ uiCaption
Draw a caption glyph.
@ uiButton
Draw a button glyph.
TUIPart()
Empty constructor.
Definition of windowing system color classes.
Definition of TEventHandler and related classes & macros.
TEdge
The TEdge enum describes the following constants that define the boundaries of a window:
Object Windows Library (OWLNext Core).
LPARAM TParam2
Second parameter type.
WPARAM TParam1
First parameter type.
General definitions used by all ObjectWindows programs.
#define DFCS_CAPTIONCLOSE
#define DFCS_SCROLLSIZEGRIP
#define DFCS_BUTTON3STATE
#define DFCS_CAPTIONRESTORE
#define DFCS_BUTTONRADIOMASK
#define DFCS_BUTTONRADIOIMAGE
#define DFCS_SCROLLCOMBOBOX
Classes for window system structure and type encapsulation.