17static TFont* createMsgBarFont()
31 GadgetVisibilityCache{}
47 if (HighlightLine &&
rect.top == 0)
50 if (!HintText.empty())
109 tg->SetText(
text.c_str());
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.
TFont derived from TGdiObject provides constructors for creating font objects from explicit informati...
@ 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.
Derived from TWindow, TGadgetWindow maintains a list of tiled gadgets for a window and lets you dynam...
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.
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.
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.
TRect GetClientRect() const
Gets the coordinates of the window's client area (the area in a window you can use for drawing).
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.