PCL
pcl::SpinBox Class Reference

Client-side interface to a PixInsight SpinBox control. More...

#include <SpinBox.h>

+ Inheritance diagram for pcl::SpinBox:

Public Types

using range_event_handler = void(Control::*)(SpinBox &sender, int minValue, int maxValue)
 
using value_event_handler = void(Control::*)(SpinBox &sender, int value)
 
- Public Types inherited from pcl::Control
using child_event_handler = void(Control::*)(Control &sender, Control &child)
 
using close_event_handler = void(Control::*)(Control &sender, bool &allowClose)
 
using event_handler = void(Control::*)(Control &sender)
 
using file_drag_event_handler = void(Control::*)(Control &sender, const pcl::Point &pos, const StringList &files, unsigned modifiers, bool &wantsFiles)
 
using file_drop_event_handler = void(Control::*)(Control &sender, const pcl::Point &pos, const StringList &files, unsigned modifiers)
 
using keyboard_event_handler = void(Control::*)(Control &sender, int key, unsigned modifiers, bool &wantsKey)
 
using mouse_button_event_handler = void(Control::*)(Control &sender, const pcl::Point &pos, int button, unsigned buttons, unsigned modifiers)
 
using mouse_event_handler = void(Control::*)(Control &sender, const pcl::Point &pos, unsigned buttons, unsigned modifiers)
 
using mouse_wheel_event_handler = void(Control::*)(Control &sender, const pcl::Point &pos, int delta, unsigned buttons, unsigned modifiers)
 
using move_event_handler = void(Control::*)(Control &sender, const pcl::Point &newPos, const pcl::Point &oldPos)
 
using paint_event_handler = void(Control::*)(Control &sender, const pcl::Rect &updateRect)
 
using resize_event_handler = void(Control::*)(Control &sender, int newWidth, int newHeight, int oldWidth, int oldHeight)
 
using view_drag_event_handler = void(Control::*)(Control &sender, const pcl::Point &pos, const View &view, unsigned modifiers, bool &wantsView)
 
using view_drop_event_handler = void(Control::*)(Control &sender, const pcl::Point &pos, const View &view, unsigned modifiers)
 

Public Member Functions

 SpinBox (Control &parent=Control::Null())
 
 ~SpinBox () override
 
void ClearMinimumValueText ()
 
void ClearPrefix ()
 
void ClearSuffix ()
 
void DisableWrapping (bool disable=true)
 
void EnableWrapping (bool=true)
 
void GetRange (int &minValue, int &maxValue) const
 
bool IsEditable () const
 
bool IsLeftAligned () const
 
bool IsRightAligned () const
 
bool IsWrappingEnabled () const
 
int MaxValue () const
 
String MinimumValueText () const
 
int MinValue () const
 
double NormalizedValue () const
 
void OnRangeUpdated (range_event_handler handler, Control &receiver)
 
void OnValueUpdated (value_event_handler handler, Control &receiver)
 
String Prefix () const
 
void SetEditable (bool=true)
 
void SetLeftAlignment (bool left=true)
 
void SetMaxValue (int m)
 
void SetMinimumValueText (const String &)
 
void SetMinValue (int m)
 
void SetNormalizedValue (double f)
 
void SetPrefix (const String &prefix)
 
void SetRange (int minValue, int maxValue)
 
void SetRightAlignment (bool=true)
 
void SetStepSize (int)
 
void SetSuffix (const String &)
 
void SetValue (int v)
 
int StepSize () const
 
String Suffix () const
 
int Value () const
 
- Public Member Functions inherited from pcl::Control
 Control (const Control &)=delete
 
 Control (Control &&)=delete
 
 Control (Control &parent=Null(), uint32=0)
 
 ~Control () override
 
void ActivateRealTimePreview ()
 
void ActivateTrackView ()
 
void ActivateWindow ()
 
void AdjustToContents ()
 
RGBA AlternateCanvasColor () const
 
