OWLNext 7.0
Borland's Object Windows Library for the modern age
|
Assists in drawing borders of many styles. More...
#include <owl/uihelper.h>
Public Types | |
enum | TFlag { Left = 0x0001 , Top = 0x0002 , Right = 0x0004 , Bottom = 0x0008 , TopLeft = Top | Left , TopRight = Top | Right , BottomLeft = Bottom | Left , BottomRight = Bottom | Right , Rect = Top | Left | Bottom | Right , Diagonal = 0x0010 , Fill = 0x0800 , Soft = 0x1000 , Adjust = 0x2000 , Flat = 0x4000 , Mono = 0x8000 } |
Constructor flags to limit or modify border. More... | |
enum | TStyle { None , Plain , Raised , Recessed , Embossed , Grooved , ButtonUp , ButtonDn , WndRaised , WndRecessed , WellSet , ButtonUp3x , ButtonDn3x } |
Enumeration describing hilevel border styles. More... | |
enum | TEdge { RaisedOuter = 0x01 , SunkenOuter = 0x02 , RaisedInner = 0x04 , SunkenInner = 0x08 , EdgeOuter = 0x03 , EdgeInner = 0x0C , EdgeRaised = RaisedOuter | RaisedInner , EdgeSunken = SunkenOuter | SunkenInner , EdgeEtched = SunkenOuter | RaisedInner , EdgeBump = RaisedOuter | SunkenInner } |
Enumeration describing the type of edge to be drawn. More... | |
Public Member Functions | |
TUIBorder (const TRect &frame, TStyle style, uint flags=0) | |
Constructs a UIBorder object given a frame and a high-level style type. | |
TUIBorder (const TRect &frame, TEdge edge, uint flags=0) | |
Constructs a UIBorder object given a frame, edge, and modifier flags. | |
void | MoveTo (int x, int y) |
Moves the frame rect to (x,y). | |
void | Move (int dx, int dy) |
Moves the frame rect by (dx,dy). | |
void | Size (int w, int h) |
Resizes the frame rect to (w,h). | |
TRect | GetBoundingRect () const |
Calculates the outside frame rectangle. | |
TRect | GetClientRect () const |
Calculates the rectangle within the border. | |
void | Paint (TDC &dc) const |
Paints this UIBorder object onto a given device context. | |
Static Public Member Functions | |
static bool | DrawEdge (TDC &dc, const TRect &frame, uint edge, uint flags) |
This is a static function that performs the actual drawing of edges for a UIBorder or an external client. | |
static void | PaintFrame (TDC &dc, const TRect &frame, uint flags, const TColor &tlColor, const TColor &brColor) |
Paints a 2-color single pixel-thick frame. Bevel corners get brush color. | |
static void | PaintFrameC (TDC &dc, const TRect &frame, uint flags, const TColor &tlColor, const TColor &brColor, const TColor &bcColor) |
Paints a 2-color single pixel-thick frame. Bevel corners get their own color. | |
Assists in drawing borders of many styles.
Uses win4.0 calls when available
Definition at line 270 of file uihelper.h.
Enumeration describing the type of edge to be drawn.
Definition at line 315 of file uihelper.h.
Constructor flags to limit or modify border.
Definition at line 274 of file uihelper.h.
Enumeration describing hilevel border styles.
Definition at line 296 of file uihelper.h.
owl::TUIBorder::TUIBorder | ( | const TRect & | frame, |
TUIBorder::TStyle | style, | ||
uint | flags = 0 ) |
Constructs a UIBorder object given a frame and a high-level style type.
Calculates Edge and modifier flags internally, as needed.
Definition at line 18 of file uiborder.cpp.
References PRECONDITION, RaisedInner, RaisedOuter, Rect, Soft, SunkenInner, SunkenOuter, and WellSet.
Constructs a UIBorder object given a frame, edge, and modifier flags.
Definition at line 50 of file uiborder.cpp.
References Rect.
This is a static function that performs the actual drawing of edges for a UIBorder or an external client.
It uses the system DrawEdge if available.
Definition at line 127 of file uiborder.cpp.
References CHECK, and DrawEdge().
TRect owl::TUIBorder::GetBoundingRect | ( | ) | const |
Calculates the outside frame rectangle.
Definition at line 92 of file uiborder.cpp.
TRect owl::TUIBorder::GetClientRect | ( | ) | const |
Calculates the rectangle within the border.
Definition at line 102 of file uiborder.cpp.
References EdgeInner, EdgeOuter, and owl::TRect::InflatedBy().
Moves the frame rect by (dx,dy).
Definition at line 64 of file uiborder.cpp.
References owl::TRect::Offset().
Moves the frame rect to (x,y).
Definition at line 73 of file uiborder.cpp.
References owl::TRect::Offset().
Paints this UIBorder object onto a given device context.
Definition at line 112 of file uiborder.cpp.
References DrawEdge().
|
static |
Paints a 2-color single pixel-thick frame. Bevel corners get brush color.
Definition at line 138 of file uiborder.cpp.
References Bottom, owl::TRect::Height(), Left, owl::TDC::PatBlt(), owl::TDC::RestoreBrush(), Right, owl::TDC::SelectObject(), Top, and owl::TRect::Width().
|
static |
Paints a 2-color single pixel-thick frame. Bevel corners get their own color.
Definition at line 165 of file uiborder.cpp.
References Bottom, owl::TRect::Height(), Left, owl::TDC::PatBlt(), owl::TDC::RestoreBrush(), Right, owl::TDC::SelectObject(), owl::TDC::SetPixel(), Top, and owl::TRect::Width().
Resizes the frame rect to (w,h).
Definition at line 82 of file uiborder.cpp.