PCL
pcl::NumericEdit Class Reference

A label/edit compound control to edit numeric parameters. More...

#include <NumericControl.h>

+ Inheritance diagram for pcl::NumericEdit:

Public Types

using value_event_handler = void(Control::*)(NumericEdit &sender, double 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

 NumericEdit (Control &parent=Null())
 
 ~NumericEdit () override
 
void AdjustEditWidth ()
 
void DisableAutoAdjustEditWidth (bool disable=true)
 
void DisableFixedPrecision (bool disable=true)
 
void DisableFixedSign (bool disable=true)
 
void DisableScientificNotation (bool disable=true)
 
void DisableValidatingRegExp (bool disable=true)
 
void EnableAutoAdjustEditWidth (bool enable=true)
 
void EnableFixedPrecision (bool enable=true)
 
void EnableFixedSign (bool enable=true)
 
void EnableScientificNotation (bool enable=true)
 
void EnableValidatingRegExp (bool enable=true)
 
bool IsAutoAdjustEditWidth () const
 
bool IsFixedPrecision () const
 
bool IsFixedSign () const
 
bool IsReal () const
 
bool IsScientificNotation () const
 
bool IsValidatingRegExpEnabled () const
 
double LowerBound () const
 
int MinEditWidth () const
 
void OnValueUpdated (value_event_handler, Control &)
 
int Precision () const
 
int ScientificNotationTriggerExponent () const
 
void SetInteger (bool integer=true)
 
void SetPrecision (int n)
 
virtual void SetRange (double lower, double upper)
 
void SetReal (bool real=true)
 
void SetScientificNotationTriggerExponent (int exp10)
 
void SetValue (double)
 
double UpperBound () const
 
double Value () const
 
String ValueAsString () const
 
String ValueAsString (double) 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)
 

Public Attributes

Edit edit
 The Edit part of this NumericEdit control.
 
Label label
 The Label part of this NumericEdit control.
 
HorizontalSizer sizer
 The Sizer object of this NumericEdit control.
 

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 NumericEdit.

Definition at line 78 of file NumericControl.h.

Member Typedef Documentation

◆ value_event_handler

using pcl::NumericEdit::value_event_handler = void (Control::*)( NumericEdit& sender, double value )

#

Definition at line 324 of file NumericControl.h.

Constructor & Destructor Documentation

◆ NumericEdit()

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

Constructs a NumericEdit object as a child control of parent.

◆ ~NumericEdit()

pcl::NumericEdit::~NumericEdit ( )
inlineoverride

Destroys a NumericEdit object.

Definition at line 94 of file NumericControl.h.

Member Function Documentation

◆ AdjustEditWidth()

void pcl::NumericEdit::AdjustEditWidth ( )

#

◆ DisableAutoAdjustEditWidth()

void pcl::NumericEdit::DisableAutoAdjustEditWidth ( bool  disable = true)
inline

#

Definition at line 286 of file NumericControl.h.

◆ DisableFixedPrecision()

void pcl::NumericEdit::DisableFixedPrecision ( bool  disable = true)
inline

Disables the fixed precision property of this NumericEdit object. See IsFixedPrecision() for detailed information.

Definition at line 217 of file NumericControl.h.

◆ DisableFixedSign()

void pcl::NumericEdit::DisableFixedSign ( bool  disable = true)
inline

#

Definition at line 264 of file NumericControl.h.

◆ DisableScientificNotation()

void pcl::NumericEdit::DisableScientificNotation ( bool  disable = true)
inline

#

Definition at line 235 of file NumericControl.h.

◆ DisableValidatingRegExp()

void pcl::NumericEdit::DisableValidatingRegExp ( bool  disable = true)
inline

Disables the use of validating regular expressions.

Definition at line 312 of file NumericControl.h.

◆ EnableAutoAdjustEditWidth()

void pcl::NumericEdit::EnableAutoAdjustEditWidth ( bool  enable = true)
inline

#

Definition at line 278 of file NumericControl.h.

◆ EnableFixedPrecision()

void pcl::NumericEdit::EnableFixedPrecision ( bool  enable = true)

Enables the fixed precision property of this NumericEdit object. See IsFixedPrecision() for detailed information.

◆ EnableFixedSign()

