122 TRACEX(
OwlCmd, 1,
"TFloatingFrame::GetCommandTarget - returns "
228 int mx = Margin.cx * Border.cx;
229 int my = Margin.cy * Border.cy;
262 if (DragFrame && TCEnabled) {
328#if OWL_PERSISTENT_STREAMS
347TFloatingFrame::Streamer::Write(opstream&
os)
const
349 TFloatingFrame*
o = GetObject();
#define DIAG_DECLARE_GROUP(group)
#define TRACEX(group, level, message)
TFrameWindow * GetMainWindow()
Return the current main window.
static const TColor SysInactiveCaption
The symbolic system color value for the caption background of every inactive window.
static const TColor Sys3dFace
The symbolic system color value for the face color of 3-dimensional display elements.
Base class for an extensible interface for auto enabling/disabling of commands (menu items,...
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.
Derived from TFrameWindow and TTinyCaption, TFloatingFrame implements a floating frame that can be po...
void EvActivateApp(bool active, DWORD taskId)
void Init(int captionHeight, bool popupPalette)
void EvNCPaint(HRGN)
Handles WM_NCPAINT to paint the non-client areas of this window.
void EvCommandEnable(TCommandEnabler &) override
void EvSysCommand(uint cmdType, const TPoint &p)
This is an example of a mix-in that does partial event handling.
uint EvNCHitTest(const TPoint &screenPt)
Returns where in the non-client area the mouse is.
auto EvCommand(uint id, HWND hWndCtl, uint notifyCode) -> TResult override
Resolves ambiguous mixin reference by passing EvCommand first to the tiny caption and then to the fra...
TEventStatus DoNCHitTest(const TPoint &screenPt, uint &evRes)
Event handler helper.
auto GetCommandTarget() -> HWND override
uint EvNCCalcSize(bool calcValidRects, NCCALCSIZE_PARAMS &calcSize)
Handles WM_NCCALCSIZE to possibly add in the drag frame margins.
bool EvNCActivate(bool active)
TFloatingFrame(TWindow *parent, LPCTSTR title=0, TWindow *clientWnd=0, bool shrinkToClient=false, int captionHeight=DefaultCaptionHeight, bool popupPalette=false, TModule *module=0)
Constructs a TFloatingFrame object attached to the specified parent window.
uint EvMouseActivate(HWND hTopLevel, uint hitCode, TMsgId)
Derived from TWindow, TFrameWindow controls such window-specific behavior as keyboard navigation and ...
auto EvCommand(uint id, HWND hWndCtl, uint notifyCode) -> TResult override
Handle WM_COMMAND to provide extra processing for commands: Extra processing for commands: starts wit...
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.
TRect InflatedBy(int dx, int dy) const
Returns a rectangle inflated by the given delta arguments.
Derived from TWindow, TTinyCaption is a mix-in class that handles a set of non-client events to produ...
void PaintCaption(bool active)
Calls dc.SelectObject() to select the given rectangle and dc.PatBlt() to paint the tiny caption bar u...
TEventStatus DoSysCommand(uint cmdType, const TPoint &p)
Handle WM_SYSCOMMAND to make sure that SC_KEYMENU and SC_MOUSEMENU bring up our sys menu at the right...
void EnableTinyCaption(int ch=0, bool closeBox=false)
Pass closeBox=true to replace SystemMenu box with a box that will close window when clicked Used for ...
TEventStatus DoNCHitTest(const TPoint &screenPt, uint &evRes)
If the caption bar is not enabled, returns esPartial.
TRect GetCaptionRect()
Gets the area of the caption for changing or repainting.
TEventStatus DoCommand(uint id, HWND hWndCtl, uint notifyCode, TResult &evRes)
Displays the system menu using ::TrackPopup so that TTinyCaption sends WM_COMMAND instead of WM_SYSCO...
TEventStatus DoNCCalcSize(bool calcValidRects, NCCALCSIZE_PARAMS &calcSize, uint &evRes)
Return the size of our client area, leaving room for caption bar.
static const TUIMetric CyBorder
static const TUIMetric CxBorder
Derived from TDC, TWindowDC is a device context (DC) class that provides access to the entire area ow...
TWindow, derived from TEventHandler and TStreamableBase, provides window-specific behavior and encaps...
static HWND GetActiveWindow()
Retrieves the handle of the active window.
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 EvCommandEnable(TCommandEnabler &ce)
Called by WindowProc to handle WM_COMMAND_ENABLE messages, EvCommandEnable calls the CmXxxx command-h...
TRect GetWindowRect() const
Gets the screen coordinates of the window's rectangle.
virtual TResult DefWindowProc(TMsgId, TParam1, TParam2)
Virtual function provides final default processing for an incoming message Calls original window proc...
TWindow * GetParentO() const
Return the OWL's parent for this window.
bool IsIconic() const
Returns true if window is iconic or minimized.
void ClientToScreen(TPoint &point) const
Converts the client coordinates specified in point to screen coordinates for the new window.
HWND SetActiveWindow()
Activates a top-level window.
uint EvNCHitTest(const TPoint &)
The default message handler for WM_NCHITTEST.
TResult DefaultProcessing()
Handles default processing of events, which includes continued processing of menu/accelerators comman...
TRect GetClientRect() const
Gets the coordinates of the window's client area (the area in a window you can use for drawing).
void EvSysCommand(uint cmdType, const TPoint &point)
Responds to a user-selected command from the System menu or when the user selects the maximize or min...
virtual TResult EvCommand(uint id, HWND hWndCtl, uint notifyCode)
WindowProc calls EvCommand to handle WM_COMMAND messages.
uint EvNCCalcSize(bool calcValidRects, NCCALCSIZE_PARAMS &)
The default message handler for WM_NCCALCSIZE.
HWND THandle
TWindow encapsulates an HWND.
HWND GetHandle() const
Returns the handle of the window.
ipstream, a specialized input stream derivative of pstream, is the base class for reading (extracting...
#define DEFINE_RESPONSE_TABLE2(cls, base1, base2)
Macro to define a response table for a class with two bases.
Definition of class TFloatingFrame.
void ReadBaseObject(Base *base, ipstream &in)
#define IMPLEMENT_STREAMABLE2(cls, base1, base2)
void WriteBaseObject(Base *base, opstream &out)
TEventStatus
Mixin window event implementation return status.
@ esPartial
Additional handlers may be invoked.
@ esComplete
No additional handlers are needed.
Object Windows Library (OWLNext Core)
UINT TMsgId
Message ID type.
LRESULT TResult
Result type.
Definition of TUIMetric, a UI metrics provider class.