|
|
| SpinBox () |
| | Creates a spin box.
|
| |
|
| ~SpinBox () |
| | Destroys the spin box.
|
| |
|
bool | isEditable () const |
| | Returns true if the user can type the number.
|
| |
| void | setEditable (bool e) |
| | Sets whether the user can type the number. More...
|
| |
|
int | minimum () const |
| | Returns the lower bound of the range.
|
| |
|
int | maximum () const |
| | Returns the upper bound of the range.
|
| |
|
void | setRange (int min, int max) |
| | Sets the range to min through max and clamps the value.
|
| |
|
int | value () const |
| | Returns the current value.
|
| |
|
void | setValue (int n) |
| | Sets the value to n, clamped to the range, and emits valueEdited().
|
| |
|
const Pt::String & | text () const |
| | Returns the text shown in the entry.
|
| |
|
bool | isEmpty () const |
| | Returns true if the entry text is empty.
|
| |
|
Adjustment | textAdjustment () const |
| | Returns the horizontal adjustment of the text.
|
| |
|
void | setTextAdjustment (Adjustment a) |
| | Sets the horizontal adjustment of the text to a.
|
| |
|
std::size_t | cursorPosition () const |
| | Returns the caret index in the entry text.
|
| |
|
void | setCursorPosition (std::size_t n) |
| | Sets the caret index in the entry text to n.
|
| |
|
bool | isAccepted () const |
| | Returns true if Return and focus loss complete an edit.
|
| |
|
void | setAccepted (bool a) |
| | Sets whether Return and focus loss complete an edit.
|
| |
|
bool | isHighlighted () const |
| | Returns true if the pointer is over the box.
|
| |
|
Pt::Signal< int > & | valueEdited () |
| | Returns the signal emitted when the value changes.
|
| |
|
Pt::Signal< const Pt::String & > & | returnPressed () |
| | Returns the signal emitted when Return completes an edit.
|
| |
|
Pt::Signal< const Pt::String & > & | editingFinished () |
| | Returns the signal emitted when focus loss completes an edit.
|
| |
|
const Gfx::Brush & | background () const |
| | Returns the effective background brush.
|
| |
|
void | setBackground (const Gfx::Brush &b) |
| | Sets the widget-local background brush to b.
|
| |
|
const Gfx::Brush & | foreground () const |
| | Returns the effective foreground brush.
|
| |
|
void | setForeground (const Gfx::Brush &b) |
| | Sets the widget-local foreground brush to b.
|
| |
|
const Gfx::Pen & | contour () const |
| | Returns the effective contour pen.
|
| |
|
void | setContour (const Gfx::Pen &p) |
| | Sets the widget-local contour pen to p.
|
| |
|
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 (SpinBoxRenderer *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 Pt::String | toText (int n) const |
| | Returns the text shown for n.
|
| |
|
virtual bool | toValue (const Pt::String &str, int &n) const |
| | Parses str into n and returns true when the whole string is an integer.
|
| |
| virtual bool | onInput (const Pt::String &str) const |
| | Returns true if str is accepted as typed input. More...
|
| |
|
virtual void | onStep (int n) |
| | Adds n to the value, clamped to the range.
|
| |
|
virtual Gfx::SizeF | onMeasure (const SizePolicy &policy) |
| | Measures the entry, step controls, and frame.
|
| |
|
virtual void | onLayout (const Gfx::RectF &rect) |
| | Places the entry and step controls in rect.
|
| |
|
virtual void | onInvalidate () |
| | Binds the styler.
|
| |
|
virtual void | onPaint (PaintContext &context, const Gfx::RectF &rect) |
| | Paints the entry, step controls, text, and caret.
|
| |
|
virtual void | onPaintChrome (PaintContext &context, const Gfx::RectF &rect, const Gfx::RectF &entryRect, const Gfx::RectF &upButtonRect, const Gfx::RectF &downButtonRect, const SpinBoxState &state) |
| | Paints the spin-box chrome for state.
|
| |
|
virtual void | onPaintText (PaintContext &context, const Gfx::RectF &textRect, const String &text, const Gfx::PointF &textPos, const Gfx::RectF &cursor, const SpinBoxState &state) |
| | Paints the entry text and caret for state.
|
| |
|
virtual bool | onKeyEvent (const KeyEvent &ev) |
| | Inserts, deletes, or moves the caret, or completes an edit.
|
| |
|
virtual bool | onMouseEvent (const MouseEvent &ev) |
| | Places the caret from a pointer press when the box is editable.
|
| |
|
virtual bool | onTouchEvent (const TouchEvent &ev) |
| | Places the caret from a touch press when the box is editable.
|
| |
|
virtual bool | onEnterEvent (const EnterEvent &ev) |
| | Highlights the box when the pointer enters.
|
| |
|
virtual bool | onLeaveEvent (const LeaveEvent &ev) |
| | Clears the highlight when the pointer leaves.
|
| |
|
virtual void | onFocusEvent (const FocusEvent &ev) |
| | Begins text input on focus, or emits editingFinished() on loss.
|
| |
| 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 | 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 | 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 | onScrollEvent (const ScrollEvent &ev) |
| | Handles scroll input or returns false to continue 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 SpinBox presents an integer between minimum() and maximum(). setRange() sets the bounds. setValue() clamps the value, updates the entry, and emits valueEdited(). Up and down controls step the value. setEditable(false) keeps the number from being typed and does not take focus. setAccepted(true) completes an edit: Return emits returnPressed(), and losing focus after a change emits editingFinished().
Override toText() and toValue() to change how the integer is shown and parsed. onInput() accepts partial text while the user types. onStep() applies an up or down step.
The box owns a SpinBoxStyler. On invalidate it calls Styler::bind(). Appearance getters and setters overlay the application style. setRenderer() assigns a SpinBoxRenderer until it is cleared. Measure, layout, and paint call typed methods on the styler.
A LineEditor stores the entry text and caret. It is not a widget. SpinBoxButton is an integrated subpart, not a control the application places.
quantity.
valueEdited() += Pt::slot(*
this, &OrderForm::onQuantityEdited);
void OrderForm::onQuantityEdited(int n)
{
order.setQuantity(n);
}