OWLNext    7.0
Borland's Object Windows Library for the modern age
Loading...
Searching...
No Matches
uihelper.h
Go to the documentation of this file.
1//----------------------------------------------------------------------------
2// ObjectWindows
3// Copyright (c) 1994, 1996 by Borland International, All Rights Reserved
4//
5/// \file
6/// Definition of the UI Helper Classes: TUIHandle, TUIBorder, TUIFace, TUIPart
7//----------------------------------------------------------------------------
8
9#if !defined(OWL_UIHELPER_H)
10#define OWL_UIHELPER_H
11
12#include <owl/private/defs.h>
13#if defined(BI_HAS_PRAGMA_ONCE)
14# pragma once
15#endif
16
17#include <owl/defs.h>
18#include <owl/eventhan.h>
19#include <owl/wsyscls.h>
20#include <owl/color.h>
21
22
23namespace owl {
24
25#include <owl/preclass.h>
26
27class _OWLCLASS TDC;
28class _OWLCLASS TBrush;
29class _OWLCLASS THatch8x8Brush;
30class _OWLCLASS TBitmap;
31class _OWLCLASS TIcon;
32class _OWLCLASS TColor;
33
34//
35// Flags of DrawFrameControl API
36//
37#if !defined(DFC_CAPTION)
38# define DFC_CAPTION 1
39#endif
40#if !defined(DFC_MENU)
41# define DFC_MENU 2
42#endif
43#if !defined(DFC_SCROLL)
44# define DFC_SCROLL 3
45#endif
46#if !defined(DFC_BUTTON)
47# define DFC_BUTTON 4
48#endif
49#if !defined(DFCS_CAPTIONCLOSE)
50# define DFCS_CAPTIONCLOSE 0x0000
51#endif
52#if !defined(DFCS_CAPTIONMIN)
53# define DFCS_CAPTIONMIN 0x0001
54#endif
55#if !defined(DFCS_CAPTIONMAX)
56# define DFCS_CAPTIONMAX 0x0002
57#endif
58#if !defined(DFCS_CAPTIONRESTORE)
59# define DFCS_CAPTIONRESTORE 0x0003
60#endif
61#if !defined(DFCS_CAPTIONHELP)
62# define DFCS_CAPTIONHELP 0x0004
63#endif
64#if !defined(DFCS_MENUARROW)
65# define DFCS_MENUARROW 0x0000
66#endif
67#if !defined(DFCS_MENUCHECK)
68# define DFCS_MENUCHECK 0x0001
69#endif
70#if !defined(DFCS_MENUBULLET)
71# define DFCS_MENUBULLET 0x0002
72#endif
73#if !defined(DFCS_MENUARROWRIGHT)
74# define DFCS_MENUARROWRIGHT 0x0004
75#endif
76#if !defined(DFCS_SCROLLUP)
77# define DFCS_SCROLLUP 0x0000
78#endif
79#if !defined(DFCS_SCROLLDOWN)
80# define DFCS_SCROLLDOWN 0x0001
81#endif
82#if !defined(DFCS_SCROLLLEFT)
83# define DFCS_SCROLLLEFT 0x0002
84#endif
85#if !defined(DFCS_SCROLLRIGHT)
86# define DFCS_SCROLLRIGHT 0x0003
87#endif
88#if !defined(DFCS_SCROLLCOMBOBOX)
89# define DFCS_SCROLLCOMBOBOX 0x0005
90#endif
91#if !defined(DFCS_SCROLLSIZEGRIP)
92# define DFCS_SCROLLSIZEGRIP 0x0008
93#endif
94#if !defined(DFCS_SCROLLSIZEGRIPRIGHT)
95# define DFCS_SCROLLSIZEGRIPRIGHT 0x0010
96#endif
97#if !defined(DFCS_BUTTONCHECK)
98# define DFCS_BUTTONCHECK 0x0000
99#endif
100#if !defined(DFCS_BUTTONRADIOIMAGE)
101# define DFCS_BUTTONRADIOIMAGE 0x0001
102#endif
103#if !defined(DFCS_BUTTONRADIOMASK)
104# define DFCS_BUTTONRADIOMASK 0x0002
105#endif
106#if !defined(DFCS_BUTTONRADIO)
107# define DFCS_BUTTONRADIO 0x0004
108#endif
109#if !defined(DFCS_BUTTON3STATE)
110# define DFCS_BUTTON3STATE 0x0008
111#endif
112#if !defined(DFCS_BUTTONPUSH)
113# define DFCS_BUTTONPUSH 0x0010
114#endif
115#if !defined(DFCS_INACTIVE)
116# define DFCS_INACTIVE 0x0100
117#endif
118#if !defined(DFCS_PUSHED)
119# define DFCS_PUSHED 0x0200
120#endif
121#if !defined(DFCS_CHECKED)
122# define DFCS_CHECKED 0x0400
123#endif
124#if !defined(DFCS_ADJUSTRECT)
125# define DFCS_ADJUSTRECT 0x2000
126#endif
127#if !defined(DFCS_FLAT)
128# define DFCS_FLAT 0x4000
129#endif
130#if !defined(DFCS_MONO)
131# define DFCS_MONO 0x8000
132#endif
133
134
135//
136/// \class TUIHandle
137// ~~~~~ ~~~~~~~~~
138/// Assists in drawing user manupulators for on-screen objects
139//
140/// TUIHandle manages and draws various kinds of UI handles, including hatched
141/// border handles, and resizing grapples (small squares that appear along the
142/// edges) on a rectangle. You can use this class to create a hatched border that
143/// encloses various kinds of drawing objects you want to manipulate.
144///
145/// With the help of this class, you can create an application that lets you
146/// - Resize the shape of the rectangle by pointing to and grabbing one
147/// of the grapples on the border
148/// - Move the entire rectangle by clicking in the middle of the
149/// rectangle
150///
151/// Although by default a hatched border with eight grapples is created, you can
152/// control whether grapples appear. In addition, you can vary the pattern of the
153/// border by drawing a dashed frame enclosing a rectangle or a rectangle filled
154/// with hatch marks. TuiHandle uses THatch8x8Brush to draw the hatched border.
155///
156/// TUIHandle uses the enum TWhere to return the area where the user points and
157/// clicks the mouse (referred to as a hit area).
158///
159/// The following diagram displays a UI handle and identifies several small square
160/// grapples where hit testing occurs.
161/// \image html bm267.BMP
162///
163/// The following code fragment sets up a hatched border and UI grapples for an OLE
164/// 2 container application:
165/// \code
166/// // Do the default rectangle painting.
167/// .
168/// .
169/// .
170/// TRect r //...; Insert your rectangle drawing code here.
171///
172/// // Draw 8 grapples with a border on top of the object.
173/// TUIHandle handle(r, TUIHandle::HandlesIn|
174/// TUIHandle::Grapples|
175/// TUIHandle::HatchBorder, 5);
176/// handle.Paint(dc);
177/// // Insert your code here....
178/// .
179/// .
180/// .
181/// // Draw a hatched border.
182/// TUIHandle handle(r, TUIHandle::HatchBorder, 5);
183/// handle.Paint(dc);
184/// \endcode
185//
187 public:
188
189 /// Enumeration describing the location of a grapple selection.
190 /// These constants typically refer to the [mouse] hittest location
191 /// which caused the grapples to response to a move or resize operation.
192 //
193 /// The InsideSpecial designation refers to the area inside the rectangle when the
194 /// hit area needs to be treated specially (for example, because it might contain
195 /// text or graphics). Normally, if the area inside the rectangle is hit, it means
196 /// that user wants to move the rectangle. However, if there is text inside the
197 /// rectangle, the user might click on this area in order to enter text. This latter
198 /// situation is referred to as an inside special case.
199 ///
200 /// The hit area (Where) can be converted to a row and a column by using the
201 /// following equations:
202 /// - Row = Where / 3
203 /// - Column = Where mod 3
204 ///
205 /// The value of Where ranges from 0 (TopLeft) to 8 (BottomRight) and corresponds to
206 /// the following areas of a rectangle:
207 /// \image html bm268.BMP
208 ///
209 /// You can then use these values to calculate the movement of the object and to
210 /// resize the object.
211 //
212 enum TWhere {
213 TopLeft = 0, ///< Upper left corner
214 TopCenter = 1, ///< Middle of upper edge
215 TopRight = 2, ///< Upper right corner
216 MidLeft = 3, ///< Middle of left edge
217 MidCenter = 4, ///< Somewhere inside the rectangle
218 MidRight = 5, ///< Middle of right edge
219 BottomLeft = 6, ///< Lower left corner
220 BottomCenter= 7, ///< Middle of lower edge
221 BottomRight = 8, ///< Lower right corner
222 Outside =-1, ///< Hit completely outside the object
223 Inside =-2 ///< Hit inside object, not on handles, & InsideSpecial is set
224 };
225
226 /// Enumeration describing the type of grapples to be drawn
227 //
228 /// If a hatched border with grapples is drawn inside a rectangle, it sits within
229 /// the borders of the outer frame of the rectangle. If a hatched border with
230 /// grapples is drawn outside the rectangle, it is drawn outside the boundary of the
231 /// rectangle's frame. In the latter case, the function GetBoundingRect() returns a
232 /// larger rectangle.
233 enum TStyle {
234 HandlesIn = 0, ///< Handles on the inside of the rectange
235 HandlesOut = 1, ///< Handles on the outside of the rectangle
236 Framed = 2, ///< Frame rect is drawn solid
237 DashFramed = 4, ///< Frame rect is drawn dashed
238 Grapples = 8, ///< Eight grapple boxes are drawn
239 HatchBorder = 16, ///< Border handle area drawn hatched
240 HatchRect = 32, ///< Whole rect drawn hatched
241 InsideSpecial = 64, ///< Inside area hit-tested independently
242 };
243 TUIHandle(const TRect& frame,
244 uint style = HandlesIn|Grapples|HatchBorder,
245 int thickness = 5);
246 // !CQ Use TSysMetric::CxEdge, CxBorder...
247
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;
252
253 TWhere HitTest(const TPoint& point) const;
254 void Paint(TDC& dc) const;
255
256 static uint16 GetCursorId(TWhere where);
257
258 private:
259 TRect Frame;
260 uint Style;
261 TPoint HandleBox;
262};
263
264//
265/// \class TUIBorder
266// ~~~~~ ~~~~~~~~~
267/// Assists in drawing borders of many styles.
268/// Uses win4.0 calls when available
269//
271 public:
272 /// Constructor flags to limit or modify border
273 //
274 enum TFlag {
275 // Which edge(s) to draw. ctor defaults to all 4
276 Left = 0x0001,
277 Top = 0x0002,
278 Right = 0x0004,
279 Bottom = 0x0008,
280 TopLeft = Top | Left,
281 TopRight = Top | Right,
282 BottomLeft = Bottom | Left,
283 BottomRight = Bottom | Right,
284 Rect = Top | Left | Bottom | Right,
285
286 Diagonal = 0x0010, ///< Draw diagonal edge (NotAvail intrnl)
287 Fill = 0x0800, ///< Fill in middle
288 Soft = 0x1000, ///< Soft edge look for buttons
289 Adjust = 0x2000, ///< Adjust passed rect to client (Not Applicable)
290 Flat = 0x4000, ///< Flat instead of 3d for use in non-3d windows
291 Mono = 0x8000, ///< Monochrome
292 };
293
294 /// Enumeration describing hilevel border styles
295 //
296 enum TStyle {
297 None, ///< No border painted at all
298 Plain, ///< Plain plain window frame
299 Raised, ///< Status field style raised
300 Recessed, ///< Status field style recessed
301 Embossed, ///< Grouping raised emboss bead
302 Grooved, ///< Grouping groove
303 ButtonUp, ///< Button in up position
304 ButtonDn, ///< Button in down position
305 WndRaised, ///< Raised window outer+inner edge
306 WndRecessed, ///< Input field & other window recessed
307 WellSet, ///< Well option set (auto grows + 1) // !CQ W4 cant do
308 ButtonUp3x, ///< Button in up position, Win 3.x style
309 ButtonDn3x, ///< Button in down position, Win 3.x style
310 };
311 TUIBorder(const TRect& frame, TStyle style, uint flags = 0);
312
313 /// Enumeration describing the type of edge to be drawn
314 //
315 enum TEdge {
316 RaisedOuter = 0x01, ///< Raised outer edge only
317 SunkenOuter = 0x02, ///< Sunken outer edge only
318 RaisedInner = 0x04, ///< Raised inner edge only
319 SunkenInner = 0x08, ///< Sunken inner edge only
320 EdgeOuter = 0x03, ///< Mask for outer edge bits
321 EdgeInner = 0x0C, ///< Mask for inner edge bits
322 EdgeRaised = RaisedOuter | RaisedInner, ///< Both inner & outer raised
323 EdgeSunken = SunkenOuter | SunkenInner, ///< Both inner & outer sunken
324 EdgeEtched = SunkenOuter | RaisedInner, ///< Outer sunken, inner raised
325 EdgeBump = RaisedOuter | SunkenInner, ///< Outer raised, inner sunken
326 };
327 TUIBorder(const TRect& frame, TEdge edge, uint flags = 0);
328
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;
334
335 void Paint(TDC& dc) const;
336
337 // Wrapper / Emulation of Win4.0 API call
338 //
339 static bool DrawEdge(TDC& dc, const TRect& frame, uint edge, uint flags);
340
341 // Paint a 2-color frame. With and w/o bevel corner color specified
342 //
343 static void PaintFrame(TDC& dc, const TRect& frame, uint flags,
344 const TColor& tlColor, const TColor& brColor);
345 static void PaintFrameC(TDC& dc, const TRect& frame, uint flags,
346 const TColor& tlColor, const TColor& brColor,
347 const TColor& bcColor);
348
349 // Paint a custom frame
350 //
351// static void PaintWT(TDC& dc, const TRect& frame); // WindowText color
352// static void Paint3H(TDC& dc, const TRect& frame); // 3dHighlight color
353
354 protected:
355 private:
356 TRect Frame;
357// uint Style;
358 uint Edge;
359 uint Flags;
360};
361
362//
363/// \class TUIFace
364// ~~~~~ ~~~~~~~
365/// TUIFace assists in painting UI elements in various states.
366//
368 public:
369
370 /// Enumeration describing the state of the bitmap to be drawn
371 //
372 enum TState {
373 Normal, ///< Normal state
374 Down, ///< Down or Option set state (hilit background, +1,+1)
375 Indeterm, ///< Indeterminant, or mixed-value state
376 Disabled, ///< Disabled or Unavailable state (embossed 3d no color)
377 Default, ///< Default btn state (bold)
378 };
379
380 TUIFace(const TRect& faceRect, const TBitmap& bm,
381 const TColor& bgndColor = TColor::Sys3dFace,
382 const TColor& fillColor = TColor::Sys3dFace);
383 TUIFace(const TRect& faceRect, const tstring& text,
384 const TColor& fillColor = TColor::Sys3dFace, uint format=0);
385 TUIFace(const TRect& faceRect, const TIcon& icon,
386 const TColor& bgndColor = TColor::Sys3dFace,
387 const TColor& fillColor = TColor::Sys3dFace);
388
389 void Paint(TDC& dc, const TPoint& dstPt, TState state, bool pressed,
390 bool fillFace = true);
391 void Paint(TDC& dc, const TRect& srcRect, const TPoint& dstPt,
392 TState state, bool pressed, bool fillFace = true);
393 void PaintMask(TDC& dc, const TPoint& pt);
394
395 // Wrapper / Emulation of Win4.0 API call [::DrawState]
396 //
397 static bool Draw(TDC& dc, HBRUSH hbr, LPARAM lp, WPARAM wp,
398 int x, int y, int cx, int cy, uint flags);
399
400 // Internal static helper functions that can be used alone
401 //
402 static void PaintBm(const TBitmap& glyph, const TRect& glyphSrcRect,
403 TDC& dc, const TRect& faceRect, const TPoint& dstPt,
404 TState state, bool pressed, bool fillFace,
405 const TColor& maskColor, const TColor& fillColor);
406 static void PaintIcon(const TIcon& icon, const TRect& glyphSrcRect,
407 TDC& dc, const TRect& faceRect, const TPoint& dstPt,
408 TState state, bool pressed, bool fillFace,
409 const TColor& maskColor, const TColor& fillColor);
410 static void PaintText(const tstring& text, TDC& dc, const TRect& faceRect,
411 const TPoint& dstPt, TState state, bool pressed,
412 bool fillFace, const TColor& fillColor, uint16 format);
413
414 static void PaintMaskBm(const TBitmap& glyph, TDC& dc, const TPoint& pt,
415 const TColor& maskColor);
416
417 static void BuildMask(TDC& maskDC, const TPoint& maskDst, const TSize& maskSize,
418 TDC& glyphDC, const TRect& glyphRect,
419 const TColor& maskColor);
420 static void FillBackground(TDC& dc, TDC& maskDC,
421 const TRect& dstRect, const TBrush& brush);
422 static void DitherBackground(TDC& dc, TDC& maskDC, const TRect& dstRect);
423 static int DrawTextEtched(TDC& dc, const tstring& str, int count,
424 const TRect& rect, uint16 format);
425
426 static THatch8x8Brush& GetDitherBrush();
427 static TBitmap& GetGlyphMask(const TSize& minSize);
428
429 private:
430 enum TSource {sText, sBitmap, sIcon};
431 TSource SourceType;
432 tstring Text;
433 const TBitmap* Bm;
434 const TIcon* Icon;
435
436 const TRect Rect;
437 const TColor BkgndColor;
438 const TColor FillColor;
439 uint Format;
440};
441
442
443//
444/// \class TUIPart
445// ~~~~~ ~~~~~~~
446/// Encapsulates the DrawFrameControl 32-bit API.
447//
449 public:
450
451 /// Enumeration describing the part to be drawn.
452 /// \note TType describes the part, TState then refines the exact
453 /// glyph of the selected part.
454 //
455 enum TType {
456 uiButton = DFC_BUTTON, ///< Draw a button glyph
457 uiCaption = DFC_CAPTION, ///< Draw a caption glyph
458 uiMenu = DFC_MENU, ///< Draw a menu glyph
459 uiScroll = DFC_SCROLL ///< Draw a scroll bar glyph
460 };
461
462 /// Enumeration describing the various glyphs available for buttons,
463 /// captions, menus and scrollbar parts.
464 //
465 enum TState {
466 Button3State = DFCS_BUTTON3STATE, ///< Three-state button
467 ButtonCheck = DFCS_BUTTONCHECK, ///< Check box
468 ButtonPush = DFCS_BUTTONPUSH, ///< Push button
469 ButtonRadio = DFCS_BUTTONRADIO, ///< Radio button
470 ButtonRadioImage = DFCS_BUTTONRADIOIMAGE, ///< Image for radio button (nonsquare needs image)
471 ButtonRadioMask = DFCS_BUTTONRADIOMASK, ///< Mask for radio button (nonsquare needs mask)
472 Checked = DFCS_CHECKED, ///< Draw button as checked
473 Flat = DFCS_FLAT, ///< Draw button with flat border
474 Inactive = DFCS_INACTIVE, ///< Draw button grayed
475 Mono = DFCS_MONO, ///< Draw button with monochrome border
476 Pushed = DFCS_PUSHED, ///< Draw button pushed
477 CaptionClose = DFCS_CAPTIONCLOSE, ///< Close button
478 CaptionHelp = DFCS_CAPTIONHELP, ///< Help button
479 CaptionMax = DFCS_CAPTIONMAX, ///< Maximize button
480 CaptionMin = DFCS_CAPTIONMIN, ///< Minimize button
481 CaptionRestore = DFCS_CAPTIONRESTORE, ///< Restore button
482 MenuArrow = DFCS_MENUARROW, ///< Submenu arrow
483 MenuBullet = DFCS_MENUBULLET, ///< Bullet
484 MenuCheck = DFCS_MENUCHECK, ///< Check mark
485 ScrollCombo = DFCS_SCROLLCOMBOBOX, ///< Combo box scroll bar
486 ScrollDown = DFCS_SCROLLDOWN, ///< Down arrow of scroll bar
487 ScrollLeft = DFCS_SCROLLLEFT, ///< Left arrow of scroll bar
488 ScrollRight = DFCS_SCROLLRIGHT, ///< Right arrow of scroll bar
489 ScrollSizeGrip = DFCS_SCROLLSIZEGRIP, ///< Size grip in bottom-right corner of window
490 ScrollUp = DFCS_SCROLLUP ///< Up arrow of scroll bar
491 };
492
493 TUIPart();
494 bool Paint(TDC& dc, TRect& rect, TType type, TState state);
495 bool DrawFrameControl(TDC& dc, TRect& rect, TType type, TState state);
496
497 protected:
498};
499
500
501//
502/// \class TUIHelper
503// ~~~~~ ~~~~~~~~~
504/// Wrapper for misc. Win4 USER functions.
505//
507 public:
509 static bool DrawState(HDC, HBRUSH, DRAWSTATEPROC, TParam2, TParam1, int, int, int, int, UINT);
510};
511
512#include <owl/posclass.h>
513
514//----------------------------------------------------------------------------
515// Inline implementations
516//
517
518//
519/// Initializes the button face with a bitmap.
520//
521inline
523 const TColor& bkgndColor, const TColor& fillColor)
524:
525 SourceType(sBitmap), Text(), Bm(&bm), Icon(), Rect(faceRect),BkgndColor(bkgndColor),
526 FillColor(fillColor),Format(0)
527{
528}
529
530//
531/// Initializes the button face with a text string.
532//
533inline
535 const TColor& fillColor, uint format)
536:
537 SourceType(sText), Text(text), Bm(), Icon(), Rect(faceRect), BkgndColor(TColor::None),
538 FillColor(fillColor),Format(format)
539{
540}
541
542//
543/// Initializes the button face with an icon.
544//
545inline
547 const TColor& /*bkgndColor*/, const TColor& fillColor)
548:
549 SourceType(sIcon), Text(), Bm(), Icon(&icon), Rect(faceRect),
550 BkgndColor(TColor::None), FillColor(fillColor),Format(0)
551{
552}
553
554} // OWL namespace
555
556
557#endif // OWL_UIHELPER_H
TBitmap is the GDI bitmap class derived from TGdiObject.
Definition gdiobjec.h:510
The GDI Brush class is derived from TGdiObject.
Definition gdiobjec.h:180
Class wrapper for management of color values.
Definition color.h:245
TDC is the root class for GDI DC wrappers.
Definition dc.h:64
Derived from TBrush, THatch8x8Brush defines a small, 8x8, monochrome, configurable hatch brush.
Definition gdiobjec.h:250
TIcon, derived from TGdiObject, represents the GDI object icon class.
Definition gdiobjec.h:670
TPoint is a support class, derived from tagPOINT.
Definition geometry.h:87
TRect is a mathematical class derived from tagRect.
Definition geometry.h:308
The tagSIZE struct is defined as.
Definition geometry.h:234
Assists in drawing borders of many styles.
Definition uihelper.h:270
TFlag
Constructor flags to limit or modify border.
Definition uihelper.h:274
TEdge
Enumeration describing the type of edge to be drawn.
Definition uihelper.h:315
TStyle
Enumeration describing hilevel border styles.
Definition uihelper.h:296
@ Raised
Status field style raised.
Definition uihelper.h:299
@ ButtonUp3x
Button in up position, Win 3.x style.
Definition uihelper.h:308
@ None
No border painted at all.
Definition uihelper.h:297
@ Plain
Plain plain window frame.
Definition uihelper.h:298
@ WndRaised
Raised window outer+inner edge.
Definition uihelper.h:305
@ WellSet
Well option set (auto grows + 1) // !CQ W4 cant do.
Definition uihelper.h:307
@ WndRecessed
Input field & other window recessed.
Definition uihelper.h:306
@ Recessed
Status field style recessed.
Definition uihelper.h:300
@ ButtonDn
Button in down position.
Definition uihelper.h:304
@ Grooved
Grouping groove.
Definition uihelper.h:302
@ Embossed
Grouping raised emboss bead.
Definition uihelper.h:301
@ ButtonDn3x
Button in down position, Win 3.x style.
Definition uihelper.h:309
@ ButtonUp
Button in up position.
Definition uihelper.h:303
TUIFace assists in painting UI elements in various states.
Definition uihelper.h:367
TState
Enumeration describing the state of the bitmap to be drawn.
Definition uihelper.h:372
@ Disabled
Disabled or Unavailable state (embossed 3d no color)
Definition uihelper.h:376
@ Indeterm
Indeterminant, or mixed-value state.
Definition uihelper.h:375
@ Default
Default btn state (bold)
Definition uihelper.h:377
@ Down
Down or Option set state (hilit background, +1,+1)
Definition uihelper.h:374
@ Normal
Normal state.
Definition uihelper.h:373
TUIFace(const TRect &faceRect, const TBitmap &bm, const TColor &bgndColor=TColor::Sys3dFace, const TColor &fillColor=TColor::Sys3dFace)
Initializes the button face with a bitmap.
Definition uihelper.h:522
Assists in drawing user manupulators for on-screen objects.
Definition uihelper.h:186
TWhere
Enumeration describing the location of a grapple selection.
Definition uihelper.h:212
TStyle
Enumeration describing the type of grapples to be drawn.
Definition uihelper.h:233
Wrapper for misc. Win4 USER functions.
Definition uihelper.h:506
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.
Definition uihelper.h:448
TState
Enumeration describing the various glyphs available for buttons, captions, menus and scrollbar parts.
Definition uihelper.h:465
TType
Enumeration describing the part to be drawn.
Definition uihelper.h:455
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:
Definition layoutco.h:36
Object Windows Library (OWLNext Core)
Definition animctrl.h:22
unsigned short uint16
Definition number.h:33
std::string tstring
Definition defs.h:79
unsigned int uint
Definition number.h:25
General definitions used by all ObjectWindows programs.
#define _OWLCLASS
Definition defs.h:338
#define DFCS_MENUCHECK
Definition uihelper.h:68
#define DFC_SCROLL
Definition uihelper.h:44
#define DFC_MENU
Definition uihelper.h:41
#define DFCS_BUTTONPUSH
Definition uihelper.h:113
#define DFCS_CAPTIONMIN
Definition uihelper.h:53
#define DFCS_CAPTIONCLOSE
Definition uihelper.h:50
#define DFCS_FLAT
Definition uihelper.h:128
#define DFCS_BUTTONCHECK
Definition uihelper.h:98
#define DFCS_INACTIVE
Definition uihelper.h:116
#define DFC_BUTTON
Definition uihelper.h:47
#define DFCS_SCROLLSIZEGRIP
Definition uihelper.h:92
#define DFCS_MENUARROW
Definition uihelper.h:65
#define DFCS_SCROLLUP
Definition uihelper.h:77
#define DFC_CAPTION
Definition uihelper.h:38
#define DFCS_MONO
Definition uihelper.h:131
#define DFCS_BUTTON3STATE
Definition uihelper.h:110
#define DFCS_CAPTIONRESTORE
Definition uihelper.h:59
#define DFCS_BUTTONRADIOMASK
Definition uihelper.h:104
#define DFCS_BUTTONRADIO
Definition uihelper.h:107
#define DFCS_BUTTONRADIOIMAGE
Definition uihelper.h:101
#define DFCS_SCROLLCOMBOBOX
Definition uihelper.h:89
#define DFCS_CHECKED
Definition uihelper.h:122
#define DFCS_SCROLLLEFT
Definition uihelper.h:83
#define DFCS_SCROLLRIGHT
Definition uihelper.h:86
#define DFCS_CAPTIONMAX
Definition uihelper.h:56
#define DFCS_SCROLLDOWN
Definition uihelper.h:80
#define DFCS_MENUBULLET
Definition uihelper.h:71
#define DFCS_PUSHED
Definition uihelper.h:119
#define DFCS_CAPTIONHELP
Definition uihelper.h:62
Classes for window system structure and type encapsulation.