RGBA BackgroundColor () const
 
pcl::Rect BoundsRect () const
 
void BringToFront ()
 
RGBA ButtonColor () const
 
RGBA ButtonTextColor () const
 
bool CanUpdate () const
 
RGBA CanvasColor ()
 
ControlChildByPos (const pcl::Point &p) const
 
ControlChildByPos (int x, int y) const
 
pcl::Rect ChildrenRect () const
 
ControlChildToFocus () const
 
void ClearInfoText ()
 
int ClientHeight () const
 
pcl::Rect ClientRect () const
 
int ClientWidth () const
 
void ControlToLocal (const Control &, int &x, int &y) const
 
pcl::Point ControlToLocal (const Control &w, const pcl::Point &p) const
 
pcl::Cursor Cursor () const
 
void DeactivateRealTimePreview ()
 
void DeactivateTrackView ()
 
void Disable (bool disabled=true)
 
void DisableExpansion (bool horzDisable=true, bool vertDisable=true)
 
void DisableMouseTracking (bool disable=true)
 
void DisableUpdates (bool disable=true)
 
double DisplayPixelRatio () const
 
virtual void Enable (bool enabled=true)
 
void EnableExpansion (bool horzEnable=true, bool vertEnable=true)
 
void EnableMouseTracking (bool=true)
 
void EnableUpdates (bool enable=true)
 
void EnsureLayoutUpdated ()
 
void EnsureUnique () override
 
void Focus (bool focus=true)
 
ControlFocusedChild () const
 
FocusStyles FocusStyle () const
 
pcl::Font Font () const
 
RGBA ForegroundColor () const
 
int FrameHeight () const
 
pcl::Rect FrameRect () const
 
int FrameWidth () const
 
pcl::Cursor GetCursor () const
 
pcl::Font GetFont () const
 
void GetMaxSize (int &w, int &h) const
 
void GetMinSize (int &w, int &h) const
 
void GetScaledMaxSize (int &w, int &h) const
 
void GetScaledMinSize (int &w, int &h) const
 
pcl::Sizer GetSizer () const
 
pcl::Point GlobalToLocal (const pcl::Point &p) const
 
void GlobalToLocal (int &x, int &y) const
 
int Height () const
 
void Hide ()
 
RGBA HighlightColor () const
 
RGBA HighlightedTextColor () const
 
String InfoText () const
 
bool IsActiveWindow () const
 
bool IsAncestorOf (const Control &) const
 
virtual bool IsEnabled () const
 
bool IsFixedHeight () const
 
bool IsFixedWidth () const
 
bool IsFocused () const
 
bool IsHidden () const
 
bool IsHorizontalExpansionEnabled () const
 
bool IsMaximized () const
 
bool IsMinimized () const
 
bool IsModal () const
 
bool IsMouseTrackingEnabled () const
 
bool IsRealTimePreviewActive () const
 
bool IsTrackViewActive () const
 
bool IsUnderMouse () const
 
bool IsVerticalExpansionEnabled () const
 
bool IsVisible () const
 
bool IsWindow () const
 
void LocalToControl (const Control &, int &x, int &y) const
 
pcl::Point LocalToControl (const Control &w, const pcl::Point &p) const
 
pcl::Point LocalToGlobal (const pcl::Point &p) const
 
void LocalToGlobal (int &x, int &y) const
 
pcl::Point LocalToParent (const pcl::Point &p) const
 
void LocalToParent (int &x, int &y) const
 
int LogicalPixelsToPhysical (int size) const
 
int LogicalPixelsToResource (int size) const
 
int MaxHeight () const
 
int MaxWidth () const
 
int MinHeight () const
 
int MinWidth () const
 
void Move (const pcl::Point &p)
 
void Move (int x, int y)
 
ControlNextSiblingToFocus () const
 
void OnChildCreate (child_event_handler, Control &)
 
void OnChildDestroy (child_event_handler, Control &)
 