void pcl::NumericEdit::EnableFixedSign ( bool  enable = true)

#

◆ EnableScientificNotation()

void pcl::NumericEdit::EnableScientificNotation ( bool  enable = true)

#

◆ EnableValidatingRegExp()

void pcl::NumericEdit::EnableValidatingRegExp ( bool  enable = true)
inline

Enables the use of validating regular expressions.

Definition at line 303 of file NumericControl.h.

◆ IsAutoAdjustEditWidth()

bool pcl::NumericEdit::IsAutoAdjustEditWidth ( ) const
inline

#

Definition at line 271 of file NumericControl.h.

◆ IsFixedPrecision()

bool pcl::NumericEdit::IsFixedPrecision ( ) const
inline

Returns true if the precision property is being applied literally as a fixed number of digits after the decimal separator. Returns false if precision refers to the number of represented significant digits.

For example, if the current value is 123.45678 and precision is 4, the represented value would be:

With fixed precision enabled: 123.4568
With fixed precision disabled: 123.5

By default, the precision property of a NumericEdit control refers to the number of represented significant digits, so fixed precision is disabled by default.

See also
EnableFixedPrecision(), Precision()

Definition at line 202 of file NumericControl.h.

◆ IsFixedSign()

bool pcl::NumericEdit::IsFixedSign ( ) const
inline

#

Definition at line 253 of file NumericControl.h.

◆ IsReal()

bool pcl::NumericEdit::IsReal ( ) const
inline

#

Definition at line 132 of file NumericControl.h.

◆ IsScientificNotation()

bool pcl::NumericEdit::IsScientificNotation ( ) const
inline

#

Definition at line 224 of file NumericControl.h.

◆ IsValidatingRegExpEnabled()

bool pcl::NumericEdit::IsValidatingRegExpEnabled ( ) const
inline

Returns true if validating regular expressions are used to filter text input, false is the user is allowed to enter any characters freely.

Definition at line 295 of file NumericControl.h.

◆ LowerBound()

double pcl::NumericEdit::LowerBound ( ) const
inline

#

Definition at line 150 of file NumericControl.h.

◆ MinEditWidth()

int pcl::NumericEdit::MinEditWidth ( ) const

#

◆ OnValueUpdated()

void pcl::NumericEdit::OnValueUpdated ( value_event_handler  ,
Control  
)

#

◆ Precision()

int pcl::NumericEdit::Precision ( ) const
inline

#

Definition at line 176 of file NumericControl.h.

◆ ScientificNotationTriggerExponent()

int pcl::NumericEdit::ScientificNotationTriggerExponent ( ) const
inline

#

Definition at line 242 of file NumericControl.h.

◆ SetInteger()

void pcl::NumericEdit::SetInteger ( bool  integer = true)
inline

#

Definition at line 143 of file NumericControl.h.

◆ SetPrecision()

void pcl::NumericEdit::SetPrecision ( int  n)

#

◆ SetRange()

virtual void pcl::NumericEdit::SetRange ( double  lower,
double  upper 
)
virtual

Sets the range of allowed control values.

Parameters
lowerMinimum allowed control value, or lower bound.
upperMaximum allowed control value, or upper bound.

If the specified lower and upper bounds are not sorted in ascending order, this member function will swap them automatically.

Reimplemented in pcl::NumericControl.

◆ SetReal()

void pcl::NumericEdit::SetReal ( bool  real = true)

#

◆ SetScientificNotationTriggerExponent()

void pcl::NumericEdit::SetScientificNotationTriggerExponent ( int  exp10)

#

◆ SetValue()

void pcl::NumericEdit::SetValue ( double  )

Sets the current value of this NumericEdit object.

◆ UpperBound()

double pcl::NumericEdit::UpperBound ( ) const
inline

#

Definition at line 157 of file NumericControl.h.

◆ Value()

double pcl::NumericEdit::Value ( ) const
inline

Returns the current value of this NumericEdit object.

Definition at line 101 of file NumericControl.h.

◆ ValueAsString() [1/2]

String pcl::NumericEdit::ValueAsString ( ) const
inline

#

Definition at line 117 of file NumericControl.h.

◆ ValueAsString() [2/2]

String pcl::NumericEdit::ValueAsString ( double  ) const

#


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