13#if !defined(OWL_DRAWITEM_H)
17#if defined(BI_HAS_PRAGMA_ONCE)
53 TDrawItemArray& GetItems();
61 TDrawItemArray* ItemArray;
105 LPCTSTR GetText()
const;
106 void SetText(LPCTSTR text);
108 int GetIndex()
const;
109 void SetIndex(
int index);
110 TStyle GetStyle()
const;
111 void SetStyle(
const TStyle style);
112 TAlign GetAlign()
const;
113 void SetAlign(
const TAlign align);
114 TLayoutStyle GetLayoutStyle()
const;
115 void SetLayoutStyle(
const TLayoutStyle style);
118 void SetFont(
TFont* font);
125 virtual void Draw(DRAWITEMSTRUCT & drawItem);
126 virtual void Measure(MEASUREITEMSTRUCT & drawItem);
127 virtual int Compare(COMPAREITEMSTRUCT & drawItem);
130 virtual void Paint(
TDC& rc,
TRect& rect);
131 virtual void Layout(
const TRect& src,
TRect& textRect,
TRect& bmpRect);
132 virtual void PaintBorder(
TDC& rc,
TRect& rect);
133 virtual void PaintText(
TDC& rc,
TRect& rect);
134 virtual void PaintBitmap(
TDC& rc,
TRect& rect);
135 virtual TColor GetBkColor();
136 virtual TColor GetTextColor();
154 virtual void GetTextSize(
TSize& size);
155 virtual void GetButtonSize(
TSize& btnSize);
164 TLayoutStyle LayoutStyle;
334 CheckPainter = painter;
335 Index = CheckPainter ? -3 : -1;
Definition of a bitmap Cel array class.
bool IsSelected()
Returns true if (Flags & ODS_SELECTED)==0; false otherwise.
TLayoutStyle
TLayoutStyle contains values that defines how a bitmap and text will be layed out.
@ lTextTop
Text top, bitmap bottom.
@ lTextRight
Text right, bitmap left.
@ lTextBottom
Text bottom, bitmap top.
@ lTextLeft
Text left, bitmap right.
virtual TFont * GetFont()
TStyle GetStyle() const
Returns Style: Bitmap only, Text only, or Bitmap and Text.
TAlign GetAlign() const
Returns Align.
bool IsChecked()
Returns true if (Flags & ODS_CHECKED)==0; false otherwise.
void SetText(const tstring &text)
void SetStyle(const TStyle style)
Sets Style to style.
virtual TCelArray * GetCelArray()
bool IsGrayed()
Returns true if (Flags & ODS_GRAYED)==0; false otherwise.
bool IsFocused()
Returns true if (Flags & ODS_FOCUS)==0; false otherwise.
TButtonTextDrawItem(TDrawItemProxy *proxy=0)
Constructs a TButtonTextDrawItem with proxy as it's parent.
TLayoutStyle GetLayoutStyle() const
Returns LayoutStyle.
void SetLayoutStyle(const TLayoutStyle style)
Sets LayoutStyle to style.
TAlign
TAlign contains values that defines how text will be layed out.
@ aRight
Aligns the text at the right edge of the bounding rectangle.
@ aLeft
Aligns the text at the left edge of the bounding rectangle.
@ aCenter
Aligns the text horizontally at the center of the bounding rectangle.
TStyle
TStyle contains values that defines how the button will be displayed.
@ sText
Only text is displayed.
@ sBitmap
Only the bitmap is displayed.
@ sBitmapText
Both text and bitmap are displayed.
@ sNone
Neither text or bitmap is displayed.
int GetIndex() const
Returns Index, the index of Bitmap in the Proxy CellArray or -1.
bool IsEnabled()
Returns true if (Flags & ODS_DISABLED)==0; false otherwise.
void SetAlign(const TAlign align)
Sets Align to align.
LPCTSTR GetText() const
Returns Text, the text do display on the button.
TCelArray is a horizontal array of cels (a unit of animation) created by slicing a portion of or an e...
Class wrapper for management of color values.
TDC is the root class for GDI DC wrappers.
Proxy parent for TDrawItem.
void SetFont(TFont *font)
Deletes Font and sets it to font.
virtual TCelArray * GetCelArray()
virtual TFont * GetFont()
TIPtrArray< TDrawItem * > TDrawItemArray
TDrawItemArray & GetItems()
Returns ItemArray.
TDrawItemProxy(TFont *font=0)
Constructs a TDrawItemProxy object using the specified font.
TFont derived from TGdiObject provides constructors for creating font objects from explicit informati...
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.
Stores pointer to object.
Definition of GDI DC encapsulation classes: TDC, TWindowDC, TScreenDC, TDesktopDC,...
Definition of abstract GDI object class and derived classes.
TAutoDelete
Flag for Handle ctors to control Handle deletion in dtor.
Object Windows Library (OWLNext Core).
LPARAM TParam2
Second parameter type.
TModule & GetGlobalModule()
Classes for window system structure and type encapsulation.