#include <Pt/Forms/Form.h>

View that hosts one content control. More...

Inherits View.

Inherited by Window.

Public Types

enum  FocusPolicy {
  NoFocus ,
  AcceptFocus ,
  KeepFocus
}
 Defines whether a control can receive or retain focus. More...

Public Member Functions

virtual ~Form ()
 Detaches the current content control.
Control * content ()
 Returns the current content control, or 0 when none is attached.
const Control * content () const
 Returns the current content control, or 0 when none is attached.
void setContent (Control *control)
 Replaces the content root with control.
Gfx::SizeF measure (const SizePolicy &policy)
 Measures the preferred content size for policy.
void relayout ()
 Queues a layout pass while the form is connected.
Control * focusControl ()
 Returns the focused control, or 0 when no control has focus.
void focusNext ()
 Moves focus to the next eligible control.
void focusPrev ()
 Moves focus to the previous eligible control.
Gfx::PointF toControl (const Control &control, const Gfx::PointF &pos) const
 Converts pos from this view to control coordinates.
Gfx::PointF fromControl (const Control &control, const Gfx::PointF &pos) const
 Converts pos from control to this view coordinates.
PaintSurfacesurface ()
 Returns this view's local paint-surface adapter.
const PaintSurfacesurface () const
 Returns this view's local paint-surface adapter.
void setSurface (PaintSurface *surface, const Gfx::PointF &pos=Gfx::PointF())
 Assigns the surface on which this view displays its controls.
Pt::uint64_t id () const
 Returns the application-unique ID of this live widget.
const std::string & name () const
 Returns the optional name.
void setName (const std::string &n)
 Sets the optional name immediately.
void setNextResponder (Responder *r)
 Sets the next responder for unhandled input.
bool isConnected () const
 Returns true when the widget is connected to a screen.
Screenscreen ()
 Returns the connected screen, or 0 when disconnected.
const Screenscreen () const
 Returns the connected screen, or 0 when disconnected.
Widgetparent ()
 Returns the non-owning parent, or 0 when unparented.
const Widgetparent () const
 Returns the non-owning parent, or 0 when unparented.
bool isDescendantOf (const Widget &top) const
 Returns true when this widget is a strict descendant of top.
bool isAncestorOf (const Widget &child) const
 Returns true when this widget is a strict ancestor of child.
WidgethitTest (const Gfx::PointF &pos)
 Returns the descendant hit at local position pos.
Gfx::PointF toParent (const Gfx::PointF &pos) const
 Converts local position pos to parent coordinates.
Gfx::PointF fromParent (const Gfx::PointF &pos) const
 Converts parent position pos to local coordinates.
Gfx::PointF toGlobal (const Gfx::PointF &pos) const
 Converts local position pos to global coordinates.
Gfx::PointF fromGlobal (const Gfx::PointF &pos) const
 Converts global position pos to local coordinates.
void addPeer (Widget &peer)
 Adds a bidirectional, non-owning peer association with peer.
void removePeer (Widget &peer)
 Removes the bidirectional peer association with peer.
void invalidate ()
 Queues a coalesced invalidation.
virtual void repaint (const Gfx::RectF &rect)
 Requests repainting local dirty rectangle rect.
virtual void repaint ()
 Requests repainting the complete local bounds.
double scaleFactor () const
 Returns the current logical-to-device scale factor.
const Gfx::Scalingscaling () const
 Returns the current logical-to-device scaling.
bool isVisible () const
 Returns whether the last show event made the widget visible.
virtual void show (bool b=true)
 Requests that the widget be shown or hidden.
bool isEnabled () const
 Returns whether the last enable event made the widget enabled.
virtual void enable (bool isEnable=true)
 Requests that the widget be enabled or disabled.
void activate (bool active=true)
 Requests that the widget become active or inactive.
const Gfx::PointF & position () const
 Returns the position in parent logical coordinates.
virtual void move (const Gfx::PointF &pos)
 Requests a new parent-local position pos.
