30 :
TControl(parent, id, markupText, r.Left(), r.Right(), r.Width(), r.Height(), module)
39 :
TControl(parent, resourceId, module)
60 return static_cast<int>(r);
69 const auto p1 =
static_cast<TParam1>(maxWidth);
70 const auto p2 =
reinterpret_cast<TParam2>(&out);
71 const auto r =
SendMessage(LM_GETIDEALSIZE, p1, p2);
72 return static_cast<int>(r);
81 [[maybe_unused]]
const auto h =
GetIdealSize(maxWidth, s);
97 const auto p2 =
reinterpret_cast<TParam2>(&inOut);
116 if (!r)
throw TXOwl(
_T(
"TSysLink::GetItem failed"));
149 const auto p2 =
reinterpret_cast<TParam2>(&i);
164 const auto p2 =
reinterpret_cast<TParam2>(&inOut);
178 auto i = LHITTESTINFO{p};
180 return r ? std::make_unique<LITEM>(i.item) :
nullptr;
210 :
TSysLink(parent,
id, markupText, r, module)
217 :
TSysLink(parent, resourceId, module)
227void TAutoSysLink::EvFollowLink()
231 ShellExecuteW(
nullptr, L
"open", a->item.szUrl,
nullptr,
nullptr, SW_SHOW);
#define PRECONDITION(condition)
TCurrentEvent & GetCurrentEvent()
Return the current event from the message queue.
Derives from TSysLink and provides automatic handling of link activation.
TAutoSysLink(TWindow *parent, int id, const tstring &markupText, const TRect &, TModule *module=nullptr)
Constructs a SysLink from arguments.
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),...
ObjectWindows dynamic-link libraries (DLLs) construct an instance of TModule, which acts as an object...
TPoint is a support class, derived from tagPOINT.
TRect is a mathematical class derived from tagRect.
The tagSIZE struct is defined as.
Encapsulates the SysLink common control, a Windows control that provides a convenient way to embed hy...
auto GetItem(LITEM &inOut) -> bool const
Retrieves the states and attributes of the specified anchor item.
TSysLink(TWindow *parent, int id, const tstring &markupText, const TRect &, TModule *module=nullptr)
Constructs a SysLink from arguments.
auto GetUrl(int index) -> tstring const
Returns the HREF attribute of the specified anchor item.
auto GetIdealSize(int maxWidth, TSize &out) -> int const
Retrieves the ideal size of the control for a given maximum width.
auto SetItem(const LITEM &) -> bool
Sets the states and attributes of the specified anchor item.
auto HitTest(LHITTESTINFO &inOut) -> bool const
Performs a hit test on this control and returns information about the link hit, if any.
auto GetIdealHeight() -> int const
Retrieves the preferred height of the control for the control's current width.
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...
TApplication * GetApplication() const
Gets a pointer to the TApplication object associated with this.
int GetId() const
Returns Attr.Id, the ID used to find the window in a specified parent's child list.
virtual auto GetWindowClassName() -> TWindowClassName
TResult SendMessage(TMsgId, TParam1=0, TParam2=0) const
Sends a message (msg) to a specified window or windows.
HWND THandle
TWindow encapsulates an HWND.
#define DEFINE_RESPONSE_TABLE1(cls, base)
Macro to define a response table for a class with one base.
TXOwl(const tstring &msg, uint resId=0)
An OWL exception with a given message for displaying and an unsigned Id that can be used for identifi...
#define _USES_CONVERSION_A
Object Windows Library (OWLNext Core).
void InitializeCommonControls(uint controlFlags)
Wrapper for the Windows API function InitCommmonControlsEx.
EV_NM_RETURN(UINT_MAX, EvFollowLink)
EV_NM_CLICK(UINT_MAX, EvFollowLink)
LPARAM TParam2
Second parameter type.
WPARAM TParam1
First parameter type.
TParam2 Param2
Second parameter (LPARAM).
Definition of class TSysLink.