void OnClose (close_event_handler, Control &)
 
void OnDestroy (event_handler, Control &)
 
void OnEnter (event_handler, Control &)
 
void OnFileDrag (file_drag_event_handler, Control &)
 
void OnFileDrop (file_drop_event_handler, Control &)
 
void OnGetFocus (event_handler, Control &)
 
void OnHide (event_handler, Control &)
 
void OnKeyPress (keyboard_event_handler, Control &)
 
void OnKeyRelease (keyboard_event_handler, Control &)
 
void OnLeave (event_handler, Control &)
 
void OnLoseFocus (event_handler, Control &)
 
void OnMouseDoubleClick (mouse_event_handler, Control &)
 
void OnMouseMove (mouse_event_handler, Control &)
 
void OnMousePress (mouse_button_event_handler, Control &)
 
void OnMouseRelease (mouse_button_event_handler, Control &)
 
void OnMouseWheel (mouse_wheel_event_handler, Control &)
 
void OnMove (move_event_handler, Control &)
 
void OnPaint (paint_event_handler, Control &)
 
void OnResize (resize_event_handler, Control &)
 
void OnShow (event_handler, Control &)
 
void OnViewDrag (view_drag_event_handler, Control &)
 
void OnViewDrop (view_drop_event_handler, Control &)
 
Controloperator= (const Control &)=delete
 
Controloperator= (Control &&)=delete
 
ControlParent () const
 
pcl::Point ParentToLocal (const pcl::Point &p) const
 
void ParentToLocal (int &x, int &y) const
 
int PhysicalPixelsToLogical (int size) const
 
pcl::Point Position () const
 
void Repaint ()
 
void Repaint (const pcl::Rect &r)
 
void Repaint (int x0, int y0, int x1, int y1)
 
void Resize (int w, int h)
 
double ResourcePixelRatio () const
 
int ResourcePixelsToLogical (int size) const
 
void Restyle ()
 
Point ScaledCursorHotSpot (const Point &hotSpot) const
 
Point ScaledCursorHotSpot (int xHot, int yHot) const
 
int ScaledMaxHeight () const
 
int ScaledMaxWidth () const
 
int ScaledMinHeight () const
 
int ScaledMinWidth () const
 
template<class R >
String ScaledResource (R resource) const
 
template<class S >
String ScaledStyleSheet (S cssCode, int fontDPI=0) const
 
void Scroll (const pcl::Point &d)
 
void Scroll (const pcl::Point &d, const pcl::Rect &r)
 
void Scroll (int dx, int dy)
 
void Scroll (int dx, int dy, int x0, int y0, int x1, int y1)
 
void SendToBack ()
 
void SetAlternateCanvasColor (RGBA)
 
void SetBackgroundColor (RGBA)
 
void SetButtonColor (RGBA)
 
void SetButtonTextColor (RGBA)
 
void SetCanvasColor (RGBA)
 
void SetChildToFocus (Control &)
 
void SetClientRect (const pcl::Rect &r)
 
void SetClientRect (int x0, int y0, int x1, int y1)
 
void SetCursor (const pcl::Cursor &)
 
void SetCursorToParent ()
 
void SetFixedHeight ()
 
void SetFixedHeight (int h)
 
void SetFixedSize ()
 
void SetFixedSize (int w, int h)
 
void SetFixedWidth ()
 
void SetFixedWidth (int w)
 
void SetFocusStyle (FocusStyles)
 
void SetFont (const pcl::Font &)
 
void SetForegroundColor (RGBA)
 
void SetHighlightColor (RGBA)
 
void SetHighlightedTextColor (RGBA)
 
void SetInfoText (const String &)
 
void SetMaxHeight ()
 
void SetMaxHeight (int h)
 
void SetMaxSize ()
 
void SetMaxSize (int w, int h)
 
void SetMaxWidth ()
 
void SetMaxWidth (int w)
 
void SetMinHeight ()
 