const Gfx::SizeF & size () const
 Returns the size in local logical coordinates.
const Gfx::RectF & bounds () const
 Returns local bounds, whose origin is always local zero.
const Gfx::SizeF & minimumSize () const
 Returns the locally stored minimum size.
void setMinimumSize (const Gfx::SizeF &s)
 Sets the local minimum size and notifies the size-limit hook.
void setMinimumSize (double w, double h)
 Sets the local minimum width and height.
void setMinimumWidth (double w)
 Sets the local minimum width.
void setMinimumHeight (double h)
 Sets the local minimum height.
const Gfx::SizeF & maximumSize () const
 Returns the locally stored maximum size.
void setMaximumSize (const Gfx::SizeF &s)
 Sets the local maximum size and notifies the size-limit hook.
void setMaximumSize (double w, double h)
 Sets the local maximum width and height.
void setMaximumWidth (double w)
 Sets the local maximum width.
void setMaximumHeight (double h)
 Sets the local maximum height.
virtual void resize (const Gfx::SizeF &s)
 Requests a new local size s.
void setCapture (bool capture)
 Requests pointer input capture or release.
const Cursor * cursor () const
 Returns this widget's cursor or the default cursor.
void setCursor (const Cursor *c)
 Sets a local cursor override.
void processEvent (const Pt::Event &ev)
 Processes ev through this widget's event dispatcher.
Pt::Signal< const Pt::Event & > & eventReceived ()
 Returns the event dispatcher signal.
bool mouseEvent (const MouseEvent &ev)
 Delivers ev along the mouse responder chain.
void touchEvent (const TouchEvent &ev)
 Delivers ev along the touch responder chain.
void scrollEvent (const ScrollEvent &ev)
 Delivers ev along the scroll responder chain.
void enterEvent (const EnterEvent &ev)
 Delivers ev along the enter responder chain.
void leaveEvent (const LeaveEvent &ev)
 Delivers ev along the leave responder chain.
void keyEvent (const KeyEvent &ev)
 Delivers ev along the key responder chain.

Protected Member Functions

 Form ()
 Creates a form without a content control.
virtual void onRequestRelayout ()
 Queues the layout event for a requested layout pass.
virtual void onProcessLayoutEvent (const LayoutEvent &ev)
 Processes a queued layout event.
virtual Gfx::SizeF onProcessMeasure ()
 Creates the size policy used by the default layout pass.
virtual void onProcessLayout (const Gfx::RectF &rect)
 Applies the result of the default layout pass to rect.
virtual Gfx::SizeF onMeasure (const SizePolicy &policy)
 Measures the content for policy.
virtual void onLayout (const Gfx::RectF &rect)
 Lays out the content in rect.
virtual void onAddElement (Control &control)
 Registers control for focus traversal, shortcuts, and mnemonics.
virtual void onRemoveElement (Control &control)
 Removes control from focus traversal, shortcuts, and mnemonics.
virtual void onSetFocusPolicy (Control &control, FocusPolicy policy)
 Updates focus after control changes to policy.
virtual void onSetFocusIndex (Control &control, unsigned index)
 Updates the focus order after control changes its focus index.
virtual void onSetFocus (Control &control)
 Gives focus to control and sends the corresponding focus events.
virtual void onSetShortcut (Control &control, const std::vector< Key > &keys)
 Replaces the shortcut registrations for control with keys.
virtual void onSetMnemonic (Control &control, const std::vector< Char > &chs)
 Replaces the mnemonic registrations for control with chs.
virtual void onSetSurface (PaintSurface *surface, const Gfx::PointF &pos)
 Assigns the paint surface and translates it to the content root.
virtual void onAttach (Control &control)
 Handles attachment of control to this form.
virtual void onDetach (Control &control)
 Handles detachment of control from this form.
virtual void onInit (Control &control)
 Connects control to this form's screen and responder chain.
