Add wxSizerFlags::Cent{er,re}{Vertical,Horizontal}().
Provide CentreVertical() and CentreHorizontal() methods in wxSizerFlags which are useful for 2D sizers (for 1D ones just Centre() can be used anyhow).
This commit is contained in:
@@ -78,6 +78,12 @@ public:
|
|||||||
wxSizerFlags& Centre() { return Align(wxALIGN_CENTRE); }
|
wxSizerFlags& Centre() { return Align(wxALIGN_CENTRE); }
|
||||||
wxSizerFlags& Center() { return Centre(); }
|
wxSizerFlags& Center() { return Centre(); }
|
||||||
|
|
||||||
|
wxSizerFlags& CentreVertical() { return Align(wxALIGN_CENTRE_VERTICAL); }
|
||||||
|
wxSizerFlags& CenterVertical() { return CentreVertical(); }
|
||||||
|
|
||||||
|
wxSizerFlags& CentreHorizontal() { return Align(wxALIGN_CENTRE_HORIZONTAL); }
|
||||||
|
wxSizerFlags& CenterHorizontal() { return CentreHorizontal(); }
|
||||||
|
|
||||||
wxSizerFlags& Top()
|
wxSizerFlags& Top()
|
||||||
{
|
{
|
||||||
m_flags &= ~(wxALIGN_BOTTOM | wxALIGN_CENTRE_VERTICAL);
|
m_flags &= ~(wxALIGN_BOTTOM | wxALIGN_CENTRE_VERTICAL);
|
||||||
|
@@ -1393,6 +1393,44 @@ public:
|
|||||||
*/
|
*/
|
||||||
wxSizerFlags& Centre();
|
wxSizerFlags& Centre();
|
||||||
|
|
||||||
|
/**
|
||||||
|
Same as CentreHorizontal().
|
||||||
|
|
||||||
|
@since 3.1.0
|
||||||
|
*/
|
||||||
|
wxSizerFlags& CenterHorizontal();
|
||||||
|
|
||||||
|
/**
|
||||||
|
Same as CentreVertical().
|
||||||
|
|
||||||
|
@since 3.1.0
|
||||||
|
*/
|
||||||
|
wxSizerFlags& CenterVertical();
|
||||||
|
|
||||||
|
/**
|
||||||
|
Center an item only in horizontal direction.
|
||||||
|
|
||||||
|
This is mostly useful for 2D sizers as for the 1D ones it is shorter to
|
||||||
|
just use Centre() as the alignment is only used in one direction with
|
||||||
|
them anyhow. For 2D sizers, centering an item in one direction is quite
|
||||||
|
different from centering it in both directions however.
|
||||||
|
|
||||||
|
@see CentreVertical()
|
||||||
|
|
||||||
|
@since 3.1.0
|
||||||
|
*/
|
||||||
|
wxSizerFlags& CentreHorizontal();
|
||||||
|
|
||||||
|
/**
|
||||||
|
Center an item only in vertical direction.
|
||||||
|
|
||||||
|
The remarks in CentreHorizontal() documentation also apply to this
|
||||||
|
function.
|
||||||
|
|
||||||
|
@since 3.1.0
|
||||||
|
*/
|
||||||
|
wxSizerFlags& CentreVertical();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Sets the border in the given @a direction having twice the default
|
Sets the border in the given @a direction having twice the default
|
||||||
border size.
|
border size.
|
||||||
|
Reference in New Issue
Block a user