17static TFont* createMsgBarFont()
31 GadgetVisibilityCache{}
47 if (HighlightLine && rect.top == 0)
50 if (!HintText.empty())
58 dc.
ExtTextOut(5, y, ETO_OPAQUE, &clientRect, HintText,
static_cast<int>(HintText.length()));
117 if (text == HintText)
return;
122 if (HintText.empty())
return;
126 if (HintText.empty())
137 const auto i = GadgetVisibilityCache.find(g);
138 g->SetVisible(i != GadgetVisibilityCache.cend() ? i->second :
true);
140 GadgetVisibilityCache.clear();
142 else if (GadgetVisibilityCache.empty())
148 GadgetVisibilityCache.insert({g, g->IsVisible()});
149 g->SetVisible(
false);
static const TColor Sys3dHilight
The symbolic system color value for highlighted 3-dimensional display elements (for edges facing the ...
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.
void SelectObject(const TBrush &brush)
Selects the given GDI brush object into this DC.
virtual bool ExtTextOut(int x, int y, uint16 options, const TRect *r, const tstring &str, int count=-1, const int *dx=nullptr)
Draws up to count characters of the given null-terminated string in the current font on this DC.
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.
@ sfiStatus
Represents NONCLIENTMETRICS::lfStatusFont.
TDefaultGuiFont(TSystemFontId=sfiLegacyDefault)
Create a wrapper for the given system font.
TFont derived from TGdiObject provides constructors for creating font objects from explicit informati...
void SetWideAsPossible(bool wide=true)
Sets the flag that indicates whether the gadget width will be adjusted by the gadget window to be as ...
@ Recessed
Recessed into the window.
TGadget * NextGadget(TGadget &gadget) const
Returns the next gadget in the list relative to a given gadget.
TGadget * GadgetWithId(int id) const
Returns the gadget with a given ID, or 0 if none is found.
TGadget * FirstGadget() const
Returns the first gadget of the list.
uint GetFontHeight() const
Returns the height of the font being used by this gadget window.
virtual void PaintGadgets(TDC &dc, bool erase, TRect &rect)
Called by Paint to repaint all of the gadgets, PaintGadgets iterates through the list of gadgets,...
void Insert(TGadget &, TPlacement=After, TGadget *sibling=nullptr) override
Inserts a gadget before or after a sibling gadget (TPlacement).
virtual void GetDesiredSize(TSize &size)
Get the desired size for this gadget window by performing a trial layout of the gadgets without touch...
const TFont & GetFont() const
Returns the font being used by this gadget window.
virtual void GetInnerRect(TRect &rect)
GetInnerRect computes the rectangle inside of the borders and margins of the gadget.
TGadgetWindow(TWindow *parent=nullptr, TTileDirection direction=Horizontal, TFont *font=nullptr, TModule *module=nullptr)
Creates a TGadgetWindow interface object with the default tile direction and font and passes module w...
@ Horizontal
Arrange gadgets in a row.
TMessageBar(TWindow *parent=nullptr, TFont *font=nullptr, TModule *module=nullptr)
Constructs a TMessageBar object with the gadget window font.
void SetText(const tstring &text)
Forwards the message in the message bar to the text gadget for formatting.
void SetMessageText(int id, const tstring &text)
Sets the text for the default text message gadget by specifying the id.
void GetInnerRect(TRect &rect)
GetInnerRect computes the rectangle inside the borders and margins of the message bar.
void PaintGadgets(TDC &dc, bool erase, TRect &rect)
Adjusts the message bar and paints a highlight line.
void GetDesiredSize(TSize &rect)
Calls TGadgetWindow's GetDesiredSize to get the size of the message bar.
void ClearHintText()
Clears the hint text, thus restoring the underlying content on the messagebar.
virtual void SetHintText(LPCTSTR text)
Sets the hint text displayed on the messagebar.
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.
Derived from TGadget, TTextGadget is a text gadget object.
@ Left
Aligns the text at the left edge of the bounding rectangle.
void SetText(LPCTSTR text)
Set the text for this gadget.
TTextGadget(int id=0, TBorderStyle=Recessed, TAlign=Left, uint numChars=10, LPCTSTR text=0, TFont *font=0)
Constructs a TTextGadget object with the specified ID, border style, and alignment.
static const TUIMetric CyBorder
TWindow, derived from TEventHandler and TStreamableBase, provides window-specific behavior and encaps...
bool IsWindow() const
Returns true if an HWND is being used.
void GetClientRect(TRect &rect) const
Gets the coordinates of the window's client area and then copies them into the object referred to by ...
virtual void Invalidate(bool erase=true)
Invalidates (mark for painting) the entire client area of a window.
Definition of class TMessageBar.
Object Windows Library (OWLNext Core).
#define TYPESAFE_DOWNCAST(object, toClass)
Definition of text gadget class TGadget.
Definition of TUIMetric, a UI metrics provider class.