23#if defined(BI_MULTI_THREAD_RTL)
44class TPickerCellArray:
public TIPtrArray<TPickerCell*>{
54class TDefTextCell:
public TTextCell {
56 TDefTextCell(
int id=0, LPCTSTR text=
_T(
""),
TPickerCell* cell=0);
57 virtual ~TDefTextCell();
59 virtual void PaintCell(TDC& dc, TRect& rect);
60 void SetCell(
TPickerCell* cell) {
delete Cell; Cell = cell; }
70class TLocalTipCell:
public TTextCell {
72 TLocalTipCell(
int id=0, LPCTSTR text=
_T(
""));
74 virtual void PaintCell(TDC& dc, TRect& rect);
170 if(rect.
Width() < size.cx)
171 rect.right = rect.left + size.cx;
172 if(rect.
Height() < size.cy)
173 rect.bottom = rect.top + size.cy;
270 if(rect.
Width() < size.cx)
271 rect.right = rect.left + size.cx;
272 if(rect.
Height() < size.cy)
273 rect.bottom = rect.top + size.cy;
305TDefTextCell::TDefTextCell(
int id, LPCTSTR text,
TPickerCell* cell)
313TDefTextCell::~TDefTextCell()
320TDefTextCell::PaintCell(
TDC& dc,
TRect& rect)
323 rect.Inflate(-1, -1);
327 TRect rc(rect.left-2, rect.top-2, rect.left+width, rect.top+width);
330 Cell->Paint(dc, &rc,
false);
333 rect.left += rc.Width()-5;
343TLocalTipCell::TLocalTipCell(
int id, LPCTSTR text)
347 Format = DT_SINGLELINE|DT_VCENTER|DT_END_ELLIPSIS|DT_NOCLIP;
352TLocalTipCell::PaintCell(
TDC& dc,
TRect&)
392 TControl(parent, id, nullptr, x, y, w, h, module)
400 TControl(parent, resourceId, module)
418 Cells =
new TPickerCellArray;
426 NONCLIENTMETRICS ncm;
427 ncm.cbSize =
sizeof(NONCLIENTMETRICS);
428 SystemParametersInfo(SPI_GETNONCLIENTMETRICS,
sizeof(NONCLIENTMETRICS), &ncm, 0);
433 TextHeight = std::max(metrics.tmHeight + metrics.tmExternalLeading, 20l);
535 cell->Bounds.SetEmpty();
559 cell->Bounds.SetEmpty();
577 cell->Bounds.SetEmpty();
594 if(loc >=
static_cast<int>(
Cells->
Size()))
607 if(loc <
static_cast<int>(
Cells->
Size()))
608 return (*
Cells)[loc];
644 return cell->GetCell();
656 return cell->GetCell();
670 wndClass.style = CS_HREDRAW|CS_VREDRAW|CS_PARENTDC;
689 for (
int i = 0; i < (int)
Cells->
Size(); i++) {
693 text.empty() ? LPSTR_TEXTCALLBACK : text.c_str());
747 if (msg.hwnd == *
this ||
IsChild(msg.hwnd)) {
748 if (msg.message >= WM_MOUSEFIRST && msg.message <= WM_MOUSELAST) {
788 size.cy += addHeight;
790 int leftM, rightM, topM, bottomM;
792 crect =
TRect(
TPoint(0,0),
TSize(size.cx+leftM+rightM,size.cy+topM+bottomM));
796 rect.right = rect.left + crect.
Width();
800 rect.bottom = rect.top + crect.
Height();
806 SetWindowPos(HWND_TOPMOST, rect, SWP_NOACTIVATE|SWP_NOMOVE|SWP_NOZORDER);
809 int h = (rect.
Height()-addHeight-topM-bottomM)/
NRows;
816 cellRect =
TRect(0,0, w,h);
817 cellRect.
Offset(leftM,topM);
845 for(
int i = 0; i <
NRows; i++){
848 if(cell <
static_cast<int>(
Cells->
Size())){
849 (*Cells)[cell]->Bounds = cellRect;
861 for(
int i = 0; i < static_cast<int>(
Cells->
Size()); i++){
862 if((*
Cells)[i]->PtIn(point))
874 (*Cells)[i]->QueryBounds(rec);
884 for(
int i = 0; i < static_cast<int>(
Cells->
Size()); i++){
885 if ((*
Cells)[i]->GetBounds().Touches(rect)){
887 (*Cells)[i]->Paint(dc);
934 (*Cells)[
Focused]->LeaveMouse();
938 (*Cells)[loc]->EnterMouse();
1082 if (modKeys & MK_LBUTTON &&
GetCapture() == *
this)
1191 if (
IsSet(
ppPushed) && (key == VK_SPACE || key == VK_RETURN)){
1237 (*Cells)[
Focused]->LeaveMouse();
1251 cell->SetText(
_T(
""));
1277 if(tipText.length() == 0)
1281 tipText =
module->LoadString(resId);
1283 if (tipText.length() > 0)
1285 tstring::size_type i = tipText.find_first_of(
_T(
'\n'));
1286 if (i != tstring::npos)
1287 tipText = tipText.substr(i + 1);
1292 while (parent && !frame)
1315 while (parent && !frame){
1360 wndClass.style |= CS_SAVEBITS;
1425 TSize size(Attr.W, Attr.H);
1426 TSize checksize(size.cx + 1, size.cy + 1);
1432 if (point.y + size.cy > scrSize.cy) {
1433 if ((rect.top >= 0) && (rect.bottom >= 0) && (rect.top - checksize.cy >= 0))
1434 point.y = rect.top - checksize.cy;
1435 else point.y = scrSize.cy - checksize.cy;
1440 if (point.x + checksize.cx > scrSize.cx)
1441 point.x = scrSize.cx - checksize.cx;
1442 SetWindowPos(HWND_TOPMOST, point.x, point.y, size.cx, size.cy, SWP_SHOWWINDOW);
1463 bool sharedGlyph,
uint numChars)
1466 enabled, state, sharedGlyph, numChars),
1494 Window->ClientToScreen(p2);
1495 rect.right = p2.x + rect.
Width();
1496 rect.bottom = p2.y + rect.
Height();
1568#if defined(BI_MULTI_THREAD_RTL)
1569 :
public TLocalObject
1575#if defined(BI_MULTI_THREAD_RTL)
1580TCustomColors::TCustomColors()
1582 Colors[0] = RGB(0x01, 0x01, 0x01);
1583 Colors[1] = RGB(0x10, 0x10, 0x10);
1584 Colors[2] = RGB(0x20, 0x20, 0x20);
1585 Colors[3] = RGB(0x30, 0x30, 0x30);
1587 Colors[4] = RGB(0x40, 0x40, 0x40);
1588 Colors[5] = RGB(0x50, 0x50, 0x50);
1589 Colors[6] = RGB(0x60, 0x60, 0x60);
1590 Colors[7] = RGB(0x70, 0x70, 0x70);
1592 Colors[8] = RGB(0x80, 0x80, 0x80);
1593 Colors[9] = RGB(0x90, 0x90, 0x90);
1594 Colors[10] = RGB(0xA0, 0xA0, 0xA0);
1595 Colors[11] = RGB(0xB0, 0xB0, 0xB0);
1597 Colors[12] = RGB(0xC0, 0xC0, 0xC0);
1598 Colors[13] = RGB(0xD0, 0xD0, 0xD0);
1599 Colors[14] = RGB(0xE0, 0xE0, 0xE0);
1600 Colors[15] = RGB(0xF0, 0xF0, 0xF0);
1606static TCustomColors& GetCustomColors()
1608#if defined(BI_MULTI_THREAD_RTL)
1609 static TTlsContainer<TCustomColors> customColors;
1610 return customColors.Get();
1612 static TCustomColors customColors;
1613 return customColors;
1622 TCustomColors& InitCustomColors = GetCustomColors();
1625#if defined(BI_MULTI_THREAD_RTL)
1645 CustomColors(GetCustomColors().Colors),
1646 WorkPalette(nullptr),
1647 PaletteRealized(false)
1656 CustomColors(GetCustomColors().Colors),
1657 WorkPalette(nullptr),
1658 PaletteRealized(false)
1699 CustomColors = colors;
1701 CustomColors = GetCustomColors().Colors;
1711 const HWND c =
reinterpret_cast<HWND
>(
static_cast<UINT_PTR
>(cell->
GetColor().GetValue()));
1721 WorkPalette =
new TPalette(*Palette);
1726 if(PaletteRealized){
1727 for(
int i = 3; i < static_cast<int>(
Cells->
Size()); i++){
1739 if(PaletteRealized){
1740 uint ncolors = WorkPalette->GetNumEntries();
1743 WorkPalette->GetPaletteEntries(0,
static_cast<uint16>(ncolors), _entries);
1745 for(
int i = 3; i < static_cast<int>(
Cells->
Size()); i++){
1754 WorkPalette =
nullptr;
1789 choose.
Flags = CC_RGBINIT;
1790 choose.
Color = color;
1793 CustomColor = choose.
Color;
1806 bool enabled,
TState state,
bool sharedGlyph,
uint numChars)
1808 TPickerGadget(picker, glyphResIdOrIndex, style, poptype, type, enabled,
1809 state,sharedGlyph, numChars),
1835 TSize size = CelArray ? CelArray->CelSize() : Window->GetCelArray().CelSize();
1837 rect.left = faceRect.left+(faceRect.
Width()-size.cx)/2;
1838 rect.top = faceRect.bottom-5;
1839 rect.right = rect.left + size.cx;
1840 rect.bottom = faceRect.bottom-1;
1875 bool enabled,
TState state,
bool sharedGlyph,
uint numChars)
1877 TPickerGadget(picker, glyphResIdOrIndex, style, poptype, type, enabled,
1878 state,sharedGlyph, numChars)
1890 TCelArray& dstArray = CelArray ? *CelArray : Window->GetCelArray();
1898 int curRow = srcArray.
CurRow();
Definition of a bitmap Cel array class.
Definition of Choose Color Common Dialog class.
Pointer to an array of type T.
virtual void PaintCell(TDC &dc, TRect &rect)
virtual void QueryBounds(TRect &rect)
TCelArray * GetCelArray()
void SetCelArray(TCelArray *array, TAutoDelete=NoAutoDelete)
TBitmapCell(int id=0, TCelArray *array=0, int index=0, TBorderStyle borderStyle=Flat)
TBitmap is the GDI bitmap class derived from TGdiObject.
virtual void GetSelection()
virtual void BuildCelArray()
TBitmapPickerGadget(TPopupPicker &picker, TResId glyphResIdOrIndex, TStyle style=sBitmapText, TPopupType poptype=DownArrowAction, TType type=Command, bool enabled=false, TState state=Up, bool sharedGlyph=false, uint numChars=4)
The GDI Brush class is derived from TGdiObject.
TStyle
TStyle contains values that defines how gadget will be displayed:
virtual void Created()
Calls TButtonGadget::Created and if Text == 0 and (Style & sText) retrieves text from menu or resourc...
TCelArray is a horizontal array of cels (a unit of animation) created by slicing a portion of or an e...
int NumRows() const
Return NRows, the number of rows in this CelArray.
TSize CelSize() const
Return the size of the celarray.
int CurRow() const
Return NCurRow, the current row in the bitmap.
void SetCurRow(int raw)
Sets NCurRow to row.
bool StretchBlt(int index, TDC &dc, const TRect &dstRect, uint32 rop=SRCCOPY)
Draws the image of the cel onto the DC.
bool BitBlt(int index, TDC &dc, int x, int y, uint32 rop=SRCCOPY)
Draws the cel at index onto the DC at position x and y.
TPoint CelOffset(int cel) const
Returns the position of the upper left corner of a given cel from the current row,...
TRect CelRect(int cel) const
Returns the upper left and lower right corner of a given cell from the current row,...
Defines information necessary to initialize the dialog box with the user's color selection.
uint32 Flags
Flags can be a combination of the following values that control the appearance and functionality of t...
TColor * CustColors
Points to an array of 16 colors.
TColor Color
Specifies the color that is initially selected when the dialog box is created.
TChooseColorDialog(TWindow *parent, TData &data, TResId templateId=0, LPCTSTR title=0, TModule *module=0)
Initialize the choose color common dialog data members.
const TColor & GetColor() const
virtual void PaintCell(TDC &dc, TRect &rect)
void SetColor(const TColor &clr)
Class wrapper for management of color values.
static const TColor None
not-a-color
static const TColor SysWindowFrame
The symbolic system color value for the frame around each window.
uint8 Blue() const
Return the color's blue component.
TColor()
Construct a null 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.
uint8 Red() const
Return the color's red component.
static const TColor White
Static TColor object with fixed Value set by RGB(255, 255, 255).
static TColor CreateFromPaletteIndex(int index)
Construct a color that is an index into a palette.
uint8 Green() const
Return the color's green component.
static const TColor Black
Static TColor object with fixed Value set by RGB(0, 0, 0).
virtual void GetFillRect(TRect &rect, const TRect &faceRect)
TColorPickerGadget(TColorPicker &picker, TResId glyphResIdOrIndex, TStyle style=sBitmapText, TPopupType poptype=DownArrowAction, TType type=Command, bool enabled=false, TState state=Up, bool sharedGlyph=false, uint numChars=4)
virtual void PaintFace(TDC &dc, const TRect &rect)
virtual void GetSelection()
TColor ColorSel
currect selected color
void NotifyParent(uint code) override
void EvPaletteChanged(HWND hWndPalChg)
const TColor & GetCustomColor() const
void SetCustomColors(TColor *colors)
TColorPicker(TWindow *parent, int id, int x, int y, int w=0, int h=0, TModule *module=0)
void SetupWindow() override
void Paint(TDC &, bool erase, TRect &) override
TControl unifies its derived control classes, such as TScrollBar, TControlGadget, and TButton.
TControl(TWindow *parent, int id, LPCTSTR title, int x, int y, int w, int h, TModule *module=nullptr)
Invokes TWindow's constructor, passing it parent (parent window), title (caption text),...
TDC is the root class for GDI DC wrappers.
virtual bool SetViewportOrg(const TPoint &origin, TPoint *oldOrg=nullptr)
Sets this DC's viewport origin to the given origin value, and saves the previous origin in oldOrg.
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,...
virtual int DrawTextEx(TCHAR *str, int count, TRect *=nullptr, uint format=0, LPDRAWTEXTPARAMS=nullptr)
Formats and draws in the given rectangle, r, up to count characters of the null-terminated string usi...
bool GetViewportOrg(TPoint &point) const
The first version sets in the point argument the x- and y-extents (in device-units) of this DC's view...
void SelectObject(const TBrush &brush)
Selects the given GDI brush object into this DC.
void RestorePalette()
Restores the original GDI palette object to this DC.
bool FillRect(int x1, int y1, int x2, int y2, const TBrush &brush)
Fills the given rectangle on this DC using the specified brush.
bool TextRect(int x1, int y1, int x2, int y2)
Fills the given rectangle, clipping any text to the rectangle.
virtual TColor SetBkColor(const TColor &color)
Sets the current background color of this DC to the given color value or the nearest available.
void RestoreBrush()
Restores the original GDI brush object to this DC.
virtual void RestoreFont()
Restores the original GDI font object to this DC.
bool StretchBlt(int dstX, int dstY, int dstW, int dstH, const TDC &srcDC, int srcX, int srcY, int srcW, int srcH, uint32 rop=SRCCOPY)
Copies a bitmap from the source DC to a destination rectangle on this DC specified either by upper le...
int RealizePalette()
Maps to the system palette the logical palette entries selected into this DC.
int SetBkMode(int mode)
Sets the background mode to the given mode argument, which can be either OPAQUE or TRANSPARENT.
void OWLFastWindowFrame(TBrush &brush, TRect &r, int xWidth, int yWidth, uint32 rop=PATCOPY)
Draws a frame of the specified size and thickness with the given brush.
TDecoratedFrame automatically positions its client window (you must supply a client window) so that i...
virtual tstring GetHintText(uint id, THintText hintType) const
Retrieves the text specified by the resource id.
TFont derived from TGdiObject provides constructors for creating font objects from explicit informati...
TEXTMETRIC GetTextMetrics(TDC &dc) const
Retrieves information about this font when selected in the specified dc.
TFont(HFONT handle, TAutoDelete autoDelete=NoAutoDelete)
TFont encapsulates an HFONT.
TRect & GetBounds()
Returns the boundary rectangle for the gadget.
bool GetEnabled() const
Determines whether keyboard and mouse input have been enabled for the specified gadget.
virtual void Inserted()
Called after a gadget is inserted into a window.
@ None
No border painted at all.
int GetId() const
Gets the ID for the gadget.
bool IsGDIObject() const
Returns true if this represents a real GDI object.
void SetSelection(int sel=0)
virtual void PaintDivider(TDC &dc, const TRect &rect)
paint divider
void AddCell(TPickerCell *cells, bool select=false)
int Contains(const TPoint &point)
void EnableTooltip(bool enable=true) override
void EvMouseMove(uint modKeys, const TPoint &point)
void GetCellRect(TRect &rect)
void EvKillFocus(THandle hWndGetFocus)
void EnableButton(LPCTSTR text=0, int resId=0, TPickerCell *cl=0)
void EnableDefault(LPCTSTR text=0, int resId=0, TPickerCell *cl=0)
void SetTooltip(TTooltip *tooltip)
void EvActivateApp(bool active, DWORD threadId)
void EvKeyUp(uint key, uint repeatCount, uint flags)
void EvLButtonUp(uint modKeys, const TPoint &point)
void RefocusCell(int loc)
TPickerCell * GetDefaultCell()
void SetupWindow() override
void SetFont(const TFont &font)
TGridPicker(TWindow *parent, int id, int x, int y, int w=0, int h=0, TModule *module=0)
virtual tstring LoadTipText(int resId)
load tiptext from resource
int Add(TPickerCell *cell)
void EvKeyDown(uint key, uint repeatCount, uint flags)
void EvLButtonDown(uint modKeys, const TPoint &point)
void EvSetFocus(THandle hWndLostFocus)
void ModifyPopStyle(uint off, uint on)
virtual void NotifyParent(uint code)
notify parent on event -> BN_CLICKED and BN_HILITE
TPickerCell * GetCell(int loc)
void SetMargins(const TMargins &margins)
void GetWindowClass(WNDCLASS &) override
virtual bool IsFlatStyle()
auto PreProcessMsg(MSG &) -> bool override
void Paint(TDC &, bool erase, TRect &) override
virtual bool CallCustomBox()
call user defined custom box if pressed custom button
void EvLButtonDblClk(uint modKeys, const TPoint &point)
virtual void SetStatusBarMessage(int id)
send WM_MENUSELECT and WM_ENTERIDLE to frame window
TPickerCell * GetSelectedCell()
void SetColumns(int colmn=4)
TPickerCell * GetCustomCell()
TPickerCell * Remove(int loc)
TPickerCell * RemoveCell(int loc)
virtual void ExitPicker(bool status=false)
do noting here
A device context (DC) class derived from TCreatedDC, TMemoryDC provides access to a memory DC.
ObjectWindows dynamic-link libraries (DLLs) construct an instance of TModule, which acts as an object...
bool PumpWaitingMessages()
The inner message loop.
TPalette(HPALETTE handle, TAutoDelete autoDelete=NoAutoDelete)
Alias an existing palette handle. Assume ownership if autoDelete says so.
void SetBorderStyle(TBorderStyle bs)
virtual void EnterMouse()
virtual void LeaveMouse()
virtual void Paint(TDC &dc, TRect *r=0, bool drawbrd=true)
virtual void PaintBorder(TDC &dc, TRect &rect)
virtual void Select(bool sel=true)
TBorderStyle
Cell border styles. These match TIUBorder's TStyles exactly.
@ None
No border painted at all.
@ Plain
Plain plain window frame.
virtual void PaintCell(TDC &dc, TRect &rect)=0
TPickerCell(int id=0, TBorderStyle borderStyle=Flat)
virtual void QueryBounds(TRect &rect)
TPickerGadget(TPopupPicker &picker, TResId glyphResIdOrIndex, TStyle style=sBitmapText, TPopupType poptype=DownArrowAction, TType type=Command, bool enabled=false, TState state=Up, bool sharedGlyph=false, uint numChars=4)
TPickerCell * Selected
currect selected cell
virtual void GetSelection()
virtual void PopupAction()
TPoint is a support class, derived from tagPOINT.
TPoint()
Constructs an uninitialized point.
TRect is a mathematical class derived from tagRect.
int Height() const
Returns the height of this rectangle (bottom - top).
TRect & Offset(int dx, int dy)
Changes this rectangle so its corners are offset by the given delta values.
TRect InflatedBy(int dx, int dy) const
Returns a rectangle inflated by the given delta arguments.
TRect & Inflate(int dx, int dy)
Inflates a rectangle inflated by the given delta arguments.
const TPoint & TopLeft() const
Returns the upperleft point.
int Width() const
Returns the width of this rectangle (right - left).
bool Contains(const TPoint &point) const
Returns true if the given point lies within this rectangle; otherwise, it returns false.
TRect()
Default constructor that does nothing.
TSize Size() const
Returns the size of rectangle.
bool IsEmpty() const
Returns true if left >= right or top >= bottom; otherwise, returns false.
The tagSIZE struct is defined as.
TSize()
Default constructor that does nothing.
virtual void PaintCell(TDC &dc, TRect &rect)
TFlag
Constructor flags to limit or modify border.
@ Adjust
Adjust passed rect to client (Not Applicable).
@ Soft
Soft edge look for buttons.
@ RaisedInner
Raised inner edge only.
TStyle
Enumeration describing hilevel border styles.
@ WndRecessed
Input field & other window recessed.
@ Recessed
Status field style recessed.
@ Embossed
Grouping raised emboss bead.
@ 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.
static THatch8x8Brush & GetDitherBrush()
Internal static helper function that can be used alone.
static const TUIMetric CxScreen
static const TUIMetric CyBorder
static const TUIMetric CyScreen
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...
HWND SetFocus()
Sets the keyboard focus to current window and activates the window that receives the focus by sending...
HWND SetCapture()
Sets the mouse capture to the current window.
tstring LoadString(uint id) const
static HWND GetCapture()
Returns the handle of the window that has captured the mouse.
void EvKeyDown(uint key, uint repeatCount, uint flags)
The default message handler for WM_KEYDOWN.
virtual void SetParent(TWindow *newParent)
Sets the parent for the specified window by setting Parent to the specified new Parent window object.
TApplication * GetApplication() const
Gets a pointer to the TApplication object associated with this.
void SetBkgndColor(TColor color, bool shouldUpdate=true)
Sets the background color for the window.
virtual void GetWindowClass(WNDCLASS &wndClass)
Redefined by derived classes, GetWindowClass fills the supplied MS-Windows registration class structu...
bool SetWindowPos(HWND hWndInsertAfter, const TRect &rect, uint flags)
Changes the size of the window pointed to by rect.
virtual int Execute()
Creates the underlying HWND and makes it modal with the help of TApplication's BeginModal support.
virtual bool PreProcessMsg(MSG &msg)
Called from TApplication::ProcessAppMsg() to give the window an opportunity to perform preprocessing ...
virtual void Destroy(int retVal=0)
Destroys an MS-Windows element associated with the TWindow.
virtual bool Create()
Creates the window interface element to be associated with this ObjectWindows interface element.
int GetId() const
Returns Attr.Id, the ID used to find the window in a specified parent's child list.
TWindow * GetParent() const
Retrieves the OWL object of the parent window. If none exists, returns 0.
virtual auto GetWindowClassName() -> TWindowClassName
virtual void InvalidateRect(const TRect &rect, bool erase=true)
Invalidates a specified client area.
TWindow * GetParentO() const
Return the OWL's parent for this window.
static void ReleaseCapture()
Releases the mouse capture from this window.
TWindowAttr & GetWindowAttr()
Returns the TWindowAttr structure, which contains the window's creation attributes.
void MapWindowPoints(HWND hWndTo, TPoint *pts, int count) const
Maps a set of points in one window to a relative set of points in another window.
bool EvQueryNewPalette()
The default message handler for WM_QUERYNEWPALETTE.
bool IsWindow() const
Returns true if an HWND is being used.
void EvKillFocus(HWND hWndGetFocus)
Handle WM_KILLFOCUS so that we can have a parent window hold onto our Handle and possibly restore foc...
bool IsChild(HWND hWnd) const
Returns true if the window is a child window or a descendant window of this window.
void GetWindowRect(TRect &rect) const
Gets the screen coordinates of the window's rectangle and copies them into rect.
TResult HandleMessage(TMsgId, TParam1=0, TParam2=0)
Dispatches the given message using the response table.
void EvLButtonDown(uint modKeys, const TPoint &point)
Response method for an incoming WM_LBUTTONDOWN message.
bool ModifyStyle(uint32 offBits, uint32 onBits, uint swpFlags=0)
Modifies the style bits of the window.
uint32 GetStyle() const
Gets the style bits of the underlying window or the 'Style' member of the attribute structure associa...
int GetDlgCtrlID() const
Returns the ID of the control.
void EvSetFocus(HWND hWndLostFocus)
The default message handler for WM_SETFOCUS.
void SendNotification(int id, int notifyCode, HWND hCtl, TMsgId=WM_COMMAND)
Repacks a command message (msg) so that a child window (hCtl) can send a message to its parent regard...
bool IsWindowVisible() const
Returns true if the window is visible.
virtual bool ShowWindow(int cmdShow)
Displays this TWindow in a given state.
TResult SendMessage(TMsgId, TParam1=0, TParam2=0) const
Sends a message (msg) to a specified window or windows.
virtual void SetupWindow()
Performs setup following creation of an associated MS-Windows window.
bool ModifyExStyle(uint32 offBits, uint32 onBits, uint swpFlags=0)
Modifies the style bits of the window.
void EvPaletteChanged(HWND hWndPalChg)
The default message handler for WM_PALETTECHANGED.
void GetClientRect(TRect &rect) const
Gets the coordinates of the window's client area and then copies them into the object referred to by ...
HWND THandle
TWindow encapsulates an HWND.
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 class TDecoratedFrame, a TFrameWindow that can manage decorations around the client win...
#define END_RESPONSE_TABLE
#define DEFINE_RESPONSE_TABLE1(cls, base)
Macro to define a response table for a class with one base.
Definition of TGadgetList, TGadgetWindow & TGadgetWindowFont A list holding gadgets,...
TAutoDelete
Flag for Handle ctors to control Handle deletion in dtor.
@ htTooltip
Shorter text displayed in a tooltip.
static TModule * FindResModule(TResId id, TResId type)
Global search for resources.
Object Windows Library (OWLNext Core).
#define TYPESAFE_DOWNCAST(object, toClass)
Definition of classes TPickerCell, TColorCell, TBitmapCell, TTextCell, TGridPicker,...
Used by the TGadgetWindow and TGadget classes, TMargins contains the measurements of the margins for ...
void GetPixels(int &left, int &right, int &top, int &bottom, int fontHeight) const
int Id
Contains the identifier of the child window.
Definition of container classes used and made available by OWL.
Definition of the UI Helper Classes: TUIHandle, TUIBorder, TUIFace, TUIPart.
Definition of TUIMetric, a UI metrics provider class.
#define EV_WM_QUERYNEWPALETTE
#define EV_WM_PALETTECHANGED