virtual void onRelease (Control &control)
 Disconnects control from this form's screen and responder chain.
virtual Gfx::PointF onToControl (const Control &control, const Gfx::PointF &pos) const
 Converts form-local pos to coordinates local to control.
virtual Gfx::PointF onFromControl (const Control &control, const Gfx::PointF &pos) const
 Converts coordinates local to control into form-local pos.
virtual void onRepaintRequest (Control &control, const Gfx::RectF &rect)
 Translates a repaint request from control to form coordinates.
virtual void onRelayoutRequest (Control &control)
 Queues a form layout after a request from control.
virtual void onEnableRequest (Control &control, bool isEnable)
 Delivers an effective enable state to control.
virtual void onActivateRequest (Control &control, bool active)
 Makes control the active input target when active is true.
virtual void onShowRequest (Control &control, bool isShown)
 Delivers a visibility request to control.
virtual void onMoveRequest (Control &control, const Gfx::PointF &pos)
 Aligns and commits a move request for control.
virtual void onResizeRequest (Control &control, const Gfx::SizeF &size)
 Aligns and commits a resize request for control.
virtual void onRaiseRequest (Control &control)
 Receives a request to raise control.
virtual void onConnect (Screen &screen)
 Connects the form and its content to screen.
virtual void onDisconnect ()
 Disconnects the form and its content from the screen.
virtual WidgetonHitTest (const Gfx::PointF &pos)
 Returns the deepest content widget at form-local pos.
virtual void onRequestCapture (bool capture)
 Forwards a pointer capture request to the Forms application.
virtual void onRequestResize (const Gfx::SizeF &s)
 Receives a resize request for the form itself.
virtual void onProcessEvent (const Pt::Event &ev)
 Dispatches ev through the widget event dispatcher.
virtual void onInvalidateEvent (const InvalidateEvent &ev)
 Handles the final coalesced invalidation event.
virtual void onInvalidate ()
 Clears invalidation state and requests a layout pass.
virtual void onProcessPaintEvent (const PaintEvent &ev)
 Paints the form and the intersecting part of its content root.
virtual void onPaintEvent (const PaintEvent &ev)
 Paints the form's own view content.
virtual void onProcessRescaleEvent (const RescaleEvent &ev)
 Updates form scaling and propagates it to the content root.
virtual void onRescaleEvent (const RescaleEvent &ev)
 Handles a scale-change event for the form.
virtual void onRescale (double scaling)
 Updates the form's logical-to-device scaling to scaling.
virtual void onProcessEnableEvent (const EnableEvent &ev)
 Updates form enabled state and propagates it to the content root.
virtual void onEnableEvent (const EnableEvent &ev)
 Handles an enable event for the form.
virtual void onEnable (bool e)
 Performs behavior associated with effective enabled state e.
virtual void onProcessShowEvent (const ShowEvent &ev)
 Updates visibility of the form itself.
virtual void onShowEvent (const ShowEvent &ev)
 Handles a visibility event for the form.
virtual void onShow (bool visible)
 Performs behavior associated with form visibility visible.
virtual void onProcessMoveEvent (const MoveEvent &ev)
 Processes a move event with the standard View behavior.
virtual void onMoveEvent (const MoveEvent &ev)
 Repaints changed bounds and updates the form position.
virtual void onProcessResizeEvent (const ResizeEvent &ev)
 Processes a resize event and schedules relayout when size changes.
virtual void onResizeEvent (const ResizeEvent &ev)
 Repaints changed bounds, updates size, and requests relayout.
virtual void onProcessMouseEvent (const MouseEvent &ev)
 Routes mouse input to the content under the pointer when possible.
virtual void onProcessTouchEvent (const TouchEvent &ev)
 Routes touch input to the content under the pointer when possible.
virtual void onProcessScrollEvent (const ScrollEvent &sev)
 Routes scrolling to the active control, then the focused control.
virtual void onProcessEnterEvent (const EnterEvent &ev)
 Processes pointer entry with the standard widget responder behavior.
