|
|
| Label () |
| | Creates an empty label.
|
| |
|
virtual | ~Label () |
| | Destroys the label.
|
| |
|
Alignment | alignment () const |
| | Returns the alignment of the caption or icon.
|
| |
|
void | setAlignment (Alignment a) |
| | Sets the alignment of the caption or icon to a.
|
| |
|
const Pt::String & | text () const |
| | Returns the caption.
|
| |
|
void | setText (const Pt::String &text) |
| | Sets the caption to text and clears any icon.
|
| |
| void | setIcon (const Icon &icon, const Gfx::SizeF &iconSize) |
| | Shows icon instead of the caption. More...
|
| |
|
const Gfx::Brush * | background () const |
| | Returns the background brush, or 0 if the fill is off.
|
| |
|
void | setBackground (const Gfx::Brush &b) |
| | Sets the widget-local background brush to b and enables the fill.
|
| |
|
void | setBackground (bool b) |
| | Sets whether the label paints a background fill.
|
| |
|
const Gfx::Pen * | contour () const |
| | Returns the contour pen, or 0 if the frame is off.
|
| |
|
void | setContour (const Gfx::Pen &p) |
| | Sets the widget-local contour pen to p and enables the frame.
|
| |
|
void | setFrame (bool b) |
| | Sets whether the label paints a frame.
|
| |
|
const Gfx::Color & | textColor () const |
| | Returns the effective text color.
|
| |
|
void | setTextColor (const Gfx::Color &color) |
| | Sets the widget-local text color to color.
|
| |
|
Gfx::Font | font () const |
| | Returns the effective font.
|
| |
|
void | setFont (const Gfx::Font &font) |
| | Sets the widget-local font to font.
|
| |
|
void | setFontSize (std::size_t size) |
| | Sets the widget-local font size to size.
|
| |
|
void | setFontWeight (Gfx::Font::Weight weight) |
| | Sets the widget-local font weight to weight.
|
| |
|
void | setFontSlant (Gfx::Font::Slant slant) |
| | Sets the widget-local font slant to slant.
|
| |
| void | setRenderer (PanelRenderer *renderer) |
| | Assigns renderer as the family renderer. More...
|
| |
| 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 the caption or icon and the frame.
|
| |
|
virtual void | onLayout (const Gfx::RectF &rect) |
| | Places the caption or icon in rect.
|
| |
|
virtual void | onRescaleEvent (const RescaleEvent &ev) |
| | Invalidates a prepared icon after a scale change.
|
| |
|
virtual void | onResizeEvent (const ResizeEvent &ev) |
| | Forwards the resize to the base control.
|
| |
|
virtual void | onConnect (Screen &screen) |
| | Forwards the screen connection to the base control.
|
| |
| virtual void | onInvalidate () |
| | Binds the styler and prepares the icon. More...
|
| |
|
virtual void | onPaint (PaintContext &context, const Gfx::RectF &rect) |
| | Paints background, frame, icon, and caption.
|
| |
| virtual void | onPaintBackground (PaintContext &context, const Gfx::RectF &rect, const PanelState &state) |
| | Paints the label background layer. More...
|
| |
| virtual void | onPaintFrame (PaintContext &context, const Gfx::RectF &rect, const PanelState &state) |
| | Paints the label frame layer. More...
|
| |
| virtual void | onPaintIcon (PaintContext &context, const Gfx::RectF &contentRect, const PanelState &state) |
| | Paints the label icon layer. More...
|
| |
| virtual void | onPaintText (PaintContext &context, const Gfx::RectF &contentRect, const PanelState &state) |
| | Paints the label text layer. More...
|
| |
| virtual void | onInvalidateEvent (const InvalidateEvent &ev) |
| | Handles the final coalesced invalidation event. 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 | 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 | 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 | 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 | 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 | onMouseEvent (const MouseEvent &ev) |
| | Handles mouse input in local coordinates. More...
|
| |
| virtual bool | onTouchEvent (const TouchEvent &ev) |
| | Handles touch input in local coordinates. More...
|
| |
|
virtual bool | onScrollEvent (const ScrollEvent &ev) |
| | Handles scroll input or returns false to continue dispatch.
|
| |
|
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.
|
| |
A Label presents a caption or a picture. It does not edit text. setText() sets the caption and clears any icon. setIcon() shows an icon instead of text. setAlignment() places the content in the label bounds.
setBackground() and setContour() enable a fill or frame. setBackground(false) and setFrame(false) turn them off without replacing the style. Whether the fill or frame is on is a widget setting, not a style option.
The label owns a PanelStyler and shares the panel appearance family with Panel. On invalidate it binds that styler. Measure, layout, and paint call typed methods on it. TextBlock lays out wrapped text. Icon supplies pictures. Neither is a widget.