void SetMinHeight (int h)
 
void SetMinSize ()
 
void SetMinSize (int w, int h)
 
void SetMinWidth ()
 
void SetMinWidth (int w)
 
void SetNextSiblingToFocus (Control &)
 
void SetParent (Control &)
 
void SetRealTimePreviewActive (bool=true)
 
void SetScaledFixedHeight (int h)
 
void SetScaledFixedSize (int w, int h)
 
void SetScaledFixedWidth (int w)
 
void SetScaledMaxHeight (int h)
 
void SetScaledMaxSize (int w, int h)
 
void SetScaledMaxWidth (int w)
 
void SetScaledMinHeight (int h)
 
void SetScaledMinSize (int w, int h)
 
void SetScaledMinWidth (int w)
 
void SetSizer (pcl::Sizer &)
 
void SetStyleSheet (const String &css)
 
void SetTextColor (RGBA)
 
void SetToolTip (const String &)
 
void SetTrackViewActive (bool=true)
 
void SetVariableHeight ()
 
void SetVariableSize ()
 
void SetVariableWidth ()
 
void SetVisible (bool visible)
 
void SetWindowOpacity (double)
 
void SetWindowTitle (const String &)
 
void Show ()
 
pcl::Sizer Sizer () const
 
void StackUnder (Control &)
 
String StyleSheet () const
 
RGBA TextColor () const
 
String ToolTip () const
 
void Unfocus ()
 
void Update ()
 
void Update (const pcl::Rect &r)
 
void Update (int x0, int y0, int x1, int y1)
 
pcl::Rect VisibleRect () const
 
int Width () const
 
ControlWindow () const
 
double WindowOpacity () const
 
String WindowTitle () const
 
int X () const
 
int Y () const
 
- Public Member Functions inherited from pcl::UIObject
virtual ~UIObject () noexcept(false)
 
bool IsAlias () const
 
bool IsGarbage () const
 
bool IsNull () const
 
bool IsSameObject (const UIObject &o) const
 
bool IsUnique () const
 
String ObjectId () const
 
IsoString ObjectType () const
 
bool operator< (const UIObject &o) const
 
bool operator== (const UIObject &o) const
 
size_type RefCount () const
 
void SetObjectId (const String &id)
 

Additional Inherited Members

- Static Public Member Functions inherited from pcl::Control
static void HideToolTip ()
 
static ControlNull ()
 
static void ShowToolTip (const Point &pos, const String &text, const Control &control=Control::Null(), const Rect &rect=Rect(0))
 
static void ShowToolTip (int x, int y, const String &text, const Control &control=Control::Null(), const Rect &rect=Rect(0))
 
static String ToolTipText ()
 
- Static Public Member Functions inherited from pcl::UIObject
static UIObjectNull ()
 
- Protected Member Functions inherited from pcl::UIObject
 UIObject ()=default
 
 UIObject (const UIObject &x)
 
 UIObject (UIObject &&x)
 
UIObjectoperator= (const UIObject &x)
 
UIObjectoperator= (UIObject &&x)
 

Detailed Description

TODO: Write a detailed description for Sizer.

Definition at line 75 of file SpinBox.h.

Constructor & Destructor Documentation

◆ SpinBox()

pcl::SpinBox::SpinBox ( Control parent = Control::Null())

Constructs a SpinBox as a child control of parent.

◆ ~SpinBox()

pcl::SpinBox::~SpinBox ( )
inlineoverride

Destroys a SpinBox object.

Definition at line 87 of file SpinBox.h.

Member Function Documentation

◆ ClearMinimumValueText()

void pcl::SpinBox::ClearMinimumValueText ( )
inline

Disables (clears) the minimum value text of this SpinBox control.

This is a convenience member function, equivalent to SetMinimumValueText( String() )

Definition at line 346 of file SpinBox.h.

◆ ClearPrefix()

void pcl::SpinBox::ClearPrefix ( )
inline

