|
|
| ScrollLayout () |
| | Creates an empty scroll layout.
|
| |
|
virtual | ~ScrollLayout () |
| | Destroys the layout. Attached controls are not destroyed.
|
| |
|
void | enableScrolling (bool scrollX, bool scrollY) |
| | Enables horizontal scrolling when scrollX is true and vertical scrolling when scrollY is true.
|
| |
|
double | maximumX () const |
| | Returns the measured content extent on the X axis.
|
| |
|
double | maximumY () const |
| | Returns the measured content extent on the Y axis.
|
| |
| void | scrollX (double xpos) |
| | Sets the horizontal scroll offset to xpos. More...
|
| |
| void | scrollY (double ypos) |
| | Sets the vertical scroll offset to ypos. More...
|
| |
|
double | scrollPosX () const |
| | Returns the horizontal scroll offset.
|
| |
|
double | scrollPosY () const |
| | Returns the vertical scroll offset.
|
| |
|
Pt::Signal< double > & | scrolledX () |
| | Returns the signal emitted when the horizontal offset changes.
|
| |
|
Pt::Signal< double > & | scrolledY () |
| | Returns the signal emitted when the vertical offset changes.
|
| |
| void | addItem (Control &control) |
| | Attaches control as scrollable content. More...
|
| |
|
void | removeItem (Control &control) |
| | Detaches control without destroying it.
|
| |
|
void | setContentMode (SizePolicy::Mode hmode, SizePolicy::Mode vmode) |
| | Sets the size-policy modes used to measure children.
|
| |
| void | setParent (View &parent) |
| | Attaches this control to parent. More...
|
| |
| void | unparent () |
| | Detaches this control from its current parent. More...
|
| |
| void | add (Control &control) |
| | Attaches control as a direct child. More...
|
| |
| void | remove (Control &control) |
| | Detaches direct child control without destroying it. More...
|
| |
|
const std::vector< Control * > & | controls () const |
| | Returns the non-owning, ordered list of direct children.
|
| |
|
FocusPolicy | focusPolicy () const |
| | Returns this control's focus policy.
|
| |
| void | setFocusPolicy (FocusPolicy f) |
| | Sets this control's focus policy. More...
|
| |
|
size_t | focusIndex () const |
| | Returns this control's focus-navigation index.
|
| |
| void | setFocusIndex (size_t index) |
| | Sets this control's focus-navigation index. More...
|
| |
|
bool | hasFocus () const |
| | Returns true when this control currently has form focus.
|
| |
| void | focus () |
| | Requests focus from the containing form. More...
|
| |
|
Key | actionKey () const |
| | Returns the key that invokes onActionKey() while focused.
|
| |
| void | setActionKey (const Key &ak) |
| | Sets the focused action key to ak. More...
|
| |
|
const Key * | shortcut () const |
| | Returns the registered form shortcut, or 0 when none is set.
|
| |
| void | setShortcut (const Key *k) |
| | Registers k as this control's form shortcut. More...
|
| |
|
const Pt::Char * | mnemonic () const |
| | Returns the registered mnemonic character, or 0 when none is set.
|
| |
| void | setMnemonic (const Char &ch) |
| | Registers ch as this control's Alt mnemonic. More...
|
| |
| String | setMnemonic (const String &text) |
| | Extracts and registers a mnemonic marked by an ampersand. More...
|
| |
| void | setMnemonicControl (Control *control) |
| | Forwards mnemonic activation to control. More...
|
| |
| void | processShortcut (const Key &key) |
| | Invokes this control's shortcut hook for key. More...
|
| |
| void | processMnemonic (Pt::Char m) |
| | Invokes this control's mnemonic hook for m. More...
|
| |
| bool | acceptsInput () const |
| | Returns true when this control is visible and enabled. More...
|
| |
| void | raise () |
| | Requests that this control be painted above its siblings. More...
|
| |
|
const Gfx::RectF | geometry () const |
| | Returns the position and size in parent logical coordinates.
|
| |
|
const SizePolicy & | sizePolicy () const |
| | Returns this control's requested size policy.
|
| |
| void | setSizePolicy (const SizePolicy &policy) |
| | Sets this control's requested size policy and requests relayout. More...
|
| |
|
Gfx::SizeF | preferredSize () const |
| | Returns the result of the most recent measure() call.
|
| |
| Gfx::SizeF | measure (const SizePolicy &policy) |
| | Measures the preferred size under parent constraint policy. More...
|
| |
| void | relayout () |
| | Invalidates this control's measurement and layout. More...
|
| |
|
const Spacing & | margin () const |
| | Returns the outer spacing requested around this control.
|
| |
|
void | setMargin (const Spacing &s) |
| | Sets the outer spacing to s and requests relayout.
|
| |
|
void | setMargin (double n) |
| | Sets equal outer spacing on every side and requests relayout.
|
| |
|
void | setMargin (double horiz, double vertical) |
| | Sets horizontal and vertical outer spacing and requests relayout.
|
| |
|
const Spacing & | padding () const |
| | Returns the inner spacing requested around this control's content.
|
| |
|
void | setPadding (const Spacing &p) |
| | Sets the inner spacing to p and requests relayout.
|
| |
|
void | setPadding (double n) |
| | Sets equal inner spacing on every side and requests relayout.
|
| |
|
void | setPadding (double horiz, double vertical) |
| | Sets horizontal and vertical inner spacing and requests relayout.
|
| |
| Gfx::PointF | toControl (const Control &control, const Gfx::PointF &pos) const |
| | Converts pos from this view to control coordinates. More...
|
| |
| Gfx::PointF | fromControl (const Control &control, const Gfx::PointF &pos) const |
| | Converts pos from control to this view coordinates. More...
|
| |
| PaintSurface & | surface () |
| | Returns this view's local paint-surface adapter. More...
|
| |
|
const PaintSurface & | surface () 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. More...
|
| |
|
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. More...
|
| |
|
bool | isConnected () const |
| | Returns true when the widget is connected to a screen.
|
| |
|
Screen * | screen () |
| | Returns the connected screen, or 0 when disconnected.
|
| |
|
const Screen * | screen () const |
| | Returns the connected screen, or 0 when disconnected.
|
| |
|
Widget * | parent () |
| | Returns the non-owning parent, or 0 when unparented.
|
| |
|
const Widget * | parent () 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.
|
| |
| Widget * | hitTest (const Gfx::PointF &pos) |
| | Returns the descendant hit at local position pos. More...
|
| |
|
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. More...
|
| |
| Gfx::PointF | fromGlobal (const Gfx::PointF &pos) const |
| | Converts global position pos to local coordinates. More...
|
| |
| void | addPeer (Widget &peer) |
| | Adds a bidirectional, non-owning peer association with peer. More...
|
| |
| void | removePeer (Widget &peer) |
| | Removes the bidirectional peer association with peer. More...
|
| |
| void | invalidate () |
| | Queues a coalesced invalidation. More...
|
| |
| virtual void | repaint (const Gfx::RectF &rect) |
| | Requests repainting local dirty rectangle rect. More...
|
| |
|
virtual void | repaint () |
| | Requests repainting the complete local bounds.
|
| |
|
double | scaleFactor () const |
| | Returns the current logical-to-device scale factor.
|
| |
|
const Gfx::Scaling & | scaling () 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. More...
|
| |
|
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. More...
|
| |
| void | activate (bool active=true) |
| | Requests that the widget become active or inactive. More...
|
| |
|
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. More...
|
| |
|
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. More...
|
| |
| void | setMinimumSize (const Gfx::SizeF &s) |
| | Sets the local minimum size and notifies the size-limit hook. More...
|
| |
|
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. More...
|
| |
| void | setMaximumSize (const Gfx::SizeF &s) |
| | Sets the local maximum size and notifies the size-limit hook. More...
|
| |
|
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. More...
|
| |
| void | setCapture (bool capture) |
| | Requests pointer input capture or release. More...
|
| |
| const Cursor * | cursor () const |
| | Returns this widget's cursor or the default cursor. More...
|
| |
| void | setCursor (const Cursor *c) |
| | Sets a local cursor override. More...
|
| |
| void | processEvent (const Pt::Event &ev) |
| | Processes ev through this widget's event dispatcher. More...
|
| |
| Pt::Signal< const Pt::Event & > & | eventReceived () |
| | Returns the event dispatcher signal. More...
|
| |
| bool | mouseEvent (const MouseEvent &ev) |
| | Delivers ev along the mouse responder chain. More...
|
| |
| void | touchEvent (const TouchEvent &ev) |
| | Delivers ev along the touch responder chain. More...
|
| |
|
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.
|
| |
|
|
virtual Gfx::SizeF | onMeasure (const SizePolicy &policy) |
| | Measures children and records the content extent.
|
| |
|
virtual void | onLayout (const Gfx::RectF &rect) |
| | Places children at their preferred size, offset by scroll.
|
| |
|
virtual bool | onMouseEvent (const MouseEvent &ev) |
| | Forwards the mouse event to the base control.
|
| |
|
virtual bool | onTouchEvent (const TouchEvent &ev) |
| | Forwards the touch event to the base control.
|
| |
|
virtual bool | onScrollEvent (const ScrollEvent &ev) |
| | Adjusts the scroll offset from ev and returns true.
|
| |
| virtual void | onInvalidateEvent (const InvalidateEvent &ev) |
| | Handles the final coalesced invalidation event. More...
|
| |
| virtual void | onInvalidate () |
| | Updates derived state after invalidation. More...
|
| |
| virtual void | onProcessPaintEvent (const PaintEvent &ev) |
| | Processes a paint event and paints visible child controls. More...
|
| |
| virtual void | onPaintEvent (const PaintEvent &ev) |
| | Handles this control's own paint event. More...
|
| |
| virtual void | onPaint (PaintContext &context, const Gfx::RectF &rect) |
| | Paints custom content in local coordinates. More...
|
| |
| virtual void | onProcessLayoutEvent (const LayoutEvent &ev) |
| | Processes a pending layout event. More...
|
| |
|
virtual void | onLayoutEvent (const LayoutEvent &ev) |
| | Handles the aligned layout rectangle and requests repaint.
|
| |
|
virtual void | onSetSizeLimits (const Gfx::SizeF &minSize, const Gfx::SizeF &maxSize) |
| | Requests relayout after local size limits change.
|
| |
| virtual void | onSetSurface (PaintSurface *surface, const Gfx::PointF &pos) |
| | Propagates a surface assignment to direct children. More...
|
| |
|
virtual void | onAddControl (Control &control) |
| | Notifies after control becomes a direct child.
|
| |
|
virtual void | onRemoveControl (Control &control) |
| | Notifies after control stops being a direct child.
|
| |
|
virtual void | onActionKey (const KeyEvent &kev) |
| | Handles the configured action key while this control has focus.
|
| |
|
virtual void | onShortcut (const Key &kev) |
| | Handles an activated form shortcut.
|
| |
| virtual void | onMnemonic (Pt::Char m) |
| | Handles an activated form mnemonic. More...
|
| |
|
virtual void | onConnect (Screen &screen) |
| | Connects this control and all direct descendants to screen.
|
| |
|
virtual void | onDisconnect () |
| | Disconnects this control and all direct descendants from the screen.
|
| |
| virtual Widget * | onHitTest (const Gfx::PointF &p) |
| | Returns the frontmost descendant hit at local position p. More...
|
| |
|
virtual Gfx::PointF | onToParent (const Gfx::PointF &pos) const |
| | Converts local coordinates to the containing view.
|
| |
|
virtual Gfx::PointF | onFromParent (const Gfx::PointF &pos) const |
| | Converts containing-view coordinates to local coordinates.
|
| |
|
virtual void | onRequestRepaint (const Gfx::RectF &rect) |
| | Forwards a local repaint request to the parent view.
|
| |
|
virtual void | onRequestShow (bool isShown) |
| | Records and forwards a visibility request to the parent view.
|
| |
|
virtual void | onRequestEnable (bool isEnable) |
| | Records and forwards an enable request to the parent view.
|
| |
|
virtual void | onRequestActivate (bool active) |
| | Forwards an activation request to the parent view.
|
| |
|
virtual void | onRequestMove (const Gfx::PointF &pos) |
| | Records and forwards a move request to the parent view.
|
| |
|
virtual void | onRequestResize (const Gfx::SizeF &s) |
| | Records and forwards a resize request to the parent view.
|
| |
|
virtual void | onProcessEvent (const Pt::Event &ev) |
| | Dispatches ev through the inherited widget event dispatcher.
|
| |
| virtual void | onProcessEnableEvent (const EnableEvent &ev) |
| | Dispatches effective enabled state to this control and its children. More...
|
| |
|
virtual void | onEnableEvent (const EnableEvent &ev) |
| | Updates enabled state and handles an enable event.
|
| |
|
virtual void | onEnable (bool isEnable) |
| | Performs behavior associated with effective enabled state isEnable.
|
| |
|
virtual void | onProcessShowEvent (const ShowEvent &ev) |
| | Dispatches a visibility event.
|
| |
|
virtual void | onShowEvent (const ShowEvent &ev) |
| | Handles a visibility event and requests relayout.
|
| |
|
virtual void | onShow (bool visible) |
| | Performs behavior associated with visibility state visible.
|
| |
|
virtual void | onProcessFocusEvent (const FocusEvent &ev) |
| | Dispatches a focus event.
|
| |
|
virtual void | onFocusEvent (const FocusEvent &ev) |
| | Updates focus state and requests invalidation.
|
| |
|
virtual void | onProcessRescaleEvent (const RescaleEvent &ev) |
| | Dispatches a scale change to this control and all children.
|
| |
|
virtual void | onRescaleEvent (const RescaleEvent &ev) |
| | Handles a scale change.
|
| |
|
virtual void | onRescale (double scaling) |
| | Aligns local spacing and size-policy values to scaling.
|
| |
|
virtual void | onProcessMoveEvent (const MoveEvent &ev) |
| | Dispatches a move event.
|
| |
|
virtual void | onMoveEvent (const MoveEvent &ev) |
| | Updates parent-local position from a move event.
|
| |
|
virtual void | onProcessResizeEvent (const ResizeEvent &ev) |
| | Dispatches a resize event.
|
| |
|
virtual void | onResizeEvent (const ResizeEvent &ev) |
| | Updates local size and bounds from a resize event.
|
| |
| virtual void | onProcessMouseEvent (const MouseEvent &ev) |
| | Routes mouse input to the frontmost eligible child or this control. More...
|
| |
| virtual void | onProcessTouchEvent (const TouchEvent &ev) |
| | Routes touch input to the frontmost eligible child or this control. More...
|
| |
|
virtual void | onProcessScrollEvent (const ScrollEvent &ev) |
| | Delivers scroll input only while this control accepts input.
|
| |
|
virtual void | onProcessEnterEvent (const EnterEvent &ev) |
| | Dispatches a pointer-entry event.
|
| |
|
virtual void | onProcessLeaveEvent (const LeaveEvent &ev) |
| | Dispatches a pointer-leave event.
|
| |
|
virtual void | onProcessKeyEvent (const KeyEvent &ev) |
| | Delivers key input only while this control accepts input.
|
| |
|
virtual bool | onKeyEvent (const KeyEvent &ev) |
| | Handles focused action keys or continues responder dispatch.
|
| |
|
virtual bool | onEnterEvent (const EnterEvent &ev) |
| | Handles pointer entry or continues responder dispatch.
|
| |
|
virtual bool | onLeaveEvent (const LeaveEvent &ev) |
| | Handles pointer leave or continues responder dispatch.
|
| |
|
virtual Gfx::PointF | onToControl (const Control &control, const Gfx::PointF &pos) const |
| | Converts this control coordinates to direct child coordinates.
|
| |
|
virtual Gfx::PointF | onFromControl (const Control &control, const Gfx::PointF &pos) const |
| | Converts direct child coordinates to this control coordinates.
|
| |
|
virtual void | onAttach (Control &control) |
| | Stores control as a direct child and invokes onAddControl().
|
| |
|
virtual void | onDetach (Control &control) |
| | Removes control as a direct child and invokes onRemoveControl().
|
| |
| virtual void | onInit (Control &control) |
| | Initializes runtime relationships for newly attached control. More...
|
| |
| virtual void | onRelease (Control &control) |
| | Releases runtime relationships for detached control. More...
|
| |
|
virtual void | onRepaintRequest (Control &control, const Gfx::RectF &rect) |
| | Converts and forwards rect from control for repainting.
|
| |
|
virtual void | onRelayoutRequest (Control &control) |
| | Requests relayout after a direct child changes its layout.
|
| |
|
virtual void | onEnableRequest (Control &control, bool isEnable) |
| | Delivers an effective enable request to direct child control.
|
| |
|
virtual void | onActivateRequest (Control &control, bool active) |
| | Forwards a direct child's activation request to the parent view.
|
| |
|
virtual void | onShowRequest (Control &control, bool isShown) |
| | Delivers a visibility request to direct child control.
|
| |
|
virtual void | onMoveRequest (Control &control, const Gfx::PointF &pos) |
| | Forwards a direct child's move request to the parent view.
|
| |
|
virtual void | onResizeRequest (Control &control, const Gfx::SizeF &size) |
| | Forwards a direct child's resize request to the parent view.
|
| |
|
virtual void | onRaiseRequest (Control &control) |
| | Moves direct child control to the front of child order.
|
| |
|
virtual const std::vector< Key > | onGetShortcuts () |
| | Returns shortcuts registered by this control.
|
| |
|
virtual const std::vector< Char > | onGetMnemonics () |
| | Returns mnemonics registered by this control.
|
| |
| virtual void | onSetParent (Widget *parent) |
| | Records the non-owning parent relationship. More...
|
| |
| virtual Gfx::PointF | onToGlobal (const Gfx::PointF &pos) const |
| | Converts local position pos to global coordinates. More...
|
| |
| virtual Gfx::PointF | onFromGlobal (const Gfx::PointF &pos) const |
| | Converts global position pos to local coordinates. More...
|
| |
| virtual void | onAttachPeer (Widget &peer) |
| | Attaches non-owning peer peer. More...
|
| |
| virtual void | onDetachPeer (Widget &peer) |
| | Detaches non-owning peer peer. More...
|
| |
|
virtual void | onRequestCapture (bool capture) |
| | Requests application-managed pointer capture or release.
|
| |
|
virtual void | onProcessInvalidateEvent (const InvalidateEvent &ev) |
| | Coalesces and dispatches an invalidation event.
|
| |
|
virtual Responder * | onNextResponder () |
| | 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.
|
| |
Children are measured with setContentMode() and placed at their preferred size. scrollX() and scrollY() move the content within the layout bounds. Offsets are clamped to the scrollable range. enableScrolling() selects which axes accept scroll input. This layout does not draw scroll bars.
+------------------+
| visible window |
| [====]| content extends
+------------------+
window.setContent(&scroll);