Go to the documentation of this file.
57 #ifndef __PCL_BUILDING_PIXINSIGHT_APPLICATION
63 #endif // __PCL_BUILDING_PIXINSIGHT_APPLICATION
100 #ifndef __PCL_BUILDING_PIXINSIGHT_APPLICATION
102 class PCL_CLASS Control;
153 using item_alignment = Align::value_type;
161 Sizer(
bool vertical );
186 static Sizer& Null();
192 Control& ParentControl()
const;
197 bool IsVertical()
const;
204 return !IsVertical();
210 int NumberOfItems()
const;
216 int IndexOf(
const Sizer& s )
const;
222 int IndexOf(
const Control& c )
const;
229 return IndexOf( s ) >= 0;
237 return IndexOf( c ) >= 0;
255 void Add(
Sizer& s,
int stretchFactor = 0 );
292 void Add(
Control& c,
int stretchFactor = 0, item_alignment align = Align::Default );
305 void AddSpacing(
int size,
bool autoScaling =
true );
315 AddSpacing( size,
true );
326 AddSpacing( size,
false );
337 void AddStretch(
int stretchFactor = 100 );
356 void Insert(
int index,
Sizer& s,
int stretchFactor = 0 );
376 void Insert(
int index,
Control& c,
int stretchFactor = 0, item_alignment align = Align::Default );
389 void InsertSpacing(
int index,
int size,
bool autoScaling =
true );
399 InsertSpacing( index, size,
true );
410 InsertSpacing( index, size,
false );
421 void InsertStretch(
int index,
int stretchFactor = 100 );
427 void Remove(
Sizer& s );
442 void SetStretchFactor(
Sizer& s,
int stretch );
451 void SetStretchFactor(
Control& c,
int stretch );
457 void SetAlignment(
Sizer& s, item_alignment align );
463 void SetAlignment(
Control& c, item_alignment align );
481 int Margin(
bool autoScaling =
true )
const;
494 void SetMargin(
int margin,
bool autoScaling =
true );
507 int Spacing(
bool autoScaling =
true )
const;
520 void SetSpacing(
int spacing,
bool autoScaling =
true );
536 double DisplayPixelRatio()
const;
546 return RoundInt( DisplayPixelRatio()*size );
557 return RoundInt( size/DisplayPixelRatio() );
566 void* CloneHandle()
const override;
568 friend class Control;
637 #endif // __PCL_BUILDING_PIXINSIGHT_APPLICATION
641 #endif // __PCL_Sizer_h
void AddUnscaledSpacing(int size)
int RoundInt(T x) noexcept
Client-side interface to a PixInsight vertical sizer.
Root base class for all user interface objects.
int LogicalPixelsToPhysical(int size) const
Base class for PixInsight sizer objects.
Align::value_type item_alignment
void InsertScaledSpacing(int index, int size)
void InsertUnscaledSpacing(int index, int size)
int PhysicalPixelsToLogical(int size) const
Client-side interface to a PixInsight horizontal sizer.
bool IsHorizontal() const
~VerticalSizer() override
bool Contains(const Control &c) const
Client-side interface to a PixInsight Control object.
void EnsureUnique() override
bool Contains(const Sizer &s) const
~HorizontalSizer() override
void AddScaledSpacing(int size)