Version: 2.9.4
Public Member Functions | Protected Member Functions
wxWrapSizer Class Reference

#include </home/zeitlin/src/wx/github/interface/wx/wrapsizer.h>

Inheritance diagram for wxWrapSizer:

Detailed Description

A wrap sizer lays out its items in a single line, like a box sizer -- as long as there is space available in that direction.

Once all available space in the primary direction has been used, a new line is added and items are added there.

So a wrap sizer has a primary orientation for adding items, and adds lines as needed in the secondary direction.

Library:  wxCore
Category:  Window Layout
See also:
wxBoxSizer, wxSizer, Sizers Overview

Public Member Functions

 wxWrapSizer (int orient=wxHORIZONTAL, int flags=wxWRAPSIZER_DEFAULT_FLAGS)
 Constructor for a wxWrapSizer.
virtual bool InformFirstDirection (int direction, int size, int availableOtherDir)
 Not used by an application.
virtual void RecalcSizes ()
 Implements the calculation of a box sizer's dimensions and then sets the size of its children (calling wxWindow::SetSize if the child is a window).
virtual wxSize CalcMin ()
 Implements the calculation of a box sizer's minimal.

Protected Member Functions

virtual bool IsSpaceItem (wxSizerItem *item) const
 Can be overridden in the derived classes to treat some normal items as spacers.

List of all members.


Constructor & Destructor Documentation

wxWrapSizer::wxWrapSizer ( int  orient = wxHORIZONTAL,
int  flags = wxWRAPSIZER_DEFAULT_FLAGS 
)

Constructor for a wxWrapSizer.

orient determines the primary direction of the sizer (the most common case being wxHORIZONTAL). The flags parameter can be a combination of the values wxEXTEND_LAST_ON_EACH_LINE which will cause the last item on each line to use any remaining space on that line and wxREMOVE_LEADING_SPACES which removes any spacer elements from the beginning of a row.

Both of these flags are on by default.


Member Function Documentation

virtual wxSize wxWrapSizer::CalcMin ( ) [virtual]

Implements the calculation of a box sizer's minimal.

It is used internally only and must not be called by the user. Documented for information.

Reimplemented from wxBoxSizer.

virtual bool wxWrapSizer::InformFirstDirection ( int  direction,
int  size,
int  availableOtherDir 
) [virtual]

Not used by an application.

This is the mechanism by which sizers can inform sub-items of the first determined size component. The sub-item can then better determine its size requirements.

Returns true if the information was used (and the sub-item min size was updated).

Reimplemented from wxSizer.

virtual bool wxWrapSizer::IsSpaceItem ( wxSizerItem item) const [protected, virtual]

Can be overridden in the derived classes to treat some normal items as spacers.

This method is used to determine whether the given item should be considered to be a spacer for the purposes of wxREMOVE_LEADING_SPACES implementation. By default only returns true for the real spacers.

virtual void wxWrapSizer::RecalcSizes ( ) [virtual]

Implements the calculation of a box sizer's dimensions and then sets the size of its children (calling wxWindow::SetSize if the child is a window).

It is used internally only and must not be called by the user (call Layout() if you want to resize). Documented for information.

Reimplemented from wxBoxSizer.

 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Defines