Disables (clears) the prefix string of this SpinBox control.

This is a convenience member function, equivalent to SetPrefix( String() )

Definition at line 288 of file SpinBox.h.

◆ ClearSuffix()

void pcl::SpinBox::ClearSuffix ( )
inline

Disables (clears) the suffix string of this SpinBox control.

This is a convenience member function, equivalent to SetSuffix( String() )

Definition at line 317 of file SpinBox.h.

◆ DisableWrapping()

void pcl::SpinBox::DisableWrapping ( bool  disable = true)
inline

Disables or enables wrapping mode for this SpinBox control.

See IsWrappingEnabled() for a description of SpinBox's wrapping mode.

This is a convenience member function, equivalent to EnableWrapping( !disable )

See also
IsWrappingEnabled(), EnableWrapping()

Definition at line 240 of file SpinBox.h.

◆ EnableWrapping()

void pcl::SpinBox::EnableWrapping ( bool  = true)

Enables or disables wrapping mode for this SpinBox control.

See IsWrappingEnabled() for a description of SpinBox's wrapping mode.

See also
IsWrappingEnabled(), DisableWrapping()

◆ GetRange()

void pcl::SpinBox::GetRange ( int &  minValue,
int &  maxValue 
) const

Gets the range of values for this SpinBox control.

Parameters
[out]minValue,maxValueReferences to the variables where the minimum and maximum values of this SpinBox control will be copied, respectively.
See also
SetRange(), MinValue(), MaxValue()

◆ IsEditable()

bool pcl::SpinBox::IsEditable ( ) const

Returns true iff this SpinBox control is editable.

An editable spin box allows the user to enter its current value directly on its Edit part. The value of a non-editable spin box can only be changed by clicking on its arrow icons, or by pressing the Up and Down keys when it has the keyboard focus.

See also
SetEditable()

◆ IsLeftAligned()

bool pcl::SpinBox::IsLeftAligned ( ) const
inline

Returns true iff the text in this SpinBox control is left-aligned.

This is a convenience member function, equivalent to !IsRightAligned()

See also
SetLeftAlignment(), IsRightAligned()

Definition at line 366 of file SpinBox.h.

◆ IsRightAligned()

bool pcl::SpinBox::IsRightAligned ( ) const

Returns true iff the text in this SpinBox control is right-aligned.

See also
SetRightAlignment(), IsLeftAligned()

◆ IsWrappingEnabled()

bool pcl::SpinBox::IsWrappingEnabled ( ) const

Returns true iff wrapping mode is enabled for this SpinBox control.

When wrapping is enabled, a SpinBox can wrap around its minimum and maximum values: stepping down from MinValue() sets the spin box's value to its MaxValue(), and stepping up from MaxValue() will set its value to MinValue().

See also
EnableWrapping(), DisableWrapping()

◆ MaxValue()

int pcl::SpinBox::MaxValue ( ) const
inline

Returns the maximum value of this SpinBox control.

See also
MinValue(), GetRange()

Definition at line 147 of file SpinBox.h.

◆ MinimumValueText()

String pcl::SpinBox::MinimumValueText ( ) const

Returns the minimum value text string for this SpinBox control.

When it is set to a non-empty string, the minimum value text is shown instead of the usual numeric literal when the spin box's value is equal to its minimum value.

See also
SetMinimumValueText(), Prefix(), Suffix()

◆ MinValue()

int pcl::SpinBox::MinValue ( ) const
inline

Returns the minimum value of this SpinBox control.

See also
MaxValue(), GetRange()

Definition at line 137 of file SpinBox.h.

◆ NormalizedValue()

double pcl::SpinBox::NormalizedValue ( ) const

Returns the current value of this SpinBox control as a normalized real value in the range [0,1].

See also
SetNormalizedValue(), Value()

◆ Prefix()

String pcl::SpinBox::Prefix ( ) const

Returns the prefix string of this SpinBox control.