virtual void onProcessLeaveEvent (const LeaveEvent &ev)
 Processes pointer leave with the standard widget responder behavior.
virtual void onProcessKeyEvent (const KeyEvent &ev)
 Routes keyboard input through form-level interaction handling.
virtual bool onMouseEvent (const MouseEvent &ev)
 Does not handle mouse input and continues responder dispatch.
virtual bool onTouchEvent (const TouchEvent &ev)
 Does not handle touch input and continues responder dispatch.
virtual bool onScrollEvent (const ScrollEvent &ev)
 Does not handle scroll input and continues responder dispatch.
virtual bool onEnterEvent (const EnterEvent &ev)
 Installs the current cursor and consumes pointer entry.
virtual bool onLeaveEvent (const LeaveEvent &ev)
 Restores the default cursor and consumes pointer leave.
virtual bool onKeyEvent (const KeyEvent &ev)
 Does not handle key input and continues responder dispatch.
const std::map< Key, Control * > & shortcuts () const
 Returns the shortcut-to-control registrations for this form.
const std::map< Pt::Char, Control * > & mnemonics () const
 Returns the mnemonic-to-control registrations for this form.
virtual void onPaint (PaintContext &context, const Gfx::RectF &rect)
 Paints this view into context for the local rect.
virtual void onSetParent (Widget *parent)
 Records the non-owning parent relationship.
virtual Gfx::PointF onToParent (const Gfx::PointF &pos) const =0
 Converts local position pos to parent coordinates.
virtual Gfx::PointF onFromParent (const Gfx::PointF &pos) const =0
 Converts parent position pos to local coordinates.
virtual Gfx::PointF onToGlobal (const Gfx::PointF &pos) const
 Converts local position pos to global coordinates.
virtual Gfx::PointF onFromGlobal (const Gfx::PointF &pos) const
 Converts global position pos to local coordinates.
virtual void onAttachPeer (Widget &peer)
 Attaches non-owning peer peer.
virtual void onDetachPeer (Widget &peer)
 Detaches non-owning peer peer.
virtual void onRequestRepaint (const Gfx::RectF &rect)
 Forwards a repaint request for local rectangle rect.
virtual void onRequestShow (bool e)
 Forwards a request to show or hide the widget.
virtual void onRequestEnable (bool isEnable)
 Forwards a request to enable or disable the widget.
virtual void onRequestActivate (bool active)
 Forwards a request to activate or deactivate the widget.
virtual void onRequestMove (const Gfx::PointF &pos)
 Forwards a request for parent-local position pos.
virtual void onSetSizeLimits (const Gfx::SizeF &minSize, const Gfx::SizeF &maxSize)
 Notifies that locally stored size limits changed.
virtual void onProcessInvalidateEvent (const InvalidateEvent &ev)
 Coalesces and dispatches an invalidation event.
virtual ResponderonNextResponder ()
 Returns the non-owning next responder, or 0.
virtual bool onMousePress (const MouseEvent &ev)
 Handles a mouse press. The default returns false.
virtual bool onMouseRelease (const MouseEvent &ev)
 Handles a mouse release. The default returns false.
virtual bool onMouseMove (const MouseEvent &ev)
 Handles a mouse move. The default returns false.

Detailed Description

A Form attaches one content Control and is the point where the content hierarchy joins a window or another form host. It is the layout root of that tree. It delegates measuring and layout to that content, forwards view requests, and does not own the control. Use setContent() to replace the content; keep the control alive until it is detached. A form is often a Window, but other hosts can derive from Form.

Attachment connects the complete tree to the screen, paint surface, responder chain, and form. Detachment reverses those links. Replacing the content detaches the old root before attaching the new one. The content root may itself contain an arbitrary control tree. These links are non-owning, so destruction order remains the caller's responsibility.

relayout() queues a layout event only while the form is connected. Pending layout requests are combined before the form measures its content and then assigns it the available bounds. Controls request layout from their parent rather than laying out an enclosing form directly. Custom form hosts override the protected measuring and layout hooks when their content needs a different allocation rule.

The form is the focus root for its content tree. It delivers focus changes as FocusEvent objects and handles Tab traversal, shortcuts, and Alt mnemonics before ordinary keyboard input reaches the focused control.

Member Enumeration Documentation

◆ FocusPolicy

enum FocusPolicy
inherited
Enumerator
NoFocus 

The control cannot receive focus.

AcceptFocus 

The control participates in normal focus navigation.

KeepFocus 

The control retains focus during focus navigation.

Member Function Documentation

◆ setContent()

void setContent ( Control * control)

The form detaches the previous root before attaching control. Passing 0 removes the current root. The form borrows control; it must remain alive until it has been detached.

◆ measure()

Gfx::SizeF measure ( const SizePolicy & policy)

The default implementation delegates to the content control. It returns the policy size when no content is attached.

◆ relayout()

void relayout ( )

Repeated calls before the queued layout event is processed are combined into one measure and layout pass.

◆ onProcessLayoutEvent()

virtual void onProcessLayoutEvent ( const LayoutEvent & ev)
protectedvirtual

The default implementation measures the content first and then lays it out.

◆ onProcessMeasure()

virtual Gfx::SizeF onProcessMeasure ( )
protectedvirtual

The default policy fixes both dimensions to the form size.

Reimplemented in Window.

◆ onMeasure()

virtual Gfx::SizeF onMeasure ( const SizePolicy & policy)
protectedvirtual

Custom form hosts override this when content needs a different measurement rule.

Reimplemented in Window.

◆ onLayout()

virtual void onLayout ( const Gfx::RectF & rect)
protectedvirtual

The default implementation positions the content at the form origin and gives it the complete size of rect. Custom form hosts override this when content needs a different allocation rule.

Reimplemented in Window.

◆ focusNext()

void focusNext ( )

Focus traversal follows increasing focus indices, wraps at the end, and skips controls whose focus policy is NoFocus.

◆ focusPrev()

void focusPrev ( )

Focus traversal follows decreasing focus indices, wraps at the beginning, and skips controls whose focus policy is NoFocus.

◆ onSetFocus()

virtual void onSetFocus ( Control & control)
protectedvirtual

A control with KeepFocus prevents focus from moving to another control.

◆ onEnableRequest()

virtual void onEnableRequest ( Control & control,
bool isEnable )
protectedvirtual

A disabled form cannot enable its content. The default implementation sends an EnableEvent directly to control.

Reimplemented from View.

◆ onActivateRequest()

virtual void onActivateRequest ( Control & control,
bool active )
protectedvirtual

The active control receives scroll and keyboard events before form-level shortcut, mnemonic, and focus handling.

Reimplemented from View.

◆ onRaiseRequest()

virtual void onRaiseRequest ( Control & control)
protectedvirtual

A form has one content root, so the default implementation does not change stacking order.

Reimplemented from View.

◆ onRequestResize()

virtual void onRequestResize ( const Gfx::SizeF & s)
protectedvirtual

The default implementation has no resize policy. Window-like form hosts override this hook to request a native or enclosing host resize.

Reimplemented from Widget.

Reimplemented in Window.

◆ onProcessEvent()

virtual void onProcessEvent ( const Pt::Event & ev)
protectedvirtual

The form registers its layout-event handler with that dispatcher during construction.

Reimplemented from Widget.

Reimplemented in Window.

◆ onProcessPaintEvent()

virtual void onProcessPaintEvent ( const PaintEvent & ev)
protectedvirtual

Empty dirty rectangles are ignored. The content receives the dirty rectangle converted to its local coordinates.

Reimplemented from Widget.

Reimplemented in Window.

◆ onPaintEvent()

virtual void onPaintEvent ( const PaintEvent & ev)
protectedvirtual

The default implementation uses the standard View paint context and does not add form-specific drawing.

Reimplemented from View.

◆ onProcessShowEvent()

virtual void onProcessShowEvent ( const ShowEvent & ev)
protectedvirtual

Form visibility events do not automatically change content visibility.

Reimplemented from Widget.

Reimplemented in Window.

◆ onProcessKeyEvent()

virtual void onProcessKeyEvent ( const KeyEvent & ev)
protectedvirtual

The active control receives the event first. Otherwise, key presses dispatch registered shortcuts, Alt mnemonics, and Tab traversal before the focused control and finally the responder chain receive the event.

Reimplemented from Widget.

Reimplemented in Window.

◆ toControl()

Gfx::PointF toControl ( const Control & control,
const Gfx::PointF & pos ) const
inherited

The default conversion subtracts the control position. Override onToControl() when the hosted control uses a different coordinate mapping.

◆ fromControl()

Gfx::PointF fromControl ( const Control & control,
const Gfx::PointF & pos ) const
inherited

The default conversion adds the control position. Override onFromControl() when the hosted control uses a different coordinate mapping.

◆ surface()

PaintSurface & surface ( )
inherited

The adapter exposes this view's size, scaling, and position on the surface assigned with setSurface(). It remains available while no parent surface is assigned, but cannot then obtain a canvas.

◆ setSurface()

void setSurface ( PaintSurface * surface,
const Gfx::PointF & pos = Gfx::PointF() )
inherited

The view borrows surface and does not destroy it. Pass null to detach the view from its parent surface. pos identifies this view's origin in the assigned surface and is used to establish child-control surface positions.

◆ onPaint()

virtual void onPaint ( PaintContext & context,
const Gfx::RectF & rect )
protectedvirtualinherited

The default implementation does not draw. Use this hook for custom view content rather than overriding onPaintEvent().

Reimplemented in CheckBox, ComboBox, Control, Label, LineEdit, ListBox, ListBoxItem, Menu, MenuBar, MenuBarItem, MenuItemBase, MenuSubItem, Panel, ProgressBar, PushButton, ScrollBar, Slider, SpinBox, SpinBoxButton, TabView, Window, and Workspace.

◆ setNextResponder()

void setNextResponder ( Responder * r)
inherited

The widget does not own r. Do not create a responder cycle.

◆ hitTest()

Widget * hitTest ( const Gfx::PointF & pos)
inherited

Returns 0 when no descendant is hit. Derived classes implement their child hit-testing policy in onHitTest().

◆ toGlobal()

Gfx::PointF toGlobal ( const Gfx::PointF & pos) const
inherited

The default conversion walks the parent chain.

◆ fromGlobal()

Gfx::PointF fromGlobal ( const Gfx::PointF & pos) const
inherited

The default conversion walks the parent chain.

◆ addPeer()

void addPeer ( Widget & peer)
inherited

Peers are not a parent, child, or screen connection and do not transfer ownership. Add a relationship only once. Both endpoints receive onAttachPeer().

◆ removePeer()

void removePeer ( Widget & peer)
inherited

Both endpoints receive onDetachPeer().

◆ invalidate()

void invalidate ( )
inherited

The Forms event loop eventually calls onInvalidateEvent() after all pending invalidation requests for this widget have coalesced.

◆ repaint()

virtual void repaint ( const Gfx::RectF & rect)
virtualinherited

The containing view, frame, or backend converts and forwards the rectangle. This does not paint synchronously.

◆ show()

virtual void show ( bool b = true)
virtualinherited

isVisible() changes only when the request is confirmed by a ShowEvent.

◆ enable()

virtual void enable ( bool isEnable = true)
virtualinherited

isEnabled() changes only when the request is confirmed by an EnableEvent.

◆ activate()

void activate ( bool active = true)
inherited

Activation is defined by the receiving parent, frame, or backend.

◆ move()

virtual void move ( const Gfx::PointF & pos)
virtualinherited

position() changes only when a MoveEvent confirms the request.

◆ minimumSize()

const Gfx::SizeF & minimumSize ( ) const
inherited

New widgets use (0, 0).

◆ setMinimumSize()

void setMinimumSize ( const Gfx::SizeF & s)
inherited

This does not resize the widget or validate it against the maximum size. The receiver of onSetSizeLimits() applies the limits.

◆ maximumSize()

const Gfx::SizeF & maximumSize ( ) const
inherited

New widgets use (64000, 64000).

◆ setMaximumSize()

void setMaximumSize ( const Gfx::SizeF & s)
inherited

This does not resize the widget or validate it against the minimum size. The receiver of onSetSizeLimits() applies the limits.

◆ resize()

virtual void resize ( const Gfx::SizeF & s)
virtualinherited

size() and bounds() change only when a ResizeEvent confirms the request.

◆ setCapture()

void setCapture ( bool capture)
inherited

Capture is owned by the application and routes pointer input to this widget until released. It is released during destruction.

◆ cursor()

const Cursor * cursor ( ) const
inherited

The returned cursor is always non-null and is owned by the widget or the Forms runtime.

◆ setCursor()

void setCursor ( const Cursor * c)
inherited

Pass 0 to remove the override and restore the default cursor. The cursor is copied, so the caller retains ownership of c. When this widget is under the pointer, the platform cursor is updated immediately.

◆ processEvent()

void processEvent ( const Pt::Event & ev)
inherited

Use the state-request APIs for ordinary operation. This method is for backends, tests, and code that deliberately injects events.

◆ eventReceived()

Pt::Signal< const Pt::Event & > & eventReceived ( )
inherited

Internal event-processing slots are connected to this signal. Additional slots can observe or process deliberately dispatched widget events.

◆ onSetParent()

virtual void onSetParent ( Widget * parent)
protectedvirtualinherited

Container classes call this while attaching or detaching the widget. Overrides that retain the base relationship must call this implementation.

◆ onToParent()

virtual Gfx::PointF onToParent ( const Gfx::PointF & pos) const
protectedpure virtualinherited

Every direct Widget subclass must implement this mapping.

Implemented in Control, Screen, Window, and WorkspaceManager.

◆ onFromParent()

virtual Gfx::PointF onFromParent ( const Gfx::PointF & pos) const
protectedpure virtualinherited

Every direct Widget subclass must implement this mapping.

Implemented in Control, Screen, Window, and WorkspaceManager.

◆ onToGlobal()

virtual Gfx::PointF onToGlobal ( const Gfx::PointF & pos) const
protectedvirtualinherited

The base implementation walks the parent chain through onToParent().

Implements Responder.

Reimplemented in Screen.

◆ onFromGlobal()

virtual Gfx::PointF onFromGlobal ( const Gfx::PointF & pos) const
protectedvirtualinherited

The base implementation walks the parent chain through onFromParent().

Implements Responder.

Reimplemented in Screen.

◆ onAttachPeer()

virtual void onAttachPeer ( Widget & peer)
protectedvirtualinherited

The base implementation stores the peer. Overrides that retain the association must call this implementation.

Reimplemented in Popup.

◆ onDetachPeer()

virtual void onDetachPeer ( Widget & peer)
protectedvirtualinherited

The base implementation removes one stored association. Overrides that retain the association must call this implementation.

Reimplemented in Popup.

◆ onSetSizeLimits()

virtual void onSetSizeLimits ( const Gfx::SizeF & minSize,
const Gfx::SizeF & maxSize )
protectedvirtualinherited

The base implementation does nothing. A parent, frame, or backend can apply minSize and maxSize to its geometry policy.

Reimplemented in Control, and Window.

◆ mouseEvent()

bool mouseEvent ( const MouseEvent & ev)
inherited

Converts the position to each responder's local coordinates. Returns true when a responder handles the event.

◆ touchEvent()

void touchEvent ( const TouchEvent & ev)
inherited

Converts the position to each responder's local coordinates.