wxGridFitMode Class Reference | wxWidgets

| Version: 3.2.11

Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | List of all members
wxGridFitMode Class Reference
Class List by Category » Grid Related Classes

`#include </cygdrive/c/Users/Hamis/Cygwin-packaging/wxWidgets3.2/wxWidgets3.2-3.2.11-1.x86_64/src/wxWidgets-3.2.11/interface/wx/grid.h>`

## Detailed Description

Allows to specify the behaviour when the cell contents doesn't fit into its allotted space.

Objects of this class are used with wxGridCellAttr::SetFitMode() and wxGrid::SetDefaultCellFitMode() and wxGrid::SetCellFitMode() functions and allow to specify what should happen if the cell contents doesn't fit into the available space. The possibilities are:

- Overflow into the cell to the right if it is empty, or possibly several cells, if the cell contents still doesn't fit after overflowing into the immediately neighbouring cell.
- Clip the cell contents, discarding the part which doesn't fit.
- Ellipsize the cell contents, i.e. replace the non-fitting part with ellipsis (``...), putting the ellipsis at the end by default, but possibly at the beginning or in the middle.

The default behaviour is to overflow, use wxGrid::SetDefaultCellFitMode() to change this, for example:

grid->SetDefaultCellFitMode(wxGridFitMode::Clip());
wxGridFitMode::Clip
static wxGridFitMode Clip()
Pseudo-constructor for object specifying clipping behaviour.

Objects of this class are created using static functions instead of constructors for better readability and can't be changed after creating them except by using the assignment operator.

##

Library: wxCore
Category: Grid Related Classes

Since
  3.1.4

## Public Member Functions
| wxGridFitMode ()
| Default constructor creates an object not specifying any behaviour.
bool | IsSpecified () const
| Return true if the object specifies some particular behaviour.
bool | IsClip () const
| Return true if the object specifies clipping behaviour.
bool | IsOverflow () const
| Return true if the object specifies overflow behaviour.
wxEllipsizeMode | GetEllipsizeMode () const
| Return ellipsize mode, possibly `wxELLIPSIZE_NONE`.

## Static Public Member Functions
static wxGridFitMode | Clip ()
| Pseudo-constructor for object specifying clipping behaviour.
static wxGridFitMode | Overflow ()
| Pseudo-constructor for object specifying overflow behaviour.
static wxGridFitMode | Ellipsize (wxEllipsizeMode ellipsize=wxELLIPSIZE_END)
| Pseudo-constructor for object specifying ellipsize behaviour.

## Constructor & Destructor Documentation

## ◆ wxGridFitMode()

wxGridFitMode::wxGridFitMode | ( |  | ) |

Default constructor creates an object not specifying any behaviour.

This constructor is not very useful, use static methods Clip() and Overflow() below to create objects of this class instead.

## Member Function Documentation

## ◆ Clip()

wxGridFitMode wxGridFitMode::Clip | ( |  | ) |
| static

Pseudo-constructor for object specifying clipping behaviour.

## ◆ Ellipsize()

wxGridFitMode wxGridFitMode::Ellipsize | ( | wxEllipsizeMode | ellipsize = wxELLIPSIZE_END | ) |
| static

Pseudo-constructor for object specifying ellipsize behaviour.

## ◆ GetEllipsizeMode()

wxEllipsizeMode wxGridFitMode::GetEllipsizeMode | ( |  | ) | const

Return ellipsize mode, possibly `wxELLIPSIZE_NONE`.

For the objects constructed using Ellipsize(), the same ellipsization mode as was passed to it is returned. For all the other objects, wxELLIPSIZE_NONE is.

## ◆ IsClip()

bool wxGridFitMode::IsClip | ( |  | ) | const

Return true if the object specifies clipping behaviour.

This method returns true only for the objects returned by Clip().

## ◆ IsOverflow()

bool wxGridFitMode::IsOverflow | ( |  | ) | const

Return true if the object specifies overflow behaviour.

This method returns true only for the objects returned by Overflow().

## ◆ IsSpecified()

bool wxGridFitMode::IsSpecified | ( |  | ) | const

Return true if the object specifies some particular behaviour.

This method returns false for default-constructed objects of this type only.

## ◆ Overflow()

wxGridFitMode wxGridFitMode::Overflow | ( |  | ) |
| static

Pseudo-constructor for object specifying overflow behaviour.