The prefix is shown prepended to the spin box's text. It is useful to shown measuring or currency units. By default no prefix is shown in spin boxes.

See also
SetPrefix(), Suffix(), SetSuffix(), MinimumValueText()

◆ SetEditable()

void pcl::SpinBox::SetEditable ( bool  = true)

Enables or disables the editable state of this SpinBox control.

See also
IsEditable()

◆ SetLeftAlignment()

void pcl::SpinBox::SetLeftAlignment ( bool  left = true)
inline

Enables or disables left alignment for the text in this SpinBox control.

This is a convenience member function, equivalent to SetRightAlignment( !left )

See also
IsLeftAligned()

Definition at line 388 of file SpinBox.h.

◆ SetMaxValue()

void pcl::SpinBox::SetMaxValue ( int  m)
inline

Sets the maximum value of this SpinBox control.

This is a convenience member function, equivalent to SetRange( MinValue(), m )

See also
SetMinValue(), SetRange(), MinValue(), MaxValue()

Definition at line 183 of file SpinBox.h.

◆ SetMinimumValueText()

void pcl::SpinBox::SetMinimumValueText ( const String )

Sets the minimum value text string for this SpinBox control.

See also
MinimumValueText(), Prefix(), Suffix()

◆ SetMinValue()

void pcl::SpinBox::SetMinValue ( int  m)
inline

Sets the minimum value of this SpinBox control.

This is a convenience member function, equivalent to SetRange( m, MaxValue() )

See also
SetMaxValue(), SetRange(), MinValue(), MaxValue()

Definition at line 170 of file SpinBox.h.

◆ SetNormalizedValue()

void pcl::SpinBox::SetNormalizedValue ( double  f)

Sets the value of this SpinBox control as a normalized real value in the range [0,1].

See also
NormalizedValue(), SetValue()

◆ SetPrefix()

void pcl::SpinBox::SetPrefix ( const String prefix)

Sets the prefix string of this SpinBox control.

See also
Prefix(), Suffix(), SetSuffix(), MinimumValueText()

◆ SetRange()

void pcl::SpinBox::SetRange ( int  minValue,
int  maxValue 
)

Sets the range of values for this SpinBox control.

Parameters
minValue,maxValueNew minimum and maximum values, respectively, for this SpinBox control.
See also
GetRange(), SetMinValue(), SetMaxValue()

◆ SetRightAlignment()

void pcl::SpinBox::SetRightAlignment ( bool  = true)

Enables or disables right alignment for the text in this SpinBox control.

See also
IsRightAligned()

◆ SetStepSize()

void pcl::SpinBox::SetStepSize ( int  )

Sets the step size of this SpinBox control

The step size is the number of units that are skipped when the user clicks an arrow icon on this SpinBox control.

See also
StepSize()

◆ SetSuffix()

void pcl::SpinBox::SetSuffix ( const String )

Sets the suffix string of this SpinBox control.

See also
Suffix(), Prefix(), SetPrefix(), MinimumValueText()

◆ SetValue()

void pcl::SpinBox::SetValue ( int  v)

Sets the value of this SpinBox control.

See also
Value(), NormalizedValue(), SetNormalizedValue()

◆ StepSize()

int pcl::SpinBox::StepSize ( ) const

Returns the step size of this SpinBox control

The step size is the number of units that are skipped when the user clicks an arrow icon on this SpinBox control.

See also
SetStepSize()

◆ Suffix()

String pcl::SpinBox::Suffix ( ) const

Returns the suffix string of this SpinBox control.

The suffix is shown appended to the spin box's text. It is useful to shown measuring or currency units. By default no suffix is shown in spin boxes.

See also
SetSuffix(), Prefix(), SetPrefix(), MinimumValueText()

◆ Value()

int pcl::SpinBox::Value ( ) const

Returns the current value of this SpinBox control.

See also
SetValue(), NormalizedValue(), SetNormalizedValue()

The documentation for this class was generated from the following file: